From 3bc1ee9b37c5e2ce2ea042c581e3e7ab1863c5f9 Mon Sep 17 00:00:00 2001 From: ruanqi Date: Tue, 11 Jul 2023 18:06:11 +0800 Subject: [PATCH] =?UTF-8?q?0412=20=E6=96=B0=E7=9C=8B=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/production.js | 2 +- .../modules/production/generateReport.vue | 3 ++ src/views/modules/production/inspect.vue | 2 + .../production/scheduleForShopOrder.vue | 51 +++++++++++++++++-- src/views/modules/production/stockPrint.vue | 9 +++- 5 files changed, 61 insertions(+), 6 deletions(-) diff --git a/src/api/production.js b/src/api/production.js index 09ecfd7..d50d852 100644 --- a/src/api/production.js +++ b/src/api/production.js @@ -17,7 +17,7 @@ export const getWorkPlanData=data => createAPI(`dailyPlan/getWorkPlanData`, 'pos //删除日计划 export const delPlan=data => createAPI(`dailyPlan/delPlan`, 'post', data); - +export const getSPBomQtyAssembly=data => createAPI(`dailyPlan/getSPBomQtyAssembly`, 'post', data); diff --git a/src/views/modules/production/generateReport.vue b/src/views/modules/production/generateReport.vue index 0aa2780..b40bd29 100644 --- a/src/views/modules/production/generateReport.vue +++ b/src/views/modules/production/generateReport.vue @@ -796,6 +796,7 @@ } this.saveHeaderData.reportWeight=Number(this.KGApprove)-boxWeightKG+Number(this.KGReported) } + this.setUp.saveButton=true; saveGenerateReportForSchedule(this.saveHeaderData).then(({data}) => { if (data.code == 0) { this.$message.success(data.msg) @@ -815,6 +816,7 @@ printTransNoLabel(inList); } } else { + this.setUp.saveButton=false; this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) @@ -1115,6 +1117,7 @@ this.approveFlag=false; this.scanModalFlag=false; this.setUp.reviewFlag = true; + this.setUp.saveButton=false; this.setUp.disabled = true; getSOScheduleRoutingData(inData).then(({data}) => { if( data.rows){ diff --git a/src/views/modules/production/inspect.vue b/src/views/modules/production/inspect.vue index 5928093..199ba3f 100644 --- a/src/views/modules/production/inspect.vue +++ b/src/views/modules/production/inspect.vue @@ -392,6 +392,7 @@ }, height2:600, inspectData:{ + user:this.$store.state.user.name, transNo:'', orderNo:'', partNo:'', @@ -483,6 +484,7 @@ this.inspectData.seqNo=row.seqNo; this.inspectData.newDate=''; this.inspectData.confirmedTransNo=row.confirmedTransNo + this.inspectData.user=this.$store.state.user.name this.inspectFlag=true; }, inspectSave(){ diff --git a/src/views/modules/production/scheduleForShopOrder.vue b/src/views/modules/production/scheduleForShopOrder.vue index 8626b66..cf2e069 100644 --- a/src/views/modules/production/scheduleForShopOrder.vue +++ b/src/views/modules/production/scheduleForShopOrder.vue @@ -423,6 +423,17 @@ + + + @@ -517,6 +528,7 @@ getWorkCenterOperatorList, getAvailableResourceList, scheduleForShopOrder, + getSPBomQtyAssembly, } from "@/api/production.js" import { searchLastApproveQty, @@ -577,6 +589,7 @@ userId:this.$store.state.user.name, }, weightFactorFlag:false, + materialWeightFactorFlag:false, schedulingModalData: { remark:'', weightFactor:'', @@ -600,6 +613,7 @@ qty1:'', lastApproveQty:'', partPlanQty:'', + qtyAssembly:'', }, scheduledModalFlag: false, availableResourceList: [], @@ -689,7 +703,9 @@ sumQty: 0, lastApproveQty:null, qty1:'', + qtyAssembly:'', } + this.materialWeightFactorFlag=true if(this.schedulingModalData.weightFactor==null||this.schedulingModalData.weightFactor==''||this.schedulingModalData.weightFactor=='0'){ this.weightFactorFlag=true; this.schedulingModalData.weightFactor='ERP未维护数据' @@ -699,11 +715,20 @@ this.schedulingModalTableData = [] this.getAvailableResourceList(row) this.getWorkCenterOperatorList(row); + let inData={ site:row.site, orderNo:row.orderNo, itemNo:row.itemNo, } + if(row.operationDesc.includes("修边")) { + getSPBomQtyAssembly(inData).then(({data}) => { + if (data.code === 0 && data.rows.length > 0) { + this.materialWeightFactorFlag=false + this.schedulingModalData.qtyAssembly = data.rows[0].qtyAssembly + } + }) + } searchLastApproveQty(inData).then(({data}) => { if(data.code===0&&data.row.lastApproveQty!=null) { this.schedulingModalData.lastApproveQty = data.row.lastApproveQty; @@ -733,7 +758,8 @@ shiftNo: this.schedulingModalData.shiftNo, scheduleDate: null, operatorId:this.schedulingModalData.operatorId, - createBy:this.$store.state.user.name + createBy:this.$store.state.user.name, + materialWeight:'', } if(this.schedulingModalData.partPlanQty!=null&&this.schedulingModalData.partPlanQty!=''&&this.schedulingModalData.partPlanQty!=0){ data.scheduleQty=this.schedulingModalData.partPlanQty; @@ -741,10 +767,12 @@ }else { data.weight=Math.round( data.scheduleQty*this.schedulingModalData.weightFactor) } - + if(!this.materialWeightFactorFlag){ + data.materialWeight=(data.scheduleQty*this.schedulingModalData.qtyAssembly).toFixed(1) + } } this.schedulingModalTableData.push(data) - this.changeSum (); + this.changeSum(); }, changeSum () { let sum = 0 @@ -899,21 +927,36 @@ } }) }, + materialWeightBlur(row){ + row.scheduleQty=(row.materialWeight/this.schedulingModalData.qtyAssembly).toFixed(1) + if(this.schedulingModalData.weightFactor&&this.schedulingModalData.weightFactor!=0&&this.weightFactorFlag==false&&row.scheduleQty!=''){ + row.weight=(row.scheduleQty*this.schedulingModalData.weightFactor).toFixed(1) + } + }, scheduleQtyBlur(row){ if(this.schedulingModalData.weightFactor&&this.schedulingModalData.weightFactor!=0&&this.weightFactorFlag==false&&row.scheduleQty!=''){ row.weight=(row.scheduleQty*this.schedulingModalData.weightFactor).toFixed(1) + if(!this.materialWeightFactorFlag){ + row.materialWeight=(row.scheduleQty*this.schedulingModalData.qtyAssembly).toFixed(1) + } } if(row.scheduleQty==''){ row.weight='' + row.materialWeight='' } }, weightBlur(row){ if(this.schedulingModalData.weightFactor&&this.schedulingModalData.weightFactor!=0&&this.weightFactorFlag==false&&row.weight!=''){ row.scheduleQty=(row.weight/this.schedulingModalData.weightFactor).toFixed(1) + if(!this.materialWeightFactorFlag){ + row.materialWeight=(row.scheduleQty*this.schedulingModalData.qtyAssembly).toFixed(1) + } } if(row.weight==''){ row.scheduleQty='' + row.materialWeight='' } + }, tableRowClassName ({row, rowIndex}) { diff --git a/src/views/modules/production/stockPrint.vue b/src/views/modules/production/stockPrint.vue index 22535b7..89a6656 100644 --- a/src/views/modules/production/stockPrint.vue +++ b/src/views/modules/production/stockPrint.vue @@ -83,7 +83,14 @@ header-align="center" align="right" min-width="80" - label="数量"> + label="入库数量"> + +