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
058e14eb
Commit
058e14eb
authored
Apr 01, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plan
parent
d4a07780
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
212 additions
and
195 deletions
+212
-195
api.js
pages/aps/plan/api.js
+3
-0
index.vue
pages/aps/plan/index.vue
+209
-195
No files found.
pages/aps/plan/api.js
View file @
058e14eb
...
...
@@ -25,4 +25,7 @@ export default {
routingdistribute
(
params
)
{
//工艺派发
return
Api
.
post
(
`
${
PlanUrl
}
/messchedule/routingdistribute`
,
params
);
},
moveintoaps
()
{
//跳转进入排产池前判断
return
Api
.
post
(
`
${
PlanUrl
}
/messchedule/moveintoaps`
);
},
}
\ No newline at end of file
pages/aps/plan/index.vue
View file @
058e14eb
<
template
>
<div
class=
"myBug"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
@
on-selection-change=
"selectInfo"
:batch=
'false'
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
@
on-selection-change=
"selectInfo"
:batch=
"false"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
...
...
@@ -60,14 +66,14 @@
</div>
</template>
<
script
>
import
Api
from
'./api'
import
Add
from
'./add'
import
Edit
from
'./edit'
import
Detail
from
'./detail'
import
Search
from
'./search'
import
Dispatch
from
'./dispatch'
import
Api
from
"./api"
;
import
Add
from
"./add"
;
import
Edit
from
"./edit"
;
import
Detail
from
"./detail"
;
import
Search
from
"./search"
;
import
Dispatch
from
"./dispatch"
;
export
default
{
name
:
'list'
,
name
:
"list"
,
components
:
{
Add
,
Edit
,
...
...
@@ -80,8 +86,7 @@ export default {
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
'mesCode,taskType,stage,projectNumber,materialName'
,
op
:
"mesCode,taskType,stage,projectNumber,materialName"
,
value
:
null
}
},
...
...
@@ -94,181 +99,181 @@ export default {
curId
:
0
,
columns
:
[
{
type
:
'selection'
,
type
:
"selection"
,
width
:
70
,
align
:
'center'
align
:
"center"
},
{
title
:
this
.
l
(
'mesCode'
),
key
:
'mesCode'
,
title
:
this
.
l
(
"mesCode"
),
key
:
"mesCode"
,
width
:
240
,
align
:
'left'
align
:
"left"
},
{
key
:
'productName'
,
title
:
this
.
l
(
'productName'
),
align
:
'left'
,
key
:
"productName"
,
title
:
this
.
l
(
"productName"
),
align
:
"left"
,
easy
:
true
,
width
:
160
,
width
:
160
,
high
:
true
,
tooltip
:
true
tooltip
:
true
},
{
key
:
'status'
,
title
:
this
.
l
(
'status'
),
align
:
'center'
,
key
:
"status"
,
title
:
this
.
l
(
"status"
),
align
:
"center"
,
high
:
true
,
code
:
'plan.order.status'
code
:
"plan.order.status"
},
{
key
:
'mainRoutingSetStatus'
,
title
:
this
.
l
(
'mainRoutingSetStatus'
),
align
:
'center'
,
key
:
"mainRoutingSetStatus"
,
title
:
this
.
l
(
"mainRoutingSetStatus"
),
align
:
"center"
,
high
:
true
,
code
:
'aps.plan.mainRoutingStatus'
code
:
"aps.plan.mainRoutingStatus"
},
{
key
:
'isSupportingFinish'
,
title
:
this
.
l
(
'isSupportingFinish'
),
align
:
'center'
,
key
:
"isSupportingFinish"
,
title
:
this
.
l
(
"isSupportingFinish"
),
align
:
"center"
,
high
:
true
,
code
:
'aps.plan.supportingStatus'
code
:
"aps.plan.supportingStatus"
},
{
key
:
'projectNumber'
,
title
:
this
.
l
(
'projectNumber'
),
align
:
'left'
,
key
:
"projectNumber"
,
title
:
this
.
l
(
"projectNumber"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
'batchNumber'
,
title
:
this
.
l
(
'batchNumber'
),
align
:
'left'
,
key
:
"batchNumber"
,
title
:
this
.
l
(
"batchNumber"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
'urgencyLevel'
,
title
:
this
.
l
(
'urgencyLevel'
),
align
:
'left'
,
key
:
"urgencyLevel"
,
title
:
this
.
l
(
"urgencyLevel"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
'taskType'
,
title
:
this
.
l
(
'taskType'
),
align
:
'left'
,
key
:
"taskType"
,
title
:
this
.
l
(
"taskType"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
,
code
:
'plan.order.taskType'
code
:
"plan.order.taskType"
},
{
key
:
'drawnNumber'
,
title
:
this
.
l
(
'drawnNumber'
),
align
:
'left'
,
key
:
"drawnNumber"
,
title
:
this
.
l
(
"drawnNumber"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
'stage'
,
title
:
this
.
l
(
'stage'
),
align
:
'left'
,
key
:
"stage"
,
title
:
this
.
l
(
"stage"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
code
:
'plan.order.stage'
code
:
"plan.order.stage"
},
{
key
:
'materialName'
,
title
:
this
.
l
(
'materialName'
),
align
:
'left'
,
key
:
"materialName"
,
title
:
this
.
l
(
"materialName"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
'quantity'
,
title
:
this
.
l
(
'quantity'
),
align
:
'left'
,
key
:
"quantity"
,
title
:
this
.
l
(
"quantity"
),
align
:
"left"
,
high
:
true
},
{
key
:
'routingMethod'
,
title
:
this
.
l
(
'routingMethod'
),
align
:
'left'
,
key
:
"routingMethod"
,
title
:
this
.
l
(
"routingMethod"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
code
:
'plan.order.routingMethod'
code
:
"plan.order.routingMethod"
},
{
key
:
'materialWeight'
,
title
:
this
.
l
(
'materialWeight'
),
align
:
'left'
,
key
:
"materialWeight"
,
title
:
this
.
l
(
"materialWeight"
),
align
:
"left"
,
high
:
true
,
hide
:
true
},
{
key
:
'productCode'
,
title
:
this
.
l
(
'productCode'
),
align
:
'left'
,
key
:
"productCode"
,
title
:
this
.
l
(
"productCode"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
},
{
key
:
'isPreschedule'
,
title
:
this
.
l
(
'isPreschedule'
),
align
:
'left'
,
key
:
"isPreschedule"
,
title
:
this
.
l
(
"isPreschedule"
),
align
:
"left"
,
high
:
true
,
code
:
'mes_xingchi_plan.mes_order.is_preschedule'
,
code
:
"mes_xingchi_plan.mes_order.is_preschedule"
,
hide
:
true
},
{
key
:
'spareQty'
,
title
:
this
.
l
(
'spareQty'
),
align
:
'left'
,
key
:
"spareQty"
,
title
:
this
.
l
(
"spareQty"
),
align
:
"left"
,
high
:
true
,
hide
:
true
},
{
key
:
'demandStart'
,
title
:
this
.
l
(
'demandStart'
),
align
:
'left'
,
key
:
"demandStart"
,
title
:
this
.
l
(
"demandStart"
),
align
:
"left"
,
high
:
true
,
hide
:
true
},
{
key
:
'demandFinish'
,
title
:
this
.
l
(
'demandFinish'
),
align
:
'left'
,
key
:
"demandFinish"
,
title
:
this
.
l
(
"demandFinish"
),
align
:
"left"
,
high
:
true
,
hide
:
true
},
{
key
:
'partNamePro'
,
title
:
this
.
l
(
'partNamePro'
),
align
:
'left'
,
key
:
"partNamePro"
,
title
:
this
.
l
(
"partNamePro"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
},
{
title
:
'操作'
,
key
:
'action'
,
title
:
"操作"
,
key
:
"action"
,
width
:
140
,
align
:
'center'
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
class
:
'action'
},
[
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
'op'
,
"op"
,
{
attrs
:
{
oprate
:
'detail'
},
attrs
:
{
oprate
:
"detail"
},
style
:
{
color
:
params
.
row
.
mainRoutingSetStatus
==
0
?
'red'
:
''
color
:
params
.
row
.
mainRoutingSetStatus
==
0
?
"red"
:
""
},
on
:
{
click
:
()
=>
...
...
@@ -279,10 +284,10 @@ export default {
}
},
params
.
row
.
mainRoutingSetStatus
==
0
?
'工艺派发'
?
"工艺派发"
:
params
.
row
.
mainRoutingSetStatus
==
1
?
'移入排产'
:
''
?
"移入排产"
:
""
)
// h(
// 'op',
...
...
@@ -300,7 +305,7 @@ export default {
// },
// '删除'
// )
])
])
;
}
}
],
...
...
@@ -315,206 +320,215 @@ export default {
resultsStatus
:
0
,
dispatchStatus
:
0
,
//派发标识
scheduleStatus
:
0
,
//排产标识
resultsOrderList
:
''
}
resultsOrderList
:
""
}
;
},
mounted
()
{
console
.
log
(
this
)
console
.
log
(
this
)
;
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
handleSelectAll
(
status
)
{
//选择列表数据
this
.
$refs
.
grid
.
selectAll
(
status
)
this
.
$refs
.
grid
.
selectAll
(
status
)
;
},
selectInfo
(
value
)
{
if
(
value
.
length
>
0
)
{
this
.
footerBar
=
true
this
.
footerBar
=
true
;
}
else
{
this
.
footerBar
=
false
this
.
footerBar
=
false
;
}
this
.
selectList
=
[]
this
.
selectList
=
value
this
.
selectList
=
[]
;
this
.
selectList
=
value
;
this
.
selectCount
=
this
.
selectList
.
length
let
statueArry
=
[]
let
tempmesCodeList
=
[]
this
.
resultsStatusArr
=
[]
value
.
forEach
(
(
data
)
=>
{
var
that
=
this
statueArry
.
push
(
data
.
id
)
this
.
resultsStatusArr
.
push
(
data
.
mainRoutingSetStatus
)
tempmesCodeList
.
push
(
data
.
mesCode
)
})
this
.
selectCount
=
this
.
selectList
.
length
;
let
statueArry
=
[]
;
let
tempmesCodeList
=
[]
;
this
.
resultsStatusArr
=
[]
;
value
.
forEach
(
data
=>
{
var
that
=
this
;
statueArry
.
push
(
data
.
id
)
;
this
.
resultsStatusArr
.
push
(
data
.
mainRoutingSetStatus
)
;
tempmesCodeList
.
push
(
data
.
mesCode
)
;
})
;
let
mainRS
=
this
.
uniq
(
this
.
resultsStatusArr
)
//数组去重
let
mainRS
=
this
.
uniq
(
this
.
resultsStatusArr
)
;
//数组去重
if
(
mainRS
.
length
==
1
)
{
this
.
results
=
[]
this
.
results
=
statueArry
this
.
getListId
(
statueArry
)
this
.
results
=
[]
;
this
.
results
=
statueArry
;
this
.
getListId
(
statueArry
)
;
this
.
resultsOrderList
=
JSON
.
stringify
(
tempmesCodeList
)
//提示mesCode
.
replace
(
'['
,
''
)
.
replace
(
']'
,
''
)
.
replace
(
/
\"
/g
,
''
)
.
replace
(
"["
,
""
)
.
replace
(
"]"
,
""
)
.
replace
(
/
\"
/g
,
""
);
if
(
mainRS
[
0
]
==
0
)
{
//未派发
this
.
dispatchStatus
=
1
this
.
scheduleStatus
=
0
this
.
dispatchStatus
=
1
;
this
.
scheduleStatus
=
0
;
}
else
if
(
mainRS
[
0
]
==
1
)
{
//已派发
this
.
dispatchStatus
=
0
this
.
scheduleStatus
=
1
this
.
dispatchStatus
=
0
;
this
.
scheduleStatus
=
1
;
}
else
{
//派发中
this
.
dispatchStatus
=
0
this
.
scheduleStatus
=
0
this
.
dispatchStatus
=
0
;
this
.
scheduleStatus
=
0
;
}
}
else
{
this
.
dispatchStatus
=
0
this
.
scheduleStatus
=
0
this
.
dispatchStatus
=
0
;
this
.
scheduleStatus
=
0
;
}
},
//得到需要批量操作的ids
getListId
(
value
)
{
this
.
listBatchIds1
=
value
this
.
listBatchIds1
=
value
;
if
(
this
.
listBatchIds1
.
length
>
0
)
{
this
.
footerBar
=
true
this
.
footerBar
=
true
;
}
else
{
this
.
footerBar
=
false
this
.
footerBar
=
false
;
}
},
canselFooter
()
{
this
.
footerBar
=
false
this
.
handleSelectAll
(
false
)
this
.
footerBar
=
false
;
this
.
handleSelectAll
(
false
)
;
},
modalDispatch
()
{
//打开工艺派发
this
.
listBatchIds
=
this
.
listBatchIds1
//用于列表操作时和多选时的listBatchId的冲突
this
.
listBatchIds
=
this
.
listBatchIds1
;
//用于列表操作时和多选时的listBatchId的冲突
if
(
this
.
dispatchStatus
==
1
)
{
this
.
dispatchModal
=
true
this
.
dispatchModal
=
true
;
}
else
{
this
.
$Message
.
error
(
'所选订单里存在已派发订单!'
)
this
.
$Message
.
error
(
"所选订单里存在已派发订单!"
);
}
},
modalSchedule
()
{
//移入排产
this
.
listBatchIds
=
this
.
listBatchIds1
this
.
listBatchIds
=
this
.
listBatchIds1
;
if
(
this
.
scheduleStatus
==
1
)
{
this
.
scheduleModal
=
true
this
.
scheduleModal
=
true
;
}
else
{
this
.
$Message
.
error
(
'所选订单里存在未派发订单!'
)
this
.
$Message
.
error
(
"所选订单里存在未派发订单!"
);
}
},
goMethod
(
value
)
{
//行内点击后面按钮
this
.
resultsOrderList
=
value
.
mesCode
this
.
listBatchIds
=
[
value
.
id
]
this
.
resultsOrderList
=
value
.
mesCode
;
this
.
listBatchIds
=
[
value
.
id
]
;
if
(
value
.
mainRoutingSetStatus
==
0
)
{
//this.dispatchStatus = 1
//this.scheduleStatus = 0
this
.
dispatchModal
=
true
this
.
dispatchModal
=
true
;
}
else
if
(
value
.
mainRoutingSetStatus
==
1
)
{
//this.dispatchStatus = 0
//this.scheduleStatus = 1
this
.
scheduleModal
=
true
this
.
scheduleModal
=
true
;
}
},
scheduleOk
()
{
let
params
=
{
ids
:
this
.
listBatchIds
}
let
params
=
{
ids
:
this
.
listBatchIds
}
;
Api
.
moveinbatch
(
params
)
.
then
(
(
r
)
=>
{
.
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'移入排产成功'
)
this
.
$Message
.
success
(
"移入排产成功"
);
}
else
{
this
.
$Message
.
error
(
'移入排产失败'
)
this
.
$Message
.
error
(
"移入排产失败"
);
}
})
.
catch
(
(
err
)
=>
{
this
.
$Message
.
error
(
'移入排产失败'
)
})
this
.
canselFooter
()
this
.
cancel
()
.
catch
(
err
=>
{
this
.
$Message
.
error
(
"移入排产失败"
);
})
;
this
.
canselFooter
()
;
this
.
cancel
()
;
},
//跳转到aps排产池(有判断)
goAps
()
{
Api
.
moveintoaps
().
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
result
.
res
)
{
this
.
$router
.
push
({
name
:
'aps-aps'
name
:
"aps-aps"
// params: { customerId: id }
})
});
}
else
{
this
.
$Message
.
error
(
res
.
result
.
msg
);
}
}
});
},
addOk
()
{
this
.
$refs
.
grid
.
load
()
this
.
addModal
=
false
this
.
detailModal
=
false
this
.
editModal
=
false
this
.
curId
=
0
this
.
$refs
.
grid
.
load
()
;
this
.
addModal
=
false
;
this
.
detailModal
=
false
;
this
.
editModal
=
false
;
this
.
curId
=
0
;
//aps
this
.
dispatchModal
=
false
this
.
scheduleModal
=
false
this
.
listBatchIds
=
[]
this
.
listBatchIds1
=
[]
this
.
canselFooter
()
this
.
dispatchModal
=
false
;
this
.
scheduleModal
=
false
;
this
.
listBatchIds
=
[]
;
this
.
listBatchIds1
=
[]
;
this
.
canselFooter
()
;
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
;
},
detail
(
id
)
{
this
.
detailModal
=
true
this
.
curId
=
id
this
.
detailModal
=
true
;
this
.
curId
=
id
;
},
edit
(
id
)
{
this
.
editModal
=
true
this
.
curId
=
id
this
.
editModal
=
true
;
this
.
curId
=
id
;
},
remove
(
id
)
{
this
.
deletelModal
=
true
this
.
curId
=
id
this
.
deletelModal
=
true
;
this
.
curId
=
id
;
},
removeOk
()
{
Api
.
delete
({
id
:
this
.
curId
}).
then
(
(
r
)
=>
{
Api
.
delete
({
id
:
this
.
curId
}).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
()
this
.
deletelModal
=
false
this
.
$Message
.
success
(
'删除成功'
)
this
.
$refs
.
grid
.
load
()
;
this
.
deletelModal
=
false
;
this
.
$Message
.
success
(
"删除成功"
);
}
})
})
;
},
removeCancel
()
{
this
.
deletelModal
=
false
this
.
deletelModal
=
false
;
},
cancel
()
{
this
.
curId
=
0
this
.
addModal
=
false
this
.
detailModal
=
false
this
.
editModal
=
false
this
.
deletedlModal
=
false
this
.
curId
=
0
;
this
.
addModal
=
false
;
this
.
detailModal
=
false
;
this
.
editModal
=
false
;
this
.
deletedlModal
=
false
;
//aps
this
.
dispatchModal
=
false
this
.
scheduleModal
=
false
this
.
dispatchModal
=
false
;
this
.
scheduleModal
=
false
;
// this.listBatchIds = []
// this.listBatchIds1 = []
// this.canselFooter()
},
l
(
key
)
{
let
vkey
=
'mes_order'
+
'.'
+
key
return
this
.
$t
(
vkey
)
||
key
let
vkey
=
"mes_order"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
uniq
(
array
)
{
//数组去重
array
.
sort
()
var
temp
=
[]
temp
=
[
array
[
0
]]
array
.
sort
()
;
var
temp
=
[]
;
temp
=
[
array
[
0
]]
;
for
(
var
i
=
1
;
i
<
array
.
length
;
i
++
)
{
if
(
array
[
i
]
!==
temp
[
temp
.
length
-
1
])
{
temp
.
push
(
array
[
i
])
temp
.
push
(
array
[
i
])
;
}
}
return
temp
return
temp
;
}
}
}
}
;
</
script
>
<
style
lang=
"less"
>
.footerSpan {
...
...
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