From 15ef5fcdb69b4b90405c3ee96ba453e65af67621 Mon Sep 17 00:00:00 2001 From: zelian_wu Date: Fri, 19 Jan 2024 15:43:25 +0800 Subject: [PATCH] =?UTF-8?q?2024/1/19=20=E8=BF=94=E5=B7=A5=E8=BF=94?= =?UTF-8?q?=E4=BF=AE=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/production/generateReport.js | 1 + .../modules/production/generateReport.vue | 58 +++++++++---------- src/views/modules/production/reworkRecord.vue | 38 ++++++++++-- 3 files changed, 64 insertions(+), 33 deletions(-) diff --git a/src/api/production/generateReport.js b/src/api/production/generateReport.js index 2efd59b..04a8b1c 100644 --- a/src/api/production/generateReport.js +++ b/src/api/production/generateReport.js @@ -59,4 +59,5 @@ export const selectToolingHist = data =>createAPI(`dailyPlan/selectToolingHist`, export const startRework = data =>createAPI(`/dailyPlan/startRework`,'post',data) export const selectRework = data =>createAPI(`/dailyPlan/selectRework`,'post',data) export const saveRework = data =>createAPI(`/dailyPlan/saveRework`,'post',data) +export const getRework = data =>createAPI(`/dailyPlan/getRework`,'post',data) diff --git a/src/views/modules/production/generateReport.vue b/src/views/modules/production/generateReport.vue index f0bc52c..c0fd851 100644 --- a/src/views/modules/production/generateReport.vue +++ b/src/views/modules/production/generateReport.vue @@ -867,8 +867,6 @@ } this.saveHeaderData.reportWeight=Number(this.KGApprove)-boxWeightKG+Number(this.KGReported) } - this.setUp.saveButton=true; - if(this.saveHeaderData.scrapQty==null||this.saveHeaderData.scrapQty==''){ this.saveHeaderData.scrapQty=0 } @@ -889,37 +887,39 @@ return new Decimal(prev).add(new Decimal(cur.finishQty)).toNumber() },0) } - this.setUp.saveButton=true; saveGenerateReportForSchedule(this.saveHeaderData).then(({data}) => { - this.setUp.saveButton = false - if (data.code == 0) { - this.$message.success(data.msg) - this.setUp.reviewFlag = false - // this.search() - let inList=[]; - if(data.transData!=null){ - //他们要打印2张 - inList.push(data.transData) - inList.push(data.transData) - } - if(data.badData!=null){ - inList.push(data.badData) - } - if(this.saveHeaderData.printQty>0){ - for (let i = 0; i 0){ + for (let i = 0; i 0){ + printTransNoLabel(inList); + } + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + this.setUp.saveButton = false } - if(inList.length>0){ - printTransNoLabel(inList); - } - } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }) - } - }) + }).error((error)=>{ + this.setUp.saveButton = false + }) }, // 获取基础数据列表S getBaseList (val, type) { diff --git a/src/views/modules/production/reworkRecord.vue b/src/views/modules/production/reworkRecord.vue index 4e7153a..bc93405 100644 --- a/src/views/modules/production/reworkRecord.vue +++ b/src/views/modules/production/reworkRecord.vue @@ -1,6 +1,6 @@