From 5319f76028106902af30640eec44c2d429c22b8c Mon Sep 17 00:00:00 2001 From: shilixia <2309368887@qq.com> Date: Wed, 24 Nov 2021 14:11:48 +0800 Subject: [PATCH 1/2] xiugai --- hb_client/src/views/wpm/operationdo.vue | 32 +++++++--- hb_client/src/views/wpm/worktask.vue | 79 ++++++++++++++----------- 2 files changed, 69 insertions(+), 42 deletions(-) diff --git a/hb_client/src/views/wpm/operationdo.vue b/hb_client/src/views/wpm/operationdo.vue index 72d69b5..7616894 100644 --- a/hb_client/src/views/wpm/operationdo.vue +++ b/hb_client/src/views/wpm/operationdo.vue @@ -259,7 +259,7 @@ 从车间领料 @@ -474,6 +474,7 @@ import Pagination from "@/components/Pagination"; // secondary package based on export default { components: { Pagination }, + inject:['reload'], data() { return { operationList: { @@ -577,6 +578,13 @@ export default { output: {}, record_data: [], record: {}, + inputData:[], + operationwpData:[], + equData:[], + recordData:[], + wmaterialData:[], + outputData:[], + tprogressData:[], }; }, computed: {}, @@ -600,7 +608,7 @@ export default { if (response.data) { this.operationData = response.data; } - this.listLoading = false; + }); }, //如果使用边角料提交 @@ -621,7 +629,7 @@ export default { if (response.data) { this.operationwpData = response.data; } - this.listLoading = false; + } ); }, @@ -648,7 +656,7 @@ export default { if (response.data) { this.equData = response.data; } - this.listLoading = false; + }); }, //操作删除设备 @@ -676,7 +684,7 @@ export default { if (response.data) { this.recordData = response.data; } - this.listLoading = false; + }); }, //调出表单内容 @@ -717,11 +725,16 @@ export default { getinputLists() { getinputList({ operation: this.id, page: 0 }).then((response) => { if (response.data) { + debugger; this.inputData = response.data; } - this.listLoading = false; + }); }, + cjllclick(){ + + this.dialogTablepick = true; + }, //从车间领料 getwmaterialList() { @@ -736,10 +749,11 @@ export default { this.picks.operation = this.id; this.picks.wmaterial = scope.row.id; this.picks.count = scope.row.pick_count; + let _this = this; createInput(this.picks).then((res) => { if (res.code >= 200) { this.$message.success("创建成功!"); - this.getinputLists(); + _this.getinputLists(); this.dialogTablepick = false; } }); @@ -750,7 +764,7 @@ export default { if (response.data) { this.outputData = response.data; } - this.listLoading = false; + }); }, //产出物料选择 @@ -760,7 +774,7 @@ export default { if (response.data) { this.tprogressData = response.data; } - this.listLoading = false; + } ); }, diff --git a/hb_client/src/views/wpm/worktask.vue b/hb_client/src/views/wpm/worktask.vue index 972f565..d9fafef 100644 --- a/hb_client/src/views/wpm/worktask.vue +++ b/hb_client/src/views/wpm/worktask.vue @@ -754,27 +754,37 @@ export default { if (response.data) { this.subproductionplanList = response.data; } - this.listLoading = false; - }); - getwmaterialList({ - subproduction_plan__process: this.process, - page: 0, - }).then((response) => { - if (response.data) { - this.wmaterialList = response.data; - } - this.listLoading = false; + }); + //子工序列表 getStepLists(tab.name).then((response) => { if (response.data) { this.steps = response.data; } - this.listLoading = false; + }); + //车间物料表 + this.getwmaterialLists(); + // 半成品表 this.getwproductLists(); }, + + //车间物料 + getwmaterialLists() + { + getwmaterialList({ + subproduction_plan__process: this.process, + page: 0, + }).then((response) => { + if (response.data) { + this.wmaterialList = response.data; + } + + }); + }, + //工序对应的子计划,弹出对应的车间物料 handleCurrentChange(row) { // this.steps = row.steps; //调出子工序 @@ -789,17 +799,17 @@ export default { if (response.data) { this.wmaterialList = response.data; } - this.listLoading = false; + }); }, - //工序渲染 + //大工序工序渲染 getProcessList() { getProcessList({ page: 0 }).then((response) => { if (response.data) { this.processOption = response.data; } - this.listLoading = false; + }); }, @@ -812,28 +822,15 @@ export default { if (response.data) { this.subproductionplanList = response.data; } - this.listLoading = false; + }); //车间物料表 - getwmaterialList({ - subproduction_plan__process: this.process, - page: 0, - }).then((response) => { - if (response.data) { - this.wmaterialList = response.data; - } - this.listLoading = false; - }); - //半成品 - getwproductList({page:0,step__process:this.process}).then((response) => { - if (response.data) { - this.wproductData = response.data; - console.log( this.wproductData) - } - }); + this.getwmaterialLists(); + // 半成品表 + this.getwproductLists(); }, - + //大工序下子工序产出的半成品 getwproductLists() { this.wproductdata.page = 0; @@ -857,7 +854,7 @@ export default { if (response.data) { this.iproductData= response.data; } - this.listLoading = false; + }); @@ -910,8 +907,20 @@ export default { this.dialogVisiblenw = false; this.$message.success("领料成功!"); + //车间物料表 + this.getwmaterialLists(); + // 半成品表 + this.getwproductLists(); } }); + //半成品 + getwproductList({page:0,step__process:this.process}).then((response) => { + if (response.data) { + this.wproductData = response.data; + console.log( this.wproductData) + } + }); + }, //领半成品 @@ -975,6 +984,10 @@ wproductSubmit() if (res.code >= 200) { this.$message.success("半成品领料成功!"); this.dialogTableVisiblepick=false; + //车间物料表 + this.getwproductLists(); + // 半成品表 + this.getwproductLists(); } }); From 2274557301a4ecf65f43dd7be214d3c8d02ca452 Mon Sep 17 00:00:00 2001 From: shilixia <2309368887@qq.com> Date: Wed, 24 Nov 2021 14:27:19 +0800 Subject: [PATCH 2/2] tijiao --- hb_client/src/views/wpm/need.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/hb_client/src/views/wpm/need.vue b/hb_client/src/views/wpm/need.vue index 26910eb..4ed7e77 100644 --- a/hb_client/src/views/wpm/need.vue +++ b/hb_client/src/views/wpm/need.vue @@ -391,6 +391,7 @@ export default { this.wproduct=scope.row.id;//半成品ID this.listQueryrecordform.material = scope.row.material;// this.listQueryrecordform.type = 2; + this.recordform=""; getrecordformList(this.listQueryrecordform).then((response) => { if (response.data) { this.recordformList = response.data;