diff --git a/env.js b/env.js index c33f58a..b87b72a 100644 --- a/env.js +++ b/env.js @@ -1,4 +1,4 @@ -// export const BASE_URL = 'http://qimen.wms.gztbyc.com' //生产环境接口地址 -export const BASE_URL = 'http://192.168.11.56:6060' //开发环境接口地址 +export const BASE_URL = 'http://qimen.wms.gztbyc.com' //生产环境接口地址 +// export const BASE_URL = 'http://192.168.11.56:6060' //开发环境接口地址 export const API_URL = `${BASE_URL}/system` //后台接口域名 export const IMG_URL = 'https://ye4s.file.gzxunren.com' //全局网络图片地址变量,css背景图片地址变量在uni.scss diff --git a/pages/work/product/detail.vue b/pages/work/product/detail.vue index 1cb9cb8..8090182 100644 --- a/pages/work/product/detail.vue +++ b/pages/work/product/detail.vue @@ -65,7 +65,7 @@ 商品编码: - {{ item.goods_code || item.item_code || '--' }} + {{ item.item_code || item.goods_code || '--' }} 条码: diff --git a/pages/work/product/edit.vue b/pages/work/product/edit.vue index f25d5cf..c4e4c0e 100644 --- a/pages/work/product/edit.vue +++ b/pages/work/product/edit.vue @@ -10,7 +10,7 @@ - + @@ -259,8 +259,8 @@ export default { ...cached }; this.formData.item_name = String(cached.item_name || cached.product_name || cached.name || ''); - this.formData.goods_code = String(cached.goods_code || cached.item_code || ''); - this.formData.item_code = String(cached.item_code || ''); + this.formData.item_code = String(cached.item_code || cached.goods_code || ''); + this.formData.goods_code = String(cached.goods_code || ''); this.formData.barcodes = this.normalizeBarcodeDisplay(cached); this.formData.brand_name = String(cached.brand_name || ''); this.formData.sku_property = String(cached.sku_property || ''); @@ -1227,13 +1227,13 @@ export default { return; } - const itemCode = String(this.formData.goods_code || '').trim(); - if (!itemCode) { + // 商品编码即 item_code(真实商品编码,如 011000001536),货品编码 goods_code 单独维护 + const saveItemCode = String(this.formData.item_code || this.formData.goods_code || '').trim(); + if (!saveItemCode) { this.showToastMessage('请输入商品编码'); return; } - // 真实商品编码优先取 item_code(如 011000001536),无则回退到商品编码输入值 - const saveItemCode = String(this.formData.item_code || '').trim() || itemCode; + const goodsCode = String(this.formData.goods_code || saveItemCode).trim(); const stockUnit = String(this.formData.stock_unit || '').trim(); if (!stockUnit) { @@ -1364,7 +1364,7 @@ export default { box_height: Number(this.formData.box_height) || 0, box_volume: Number(this.formData.box_volume) || 0, box_unit: String((this.rawItem && this.rawItem.box_unit) || ''), - goods_code: itemCode + goods_code: goodsCode }; if (recordId) { @@ -1412,7 +1412,7 @@ export default { item_name: itemName, product_name: itemName, name: itemName, - goods_code: itemCode, + goods_code: goodsCode, item_code: saveItemCode, barcodes: barcodeList, barcode: barcodeList[0] || (this.rawItem && this.rawItem.barcode) || '', diff --git a/pages/work/product/query.vue b/pages/work/product/query.vue index a169e41..d89c9fc 100644 --- a/pages/work/product/query.vue +++ b/pages/work/product/query.vue @@ -88,7 +88,7 @@ 商品编码: - {{ item.goods_code || item.item_code || '--' }} + {{ item.item_code || item.goods_code || '--' }} 条码: