Commit 5bb5604b authored by 任金涛 's avatar 任金涛

excute

parent cd9bd065
<template> <template>
<div style="padding:0"> <div style="padding: 0;">
<DataGrid <DataGrid
style="margin-top:-25px;margin-bottom:-25px" style="margin-top: -25px; margin-bottom: -25px;"
:columns="columns" :columns="columns"
ref="grid" ref="grid"
:easy="false" :easy="false"
...@@ -12,12 +12,23 @@ ...@@ -12,12 +12,23 @@
:page="false" :page="false"
:height="gridHeight" :height="gridHeight"
></DataGrid> ></DataGrid>
<Modal v-model="editModal" title="编辑" footer-hide width="800"> <Modal v-model="editModal" title="编辑" footer-hide width="800">
<Edit :eid="curId" @on-close="cancel" /> <Edit
:eid="curId"
:opTaskPk="setParams.opTaskPk"
:partTaskPk="setParams.partTaskPk"
:taskSeq="setParams.taskSeq"
:count="setParams.count"
@on-close="cancel"
/>
</Modal> </Modal>
<Modal v-model="insertlModal" title="插单" @on-ok="insertOk" @on-cancel="cancel"> <Modal
<p>确定进行 {{insertTItle}} 操作?</p> v-model="insertlModal"
title="插单"
@on-ok="insertOk"
@on-cancel="cancel"
>
<p>确定进行 {{ insertTItle }} 操作?</p>
</Modal> </Modal>
<Modal v-model="setParsModal" title="工序参数设置" footer-hide width="1000"> <Modal v-model="setParsModal" title="工序参数设置" footer-hide width="1000">
<Add :eid="curId" @on-close="cancel" /> <Add :eid="curId" @on-close="cancel" />
...@@ -32,10 +43,10 @@ export default { ...@@ -32,10 +43,10 @@ export default {
name: "list", name: "list",
components: { components: {
Edit, Edit,
Add Add,
}, },
props: { props: {
rowId: { type: Number } rowId: { type: Number },
}, },
data() { data() {
return { return {
...@@ -43,8 +54,8 @@ export default { ...@@ -43,8 +54,8 @@ export default {
easySearch: { easySearch: {
keys: { keys: {
op: "task_seq", op: "task_seq",
value: null value: null,
} },
}, },
setParsModal: false, setParsModal: false,
editModal: false, editModal: false,
...@@ -57,7 +68,7 @@ export default { ...@@ -57,7 +68,7 @@ export default {
{ key: "id", title: this.l("id"), hide: true, align: "left" }, { key: "id", title: this.l("id"), hide: true, align: "left" },
{ title: " ", width: 130 }, { title: " ", width: 130 },
{ {
key: "important_flag",//insert_flag? key: "important_flag", //insert_flag?
title: this.l("important_flag"), title: this.l("important_flag"),
align: "center", align: "center",
high: true, high: true,
...@@ -69,9 +80,9 @@ export default { ...@@ -69,9 +80,9 @@ export default {
props: { props: {
content: content:
params.row.important_flag == 1 ? "取消插单" : "进行插单", params.row.important_flag == 1 ? "取消插单" : "进行插单",
placement: "top" placement: "top",
}, },
class: "ico" class: "ico",
}, },
[ [
h("Icon", { h("Icon", {
...@@ -81,43 +92,43 @@ export default { ...@@ -81,43 +92,43 @@ export default {
? "ios-flag" ? "ios-flag"
: "ios-flag-outline", : "ios-flag-outline",
size: 20, size: 20,
color: params.row.important_flag == 1 ? "#2680EB" : "#aaa" color: params.row.important_flag == 1 ? "#2680EB" : "#aaa",
}, },
on: { on: {
click: () => this.changeFlag(params.row.id, params.index) click: () => this.changeFlag(params.row.id, params.index),
} },
}) }),
] ]
); );
} },
}, },
{ {
key: "task_seq", key: "task_seq",
title: this.l("task_seq"), title: this.l("task_seq"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
}, },
{ {
key: "op_task_pk", key: "op_task_pk",
title: this.l("op_task_pk"), title: this.l("op_task_pk"),
align: "left", align: "left",
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "task_name", key: "task_name",
title: this.l("task_name"), title: this.l("task_name"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
}, },
{ {
key: "part_task_pk", key: "part_task_pk",
title: this.l("part_task_pk"), title: this.l("part_task_pk"),
align: "left", align: "left",
high: true, high: true,
hide: true hide: true,
}, },
{ {
...@@ -125,7 +136,7 @@ export default { ...@@ -125,7 +136,7 @@ export default {
title: this.l("put_into_qty"), title: this.l("put_into_qty"),
align: "left", align: "left",
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "plan_start", key: "plan_start",
...@@ -133,7 +144,7 @@ export default { ...@@ -133,7 +144,7 @@ export default {
align: "center", align: "center",
high: true, high: true,
width: 140, width: 140,
hide: true hide: true,
}, },
{ {
key: "plan_finish", key: "plan_finish",
...@@ -141,26 +152,26 @@ export default { ...@@ -141,26 +152,26 @@ export default {
align: "center", align: "center",
high: true, high: true,
width: 140, width: 140,
hide: true hide: true,
}, },
{ {
key:"first_equip", key: "first_equip",
title:this.l("first_equip"), title: this.l("first_equip"),
align:"left", align: "left",
easy:true, easy: true,
high:true, high: true,
}, },
{ {
key: "setup_time", key: "setup_time",
title: this.l("setup_time"), title: this.l("setup_time"),
align: "right", align: "right",
high: true high: true,
}, },
{ {
key: "run_time", key: "run_time",
title: this.l("run_time"), title: this.l("run_time"),
align: "right", align: "right",
high: true high: true,
}, },
{ {
key: "outside_time", key: "outside_time",
...@@ -173,20 +184,20 @@ export default { ...@@ -173,20 +184,20 @@ export default {
title: this.l("transport_time"), title: this.l("transport_time"),
align: "right", align: "right",
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "check_time", key: "check_time",
title: this.l("check_time"), title: this.l("check_time"),
align: "right", align: "right",
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "efficiency_value", key: "efficiency_value",
title: this.l("efficiency_value"), title: this.l("efficiency_value"),
align: "right", align: "right",
high: true high: true,
}, },
{ {
key: "machine_rule", key: "machine_rule",
...@@ -194,14 +205,14 @@ export default { ...@@ -194,14 +205,14 @@ export default {
align: "center", align: "center",
easy: true, easy: true,
high: true, high: true,
width: 140 width: 140,
}, },
{ {
key: "singleout", key: "singleout",
title: this.l("singleout"), title: this.l("singleout"),
align: "left", align: "left",
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "equip_type", key: "equip_type",
...@@ -209,7 +220,7 @@ export default { ...@@ -209,7 +220,7 @@ export default {
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "first_equip", key: "first_equip",
...@@ -217,48 +228,48 @@ export default { ...@@ -217,48 +228,48 @@ export default {
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "cal_id", key: "cal_id",
title: this.l("cal_id"), title: this.l("cal_id"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
}, },
{ {
key: "plan_method", key: "plan_method",
title: this.l("plan_method"), title: this.l("plan_method"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
}, },
{ {
key: "over_time", key: "over_time",
title: this.l("over_time"), title: this.l("over_time"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
}, },
{ {
key: "isdiscrete", key: "isdiscrete",
title: this.l("isdiscrete"), title: this.l("isdiscrete"),
align: "center", align: "center",
easy: true, easy: true,
high: true high: true,
}, },
{ {
key: "discrete_value", key: "discrete_value",
title: this.l("discrete_value"), title: this.l("discrete_value"),
align: "right", align: "right",
high: true high: true,
}, },
{ {
key: "multi_machine", key: "multi_machine",
title: this.l("multi_machine"), title: this.l("multi_machine"),
align: "center", align: "center",
easy: true, easy: true,
high: true high: true,
}, },
{ {
key: "notes", key: "notes",
...@@ -266,7 +277,7 @@ export default { ...@@ -266,7 +277,7 @@ export default {
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true,
}, },
{ {
...@@ -275,7 +286,7 @@ export default { ...@@ -275,7 +286,7 @@ export default {
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "workshopcode", key: "workshopcode",
...@@ -283,21 +294,21 @@ export default { ...@@ -283,21 +294,21 @@ export default {
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "routing_detail_id", key: "routing_detail_id",
title: this.l("routing_detail_id"), title: this.l("routing_detail_id"),
align: "left", align: "left",
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "routing_header_id", key: "routing_header_id",
title: this.l("routing_header_id"), title: this.l("routing_header_id"),
align: "left", align: "left",
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "comb_param", key: "comb_param",
...@@ -305,14 +316,14 @@ export default { ...@@ -305,14 +316,14 @@ export default {
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "rule_qty", key: "rule_qty",
title: this.l("rule_qty"), title: this.l("rule_qty"),
align: "left", align: "left",
high: true, high: true,
hide: true hide: true,
}, },
{ {
title: "操作", title: "操作",
...@@ -326,9 +337,9 @@ export default { ...@@ -326,9 +337,9 @@ export default {
icon: "md-options", icon: "md-options",
type: "icon", type: "icon",
oprate: "detail", oprate: "detail",
title: "工序参数设置" title: "工序参数设置",
}, },
on: { click: () => this.openParms(params.row.id) } on: { click: () => this.openParms(params.row) },
}), }),
h("op", { h("op", {
attrs: { attrs: {
...@@ -336,9 +347,9 @@ export default { ...@@ -336,9 +347,9 @@ export default {
type: "icon", type: "icon",
title: "編輯工序", title: "編輯工序",
oprate: "edit", oprate: "edit",
msg: "确认要移出排产吗?" msg: "确认要移出排产吗?",
}, },
on: { click: () => this.edit(params.row.id) } on: { click: () => this.edit(params.row.id) },
}), }),
h("op", { h("op", {
attrs: { attrs: {
...@@ -346,17 +357,25 @@ export default { ...@@ -346,17 +357,25 @@ export default {
type: "icon", type: "icon",
title: "删除工序", title: "删除工序",
oprate: "delete", oprate: "delete",
msg: "确认要刪除工序吗?" msg: "确认要刪除工序吗?",
}, },
on: { click: () => this.remove(params.row, params.index) } on: { click: () => this.remove(params.row, params.index) },
}) }),
]); ]);
} },
} },
], ],
data1: [], data1: [],
insertTItle: "插单", insertTItle: "插单",
selectRoutingDetail: {} //需那种工序 selectRoutingDetail: {}, //需那种工序
//设置参数开始
setParams: {
opTaskPk: 0, //工单ID
partTaskPk: 0, //生产计划ID
taskSeq: "", //工序编号
count: 0,
}, //生产计划数量
//设置参数结束
}; };
}, },
mounted() { mounted() {
...@@ -369,12 +388,12 @@ export default { ...@@ -369,12 +388,12 @@ export default {
//根据点击副组件传过来id进行加载数据 //根据点击副组件传过来id进行加载数据
loadData(expendId) { loadData(expendId) {
let params = { let params = {
id: expendId id: expendId,
}; };
Api.getbyorderid(params).then(res => { Api.getbyorderid(params).then((res) => {
if (res.success) { if (res.success) {
this.gridHeight = 50; this.gridHeight = 50;
this.gridHeight = (res.result.length + 1) * 48; this.gridHeight = (res.result.length + 1) * 51;
this.data1 = res.result; this.data1 = res.result;
} }
}); });
...@@ -406,7 +425,13 @@ export default { ...@@ -406,7 +425,13 @@ export default {
//插单事件end---- //插单事件end----
//单个工序进行参设置start---- //单个工序进行参设置start----
openParms(id) { openParms(row) {
this.setParams = {
opTaskPk:row.op_task_pk,
partTaskPk: row.part_task_pk,
taskSeq: row.task_seq,
count: row.put_into_qty,
};
this.setParsModal = true; this.setParsModal = true;
}, },
//单个工序进行参数设置end---- //单个工序进行参数设置end----
...@@ -425,9 +450,9 @@ export default { ...@@ -425,9 +450,9 @@ export default {
this.selectRoutingDetail = row; this.selectRoutingDetail = row;
let params = { let params = {
partPk: this.selectRoutingDetail.part_task_pk, partPk: this.selectRoutingDetail.part_task_pk,
detailIdstr: this.selectRoutingDetail.routing_detail_id detailIdstr: this.selectRoutingDetail.routing_detail_id,
}; };
Api.removeoptasksimluate(params).then(r => { Api.removeoptasksimluate(params).then((r) => {
if (r.success) { if (r.success) {
this.$Message.success("删除成功"); this.$Message.success("删除成功");
this.data1.splice(this.rowIndex, 1); this.data1.splice(this.rowIndex, 1);
...@@ -447,9 +472,8 @@ export default { ...@@ -447,9 +472,8 @@ export default {
l(key) { l(key) {
let vkey = "mes_op_task_plan_simulate" + "." + key; let vkey = "mes_op_task_plan_simulate" + "." + key;
return this.$t(vkey) || key; return this.$t(vkey) || key;
} },
} },
}; };
</script> </script>
<style lang="less"> <style lang="less"></style>
</style>
\ No newline at end of file
...@@ -19,11 +19,11 @@ ...@@ -19,11 +19,11 @@
<DatePicker <DatePicker
type="date" type="date"
placeholder="设置基准日期" placeholder="设置基准日期"
style="width: 150px" style="width: 150px;"
v-model="entity.setTime" v-model="entity.setTime"
@on-change="getTime" @on-change="getTime"
></DatePicker> ></DatePicker>
<a style="font-weight:bold;" @click="addModal=true"> <a style="font-weight: bold;" @click="openAddModel(1)">
<Icon type="ios-options" size="14" />&nbsp;工序参数调整 <Icon type="ios-options" size="14" />&nbsp;工序参数调整
</a> </a>
</template> </template>
...@@ -34,13 +34,27 @@ ...@@ -34,13 +34,27 @@
<Button type="primary" @click="openApsModal">APS排产</Button> <Button type="primary" @click="openApsModal">APS排产</Button>
</template> </template>
<template slot="batch"> <template slot="batch">
<Button type="primary" class="mr10 ml10" @click="removeOk">移出排产</Button> <Button type="primary" class="mr10 ml10" @click="removeOk"
>移出排产</Button
>
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="addModal" title="工序参数设置" footer-hide width="1000"> <Modal v-model="addModal" title="工序参数设置" footer-hide width="1000">
<Add @on-close="cancel" @on-ok="addOk" :opTaskPk="opTaskPk" :partTaskPk="partTaskPk" :taskSeq="taskSeq" :count="count" /> <Add
@on-close="cancel"
@on-ok="addOk"
:opTaskPk="setParams.opTaskPk"
:partTaskPk="setParams.partTaskPk"
:taskSeq="setParams.taskSeq"
:count="setParams.count"
/>
</Modal> </Modal>
<Modal v-model="apsModal" title="确定APS排产" @on-ok="apsOk" @on-cancel="cancel"> <Modal
v-model="apsModal"
title="确定APS排产"
@on-ok="apsOk"
@on-cancel="cancel"
>
<p>确定进行APS排产?</p> <p>确定进行APS排产?</p>
</Modal> </Modal>
</div> </div>
...@@ -53,16 +67,16 @@ export default { ...@@ -53,16 +67,16 @@ export default {
name: "list", name: "list",
components: { components: {
Add, Add,
Expand Expand,
}, },
data() { data() {
return { return {
action: Api.index, action: Api.index,
easySearch: { easySearch: {
keys: { op: "notes", value: null } keys: { op: "notes", value: null },
}, },
entity: { entity: {
setTime: "" setTime: "",
}, },
addModal: false, addModal: false,
editModal: false, editModal: false,
...@@ -82,11 +96,11 @@ export default { ...@@ -82,11 +96,11 @@ export default {
return h("Icon", { return h("Icon", {
attrs: { attrs: {
type: "md-more", type: "md-more",
size: 18 size: 18,
}, },
class: "drag" class: "drag",
}); });
} },
}, },
{ {
type: "expand", type: "expand",
...@@ -94,16 +108,16 @@ export default { ...@@ -94,16 +108,16 @@ export default {
render: (h, params) => { render: (h, params) => {
return h(Expand, { return h(Expand, {
props: { props: {
rowId: params.row.part_task_pk rowId: params.row.part_task_pk,
} },
}); });
} },
}, },
{ {
key: "selection", key: "selection",
type: "selection", type: "selection",
width: 50, width: 50,
align: "center" align: "center",
}, },
{ {
key: "id", key: "id",
...@@ -111,7 +125,7 @@ export default { ...@@ -111,7 +125,7 @@ export default {
hide: true, hide: true,
align: "left", align: "left",
sortable: true, sortable: true,
width: 50 width: 50,
}, },
{ {
key: "insert_flag", key: "insert_flag",
...@@ -120,13 +134,13 @@ export default { ...@@ -120,13 +134,13 @@ export default {
width: 70, width: 70,
high: true, high: true,
code: "aps.aps.insert_flag", code: "aps.aps.insert_flag",
category: "icon" category: "icon",
}, },
{ {
key: "part_task_pk", key: "part_task_pk",
title: this.l("part_task_pk"), title: this.l("part_task_pk"),
align: "left", align: "left",
high: true high: true,
}, },
{ {
key: "priority", key: "priority",
...@@ -135,20 +149,20 @@ export default { ...@@ -135,20 +149,20 @@ export default {
high: true, high: true,
render: (h, params) => { render: (h, params) => {
return h("span", {}, params.index + 1); return h("span", {}, params.index + 1);
} },
}, },
{ {
key: "plan_qty", key: "plan_qty",
title: this.l("plan_qty"), title: this.l("plan_qty"),
align: "left", align: "left",
high: true, high: true,
sortable: true sortable: true,
}, },
{ {
key: "spare_qty", key: "spare_qty",
title: this.l("spare_qty"), title: this.l("spare_qty"),
align: "left", align: "left",
high: true high: true,
}, },
{ {
key: "plan_start", key: "plan_start",
...@@ -157,7 +171,7 @@ export default { ...@@ -157,7 +171,7 @@ export default {
high: true, high: true,
hide: true, hide: true,
resizable: true, resizable: true,
width: 140 width: 140,
}, },
{ {
key: "plan_finish", key: "plan_finish",
...@@ -167,7 +181,7 @@ export default { ...@@ -167,7 +181,7 @@ export default {
hide: true, hide: true,
sortable: true, sortable: true,
resizable: true, resizable: true,
width: 140 width: 140,
}, },
{ {
key: "notes", key: "notes",
...@@ -175,14 +189,14 @@ export default { ...@@ -175,14 +189,14 @@ export default {
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true,
}, },
{ {
key: "demand_start", key: "demand_start",
title: this.l("demand_start"), title: this.l("demand_start"),
align: "center", align: "center",
resizable: true, resizable: true,
width: 140 width: 140,
}, },
{ {
key: "demand_finish", key: "demand_finish",
...@@ -190,14 +204,14 @@ export default { ...@@ -190,14 +204,14 @@ export default {
align: "center", align: "center",
high: true, high: true,
resizable: true, resizable: true,
width: 140 width: 140,
}, },
{ {
key: "badjustflag", key: "badjustflag",
title: this.l("badjustflag"), title: this.l("badjustflag"),
align: "left", align: "left",
high: true, high: true,
hide:true, hide: true,
}, },
{ {
title: "操作", title: "操作",
...@@ -211,9 +225,9 @@ export default { ...@@ -211,9 +225,9 @@ export default {
attrs: { attrs: {
icon: "md-options", icon: "md-options",
type: "icon", type: "icon",
title: "工序参数设置" title: "工序参数设置",
}, },
on: { click: () => this.openParms(params.row.id) } on: { click: () => this.openAddModel(2, params.row) },
}), }),
h("op", { h("op", {
attrs: { attrs: {
...@@ -221,9 +235,9 @@ export default { ...@@ -221,9 +235,9 @@ export default {
type: "icon", type: "icon",
title: "移出排产池", title: "移出排产池",
oprate: "delete", oprate: "delete",
msg: "确认要移出排产吗?" msg: "确认要移出排产吗?",
}, },
on: { click: () => this.remove(params.row.part_task_pk) } on: { click: () => this.remove(params.row.part_task_pk) },
}), }),
h("op", { h("op", {
attrs: { attrs: {
...@@ -231,20 +245,22 @@ export default { ...@@ -231,20 +245,22 @@ export default {
type: "icon", type: "icon",
title: "恢复工序", title: "恢复工序",
oprate: "delete", oprate: "delete",
msg: "确认要恢复工序吗?" msg: "确认要恢复工序吗?",
}, },
on: { click: () => this.refresh(params.row.part_task_pk) } on: { click: () => this.refresh(params.row.part_task_pk) },
}) }),
]); ]);
} },
} },
], ],
arrPartPkId: [], arrPartPkId: [],
//设置参数开始 //设置参数开始
opTaskPk:0,//工单ID setParams: {
partTaskPk:0,//生产计划ID opTaskPk: 0, //工单ID
taskSeq:"",//工序编号 partTaskPk: 0, //生产计划ID
count:0,//生产计划数量 taskSeq: "", //工序编号
count: 0,
}, //生产计划数量
//设置参数结束 //设置参数结束
}; };
}, },
...@@ -257,7 +273,7 @@ export default { ...@@ -257,7 +273,7 @@ export default {
methods: { methods: {
//排产池加载数据列表 //排产池加载数据列表
loadList() { loadList() {
Api.getall().then(res => { Api.getall().then((res) => {
if (res.success) { if (res.success) {
this.list = res.result; this.list = res.result;
} }
...@@ -281,9 +297,9 @@ export default { ...@@ -281,9 +297,9 @@ export default {
refresh(partPkId) { refresh(partPkId) {
//恢复工序 //恢复工序
let params = { let params = {
id: partPkId id: partPkId,
}; };
Api.recoveryoptasksimluate(params).then(r => { Api.recoveryoptasksimluate(params).then((r) => {
if (r.success) { if (r.success) {
this.$Message.success("恢复成功"); this.$Message.success("恢复成功");
this.list = []; this.list = [];
...@@ -300,9 +316,9 @@ export default { ...@@ -300,9 +316,9 @@ export default {
paramsArry.push(partPkId); paramsArry.push(partPkId);
} }
let params = { let params = {
partPks: paramsArry partPks: paramsArry,
}; };
Api.shiftoutapspool(params).then(r => { Api.shiftoutapspool(params).then((r) => {
if (r.success) { if (r.success) {
this.$Message.success("移出排产池操作成功"); this.$Message.success("移出排产池操作成功");
this.loadList(); this.loadList();
...@@ -313,7 +329,7 @@ export default { ...@@ -313,7 +329,7 @@ export default {
//批量选择 //批量选择
let selectRows = a; let selectRows = a;
this.arrPartPkId = []; this.arrPartPkId = [];
selectRows.forEach(e => { selectRows.forEach((e) => {
this.arrPartPkId.push(e.part_task_pk); this.arrPartPkId.push(e.part_task_pk);
}); });
}, },
...@@ -332,11 +348,12 @@ export default { ...@@ -332,11 +348,12 @@ export default {
this.deletedlModal = false; this.deletedlModal = false;
this.apsModal = false; this.apsModal = false;
}, },
onDragDrop(a, b) {//拖拽排序 onDragDrop(a, b) {
//拖拽排序
//this.list.splice(b, 1, ...this.list.splice(a, 1, this.list[b])); //this.list.splice(b, 1, ...this.list.splice(a, 1, this.list[b]));
let tempArray=this.list[a] let tempArray = this.list[a];
this.list.splice(a,1) this.list.splice(a, 1);
this.list.splice(b,0,tempArray) this.list.splice(b, 0, tempArray);
}, },
openParms(id) { openParms(id) {
this.addModal = true; this.addModal = true;
...@@ -376,25 +393,25 @@ export default { ...@@ -376,25 +393,25 @@ export default {
}); });
parmsOrderpriority.alls = arryIds; parmsOrderpriority.alls = arryIds;
// alert(JSON.stringify(parmsOrderpriority)); // alert(JSON.stringify(parmsOrderpriority));
Api.orderpriority(parmsOrderpriority).then(res => { Api.orderpriority(parmsOrderpriority).then((res) => {
if (res.success) { if (res.success) {
if (res.result) { if (res.result) {
//this.$Message.success("排序成功"); //this.$Message.success("排序成功");
//apsp排产前检查 //apsp排产前检查
Api.apsdatachecked().then(res1 => { Api.apsdatachecked().then((res1) => {
if (res1.success) { if (res1.success) {
if (res1.result.res) { if (res1.result.res) {
// this.$Message.success("数据校验成功"); // this.$Message.success("数据校验成功");
//排产计算 //排产计算
let paramsTime = { let paramsTime = {
setTime: this.entity.setTime setTime: this.entity.setTime,
}; };
Api.apsprepareandcalc(paramsTime).then(res2 => { Api.apsprepareandcalc(paramsTime).then((res2) => {
if (res2.success) { if (res2.success) {
if (res2.result.res) { if (res2.result.res) {
this.$Message.success("排产计算成功"); this.$Message.success("排产计算成功");
this.$router.push({ this.$router.push({
name: "aps-results" name: "aps-results",
// params: { customerId: id } // params: { customerId: id }
}); });
} else { } else {
...@@ -418,12 +435,32 @@ export default { ...@@ -418,12 +435,32 @@ export default {
this.$Message.error("操作失败:排序"); this.$Message.error("操作失败:排序");
} }
}); });
} },
} //打开设置参数
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;
},
},
}; };
</script> </script>
<style lang="less"> <style lang="less">
.drag { .drag {
cursor: move; cursor: move;
} }
</style> </style>
\ No newline at end of file
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