Commit 26ffb489 authored by renjintao's avatar renjintao

aps

parent db3f1e42
......@@ -897,7 +897,7 @@ export default {
part_task_pk: '计划编号',
priority: '优先级',
plan_qty: '排产数量',
spare_qty: '',
spare_qty: '备件数量',
plan_start: '计划排产开始',
plan_finish: '计划排产结束',
notes: '备注',
......
......@@ -31,7 +31,7 @@
<Search />
</template>
<template slot="buttons">
<Button type="primary" @click="apsModal=true">APS排产</Button>
<Button type="primary" @click="openApsModal">APS排产</Button>
</template>
<template slot="batch">
<Button type="primary" class="mr10 ml10" @click="removeOk">移出排产</Button>
......@@ -155,6 +155,7 @@ export default {
title: this.l("plan_start"),
align: "center",
high: true,
hide: true,
resizable: true,
width: 140
},
......@@ -163,6 +164,7 @@ export default {
title: this.l("plan_finish"),
align: "center",
high: true,
hide: true,
sortable: true,
resizable: true,
width: 140
......@@ -179,9 +181,8 @@ export default {
key: "demand_start",
title: this.l("demand_start"),
align: "center",
hide: true,
resizable: true,
width: 100
width: 140
},
{
key: "demand_finish",
......@@ -195,7 +196,8 @@ export default {
key: "badjustflag",
title: this.l("badjustflag"),
align: "left",
high: true
high: true,
hide:true,
},
{
title: "操作",
......@@ -345,7 +347,14 @@ export default {
getTime(value) {
this.entity.getTime = value;
},
//a确定aps排产
openApsModal() {
if (this.entity.setTime != "") {
this.apsModal = true;
} else {
this.$Message.error("请设置基准日期");
}
},
//确定aps排产
apsOk() {
//APS排产前订单优先级功能
let parmsOrderpriority = { alls: [] };
......@@ -361,19 +370,27 @@ export default {
Api.orderpriority(parmsOrderpriority).then(res => {
if (res.success) {
if (res.result) {
this.$Message.success("排序成功");
//this.$Message.success("排序成功");
//apsp排产前检查
Api.apsdatachecked().then(res1 => {
if (res1.success) {
if (res1.result.res) {
this.$Message.success("数据校验成功");
// this.$Message.success("数据校验成功");
//排产计算
let paramsTime = {
setTime: this.entity.setTime
};
Api.apsprepareandcalc(paramsTime).then(res2 => {
if (res2.success) {
if (res2.result.res) {
this.$Message.success("排产计算成功");
this.$router.push({
name: "aps-results"
// params: { customerId: id }
});
} else {
this.$Message.error(res2.result.msg);
}
} else {
this.$Message.error("操作失败:排产计算");
}
......@@ -392,7 +409,6 @@ export default {
this.$Message.error("操作失败:排序");
}
});
//APS排产前数据合法性校验
}
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment