Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周远喜
mes-ui
Commits
4518c49d
Commit
4518c49d
authored
Apr 04, 2020
by
kangzhenfei
Committed by
佟礼
Apr 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
料单,料单确认
parent
6bf72999
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1238 additions
and
751 deletions
+1238
-751
zh-CN.js
i18n/locale/zh-CN.js
+2
-0
index.vue
pages/aps/dispatch/index.vue
+1
-1
orderMaterial.vue
pages/processManage/setProcess/components/orderMaterial.vue
+103
-37
index.vue
pages/processManage/setProcess/index.vue
+685
-713
orderSupport.vue
pages/produce/orderSupport.vue
+447
-0
No files found.
i18n/locale/zh-CN.js
View file @
4518c49d
...
...
@@ -1148,6 +1148,8 @@ export default {
routingDetailId
:
'工序ID'
,
routingStepId
:
'工步ID'
,
quantity
:
'数量'
,
singlequantity
:
'总计数量'
,
materialId
:
'物料id'
,
materialType
:
'物料类型'
,
materialNumber
:
'物料编号'
,
...
...
pages/aps/dispatch/index.vue
View file @
4518c49d
...
...
@@ -33,7 +33,7 @@
工序
{{
item
.
process_seq
}}
:
{{
item
.
process_name
}}
</p>
<p>
{{
item
.
beginTime
}}
--
{{
item
.
endTime
}}
</p>
<
p>
设备 :
{{
item
.
EquipCode
}}
</p
>
<
!--
<p>
设备 :
{{
item
.
equipCode
}}
</p>
--
>
</div>
</Card>
</Col>
...
...
pages/processManage/setProcess/components/orderMaterial.vue
View file @
4518c49d
<
style
lang=
"less"
>
@import "../../../processDesign/Process/menu.less";
</
style
>
<
template
>
<div>
<div
class=
"new_box"
>
<Table
v-if=
"false"
stripe
...
...
@@ -33,22 +35,27 @@
</FormItem>
</Row>
-->
<Row>
<Col
span=
"12"
>
<FormItem
label=
"文档编号"
prop=
"code"
>
<Input
size=
"large"
v-model
.
trim=
"formValidate.code"
placeholder=
"请输入..."
style=
"width:240px"
:disabled=
"
isview"
:disabled=
"code
isview"
/>
</FormItem>
</Col>
<Col
span=
"12"
>
<Button
v-if=
"!isview"
type=
"primary"
@
click=
"openNew"
>
新增
</Button>
</Col>
</Row>
</Form>
<
!--
<
div>
<Button
type=
"text"
size=
"large"
@
click=
"saveCancelModel"
>
取消
</Button>
<div>
<!--
<Button
type=
"text"
size=
"large"
@
click=
"saveCancelModel"
>
取消
</Button>
<Button
type=
"primary"
size=
"large"
@
click=
"Seveld"
class=
"mr20"
>
确定
</Button>
<Checkbox
v-model=
"checked"
label=
"送审"
>
送审
</Checkbox
>
</div>
-->
<Checkbox
v-model=
"checked"
label=
"送审"
>
送审
</Checkbox>
--
>
</div>
<Table
stripe
ref=
"table"
border
:columns=
"column1"
:data=
"formValidate1"
class=
"tableCommon"
>
<template
slot-scope=
"
{ row,index }" slot="materialType">
<state
...
...
@@ -144,6 +151,7 @@ export default {
Modeltitle
:
"料单"
,
dataTop
:
[],
isview
:
false
,
codeisview
:
false
,
newModel
:
false
,
columnTop
:
[
...
...
@@ -234,7 +242,7 @@ export default {
]*/
},
approvalStatus
:
0
,
editindex
:
-
1
,
formValidate
:
{
id
:
0
,
code
:
""
,
...
...
@@ -260,7 +268,7 @@ export default {
pate_number
:
""
,
spec
:
""
,
categories
:
""
,
quantity
:
0
,
quantity
:
1
,
singlequantity
:
0
,
quantity_unit
:
""
,
estimated_part_height
:
0
,
...
...
@@ -299,11 +307,16 @@ export default {
},
{
key
:
"quantity"
,
title
:
this
.
l
(
"singlequantity"
),
align
:
"left"
,
high
:
true
},
{
key
:
"singlequantity"
,
title
:
this
.
l
(
"quantity"
),
align
:
"left"
,
high
:
true
},
{
key
:
"material_type"
,
title
:
this
.
l
(
"materialType"
),
...
...
@@ -358,6 +371,7 @@ export default {
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
let
id
=
params
.
row
.
id
;
if
(
!
this
.
isview
)
{
return
h
(
"div"
,
...
...
@@ -423,6 +437,13 @@ export default {
key
=
"RoutingSupporting"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
openNew
()
{
// this.$nextTick(()=>{
// this.$refs['formItem'].resetFields()
// }
this
.
cleardata1
();
this
.
newModel
=
true
;
},
loaddata
()
{
if
(
this
.
formValidate
.
id
!=
0
)
{
var
url
=
...
...
@@ -432,14 +453,20 @@ export default {
if
(
this
.
formValidate
.
approvalStatus
==
1
||
this
.
formValidate
.
approvalStatus
==
2
||
this
.
formValidate
.
approvalStatus
==
3
this
.
formValidate
.
approvalStatus
==
3
||
this
.
formValidate
.
status
==
2
)
{
this
.
isview
=
true
;
}
else
{
this
.
isview
=
false
;
}
this
.
codeisview
=
true
;
this
.
formValidate1
=
response
.
result
.
orderMaterialList
;
for
(
let
i
=
0
;
i
<
this
.
formValidate1
.
length
;
i
++
)
{
let
obj
=
this
.
formValidate1
[
i
];
obj
.
quantity
=
obj
.
quantity
*
columnTop
[
0
].
quantity
;
}
});
}
else
{
this
.
cleardata
();
...
...
@@ -448,11 +475,8 @@ export default {
`
${
designUrl
}
/ordersupport/getbyheaderid?headerID=`
+
this
.
formValidate
.
routingHeaderId
;
service
.
get
(
`
${
url
}
`
).
then
(
response
=>
{
this
.
formValidate
=
response
.
result
.
orderMaterial
;
var
url
=
`
${
designUrl
}
/ordersupport/getordermateriacode`
;
service
.
get
(
`
${
url
}
`
).
then
(
response
=>
{
this
.
formValidate
.
code
=
response
.
result
;
});
this
.
formValidate
.
code
=
response
.
result
.
orderMaterial
.
code
;
this
.
isview
=
false
;
this
.
formValidate1
=
response
.
result
.
orderMaterialList
;
});
...
...
@@ -559,17 +583,31 @@ export default {
}
if
(
this
.
formValidate
.
id
==
0
)
{
this
.
formValidate1
.
push
(
this
.
formprocessValidate
);
if
(
this
.
editindex
==
-
1
)
{
this
.
formprocessValidate
.
singlequantity
=
this
.
formprocessValidate
/
columnTop
[
0
].
quantity
;
let
curData
=
{};
curData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
formprocessValidate
));
this
.
formValidate1
.
push
(
curData
);
}
else
{
var
url
=
`
${
designUrl
}
/ordermateriallist/createorupdate`
;
let
curData
=
{};
curData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
formprocessValidate
));
this
.
formValidate1
[
this
.
editindex
]
=
curData
;
}
}
else
{
var
url
=
`
${
designUrl
}
/ordermateriallist/createorupdate`
;
this
.
formprocessValidate
.
materialbillId
=
this
.
formValidate
.
id
;
service
.
post
(
`
${
url
}
`
,
this
.
formprocessValidate
)
.
post
(
`
${
url
}
`
,
{
orderMaterialList
:
this
.
formprocessValidate
})
.
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
newModel
=
false
;
this
.
cleardata
();
this
.
loaddata
();
}
})
...
...
@@ -577,8 +615,10 @@ export default {
this
.
$Message
.
error
(
"保存失败"
);
});
}
this
.
editindex
=
-
1
;
},
editFun
(
params
)
{
this
.
editindex
=
params
.
index
;
this
.
formprocessValidate
.
id
=
params
.
row
.
id
;
this
.
formprocessValidate
.
materialbillId
=
params
.
row
.
materialbillId
;
this
.
formprocessValidate
.
material_type
=
params
.
row
.
material_type
;
...
...
@@ -623,10 +663,8 @@ export default {
title
:
"提示"
,
content
:
"确定要删除当前行?"
,
onOk
:
()
=>
{
if
(
this
.
formValidate
.
id
==
0
)
{
this
.
formValidate1
.
push
(
this
.
formprocessValidate
);
if
(
params
.
row
.
id
==
0
)
{
this
.
formValidate1
.
splice
(
params
.
index
,
1
);
}
else
{
var
url
=
`
${
designUrl
}
/ordermateriallist/delete?id=`
+
params
.
row
.
id
;
...
...
@@ -635,7 +673,7 @@ export default {
.
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$Message
.
success
(
"删除成功"
);
this
.
formValidate1
.
splice
(
params
.
index
,
1
);
}
else
{
this
.
$Message
.
error
(
"删除失败"
);
}
...
...
@@ -652,7 +690,8 @@ export default {
this
.
modalliao
=
false
;
},
cancel
()
{
this
.
cleardata
();
this
.
cleardata1
();
this
.
editindex
=
-
1
;
},
cleardata
()
{
this
.
formValidate
.
id
=
0
;
...
...
@@ -661,8 +700,35 @@ export default {
this
.
formValidate
.
platesnum
=
0
;
this
.
formValidate
.
quota_per_board
=
0
;
this
.
formValidate
.
file_template
=
""
;
this
.
formValidate1
=
null
;
},
cleardata1
()
{
this
.
editindex
=
-
1
;
(
this
.
formprocessValidate
.
id
=
0
),
(
this
.
formprocessValidate
.
material_type
=
0
),
(
this
.
formprocessValidate
.
name
=
""
),
(
this
.
formprocessValidate
.
pate_number
=
""
),
(
this
.
formprocessValidate
.
spec
=
""
),
(
this
.
formprocessValidate
.
categories
=
""
),
(
this
.
formprocessValidate
.
quantity
=
1
),
(
this
.
formprocessValidate
.
singlequantity
=
0
),
(
this
.
formprocessValidate
.
quantity_unit
=
""
),
(
this
.
formprocessValidate
.
estimated_part_height
=
0
),
(
this
.
formprocessValidate
.
height_unit
=
""
),
(
this
.
formprocessValidate
.
lower_basal_plate
=
0
),
(
this
.
formprocessValidate
.
plate_unit
=
""
),
(
this
.
formprocessValidate
.
use_equip
=
""
),
(
this
.
formprocessValidate
.
remarks
=
""
),
(
this
.
formprocessValidate
.
extend
=
""
),
(
this
.
formprocessValidate
.
actual_quantity
=
0
),
(
this
.
formprocessValidate
.
routingHeaderId
=
0
),
(
this
.
formprocessValidate
.
routingDetailId
=
0
),
(
this
.
formprocessValidate
.
routingStepId
=
0
),
(
this
.
formprocessValidate
.
supportingID
=
0
),
(
this
.
formprocessValidate
.
materialNumber
=
""
),
(
this
.
formprocessValidate
.
xhgg
=
""
),
(
this
.
formprocessValidate
.
exture
=
""
),
(
this
.
formprocessValidate
.
procurementStandards
=
""
),
(
this
.
formprocessValidate
.
qualityGrade
=
""
);
}
}
};
...
...
pages/processManage/setProcess/index.vue
View file @
4518c49d
...
...
@@ -16,7 +16,6 @@
</div>
<!-- 右侧内容 -->
<div
class=
"content-right"
>
<div
class=
"title_box"
>
<div
class=
"table_title"
>
<div
style=
"width:100px; float:left"
>
...
...
@@ -30,7 +29,7 @@
<Input
search
enter-button
class=
"
mr10 fl"
class=
"mr10 fl"
style=
"width:240px"
v-model=
"searchIterms"
placeholder=
"请输入订单编号"
...
...
@@ -40,7 +39,6 @@
<Button
type=
"primary"
class=
"title_btn"
@
click=
"searchModel"
>
高级查询
</Button>
</div>
</div>
</div>
<!-- 高级搜索弹框 draggable -->
...
...
@@ -294,7 +292,7 @@
<Button
type=
"text"
size=
"large"
@
click=
"saveCancelModel"
>
取消
</Button>
<Button
type=
"primary"
size=
"large"
@
click=
"Seveld"
class=
"mr20"
>
确定
</Button>
<!-- <Button type="primary" size="large" @click="nextStep">送审</Button> footer-hide-->
<
Checkbox
v-model=
"checked"
label=
"送审"
>
送审
</Checkbox
>
<
!-- <Checkbox v-model="checked" label="送审">送审</Checkbox> --
>
</div>
<div
v-else
slot=
"footer"
v-model=
"greateArtmodel"
>
<Button
type=
"text"
size=
"large"
@
click=
"saveCancelModel"
>
取消
</Button>
...
...
@@ -316,7 +314,6 @@
</div>
</Modal>
<Modal
v-model=
"documentShow"
title=
"文档送审"
...
...
@@ -345,19 +342,19 @@
</template>
<
script
>
import
DrawerSet
from
'./components/drawerSet.vue'
//抽屉列表
import
TreeType
from
'./components/treeType.vue'
//左侧树列表
import
DrawerSet
from
"./components/drawerSet.vue"
;
//抽屉列表
import
TreeType
from
"./components/treeType.vue"
;
//左侧树列表
import
orderMaterial
from
'./components/orderMaterial.vue'
//料单
import
orderMaterial
from
"./components/orderMaterial.vue"
;
//料单
import
processMain
from
'./processMain.vue'
import
processNew
from
'../Process/processNew.vue'
import
service
from
'@/plugins/request'
import
processMain
from
"./processMain.vue"
;
import
processNew
from
"../Process/processNew.vue"
;
import
service
from
"@/plugins/request"
;
import
OrderSendReview
from
'./components/orderSendReview'
//送审页面
import
processview
from
'../Process/processview.vue'
import
sendAudit
from
'../Process/sendAudit.vue'
import
QS
from
'querystring'
import
OrderSendReview
from
"./components/orderSendReview"
;
//送审页面
import
processview
from
"../Process/processview.vue"
;
import
sendAudit
from
"../Process/sendAudit.vue"
;
import
QS
from
"querystring"
;
export
default
{
components
:
{
DrawerSet
,
...
...
@@ -368,7 +365,6 @@ export default {
OrderSendReview
,
processview
,
sendAudit
},
data
()
{
return
{
...
...
@@ -377,19 +373,19 @@ export default {
ismview
:
false
,
issendAudit
:
false
,
createtype
:
1
,
treeHeight
:
''
,
treeInputSearch
:
''
,
tableHeight
:
''
,
treeHeight
:
""
,
treeInputSearch
:
""
,
tableHeight
:
""
,
datatotal
:
0
,
pageSize
:
10
,
page
:
1
,
//当前页 整形 选填 默认1
searchIterms
:
''
,
//搜索内容
searchIterms
:
""
,
//搜索内容
showModel
:
false
,
//高级搜索弹框
treeData
:
[],
list
:
[],
data2
:
[],
tabstatus
:
'1'
,
//暂存tab状态()主工艺||专业工艺
gymodaltitle
:
'创建工艺'
,
tabstatus
:
"1"
,
//暂存tab状态()主工艺||专业工艺
gymodaltitle
:
"创建工艺"
,
selectdata
:
[],
value1
:
false
,
drawerShow
:
false
,
...
...
@@ -402,177 +398,175 @@ export default {
modalliao
:
false
,
ProductingPreparationPeople
:
0
,
checked
:
tru
e
,
//送审选择框
checked
:
fals
e
,
//送审选择框
modalInfo
:
false
,
//校验送审弹框
formExamine
:
{},
rules
:
{
approveUser
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
approveUser
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
},
formdata
:
{
data01
:
[],
data02
:
[]
},
//暂存送审料单信息
dataListRetrunNew
:
{
schemaId
:
'0c7f3e21-0cf1-4fb0-8986-95c6fbda406e'
,
//料单送审的schemaId
schemaId
:
"0c7f3e21-0cf1-4fb0-8986-95c6fbda406e"
,
//料单送审的schemaId
idList
:
[],
//料单id List
code
:
''
,
//料单编号List
code
:
""
,
//料单编号List
operatorIdList
:
[]
//操作员id
},
//确定保存后返回数据
orderSearchForm
:
{
productId
:
null
,
//产品id
productName
:
''
,
//产品名称
taskType
:
''
,
//任务类型
stage
:
''
,
//阶段
materialId
:
''
,
//材料
productName
:
""
,
//产品名称
taskType
:
""
,
//任务类型
stage
:
""
,
//阶段
materialId
:
""
,
//材料
quantity
:
0
,
//数量
guestName
:
''
,
//甲方客户
printSupply
:
''
,
//3D打印承制单位
functionaryOffice
:
''
,
//厂内责任机关
mainDepartmentId
:
''
,
//厂内责任主体部门ID
taskRequire
:
''
,
//任务接点要求
putintDocmentCode
:
''
,
//甲方投产输入文件编号
technologyDocmentCode
:
''
,
//甲方技术输入文件编号
outerDrawnNumber
:
''
,
//外部图号/模型号
modelVersion
:
''
,
//模型版本
taskCode
:
''
,
//甲方任务号
designer
:
''
,
//甲方设计人员
officeFunctionary
:
''
,
//厂内机关负责人
mainRoutingPeople
:
''
,
//厂内主工艺人员
routing_Method
:
''
,
//工艺方法
outer_Envelope_Size
:
''
,
//包装尺寸
demandStartDate
:
''
,
//开始时间
demandFinishDate
:
''
,
//完成时间
remark
:
''
,
//备注
guestName
:
""
,
//甲方客户
printSupply
:
""
,
//3D打印承制单位
functionaryOffice
:
""
,
//厂内责任机关
mainDepartmentId
:
""
,
//厂内责任主体部门ID
taskRequire
:
""
,
//任务接点要求
putintDocmentCode
:
""
,
//甲方投产输入文件编号
technologyDocmentCode
:
""
,
//甲方技术输入文件编号
outerDrawnNumber
:
""
,
//外部图号/模型号
modelVersion
:
""
,
//模型版本
taskCode
:
""
,
//甲方任务号
designer
:
""
,
//甲方设计人员
officeFunctionary
:
""
,
//厂内机关负责人
mainRoutingPeople
:
""
,
//厂内主工艺人员
routing_Method
:
""
,
//工艺方法
outer_Envelope_Size
:
""
,
//包装尺寸
demandStartDate
:
""
,
//开始时间
demandFinishDate
:
""
,
//完成时间
remark
:
""
,
//备注
MaxResultCount
:
10
,
SkipCount
:
0
,
RoutingSetStatus
:
''
RoutingSetStatus
:
""
},
formValidate
:
{
id
:
''
,
documentTemplate
:
''
,
documentName
:
''
,
documentNumber
:
''
,
id
:
""
,
documentTemplate
:
""
,
documentName
:
""
,
documentNumber
:
""
,
plateNum
:
0
,
plateQuota
:
''
,
powderName
:
''
,
powderBrand
:
''
,
powderSpecifi
:
''
,
powderSort
:
''
,
forecastPowderTotal
:
''
,
forecastPartsTHeight
:
''
,
basePlateName
:
''
,
basePlateBrand
:
''
,
basePlateSpecifi
:
''
,
basePlateApplicableEQ
:
''
,
basePlateThicknessFloor
:
''
,
plateQuota
:
""
,
powderName
:
""
,
powderBrand
:
""
,
powderSpecifi
:
""
,
powderSort
:
""
,
forecastPowderTotal
:
""
,
forecastPartsTHeight
:
""
,
basePlateName
:
""
,
basePlateBrand
:
""
,
basePlateSpecifi
:
""
,
basePlateApplicableEQ
:
""
,
basePlateThicknessFloor
:
""
,
basePlateTotal
:
0
,
scraperSpecifi
:
''
,
scraperSpecifi
:
""
,
scraperTotal
:
0
,
remark
:
''
remark
:
""
},
openModel
:
{
id
:
0
,
name
:
''
,
name
:
""
,
upLevel
:
0
,
upLevelDept
:
''
,
upLevelDept
:
""
,
organizType
:
0
,
organizName
:
''
organizName
:
""
},
newColumn
:
[],
value
:
''
,
value
:
""
,
column
:
[],
historycolumn
:
[
{
type
:
'selection'
,
width
:
70
,
align
:
'center'
,
fixed
:
'left'
},
{
type
:
"selection"
,
width
:
70
,
align
:
"center"
,
fixed
:
"left"
},
{
title
:
'序号'
,
key
:
'id'
,
title
:
"序号"
,
key
:
"id"
,
width
:
80
,
align
:
'center'
,
fixed
:
'left'
align
:
"center"
,
fixed
:
"left"
},
{
title
:
'订单编号'
,
key
:
'mesCode'
,
title
:
"订单编号"
,
key
:
"mesCode"
,
width
:
180
,
align
:
'center'
,
fixed
:
'left'
align
:
"center"
,
fixed
:
"left"
},
{
title
:
'任务类型'
,
key
:
'taskTypeName'
,
title
:
"任务类型"
,
key
:
"taskTypeName"
,
width
:
120
,
align
:
'center'
,
fixed
:
'left'
,
align
:
"center"
,
fixed
:
"left"
,
render
:
(
h
,
params
)
=>
{
return
h
(
'state'
,
{
return
h
(
"state"
,
{
props
:
{
code
:
'plan.order.taskType'
,
type
:
'text'
,
value
:
params
.
row
.
taskType
+
''
code
:
"plan.order.taskType"
,
type
:
"text"
,
value
:
params
.
row
.
taskType
+
""
}
})
})
;
}
},
{
title
:
'产品名称'
,
key
:
'productName'
,
title
:
"产品名称"
,
key
:
"productName"
,
width
:
120
,
align
:
'center'
,
fixed
:
'left'
align
:
"center"
,
fixed
:
"left"
},
{
title
:
'图号'
,
key
:
'drawnNumber'
,
width
:
120
},
{
title
:
'数量'
,
key
:
'quantity'
,
width
:
80
,
align
:
'center'
},
{
title
:
"图号"
,
key
:
"drawnNumber"
,
width
:
120
},
{
title
:
"数量"
,
key
:
"quantity"
,
width
:
80
,
align
:
"center"
},
{
title
:
'工艺规程'
,
key
:
'mainRoutingID'
,
title
:
"工艺规程"
,
key
:
"mainRoutingID"
,
width
:
120
,
render
:
(
h
,
params
)
=>
{
let
id
=
params
.
row
.
id
let
id
=
params
.
row
.
id
;
let
statusarr
=
this
.
$store
.
getters
.
dictionaryByKey
(
'process.RoutingStatus'
)
"process.RoutingStatus"
)
;
let
editColor
=
''
let
content
=
''
let
gh
let
editColor
=
""
;
let
content
=
""
;
let
gh
;
if
(
params
.
row
.
mainRoutingID
==
0
)
{
gh
=
statusarr
.
filter
(
function
(
obj
)
{
return
obj
.
code
==
-
1
})
return
obj
.
code
==
-
1
;
})
;
}
else
{
gh
=
statusarr
.
filter
(
function
(
obj
)
{
return
obj
.
code
==
params
.
row
.
mainRoutingStatus
})
return
obj
.
code
==
params
.
row
.
mainRoutingStatus
;
})
;
if
(
gh
==
null
)
{
gh
=
statusarr
.
filter
(
function
(
obj
)
{
return
obj
.
code
==
-
1
})
return
obj
.
code
==
-
1
;
})
;
}
}
if
(
gh
!=
null
&&
gh
.
length
>
0
)
{
content
=
gh
[
0
].
name
editColor
=
gh
[
0
].
color
content
=
gh
[
0
].
name
;
editColor
=
gh
[
0
].
color
;
}
return
h
(
'div'
,
[
return
h
(
"div"
,
[
h
(
'span'
,
"span"
,
{
props
:
{
type
:
'text'
,
type
:
"text"
,
ghost
:
true
},
style
:
{
color
:
editColor
,
cursor
:
'pointer'
cursor
:
"pointer"
},
on
:
{
click
:
(
e
)
=>
{
e
.
stopPropagation
()
click
:
e
=>
{
e
.
stopPropagation
();
if
(
params
.
row
.
mainRoutingID
!=
0
)
{
if
(
params
.
row
.
mainRoutingStatus
==
4
||
...
...
@@ -584,88 +578,86 @@ export default {
params
,
params
.
row
.
mainRoutingID
,
1
)
);
}
else
{
this
.
viewProcessRow
(
params
,
params
.
row
.
mainRoutingID
,
1
)
);
}
}
else
{
this
.
addProcessRow
(
params
,
1
)
this
.
addProcessRow
(
params
,
1
);
}
}
}
},
content
)
])
]);
}
},
{
title
:
'料单'
,
key
:
'materialbillID'
,
title
:
"料单"
,
key
:
"materialbillID"
,
width
:
120
,
render
:
(
h
,
params
)
=>
{
if
(
params
.
row
.
mainRoutingID
==
0
)
{
h
(
'div'
,
''
)
h
(
"div"
,
""
);
}
else
{
let
id
=
params
.
row
.
id
let
id
=
params
.
row
.
id
;
let
editColor1
=
''
let
content1
=
''
let
gh
let
editColor1
=
""
;
let
content1
=
""
;
let
gh
;
let
statusarr
=
this
.
$store
.
getters
.
dictionaryByKey
(
'process.RoutingStatus'
)
"process.RoutingStatus"
)
;
if
(
params
.
row
.
materialbillID
==
0
)
{
gh
=
statusarr
.
filter
(
function
(
obj
)
{
return
obj
.
code
==
-
1
})
return
obj
.
code
==
-
1
;
})
;
}
else
{
gh
=
statusarr
.
filter
(
function
(
obj
)
{
return
obj
.
code
==
params
.
row
.
materialbillStatus
})
return
obj
.
code
==
params
.
row
.
materialbillStatus
;
})
;
if
(
gh
==
null
)
{
gh
=
statusarr
.
filter
(
function
(
obj
)
{
return
obj
.
code
==
-
1
})
return
obj
.
code
==
-
1
;
})
;
}
}
if
(
gh
!=
null
&&
gh
.
length
>
0
)
{
content1
=
gh
[
0
].
name
editColor1
=
gh
[
0
].
color
content1
=
gh
[
0
].
name
;
editColor1
=
gh
[
0
].
color
;
}
return
h
(
'div'
,
[
return
h
(
"div"
,
[
h
(
'span'
,
"span"
,
{
props
:
{
type
:
'text'
,
type
:
"text"
,
ghost
:
true
},
style
:
{
color
:
editColor1
,
cursor
:
'pointer'
cursor
:
"pointer"
},
on
:
{
click
:
(
e
)
=>
{
e
.
stopPropagation
()
click
:
e
=>
{
e
.
stopPropagation
()
;
this
.
savematerialbill
(
params
)
this
.
savematerialbill
(
params
)
;
}
}
},
content1
)
])
])
;
}
}
}
],
data1
:
[],
...
...
@@ -673,114 +665,113 @@ export default {
orderselected
:
null
,
addpdefm
:
null
,
detailInfo
:
{}
//送审所需信息
}
}
;
},
created
()
{
this
.
treeHeight
=
window
.
innerHeight
-
140
this
.
tableHeight
=
window
.
innerHeight
-
230
this
.
newColumn
=
this
.
historycolumn
this
.
column
=
this
.
newColumn
this
.
loaddata
(
''
)
this
.
treeHeight
=
window
.
innerHeight
-
140
;
this
.
tableHeight
=
window
.
innerHeight
-
230
;
this
.
newColumn
=
this
.
historycolumn
;
this
.
column
=
this
.
newColumn
;
this
.
loaddata
(
""
);
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
mounted
()
{
this
.
initTree
()
this
.
initTree
()
;
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
this
.
treeHeight
=
window
.
screenHeight
-
140
this
.
tableHeight
=
window
.
screenHeight
-
230
})()
}
window
.
screenHeight
=
window
.
innerHeight
;
this
.
treeHeight
=
window
.
screenHeight
-
140
;
this
.
tableHeight
=
window
.
screenHeight
-
230
;
})()
;
}
;
},
computed
:
{
searchList
()
{
let
nodeList
=
this
.
treeData
var
text
=
this
.
treeInputSearch
var
newNodeList
=
[]
let
nodeList
=
this
.
treeData
;
var
text
=
this
.
treeInputSearch
;
var
newNodeList
=
[]
;
function
searchTree
(
nodeLists
,
value
)
{
for
(
let
i
=
0
;
i
<
nodeLists
.
length
;
i
++
)
{
if
(
nodeLists
[
i
].
title
.
indexOf
(
value
)
!=
-
1
)
{
newNodeList
.
push
(
nodeLists
[
i
])
newNodeList
.
push
(
nodeLists
[
i
])
;
}
else
if
(
nodeLists
[
i
].
children
.
length
>
0
)
{
searchTree
(
nodeLists
[
i
].
children
,
value
)
searchTree
(
nodeLists
[
i
].
children
,
value
)
;
}
}
}
if
(
text
!=
''
)
{
searchTree
(
nodeList
,
text
)
if
(
text
!=
""
)
{
searchTree
(
nodeList
,
text
)
;
}
else
{
return
nodeList
return
nodeList
;
}
return
newNodeList
return
newNodeList
;
}
},
methods
:
{
// tab切换
tabChange
(
name
)
{
this
.
tabstatus
=
name
this
.
page
=
1
this
.
orderSearchForm
.
SkipCount
=
0
this
.
tabstatus
=
name
;
this
.
page
=
1
;
this
.
orderSearchForm
.
SkipCount
=
0
;
this
.
newColumn
=
this
.
historycolumn
this
.
column
=
this
.
newColumn
this
.
newColumn
=
this
.
historycolumn
;
this
.
column
=
this
.
newColumn
;
this
.
loaddata
(
this
.
orderSearchForm
)
this
.
loaddata
(
this
.
orderSearchForm
)
;
},
updateColumn
(
checkShowColumn
)
{
this
.
newColumn
=
checkShowColumn
this
.
newColumn
=
checkShowColumn
;
},
//高级搜索
searchModel
()
{
this
.
showModel
=
true
this
.
showModel
=
true
;
},
close
()
{
this
.
showModel
=
false
this
.
showModel
=
false
;
},
//过滤车间
changeWorkShop
()
{
this
.
orderSearchForm
.
SkipCount
=
0
this
.
loaddata
({})
this
.
orderSearchForm
.
SkipCount
=
0
;
this
.
loaddata
({})
;
},
search
()
{
this
.
easySearch
(
this
.
orderSearchForm
)
search
()
{
this
.
easySearch
(
this
.
orderSearchForm
);
},
//搜索查询
easySearch
(
params
)
{
this
.
page
=
1
this
.
orderSearchForm
.
SkipCount
=
0
this
.
loaddata
(
params
)
this
.
page
=
1
;
this
.
orderSearchForm
.
SkipCount
=
0
;
this
.
loaddata
(
params
)
;
},
complexSearch
(
params
)
{
this
.
page
=
1
this
.
orderSearchForm
.
SkipCount
=
0
this
.
loaddata
(
params
)
this
.
page
=
1
;
this
.
orderSearchForm
.
SkipCount
=
0
;
this
.
loaddata
(
params
)
;
},
// 删除
deleted
()
{},
// 分页
pageChange
(
num
)
{
//console.log(num);
this
.
page
=
num
this
.
page
=
num
;
this
.
orderSearchForm
.
SkipCount
=
(
num
-
1
)
*
this
.
orderSearchForm
.
MaxResultCount
(
num
-
1
)
*
this
.
orderSearchForm
.
MaxResultCount
;
this
.
loaddata
(
this
.
orderSearchForm
)
this
.
loaddata
(
this
.
orderSearchForm
)
;
},
pageSizeChange
(
limit
)
{
//console.log(limit)
this
.
orderSearchForm
.
SkipCount
=
0
this
.
orderSearchForm
.
MaxResultCount
=
limit
this
.
loaddata
(
this
.
orderSearchForm
)
this
.
orderSearchForm
.
SkipCount
=
0
;
this
.
orderSearchForm
.
MaxResultCount
=
limit
;
this
.
loaddata
(
this
.
orderSearchForm
)
;
},
loaddata
(
params
)
{
var
url
=
''
var
url
=
""
;
// if(params==1||params==2){
// url =
// `${PlanUrl}/mesorder/getpagedmesordersforpdefm?ProcessUserType=` + params
...
...
@@ -802,51 +793,51 @@ export default {
modelVersion
:
params
.
modelVersion
,
//模型版本
taskCode
:
params
.
taskCode
,
//甲方任务号
status
:
params
.
status
,
//订单状态
simpleSearch
:
typeof
params
==
'string'
?
params
:
params
.
simpleSearch
,
//快速搜索
simpleSearch
:
typeof
params
==
"string"
?
params
:
params
.
simpleSearch
,
//快速搜索
SkipCount
:
this
.
orderSearchForm
.
SkipCount
,
MaxResultCount
:
this
.
orderSearchForm
.
MaxResultCount
,
ProcessUserType
:
this
.
tabstatus
,
ProductingPreparation
:
this
.
ProductingPreparationPeople
,
RoutingSetStatus
:
this
.
orderSearchForm
.
RoutingSetStatus
}
}
;
url
=
`
${
PlanUrl
}
/mesorder/getpagedmesordersforpdefm?`
+
QS
.
stringify
(
this
.
orderSearchForm
)
QS
.
stringify
(
this
.
orderSearchForm
)
;
// }
service
.
get
(
`
${
url
}
`
).
then
(
(
response
)
=>
{
service
.
get
(
`
${
url
}
`
).
then
(
response
=>
{
// console.log(response)
this
.
datatotal
=
response
.
result
.
totalCount
this
.
data1
=
response
.
result
.
items
this
.
datatotal
=
response
.
result
.
totalCount
;
this
.
data1
=
response
.
result
.
items
;
let
count
=
1
let
count
=
1
;
for
(
let
i
=
0
;
i
<
this
.
data1
.
length
;
i
++
)
{
let
order
=
this
.
data1
[
i
]
let
order
=
this
.
data1
[
i
]
;
this
.
data1
[
i
].
orderrowspan
=
1
this
.
data1
[
i
].
orderrowspan
=
1
;
if
(
i
==
this
.
data1
.
length
-
1
)
{
break
break
;
}
///统计合并订单
if
(
order
.
specialtyOrderCombID
!=
0
&&
order
.
specialtyOrderCombID
==
this
.
data1
[
i
+
1
].
specialtyOrderCombID
)
{
count
++
count
++
;
}
else
{
if
(
count
>
1
)
{
for
(
let
j
=
0
;
j
<
count
;
j
++
)
{
let
index
=
i
-
j
this
.
data1
[
index
].
orderrowspan
=
0
let
index
=
i
-
j
;
this
.
data1
[
index
].
orderrowspan
=
0
;
}
this
.
data1
[
i
-
count
+
1
].
orderrowspan
=
count
this
.
data1
[
i
-
count
+
1
].
orderrowspan
=
count
;
}
count
=
1
count
=
1
;
}
}
})
})
;
},
MergesRow
({
row
,
column
,
rowIndex
,
columnIndex
})
{
//合并行
...
...
@@ -855,344 +846,337 @@ export default {
return
{
rowspan
:
row
.
orderrowspan
,
colspan
:
1
}
}
;
}
else
if
(
row
.
orderrowspan
==
0
)
{
return
{
rowspan
:
0
,
colspan
:
0
}
}
;
}
}
},
initTree
()
{
var
sumData
=
[]
this
.
$http
.
order
.
getallselecttree
().
then
(
(
res
)
=>
{
var
sumData
=
[]
;
this
.
$http
.
order
.
getallselecttree
().
then
(
res
=>
{
if
(
res
.
result
)
{
for
(
var
i
=
0
;
i
<
res
.
result
.
length
;
i
++
)
{
sumData
=
sumData
.
concat
(
res
.
result
[
i
])
sumData
=
sumData
.
concat
(
res
.
result
[
i
])
;
}
this
.
treeData
=
sumData
this
.
data2
=
JSON
.
parse
(
JSON
.
stringify
(
sumData
))
this
.
treeData
=
sumData
;
this
.
data2
=
JSON
.
parse
(
JSON
.
stringify
(
sumData
))
;
}
else
{
this
.
$Message
.
error
(
'加载产品树失败!'
)
this
.
$Message
.
error
(
"加载产品树失败!"
);
}
})
})
;
},
selectTreeNode
(
value
)
{
if
(
value
.
length
>
0
)
{
this
.
ids
=
[]
this
.
getAllIds
(
value
)
this
.
ids
=
[]
;
this
.
getAllIds
(
value
)
;
if
(
this
.
ids
.
length
>
0
)
{
this
.
orderSearchForm
.
productId
=
this
.
ids
.
join
(
','
)
this
.
orderSearchForm
.
productId
=
this
.
ids
.
join
(
","
);
}
else
{
this
.
orderSearchForm
.
productId
=
'-1'
this
.
orderSearchForm
.
productName
=
''
this
.
orderSearchForm
.
productId
=
"-1"
;
this
.
orderSearchForm
.
productName
=
""
;
}
this
.
easySearch
(
this
.
orderSearchForm
)
this
.
easySearch
(
this
.
orderSearchForm
)
;
}
},
getAllIds
(
trees
)
{
trees
.
forEach
((
data
,
index
)
=>
{
var
that
=
this
var
that
=
this
;
if
(
data
.
isProduct
)
{
this
.
ids
.
push
(
data
.
productId
)
this
.
ids
.
push
(
data
.
productId
)
;
}
if
(
data
.
children
.
length
>
0
)
{
this
.
getAllIds
(
data
.
children
)
this
.
getAllIds
(
data
.
children
)
;
}
})
})
;
},
selectedrow
(
selection
)
{
this
.
orderselected
=
selection
this
.
orderselected
=
selection
;
},
specialtyProcess
()
{
if
(
this
.
orderselected
==
null
||
this
.
orderselected
.
length
==
0
)
{
this
.
$Message
.
error
(
'请选择订单!'
)
}
this
.
isview
=
false
let
mainids
=
new
Array
()
let
orderids
=
new
Array
()
let
productNames
=
new
Array
()
var
productids1
=
new
Array
()
var
productCodes
=
new
Array
()
let
ids
=
''
this
.
$Message
.
error
(
"请选择订单!"
);
}
this
.
isview
=
false
;
let
mainids
=
new
Array
()
;
let
orderids
=
new
Array
()
;
let
productNames
=
new
Array
()
;
var
productids1
=
new
Array
()
;
var
productCodes
=
new
Array
()
;
let
ids
=
""
;
for
(
let
i
=
0
;
i
<
this
.
orderselected
.
length
;
i
++
)
{
let
obj
=
this
.
orderselected
[
i
]
let
obj
=
this
.
orderselected
[
i
]
;
if
(
productids1
.
indexOf
(
obj
.
productId
)
<
0
)
{
productNames
.
push
(
obj
.
productName
)
productCodes
.
push
(
obj
.
drawnNumber
)
productids1
.
push
(
obj
.
productId
)
productNames
.
push
(
obj
.
productName
)
;
productCodes
.
push
(
obj
.
drawnNumber
)
;
productids1
.
push
(
obj
.
productId
)
;
}
orderids
.
push
(
obj
.
id
)
orderids
.
push
(
obj
.
id
)
;
if
(
obj
.
mainRoutingID
!=
0
)
{
mainids
.
push
(
obj
.
mainRoutingID
)
mainids
.
push
(
obj
.
mainRoutingID
)
;
ids
+=
'ids='
+
obj
.
mainRoutingID
+
'&'
ids
+=
"ids="
+
obj
.
mainRoutingID
+
"&"
;
}
}
if
(
mainids
==
null
||
mainids
.
length
==
0
)
{
this
.
$Message
.
error
(
'请先设置主工艺!'
)
return
}
this
.
gymodaltitle
=
'设置专业工艺规程'
this
.
createtype
=
1
this
.
modal1
=
true
this
.
addpdefm
=
this
.
$refs
.
processMain
this
.
addpdefm
.
clearModal
()
this
.
$refs
.
processMain
.
isview
=
false
this
.
addpdefm
.
issetProcess
=
true
this
.
addpdefm
.
dataTop
=
this
.
orderselected
this
.
$Message
.
error
(
"请先设置主工艺!"
);
return
;
}
this
.
gymodaltitle
=
"设置专业工艺规程"
;
this
.
createtype
=
1
;
this
.
modal1
=
true
;
this
.
addpdefm
=
this
.
$refs
.
processMain
;
this
.
addpdefm
.
clearModal
()
;
this
.
$refs
.
processMain
.
isview
=
false
;
this
.
addpdefm
.
issetProcess
=
true
;
this
.
addpdefm
.
dataTop
=
this
.
orderselected
;
for
(
let
i
=
0
;
i
<
this
.
addpdefm
.
dataTop
.
length
;
i
++
)
{
this
.
addpdefm
.
dataTop
[
i
].
perboardnum
=
1
this
.
addpdefm
.
dataTop
[
i
].
perboardnum
=
1
;
}
this
.
addpdefm
.
formValidate
.
productingPreparationPeople
=
this
.
orderselected
[
0
].
productingPreparationPeople
this
.
addpdefm
.
formValidate
.
productingPreparationPeople
=
this
.
orderselected
[
0
].
productingPreparationPeople
;
this
.
addpdefm
.
formValidate
.
id
=
0
this
.
addpdefm
.
issetProcess
=
true
this
.
addpdefm
.
formValidate
.
routingType
=
2
let
that
=
this
var
url
=
`
${
designUrl
}
/routingheader/GetCodeByType?code=ZY`
service
.
get
(
`
${
url
}
`
).
then
(
(
response
)
=>
{
that
.
addpdefm
.
formValidate
.
code
=
response
.
result
that
.
addpdefm
.
gycode
=
response
.
result
})
this
.
addpdefm
.
Mianids
=
ids
.
substring
(
0
,
ids
.
length
-
1
)
this
.
addpdefm
.
ProductName
=
productNames
.
toString
(
','
)
this
.
addpdefm
.
ProductCode
=
productCodes
.
toString
(
','
)
this
.
addpdefm
.
formValidate
.
productids
=
productids1
.
toString
(
','
)
this
.
addpdefm
.
formValidate
.
orderids
=
orderids
.
toString
(
','
)
this
.
addpdefm
.
formValidate
.
id
=
0
;
this
.
addpdefm
.
issetProcess
=
true
;
this
.
addpdefm
.
formValidate
.
routingType
=
2
;
let
that
=
this
;
var
url
=
`
${
designUrl
}
/routingheader/GetCodeByType?code=ZY`
;
service
.
get
(
`
${
url
}
`
).
then
(
response
=>
{
that
.
addpdefm
.
formValidate
.
code
=
response
.
result
;
that
.
addpdefm
.
gycode
=
response
.
result
;
})
;
this
.
addpdefm
.
Mianids
=
ids
.
substring
(
0
,
ids
.
length
-
1
)
;
this
.
addpdefm
.
ProductName
=
productNames
.
toString
(
","
);
this
.
addpdefm
.
ProductCode
=
productCodes
.
toString
(
","
);
this
.
addpdefm
.
formValidate
.
productids
=
productids1
.
toString
(
","
);
this
.
addpdefm
.
formValidate
.
orderids
=
orderids
.
toString
(
","
);
this
.
addpdefm
.
setshow
()
this
.
addpdefm
.
setshow
()
;
},
clearModal
()
{
this
.
addpdefm
.
id
=
0
this
.
addpdefm
.
formValidate
.
name
=
''
this
.
addpdefm
.
formValidate
.
version
=
'1'
this
.
addpdefm
.
formValidate
.
versioncode
=
1
this
.
addpdefm
.
formValidate
.
task_type_str
=
'1'
this
.
addpdefm
.
formValidate
.
print_data_name
=
''
this
.
addpdefm
.
formValidate
.
print_data_version
=
'1'
this
.
addpdefm
.
formValidate
.
print_data_versioncode
=
1
this
.
addpdefm
.
formValidate
.
production_batch
=
''
this
.
addpdefm
.
formValidate
.
remark
=
''
this
.
addpdefm
.
Mianids
=
''
this
.
addpdefm
.
MianCode
=
''
this
.
addpdefm
.
MianVer
=
''
this
.
addpdefm
.
ProductCode
=
''
this
.
addpdefm
.
formValidate
.
change_order_code
=
''
this
.
addpdefm
.
formValidate
.
change_order_date
=
''
this
.
addpdefm
.
formValidate
.
change_method
=
''
this
.
addpdefm
.
formValidate
.
change_order_id
=
0
this
.
addpdefm
.
id
=
0
;
this
.
addpdefm
.
formValidate
.
name
=
""
;
this
.
addpdefm
.
formValidate
.
version
=
"1"
;
this
.
addpdefm
.
formValidate
.
versioncode
=
1
;
this
.
addpdefm
.
formValidate
.
task_type_str
=
"1"
;
this
.
addpdefm
.
formValidate
.
print_data_name
=
""
;
this
.
addpdefm
.
formValidate
.
print_data_version
=
"1"
;
this
.
addpdefm
.
formValidate
.
print_data_versioncode
=
1
;
this
.
addpdefm
.
formValidate
.
production_batch
=
""
;
this
.
addpdefm
.
formValidate
.
remark
=
""
;
this
.
addpdefm
.
Mianids
=
""
;
this
.
addpdefm
.
MianCode
=
""
;
this
.
addpdefm
.
MianVer
=
""
;
this
.
addpdefm
.
ProductCode
=
""
;
this
.
addpdefm
.
formValidate
.
change_order_code
=
""
;
this
.
addpdefm
.
formValidate
.
change_order_date
=
""
;
this
.
addpdefm
.
formValidate
.
change_method
=
""
;
this
.
addpdefm
.
formValidate
.
change_order_id
=
0
;
},
saveCancelModel
()
{
this
.
modal1
=
false
this
.
modalliao
=
false
this
.
modal1
=
false
;
this
.
modalliao
=
false
;
// this.$refs.orderMaterial.cleardata()
this
.
dataListRetrunNew
.
idList
=
[]
this
.
dataListRetrunNew
.
idList
=
[]
;
},
modalOk
()
{
if
(
this
.
createtype
==
2
&&
this
.
headerid
==
0
)
{
this
.
$Message
.
error
(
'请选择要克隆的工艺规程'
)
return
this
.
$Message
.
error
(
"请选择要克隆的工艺规程"
);
return
;
}
else
{
this
.
addpdefm
=
this
.
$refs
.
processMain
this
.
addpdefm
=
this
.
$refs
.
processMain
;
var
pernums
=
new
Array
()
var
pernums
=
new
Array
()
;
for
(
let
i
=
0
;
i
<
this
.
addpdefm
.
dataTop
.
length
;
i
++
)
{
let
obj
=
this
.
addpdefm
.
dataTop
[
i
]
let
obj
=
this
.
addpdefm
.
dataTop
[
i
]
;
pernums
.
push
(
obj
.
perboardnum
)
pernums
.
push
(
obj
.
perboardnum
)
;
}
this
.
addpdefm
.
formValidate
.
perboardnums
=
pernums
.
toString
(
','
)
this
.
addpdefm
.
formValidate
.
perboardnums
=
pernums
.
toString
(
","
);
if
(
this
.
addpdefm
.
createtype
==
3
)
{
this
.
SetHeader
(
false
)
this
.
SetHeader
(
false
)
;
}
else
{
this
.
saveHeader
(
false
)
this
.
saveHeader
(
false
)
;
}
}
},
nextStepandSave
()
{
this
.
addpdefm
=
this
.
$refs
.
processMain
this
.
addpdefm
=
this
.
$refs
.
processMain
;
var
pernums
=
new
Array
()
var
pernums
=
new
Array
()
;
for
(
let
i
=
0
;
i
<
this
.
addpdefm
.
dataTop
.
length
;
i
++
)
{
let
obj
=
this
.
addpdefm
.
dataTop
[
i
]
let
obj
=
this
.
addpdefm
.
dataTop
[
i
]
;
pernums
.
push
(
obj
.
perboardnum
)
pernums
.
push
(
obj
.
perboardnum
)
;
}
this
.
addpdefm
.
formValidate
.
perboardnums
=
pernums
.
toString
(
','
)
this
.
addpdefm
.
formValidate
.
perboardnums
=
pernums
.
toString
(
","
);
if
(
this
.
addpdefm
.
createtype
==
3
)
{
this
.
SetHeader
(
true
)
this
.
SetHeader
(
true
)
;
}
else
{
this
.
saveHeader
(
true
)
this
.
saveHeader
(
true
)
;
}
},
nextStep
()
{
this
.
addpdefm
=
this
.
$refs
.
processMain
this
.
addpdefm
=
this
.
$refs
.
processMain
;
var
pernums
=
new
Array
()
var
pernums
=
new
Array
()
;
for
(
let
i
=
0
;
i
<
this
.
addpdefm
.
dataTop
.
length
;
i
++
)
{
let
obj
=
this
.
addpdefm
.
dataTop
[
i
]
let
obj
=
this
.
addpdefm
.
dataTop
[
i
]
;
pernums
.
push
(
obj
.
perboardnum
)
pernums
.
push
(
obj
.
perboardnum
)
;
}
this
.
addpdefm
.
formValidate
.
perboardnums
=
pernums
.
toString
(
','
)
this
.
addpdefm
.
formValidate
.
perboardnums
=
pernums
.
toString
(
","
);
this
.
modalShow
=
true
this
.
$refs
.
processNew
.
formprocessValidate
.
routing_header_id
=
this
.
headerid
this
.
$refs
.
processNew
.
isview
=
true
this
.
$refs
.
processNew
.
loaddata
()
this
.
modalShow
=
true
;
this
.
$refs
.
processNew
.
formprocessValidate
.
routing_header_id
=
this
.
headerid
;
this
.
$refs
.
processNew
.
isview
=
true
;
this
.
$refs
.
processNew
.
loaddata
()
;
},
//保存增加修改
saveHeader
(
next
)
{
var
a
=
this
.
$refs
.
processMain
var
a
=
this
.
$refs
.
processMain
;
var
filelist
=
a
.
getfile
()
let
isvalidate
=
false
a
.
$refs
[
'formValidate'
].
validate
((
valid
)
=>
{
var
filelist
=
a
.
getfile
();
let
isvalidate
=
false
;
a
.
$refs
[
"formValidate"
].
validate
(
valid
=>
{
if
(
valid
)
{
isvalidate
=
valid
isvalidate
=
valid
;
}
else
{
}
})
})
;
if
(
!
isvalidate
)
{
return
return
;
}
var
ar
=
this
.
data1
.
find
(
(
val
)
=>
{
return
val
.
code
==
a
.
formValidate
.
code
})
var
ar
=
this
.
data1
.
find
(
val
=>
{
return
val
.
code
==
a
.
formValidate
.
code
;
})
;
if
(
ar
&&
a
.
formValidate
.
id
==
0
)
{
this
.
$Message
.
error
(
'产品文件编号已存在'
)
this
.
$Message
.
error
(
"产品文件编号已存在"
);
return
return
;
}
if
(
a
.
formValidate
.
code
!=
null
)
{
let
orders
=
a
.
dataTop
var
url
=
`
${
designUrl
}
/routingheader/createorupdate`
let
orders
=
a
.
dataTop
;
var
url
=
`
${
designUrl
}
/routingheader/createorupdate`
;
service
.
post
(
`
${
url
}
`
,
{
.
post
(
`
${
url
}
`
,
{
routingHeaderEntity
:
a
.
formValidate
,
FileList
:
filelist
}
)
.
then
((
response
)
=>
{
})
.
then
(
response
=>
{
if
(
response
.
success
)
{
if
(
!
next
)
{
if
(
this
.
createtype
==
1
||
this
.
createtype
==
3
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$Message
.
success
(
"保存成功"
);
}
}
this
.
loaddata
(
this
.
orderSearchForm
)
this
.
loaddata
(
this
.
orderSearchForm
)
;
this
.
headeroldid
=
a
.
selectpdefmid
this
.
headerInfo
=
a
.
formValidate
this
.
headeroldid
=
a
.
selectpdefmid
;
this
.
headerInfo
=
a
.
formValidate
;
let
versioncode
=
this
.
headerInfo
.
versioncode
let
task_type
=
this
.
headerInfo
.
task_type
let
development_mode
=
this
.
headerInfo
.
development_mode
let
versioncode
=
this
.
headerInfo
.
versioncode
;
let
task_type
=
this
.
headerInfo
.
task_type
;
let
development_mode
=
this
.
headerInfo
.
development_mode
;
let
print_data_versioncode
=
this
.
headerInfo
.
print_data_versioncode
.
print_data_versioncode
;
a
.
formValidate
=
response
.
result
a
.
formValidate
=
response
.
result
;
a
.
formValidate
.
versioncode
=
versioncode
a
.
formValidate
.
task_type
=
task_type
a
.
formValidate
.
development_mode
=
development_mode
a
.
formValidate
.
print_data_versioncode
=
print_data_versioncode
a
.
formValidate
.
versioncode
=
versioncode
;
a
.
formValidate
.
task_type
=
task_type
;
a
.
formValidate
.
development_mode
=
development_mode
;
a
.
formValidate
.
print_data_versioncode
=
print_data_versioncode
;
this
.
headerInfo
.
id
=
response
.
result
.
id
this
.
headerInfo
.
id
=
response
.
result
.
id
;
// this.modal1 = false
this
.
headerid
=
response
.
result
.
id
this
.
headerid
=
response
.
result
.
id
;
this
.
detailInfo
=
response
.
result
this
.
detailInfo
.
productName
=
this
.
headerInfo
.
productName
this
.
detailInfo
.
routingTypeDesc
=
this
.
headerInfo
.
routingTypeDesc
this
.
detailInfo
=
response
.
result
;
this
.
detailInfo
.
productName
=
this
.
headerInfo
.
productName
;
this
.
detailInfo
.
routingTypeDesc
=
this
.
headerInfo
.
routingTypeDesc
;
let
ordercombid
=
a
.
formValidate
.
ordercombid
let
routingType
=
a
.
formValidate
.
routingType
let
ordercombid
=
a
.
formValidate
.
ordercombid
;
let
routingType
=
a
.
formValidate
.
routingType
;
// alert(JSON.stringify(this.detailInfo))
if
(
this
.
headeroldid
!=
0
)
{
var
url
=
`
${
designUrl
}
/routingdetail/copybyheader?headerID=`
+
this
.
headeroldid
+
'&headerNewID='
+
this
.
headerid
service
.
post
(
`
${
url
}
`
).
then
(
(
response
)
=>
{
"&headerNewID="
+
this
.
headerid
;
service
.
post
(
`
${
url
}
`
).
then
(
response
=>
{
if
(
response
.
success
)
{
if
(
next
)
{
this
.
headeroldid
=
0
a
.
selectpdefmid
=
0
this
.
modalShow
=
true
this
.
$refs
.
processNew
.
formprocessValidate
.
routing_header_id
=
this
.
headerid
this
.
$refs
.
processNew
.
isview
=
false
this
.
$refs
.
processNew
.
loaddata
()
this
.
headeroldid
=
0
;
a
.
selectpdefmid
=
0
;
this
.
modalShow
=
true
;
this
.
$refs
.
processNew
.
formprocessValidate
.
routing_header_id
=
this
.
headerid
;
this
.
$refs
.
processNew
.
isview
=
false
;
this
.
$refs
.
processNew
.
loaddata
()
;
}
else
{
this
.
$Message
.
success
(
'克隆成功'
)
this
.
headeroldid
=
0
a
.
selectpdefmid
=
0
this
.
$Message
.
success
(
"克隆成功"
);
this
.
headeroldid
=
0
;
a
.
selectpdefmid
=
0
;
this
.
editProcess
(
ordercombid
,
this
.
headerid
,
routingType
,
orders
)
)
;
}
}
})
})
;
}
else
{
if
(
next
)
{
this
.
modalShow
=
true
this
.
$refs
.
processNew
.
formprocessValidate
.
routing_header_id
=
this
.
headerid
this
.
$refs
.
processNew
.
isview
=
false
this
.
$refs
.
processNew
.
loaddata
()
this
.
modalShow
=
true
;
this
.
$refs
.
processNew
.
formprocessValidate
.
routing_header_id
=
this
.
headerid
;
this
.
$refs
.
processNew
.
isview
=
false
;
this
.
$refs
.
processNew
.
loaddata
()
;
}
else
{
if
(
this
.
issendAudit
)
{
this
.
saveDocument
()
this
.
saveDocument
()
;
}
}
}
}
})
.
catch
(
(
error
)
=>
{
this
.
$Message
.
error
(
'保存失败'
)
})
.
catch
(
error
=>
{
this
.
$Message
.
error
(
"保存失败"
);
})
;
}
else
{
this
.
$Message
.
error
(
'请输入工艺文件编号'
)
this
.
$Message
.
error
(
"请输入工艺文件编号"
);
}
},
SetHeader
(
next
)
{
if
(
this
.
addpdefm
.
formValidate
.
id
==
0
)
{
this
.
$Message
.
error
(
'请选择要绑定的工艺规程'
)
return
this
.
$Message
.
error
(
"请选择要绑定的工艺规程"
);
return
;
}
else
{
if
(
next
&&
this
.
addpdefm
.
formValidate
.
ordercombid
!=
0
)
{
this
.
modal1
=
false
this
.
modalShow
=
true
this
.
$refs
.
processNew
.
formprocessValidate
.
routing_header_id
=
this
.
headerid
this
.
$refs
.
processNew
.
loaddata
()
this
.
modal1
=
false
;
this
.
modalShow
=
true
;
this
.
$refs
.
processNew
.
formprocessValidate
.
routing_header_id
=
this
.
headerid
;
this
.
$refs
.
processNew
.
loaddata
()
;
}
else
{
var
a
=
this
.
addpdefm
this
.
headerid
=
this
.
addpdefm
.
formValidate
.
id
var
a
=
this
.
addpdefm
;
this
.
headerid
=
this
.
addpdefm
.
formValidate
.
id
;
var
orderRoutingobj
=
{
order_comb_id
:
0
,
orderids
:
this
.
addpdefm
.
formValidate
.
orderids
,
...
...
@@ -1202,36 +1186,33 @@ export default {
productingPreparationPeople
:
this
.
addpdefm
.
formValidate
.
productingPreparationPeople
,
platesnum
:
this
.
addpdefm
.
formValidate
.
platesnum
}
}
;
var
url
=
`
${
designUrl
}
/orderrouting/createorupdate`
var
url
=
`
${
designUrl
}
/orderrouting/createorupdate`
;
service
.
post
(
`
${
url
}
`
,
{
.
post
(
`
${
url
}
`
,
{
orderRouting
:
orderRoutingobj
}
)
.
then
((
response
)
=>
{
})
.
then
(
response
=>
{
if
(
response
.
success
)
{
if
(
!
next
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$Message
.
success
(
"保存成功"
);
}
this
.
loaddata
(
this
.
orderSearchForm
)
this
.
loaddata
(
this
.
orderSearchForm
)
;
this
.
modal1
=
false
this
.
modal1
=
false
;
if
(
next
)
{
this
.
modalShow
=
true
this
.
$refs
.
processNew
.
formprocessValidate
.
routing_header_id
=
this
.
headerid
this
.
$refs
.
processNew
.
loaddata
()
this
.
modalShow
=
true
;
this
.
$refs
.
processNew
.
formprocessValidate
.
routing_header_id
=
this
.
headerid
;
this
.
$refs
.
processNew
.
loaddata
()
;
}
}
})
.
catch
(
(
error
)
=>
{
this
.
$Message
.
error
(
'保存失败'
)
})
.
catch
(
error
=>
{
this
.
$Message
.
error
(
"保存失败"
);
})
;
}
}
},
...
...
@@ -1239,492 +1220,483 @@ export default {
renderContent
(
h
,
{
root
,
node
,
data
})
{
//渲染树的样式
return
h
(
'span'
,
"span"
,
{
style
:
{
color
:
data
.
isProduct
!=
'1'
?
'#249E91'
:
'#333'
,
//根据选中状态设置样式
cursor
:
'pointer'
color
:
data
.
isProduct
!=
"1"
?
"#249E91"
:
"#333"
,
//根据选中状态设置样式
cursor
:
"pointer"
},
on
:
{
click
:
()
=>
{
let
arrTree
=
[]
arrTree
.
push
(
data
)
this
.
handleSelect
(
arrTree
)
//手动选择树节点
let
arrTree
=
[]
;
arrTree
.
push
(
data
)
;
this
.
handleSelect
(
arrTree
)
;
//手动选择树节点
}
}
},
data
.
title
)
)
;
},
handleSelect
(
data
)
{
if
(
data
.
length
>
0
)
{
this
.
selectdata
=
[]
this
.
selectdata
=
data
this
.
list
=
[]
this
.
list
.
push
({
label
:
data
[
0
].
title
,
value
:
data
[
0
].
id
})
if
(
data
[
0
].
isProduct
==
'1'
)
{
this
.
orderSearchForm
.
productName
=
data
[
0
].
id
this
.
orderSearchForm
.
productId
=
data
[
0
].
productId
this
.
selectdata
=
[]
;
this
.
selectdata
=
data
;
this
.
list
=
[]
;
this
.
list
.
push
({
label
:
data
[
0
].
title
,
value
:
data
[
0
].
id
})
;
if
(
data
[
0
].
isProduct
==
"1"
)
{
this
.
orderSearchForm
.
productName
=
data
[
0
].
id
;
this
.
orderSearchForm
.
productId
=
data
[
0
].
productId
;
}
else
{
this
.
$Message
.
error
(
'此节点不是产品,请选择产品节点!'
)
this
.
$Message
.
error
(
"此节点不是产品,请选择产品节点!"
);
}
}
},
modalShowCancel
()
{
this
.
modalShow
=
false
this
.
modalShow
=
false
;
},
saveOK
()
{
var
url
=
`
${
PlanUrl
}
/OrderMaterial/createorupdate`
var
url
=
`
${
PlanUrl
}
/OrderMaterial/createorupdate`
;
service
.
post
(
`
${
url
}
`
,
{
orderMaterial
:
this
.
formValidate
})
.
then
(
(
response
)
=>
{
.
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
modal1
=
false
this
.
$refs
.
quotationBox1
.
formValidate
=
[]
this
.
loaddata
(
''
)
this
.
$Message
.
success
(
"保存成功"
);
this
.
modal1
=
false
;
this
.
$refs
.
quotationBox1
.
formValidate
=
[]
;
this
.
loaddata
(
""
);
}
})
.
catch
(
(
error
)
=>
{
this
.
$Message
.
error
(
'保存失败'
)
})
.
catch
(
error
=>
{
this
.
$Message
.
error
(
"保存失败"
);
})
;
},
//添加工艺规程
addProcessRow
(
params
,
routingType
)
{
this
.
modal1
=
true
this
.
modal1
=
true
;
this
.
isview
=
false
this
.
isview
=
false
;
this
.
addpdefm
=
this
.
$refs
.
processMain
this
.
addpdefm
.
clearModal
()
this
.
$refs
.
processMain
.
isview
=
this
.
isview
this
.
clearModal
()
this
.
addpdefm
.
issetProcess
=
true
this
.
addpdefm
=
this
.
$refs
.
processMain
;
this
.
addpdefm
.
clearModal
()
;
this
.
$refs
.
processMain
.
isview
=
this
.
isview
;
this
.
clearModal
()
;
this
.
addpdefm
.
issetProcess
=
true
;
let
orderlist
=
new
Array
()
let
orderids
=
new
Array
()
let
ordercombid
=
0
this
.
createtype
=
1
let
orderlist
=
new
Array
()
;
let
orderids
=
new
Array
()
;
let
ordercombid
=
0
;
this
.
createtype
=
1
;
if
(
routingType
==
1
)
{
this
.
gymodaltitle
=
'设置工艺规程'
this
.
gymodaltitle
=
"设置工艺规程"
;
for
(
let
i
=
0
;
i
<
this
.
data1
.
length
;
i
++
)
{
let
obj1
=
this
.
data1
[
i
]
let
obj1
=
this
.
data1
[
i
]
;
if
(
obj1
.
id
==
params
.
row
.
id
)
{
// obj.perboardnum = 1
orderlist
.
push
(
obj1
)
orderids
.
push
(
obj1
.
id
)
orderlist
.
push
(
obj1
)
;
orderids
.
push
(
obj1
.
id
)
;
}
}
}
else
{
this
.
gymodaltitle
=
'设置专业工艺规程'
ordercombid
=
params
.
row
.
specialtyOrderCombID
this
.
gymodaltitle
=
"设置专业工艺规程"
;
ordercombid
=
params
.
row
.
specialtyOrderCombID
;
if
(
ordercombid
!=
0
)
{
this
.
addpdefm
.
formValidate
.
ordercombid
=
ordercombid
this
.
addpdefm
.
formValidate
.
ordercombid
=
ordercombid
;
for
(
let
i
=
0
;
i
<
this
.
data1
.
length
;
i
++
)
{
let
obj
=
this
.
data1
[
i
]
let
obj
=
this
.
data1
[
i
]
;
if
(
obj
.
specialtyOrderCombID
==
ordercombid
)
{
orderlist
.
push
(
obj
)
orderlist
.
push
(
obj
)
;
orderids
.
push
(
obj
.
id
)
orderids
.
push
(
obj
.
id
)
;
}
}
}
else
{
for
(
let
i
=
0
;
i
<
this
.
data1
.
length
;
i
++
)
{
let
obj1
=
this
.
data1
[
i
]
let
obj1
=
this
.
data1
[
i
]
;
if
(
obj1
.
id
==
params
.
row
.
id
)
{
// obj.perboardnum = 1
orderlist
.
push
(
obj1
)
orderids
.
push
(
obj1
.
id
)
orderlist
.
push
(
obj1
)
;
orderids
.
push
(
obj1
.
id
)
;
}
}
}
}
this
.
addpdefm
.
dataTop
=
orderlist
this
.
addpdefm
.
dataTop
=
orderlist
;
for
(
let
i
=
0
;
i
<
this
.
addpdefm
.
dataTop
.
length
;
i
++
)
{
if
(
ordercombid
==
0
)
{
this
.
addpdefm
.
dataTop
[
i
].
perboardnum
=
1
this
.
addpdefm
.
dataTop
[
i
].
perboardnum
=
1
;
}
}
this
.
addpdefm
.
formValidate
.
id
=
0
this
.
addpdefm
.
formValidate
.
id
=
0
;
this
.
addpdefm
.
formValidate
.
routingType
=
routingType
this
.
addpdefm
.
formValidate
.
routingType
=
routingType
;
let
that
=
this
let
that
=
this
;
var
url
=
`
${
designUrl
}
/routingheader/GetCodeByType?code=`
+
(
routingType
==
1
?
'ZGY'
:
'ZY'
)
(
routingType
==
1
?
"ZGY"
:
"ZY"
);
service
.
get
(
`
${
url
}
`
).
then
(
(
response
)
=>
{
that
.
addpdefm
.
formValidate
.
code
=
response
.
result
that
.
addpdefm
.
gycode
=
response
.
result
})
service
.
get
(
`
${
url
}
`
).
then
(
response
=>
{
that
.
addpdefm
.
formValidate
.
code
=
response
.
result
;
that
.
addpdefm
.
gycode
=
response
.
result
;
})
;
let
obj
=
params
.
row
this
.
addpdefm
.
ProductName
=
obj
.
productName
this
.
addpdefm
.
ProductCode
=
obj
.
drawnNumber
this
.
addpdefm
.
formValidate
.
productids
=
obj
.
productId
let
obj
=
params
.
row
;
this
.
addpdefm
.
ProductName
=
obj
.
productName
;
this
.
addpdefm
.
ProductCode
=
obj
.
drawnNumber
;
this
.
addpdefm
.
formValidate
.
productids
=
obj
.
productId
;
this
.
addpdefm
.
formValidate
.
orderids
=
orderids
.
toString
(
','
)
this
.
addpdefm
.
formValidate
.
orderids
=
orderids
.
toString
(
","
);
if
(
routingType
==
2
)
{
var
url
=
`
${
designUrl
}
/routingheader/getbyid?id=`
+
obj
.
mainRoutingID
service
.
get
(
`
${
url
}
`
).
then
(
(
response
)
=>
{
this
.
addpdefm
.
formValidate
.
up_id
=
obj
.
mainRoutingID
this
.
addpdefm
.
Mianids
=
''
this
.
addpdefm
.
MianVer
=
response
.
result
.
version
this
.
addpdefm
.
MianCode
=
response
.
result
.
code
})
var
url
=
`
${
designUrl
}
/routingheader/getbyid?id=`
+
obj
.
mainRoutingID
;
service
.
get
(
`
${
url
}
`
).
then
(
response
=>
{
this
.
addpdefm
.
formValidate
.
up_id
=
obj
.
mainRoutingID
;
this
.
addpdefm
.
Mianids
=
""
;
this
.
addpdefm
.
MianVer
=
response
.
result
.
version
;
this
.
addpdefm
.
MianCode
=
response
.
result
.
code
;
})
;
}
this
.
addpdefm
.
formValidate
.
productingPreparationPeople
=
params
.
row
.
productingPreparationPeople
params
.
row
.
productingPreparationPeople
;
this
.
addpdefm
.
setshow
()
this
.
addpdefm
.
setshow
()
;
},
editProcessRow
(
params
,
RoutingID
,
routingType
)
{
let
ordercombid
=
0
;
let
ordercombid
=
0
ordercombid
=
params
.
row
.
orderCombID
;
ordercombid
=
params
.
row
.
orderCombID
this
.
editProcess
(
ordercombid
,
RoutingID
,
routingType
,
null
)
this
.
editProcess
(
ordercombid
,
RoutingID
,
routingType
,
null
);
},
editProcess
(
ordercombid
,
RoutingID
,
routingType
,
orders
)
{
this
.
isview
=
false
this
.
modal1
=
true
this
.
addpdefm
=
this
.
$refs
.
processMain
this
.
addpdefm
.
clearModal
()
this
.
createtype
=
1
this
.
$refs
.
processMain
.
issetProcess
=
true
this
.
$refs
.
processMain
.
isview
=
this
.
isview
let
orderids
=
new
Array
()
let
orderlist
=
new
Array
()
this
.
addpdefm
.
formValidate
.
ordercombid
=
ordercombid
this
.
isview
=
false
;
this
.
modal1
=
true
;
this
.
addpdefm
=
this
.
$refs
.
processMain
;
this
.
addpdefm
.
clearModal
();
this
.
createtype
=
1
;
this
.
$refs
.
processMain
.
issetProcess
=
true
;
this
.
$refs
.
processMain
.
isview
=
this
.
isview
;
let
orderids
=
new
Array
();
let
orderlist
=
new
Array
();
this
.
addpdefm
.
formValidate
.
ordercombid
=
ordercombid
;
if
(
orders
==
null
)
{
for
(
let
i
=
0
;
i
<
this
.
data1
.
length
;
i
++
)
{
let
obj
=
this
.
data1
[
i
]
let
obj
=
this
.
data1
[
i
]
;
if
(
routingType
==
1
)
{
if
(
obj
.
orderCombID
==
ordercombid
)
{
// obj.perboardnum = 1
orderlist
.
push
(
obj
)
orderlist
.
push
(
obj
)
;
orderids
.
push
(
obj
.
id
)
orderids
.
push
(
obj
.
id
)
;
}
}
else
if
(
routingType
==
2
)
{
if
(
obj
.
specialtyOrderCombID
==
ordercombid
)
{
// obj.perboardnum = 1
orderlist
.
push
(
obj
)
orderlist
.
push
(
obj
)
;
orderids
.
push
(
obj
.
id
)
orderids
.
push
(
obj
.
id
)
;
}
}
}
}
else
{
orderlist
=
orders
orderlist
=
orders
;
for
(
let
i
=
0
;
i
<
orders
.
length
;
i
++
)
{
let
obj
=
orders
[
i
]
orderids
.
push
(
obj
.
id
)
let
obj
=
orders
[
i
]
;
orderids
.
push
(
obj
.
id
)
;
}
}
this
.
addpdefm
.
dataTop
=
orderlist
this
.
addpdefm
.
dataTop
=
orderlist
;
if
(
routingType
==
1
)
{
this
.
gymodaltitle
=
'设置工艺规程'
this
.
gymodaltitle
=
"设置工艺规程"
;
}
else
{
this
.
gymodaltitle
=
'设置工艺规程'
this
.
gymodaltitle
=
"设置工艺规程"
;
}
var
url
=
`
${
designUrl
}
/routingheader/getbyid?id=`
+
RoutingID
service
.
get
(
`
${
url
}
`
).
then
(
(
response
)
=>
{
this
.
addpdefm
.
formValidate
=
response
.
result
var
url
=
`
${
designUrl
}
/routingheader/getbyid?id=`
+
RoutingID
;
service
.
get
(
`
${
url
}
`
).
then
(
response
=>
{
this
.
addpdefm
.
formValidate
=
response
.
result
;
this
.
addpdefm
.
ProductName
=
response
.
result
.
productName
this
.
addpdefm
.
ProductCode
=
response
.
result
.
productCode
this
.
addpdefm
.
ProductName
=
response
.
result
.
productName
;
this
.
addpdefm
.
ProductCode
=
response
.
result
.
productCode
;
this
.
addpdefm
.
MianVer
=
response
.
result
.
mianVer
this
.
addpdefm
.
MianCode
=
response
.
result
.
mianCode
this
.
addpdefm
.
MianVer
=
response
.
result
.
mianVer
;
this
.
addpdefm
.
MianCode
=
response
.
result
.
mianCode
;
this
.
addpdefm
.
formValidate
.
orderids
=
orderids
.
toString
(
','
)
this
.
addpdefm
.
formValidate
.
ordercombid
=
ordercombid
this
.
addpdefm
.
formValidate
.
platesnum
=
1
var
url
=
`
${
designUrl
}
/orderrouting/getbycombid?id=`
+
ordercombid
service
.
get
(
`
${
url
}
`
).
then
(
(
response
)
=>
{
this
.
addpdefm
.
formValidate
.
platesnum
=
response
.
result
.
platesnum
})
this
.
addpdefm
.
setshow
()
})
this
.
addpdefm
.
formValidate
.
orderids
=
orderids
.
toString
(
","
);
this
.
addpdefm
.
formValidate
.
ordercombid
=
ordercombid
;
this
.
addpdefm
.
formValidate
.
platesnum
=
1
;
var
url
=
`
${
designUrl
}
/orderrouting/getbycombid?id=`
+
ordercombid
;
service
.
get
(
`
${
url
}
`
).
then
(
response
=>
{
this
.
addpdefm
.
formValidate
.
platesnum
=
response
.
result
.
platesnum
;
})
;
this
.
addpdefm
.
setshow
()
;
})
;
},
viewProcessRow
(
params
,
RoutingID
,
routingType
)
{
this
.
isview
=
true
this
.
modal1
=
true
this
.
addpdefm
=
this
.
$refs
.
processMain
this
.
addpdefm
.
clearModal
()
this
.
$refs
.
processMain
.
issetProcess
=
true
this
.
$refs
.
processMain
.
isview
=
this
.
isview
this
.
isview
=
true
;
this
.
modal1
=
true
;
this
.
addpdefm
=
this
.
$refs
.
processMain
;
this
.
addpdefm
.
clearModal
()
;
this
.
$refs
.
processMain
.
issetProcess
=
true
;
this
.
$refs
.
processMain
.
isview
=
this
.
isview
;
let
orderids
=
new
Array
()
let
orderlist
=
new
Array
()
let
ordercombid
=
0
let
orderids
=
new
Array
()
;
let
orderlist
=
new
Array
()
;
let
ordercombid
=
0
;
ordercombid
=
params
.
row
.
orderCombID
ordercombid
=
params
.
row
.
orderCombID
;
this
.
addpdefm
.
formValidate
.
ordercombid
=
ordercombid
this
.
addpdefm
.
formValidate
.
ordercombid
=
ordercombid
;
for
(
let
i
=
0
;
i
<
this
.
data1
.
length
;
i
++
)
{
let
obj
=
this
.
data1
[
i
]
let
obj
=
this
.
data1
[
i
]
;
if
(
routingType
==
1
)
{
if
(
obj
.
orderCombID
==
ordercombid
)
{
// obj.perboardnum = 1
orderlist
.
push
(
obj
)
orderlist
.
push
(
obj
)
;
orderids
.
push
(
obj
.
id
)
orderids
.
push
(
obj
.
id
)
;
}
}
else
if
(
routingType
==
2
)
{
if
(
obj
.
specialtyOrderCombID
==
ordercombid
)
{
// obj.perboardnum = 1
orderlist
.
push
(
obj
)
orderlist
.
push
(
obj
)
;
orderids
.
push
(
obj
.
id
)
orderids
.
push
(
obj
.
id
)
;
}
}
}
this
.
addpdefm
.
dataTop
=
orderlist
this
.
addpdefm
.
dataTop
=
orderlist
;
this
.
gymodaltitle
=
"查看工艺规程"
;
var
url
=
`
${
designUrl
}
/routingheader/getbyid?id=`
+
RoutingID
;
service
.
get
(
`
${
url
}
`
).
then
(
response
=>
{
this
.
addpdefm
.
formValidate
=
response
.
result
;
this
.
headerInfo
=
response
.
result
;
this
.
headerid
=
response
.
result
.
id
;
this
.
addpdefm
.
ProductName
=
response
.
result
.
productName
;
this
.
addpdefm
.
ProductCode
=
response
.
result
.
productCode
;
this
.
gymodaltitle
=
'查看工艺规程'
this
.
addpdefm
.
MianVer
=
response
.
result
.
mianVer
;
this
.
addpdefm
.
MianCode
=
response
.
result
.
mianCode
;
var
url
=
`
${
designUrl
}
/orderrouting/getbycombid?id=`
+
ordercombid
;
service
.
get
(
`
${
url
}
`
).
then
(
response
=>
{
this
.
addpdefm
.
formValidate
.
platesnum
=
response
.
result
.
platesnum
;
});
this
.
addpdefm
.
formValidate
.
orderids
=
orderids
.
toString
(
","
);
var
url
=
`
${
designUrl
}
/routingheader/getbyid?id=`
+
RoutingID
service
.
get
(
`
${
url
}
`
).
then
((
response
)
=>
{
this
.
addpdefm
.
formValidate
=
response
.
result
this
.
headerInfo
=
response
.
result
this
.
headerid
=
response
.
result
.
id
this
.
addpdefm
.
ProductName
=
response
.
result
.
productName
this
.
addpdefm
.
ProductCode
=
response
.
result
.
productCode
this
.
addpdefm
.
MianVer
=
response
.
result
.
mianVer
this
.
addpdefm
.
MianCode
=
response
.
result
.
mianCode
var
url
=
`
${
designUrl
}
/orderrouting/getbycombid?id=`
+
ordercombid
service
.
get
(
`
${
url
}
`
).
then
((
response
)
=>
{
this
.
addpdefm
.
formValidate
.
platesnum
=
response
.
result
.
platesnum
})
this
.
addpdefm
.
formValidate
.
orderids
=
orderids
.
toString
(
','
)
this
.
addpdefm
.
setshow
()
})
this
.
addpdefm
.
setshow
();
});
},
laststep
()
{
this
.
modalShow
=
false
this
.
modal1
=
true
this
.
modalShow
=
false
;
this
.
modal1
=
true
;
this
.
addpdefm
=
this
.
$refs
.
processMain
this
.
addpdefm
=
this
.
$refs
.
processMain
;
this
.
addpdefm
.
formValidate
=
this
.
headerInfo
this
.
addpdefm
.
formValidate
=
this
.
headerInfo
;
this
.
addpdefm
.
isview
=
this
.
isview
this
.
addpdefm
.
isview
=
this
.
isview
;
this
.
addpdefm
.
ProductName
=
this
.
headerInfo
.
productName
this
.
addpdefm
.
ProductCode
=
this
.
headerInfo
.
productCode
this
.
addpdefm
.
ProductName
=
this
.
headerInfo
.
productName
;
this
.
addpdefm
.
ProductCode
=
this
.
headerInfo
.
productCode
;
this
.
addpdefm
.
MianVer
=
this
.
headerInfo
.
mianVer
this
.
addpdefm
.
MianCode
=
this
.
headerInfo
.
mianCode
this
.
addpdefm
.
Loadfile
(
this
.
addpdefm
.
formValidate
.
id
)
this
.
addpdefm
.
setshow
()
this
.
addpdefm
.
MianVer
=
this
.
headerInfo
.
mianVer
;
this
.
addpdefm
.
MianCode
=
this
.
headerInfo
.
mianCode
;
this
.
addpdefm
.
Loadfile
(
this
.
addpdefm
.
formValidate
.
id
)
;
this
.
addpdefm
.
setshow
()
;
},
saveProcessView
()
{
this
.
processviewModal
=
true
this
.
$refs
.
processview
.
loaddata
(
this
.
headerid
)
this
.
processviewModal
=
true
;
this
.
$refs
.
processview
.
loaddata
(
this
.
headerid
)
;
},
saveDocument
()
{
this
.
documentShow
=
true
this
.
$refs
.
sendAudit
.
intData
(
this
.
detailInfo
)
this
.
documentShow
=
true
;
this
.
$refs
.
sendAudit
.
intData
(
this
.
detailInfo
)
;
},
saveCancel1
()
{
this
.
show
=
false
this
.
show
=
false
;
},
saveCancel
()
{
this
.
show
=
false
this
.
show
=
false
;
},
openld
()
{
this
.
modalliao
=
true
this
.
modalliao
=
true
;
},
Seveld
()
{
this
.
$refs
.
orderMaterial
.
SaveLd
()
// 创建料单保存
this
.
formdata
.
data01
=
this
.
$refs
.
orderMaterial
.
formValidate
this
.
formdata
.
data02
=
this
.
$refs
.
orderMaterial
.
formValidate1
this
.
$refs
.
orderMaterial
.
SaveLd
()
;
// 创建料单保存
this
.
formdata
.
data01
=
this
.
$refs
.
orderMaterial
.
formValidate
;
this
.
formdata
.
data02
=
this
.
$refs
.
orderMaterial
.
formValidate1
;
// console.log(this.formdata)
if
(
this
.
checked
==
true
)
{
this
.
$refs
.
orderSendReview
.
intData
(
this
.
formdata
)
this
.
modalliao
=
false
this
.
modalInfo
=
true
this
.
$refs
.
orderSendReview
.
intData
(
this
.
formdata
)
;
this
.
modalliao
=
false
;
this
.
modalInfo
=
true
;
}
},
upSave
()
{
let
operatorIdList
=
this
.
$refs
.
orderSendReview
.
returnDataList
()
let
itemCode
=
this
.
formdata
.
data01
.
code
let
operatorIdList
=
this
.
$refs
.
orderSendReview
.
returnDataList
()
;
let
itemCode
=
this
.
formdata
.
data01
.
code
;
// this.dataListRetrunNew.codeList.push(itemCode)
this
.
dataListRetrunNew
.
code
=
itemCode
this
.
dataListRetrunNew
.
operatorIdList
=
operatorIdList
this
.
dataListRetrunNew
.
code
=
itemCode
;
this
.
dataListRetrunNew
.
operatorIdList
=
operatorIdList
;
this
.
$http
.
order
.
batchOrderStart
(
this
.
dataListRetrunNew
)
.
then
(
(
response
)
=>
{
.
then
(
response
=>
{
// console.log(response)
if
(
response
.
success
)
{
this
.
$Message
.
info
(
'材料消耗单送审成功!'
)
this
.
dataListRetrunNew
.
idList
=
[]
this
.
$Message
.
info
(
"材料消耗单送审成功!"
);
this
.
dataListRetrunNew
.
idList
=
[]
;
}
else
if
(
response
.
success
==
false
)
{
console
.
log
(
response
.
error
.
message
)
console
.
log
(
response
.
error
.
message
)
;
// this.$Message.error(response.error.message)
}
else
{
this
.
$Message
.
error
(
response
.
error
.
message
)
this
.
$Message
.
error
(
response
.
error
.
message
)
;
}
this
.
modalInfo
=
false
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
this
.
modalInfo
=
false
;
})
.
catch
(
err
=>
{
console
.
log
(
err
);
});
},
savematerialbill
(
params
)
{
this
.
modalliao
=
true
let
ld
=
this
.
$refs
.
orderMaterial
this
.
modalliao
=
true
;
let
ld
=
this
.
$refs
.
orderMaterial
;
if
(
params
.
row
.
materialbillStatus
==
1
||
params
.
row
.
materialbillStatus
==
2
||
params
.
row
.
materialbillStatus
==
3
)
{
this
.
ismview
=
true
this
.
ismview
=
true
;
}
else
{
this
.
ismview
=
false
this
.
ismview
=
false
;
}
let
orderids
=
new
Array
()
let
orderlist
=
new
Array
()
let
orderids
=
new
Array
()
;
let
orderlist
=
new
Array
()
;
if
(
params
.
row
.
specialtyOrderCombID
==
0
)
{
for
(
let
i
=
0
;
i
<
this
.
data1
.
length
;
i
++
)
{
let
obj1
=
this
.
data1
[
i
]
let
obj1
=
this
.
data1
[
i
]
;
if
(
obj1
.
id
==
params
.
row
.
id
)
{
// obj.perboardnum = 1
orderlist
.
push
(
obj1
)
orderids
.
push
(
obj1
.
id
)
orderlist
.
push
(
obj1
)
;
orderids
.
push
(
obj1
.
id
)
;
}
}
}
else
{
for
(
let
i
=
0
;
i
<
this
.
data1
.
length
;
i
++
)
{
let
obj
=
this
.
data1
[
i
]
let
obj
=
this
.
data1
[
i
]
;
if
(
obj
.
specialtyOrderCombID
==
params
.
row
.
specialtyOrderCombID
)
{
orderlist
.
push
(
obj
)
orderids
.
push
(
obj
.
id
)
orderlist
.
push
(
obj
)
;
orderids
.
push
(
obj
.
id
)
;
}
}
}
ld
.
order_comb_id
=
params
.
row
.
specialtyOrderCombID
ld
.
order_comb_id
=
params
.
row
.
specialtyOrderCombID
;
ld
.
dataTop
=
orderlist
ld
.
dataTop
=
orderlist
;
for
(
let
i
=
0
;
i
<
this
.
$refs
.
orderMaterial
.
dataTop
.
length
;
i
++
)
{
if
(
this
.
$refs
.
orderMaterial
.
dataTop
[
i
].
perboardnum
==
0
)
{
this
.
$refs
.
orderMaterial
.
dataTop
[
i
].
perboardnum
=
1
this
.
$refs
.
orderMaterial
.
dataTop
[
i
].
perboardnum
=
1
;
}
}
ld
.
productingPreparationPeople
=
params
.
row
.
productingPreparationPeople
ld
.
productingPreparationPeople
=
params
.
row
.
productingPreparationPeople
;
ld
.
orderids
=
orderids
.
toString
(
','
)
ld
.
orderids
=
orderids
.
toString
(
","
);
ld
.
formValidate
.
routingHeaderId
=
params
.
row
.
mainRoutingID
ld
.
formValidate
.
routingHeaderId
=
params
.
row
.
mainRoutingID
;
ld
.
formValidate
.
id
=
params
.
row
.
materialbillID
ld
.
loaddata
()
ld
.
formValidate
.
id
=
params
.
row
.
materialbillID
;
if
(
ld
.
formValidate
.
id
==
0
)
{
this
.
ismview
=
false
;
}
else
{
this
.
ismview
=
this
;
}
ld
.
loaddata
();
},
creatematerialbill
()
{
if
(
this
.
orderselected
==
null
||
this
.
orderselected
.
length
==
0
)
{
this
.
$Message
.
error
(
'请选择订单!'
)
return
this
.
$Message
.
error
(
"请选择订单!"
);
return
;
}
this
.
modalliao
=
true
this
.
ismview
=
false
let
mainids
=
new
Array
()
let
orderids
=
new
Array
()
this
.
modalliao
=
true
;
this
.
ismview
=
false
;
let
mainids
=
new
Array
()
;
let
orderids
=
new
Array
()
;
for
(
let
i
=
0
;
i
<
this
.
orderselected
.
length
;
i
++
)
{
let
obj
=
this
.
orderselected
[
i
]
let
obj
=
this
.
orderselected
[
i
]
;
orderids
.
push
(
obj
.
id
)
orderids
.
push
(
obj
.
id
)
;
}
// if (mainids == null || mainids.length == 0) {
// this.$Message.error('请先设置主工艺!')
// return
// }
let
ld
=
this
.
$refs
.
orderMaterial
let
ld
=
this
.
$refs
.
orderMaterial
;
ld
.
order_comb_id
=
0
ld
.
order_comb_id
=
0
;
ld
.
dataTop
=
this
.
orderselected
ld
.
dataTop
=
this
.
orderselected
;
for
(
let
i
=
0
;
i
<
this
.
$refs
.
orderMaterial
.
dataTop
.
length
;
i
++
)
{
this
.
$refs
.
orderMaterial
.
dataTop
[
i
].
perboardnum
=
1
this
.
$refs
.
orderMaterial
.
dataTop
[
i
].
perboardnum
=
1
;
}
ld
.
orderids
=
orderids
.
toString
(
','
)
ld
.
orderids
=
orderids
.
toString
(
","
);
ld
.
formValidate
.
id
=
0
ld
.
formValidate
.
id
=
0
;
ld
.
loaddata
()
ld
.
loaddata
()
;
},
// 取消送审
canCelFn
()
{
this
.
modalInfo
=
false
this
.
dataListRetrunNew
.
idList
=
[]
this
.
modalInfo
=
false
;
this
.
dataListRetrunNew
.
idList
=
[]
;
},
passDocument
()
{
this
.
dataListRetrun
=
[]
this
.
dataListRetrun
=
this
.
$refs
.
sendAudit
.
returnDataList
()
this
.
$http
.
order
.
batchstart
(
this
.
dataListRetrun
).
then
(
(
res
)
=>
{
this
.
dataListRetrun
=
[]
;
this
.
dataListRetrun
=
this
.
$refs
.
sendAudit
.
returnDataList
()
;
this
.
$http
.
order
.
batchstart
(
this
.
dataListRetrun
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
'工艺规程送审成功!'
)
this
.
loaddata
()
this
.
$Message
.
success
(
"工艺规程送审成功!"
);
this
.
loaddata
()
;
//this.easySearch('')
}
else
{
this
.
$Message
.
error
(
'工艺规程送审失败!'
)
this
.
$Message
.
error
(
"工艺规程送审失败!"
);
}
})
this
.
documentShow
=
false
})
;
this
.
documentShow
=
false
;
}
}
}
}
;
</
script
>
<
style
lang=
"less"
scoped
>
.order-quotation {
...
...
pages/produce/orderSupport.vue
0 → 100644
View file @
4518c49d
<
style
lang=
"less"
>
@import "../../../processDesign/Process/menu.less";
</
style
>
<
template
>
<div
class=
"new_box"
>
<Form
ref=
"formValidate"
:model=
"formValidate"
:rules=
"ruleValidate"
:label-width=
"160"
inline
>
<!--
<Row>
<FormItem
label=
"文件模板"
prop=
"file_template"
>
<Select
style=
"width:240px;"
v-model=
"formValidate.file_template"
placeholder=
"请选择..."
>
<Option
v-for=
"(item,index) in fileTemplateList"
:value=
"item.value"
:label=
"item.name"
:key=
"index"
></Option>
</Select>
</FormItem>
<FormItem
label=
"文档名称"
prop=
"name"
>
<Input
size=
"large"
v-model
.
trim=
"formValidate.name"
placeholder=
"请输入..."
style=
"width:240px"
/>
</FormItem>
</Row>
-->
<Row>
<Col
span=
"12"
>
<FormItem
label=
"文档编号"
prop=
"code"
>
<Input
size=
"large"
v-model
.
trim=
"formValidate.code"
placeholder=
"请输入..."
style=
"width:240px"
:disabled=
"codeisview"
/>
</FormItem>
</Col>
<Col
span=
"12"
>
<FormItem
label=
"配套完成时间"
prop=
"code"
>
<DatePicker
type=
"date"
v-model=
"supportFinishDate"
></DatePicker>
</FormItem>
</Col>
</Row>
</Form>
<Table
stripe
ref=
"table"
border
:columns=
"column1"
:data=
"formValidate1"
class=
"tableCommon"
>
<template
slot-scope=
"
{ row,index }" slot="materialType">
<state
code=
"mes_xingchi_resource.material.materialReType"
type=
"text"
:value=
"row.material_type"
></state>
</
template
>
</Table>
<Modal
v-model=
"newModel"
title=
"查看物料项"
:mask-closable=
"false"
@
on-ok=
"ok"
@
on-cancel=
"cancel"
width=
"830px"
:footer-hide=
"isview"
>
<Form
ref=
"formprocessValidate"
:model=
"formprocessValidate"
:label-width=
"120"
inline
>
<Row>
<Col
:span=
"12"
>
<FormItem
:label=
"l('materialNumber')"
prop=
"materialNumber"
>
<Input
v-model=
"formprocessValidate.materialNumber"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('nameMaterial')"
prop=
"nameMaterial"
>
<Input
v-model=
"formprocessValidate.name"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('quantity')"
prop=
"quantity"
>
<InputNumber
v-model=
"formprocessValidate.quantity"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('materialType')"
prop=
"materialType"
>
<Dictionary
code=
"mes_xingchi_resource.material.materialReType"
v-model=
"formprocessValidate.material_type"
></Dictionary>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('brand')"
prop=
"brand"
>
<Input
v-model=
"formprocessValidate.pate_number"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('specifications')"
prop=
"specifications"
>
<Input
v-model=
"formprocessValidate.spec"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('xhgg')"
prop=
"xhgg"
>
<Input
v-model=
"formprocessValidate.xhgg"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('texture')"
prop=
"texture"
>
<Input
v-model=
"formprocessValidate.texture"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('procurementStandards')"
prop=
"procurementStandards"
>
<Input
v-model=
"formprocessValidate.procurementStandards"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('qualityGrade')"
prop=
"qualityGrade"
>
<Input
v-model=
"formprocessValidate.qualityGrade"
></Input>
</FormItem>
</Col>
</Row>
</Form>
</Modal>
</div>
</template>
<
script
>
import
service
from
"@/plugins/request"
;
export
default
{
name
:
"orderSupport"
,
components
:
{},
data
()
{
return
{
order_comb_id
:
0
,
orderids
:
""
,
productingPreparationPeople
:
""
,
taskType
:
""
,
Modeltitle
:
"料单"
,
dataTop
:
[],
isview
:
false
,
codeisview
:
false
,
newModel
:
false
,
approvalStatus
:
0
,
editindex
:
-
1
,
supportFinishDate
:
""
,
formValidate
:
{
id
:
0
,
code
:
""
,
name
:
""
,
platesnum
:
0
,
quota_per_board
:
0
,
file_template
:
""
,
remarks
:
""
,
extend
:
""
,
order_comb_id
:
0
,
orderids
:
""
,
routingHeaderId
:
0
,
productingPreparationPeople
:
""
,
ordercodes
:
""
,
approvalStatus
:
0
},
formValidate1
:
[],
formprocessValidate
:
{
id
:
0
,
materialbillId
:
0
,
material_type
:
0
,
name
:
""
,
pate_number
:
""
,
spec
:
""
,
categories
:
""
,
quantity
:
1
,
singlequantity
:
0
,
quantity_unit
:
""
,
estimated_part_height
:
0
,
height_unit
:
""
,
lower_basal_plate
:
0
,
plate_unit
:
""
,
use_equip
:
""
,
remarks
:
""
,
extend
:
""
,
actual_quantity
:
0
,
routingHeaderId
:
0
,
routingDetailId
:
0
,
routingStepId
:
0
,
supportingID
:
0
,
materialNumber
:
""
,
xhgg
:
""
,
texture
:
""
,
procurementStandards
:
""
,
qualityGrade
:
""
},
column1
:
[
{
title
:
"序号"
,
type
:
"index"
,
width
:
"70"
,
align
:
"center"
},
{
key
:
"materialNumber"
,
title
:
this
.
l
(
"materialNumber"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"name"
,
title
:
this
.
l
(
"nameMaterial"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"quantity"
,
title
:
this
.
l
(
"quantity"
),
align
:
"left"
,
high
:
true
},
{
title
:
"实际数量"
,
key
:
"actual_quantity"
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
if
(
this
.
isview
)
{
return
h
(
"div"
,
this
.
dataTop
[
params
.
index
].
actual_quantity
);
}
else
{
return
h
(
"div"
,
[
h
(
"InputNumber"
,
{
props
:
{
value
:
this
.
dataTop
[
params
.
index
].
actual_quantity
,
min
:
1
},
on
:
{
"on-change"
:
event
=>
{
this
.
dataTop
[
params
.
index
].
actual_quantity
=
event
;
}
}
})
]);
}
}
},
{
key
:
"material_type"
,
title
:
this
.
l
(
"materialType"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
slot
:
"materialType"
},
{
key
:
"pate_number"
,
title
:
this
.
l
(
"brand"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"spec"
,
title
:
this
.
l
(
"specifications"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"xhgg"
,
title
:
this
.
l
(
"xhgg"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"texture"
,
title
:
this
.
l
(
"texture"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"procurementStandards"
,
title
:
this
.
l
(
"procurementStandards"
),
align
:
"left"
},
{
key
:
"qualityGrade"
,
title
:
this
.
l
(
"qualityGrade"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
title
:
"操作"
,
key
:
"id"
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
let
id
=
params
.
row
.
id
;
return
h
(
"div"
,
{
class
:
"icon_box"
},
[
h
(
"op"
,
{
class
:
"view "
,
attrs
:
{
icon
:
"ios-eye"
,
title
:
"查看"
,
type
:
"icon"
},
on
:
{
click
:
()
=>
{
this
.
editFun
(
params
);
}
}
})
]
);
}
}
]
};
},
mounted
()
{},
created
:
function
()
{},
methods
:
{
handleCreate1
(
val
)
{
this
.
EquipList
.
push
({
value
:
val
,
label
:
val
});
},
l
(
key
)
{
key
=
"RoutingSupporting"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
openNew
()
{
// this.$nextTick(()=>{
// this.$refs['formItem'].resetFields()
// }
this
.
cleardata1
();
this
.
newModel
=
true
;
},
loaddata
(
orderid
)
{
if
(
this
.
formValidate
.
id
!=
0
)
{
var
url
=
`
${
designUrl
}
/ordersupport/getbyid?id=`
+
this
.
formValidate
.
id
;
service
.
get
(
`
${
url
}
`
).
then
(
response
=>
{
this
.
formValidate
=
response
.
result
.
orderMaterial
;
this
.
isview
=
true
;
this
.
codeisview
=
true
;
this
.
formValidate1
=
response
.
result
.
orderMaterialList
;
for
(
let
i
=
0
;
i
<
this
.
formValidate1
.
length
;
i
++
)
{
let
obj
=
this
.
formValidate1
[
i
];
obj
.
actual_quantity
=
obj
.
quantity
;
}
});
}
},
SaveLd
()
{},
editFun
(
params
)
{
this
.
editindex
=
params
.
index
;
this
.
formprocessValidate
.
id
=
params
.
row
.
id
;
this
.
formprocessValidate
.
materialbillId
=
params
.
row
.
materialbillId
;
this
.
formprocessValidate
.
material_type
=
params
.
row
.
material_type
;
this
.
formprocessValidate
.
name
=
params
.
row
.
name
;
this
.
formprocessValidate
.
spec
=
params
.
row
.
spec
;
this
.
formprocessValidate
.
pate_number
=
params
.
row
.
pate_number
;
this
.
formprocessValidate
.
categories
=
params
.
row
.
categories
;
this
.
formprocessValidate
.
materialId
=
params
.
row
.
materialId
;
this
.
formprocessValidate
.
materialNumber
=
params
.
row
.
materialNumber
;
this
.
formprocessValidate
.
nameMaterial
=
params
.
row
.
nameMaterial
;
this
.
formprocessValidate
.
brand
=
params
.
row
.
brand
;
this
.
formprocessValidate
.
quantity
=
params
.
row
.
quantity
;
this
.
formprocessValidate
.
singlequantity
=
params
.
row
.
singlequantity
;
this
.
formprocessValidate
.
quantity_unit
=
params
.
row
.
quantity_unit
;
this
.
formprocessValidate
.
estimated_part_height
=
params
.
row
.
estimated_part_height
;
this
.
formprocessValidate
.
height_unit
=
params
.
row
.
height_unit
;
this
.
formprocessValidate
.
lower_basal_plate
=
params
.
row
.
lower_basal_plate
;
this
.
formprocessValidate
.
plate_unit
=
params
.
row
.
plate_unit
;
this
.
formprocessValidate
.
use_equip
=
params
.
row
.
use_equip
;
this
.
formprocessValidate
.
remarks
=
params
.
row
.
remarks
;
this
.
formprocessValidate
.
extend
=
params
.
row
.
extend
;
this
.
formprocessValidate
.
actual_quantity
=
params
.
row
.
actual_quantity
;
this
.
formprocessValidate
.
routingHeaderId
=
params
.
row
.
routingHeaderId
;
this
.
formprocessValidate
.
routingDetailId
=
params
.
row
.
routingDetailId
;
this
.
formprocessValidate
.
routingStepId
=
params
.
row
.
routingStepId
;
this
.
formprocessValidate
.
supportingID
=
params
.
row
.
supportingID
;
this
.
formprocessValidate
.
xhgg
=
params
.
row
.
xhgg
;
this
.
formprocessValidate
.
texture
=
params
.
row
.
texture
;
this
.
formprocessValidate
.
procurementStandards
=
params
.
row
.
procurementStandards
;
this
.
formprocessValidate
.
qualityGrade
=
params
.
row
.
qualityGrade
;
this
.
newModel
=
true
;
},
saveCancelModel
()
{
this
.
modalliao
=
false
;
},
cancel
()
{
this
.
cleardata1
();
this
.
editindex
=
-
1
;
},
cleardata
()
{
this
.
formValidate
.
id
=
0
;
this
.
formValidate
.
code
=
""
;
this
.
formValidate
.
name
=
""
;
this
.
formValidate
.
platesnum
=
0
;
this
.
formValidate
.
quota_per_board
=
0
;
this
.
formValidate
.
file_template
=
""
;
},
cleardata1
()
{
this
.
editindex
=
-
1
;
(
this
.
formprocessValidate
.
id
=
0
),
(
this
.
formprocessValidate
.
material_type
=
0
),
(
this
.
formprocessValidate
.
name
=
""
),
(
this
.
formprocessValidate
.
pate_number
=
""
),
(
this
.
formprocessValidate
.
spec
=
""
),
(
this
.
formprocessValidate
.
categories
=
""
),
(
this
.
formprocessValidate
.
quantity
=
1
),
(
this
.
formprocessValidate
.
singlequantity
=
0
),
(
this
.
formprocessValidate
.
quantity_unit
=
""
),
(
this
.
formprocessValidate
.
estimated_part_height
=
0
),
(
this
.
formprocessValidate
.
height_unit
=
""
),
(
this
.
formprocessValidate
.
lower_basal_plate
=
0
),
(
this
.
formprocessValidate
.
plate_unit
=
""
),
(
this
.
formprocessValidate
.
use_equip
=
""
),
(
this
.
formprocessValidate
.
remarks
=
""
),
(
this
.
formprocessValidate
.
extend
=
""
),
(
this
.
formprocessValidate
.
actual_quantity
=
0
),
(
this
.
formprocessValidate
.
routingHeaderId
=
0
),
(
this
.
formprocessValidate
.
routingDetailId
=
0
),
(
this
.
formprocessValidate
.
routingStepId
=
0
),
(
this
.
formprocessValidate
.
supportingID
=
0
),
(
this
.
formprocessValidate
.
materialNumber
=
""
),
(
this
.
formprocessValidate
.
xhgg
=
""
),
(
this
.
formprocessValidate
.
exture
=
""
),
(
this
.
formprocessValidate
.
procurementStandards
=
""
),
(
this
.
formprocessValidate
.
qualityGrade
=
""
);
}
}
};
</
script
>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment