Commit 0bde7656 authored by renjintao's avatar renjintao

aps

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