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
a8c95979
Commit
a8c95979
authored
May 20, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aps
parent
b84f24e4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
279 additions
and
37 deletions
+279
-37
api.js
pages/aps/aps/api.js
+4
-0
index.vue
pages/aps/aps/index.vue
+59
-17
orderlist.vue
pages/produce/orderlist.vue
+215
-19
config.js
static/config.js
+1
-1
No files found.
pages/aps/aps/api.js
View file @
a8c95979
...
...
@@ -40,6 +40,10 @@ export default {
return
Api
.
post
(
`
${
apsUrl
}
/apspoolappservices/recoveryoptasksimluate`
,
params
);
},
//移出排产池前判断
beforeshiftoutapspool
(
params
)
{
return
Api
.
post
(
`
${
apsUrl
}
/apspoolappservices/beforeshiftoutapspool`
,
params
);
},
//移出排产池
shiftoutapspool
(
params
)
{
return
Api
.
post
(
`
${
apsUrl
}
/apspoolappservices/shiftoutapspool`
,
params
);
...
...
pages/aps/aps/index.vue
View file @
a8c95979
...
...
@@ -60,7 +60,7 @@
<Modal
v-model=
"addModalTemp"
title=
"自定义排序模板"
footer-hide
width=
"1000"
class=
"tempModal"
>
<Temp
:data=
"listTemp"
ref=
"tempRef"
></Temp>
</Modal>
<Modal
v-model=
"modalDuration"
title=
"外协任务"
footer-hide
width=
"1000"
>
<Modal
v-model=
"modalDuration"
title=
"外协任务"
footer-hide
width=
"1000"
>
<Duration
ref=
"durationRef"
></Duration>
</Modal>
<Modal
v-model=
"addModal"
title=
"工序参数设置"
footer-hide
width=
"1000"
>
...
...
@@ -76,6 +76,9 @@
<Modal
v-model=
"apsModal"
title=
"确定APS排产"
@
on-ok=
"apsOk"
@
on-cancel=
"cancel"
>
<p>
确定进行APS排产?
</p>
</Modal>
<Modal
v-model=
"apsCheckModal"
title=
"确定APS排产"
@
on-ok=
"apsCheckOk"
@
on-cancel=
"cancel"
>
<p>
已有排产方案,是否移出排产池?
</p>
</Modal>
<Modal
v-model=
"circleModal"
title
footer-hide
:mask-closable=
"false"
>
<div
slot=
"close"
></div>
<Row>
...
...
@@ -123,6 +126,8 @@ export default {
addModalTemp
:
false
,
modalDuration
:
false
,
insertlModal1
:
false
,
apsCheckModal
:
false
,
tempParams
:
null
,
insertTItle1
:
"插单"
,
rowIndex1
:
null
,
list
:
[],
...
...
@@ -197,7 +202,8 @@ export default {
color
:
params
.
row
.
insert_flag
==
1
?
"#2680EB"
:
"#aaa"
},
on
:
{
click
:
()
=>
this
.
changeFlag1
(
params
.
row
.
part_task_pk
,
params
.
index
)
click
:
()
=>
this
.
changeFlag1
(
params
.
row
.
part_task_pk
,
params
.
index
)
}
})
]
...
...
@@ -431,6 +437,7 @@ export default {
},
remove
(
partPkId
)
{
//移出排产池
this
.
tempParams
=
null
;
let
paramsArry
=
[];
if
(
partPkId
.
constructor
==
Array
)
{
paramsArry
=
partPkId
;
...
...
@@ -440,17 +447,45 @@ export default {
let
params
=
{
partPks
:
paramsArry
};
Api
.
shiftoutapspool
(
params
).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"移出排产池操作成功"
);
this
.
loadList
();
//移出排产后将aps对应的store数量去掉
this
.
$store
.
commit
(
"setCountAps"
,
this
.
$store
.
state
.
countAps
-
paramsArry
.
length
);
}
});
Api
.
beforeshiftoutapspool
(
params
)
.
then
(
res
=>
{
if
(
res
.
success
)
{
if
(
res
.
result
)
{
this
.
checkapspool
(
params
);
}
else
{
this
.
tempParams
=
null
;
this
.
tempParams
=
params
;
this
.
apsCheckModal
=
true
;
}
}
else
{
this
.
$Message
.
error
(
"校验失败"
);
}
})
.
catch
(
err
=>
{
this
.
$Message
.
error
(
"连接错误1"
);
});
},
apsCheckOk
()
{
this
.
checkapspool
(
this
.
tempParams
);
},
checkapspool
(
params
)
{
Api
.
shiftoutapspool
(
params
)
.
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"移出排产池操作成功"
);
this
.
loadList
();
//移出排产后将aps对应的store数量去掉
this
.
$store
.
commit
(
"setCountAps"
,
this
.
$store
.
state
.
countAps
-
params
.
partPks
.
length
);
}
else
{
this
.
$Message
.
error
(
"移出排产池操作失败"
);
}
})
.
catch
(
err
=>
{
this
.
$Message
.
error
(
"连接失败2"
);
});
},
onSelect
(
a
,
b
)
{
//批量选择
...
...
@@ -474,6 +509,7 @@ export default {
this
.
editModal
=
false
;
this
.
deletedlModal
=
false
;
this
.
apsModal
=
false
;
this
.
apsCheckModal
=
false
;
},
onDragDrop
(
a
,
b
)
{
//拖拽排序
...
...
@@ -650,7 +686,7 @@ export default {
},
//外协工期修改end
//插单start
//插单事件start----
//插单事件start----
changeFlag1
(
id
,
index
)
{
this
.
rowIndex1
=
index
;
if
(
this
.
list
[
this
.
rowIndex1
].
insert_flag
==
1
)
{
...
...
@@ -663,7 +699,10 @@ export default {
insertOk1
()
{
if
(
this
.
list
[
this
.
rowIndex1
].
insert_flag
==
1
)
{
//根据插单数据状态进行插单或取消插单操作
let
params1
=
{
partTaskPks
:
[
this
.
list
[
this
.
rowIndex1
].
part_task_pk
],
opTaskPks
:
[]
};
let
params1
=
{
partTaskPks
:
[
this
.
list
[
this
.
rowIndex1
].
part_task_pk
],
opTaskPks
:
[]
};
Api
.
cancelinsertorder
(
params1
)
.
then
(
res
=>
{
if
(
res
.
success
)
{
...
...
@@ -677,7 +716,10 @@ export default {
this
.
$Message
.
error
(
"数据异常!"
);
});
}
else
{
let
params
=
{
partTaskPks
:
[
this
.
list
[
this
.
rowIndex1
].
part_task_pk
],
opTaskPks
:
[]
};
let
params
=
{
partTaskPks
:
[
this
.
list
[
this
.
rowIndex1
].
part_task_pk
],
opTaskPks
:
[]
};
Api
.
saveinsertorder
(
params
)
.
then
(
res
=>
{
if
(
res
.
success
)
{
...
...
@@ -692,7 +734,7 @@ export default {
});
}
this
.
insertlModal1
=
false
;
}
,
}
//插单end
}
};
...
...
pages/produce/orderlist.vue
View file @
a8c95979
<
template
>
<div
class=
""
>
<div
class=
""
>
<Button
@
click=
"toExecute"
>
工单执行
</Button>
</div>
</div>
<div
class=
"aps-r"
>
<!--
<Button
@
click=
"toExecute"
>
工单执行
</Button>
-->
<DataGrid
:columns=
"columns"
ref=
"grid"
:data=
"list"
:batch=
"false"
type=
"card"
:high=
"false"
:span=
"4"
:lazy=
"true"
>
<template
slot=
"card"
slot-scope=
"
{row}">
<div
class=
"body"
@
click=
"toExecute"
>
<Row
class=
"title-i"
>
<Col
:span=
"18"
class=
"order-code"
>
工艺编号:
{{
row
.
processcode
}}
</Col>
<Col
:span=
"6"
class=
"btn-click"
>
<State
code=
"plan.order.status"
:value=
"row.routing_type"
/>
</Col>
</Row>
<div
class=
"panel-text"
>
<Row
class=
"row"
>
<Col
span=
"18"
class=
"fa"
>
工艺名称:
{{
row
.
processname
}}
</Col>
<Col
span=
"6"
class=
"fa"
>
数量:
{{
row
.
quantity
}}
</Col>
</Row>
<Row>
<Col
span=
"24"
class=
"fa"
>
订单编号:
{{
row
.
mesCode
}}
</Col>
</Row>
<Row>
<Col
span=
"24"
class=
"fa"
>
产品名称:
{{
row
.
productName
}}
</Col>
</Row>
<Row>
<Col
span=
"24"
class=
"fa"
>
产品类型:
{{
row
.
taskTypeName
}}
</Col>
</Row>
<Row>
<Col
span=
"24"
class=
"fa"
>
计划开始时间:
{{
row
.
demandStartDate
}}
</Col>
</Row>
<Row>
<Col
span=
"24"
class=
"fa"
>
计划结束时间:
{{
row
.
demandFinishDate
}}
</Col>
</Row>
<Row>
<Col
span=
"24"
class=
"fa"
>
实际开始时间:
{{
row
.
actualStartDate
}}
</Col>
</Row>
</div>
</div>
</
template
>
</DataGrid>
</div>
</template>
<
script
>
export
default
{
name
:
'starOrder'
,
data
(){
return
{
starmodal
:
false
,
name
:
"starOrder"
,
data
()
{
return
{
columns
:
[
{
title
:
this
.
l
(
"mesCode"
),
key
:
"mesCode"
,
width
:
240
,
align
:
"left"
},
{
key
:
"productName"
,
title
:
this
.
l
(
"productName"
),
align
:
"left"
,
easy
:
true
,
width
:
160
,
high
:
true
,
tooltip
:
true
},
{
key
:
"status"
,
title
:
this
.
l
(
"status"
),
align
:
"center"
,
high
:
true
,
code
:
"plan.order.status"
},
{
key
:
"mainRoutingSetStatus"
,
title
:
this
.
l
(
"mainRoutingSetStatus"
),
align
:
"center"
,
high
:
true
,
code
:
"aps.plan.mainRoutingStatus"
},
{
key
:
"taskType"
,
title
:
this
.
l
(
"taskType"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
,
code
:
"plan.order.taskType"
}
},
created
()
{
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
mounted
()
{
},
methods
:
{
toExecute
(){
this
.
$router
.
push
(
"/produce/execute"
);
],
list
:
[
{
actualBeginTime
:
"2020-05-12 14:58:17"
,
id
:
1
,
orderIDs
:
"5"
,
platesnum
:
0
,
processcode
:
"ZGY_20200315_2"
,
processname
:
"增材制造主工艺规程"
,
quantity
:
1
,
routing_header_id
:
181
,
routing_type
:
1
,
actualStartDate
:
"2020-05-12 14:58:17"
,
demandFinishDate
:
"2020-05-10 23:59:59"
,
demandStartDate
:
"2020-05-09 00:00:01"
,
mesCode
:
"DDBH_20200509_2"
,
order_id
:
5
,
picnumber
:
0
,
productName
:
"气源分配器壳体"
,
quantity
:
1
,
taskTypeName
:
"正式计划"
},
{
mesCode
:
"DDBH2010052001"
,
productName
:
"机床产品1"
,
status
:
1
,
mainRoutingSetStatus
:
1
,
taskType
:
1
},
{
mesCode
:
"DDBH2010052002"
,
productName
:
"机床产品2"
,
status
:
2
,
mainRoutingSetStatus
:
1
,
taskType
:
1
},
{
mesCode
:
"DDBH2010052003"
,
productName
:
"机床产品3"
,
status
:
5
,
mainRoutingSetStatus
:
1
,
taskType
:
1
},
{
mesCode
:
"DDBH2010052004"
,
productName
:
"机床产品4"
,
status
:
1
,
mainRoutingSetStatus
:
0
,
taskType
:
1
}
]
};
},
created
()
{},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
mounted
()
{},
methods
:
{
toExecute
()
{
this
.
$router
.
push
(
"/produce/execute"
);
},
}
l
(
key
)
{
let
vkey
=
"mes_order"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
}
}
};
</
script
>
<
style
lang=
"less"
>
.aps-r {
width: 100%;
height: 100%;
overflow: auto;
padding: 15px 0 15px 15px;
.body {
border: 1px solid #e4e6ed;
border-radius: 4px;
margin-right: 8px;
margin-bottom: 8px;
.title-i {
padding: 0 8px;
height: 35px;
line-height: 35px;
color: #fff;
background: #a7b8cc;
font-size: 15px;
.btn-click {
text-align: right;
a {
color: #fff;
}
a:hover {
color: #249e91;
}
}
}
.panel-text {
background: rgba(167, 184, 204, 0.2);
padding: 5px 8px;
.row {
height: 30px;
line-height: 30px;
.fa {
color: #515a6e;
}
}
}
}
}
</
style
>
static/config.js
View file @
a8c95979
...
...
@@ -5,7 +5,7 @@ const systemApi = {
aps
:
'47.92.102.113'
}
//环境切换(只修改此处):
let
address
=
systemApi
.
product
;
let
address
=
systemApi
.
dev
;
//let address=systemApi.product;
//let address=systemApi.local;
...
...
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