From e08a8ae3369d5437cc8dee49d335056bfce77423 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Sun, 18 Aug 2024 11:51:50 +0800 Subject: [PATCH] =?UTF-8?q?HL-5055=20=E6=8C=89=E8=AE=A1=E5=88=92=E5=AE=8C?= =?UTF-8?q?=E5=B7=A5=EF=BC=8C=E6=AF=8F=E6=AC=A1=E6=8F=90=E4=BA=A4=E5=90=8E?= =?UTF-8?q?=E8=A6=81=E5=88=A4=E6=96=AD=E4=B8=80=E4=B8=8B=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E7=9A=84=E7=8A=B6=E6=80=81=EF=BC=8C=E5=A6=82=E6=9E=9C=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E5=B7=B2=E5=AE=8C=E6=88=90=E6=8F=90=E7=A4=BA=EF=BC=9A?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=B7=B2=E5=AE=8C=E6=88=90=EF=BC=8C=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E5=BC=80=E5=B7=A5=E9=98=B6=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/fg/receiptByPlan.vue | 59 +++++++++++++++++++++------------- src/pages/login/index.vue | 27 +++++++++------- 2 files changed, 51 insertions(+), 35 deletions(-) diff --git a/src/pages/fg/receiptByPlan.vue b/src/pages/fg/receiptByPlan.vue index 74c31bcc..ad34b963 100644 --- a/src/pages/fg/receiptByPlan.vue +++ b/src/pages/fg/receiptByPlan.vue @@ -273,30 +273,43 @@ import { nextTick } from 'vue'; console.log(JSON.stringify(params)) let list = [] - var planData = await planReceiptSubmit(params) - if (planData.data) { - - planData.data.forEach(item => { - list.push({ - itemCode: item.itemCode, // 物品代码 - itemName: item.itemName, // 物品名称 - packName: item.packName, // 包装名称 - packageCode: item.toPackingNumber, // 包装号 - batch: item.toBatch, //批次 - parentNumber: item.parentNumber, //父包装号 - itemType: item.itemType, //物料类型 - asnNumber: item.asnNumber, //ASN - supplierCode: item.supplierCode, // 供应商 - qty: item.qty, // 数量 - printTimes: getCurrDateTime(), // 打印时间 - productionLineCode: item.productionLineCode, //生产线 - barcodeString: item.barcodeString, // 标签信息 - barcodeBase64: '', - requestNumber: item.requestNumber + try{ + var planData = await planReceiptSubmit(params) + console.log('planData',planData) + if (planData.data) { + + planData.data.forEach(item => { + list.push({ + itemCode: item.itemCode, // 物品代码 + itemName: item.itemName, // 物品名称 + packName: item.packName, // 包装名称 + packageCode: item.toPackingNumber, // 包装号 + batch: item.toBatch, //批次 + parentNumber: item.parentNumber, //父包装号 + itemType: item.itemType, //物料类型 + asnNumber: item.asnNumber, //ASN + supplierCode: item.supplierCode, // 供应商 + qty: item.qty, // 数量 + printTimes: getCurrDateTime(), // 打印时间 + productionLineCode: item.productionLineCode, //生产线 + barcodeString: item.barcodeString, // 标签信息 + barcodeBase64: '', + requestNumber: item.requestNumber + }) }) - }) - } else { - throw new Error("提交失败") + } else { + throw new Error("提交失败") + } + }catch(error){ + console.log('异常',error) + if(error.indexOf('请返回开工阶段')>-1){ + uni.hideLoading() + this.showErrorMessage('计划已完成') + this.clearData() + this.openFg(); + return + } + } //装配收货记录 生成后 创建 制品上架申请 diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue index 71ac4b30..f6c8f562 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -157,18 +157,21 @@ } }, - onLoad() { - getCaptchaImage().then(res => { - if (res) { - var code = res.data.img; - let base64 = 'data:image/jpeg;base64,' + code - // console.log("图标", base64) - this.imageSrc = base64.replace(/[\r\n]/g, "") - this.uuid = res.data.uuid - } - }).catch(error => { - this.showErrorMessage(error); - }) + onLoad() { + if(this.needCode){ + getCaptchaImage().then(res => { + if (res) { + var code = res.data.img; + let base64 = 'data:image/jpeg;base64,' + code + // console.log("图标", base64) + this.imageSrc = base64.replace(/[\r\n]/g, "") + this.uuid = res.data.uuid + } + }).catch(error => { + this.showErrorMessage(error); + }) + } + this.getAppVersion() }, methods: {