Commit 0bde7656 authored by renjintao's avatar renjintao

aps

parent 8930155a
...@@ -500,6 +500,10 @@ export default { ...@@ -500,6 +500,10 @@ export default {
watch:{ watch:{
"data.length"(){ "data.length"(){
this.list=this.data; this.list=this.data;
},
"height"()
{
this.tableHeight=this.height;
} }
} }
} }
......
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
return Api.post(`${apsUrl}/apspoolappservices/processschemedispatch`, params); return Api.post(`${apsUrl}/apspoolappservices/processschemedispatch`, params);
}, },
//APS排产前数据合法性校验 //APS排产前数据合法性校验
recoveryoptasksimluate(params) { apsdatachecked(params) {
return Api.post(`${apsUrl}/apspoolappservices/apsdatachecked`, params); return Api.post(`${apsUrl}/apspoolappservices/apsdatachecked`, params);
}, },
} }
...@@ -10,14 +10,12 @@ ...@@ -10,14 +10,12 @@
:border="false" :border="false"
:data="data1" :data="data1"
:page="false" :page="false"
: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" @on-close="cancel" />
</Modal> </Modal>
<Modal v-model="deletelModal" title="删除" @on-ok="removeOk" @on-cancel="cancel">
<p>确定删除?</p>
</Modal>
<Modal v-model="insertlModal" title="插单" @on-ok="insertOk" @on-cancel="cancel"> <Modal v-model="insertlModal" title="插单" @on-ok="insertOk" @on-cancel="cancel">
<p>确定进行 {{insertTItle}} 操作?</p> <p>确定进行 {{insertTItle}} 操作?</p>
</Modal> </Modal>
...@@ -51,10 +49,10 @@ export default { ...@@ -51,10 +49,10 @@ export default {
setParsModal: false, setParsModal: false,
editModal: false, editModal: false,
detailModal: false, detailModal: false,
deletelModal: false,
insertlModal: false, insertlModal: false,
rowIndex: null, rowIndex: null,
curId: 0, curId: 0,
gridHeight: 45,
columns: [ columns: [
{ 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 },
...@@ -301,6 +299,7 @@ export default { ...@@ -301,6 +299,7 @@ export default {
attrs: { attrs: {
icon: "md-options", icon: "md-options",
type: "icon", type: "icon",
oprate: "detail",
title: "工序参数设置" title: "工序参数设置"
}, },
on: { click: () => this.openParms(params.row.id) } on: { click: () => this.openParms(params.row.id) }
...@@ -323,14 +322,15 @@ export default { ...@@ -323,14 +322,15 @@ export default {
oprate: "delete", oprate: "delete",
msg: "确认要刪除工序吗?" msg: "确认要刪除工序吗?"
}, },
on: { click: () => this.remove(params.row.id, params.index) } on: { click: () => this.remove(params.row, params.index) }
}) })
]); ]);
} }
} }
], ],
data1: [], data1: [],
insertTItle: "插单" insertTItle: "插单",
selectRoutingDetail: {} //需那种工序
}; };
}, },
mounted() { mounted() {
...@@ -344,10 +344,12 @@ export default { ...@@ -344,10 +344,12 @@ export default {
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.data1 = res.result; this.data1 = res.result;
this.gridHeight = 45;
this.gridHeight = (res.result.length + 1) * 48;
} }
}); });
}, },
...@@ -392,22 +394,34 @@ export default { ...@@ -392,22 +394,34 @@ export default {
//编辑工序end---- //编辑工序end----
//删除工序事件start----- //删除工序事件start-----
remove(id, index) { remove(row, index) {
this.deletelModal = true; //this.curId = Number(id);
this.curId = Number(id);
this.rowIndex = index; this.rowIndex = index;
}, this.selectRoutingDetail = row;
removeOk() { let params = {
alert(this.rowIndex); 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); this.data1.splice(this.rowIndex, 1);
// Api.delete({ id: this.curId }).then((r) => { }
});
},
// removeOk() {
// let params = {
// partPk: this.selectRoutingDetail.part_task_pk,
// detailIdstr: this.selectRoutingDetail.routing_detail_id
// };
// Api.removeoptasksimluate(params).then(r => {
// if (r.success) { // if (r.success) {
// this.$refs.grid.load() // this.deletelModal = false;
// this.deletelModal = false // this.$Message.success("删除成功");
// this.$Message.success('删除成功') // this.data1.splice(this.rowIndex, 1);
// } // }
// }) // });
}, // },
removeCancel() { removeCancel() {
this.deletelModal = false; this.deletelModal = false;
}, },
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
:high="false" :high="false"
@on-drag-drop="onDragDrop" @on-drag-drop="onDragDrop"
:page="false" :page="false"
@on-select="onSelect" @on-selection-change="onSelect"
:batch="true" :batch="true"
:border="false" :border="false"
:easy="false" :easy="false"
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<Button type="primary" @click="apsModal=true">APS排产</Button> <Button type="primary" @click="apsModal=true">APS排产</Button>
</template> </template>
<template slot="batch"> <template slot="batch">
<Button type="primary" class="mr10 ml10">移出排产</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">
...@@ -209,7 +209,7 @@ export default { ...@@ -209,7 +209,7 @@ export default {
oprate: "delete", oprate: "delete",
msg: "确认要移出排产吗?" msg: "确认要移出排产吗?"
}, },
on: { click: () => this.remove(params.row.id) } on: { click: () => this.remove(params.row.part_task_pk) }
}), }),
h("op", { h("op", {
attrs: { attrs: {
...@@ -219,12 +219,13 @@ export default { ...@@ -219,12 +219,13 @@ export default {
oprate: "delete", oprate: "delete",
msg: "确认要恢复工序吗?" msg: "确认要恢复工序吗?"
}, },
on: { click: () => this.remove(params.row.id) } on: { click: () => this.refresh(params.row.part_task_pk) }
}) })
]); ]);
} }
} }
] ],
arrPartPkId:[]
}; };
}, },
mounted() { mounted() {
...@@ -257,21 +258,39 @@ export default { ...@@ -257,21 +258,39 @@ export default {
this.editModal = true; this.editModal = true;
this.curId = id; this.curId = id;
}, },
refresh(partPkId) {
remove(id) { let params = {
this.deletelModal = true; id: partPkId
this.curId = id; };
Api.recoveryoptasksimluate(params).then(r => {
if (r.success) {
this.$Message.success("恢复成功");
}
});
}, },
onSelect(a, b) {}, remove(partPkId) {//移出排产池
removeOk() { let params = [];
Api.delete({ id: this.curId }).then(r => { if (partPkId.constructor == Array) {
params = partPkId;
} else {
params.push(partPkId);
}
Api.shiftoutapspool(params).then(r => {
if (r.success) { if (r.success) {
this.$refs.grid.load(); this.$Message.success("移出排产池操作成功");
this.deletelModal = false;
this.$Message.success("删除成功");
} }
}); });
}, },
onSelect(a, b) {//批量选择
let selectRows = a;
this.arrPartPkId = [];
selectRows.forEach(e => {
this.arrPartPkId.push(e.part_task_pk);
});
},
removeOk() {//批量选择移出排产池
this.remove(this.arrPartPkId);
},
removeCancel() { removeCancel() {
this.deletelModal = false; this.deletelModal = false;
}, },
......
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