修改商品查询页面
This commit is contained in:
parent
2aecd0e863
commit
45694c1942
4
env.js
4
env.js
@ -1,4 +1,4 @@
|
|||||||
// export const BASE_URL = 'http://qimen.wms.gztbyc.com' //生产环境接口地址
|
export const BASE_URL = 'http://qimen.wms.gztbyc.com' //生产环境接口地址
|
||||||
export const BASE_URL = 'http://192.168.11.56:6060' //开发环境接口地址
|
// export const BASE_URL = 'http://192.168.11.56:6060' //开发环境接口地址
|
||||||
export const API_URL = `${BASE_URL}/system` //后台接口域名
|
export const API_URL = `${BASE_URL}/system` //后台接口域名
|
||||||
export const IMG_URL = 'https://ye4s.file.gzxunren.com' //全局网络图片地址变量,css背景图片地址变量在uni.scss
|
export const IMG_URL = 'https://ye4s.file.gzxunren.com' //全局网络图片地址变量,css背景图片地址变量在uni.scss
|
||||||
|
|||||||
@ -65,7 +65,7 @@
|
|||||||
<view class="item-info">
|
<view class="item-info">
|
||||||
<view class="compact-row">
|
<view class="compact-row">
|
||||||
<text class="compact-label">商品编码:</text>
|
<text class="compact-label">商品编码:</text>
|
||||||
<text class="compact-value">{{ item.goods_code || item.item_code || '--' }}</text>
|
<text class="compact-value">{{ item.item_code || item.goods_code || '--' }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="compact-row">
|
<view class="compact-row">
|
||||||
<text class="compact-label">条码:</text>
|
<text class="compact-label">条码:</text>
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
<u-input v-model="formData.item_name" placeholder="请输入商品名称" clearable></u-input>
|
<u-input v-model="formData.item_name" placeholder="请输入商品名称" clearable></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="商品编码">
|
<u-form-item label="商品编码">
|
||||||
<u-input v-model="formData.goods_code" placeholder="请输入商品编码" clearable></u-input>
|
<u-input v-model="formData.item_code" placeholder="请输入商品编码" clearable></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="商品条码">
|
<u-form-item label="商品条码">
|
||||||
<u-input v-model="formData.barcodes" placeholder="多个条码用分号(;)分隔" clearable></u-input>
|
<u-input v-model="formData.barcodes" placeholder="多个条码用分号(;)分隔" clearable></u-input>
|
||||||
@ -259,8 +259,8 @@ export default {
|
|||||||
...cached
|
...cached
|
||||||
};
|
};
|
||||||
this.formData.item_name = String(cached.item_name || cached.product_name || cached.name || '');
|
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 || cached.goods_code || '');
|
||||||
this.formData.item_code = String(cached.item_code || '');
|
this.formData.goods_code = String(cached.goods_code || '');
|
||||||
this.formData.barcodes = this.normalizeBarcodeDisplay(cached);
|
this.formData.barcodes = this.normalizeBarcodeDisplay(cached);
|
||||||
this.formData.brand_name = String(cached.brand_name || '');
|
this.formData.brand_name = String(cached.brand_name || '');
|
||||||
this.formData.sku_property = String(cached.sku_property || '');
|
this.formData.sku_property = String(cached.sku_property || '');
|
||||||
@ -1227,13 +1227,13 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const itemCode = String(this.formData.goods_code || '').trim();
|
// 商品编码即 item_code(真实商品编码,如 011000001536),货品编码 goods_code 单独维护
|
||||||
if (!itemCode) {
|
const saveItemCode = String(this.formData.item_code || this.formData.goods_code || '').trim();
|
||||||
|
if (!saveItemCode) {
|
||||||
this.showToastMessage('请输入商品编码');
|
this.showToastMessage('请输入商品编码');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 真实商品编码优先取 item_code(如 011000001536),无则回退到商品编码输入值
|
const goodsCode = String(this.formData.goods_code || saveItemCode).trim();
|
||||||
const saveItemCode = String(this.formData.item_code || '').trim() || itemCode;
|
|
||||||
|
|
||||||
const stockUnit = String(this.formData.stock_unit || '').trim();
|
const stockUnit = String(this.formData.stock_unit || '').trim();
|
||||||
if (!stockUnit) {
|
if (!stockUnit) {
|
||||||
@ -1364,7 +1364,7 @@ export default {
|
|||||||
box_height: Number(this.formData.box_height) || 0,
|
box_height: Number(this.formData.box_height) || 0,
|
||||||
box_volume: Number(this.formData.box_volume) || 0,
|
box_volume: Number(this.formData.box_volume) || 0,
|
||||||
box_unit: String((this.rawItem && this.rawItem.box_unit) || ''),
|
box_unit: String((this.rawItem && this.rawItem.box_unit) || ''),
|
||||||
goods_code: itemCode
|
goods_code: goodsCode
|
||||||
};
|
};
|
||||||
|
|
||||||
if (recordId) {
|
if (recordId) {
|
||||||
@ -1412,7 +1412,7 @@ export default {
|
|||||||
item_name: itemName,
|
item_name: itemName,
|
||||||
product_name: itemName,
|
product_name: itemName,
|
||||||
name: itemName,
|
name: itemName,
|
||||||
goods_code: itemCode,
|
goods_code: goodsCode,
|
||||||
item_code: saveItemCode,
|
item_code: saveItemCode,
|
||||||
barcodes: barcodeList,
|
barcodes: barcodeList,
|
||||||
barcode: barcodeList[0] || (this.rawItem && this.rawItem.barcode) || '',
|
barcode: barcodeList[0] || (this.rawItem && this.rawItem.barcode) || '',
|
||||||
|
|||||||
@ -88,7 +88,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="item-row">
|
<view class="item-row">
|
||||||
<text class="label">商品编码:</text>
|
<text class="label">商品编码:</text>
|
||||||
<text class="value">{{ item.goods_code || item.item_code || '--' }}</text>
|
<text class="value">{{ item.item_code || item.goods_code || '--' }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-row">
|
<view class="item-row">
|
||||||
<text class="label">条码:</text>
|
<text class="label">条码:</text>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user