From 22821ba2c9b1984abaf3a61f287344a0e7ab6910 Mon Sep 17 00:00:00 2001 From: guoshuang Date: Thu, 28 Sep 2023 17:24:10 +0800 Subject: [PATCH] =?UTF-8?q?mes=E5=8A=9F=E8=83=BDbug=E4=BF=AE=E6=94=B9&?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E6=9C=8D=E5=8A=A1=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/mes/ProductionQtyInsp/index.vue | 11 ++++++----- src/utils/request.ts | 6 +++--- vue.config.js | 6 ++++-- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/pages/mes/ProductionQtyInsp/index.vue b/src/pages/mes/ProductionQtyInsp/index.vue index edcf127..5d254f7 100644 --- a/src/pages/mes/ProductionQtyInsp/index.vue +++ b/src/pages/mes/ProductionQtyInsp/index.vue @@ -230,11 +230,12 @@ export default class productCheckReceipt extends BasePage { this.customToast('请输入nficl'); return; } - let orderNoItemList = await this.model.queryOrderNo(this.orderNo); - if (orderNoItemList == undefined) { + await this.model.queryOrderNo(this.orderNo); + //console.log('???',model.orderNoItemList) + if (model.orderNoItemList == undefined) { this.customToast('该rfid未查到数据,请使用正确的rfid!'); } else { - this.orderNoItemList = orderNoItemList; + this.orderNoItemList = model.orderNoItemList; } //console.log('this.orderNoItemList', this.orderNoItemList); } @@ -257,7 +258,7 @@ export default class productCheckReceipt extends BasePage { this.customToast('请输入nficl'); return; } - if (this.orderNoItemList.orderCode == undefined) { + if (Object.keys(this.orderNoItemList).length === 0) { this.customToast('该rfid不可用,不可质检'); return; } @@ -309,7 +310,7 @@ export default class productCheckReceipt extends BasePage { checkResult: this.productCodeList.value, }; await this.model.sendDestinationStations(params); - this.uni.showToast({ title: '质检成功' }); + //this.uni.showToast({ title: '质检成功' }); this.orderNo = ''; this.badMeg = ''; this.productCodeList = {}; diff --git a/src/utils/request.ts b/src/utils/request.ts index 4236738..78c8e10 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -23,11 +23,11 @@ let loading: any; http.interceptors.request.use( (config: any) => { //console.log('123456',config) - //生产请将注释解开 + //生产请将注释解开重要重要 // if (config.url.includes('/api')) { // config.baseURL = 'http://192.168.202.23:5001'; // } else { - // config.baseURL = 'http://192.168.202.20:9000'; + // config.baseURL = 'http://192.168.202.34:30000'; // } // 所有请求默认提示加载中 if (!loading) { @@ -104,7 +104,7 @@ http.interceptors.response.use( break; default: // 不是正确的 code - errorCreate(dataAxios.msg, response.config.custom.hideError); + errorCreate(dataAxios.msg || dataAxios.message, response.config.custom.hideError); break; } } else if (status !== undefined) { diff --git a/vue.config.js b/vue.config.js index bc81a17..63ac076 100644 --- a/vue.config.js +++ b/vue.config.js @@ -2,8 +2,10 @@ module.exports = { devServer: { proxy: { '/prod-api': { - //target: 'http://192.168.3.93:81', - target: 'http://192.168.202.20:9000', + //正式生产 + target: 'http://192.168.202.34:30000', + //测试生产 + //target: 'http://192.168.202.20:9000', changeOrigin: true, // pathRewrite: { // '^/prod-ap': '',