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
a786ee3a
Commit
a786ee3a
authored
Nov 10, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
智能排产
parent
d58fef4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
406 additions
and
378 deletions
+406
-378
excute.vue
pages/aps/ai/components/excute.vue
+406
-378
No files found.
pages/aps/ai/components/excute.vue
View file @
a786ee3a
<
template
>
<div
style=
"padding: 0;"
class=
"excute"
>
<DataGrid
style=
"margin-top:2px; margin-bottom: -5px;"
:columns=
"columns"
ref=
"grid"
:easy=
"false"
:high=
"false"
:set=
"false"
:border=
"false"
:data=
"data1"
:height=
"gridHeight"
:page=
"false"
:size=
"size"
></DataGrid>
<div
style=
"padding: 0"
class=
"excute"
>
<DataGrid
style=
"margin-top: 2px; margin-bottom: -5px"
:columns=
"columns"
ref=
"grid"
:easy=
"false"
:high=
"false"
:set=
"false"
:border=
"false"
:data=
"data1"
:height=
"gridHeight"
:page=
"false"
:size=
"size"
></DataGrid>
<Modal
v-model=
"editModal"
title=
"编辑"
footer-hide
width=
"800"
>
<Edit
:row=
"rowData"
@
on-close=
"cancel"
@
on-option-ok=
"addOk"
/>
<Edit
:row=
"rowData"
@
on-close=
"cancel"
@
on-option-ok=
"addOk"
/>
</Modal>
</div>
</div>
</
template
>
<
script
>
...
...
@@ -12,392 +24,408 @@ import Api from "../../aps/api";
import
Edit
from
"./edit"
;
import
Add
from
"../options"
;
export
default
{
name
:
"list"
,
components
:
{
Edit
,
Add
name
:
"list"
,
components
:
{
Edit
,
Add
,
},
props
:
{
rowId
:
{
type
:
Number
,
},
props
:
{
rowId
:
{
type
:
Number
},
data
()
{
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
"task_seq"
,
value
:
null
,
},
},
setParsModal
:
false
,
editModal
:
false
,
detailModal
:
false
,
rowIndex
:
null
,
curId
:
0
,
gridHeight
:
150
,
size
:
"small"
,
columns
:
[
{
title
:
" "
,
width
:
130
,
},
{
key
:
"task_seq"
,
title
:
this
.
l
(
"task_seq"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"op_task_pk"
,
title
:
this
.
l
(
"op_task_pk"
),
align
:
"left"
,
high
:
true
,
hide
:
true
,
},
{
key
:
"task_name"
,
title
:
this
.
l
(
"task_name"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
,
},
{
key
:
"taskseq_des"
,
title
:
this
.
l
(
"task_name"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"routingHeaderCode"
,
title
:
this
.
l
(
"routingHeaderCode"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"routingHeaderName"
,
title
:
this
.
l
(
"routingHeaderName"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"part_task_pk"
,
title
:
this
.
l
(
"part_task_pk"
),
align
:
"left"
,
high
:
true
,
hide
:
true
,
},
{
key
:
"put_into_qty"
,
title
:
this
.
l
(
"put_into_qty"
),
align
:
"left"
,
high
:
true
,
hide
:
true
,
},
{
key
:
"plan_start"
,
title
:
this
.
l
(
"plan_start"
),
align
:
"center"
,
high
:
true
,
width
:
140
,
hide
:
true
,
},
{
key
:
"plan_finish"
,
title
:
this
.
l
(
"plan_finish"
),
align
:
"center"
,
high
:
true
,
width
:
140
,
hide
:
true
,
},
{
key
:
"equip_type"
,
title
:
this
.
l
(
"equip_type"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"firsT_EQUIP_CODE"
,
title
:
this
.
l
(
"first_equip"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"setup_time"
,
title
:
this
.
l
(
"setup_time"
),
align
:
"right"
,
high
:
true
,
type
:
"outputTime"
,
},
{
key
:
"run_time"
,
title
:
this
.
l
(
"run_time"
),
align
:
"right"
,
high
:
true
,
type
:
"outputTime"
,
},
{
key
:
"outside_time"
,
title
:
this
.
l
(
"outside_time"
),
align
:
"right"
,
high
:
true
,
type
:
"outputTime"
,
},
{
key
:
"transport_time"
,
title
:
this
.
l
(
"transport_time"
),
align
:
"right"
,
high
:
true
,
hide
:
true
,
type
:
"outputTime"
,
},
{
key
:
"check_time"
,
title
:
this
.
l
(
"check_time"
),
align
:
"right"
,
high
:
true
,
hide
:
true
,
type
:
"outputTime"
,
},
{
key
:
"efficiency_value"
,
title
:
this
.
l
(
"efficiency_value"
),
align
:
"right"
,
high
:
true
,
},
{
key
:
"machine_rule"
,
title
:
this
.
l
(
"machine_rule"
),
align
:
"center"
,
easy
:
true
,
high
:
true
,
width
:
140
,
},
{
key
:
"singleout"
,
title
:
this
.
l
(
"singleout"
),
align
:
"left"
,
high
:
true
,
hide
:
true
,
},
{
key
:
"equip_type"
,
title
:
this
.
l
(
"equip_type"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
,
},
{
key
:
"first_equip"
,
title
:
this
.
l
(
"first_equip"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
,
},
{
key
:
"cal_id"
,
title
:
this
.
l
(
"cal_id"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"plan_method"
,
title
:
this
.
l
(
"plan_method"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"over_time"
,
title
:
this
.
l
(
"over_time"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"isdiscrete"
,
title
:
this
.
l
(
"isdiscrete"
),
align
:
"center"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"discrete_value"
,
title
:
this
.
l
(
"discrete_value"
),
align
:
"right"
,
high
:
true
,
},
{
key
:
"multi_machine"
,
title
:
this
.
l
(
"multi_machine"
),
align
:
"center"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"notes"
,
title
:
this
.
l
(
"notes"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
,
},
{
key
:
"workshopcode"
,
title
:
this
.
l
(
"workshopcode"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
,
},
{
key
:
"routing_detail_id"
,
title
:
this
.
l
(
"routing_detail_id"
),
align
:
"left"
,
high
:
true
,
hide
:
true
,
},
{
key
:
"routing_header_id"
,
title
:
this
.
l
(
"routing_header_id"
),
align
:
"left"
,
high
:
true
,
hide
:
true
,
},
{
key
:
"comb_param"
,
title
:
this
.
l
(
"comb_param"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
,
},
{
key
:
"rule_qty"
,
title
:
this
.
l
(
"rule_qty"
),
align
:
"left"
,
high
:
true
,
hide
:
true
,
},
{
title
:
"操作"
,
key
:
"action"
,
width
:
140
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
,
},
[
h
(
"op"
,
{
attrs
:
{
icon
:
"md-create"
,
type
:
"icon"
,
title
:
"編輯工序"
,
oprate
:
"edit"
,
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
),
},
}),
h
(
"op"
,
{
attrs
:
{
icon
:
"ios-trash"
,
type
:
"icon"
,
title
:
"删除工序"
,
oprate
:
"delete"
,
msg
:
"确认要刪除工序吗?"
,
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
,
params
.
index
),
},
}),
]
);
},
},
],
data1
:
[],
insertTItle
:
"插单"
,
selectRoutingDetail
:
{},
//需那种工序
//设置参数开始
setParams
:
{
opTaskPk
:
0
,
//工单ID
partTaskPk
:
0
,
//生产计划ID
taskSeq
:
""
,
//工序编号
count
:
0
,
//生产计划数量
},
//设置参数结束
rowData
:
{},
//编辑时传入行数据
};
},
mounted
()
{
this
.
loadData
(
this
.
rowId
);
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
//根据点击副组件传过来id进行加载数据
loadData
(
expendId
)
{
let
params
=
{
id
:
expendId
,
};
Api
.
getbyorderid
(
params
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
gridHeight
=
50
;
this
.
gridHeight
=
(
res
.
result
.
length
+
1
)
*
47
;
this
.
data1
=
res
.
result
;
}
});
},
data
()
{
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
"task_seq"
,
value
:
null
}
},
setParsModal
:
false
,
editModal
:
false
,
detailModal
:
false
,
rowIndex
:
null
,
curId
:
0
,
gridHeight
:
150
,
size
:
"small"
,
columns
:
[{
title
:
" "
,
width
:
130
},
{
key
:
"task_seq"
,
title
:
this
.
l
(
"task_seq"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"op_task_pk"
,
title
:
this
.
l
(
"op_task_pk"
),
align
:
"left"
,
high
:
true
,
hide
:
true
},
{
key
:
"task_name"
,
title
:
this
.
l
(
"task_name"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
},
{
key
:
"taskseq_des"
,
title
:
this
.
l
(
"task_name"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"part_task_pk"
,
title
:
this
.
l
(
"part_task_pk"
),
align
:
"left"
,
high
:
true
,
hide
:
true
},
{
key
:
"put_into_qty"
,
title
:
this
.
l
(
"put_into_qty"
),
align
:
"left"
,
high
:
true
,
hide
:
true
},
{
key
:
"plan_start"
,
title
:
this
.
l
(
"plan_start"
),
align
:
"center"
,
high
:
true
,
width
:
140
,
hide
:
true
},
{
key
:
"plan_finish"
,
title
:
this
.
l
(
"plan_finish"
),
align
:
"center"
,
high
:
true
,
width
:
140
,
hide
:
true
},
{
key
:
"equip_type"
,
title
:
this
.
l
(
"equip_type"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"firsT_EQUIP_CODE"
,
title
:
this
.
l
(
"first_equip"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"setup_time"
,
title
:
this
.
l
(
"setup_time"
),
align
:
"right"
,
high
:
true
,
type
:
"outputTime"
},
{
key
:
"run_time"
,
title
:
this
.
l
(
"run_time"
),
align
:
"right"
,
high
:
true
,
type
:
"outputTime"
},
{
key
:
"outside_time"
,
title
:
this
.
l
(
"outside_time"
),
align
:
"right"
,
high
:
true
,
type
:
"outputTime"
},
{
key
:
"transport_time"
,
title
:
this
.
l
(
"transport_time"
),
align
:
"right"
,
high
:
true
,
hide
:
true
,
type
:
"outputTime"
},
{
key
:
"check_time"
,
title
:
this
.
l
(
"check_time"
),
align
:
"right"
,
high
:
true
,
hide
:
true
,
type
:
"outputTime"
},
{
key
:
"efficiency_value"
,
title
:
this
.
l
(
"efficiency_value"
),
align
:
"right"
,
high
:
true
},
{
key
:
"machine_rule"
,
title
:
this
.
l
(
"machine_rule"
),
align
:
"center"
,
easy
:
true
,
high
:
true
,
width
:
140
},
{
key
:
"singleout"
,
title
:
this
.
l
(
"singleout"
),
align
:
"left"
,
high
:
true
,
hide
:
true
},
{
key
:
"equip_type"
,
title
:
this
.
l
(
"equip_type"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
},
{
key
:
"first_equip"
,
title
:
this
.
l
(
"first_equip"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
},
{
key
:
"cal_id"
,
title
:
this
.
l
(
"cal_id"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"plan_method"
,
title
:
this
.
l
(
"plan_method"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"over_time"
,
title
:
this
.
l
(
"over_time"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"isdiscrete"
,
title
:
this
.
l
(
"isdiscrete"
),
align
:
"center"
,
easy
:
true
,
high
:
true
},
{
key
:
"discrete_value"
,
title
:
this
.
l
(
"discrete_value"
),
align
:
"right"
,
high
:
true
},
{
key
:
"multi_machine"
,
title
:
this
.
l
(
"multi_machine"
),
align
:
"center"
,
easy
:
true
,
high
:
true
},
{
key
:
"notes"
,
title
:
this
.
l
(
"notes"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
},
{
key
:
"workshopcode"
,
title
:
this
.
l
(
"workshopcode"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
},
{
key
:
"routing_detail_id"
,
title
:
this
.
l
(
"routing_detail_id"
),
align
:
"left"
,
high
:
true
,
hide
:
true
},
{
key
:
"routing_header_id"
,
title
:
this
.
l
(
"routing_header_id"
),
align
:
"left"
,
high
:
true
,
hide
:
true
},
{
key
:
"comb_param"
,
title
:
this
.
l
(
"comb_param"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
},
{
key
:
"rule_qty"
,
title
:
this
.
l
(
"rule_qty"
),
align
:
"left"
,
high
:
true
,
hide
:
true
},
{
title
:
"操作"
,
key
:
"action"
,
width
:
140
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
icon
:
"md-create"
,
type
:
"icon"
,
title
:
"編輯工序"
,
oprate
:
"edit"
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
)
}
}),
h
(
"op"
,
{
attrs
:
{
icon
:
"ios-trash"
,
type
:
"icon"
,
title
:
"删除工序"
,
oprate
:
"delete"
,
msg
:
"确认要刪除工序吗?"
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
,
params
.
index
)
}
})
]);
}
}
],
data1
:
[],
insertTItle
:
"插单"
,
selectRoutingDetail
:
{},
//需那种工序
//设置参数开始
setParams
:
{
opTaskPk
:
0
,
//工单ID
partTaskPk
:
0
,
//生产计划ID
taskSeq
:
""
,
//工序编号
count
:
0
//生产计划数量
},
//设置参数结束
rowData
:
{}
//编辑时传入行数据
};
},
mounted
()
{
this
.
loadData
(
this
.
rowId
);
//编辑工序start----
edit
(
row
)
{
this
.
editModal
=
true
;
this
.
rowData
=
row
;
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
//根据点击副组件传过来id进行加载数据
loadData
(
expendId
)
{
let
params
=
{
id
:
expendId
};
Api
.
getbyorderid
(
params
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
gridHeight
=
50
;
this
.
gridHeight
=
(
res
.
result
.
length
+
1
)
*
47
;
this
.
data1
=
res
.
result
;
}
});
},
//编辑工序end----
//编辑工序start----
edit
(
row
)
{
this
.
editModal
=
true
;
this
.
rowData
=
row
;
},
//编辑工序end----
//删除工序事件start-----
remove
(
row
,
index
)
{
//this.curId = Number(id);
this
.
rowIndex
=
index
;
this
.
selectRoutingDetail
=
row
;
let
params
=
{
partPk
:
this
.
selectRoutingDetail
.
part_task_pk
,
detailIdstr
:
this
.
selectRoutingDetail
.
routing_detail_id
};
Api
.
removeoptasksimluate
(
params
).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"删除成功"
);
this
.
data1
.
splice
(
this
.
rowIndex
,
1
);
}
});
},
addOk
()
{
this
.
data1
=
[];
this
.
loadData
(
this
.
rowId
);
this
.
setParsModal
=
false
;
this
.
editModal
=
false
;
},
//删除工序时间end-----
cancel
()
{
this
.
curId
=
0
;
this
.
setParsModal
=
false
;
this
.
detailModal
=
false
;
this
.
editModal
=
false
;
this
.
deletedlModal
=
false
;
},
l
(
key
)
{
let
vkey
=
"mes_op_task_plan_simulate"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
//删除工序事件start-----
remove
(
row
,
index
)
{
//this.curId = Number(id);
this
.
rowIndex
=
index
;
this
.
selectRoutingDetail
=
row
;
let
params
=
{
partPk
:
this
.
selectRoutingDetail
.
part_task_pk
,
detailIdstr
:
this
.
selectRoutingDetail
.
routing_detail_id
,
};
Api
.
removeoptasksimluate
(
params
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"删除成功"
);
this
.
data1
.
splice
(
this
.
rowIndex
,
1
);
}
}
});
},
addOk
()
{
this
.
data1
=
[];
this
.
loadData
(
this
.
rowId
);
this
.
setParsModal
=
false
;
this
.
editModal
=
false
;
},
//删除工序时间end-----
cancel
()
{
this
.
curId
=
0
;
this
.
setParsModal
=
false
;
this
.
detailModal
=
false
;
this
.
editModal
=
false
;
this
.
deletedlModal
=
false
;
},
l
(
key
)
{
let
vkey
=
"mes_op_task_plan_simulate"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
},
};
</
script
>
<
style
lang=
"less"
>
.excute table tr th span,
.excute table tr td {
font-size: 10px;
font-size: 10px;
}
</
style
>
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