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
1fa21e74
Commit
1fa21e74
authored
May 13, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单监控/工单分卡
parent
c7028b80
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
248 additions
and
64 deletions
+248
-64
api.js
pages/order/monitoring/api.js
+12
-0
entryPause.vue
pages/order/monitoring/entryPause.vue
+129
-0
index.vue
pages/order/monitoring/index.vue
+5
-1
speed.vue
pages/order/monitoring/speed.vue
+102
-63
No files found.
pages/order/monitoring/api.js
View file @
1fa21e74
...
@@ -20,6 +20,18 @@ export default {
...
@@ -20,6 +20,18 @@ export default {
info
(
params
)
{
//工单信息
info
(
params
)
{
//工单信息
return
Api
.
post
(
`
${
PlanUrl
}
/dispatch/orderdispatchsummary`
,
params
);
return
Api
.
post
(
`
${
PlanUrl
}
/dispatch/orderdispatchsummary`
,
params
);
},
},
mesordersplitcard
(
params
)
{
//分卡操作
return
Api
.
post
(
`
${
PlanUrl
}
/mesorders/mesordersplitcard`
,
params
);
},
createorupdate
(
params
)
{
//暂停工单
return
Api
.
post
(
`
${
PlanUrl
}
/orderexecutepausecause/createorupdate`
,
params
);
},
entrycontinue
(
params
)
{
//继续开始工单
return
Api
.
post
(
`
${
PlanUrl
}
/orderexecute/entrycontinue`
,
params
);
},
getentryproductcode
(
params
){
//更加工单id获取产品号
return
Api
.
get
(
`
${
PlanUrl
}
/orderexecutequalityrecord/getentryproductcode`
,
params
);
}
// getplantdepartments(params) {// 组织为”车间“的部门
// getplantdepartments(params) {// 组织为”车间“的部门
// return Api.get(`${systemUrl}/department/getplantdepartments`, params);
// return Api.get(`${systemUrl}/department/getplantdepartments`, params);
// },
// },
...
...
pages/order/monitoring/entryPause.vue
0 → 100644
View file @
1fa21e74
<
template
>
<div
class=
"new_box"
>
<Form
ref=
"cardModeldata"
:model=
"cardModeldata"
:rules=
"ruleValidate"
:label-width=
"120"
>
<Row>
<Col
span=
"22"
>
<FormItem
label=
"暂停原因"
>
<Dictionary
code=
"plan.dispatch.pauseCause"
v-model=
"cardModeldata.pausecause_id"
type=
"select"
style=
"width:100%"
></Dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"22"
>
<FormItem
label=
"详细描述"
prop=
"desc"
>
<Input
type=
"textarea"
:rows=
"6"
style=
"width:100%;"
size=
"large"
v-model=
"cardModeldata.desc"
placeholder=
"请输入..."
/>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"24"
>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
>
保存
</Button>
</FormItem>
</Col>
</Row>
</Form>
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
"entryPause"
,
props
:
{
info
:
Object
},
data
()
{
return
{
newModel
:
false
,
cardModeldata
:
{
id
:
0
,
dispatch_id
:
0
,
execute_id
:
0
,
order_id
:
""
,
pausecause_type
:
1
,
pausecause_id
:
0
,
title
:
""
,
desc
:
""
,
userids
:
""
,
status
:
0
,
layersnum
:
0
,
height
:
0
},
ruleValidate
:
{
// pausecause_id: [{ required: true, message: '原因不能为空', trigger: 'blur' }],
desc
:
[{
required
:
true
,
message
:
"详细描述不能为空"
,
trigger
:
"blur"
}]
}
};
},
created
()
{},
methods
:
{
handleSubmit
()
{
this
.
$refs
[
"cardModeldata"
].
validate
(
valid
=>
{
if
(
valid
)
{
var
url
=
`
${
PlanUrl
}
/orderexecutepausecause/createorupdate`
;
let
parms
=
{
orderExecutePausecause
:
{
dispatch_id
:
this
.
info
.
dispatch_id
,
execute_id
:
this
.
info
.
execute_id
,
order_id
:
this
.
info
.
order_id
,
pausecause_type
:
1
,
pausecause_id
:
this
.
cardModeldata
.
pausecause_id
,
desc
:
this
.
cardModeldata
.
desc
,
title
:
""
,
userids
:
""
,
status
:
0
,
layersnum
:
0
,
height
:
0
}
};
Api
.
createorupdate
(
parms
)
.
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
cleardata
();
this
.
$emit
(
"on-ok"
)
}
})
.
catch
(
error
=>
{
console
.
log
(
error
);
this
.
$Message
.
error
(
"保存失败"
);
});
}
});
},
cancel
()
{
this
.
cleardata
();
},
cleardata
()
{
this
.
cardModeldata
.
title
=
""
;
this
.
cardModeldata
.
desc
=
""
;
this
.
cardModeldata
.
userids
=
""
;
this
.
cardModeldata
.
layersnum
=
0
;
this
.
cardModeldata
.
height
=
0
;
}
},
watch
:
{
info
(
v
)
{
if
(
v
&&
JSON
.
stringify
(
v
)
!=
"{}"
)
{
}
}
}
};
</
script
>
pages/order/monitoring/index.vue
View file @
1fa21e74
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
<Record
:eid=
"recordId"
/>
<Record
:eid=
"recordId"
/>
</Modal>
</Modal>
<Modal
v-model=
"SpeedModal"
title=
"工单信息"
fullscreen
footer-hide
class=
"recordM"
>
<Modal
v-model=
"SpeedModal"
title=
"工单信息"
fullscreen
footer-hide
class=
"recordM"
>
<Speed
:result=
"result"
:load=
"loading"
/>
<Speed
:result=
"result"
:load=
"loading"
:executeId=
"dispatchExecuteId"
:orderId=
"orderId"
:detailId=
"detailId"
/>
</Modal>
</Modal>
</div>
</div>
</template>
</template>
...
@@ -50,6 +50,8 @@ export default {
...
@@ -50,6 +50,8 @@ export default {
data
()
{
data
()
{
return
{
return
{
result
:
[],
result
:
[],
dispatchExecuteId
:
null
,
//任务id
orderId
:
null
,
//订单id
SpeedModal
:
false
,
SpeedModal
:
false
,
rowSuspend
:
{},
rowSuspend
:
{},
recordId
:
0
,
recordId
:
0
,
...
@@ -436,6 +438,8 @@ export default {
...
@@ -436,6 +438,8 @@ export default {
this
.
result
=
[];
this
.
result
=
[];
this
.
loading
=
true
;
this
.
loading
=
true
;
this
.
SpeedModal
=
true
;
this
.
SpeedModal
=
true
;
this
.
dispatchExecuteId
=
row
.
dispatchExecuteId
this
.
orderId
=
row
.
id
Api
.
info
({
Api
.
info
({
routingHeaderId
:
row
.
routingHeaderId
,
routingHeaderId
:
row
.
routingHeaderId
,
dispatchExecuteId
:
row
.
dispatchExecuteId
dispatchExecuteId
:
row
.
dispatchExecuteId
...
...
pages/order/monitoring/speed.vue
View file @
1fa21e74
...
@@ -6,6 +6,9 @@
...
@@ -6,6 +6,9 @@
<div
v-show=
"!load"
>
<div
v-show=
"!load"
>
<DataGrid
:columns=
"columns"
:data=
"result"
border
:tool=
"false"
:height=
"820"
:page=
"false"
></DataGrid>
<DataGrid
:columns=
"columns"
:data=
"result"
border
:tool=
"false"
:height=
"820"
:page=
"false"
></DataGrid>
</div>
</div>
<Modal
v-model=
"workOrderPauseModal"
title=
"工单暂停原因"
width=
"800"
footer-hide
class=
"suspend"
>
<EntryPause
@
on-close=
"cancel"
@
on-ok=
"pauseOk"
ref=
"addBug"
:info=
"info"
/>
</Modal>
<Modal
v-model=
"modalSplit"
title=
"订单分卡"
width=
"650"
footer-hide
>
<Modal
v-model=
"modalSplit"
title=
"订单分卡"
width=
"650"
footer-hide
>
<div
slot=
"close"
>
<div
slot=
"close"
>
<Icon
type=
"ios-close"
size=
"31"
color=
"gray"
@
click=
"handleClose"
/>
<Icon
type=
"ios-close"
size=
"31"
color=
"gray"
@
click=
"handleClose"
/>
...
@@ -17,9 +20,9 @@
...
@@ -17,9 +20,9 @@
<Select
v-model=
"entity.num"
multiple
>
<Select
v-model=
"entity.num"
multiple
>
<Option
<Option
v-for=
"(item,index) in numList"
v-for=
"(item,index) in numList"
:value=
"item.
value
"
:value=
"item.
productcodes
"
:key=
"index"
:key=
"index"
>
{{
item
.
label
}}
</Option>
>
{{
item
.
productcodes
}}
</Option>
</Select>
</Select>
</FormItem>
</FormItem>
</Col>
</Col>
...
@@ -72,19 +75,28 @@
...
@@ -72,19 +75,28 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
"./api"
;
import
Api
from
"./api"
;
import
EntryPause
from
"./entryPause"
;
export
default
{
export
default
{
name
:
""
,
name
:
""
,
components
:
{
EntryPause
},
data
()
{
data
()
{
return
{
return
{
modalSplit
:
false
,
modalSplit
:
false
,
workOrderPauseModal
:
false
,
index
:
null
,
entity
:
{
entity
:
{
num
:
[],
//序列号组合
count
:
0
,
reason
:
null
,
//分卡原因
code
:
""
,
remark
:
""
,
//备注信息
routingDetailId
:
0
,
action
:
null
,
//操作
orderId
:
0
,
scheduleType
:
null
//排产类型
dispatchId
:
0
},
info
:
{},
initeId
:
{
routingDetailId
:
null
,
dispatchId
:
null
},
},
columns
:
[
columns
:
[
{
{
...
@@ -197,12 +209,12 @@ export default {
...
@@ -197,12 +209,12 @@ export default {
"op"
,
"op"
,
{
{
props
:
{
props
:
{
oprate
:
"
delete
"
,
oprate
:
"
edit
"
,
title
:
"暂停"
,
title
:
"暂停"
msg
:
"确定暂停工序:"
+
params
.
row
.
detailName
+
"?"
//
msg: "确定暂停工序:" + params.row.detailName + "?"
},
},
style
:
params
.
row
.
status
==
14
?
""
:
"display:none"
,
style
:
params
.
row
.
status
==
14
?
""
:
"display:none"
,
on
:
{
click
:
()
=>
this
.
pause
(
params
.
row
)
}
on
:
{
click
:
()
=>
this
.
pause
(
params
.
row
,
params
.
index
)
}
},
},
"暂停"
"暂停"
),
),
...
@@ -211,7 +223,7 @@ export default {
...
@@ -211,7 +223,7 @@ export default {
{
{
props
:
{
oprate
:
"edit"
,
title
:
"分卡"
},
props
:
{
oprate
:
"edit"
,
title
:
"分卡"
},
style
:
params
.
row
.
status
==
5
?
""
:
"display:none"
,
style
:
params
.
row
.
status
==
5
?
""
:
"display:none"
,
on
:
{
click
:
()
=>
this
.
split
(
params
.
row
)
}
on
:
{
click
:
()
=>
this
.
split
(
params
.
row
,
params
.
index
)
}
},
},
"分卡"
"分卡"
),
),
...
@@ -223,8 +235,8 @@ export default {
...
@@ -223,8 +235,8 @@ export default {
title
:
"继续"
,
title
:
"继续"
,
msg
:
"确定继续执行工序:"
+
params
.
row
.
detailName
+
"?"
msg
:
"确定继续执行工序:"
+
params
.
row
.
detailName
+
"?"
},
},
style
:
params
.
row
.
status
==
5
?
""
:
"display:none"
,
style
:
params
.
row
.
status
==
5
?
""
:
"display:none"
,
on
:
{
click
:
()
=>
this
.
continue
(
params
.
row
)
}
on
:
{
click
:
()
=>
this
.
continue
(
params
.
row
,
params
.
index
)
}
},
},
"继续"
"继续"
)
)
...
@@ -233,40 +245,7 @@ export default {
...
@@ -233,40 +245,7 @@ export default {
}
}
],
],
listTask
:
[],
listTask
:
[],
numList
:
[
numList
:
[],
{
value
:
1
,
label
:
"SKJC-001"
},
{
value
:
2
,
label
:
"SKJC-002"
},
{
value
:
3
,
label
:
"SKJC-003"
},
{
value
:
4
,
label
:
"SKJC-004"
},
{
value
:
5
,
label
:
"SKJC-005"
},
{
value
:
6
,
label
:
"SKJC-006"
},
{
value
:
7
,
label
:
"SKJC-007"
},
{
value
:
8
,
label
:
"SKJC-008"
}
],
reasonList
:
[
reasonList
:
[
{
{
value
:
1
,
value
:
1
,
...
@@ -319,16 +298,23 @@ export default {
...
@@ -319,16 +298,23 @@ export default {
},
},
props
:
{
props
:
{
result
:
Array
,
result
:
Array
,
load
:
Boolean
load
:
Boolean
,
executeId
:
Number
,
orderId
:
Number
},
},
async
fetch
({
store
,
params
})
{
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
},
created
()
{},
created
()
{},
methods
:
{
methods
:
{
split
(
row
)
{
split
(
row
,
index
)
{
//工单分卡
//工单分卡
this
.
modalSplit
=
true
;
this
.
getProduct
(
row
.
id
);
(
this
.
initeId
=
{
routingDetailId
:
row
.
detailId
,
dispatchId
:
row
.
id
}),
(
this
.
modalSplit
=
true
);
},
},
onchangeAction
(
val
)
{
onchangeAction
(
val
)
{
//选择移入排产时显示排产模型下拉框
//选择移入排产时显示排产模型下拉框
...
@@ -336,18 +322,44 @@ export default {
...
@@ -336,18 +322,44 @@ export default {
this
.
entity
.
scheduleType
=
null
;
this
.
entity
.
scheduleType
=
null
;
}
}
},
},
getProduct
(
id
)
{
let
params
=
{
entryID
:
id
};
Api
.
getentryproductcode
(
params
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
numList
=
[];
this
.
numList
=
res
.
result
;
}
});
},
splitOk
()
{
splitOk
()
{
//确定分卡
//确定分卡
this
.
$refs
.
form
.
validate
(
valid
=>
{
this
.
$refs
.
form
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
let
params
=
{
let
params
=
{
num
:
this
.
entity
.
num
,
count
:
this
.
entity
.
num
.
length
,
reason
:
this
.
entity
.
reason
,
code
:
JSON
.
stringify
(
this
.
entity
.
num
)
remark
:
this
.
entity
.
remark
,
.
replace
(
"["
,
""
)
action
:
this
.
entity
.
action
,
.
replace
(
"]"
,
""
)
scheduleType
:
this
.
entity
.
scheduleType
.
replace
(
/
\"
/g
,
""
),
routingDetailId
:
this
.
initeId
.
routingDetailId
,
orderId
:
this
.
orderId
,
dispatchId
:
this
.
initeId
.
dispatchId
//reason: this.entity.reason,
//remark: this.entity.remark
};
};
alert
(
JSON
.
stringify
(
params
));
Api
.
mesordersplitcard
(
params
)
.
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"分卡成功"
);
}
else
{
this
.
$Message
.
error
(
"分卡失败"
);
}
})
.
catch
(
err
=>
{
this
.
$Message
.
error
(
"连接失败"
);
});
this
.
handleClose
();
this
.
handleClose
();
}
else
{
}
else
{
this
.
modalSplit
=
true
;
this
.
modalSplit
=
true
;
...
@@ -369,13 +381,40 @@ export default {
...
@@ -369,13 +381,40 @@ export default {
scheduleType
:
null
scheduleType
:
null
};
};
},
},
pause
(
row
)
{
pause
(
row
,
index
)
{
this
.
index
=
index
;
//暂停工单
//暂停工单
alert
(
JSON
.
stringify
(
row
));
this
.
info
=
{
dispatch_id
:
row
.
id
,
execute_id
:
this
.
executeId
,
order_id
:
this
.
orderId
};
this
.
workOrderPauseModal
=
true
;
},
pauseOk
()
{
this
.
workOrderPauseModal
=
false
;
this
.
result
[
this
.
index
].
status
=
5
;
},
},
continue
(
row
)
{
continue
(
row
,
index
)
{
this
.
index
=
index
;
//继续工单
//继续工单
alert
(
JSON
.
stringify
(
row
));
let
params
=
{
id
:
row
.
id
,
orderid
:
this
.
orderId
,
time
:
null
};
Api
.
entrycontinue
(
params
)
.
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$Message
.
success
(
"操作成功"
);
this
.
result
[
this
.
index
].
status
=
14
;
}
else
{
this
.
$Message
.
error
(
"操作失败"
);
}
})
.
catch
(
error
=>
{
this
.
$Message
.
error
(
"连接失败"
);
});
},
},
//截取字符串
//截取字符串
sliceStr
(
str
,
lenS
,
lenE
)
{
sliceStr
(
str
,
lenS
,
lenE
)
{
...
...
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