From 165bdfd7440d638f932889cebe89219bc2db50e9 Mon Sep 17 00:00:00 2001 From: ruanqi Date: Wed, 21 Sep 2022 18:01:14 +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 --- .../modules/production/closeSchedule.vue | 456 ++++++++++++++++++ .../modules/production/generateReport.vue | 118 ++--- 2 files changed, 520 insertions(+), 54 deletions(-) create mode 100644 src/views/modules/production/closeSchedule.vue diff --git a/src/views/modules/production/closeSchedule.vue b/src/views/modules/production/closeSchedule.vue new file mode 100644 index 0000000..2afaccc --- /dev/null +++ b/src/views/modules/production/closeSchedule.vue @@ -0,0 +1,456 @@ + + + + + diff --git a/src/views/modules/production/generateReport.vue b/src/views/modules/production/generateReport.vue index 3970262..ed2240a 100644 --- a/src/views/modules/production/generateReport.vue +++ b/src/views/modules/production/generateReport.vue @@ -669,46 +669,49 @@ } }, initReportModal (row) { - this.setUp.reviewFlag = true; - this.setUp.disabled = true; - let currentData = JSON.parse(JSON.stringify(row)); - this.KGReported=0 - this.KGApprove=0 - this.KGRework=0 - this.saveHeaderData.qtyApprove=0 - this.saveHeaderData.qtyReported=0 - this.saveHeaderData.qtyRework=0 - this.saveHeaderData.site = currentData.site; - this.saveHeaderData.seqNo = currentData.seqNo; - this.saveHeaderData.itemNo = currentData.itemNo; - this.saveHeaderData.operationDesc = currentData.itemDesc; - this.saveHeaderData.partNo = currentData.partNo; - this.saveHeaderData.partDescription = currentData.partSpec; - this.saveHeaderData.workCenterNo = currentData.sWorkCenterNo; - this.saveHeaderData.workCenterDesc = currentData.workCenterDesc; - this.saveHeaderData.orderRef1=currentData.orderRef1; - this.saveHeaderData.orderNo=currentData.orderNo; - this.saveHeaderData.scheduleType=currentData.scheduleType; - this.saveHeaderData.operatorId=currentData.operatorId; - this.saveHeaderData.operatorName=currentData.operatorName; - this.saveHeaderData.userId=this.$store.state.user.name; - this.qty1=''; - this.qty2 =''; - this.saveHeaderData.planStartTime = this.dayjs(new Date()).format('YYYY-MM-DD 00:00:00') - searchReportedQty(this.saveHeaderData).then(({data}) => { - this.qty1 = data.row.qtyReported; - this.qty2 =data.row.lastApproveQty; - if(data.row.weightFactor==-1){ - this.qty3 ="erp未维护数据" - this.KGReported='' - this.KGApprove='' - this.KGRework='' - this.factorFlag=true; - }else { - this.qty3 =data.row.weightFactor - this.factorFlag=false; - } - }) + this.scanSeqNo=row.seqNo + this.searchSeqNo() + // this.setUp.reviewFlag = true; + // this.setUp.disabled = true; + // let currentData = JSON.parse(JSON.stringify(row)); + // this.KGReported=0 + // this.KGApprove=0 + // this.KGRework=0 + // this.saveHeaderData.qtyApprove=0 + // this.saveHeaderData.qtyReported=0 + // this.saveHeaderData.qtyRework=0 + // this.saveHeaderData.site = currentData.site; + // this.saveHeaderData.seqNo = currentData.seqNo; + // this.saveHeaderData.itemNo = currentData.itemNo; + // this.saveHeaderData.operationDesc = currentData.itemDesc; + // this.saveHeaderData.partNo = currentData.partNo; + // this.saveHeaderData.partDescription = currentData.partSpec; + // this.saveHeaderData.workCenterNo = currentData.sWorkCenterNo; + // this.saveHeaderData.workCenterDesc = currentData.workCenterDesc; + // this.saveHeaderData.orderRef1=currentData.orderRef1; + // this.saveHeaderData.orderNo=currentData.orderNo; + // this.saveHeaderData.scheduleType=currentData.scheduleType; + // this.saveHeaderData.operatorId=currentData.operatorId; + // this.saveHeaderData.operatorName=currentData.operatorName; + // this.saveHeaderData.userId=this.$store.state.user.name; + // this.qty1=''; + // this.qty2 =''; + // this.saveHeaderData.planStartTime = this.dayjs(new Date()).format('YYYY-MM-DD 00:00:00') + // searchReportedQty(this.saveHeaderData).then(({data}) => { + // this.qty1 = data.row.qtyReported; + // this.qty2 =data.row.lastApproveQty; + // this.saveHeaderData.manufacturingTime=data.row.timeReported; + // if(data.row.weightFactor==-1){ + // this.qty3 ="erp未维护数据" + // this.KGReported='' + // this.KGApprove='' + // this.KGRework='' + // this.factorFlag=true; + // }else { + // this.qty3 =data.row.weightFactor + // this.factorFlag=false; + // } + // }) }, closeDialog () { Object.assign(this.$data.saveHeaderData, this.$options.data.call(this).saveHeaderData) @@ -852,9 +855,6 @@ this.saveHeaderData.qtyApprove=0 this.saveHeaderData.qtyReported=0 this.saveHeaderData.qtyRework=0 - this.scanModalFlag=false; - this.setUp.reviewFlag = true; - this.setUp.disabled = true; this.saveHeaderData.site = currentData.site; this.saveHeaderData.seqNo = currentData.seqNo; this.saveHeaderData.itemNo = currentData.itemNo; @@ -873,21 +873,31 @@ this.qty2 =''; this.saveHeaderData.planStartTime = this.dayjs(new Date()).format('YYYY-MM-DD 00:00:00') searchReportedQty(this.saveHeaderData).then(({data}) => { - this.qty1 = data.row.qtyReported; - this.qty2 =data.row.lastApproveQty; - if(data.row.weightFactor==-1){ - this.qty3 ="erp未维护数据" - this.KGReported='' - this.KGApprove='' - this.KGRework='' - this.factorFlag=true; + if(data.code===0) { + this.qty1 = data.row.qtyReported; + this.qty2 = data.row.lastApproveQty; + this.saveHeaderData.manufacturingTime = data.row.timeReported; + if (data.row.weightFactor == -1) { + this.qty3 = "erp未维护数据" + this.KGReported = '' + this.KGApprove = '' + this.KGRework = '' + this.factorFlag = true; + } else { + this.qty3 = data.row.weightFactor + this.factorFlag = false; + } }else { - this.qty3 =data.row.weightFactor - this.factorFlag=false; + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + return false; } }) - + this.scanModalFlag=false; + this.setUp.reviewFlag = true; + this.setUp.disabled = true; } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定'