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': '',