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
7cffe0ab
Commit
7cffe0ab
authored
Jul 23, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
智能排产page
parent
d31142c9
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
23 additions
and
317 deletions
+23
-317
addTemp.vue
pages/aps/ai/addTemp.vue
+1
-1
edit.vue
pages/aps/ai/components/edit.vue
+1
-1
excute.vue
pages/aps/ai/components/excute.vue
+1
-130
duration.vue
pages/aps/ai/duration.vue
+1
-1
editDuration.vue
pages/aps/ai/editDuration.vue
+1
-1
index.vue
pages/aps/ai/index.vue
+9
-178
options.vue
pages/aps/ai/options.vue
+1
-1
temp.vue
pages/aps/ai/temp.vue
+1
-1
api.js
pages/aps/plan/api.js
+4
-1
index.vue
pages/aps/plan/index.vue
+3
-2
No files found.
pages/aps/ai/addTemp.vue
View file @
7cffe0ab
...
...
@@ -54,7 +54,7 @@
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
import
Api
from
".
./aps
/api"
;
export
default
{
data
()
{
return
{
...
...
pages/aps/ai/components/edit.vue
View file @
7cffe0ab
...
...
@@ -31,7 +31,7 @@
</Form>
</
template
>
<
script
>
import
Api
from
"../api"
;
import
Api
from
"../
../aps/
api"
;
export
default
{
name
:
"Edit"
,
data
()
{
...
...
pages/aps/ai/components/excute.vue
View file @
7cffe0ab
...
...
@@ -16,24 +16,10 @@
<Modal
v-model=
"editModal"
title=
"编辑"
footer-hide
width=
"800"
>
<Edit
:row=
"rowData"
@
on-close=
"cancel"
@
on-option-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"insertlModal"
:title=
"insertTItle"
@
on-ok=
"insertOk"
@
on-cancel=
"cancel"
>
<p>
确定进行
{{
insertTItle
}}
操作?
</p>
</Modal>
<Modal
v-model=
"setParsModal"
title=
"工序参数设置"
footer-hide
width=
"1000"
>
<Add
@
on-parameter-ok=
"addOk"
@
on-close=
"cancel"
:opTaskPk=
"setParams.opTaskPk"
:partTaskPk=
"setParams.partTaskPk"
:taskSeq=
"setParams.taskSeq"
:count=
"setParams.count"
:row=
"rowData"
/>
</Modal>
</div>
</
template
>
<
script
>
import
Api
from
"../api"
;
import
Api
from
"../
../aps/
api"
;
import
Edit
from
"./edit"
;
import
Add
from
"../options"
;
export
default
{
...
...
@@ -57,49 +43,12 @@ export default {
setParsModal
:
false
,
editModal
:
false
,
detailModal
:
false
,
insertlModal
:
false
,
rowIndex
:
null
,
curId
:
0
,
gridHeight
:
150
,
size
:
"small"
,
columns
:
[
{
title
:
" "
,
width
:
130
},
{
key
:
"insert_flag"
,
title
:
this
.
l
(
"insert_flag"
),
align
:
"center"
,
high
:
true
,
width
:
60
,
render
:
(
h
,
params
)
=>
{
return
h
(
"Tooltip"
,
{
props
:
{
content
:
params
.
row
.
insert_flag
==
1
?
"取消插单"
:
"进行插单"
,
placement
:
"top"
},
class
:
"ico"
},
[
h
(
"Icon"
,
{
attrs
:
{
type
:
params
.
row
.
insert_flag
==
1
?
"ios-flag"
:
"ios-flag-outline"
,
size
:
20
,
color
:
params
.
row
.
insert_flag
==
1
?
"#2680EB"
:
"#aaa"
},
on
:
{
click
:
()
=>
this
.
changeFlag
(
params
.
row
.
op_task_pk
,
params
.
index
)
}
})
]
);
}
},
{
key
:
"task_seq"
,
title
:
this
.
l
(
"task_seq"
),
...
...
@@ -334,15 +283,6 @@ export default {
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
icon
:
"md-options"
,
type
:
"icon"
,
oprate
:
"detail"
,
title
:
"工序参数设置"
},
on
:
{
click
:
()
=>
this
.
openParms
(
params
.
row
)
}
}),
h
(
"op"
,
{
attrs
:
{
icon
:
"md-create"
,
...
...
@@ -401,74 +341,6 @@ export default {
});
},
//插单事件start----
changeFlag
(
id
,
index
)
{
this
.
rowIndex
=
index
;
if
(
this
.
data1
[
this
.
rowIndex
].
insert_flag
==
1
)
{
this
.
insertTItle
=
"取消插单"
;
}
else
{
this
.
insertTItle
=
"插单"
;
}
this
.
insertlModal
=
true
;
},
insertOk
()
{
//this.loadData(this.row)
if
(
this
.
data1
[
this
.
rowIndex
].
insert_flag
==
1
)
{
//根据插单数据状态进行插单或取消插单操作
let
params1
=
{
partTaskPks
:
[],
opTaskPks
:
[
this
.
data1
[
this
.
rowIndex
].
op_task_pk
]
};
Api
.
cancelinsertorder
(
params1
)
.
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"取消插单成功!"
);
this
.
data1
[
this
.
rowIndex
].
insert_flag
=
0
;
}
else
{
this
.
$Message
.
error
(
"取消插单失败!"
);
}
})
.
catch
(
err
=>
{
this
.
$Message
.
error
(
"数据异常!"
);
});
}
else
{
let
params
=
{
partTaskPks
:
[],
opTaskPks
:
[
this
.
data1
[
this
.
rowIndex
].
op_task_pk
]
};
Api
.
saveinsertorder
(
params
)
.
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"插单成功!"
);
this
.
data1
[
this
.
rowIndex
].
insert_flag
=
1
;
}
else
{
this
.
$Message
.
error
(
"插单失败!"
);
}
})
.
catch
(
err
=>
{
this
.
$Message
.
error
(
"数据异常!"
);
});
}
this
.
setParsModal
=
false
;
this
.
detailModal
=
false
;
this
.
editModal
=
false
;
this
.
insertlModal
=
false
;
},
//插单事件end----
//单个工序进行参设置start----
openParms
(
row
)
{
this
.
setParams
=
{
opTaskPk
:
row
.
op_task_pk
,
partTaskPk
:
row
.
part_task_pk
,
taskSeq
:
row
.
task_seq
,
count
:
row
.
put_into_qty
};
this
.
rowData
=
row
;
this
.
setParsModal
=
true
;
},
//单个工序进行参数设置end----
//编辑工序start----
edit
(
row
)
{
this
.
editModal
=
true
;
...
...
@@ -505,7 +377,6 @@ export default {
this
.
detailModal
=
false
;
this
.
editModal
=
false
;
this
.
deletedlModal
=
false
;
this
.
insertlModal
=
false
;
},
l
(
key
)
{
let
vkey
=
"mes_op_task_plan_simulate"
+
"."
+
key
;
...
...
pages/aps/ai/duration.vue
View file @
7cffe0ab
...
...
@@ -28,7 +28,7 @@
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
import
Api
from
".
./aps
/api"
;
import
EditDuration
from
"./editDuration"
;
export
default
{
components
:
{
...
...
pages/aps/ai/editDuration.vue
View file @
7cffe0ab
...
...
@@ -28,7 +28,7 @@
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
import
Api
from
".
./aps
/api"
;
export
default
{
data
()
{
return
{
...
...
pages/aps/ai/index.vue
View file @
7cffe0ab
...
...
@@ -11,19 +11,8 @@
@
on-selection-change=
"onSelect"
:batch=
"true"
:border=
"true"
:easy=
"
tru
e"
:easy=
"
fals
e"
>
<template
slot=
"easySearch"
>
<div>
<a
style=
"font-weight: bold;"
@
click=
"openaddModalTemp"
>
<Icon
type=
"md-color-palette"
size=
"14"
/>
自定义排序模板
</a>
<a
style=
"font-weight: bold;"
@
click=
"openDuration"
>
<Icon
type=
"md-create"
size=
"14"
/>
修改外协工期
</a>
<Select
placeholder=
"选择历史方案"
style=
"width: 150px;"
></Select>
</div>
</
template
>
<template
slot=
"searchBack"
></
template
>
<
template
slot=
"searchForm"
>
<Search
/>
...
...
@@ -36,40 +25,16 @@
v-model=
"entity.setTime"
@
on-change=
"getTime"
></DatePicker>
<a
style=
"font-weight: bold;"
@
click=
"openAddModel(1)"
>
<Icon
type=
"ios-options"
size=
"14"
/>
工序参数调整
</a>
<Button
type=
"primary"
@
click=
"goResults"
style=
"background:#515A6E;border:solid 1px #515A6E"
>
历史方案
</Button>
<Button
type=
"primary"
@
click=
"openApsModal"
>
智能排产
</Button>
</
template
>
<
template
slot=
"batch"
>
<Button
type=
"primary"
class=
"mr10 ml10"
@
click=
"removeOk"
>
移出排产
</Button>
</
template
>
</DataGrid>
<Modal
v-model=
"modalDuration"
title=
"外协任务"
footer-hide
width=
"1000"
>
<Duration
ref=
"durationRef"
></Duration>
</Modal>
<Modal
v-model=
"addModal"
title=
"工序参数设置"
footer-hide
width=
"1000"
>
<Add
@
on-close=
"cancel"
@
on-parameter-ok=
"addOk"
:opTaskPk=
"setParams.opTaskPk"
:partTaskPk=
"setParams.partTaskPk"
:taskSeq=
"setParams.taskSeq"
:count=
"setParams.count"
/>
</Modal>
<Modal
v-model=
"apsModal"
title=
"确定智能排产"
@
on-ok=
"apsOk"
@
on-cancel=
"cancel"
>
<p>
确定进行智能排产?
</p>
</Modal>
<!-- <Modal v-model="resultModal" title="数据检查" width="1500" @on-ok="checkOk" @on-cancel="cancel">
<CheckResult :data="result"></CheckResult>
</Modal> -->
<Modal
v-model=
"resultModal"
title=
"数据检查"
width=
"1500"
@
on-ok=
"cancel"
@
on-cancel=
"cancel"
>
<CheckResult
:data=
"result"
></CheckResult>
</Modal>
...
...
@@ -87,13 +52,11 @@
</Col>
</Row>
</Modal>
<Modal
v-model=
"insertlModal1"
:title=
"insertTItle1"
@
on-ok=
"insertOk1"
@
on-cancel=
"cancel"
>
<p>
确定进行 {{ insertTItle1 }} 操作?
</p>
</Modal>
</div>
</template>
<
script
>
import
Api
from
"./api"
;
import
Api
from
".
./aps
/api"
;
import
Add
from
"./options"
;
import
Temp
from
"./temp"
;
import
Duration
from
"./duration"
;
...
...
@@ -122,13 +85,10 @@ export default {
entity
:
{
setTime
:
""
},
addModal
:
false
,
editModal
:
false
,
detailModal
:
false
,
deletelModal
:
false
,
apsModal
:
false
,
modalDuration
:
false
,
insertlModal1
:
false
,
apsCheckModal
:
false
,
tempParams
:
null
,
insertTItle1
:
"插单"
,
...
...
@@ -177,42 +137,6 @@ export default {
sortable
:
true
,
width
:
50
},
{
key
:
"insert_flag"
,
title
:
this
.
l
(
"insert_flag"
),
align
:
"center"
,
width
:
70
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"Tooltip"
,
{
props
:
{
content
:
params
.
row
.
insert_flag
==
1
?
"取消插单"
:
"进行插单"
,
placement
:
"top"
},
class
:
"ico"
},
[
h
(
"Icon"
,
{
attrs
:
{
type
:
params
.
row
.
insert_flag
==
1
?
"ios-water"
:
"ios-water-outline"
,
size
:
20
,
color
:
params
.
row
.
insert_flag
==
1
?
"#2680EB"
:
"#aaa"
},
on
:
{
click
:
()
=>
this
.
changeFlag1
(
params
.
row
.
part_task_pk
,
params
.
index
)
}
})
]
);
}
},
{
key
:
"mesCode"
,
title
:
this
.
l
(
"mes_code"
),
...
...
@@ -336,15 +260,6 @@ export default {
// fixed:"right",
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
icon
:
"md-options"
,
type
:
"icon"
,
title
:
"工序参数设置"
,
oprate
:
"edit"
},
on
:
{
click
:
()
=>
this
.
openAddModel
(
2
,
params
.
row
)
}
}),
h
(
"op"
,
{
attrs
:
{
icon
:
"md-refresh"
,
...
...
@@ -398,14 +313,7 @@ export default {
});
},
addOk
()
{
this
.
list
=
[];
this
.
loadList
();
this
.
addModal
=
false
;
this
.
detailModal
=
false
;
this
.
editModal
=
false
;
this
.
curId
=
0
;
},
detail
(
id
)
{
this
.
detailModal
=
true
;
this
.
curId
=
id
;
...
...
@@ -496,7 +404,6 @@ export default {
},
cancel
()
{
this
.
curId
=
0
;
this
.
addModal
=
false
;
this
.
detailModal
=
false
;
this
.
editModal
=
false
;
this
.
deletedlModal
=
false
;
...
...
@@ -511,9 +418,7 @@ export default {
this
.
list
.
splice
(
a
,
1
);
this
.
list
.
splice
(
b
,
0
,
tempArray
);
},
openParms
(
id
)
{
this
.
addModal
=
true
;
},
getUserDepart
()
{
alert
(
"5656565"
);
// Api.getUserDepart().then(res=>{
...
...
@@ -536,13 +441,7 @@ export default {
this
.
$Message
.
error
(
"请设置基准日期"
);
}
},
//查看历史方案
goResults
()
{
this
.
$router
.
push
({
path
:
"/ai/results"
// params: { customerId: id }
});
},
//确定智能排产
apsOk
()
{
this
.
circleModal
=
true
;
...
...
@@ -629,77 +528,9 @@ export default {
}.
bind
(
this
)
);
},
//打开设置参数
openAddModel
(
type
,
row
)
{
if
(
type
==
2
)
{
this
.
setParams
=
{
opTaskPk
:
0
,
partTaskPk
:
row
.
part_task_pk
,
taskSeq
:
""
,
count
:
row
.
plan_qty
};
}
else
{
this
.
setParams
=
{
opTaskPk
:
0
,
partTaskPk
:
0
,
taskSeq
:
""
,
count
:
0
};
}
this
.
addModal
=
true
;
},
//插单start
//插单事件start----
changeFlag1
(
id
,
index
)
{
this
.
rowIndex1
=
index
;
if
(
this
.
list
[
this
.
rowIndex1
].
insert_flag
==
1
)
{
this
.
insertTItle1
=
"取消插单"
;
}
else
{
this
.
insertTItle1
=
"插单"
;
}
this
.
insertlModal1
=
true
;
},
insertOk1
()
{
if
(
this
.
list
[
this
.
rowIndex1
].
insert_flag
==
1
)
{
//根据插单数据状态进行插单或取消插单操作
let
params1
=
{
partTaskPks
:
[
this
.
list
[
this
.
rowIndex1
].
part_task_pk
],
opTaskPks
:
[]
};
Api
.
cancelinsertorder
(
params1
)
.
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"取消插单成功!"
);
this
.
list
[
this
.
rowIndex1
].
insert_flag
=
0
;
}
else
{
this
.
$Message
.
error
(
"取消插单失败!"
);
}
})
.
catch
(
err
=>
{
this
.
$Message
.
error
(
"数据异常!"
);
});
}
else
{
let
params
=
{
partTaskPks
:
[
this
.
list
[
this
.
rowIndex1
].
part_task_pk
],
opTaskPks
:
[]
};
Api
.
saveinsertorder
(
params
)
.
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"插单成功!"
);
this
.
list
[
this
.
rowIndex1
].
insert_flag
=
1
;
}
else
{
this
.
$Message
.
error
(
"插单失败!"
);
}
})
.
catch
(
err
=>
{
this
.
$Message
.
error
(
"数据异常!"
);
});
}
this
.
insertlModal1
=
false
;
}
//插单end
}
};
</
script
>
...
...
pages/aps/ai/options.vue
View file @
7cffe0ab
...
...
@@ -145,7 +145,7 @@
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
import
Api
from
".
./aps
/api"
;
export
default
{
data
()
{
return
{
...
...
pages/aps/ai/temp.vue
View file @
7cffe0ab
...
...
@@ -40,7 +40,7 @@
</div>
</template>
<
script
>
import
Api
from
"./api"
;
import
Api
from
".
./aps
/api"
;
export
default
{
data
()
{
return
{
...
...
pages/aps/plan/api.js
View file @
7cffe0ab
...
...
@@ -25,7 +25,7 @@ export default {
routingdistribute
(
params
)
{
//工艺派发
return
Api
.
post
(
`
${
PlanUrl
}
/messchedule/routingdistribute`
,
params
);
},
moveintoaps
()
{
//跳转进入排产池前判断
moveintoaps
()
{
//跳转进入
aps
排产池前判断
return
Api
.
post
(
`
${
PlanUrl
}
/messchedule/moveintoaps`
);
},
getpoolordercount
(){
//各排产池订单数量
...
...
@@ -34,4 +34,7 @@ export default {
listbyuser
(
params
)
{
//获取当前登录用户可操作的排产
return
Api
.
post
(
`
${
authUrl
}
/api/services/app/setschedulecompany/listbyuser`
,
params
);
},
moveintoai
(){
////跳转进入智能排产池前判断
return
Api
.
post
(
`
${
PlanUrl
}
/messchedule/moveintoai`
);
}
}
\ No newline at end of file
pages/aps/plan/index.vue
View file @
7cffe0ab
...
...
@@ -555,10 +555,11 @@ export default {
}
});
},
//跳转到智能排产池(有判断)
goAi
()
{
Api
.
moveintoa
ps
().
then
(
res
=>
{
Api
.
moveintoa
i
().
then
(
res
=>
{
if
(
res
.
success
)
{
if
(
res
.
result
.
res
)
{
if
(
!
res
.
result
.
res
)
{
this
.
$router
.
push
({
name
:
"aps-ai"
// params: { customerId: id }
...
...
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