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
ff1dd932
Commit
ff1dd932
authored
Nov 02, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单监控,暂停记录bug
parent
fb442d69
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
683 additions
and
614 deletions
+683
-614
index.vue
pages/order/monitoring/index.vue
+681
-607
record.vue
pages/order/monitoring/record.vue
+2
-7
No files found.
pages/order/monitoring/index.vue
View file @
ff1dd932
<
template
>
<div
class=
"monitoring h100"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:conditions=
"easySearch"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
style=
"margin-top:5px;"
>
<FormItem
prop=
"productingpreparationpeople"
style=
"width:200px"
>
<departmentSelect
v-model=
"easySearch.productingpreparationpeople.value"
:type=
"3"
></departmentSelect>
</FormItem>
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入订单编号"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</Form>
</
template
>
<
template
slot=
"searchForm"
>
<Search
/>
</
template
>
<div
class=
"monitoring h100"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:conditions=
"easySearch"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
style=
"margin-top: 5px"
>
<FormItem
prop=
"productingpreparationpeople"
style=
"width: 200px"
>
<departmentSelect
v-model=
"easySearch.productingpreparationpeople.value"
:type=
"3"
></departmentSelect>
</FormItem>
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入订单编号"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</Form>
</
template
>
<
template
slot=
"searchForm"
>
<Search
/>
</
template
>
</DataGrid>
<Modal
v-model=
"suspendModal"
title=
"暂停原因"
footer-hide
class=
"suspend"
>
<Suspend
@
on-close=
"cancel"
@
on-ok=
"suspendOk"
ref=
"addBug"
:rowSuspend=
"rowSuspend"
/>
<Suspend
@
on-close=
"cancel"
@
on-ok=
"suspendOk"
ref=
"addBug"
:rowSuspend=
"rowSuspend"
/>
</Modal>
<Modal
v-model=
"recordModal"
title=
"暂停记录"
fullscreen
footer-hide
class=
"recordM"
>
<Record
:eid=
"recordId"
/>
<Modal
v-model=
"recordModal"
title=
"暂停记录"
fullscreen
footer-hide
class=
"recordM"
>
<component
:is=
"detail"
:eid=
"recordId"
@
on-close=
"cancel"
/>
<!-- <Record :eid="recordId" /> -->
</Modal>
<Modal
v-model=
"SpeedModal"
title=
"工单信息"
fullscreen
footer-hide
class=
"recordM"
>
<Speed
:result=
"result"
:load=
"loading"
@
on-close=
"clsoeSpeedModal"
:executeId=
"dispatchExecuteId"
:orderId=
"orderId"
/>
<Modal
v-model=
"SpeedModal"
title=
"工单信息"
fullscreen
footer-hide
class=
"recordM"
>
<Speed
:result=
"result"
:load=
"loading"
@
on-close=
"clsoeSpeedModal"
:executeId=
"dispatchExecuteId"
:orderId=
"orderId"
/>
</Modal>
<Modal
v-model=
"recycleModal"
title=
"确定回收订单"
width=
"600"
class=
"suspend"
>
<Form
ref=
"form"
:model=
"recovery"
:rules=
"rulesRecycle"
:label-width=
"120"
>
<Row>
<Col
:span=
"24"
>
<FormItem
:label=
"l('mesCode')"
>
{{mesCode}}
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('demandFinishDate')"
prop=
"demandFinishDate"
>
<DatePicker
type=
"date"
placeholder=
"请选择日期"
style=
"width:240px"
v-model=
"recovery.demandFinishDate"
></DatePicker>
</FormItem>
</Col>
</Row>
</Form>
<div
slot=
"footer"
>
<Button
@
click=
"cancelRecycle"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"changeFinishiDate"
>
确定
</Button>
</div>
<Modal
v-model=
"recycleModal"
title=
"确定回收订单"
width=
"600"
class=
"suspend"
>
<Form
ref=
"form"
:model=
"recovery"
:rules=
"rulesRecycle"
:label-width=
"120"
>
<Row>
<Col
:span=
"24"
>
<FormItem
:label=
"l('mesCode')"
>
{{ mesCode }}
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
:label=
"l('demandFinishDate')"
prop=
"demandFinishDate"
>
<DatePicker
type=
"date"
placeholder=
"请选择日期"
style=
"width: 240px"
v-model=
"recovery.demandFinishDate"
></DatePicker>
</FormItem>
</Col>
</Row>
</Form>
<div
slot=
"footer"
>
<Button
@
click=
"cancelRecycle"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"changeFinishiDate"
>
确定
</Button>
</div>
</Modal>
</div>
</div>
</template>
<
script
>
import
Api
from
"./api"
;
import
Suspend
from
"./suspend"
;
import
Record
from
"./record"
;
//
import Record from "./record";
import
Search
from
"./search"
;
import
Speed
from
"./speed"
;
export
default
{
name
:
"index"
,
components
:
{
Record
,
Search
,
Suspend
,
Speed
,
},
data
()
{
return
{
result
:
[],
dispatchExecuteId
:
null
,
//任务id
orderId
:
null
,
//订单id
SpeedModal
:
false
,
rowSuspend
:
{},
recordId
:
0
,
laster
:
0
,
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
"mesCode"
,
value
:
null
},
productingpreparationpeople
:
{
op
:
"Equal"
,
value
:
null
},
},
suspendModal
:
false
,
recordModal
:
false
,
deletelModal
:
false
,
recycleModal
:
false
,
curId
:
0
,
columns
:
[{
key
:
"id"
,
title
:
this
.
l
(
"id"
),
hide
:
true
,
align
:
"left"
},
{
title
:
"序号"
,
type
:
"index"
,
width
:
70
,
align
:
"center"
,
},
{
key
:
"status"
,
title
:
this
.
l
(
"status"
),
code
:
"plan.order.status"
,
align
:
"center"
,
easy
:
true
,
high
:
true
,
width
:
100
,
},
{
key
:
"mesCode"
,
title
:
this
.
l
(
"mesCode"
),
align
:
"left"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
[
params
.
row
.
mesCode
,
[
h
(
"Poptip"
,
{
props
:
{
content
:
"开工预警:"
+
params
.
row
.
startWarning
+
"条"
,
trigger
:
"hover"
,
},
style
:
{
cursor
:
"pointer"
,
},
},
[
h
(
params
.
row
.
startWarning
>
0
?
"Badge"
:
""
,
{
props
:
{
type
:
"warning"
,
// count: 2,
count
:
params
.
row
.
startWarning
,
},
style
:
{
marginTop
:
"12px"
,
marginLeft
:
"5px"
,
},
},
[
h
(
"Icon"
,
{
props
:
{
type
:
"md-alert"
,
},
style
:
{
fontSize
:
"16px"
,
color
:
"#f1cb08"
,
},
}),
]
),
]
),
h
(
"Poptip"
,
{
props
:
{
content
:
"完工预警:"
+
params
.
row
.
finishWarning
+
"条"
,
trigger
:
"hover"
,
},
},
[
h
(
params
.
row
.
finishWarning
>
0
?
"Badge"
:
""
,
{
props
:
{
type
:
"info"
,
// count: 2,
count
:
params
.
row
.
finishWarning
,
},
style
:
{
marginTop
:
"12px"
,
marginLeft
:
"5px"
,
},
},
[
h
(
"Icon"
,
{
props
:
{
type
:
"md-alert"
,
},
style
:
{
fontSize
:
"16px"
,
color
:
"#31F8E6"
,
marginLeft
:
"5px"
,
},
}),
]
),
]
),
],
]);
},
},
{
key
:
"productName"
,
title
:
this
.
l
(
"productName"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"demandStartDate"
,
title
:
this
.
l
(
"demandStartDate"
),
align
:
"center"
,
high
:
true
,
width
:
130
,
render
:
(
h
,
params
)
=>
{
return
h
(
"span"
,
this
.
sliceStr
(
params
.
row
.
demandStartDate
+
" "
,
0
,
10
),
params
.
row
.
demandStartDate
);
},
},
{
key
:
"demandFinishDate"
,
title
:
this
.
l
(
"demandFinishDate"
),
align
:
"center"
,
high
:
true
,
width
:
130
,
render
:
(
h
,
params
)
=>
{
return
h
(
"span"
,
this
.
sliceStr
(
params
.
row
.
demandFinishDate
+
" "
,
0
,
10
),
params
.
row
.
demandFinishDate
);
},
},
{
key
:
"actualStartDate"
,
title
:
this
.
l
(
"actualStartDate"
),
align
:
"center"
,
high
:
true
,
width
:
150
,
render
:
(
h
,
params
)
=>
{
return
h
(
"span"
,
// this.sliceStr(params.row.actualStartDate + ' ', 0, 10),
params
.
row
.
actualStartDate
==
"0001-01-01 00:00:00"
?
""
:
params
.
row
.
actualStartDate
);
},
},
{
key
:
"actualFinishDate"
,
title
:
this
.
l
(
"actualFinishDate"
),
align
:
"center"
,
high
:
true
,
width
:
150
,
render
:
(
h
,
params
)
=>
{
return
h
(
"span"
,
// this.sliceStr(params.row.actualFinishDate + ' ', 0, 10),
params
.
row
.
actualFinishDate
==
"0001-01-01 00:00:00"
?
""
:
params
.
row
.
actualFinishDate
);
},
},
{
key
:
"routingType"
,
title
:
this
.
l
(
"routingType"
),
align
:
"center"
,
code
:
"mes_xingchi_plan.order_material.routingType"
,
easy
:
true
,
high
:
true
,
width
:
100
,
},
{
title
:
this
.
l
(
"jindu"
),
key
:
"action"
,
width
:
200
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
[
h
(
"ButtonGroup"
,
{
props
:
{
shape
:
"circle"
,
},
},
[
h
(
"Button"
,
{
style
:
{
background
:
"#e4e6ed "
,
borderColor
:
"#e4e6ed "
,
},
on
:
{
click
:
()
=>
{
this
.
speed
(
params
.
row
);
},
},
},
params
.
row
.
unstartCount
//未开工数
),
h
(
"Button"
,
{
style
:
{
background
:
"#ffc000"
,
borderColor
:
"#ffc000"
,
},
on
:
{
click
:
()
=>
{
this
.
speed
(
params
.
row
);
},
},
},
params
.
row
.
startCount
//开工数
),
h
(
"Button"
,
{
style
:
{
background
:
"#ff7a8b"
,
borderColor
:
"#ff7a8b"
,
},
on
:
{
click
:
()
=>
{
this
.
speed
(
params
.
row
);
},
},
},
params
.
row
.
stopCount
//暂停数
),
h
(
"Button"
,
{
style
:
{
background
:
"#27c149"
,
borderColor
:
"#27c149"
,
// color: '#fff'
},
on
:
{
click
:
()
=>
{
this
.
speed
(
params
.
row
);
},
},
},
params
.
row
.
finishCount
//完成数
),
]
),
]);
},
},
{
key
:
"remark"
,
title
:
this
.
l
(
"remark"
),
align
:
"center"
,
hide
:
true
,
},
{
title
:
"暂停记录"
,
key
:
"zanting"
,
width
:
100
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"record"
,
class
:
"edit"
},
on
:
{
click
:
()
=>
this
.
record
(
params
.
row
.
id
)
},
},
"暂停记录"
),
]);
},
},
{
title
:
"操作"
,
key
:
"caozuo"
,
width
:
100
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
(
params
.
row
.
status
==
5
&&
params
.
row
.
upSplitId
==
0
)
||
(
params
.
row
.
status
==
5
&&
params
.
row
.
upSplitId
>
0
&&
params
.
row
.
splitCardStatus
==
1
)
?
"Button"
:
""
,
//订单状态暂停,启动
{
props
:
{
type
:
"error"
,
size
:
"small"
,
icon
:
"md-play"
,
ghost
:
true
,
},
style
:
{
fontSize
:
"18px"
,
width
:
"50px"
,
height
:
"25px"
,
paddingTop
:
"0"
,
},
on
:
{
click
:
()
=>
{
this
.
start
(
params
.
row
);
},
},
},
""
),
h
(
params
.
row
.
status
==
6
?
"Button"
:
""
,
//订单状态执行中,暂停
{
props
:
{
type
:
"success"
,
size
:
"small"
,
icon
:
"ios-pause"
,
ghost
:
true
,
tooltip
:
"暂停"
,
},
style
:
{
fontSize
:
"18px"
,
width
:
"50px"
,
height
:
"25px"
,
paddingTop
:
"0"
,
},
on
:
{
click
:
()
=>
{
this
.
suspend
(
params
.
row
);
},
},
},
""
),
h
(
params
.
row
.
status
==
5
&&
params
.
row
.
splitCardStatus
==
0
?
"op"
:
""
,
//订单状态执行中,暂停
{
attrs
:
{
icon
:
"md-sync"
,
type
:
"icon"
,
title
:
"回收订单"
,
oprate
:
"edit"
,
msg
:
"确认要恢复工序吗?"
,
},
on
:
{
click
:
()
=>
{
this
.
recycle
(
params
.
row
);
},
},
}
),
]);
},
},
],
loading
:
false
,
recovery
:
{
orderId
:
null
,
demandFinishDate
:
""
,
//计划完成时间
},
mesCode
:
""
,
rulesRecycle
:
{
demandFinishDate
:
[{
required
:
true
,
message
:
"请选择计划完成时间"
,
trigger
:
"change"
,
type
:
"date"
,
},
],
},
};
},
mounted
()
{},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
name
:
"index"
,
components
:
{
// Record,
Search
,
Suspend
,
Speed
,
},
data
()
{
return
{
detail
:
null
,
result
:
[],
dispatchExecuteId
:
null
,
//任务id
orderId
:
null
,
//订单id
SpeedModal
:
false
,
rowSuspend
:
{},
recordId
:
0
,
laster
:
0
,
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
"mesCode"
,
value
:
null
,
},
record
(
id
)
{
this
.
recordModal
=
true
;
this
.
recordId
=
id
;
productingpreparationpeople
:
{
op
:
"Equal"
,
value
:
null
,
},
speed
(
row
)
{
if
(
row
.
finishCount
==
0
&&
row
.
stopCount
==
0
&&
row
.
startCount
==
0
&&
row
.
unstartCount
==
0
)
{
this
.
$Message
.
error
(
"进度数据错误"
);
}
else
{
this
.
result
=
[];
this
.
loading
=
true
;
this
.
SpeedModal
=
true
;
this
.
dispatchExecuteId
=
row
.
dispatchExecuteId
;
this
.
orderId
=
row
.
id
;
Api
.
info
({
routingHeaderId
:
row
.
routingHeaderId
,
dispatchExecuteId
:
row
.
dispatchExecuteId
,
})
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
result
=
r
.
result
;
this
.
loading
=
false
;
}
})
.
catch
((
err
)
=>
{
this
.
$Message
.
error
(
"连接错误"
);
});
}
},
suspendModal
:
false
,
recordModal
:
false
,
deletelModal
:
false
,
recycleModal
:
false
,
curId
:
0
,
columns
:
[
{
key
:
"id"
,
title
:
this
.
l
(
"id"
),
hide
:
true
,
align
:
"left"
,
},
suspendOk
()
{
this
.
suspendModal
=
false
;
this
.
$refs
.
grid
.
load
();
// this.curId = 0
{
title
:
"序号"
,
type
:
"index"
,
width
:
70
,
align
:
"center"
,
},
start
(
row
)
{
this
.
laster
=
this
.
$store
.
state
.
userInfo
.
userId
,
this
.
$Modal
.
confirm
({
title
:
"提示"
,
content
:
"<p>确定要启动,是否继续?</p>"
,
onOk
:
()
=>
{
Api
.
start
({
id
:
row
.
id
,
status
:
6
,
laster
:
this
.
laster
,
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$Message
.
success
(
"启动成功"
);
}
});
// this.suspendModal = true
// this.curId = id
},
onCancel
:
()
=>
{
this
.
$Message
.
info
(
"已取消"
);
},
});
{
key
:
"status"
,
title
:
this
.
l
(
"status"
),
code
:
"plan.order.status"
,
align
:
"center"
,
easy
:
true
,
high
:
true
,
width
:
100
,
},
clsoeSpeedModal
()
{
this
.
SpeedModal
=
false
;
{
key
:
"mesCode"
,
title
:
this
.
l
(
"mesCode"
),
align
:
"left"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
[
params
.
row
.
mesCode
,
[
h
(
"Poptip"
,
{
props
:
{
content
:
"开工预警:"
+
params
.
row
.
startWarning
+
"条"
,
trigger
:
"hover"
,
},
style
:
{
cursor
:
"pointer"
,
},
},
[
h
(
params
.
row
.
startWarning
>
0
?
"Badge"
:
""
,
{
props
:
{
type
:
"warning"
,
// count: 2,
count
:
params
.
row
.
startWarning
,
},
style
:
{
marginTop
:
"12px"
,
marginLeft
:
"5px"
,
},
},
[
h
(
"Icon"
,
{
props
:
{
type
:
"md-alert"
,
},
style
:
{
fontSize
:
"16px"
,
color
:
"#f1cb08"
,
},
}),
]
),
]
),
h
(
"Poptip"
,
{
props
:
{
content
:
"完工预警:"
+
params
.
row
.
finishWarning
+
"条"
,
trigger
:
"hover"
,
},
},
[
h
(
params
.
row
.
finishWarning
>
0
?
"Badge"
:
""
,
{
props
:
{
type
:
"info"
,
// count: 2,
count
:
params
.
row
.
finishWarning
,
},
style
:
{
marginTop
:
"12px"
,
marginLeft
:
"5px"
,
},
},
[
h
(
"Icon"
,
{
props
:
{
type
:
"md-alert"
,
},
style
:
{
fontSize
:
"16px"
,
color
:
"#31F8E6"
,
marginLeft
:
"5px"
,
},
}),
]
),
]
),
],
]);
},
},
suspend
(
row
)
{
// console.log(row);
this
.
suspendModal
=
true
;
this
.
rowSuspend
=
row
;
this
.
$refs
.
addBug
.
getEid
();
{
key
:
"productName"
,
title
:
this
.
l
(
"productName"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
removeOk
()
{
Api
.
delete
({
id
:
this
.
curId
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
deletelModal
=
false
;
this
.
$Message
.
success
(
"删除成功"
);
}
});
{
key
:
"demandStartDate"
,
title
:
this
.
l
(
"demandStartDate"
),
align
:
"center"
,
high
:
true
,
width
:
130
,
render
:
(
h
,
params
)
=>
{
return
h
(
"span"
,
this
.
sliceStr
(
params
.
row
.
demandStartDate
+
" "
,
0
,
10
),
params
.
row
.
demandStartDate
);
},
},
recycle
(
row
)
{
//回收订单
this
.
recycleModal
=
true
;
this
.
mesCode
=
row
.
mesCode
;
this
.
recovery
=
{
orderId
:
row
.
id
,
demandFinishDate
:
row
.
demandFinishDate
,
};
{
key
:
"demandFinishDate"
,
title
:
this
.
l
(
"demandFinishDate"
),
align
:
"center"
,
high
:
true
,
width
:
130
,
render
:
(
h
,
params
)
=>
{
return
h
(
"span"
,
this
.
sliceStr
(
params
.
row
.
demandFinishDate
+
" "
,
0
,
10
),
params
.
row
.
demandFinishDate
);
},
},
changeFinishiDate
()
{
let
temTime
=
this
.
recovery
.
demandFinishDate
;
this
.
recovery
.
demandFinishDate
=
""
;
this
.
recovery
.
demandFinishDate
=
this
.
getFormatDateEnd
(
temTime
);
Api
.
orderrecovery
(
this
.
recovery
)
.
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"回收成功"
);
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
this
.
recycleModal
=
false
;
}
})
.
catch
((
err
)
=>
{
this
.
$Message
.
error
(
"数据连接错误"
);
});
{
key
:
"actualStartDate"
,
title
:
this
.
l
(
"actualStartDate"
),
align
:
"center"
,
high
:
true
,
width
:
150
,
render
:
(
h
,
params
)
=>
{
return
h
(
"span"
,
// this.sliceStr(params.row.actualStartDate + ' ', 0, 10),
params
.
row
.
actualStartDate
==
"0001-01-01 00:00:00"
?
""
:
params
.
row
.
actualStartDate
);
},
},
cancelRecycle
()
{
this
.
mesCode
=
""
;
this
.
recovery
=
{
orderId
:
null
,
demandFinishDate
:
""
,
//计划完成时间
};
this
.
recycleModal
=
false
;
},
getFinishedDate
(
value
)
{
this
.
recovery
.
demandFinishDate
=
value
;
{
key
:
"actualFinishDate"
,
title
:
this
.
l
(
"actualFinishDate"
),
align
:
"center"
,
high
:
true
,
width
:
150
,
render
:
(
h
,
params
)
=>
{
return
h
(
"span"
,
// this.sliceStr(params.row.actualFinishDate + ' ', 0, 10),
params
.
row
.
actualFinishDate
==
"0001-01-01 00:00:00"
?
""
:
params
.
row
.
actualFinishDate
);
},
},
getFormatDateEnd
(
dates
)
{
const
d
=
new
Date
(
dates
);
const
resDate
=
d
.
getFullYear
()
+
"-"
+
this
.
p
(
d
.
getMonth
()
+
1
)
+
"-"
+
this
.
p
(
d
.
getDate
())
+
" 23:59:59"
;
return
resDate
;
{
key
:
"routingType"
,
title
:
this
.
l
(
"routingType"
),
align
:
"center"
,
code
:
"mes_xingchi_plan.order_material.routingType"
,
easy
:
true
,
high
:
true
,
width
:
100
,
},
//截取字符串
sliceStr
(
str
,
lenS
,
lenE
)
{
return
str
.
slice
(
lenS
,
lenE
);
{
title
:
this
.
l
(
"jindu"
),
key
:
"action"
,
width
:
200
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
[
h
(
"ButtonGroup"
,
{
props
:
{
shape
:
"circle"
,
},
},
[
h
(
"Button"
,
{
style
:
{
background
:
"#e4e6ed "
,
borderColor
:
"#e4e6ed "
,
},
on
:
{
click
:
()
=>
{
this
.
speed
(
params
.
row
);
},
},
},
params
.
row
.
unstartCount
//未开工数
),
h
(
"Button"
,
{
style
:
{
background
:
"#ffc000"
,
borderColor
:
"#ffc000"
,
},
on
:
{
click
:
()
=>
{
this
.
speed
(
params
.
row
);
},
},
},
params
.
row
.
startCount
//开工数
),
h
(
"Button"
,
{
style
:
{
background
:
"#ff7a8b"
,
borderColor
:
"#ff7a8b"
,
},
on
:
{
click
:
()
=>
{
this
.
speed
(
params
.
row
);
},
},
},
params
.
row
.
stopCount
//暂停数
),
h
(
"Button"
,
{
style
:
{
background
:
"#27c149"
,
borderColor
:
"#27c149"
,
// color: '#fff'
},
on
:
{
click
:
()
=>
{
this
.
speed
(
params
.
row
);
},
},
},
params
.
row
.
finishCount
//完成数
),
]
),
]);
},
},
cancel
()
{
this
.
curId
=
0
;
this
.
suspendModal
=
false
;
{
key
:
"remark"
,
title
:
this
.
l
(
"remark"
),
align
:
"center"
,
hide
:
true
,
},
p
(
s
)
{
return
Number
(
s
)
<
10
?
"0"
+
s
:
s
;
{
title
:
"暂停记录"
,
key
:
"zanting"
,
width
:
100
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
,
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"record"
,
class
:
"edit"
,
},
on
:
{
click
:
()
=>
this
.
record
(
params
.
row
.
id
),
},
},
"暂停记录"
),
]
);
},
},
l
(
key
)
{
let
vkey
=
"mes_order_watch"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
{
title
:
"操作"
,
key
:
"caozuo"
,
width
:
100
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
,
},
[
h
(
(
params
.
row
.
status
==
5
&&
params
.
row
.
upSplitId
==
0
)
||
(
params
.
row
.
status
==
5
&&
params
.
row
.
upSplitId
>
0
&&
params
.
row
.
splitCardStatus
==
1
)
?
"Button"
:
""
,
//订单状态暂停,启动
{
props
:
{
type
:
"error"
,
size
:
"small"
,
icon
:
"md-play"
,
ghost
:
true
,
},
style
:
{
fontSize
:
"18px"
,
width
:
"50px"
,
height
:
"25px"
,
paddingTop
:
"0"
,
},
on
:
{
click
:
()
=>
{
this
.
start
(
params
.
row
);
},
},
},
""
),
h
(
params
.
row
.
status
==
6
?
"Button"
:
""
,
//订单状态执行中,暂停
{
props
:
{
type
:
"success"
,
size
:
"small"
,
icon
:
"ios-pause"
,
ghost
:
true
,
tooltip
:
"暂停"
,
},
style
:
{
fontSize
:
"18px"
,
width
:
"50px"
,
height
:
"25px"
,
paddingTop
:
"0"
,
},
on
:
{
click
:
()
=>
{
this
.
suspend
(
params
.
row
);
},
},
},
""
),
h
(
params
.
row
.
status
==
5
&&
params
.
row
.
splitCardStatus
==
0
?
"op"
:
""
,
//订单状态执行中,暂停
{
attrs
:
{
icon
:
"md-sync"
,
type
:
"icon"
,
title
:
"回收订单"
,
oprate
:
"edit"
,
msg
:
"确认要恢复工序吗?"
,
},
on
:
{
click
:
()
=>
{
this
.
recycle
(
params
.
row
);
},
},
}
),
]
);
},
},
],
loading
:
false
,
recovery
:
{
orderId
:
null
,
demandFinishDate
:
""
,
//计划完成时间
},
mesCode
:
""
,
rulesRecycle
:
{
demandFinishDate
:
[
{
required
:
true
,
message
:
"请选择计划完成时间"
,
trigger
:
"change"
,
type
:
"date"
,
},
],
},
};
},
mounted
()
{},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
record
(
id
)
{
this
.
detail
=
()
=>
import
(
"./record"
);
this
.
recordModal
=
true
;
this
.
recordId
=
id
;
},
speed
(
row
)
{
if
(
row
.
finishCount
==
0
&&
row
.
stopCount
==
0
&&
row
.
startCount
==
0
&&
row
.
unstartCount
==
0
)
{
this
.
$Message
.
error
(
"进度数据错误"
);
}
else
{
this
.
result
=
[];
this
.
loading
=
true
;
this
.
SpeedModal
=
true
;
this
.
dispatchExecuteId
=
row
.
dispatchExecuteId
;
this
.
orderId
=
row
.
id
;
Api
.
info
({
routingHeaderId
:
row
.
routingHeaderId
,
dispatchExecuteId
:
row
.
dispatchExecuteId
,
})
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
result
=
r
.
result
;
this
.
loading
=
false
;
}
})
.
catch
((
err
)
=>
{
this
.
$Message
.
error
(
"连接错误"
);
});
}
},
suspendOk
()
{
this
.
suspendModal
=
false
;
this
.
$refs
.
grid
.
load
();
// this.curId = 0
},
start
(
row
)
{
(
this
.
laster
=
this
.
$store
.
state
.
userInfo
.
userId
),
this
.
$Modal
.
confirm
({
title
:
"提示"
,
content
:
"<p>确定要启动,是否继续?</p>"
,
onOk
:
()
=>
{
Api
.
start
({
id
:
row
.
id
,
status
:
6
,
laster
:
this
.
laster
,
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$Message
.
success
(
"启动成功"
);
}
});
// this.suspendModal = true
// this.curId = id
},
onCancel
:
()
=>
{
this
.
$Message
.
info
(
"已取消"
);
},
});
},
clsoeSpeedModal
()
{
this
.
SpeedModal
=
false
;
},
suspend
(
row
)
{
// console.log(row);
this
.
suspendModal
=
true
;
this
.
rowSuspend
=
row
;
this
.
$refs
.
addBug
.
getEid
();
},
removeOk
()
{
Api
.
delete
({
id
:
this
.
curId
,
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
deletelModal
=
false
;
this
.
$Message
.
success
(
"删除成功"
);
}
});
},
recycle
(
row
)
{
//回收订单
this
.
recycleModal
=
true
;
this
.
mesCode
=
row
.
mesCode
;
this
.
recovery
=
{
orderId
:
row
.
id
,
demandFinishDate
:
row
.
demandFinishDate
,
};
},
changeFinishiDate
()
{
let
temTime
=
this
.
recovery
.
demandFinishDate
;
this
.
recovery
.
demandFinishDate
=
""
;
this
.
recovery
.
demandFinishDate
=
this
.
getFormatDateEnd
(
temTime
);
Api
.
orderrecovery
(
this
.
recovery
)
.
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"回收成功"
);
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
this
.
recycleModal
=
false
;
}
})
.
catch
((
err
)
=>
{
this
.
$Message
.
error
(
"数据连接错误"
);
});
},
cancelRecycle
()
{
this
.
mesCode
=
""
;
this
.
recovery
=
{
orderId
:
null
,
demandFinishDate
:
""
,
//计划完成时间
};
this
.
recycleModal
=
false
;
},
getFinishedDate
(
value
)
{
this
.
recovery
.
demandFinishDate
=
value
;
},
getFormatDateEnd
(
dates
)
{
const
d
=
new
Date
(
dates
);
const
resDate
=
d
.
getFullYear
()
+
"-"
+
this
.
p
(
d
.
getMonth
()
+
1
)
+
"-"
+
this
.
p
(
d
.
getDate
())
+
" 23:59:59"
;
return
resDate
;
},
//截取字符串
sliceStr
(
str
,
lenS
,
lenE
)
{
return
str
.
slice
(
lenS
,
lenE
);
},
cancel
()
{
this
.
curId
=
0
;
this
.
suspendModal
=
false
;
},
p
(
s
)
{
return
Number
(
s
)
<
10
?
"0"
+
s
:
s
;
},
l
(
key
)
{
let
vkey
=
"mes_order_watch"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
},
};
</
script
>
<
style
lang=
"less"
>
.ivu-btn-group
>
.ivu-btn {
height: 21px !important;
.ivu-btn-group
>
.ivu-btn {
height: 21px !important;
}
.ivu-btn-group {
height: 21px !important;
height: 21px !important;
}
</
style
>
pages/order/monitoring/record.vue
View file @
ff1dd932
...
...
@@ -105,7 +105,7 @@ export default {
type
:
"user"
,
},
{
key
:
"last
er
"
,
key
:
"last
ModifierUserId
"
,
title
:
this
.
l
(
"laster"
),
easy
:
true
,
high
:
true
,
...
...
@@ -192,10 +192,6 @@ export default {
eid
:
Number
,
},
mounted
()
{
// this.$refs.grid.reload(this.easySearch);
// if (this.eid) {
// this.loadList();
// }
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
...
...
@@ -214,9 +210,8 @@ export default {
//格式化原始数据
formatFun
(
data
)
{
data
.
map
((
e
)
=>
{
if
(
e
.
laster
)
{
if
(
e
.
laster
||
e
.
creator
)
{
e
.
laster
=
parseInt
(
e
.
laster
);
}
else
if
(
e
.
creator
)
{
e
.
creator
=
parseInt
(
e
.
creator
);
}
});
...
...
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