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 @@