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
85dcc6e3
Commit
85dcc6e3
authored
Apr 10, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mesplan
parent
ecd17fa7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
559 additions
and
41 deletions
+559
-41
edit.vue
pages/mesPlan/edit.vue
+131
-18
index.vue
pages/mesPlan/index.vue
+133
-23
split.vue
pages/mesPlan/split.vue
+295
-0
No files found.
pages/mesPlan/edit.vue
View file @
85dcc6e3
...
...
@@ -5,7 +5,7 @@
<FormItem
label=
"订单编号"
style=
"width:100%"
>
{{
this
.
orderSearchForm
.
mesCode
}}
</FormItem>
</Col>
-->
</Col>
-->
<Col
span=
"8"
>
<FormItem
:label=
"l('productName')"
style=
"width:100%"
prop=
"productId"
>
<Select
...
...
@@ -25,13 +25,13 @@
</FormItem>
</Col>
<Col
span=
"8"
>
<FormItem
:label=
"l('drawnNumber')"
style=
"width:100%"
>
<FormItem
:label=
"l('drawnNumber')"
style=
"width:100%"
>
<Input
v-model=
"orderSearchForm.drawnNumber"
style=
"width:240px"
disabled
/>
<Input
v-model=
"orderSearchForm.productName"
style=
"width:240px"
v-show=
"false"
/>
</FormItem>
</Col>
<Col
span=
"8"
>
<FormItem
:label=
"l('taskType')"
style=
"width:100%"
prop=
"taskType"
>
<FormItem
:label=
"l('taskType')"
style=
"width:100%"
prop=
"taskType"
>
<dictionary
code=
"plan.order.taskType"
v-model=
"orderSearchForm.taskType"
...
...
@@ -42,12 +42,12 @@
</Row>
<Row>
<Col
span=
"8"
>
<FormItem
:label=
"l('stage')"
style=
"width:100%"
prop=
"stage"
>
<FormItem
:label=
"l('stage')"
style=
"width:100%"
prop=
"stage"
>
<dictionary
code=
"plan.order.stage"
v-model=
"orderSearchForm.stage"
style=
"width:240px"
></dictionary>
</FormItem>
</Col>
<Col
span=
"8"
>
<FormItem
:label=
"l('materialId')"
style=
"width:100%"
prop=
"materialId"
>
<FormItem
:label=
"l('materialId')"
style=
"width:100%"
prop=
"materialId"
>
<dictionary
code=
"plan.order.material"
v-model=
"orderSearchForm.materialId"
...
...
@@ -56,14 +56,14 @@
</FormItem>
</Col>
<Col
span=
"8"
>
<FormItem
:label=
"l('quantity')"
style=
"width:100%"
prop=
"quantity"
>
<FormItem
:label=
"l('quantity')"
style=
"width:100%"
prop=
"quantity"
>
<InputNumber
:min=
"0"
v-model=
"orderSearchForm.quantity"
style=
"width:240px"
></InputNumber>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"8"
>
<FormItem
:label=
"l('routing_Method')"
style=
"width:100%"
prop=
"routing_Method"
>
<FormItem
:label=
"l('routing_Method')"
style=
"width:100%"
prop=
"routing_Method"
>
<dictionary
code=
"plan.order.routingMethod"
v-model=
"orderSearchForm.routing_Method"
...
...
@@ -72,12 +72,12 @@
</FormItem>
</Col>
<Col
span=
"8"
>
<FormItem
:label=
"l('outer_Envelope_Size')"
style=
"width:100%"
>
<FormItem
:label=
"l('outer_Envelope_Size')"
style=
"width:100%"
>
<Input
v-model=
"orderSearchForm.outer_Envelope_Size"
style=
"width:240px"
></Input>
</FormItem>
</Col>
<Col
span=
"8"
>
<FormItem
:label=
"l('demandStartDate')"
style=
"width:100%"
>
<FormItem
:label=
"l('demandStartDate')"
style=
"width:100%"
>
<DatePicker
type=
"date"
placeholder=
"请选择日期"
...
...
@@ -90,7 +90,7 @@
</Row>
<Row>
<Col
span=
"8"
>
<FormItem
:label=
"l('demandFinishDate')"
style=
"width:100%"
>
<FormItem
:label=
"l('demandFinishDate')"
style=
"width:100%"
>
<DatePicker
type=
"date"
placeholder=
"请选择日期"
...
...
@@ -101,7 +101,7 @@
</FormItem>
</Col>
<Col
span=
"8"
>
<FormItem
:label=
"l('guestName')"
style=
"width:100%"
>
<FormItem
:label=
"l('guestName')"
style=
"width:100%"
>
<dictionary
code=
"plan.order.guestName"
v-model=
"orderSearchForm.guestName"
...
...
@@ -110,7 +110,7 @@
</FormItem>
</Col>
<Col
span=
"8"
>
<FormItem
:label=
"l('projectNumber')"
style=
"width:100%"
>
<FormItem
:label=
"l('projectNumber')"
style=
"width:100%"
>
<Input
v-model=
"orderSearchForm.projectNumber"
style=
"width:240px"
/>
</FormItem>
</Col>
...
...
@@ -122,7 +122,7 @@
</FormItem>
</Col>
<Col
span=
"8"
>
<FormItem
:label=
"l('urgencyLevel')"
style=
"width:100%"
>
<FormItem
:label=
"l('urgencyLevel')"
style=
"width:100%"
>
<dictionary
style=
"width:240px"
code=
"plan.order.urgencyLevel"
...
...
@@ -138,17 +138,17 @@
</Row>
<Row>
<Col
span=
"8"
>
<FormItem
:label=
"l('taskRequire')"
style=
"width:100%"
>
<FormItem
:label=
"l('taskRequire')"
style=
"width:100%"
>
<Input
v-model=
"orderSearchForm.taskRequire"
placeholder
style=
"width:240px"
/>
</FormItem>
</Col>
<Col
span=
"8"
>
<FormItem
:label=
"l('putintDocmentCode')"
style=
"width:100%"
>
<FormItem
:label=
"l('putintDocmentCode')"
style=
"width:100%"
>
<Input
v-model=
"orderSearchForm.putintDocmentCode"
placeholder
style=
"width:240px"
/>
</FormItem>
</Col>
<Col
span=
"8"
>
<FormItem
:label=
"l('technologyDocmentCode')"
style=
"width:100%"
>
<FormItem
:label=
"l('technologyDocmentCode')"
style=
"width:100%"
>
<Input
v-model=
"orderSearchForm.technologyDocmentCode"
placeholder
style=
"width:240px"
/>
</FormItem>
</Col>
...
...
@@ -189,6 +189,9 @@ export default {
}
}
},
mounted
(){
this
.
loadTree
()
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
...
...
@@ -225,13 +228,123 @@ export default {
key
=
"mes_plan"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
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
].
title
;
this
.
orderSearchForm
.
productId
=
data
[
0
].
productId
;
this
.
orderSearchForm
.
drawnNumber
=
data
[
0
].
drawingNo
;
}
else
{
this
.
$Message
.
error
(
"此节点不是产品,请选择产品节点!"
);
}
}
},
resetFields
()
{
this
.
orderSearchForm
=
{
productId
:
null
,
//产品id
productName
:
""
,
//产品名称
drawnNumber
:
null
,
//图号
taskType
:
null
,
//任务类型
stage
:
null
,
//阶段
materialId
:
null
,
//材料
quantity
:
1
,
//数量
guestName
:
""
,
//甲方客户
printSupply
:
""
,
//3D打印承制单位
functionaryOffice
:
""
,
//厂内责任机关
mainDepartmentId
:
""
,
//厂内责任主体部门ID
taskRequire
:
""
,
//任务接点要求
putintDocmentCode
:
""
,
//甲方投产输入文件编号
technologyDocmentCode
:
""
,
//甲方技术输入文件编号
outerDrawnNumber
:
""
,
//外部图号/模型号
modelVersion
:
""
,
//模型版本
taskCode
:
""
,
//甲方任务号
designer
:
""
,
//甲方设计人员
officeFunctionary
:
""
,
//厂内机关负责人
mainRoutingPeople
:
""
,
//厂内主工艺人员
routing_Method
:
null
,
//工艺方法
outer_Envelope_Size
:
""
,
//包装尺寸
demandStartDate
:
this
.
getFormatDate
(
nowDate
),
//开始时间
demandFinishDate
:
this
.
getFormatDate
(
tomorrowDate
),
//完成时间
remark
:
""
//备注
};
},
loadTree
()
{
//打开新增订单窗口加载产品
//this.resetFields();
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
]);
}
this
.
data1
=
sumData
;
}
else
{
this
.
$Message
.
error
(
"加载产品树失败!"
);
}
});
},
renderContent
(
h
,
{
root
,
node
,
data
})
{
//渲染树的样式
return
h
(
"span"
,
{
style
:
{
color
:
data
.
isProduct
!=
"1"
?
"#249E91"
:
"#333"
,
//根据选中状态设置样式
cursor
:
"pointer"
},
on
:
{
click
:
()
=>
{
let
arrTree
=
[];
arrTree
.
push
(
data
);
this
.
handleSelect
(
arrTree
);
//手动选择树节点
}
}
},
data
.
title
);
},
//时间相关start
getStartDate
(
value
)
{
if
(
value
==
""
)
{
this
.
orderSearchForm
.
demandStartDate
=
this
.
getFormatDate
(
nowDate
);
}
else
{
this
.
orderSearchForm
.
demandStartDate
=
this
.
getFormatDate
(
value
);
}
},
getFinishedDate
(
value
)
{
if
(
value
==
""
)
{
this
.
orderSearchForm
.
demandFinishDate
=
this
.
getFormatDate
(
tomorrowDate
);
}
else
{
this
.
orderSearchForm
.
demandFinishDate
=
this
.
getFormatDate
(
value
);
}
},
getFormatDate
(
dates
)
{
const
d
=
new
Date
(
dates
);
const
resDate
=
d
.
getFullYear
()
+
"-"
+
this
.
p
(
d
.
getMonth
()
+
1
)
+
"-"
+
this
.
p
(
d
.
getDate
());
return
resDate
;
},
p
(
s
)
{
return
s
<
10
?
"0"
+
s
:
s
;
}
//时间相关end
},
watch
:
{
row
(
v
)
{
if
(
v
!=
null
)
{
this
.
orderSearchForm
=
this
.
$u
.
clone
(
this
.
row
);
this
.
placeholdeinfo
=
this
.
orderSearchForm
.
productName
}
}
}
...
...
pages/mesPlan/index.vue
View file @
85dcc6e3
...
...
@@ -27,10 +27,7 @@
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入订单编号/产品名称"
v-model=
"easySearch.keys.value"
/>
<Input
placeholder=
"请输入订单编号/产品名称"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
...
...
@@ -57,9 +54,32 @@
<Modal
v-model=
"detailModal"
title=
"详情"
width=
"1200"
>
<Detail
:row=
"rowData"
/>
</Modal>
<Modal
v-model=
"splitModal"
title=
"订单分解"
width=
"1200"
>
<Split
:row=
"rowData"
ref=
"orderSplit"
/>
<div
slot=
"footer"
>
<Button
@
click=
"splitModal = false"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"orderSplitOk"
>
确定分解
</Button>
</div>
</Modal>
<Modal
v-model=
"deletelModal"
title=
"删除"
@
on-ok=
"removeOk"
@
on-cancel=
"cancel"
>
<p>
确定删除?
</p>
</Modal>
<!-- 信息提示 -->
<Modal
v-model=
"ModalInfo"
title=
"信息提示"
width=
"600"
:mask-closable=
"false"
:scrollable=
"true"
ok-text=
"确定"
cancel-text=
"取消"
>
{{ metCodesStrTxt }}
<div
slot=
"footer"
>
<Button
@
click=
"ModalInfo = false"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"modalInfoOk"
>
确定
</Button>
</div>
</Modal>
</Content>
</Layout>
</template>
...
...
@@ -69,13 +89,15 @@ import Add from "./add";
import
Edit
from
"./edit"
;
import
Detail
from
"./detail"
;
import
Search
from
"./search"
;
import
Split
from
"./split"
;
export
default
{
name
:
"list"
,
components
:
{
Add
,
Edit
,
Detail
,
Search
Search
,
Split
},
data
()
{
return
{
...
...
@@ -90,6 +112,8 @@ export default {
editModal
:
false
,
detailModal
:
false
,
deletelModal
:
false
,
splitModal
:
false
,
ModalInfo
:
false
,
curId
:
0
,
id
:
"id"
,
columns
:
[
...
...
@@ -123,8 +147,7 @@ export default {
style
:
{
cursor
:
"pointer"
,
display
:
"inline"
,
marginLeft
:
isDivideMark
==
0
&&
isUpId
==
0
?
"20px"
:
"0px"
marginLeft
:
isDivideMark
==
0
&&
isUpId
==
0
?
"20px"
:
"0px"
}
},
params
.
row
.
mesCode
...
...
@@ -137,14 +160,14 @@ export default {
align
:
"center"
,
high
:
true
,
code
:
"plan.order.taskType"
,
width
:
100
,
width
:
100
},
{
key
:
"quantity"
,
title
:
this
.
l
(
"quantity"
),
align
:
"right"
,
high
:
true
,
width
:
80
,
width
:
80
},
{
key
:
"taskRequire"
,
...
...
@@ -160,7 +183,7 @@ export default {
align
:
"center"
,
high
:
true
,
code
:
"plan.order.status"
,
width
:
100
,
width
:
100
},
{
key
:
"productCode"
,
...
...
@@ -204,7 +227,7 @@ export default {
align
:
"center"
,
high
:
true
,
code
:
"plan.order.urgencyLevel"
,
width
:
100
,
width
:
100
},
{
key
:
"productingPreparationPeople"
,
...
...
@@ -283,7 +306,7 @@ export default {
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
on
:
{
click
:
()
=>
this
.
split
(
params
.
row
)
}
},
"分解"
)
...
...
@@ -333,7 +356,7 @@ export default {
upId
:
0
,
urgencyLevel
:
"1"
,
_disabled
:
true
,
divideMark
:
1
,
divideMark
:
1
,
children
:
[
{
actualFinishDate
:
"2020-04-09 18:36:31"
,
...
...
@@ -378,7 +401,7 @@ export default {
upId
:
540
,
urgencyLevel
:
"1"
,
_disabled
:
false
,
divideMark
:
0
,
divideMark
:
0
,
children
:
[]
},
{
...
...
@@ -424,7 +447,7 @@ export default {
upId
:
540
,
urgencyLevel
:
"1"
,
_disabled
:
true
,
divideMark
:
0
,
divideMark
:
0
,
children
:
[]
}
]
...
...
@@ -472,7 +495,7 @@ export default {
upId
:
0
,
urgencyLevel
:
"1"
,
_disabled
:
false
,
divideMark
:
0
,
divideMark
:
0
,
children
:
[]
},
{
...
...
@@ -518,7 +541,7 @@ export default {
upId
:
0
,
urgencyLevel
:
"1"
,
_disabled
:
false
,
divideMark
:
0
,
divideMark
:
0
,
children
:
[]
},
{
...
...
@@ -564,7 +587,7 @@ export default {
upId
:
0
,
urgencyLevel
:
"1"
,
_disabled
:
false
,
divideMark
:
0
,
divideMark
:
0
,
children
:
[]
},
{
...
...
@@ -610,10 +633,9 @@ export default {
upId
:
0
,
urgencyLevel
:
"1"
,
_disabled
:
false
,
divideMark
:
0
,
divideMark
:
0
,
children
:
[]
},
}
],
treeData
:
[],
treeInputSearch
:
""
,
...
...
@@ -666,7 +688,8 @@ export default {
mainDeptList
:
[],
//厂内主体部门下拉
taskTypeList
:
[],
//任务类型
statusList
:
[],
//状态类型
rowData
:{},
//编辑、查看的当前行数据
rowData
:
{},
//编辑、查看的当前行数据
ModalInfoStaut
:
''
,
};
},
created
()
{
...
...
@@ -730,7 +753,94 @@ export default {
this
.
editModal
=
true
;
this
.
rowData
=
row
;
},
split
(
row
)
{
this
.
splitModal
=
true
;
this
.
rowData
=
row
;
},
//确定分解
orderSplitOk
()
{
let
returnDatalist
=
this
.
$refs
.
orderSplit
.
returnDataList
();
let
orderQuantity
=
returnDatalist
.
quantity
;
let
orderListQuantity
=
0
;
let
quantyStatu
=
false
;
//子订单计划数是否为0或空
let
dateStatu
=
false
;
//子订单开始完成时间是否为空
// alert(JSON.stringify(returnDatalist))
if
(
returnDatalist
.
items
.
length
>
0
)
{
returnDatalist
.
items
.
forEach
(
data
=>
{
orderListQuantity
=
orderListQuantity
+
parseFloat
(
data
.
quantity
);
if
(
parseFloat
(
data
.
quantity
)
==
0
||
data
.
quantity
==
""
)
{
quantyStatu
=
true
;
}
if
(
data
.
demandDate
[
0
]
==
""
||
data
.
demandDate
[
1
]
==
""
)
{
dateStatu
=
true
;
}
});
if
(
dateStatu
)
{
this
.
$Message
.
error
(
"子订单开始完成时间不能为空,请重新输入时间!"
);
return
false
;
}
if
(
quantyStatu
)
{
this
.
$Message
.
error
(
"子订单计划数量不能为0,请重新输入计划数量!"
);
}
else
if
(
returnDatalist
.
quantity
!=
orderListQuantity
)
{
this
.
$Message
.
error
(
"计划总数量与订单数量不一致,请重新输入计划数量!"
);
}
else
{
this
.
ModalInfo
=
true
;
this
.
ModalInfoStaut
=
"split"
;
this
.
dataListRetrun
=
returnDatalist
;
this
.
metCodesStrTxt
=
"确定分解订单 "
+
returnDatalist
.
mesCode
+
"?"
;
}
}
else
{
this
.
$Message
.
error
(
"请确定计划数量!"
);
}
},
modalInfoOk
()
{
//确定批量操作
// if (this.ModalInfoStaut == 'orderSendReview') {
// this.$http.order.batchstart(this.dataListRetrun).then((res) => {
// if (res.success) {
// this.$Message.success('订单送审成功!')
// this.easySearch('')
// } else {
// this.$Message.error('订单送审失败!')
// }
// })
// this.ModalOrderSendReview = false
// } else if (this.ModalInfoStaut == 'delOrder') {
// this.$http.order.delOrder(this.dataListRetrunParam).then((res) => {
// if (res.result) {
// this.$Message.success('删除成功!')
// this.easySearch('')
// } else {
// this.$Message.error('删除失败!')
// }
// this.$refs.createOrder.resetFields()
// this.createShow = false
// })
// } else if (this.ModalInfoStaut == 'orderSend') {
// this.$http.order.orderSend(this.dataListRetrun).then((res) => {
// if (res.result) {
// this.$Message.success('订单派发成功!')
// this.easySearch('')
// this.ModalOrderSend = false
// } else {
// this.$Message.error('订单派发失败!')
// }
// })
// } else {
this
.
$http
.
order
.
orderSplit
(
this
.
dataListRetrun
).
then
((
res
)
=>
{
if
(
res
.
result
)
{
this
.
$Message
.
success
(
'订单分解成功!'
)
this
.
easySearch
(
''
)
this
.
ModalOrderSplit
=
false
}
else
{
this
.
$Message
.
error
(
'订单分解失败!'
)
}
})
//}
this
.
ModalInfo
=
false
},
remove
(
id
)
{
this
.
deletelModal
=
true
;
this
.
curId
=
id
;
...
...
pages/mesPlan/split.vue
0 → 100644
View file @
85dcc6e3
<
template
>
<div
style=
"width:100%;overflow:auto"
:style=
"
{height:divHeight}">
<Form
:model=
"orderForm"
:label-width=
"80"
class=
"margin-top-20 margin-bottom-50"
:rules=
"ruleValidate"
ref=
"formValidate"
>
<Row>
<Col
span=
"12"
>
<FormItem
label=
"订单编号"
style=
"width:100%"
>
<Input
v-model=
"orderForm.mesCode"
disabled
style=
"width:240px"
/>
</FormItem>
</Col>
<Col
span=
"12"
>
<FormItem
label=
"产品名称"
style=
"width:100%"
>
<Input
v-model=
"orderForm.productName"
disabled
style=
"width:240px"
/>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"12"
>
<FormItem
label=
"开始时间"
style=
"width:100%"
>
<Input
v-model=
"orderForm.planStartTime"
disabled
style=
"width:240px"
/>
</FormItem>
</Col>
<Col
span=
"12"
>
<FormItem
label=
"完成时间"
style=
"width:100%"
>
<Input
v-model=
"orderForm.planEndTime"
disabled
style=
"width:240px"
/>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"12"
>
<FormItem
label=
"数量"
style=
"width:100%"
>
<Input
v-model=
"orderForm.quantity"
disabled
style=
"width:240px"
/>
</FormItem>
</Col>
<Col
span=
"12"
>
<FormItem
label=
"分解数量"
style=
"width:100%"
prop=
"splitQuantity"
>
<InputNumber
:min=
"1"
v-model=
"orderForm.splitQuantity"
:step=
"1"
style=
"width:180px"
></InputNumber>
<Button
type=
"primary"
@
click=
"addSplitOrder"
>
确定
</Button>
</FormItem>
</Col>
</Row>
</Form>
<Table
:loading=
"loading"
border
:columns=
"columns1"
:data=
"dataList"
class=
"tableCommon"
>
<template
slot-scope=
"
{ row, index }" slot="slotPlanQ">
<Input
type=
"text"
v-model=
"row.quantity"
@
on-change=
"inputOrderCat(row,index)"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"slotTime"
>
<DatePicker
v-model=
"row.demandDate"
type=
"daterange"
placeholder=
"请选择日期"
style=
"width:240px"
transfer=
"true"
:options=
"optionsDate"
@
on-change=
"inputOrderCat(row,index)"
></DatePicker>
</
template
>
</Table>
</div>
</template>
<
script
>
export
default
{
name
:
"split"
,
data
()
{
return
{
optionsDate
:
{
disabledDate
:
date
=>
{
let
beginDateVal
=
new
Date
(
this
.
orderForm
.
planStartTime
);
let
endDateVal
=
new
Date
(
this
.
orderForm
.
planEndTime
);
if
(
beginDateVal
)
{
return
(
(
date
&&
date
.
valueOf
()
<
beginDateVal
.
getTime
()
-
86400000
)
||
date
.
valueOf
()
>
endDateVal
.
getTime
()
);
}
}
},
divHeight
:
"260px"
,
osrOneList
:
false
,
//一条数据显示详细
osrMoreList
:
false
,
//多条数据只显示列表
loading
:
false
,
orderInfo
:
{
id
:
""
,
//订单id
mesCode
:
""
,
//订单编号
productName
:
""
,
//产品名称
drawingNo
:
""
,
//图号
producePic
:
""
,
//产品图号
stage
:
""
,
//阶段
orderCat
:
""
,
//任务类型
quantity
:
""
,
//数量
materail
:
""
,
//材料
printDepartment
:
""
,
//3D打印承制单位
ownerGust
:
""
,
//甲方客户
mainDept
:
""
,
//厂内责任主体部门
inhouseOffice
:
""
,
//厂内责任机关
nodeRequire
:
""
,
//任务接点要求
inputDate
:
""
,
//任务输入日期
techniqueInputDoc
:
""
,
//甲方技术输入文件
productInputDoc
:
""
,
//甲方投产输入文件
modalVersion
:
""
,
//模型版本
drawNumber
:
""
,
//模型号
ownerDesigner
:
""
,
//甲方设计人员
missionCode
:
""
,
//甲方任务号
mainRoutingPeople
:
""
,
//厂内主工艺人员
inhousePrincipal
:
""
,
//厂内机关负责人
remark
:
""
//备注
},
orderForm
:
{
mesCode
:
""
,
//订单编号
productName
:
""
,
//产品名称
stage
:
""
,
//阶段
quantity
:
""
,
//数量
planStartTime
:
""
,
//计划开始时间
planEndTime
:
""
,
//计划结束时间
splitQuantity
:
2
,
//分解数量
splitList
:
[]
//分解后产生的列表
},
columns1
:
[
{
title
:
"序号"
,
type
:
"index"
,
width
:
80
,
align
:
"right"
,
tooltip
:
true
},
{
title
:
"计划编号"
,
key
:
"mesCode"
,
tooltip
:
true
},
{
title
:
"计划数量"
,
key
:
"quantity"
,
align
:
"right"
,
width
:
100
,
slot
:
"slotPlanQ"
},
{
title
:
"开始--完成时间"
,
key
:
"demandDate"
,
width
:
320
,
align
:
"center"
,
slot
:
"slotTime"
}
],
dataList
:
[],
dataListRetrun
:
{
id
:
null
,
quantity
:
null
,
mesCode
:
""
,
items
:
[]
},
//确定后返回数据
ruleValidate
:
{
splitQuantity
:
[
{
required
:
true
,
message
:
"请输入数量"
,
type
:
"number"
,
trigger
:
"change"
}
]
}
};
},
props
:
{
row
:
{
type
:
Object
,
default
:
()
=>
{
return
null
;
}
}
},
methods
:
{
intData
(
data
)
{
//打开modal层时给订单list赋值
//alert(JSON.stringify(data))
this
.
dataListRetrun
.
id
=
data
[
0
].
id
;
this
.
dataListRetrun
.
quantity
=
data
[
0
].
quantity
;
this
.
dataListRetrun
.
mesCode
=
data
[
0
].
mesCode
;
this
.
orderInfo
=
[];
this
.
dataList
=
[];
this
.
orderInfo
=
data
[
0
];
this
.
orderForm
=
{
mesCode
:
this
.
orderInfo
.
mesCode
,
//订单编号
productName
:
this
.
orderInfo
.
productName
,
//产品名称
stage
:
this
.
orderInfo
.
stage
,
//阶段
quantity
:
this
.
orderInfo
.
quantity
,
//数量
planStartTime
:
this
.
orderInfo
.
demandStartDate
,
//计划开始时间
planEndTime
:
this
.
orderInfo
.
demandFinishDate
,
//计划结束时间
splitQuantity
:
2
,
//分解数量
splitList
:
[]
//分解后产生的列表
};
},
//确定增加数量
addSplitOrder
()
{
if
(
this
.
orderForm
.
quantity
>=
this
.
orderForm
.
splitQuantity
)
{
this
.
dataListRetrun
.
items
=
[];
this
.
$refs
[
"formValidate"
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
dataList
=
[];
let
demandDate
=
[];
let
splitQuantity
=
this
.
orderForm
.
splitQuantity
;
let
mesCodeSon
=
this
.
orderForm
.
mesCode
;
let
planStartTime
=
this
.
orderForm
.
planStartTime
;
let
planEndTime
=
this
.
orderForm
.
planEndTime
;
for
(
var
i
=
0
;
i
<
splitQuantity
;
i
++
)
{
this
.
dataList
.
push
({
mesCode
:
i
+
1
<
10
?
mesCodeSon
+
"0"
+
(
i
+
1
)
:
mesCodeSon
+
""
+
(
i
+
1
),
quantity
:
""
,
demandDate
:
[
planStartTime
,
planEndTime
],
demandStartDate
:
planStartTime
,
demandFinishDate
:
planEndTime
});
}
this
.
dataListRetrun
.
items
=
this
.
dataListRetrun
.
items
.
concat
(
this
.
dataList
);
}
});
}
else
{
this
.
$Message
.
error
(
"分解数量大于订单数量"
);
}
},
inputOrderCat
(
row
,
index
)
{
let
forDemandStartDate
=
this
.
getFormatDate
(
row
.
demandDate
[
0
]);
let
forDemandFinishDate
=
this
.
getFormatDate
(
row
.
demandDate
[
1
]);
this
.
dataListRetrun
.
items
[
index
].
mesCode
=
row
.
mesCode
;
this
.
dataListRetrun
.
items
[
index
].
quantity
=
row
.
quantity
;
this
.
dataListRetrun
.
items
[
index
].
demandStartDate
=
forDemandStartDate
;
this
.
dataListRetrun
.
items
[
index
].
demandFinishDate
=
forDemandFinishDate
;
this
.
dataList
[
index
].
demandDate
=
[
forDemandStartDate
,
forDemandFinishDate
];
},
getFormatDate
(
dates
)
{
const
d
=
new
Date
(
dates
);
const
resDate
=
d
.
getFullYear
()
+
"-"
+
this
.
p
(
d
.
getMonth
()
+
1
)
+
"-"
+
this
.
p
(
d
.
getDate
());
return
resDate
;
},
p
(
s
)
{
return
s
<
10
?
"0"
+
s
:
s
;
},
returnDataList
()
{
//返回审批数据
return
this
.
dataListRetrun
;
}
},
created
()
{
var
theight
=
window
.
innerHeight
-
400
+
"px"
;
this
.
divHeight
=
theight
;
},
mounted
()
{
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
;
this
.
divHeight
=
window
.
screenHeight
-
400
+
"px"
;
})();
};
this
.
orderForm
=
{
mesCode
:
this
.
orderInfo
.
mesCode
,
//订单编号
productName
:
""
,
//产品名称
stage
:
""
,
//阶段
quantity
:
""
,
//数量
planStartTime
:
""
,
//计划开始时间
planEndTime
:
""
,
//计划结束时间
splitQuantity
:
2
,
//分解数量
splitList
:
[]
//分解后产生的列表
};
},
watch
:
{
row
(
v
)
{
if
(
v
!=
null
)
{
this
.
orderForm
=
this
.
$u
.
clone
(
this
.
row
);
this
.
orderForm
.
planStartTime
=
this
.
orderForm
.
demandStartDate
;
this
.
orderForm
.
planEndTime
=
this
.
orderForm
.
demandFinishDate
;
this
.
orderForm
.
splitQuantity
=
2
;
this
.
dataListRetrun
.
id
=
this
.
orderForm
.
id
;
this
.
dataListRetrun
.
quantity
=
this
.
orderForm
.
quantity
;
this
.
dataListRetrun
.
mesCode
=
this
.
orderForm
.
mesCode
;
}
}
}
};
</
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