修改拣货、复核模块

This commit is contained in:
zm2000 2026-06-24 20:35:16 +08:00
parent aabf9a217d
commit 507da99f92
6 changed files with 41 additions and 23 deletions

4
env.js
View File

@ -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

View File

@ -290,7 +290,14 @@ import voice from '@/core/utils/voice';
.split(/[;,,|\s]+/)
.map(part => this.normalizeBarcode(part))
.filter(part => !!part)
.forEach(part => result.push(part));
.forEach(part => {
result.push(part);
// 包含汉字时,额外添加去除汉字后的部分作为候选
if (/[\u4e00-\u9fff]/.test(part)) {
const stripped = part.replace(/[\u4e00-\u9fff]+/g, '');
if (stripped) result.push(stripped);
}
});
});
return Array.from(new Set(result));
},
@ -661,9 +668,7 @@ import voice from '@/core/utils/voice';
.name-barcode-row .goods-name--compact {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
}
.barcode-tag {
@ -676,9 +681,7 @@ import voice from '@/core/utils/voice';
padding: 2rpx 10rpx;
line-height: 1.6;
max-width: 240rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
}
.barcode-tag--matched {
@ -915,9 +918,7 @@ import voice from '@/core/utils/voice';
.list-table-col--name {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
padding: 0 12rpx;
}

View File

@ -2189,15 +2189,16 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
}
},
buildOrderPrintDataParams(item) {
const id = item?.id ?? item?.orderId ?? item?.recordId;
if (this.listType === 'single') {
return {
order_ids: [Number(item.id)]
order_ids: [Number(id)]
};
}
// group 模式:使用接口返回的 order_ids
const orderIds = Array.isArray(item?.orderIds) ? item.orderIds : [];
return {
order_ids: orderIds.length > 0 ? orderIds : [Number(item.id)]
order_ids: orderIds.length > 0 ? orderIds : [Number(id)]
};
},
extractOrderPrintPayload(response) {

View File

@ -998,7 +998,23 @@
return;
}
const scanBarcode = this.normalizeBarcodeText(scanText);
const currentBarcodes = (this.selectedItemBarcode || '').split(/[,,、\s]+/).map(b => this.normalizeBarcodeText(b)).filter(b => b);
const rawParts = (this.selectedItemBarcode || '').split(/[,,、\s]+/);
const currentBarcodes = [];
rawParts.forEach(part => {
const normalized = this.normalizeBarcodeText(part);
if (!normalized) return;
currentBarcodes.push(normalized);
// 包含汉字时,额外添加去除汉字后的部分作为候选
if (/[\u4e00-\u9fff]/.test(normalized)) {
const stripped = normalized.replace(/[\u4e00-\u9fff]+/g, '');
if (stripped) {
console.log('[Picking] 候选条码含汉字,已添加去汉字版本:', normalized, '→', stripped);
currentBarcodes.push(stripped);
}
}
});
console.log('[Picking] 扫描条码:', scanBarcode, '原始值:', scanText);
console.log('[Picking] 商品候选条码:', currentBarcodes, '原始字段:', this.selectedItemBarcode);
if (scanBarcode && currentBarcodes.length > 0 && currentBarcodes.includes(scanBarcode)) {
this.triggerBarcodeMatchedHighlight(this.selectedPickItem);
this.submitWavePickTaskIntermediate();
@ -1682,8 +1698,11 @@
});
return;
}
// 取第一个条码,并去除汉字/全角标点
const firstPart = barcode.split(/[,,、\s]+/)[0] || barcode;
const searchKeyword = firstPart.replace(/[\u4e00-\u9fff\uFF00-\uFFEF]+/g, '').trim() || firstPart;
uni.navigateTo({
url: `/pages/work/product/query?keyword=${encodeURIComponent(barcode)}`
url: `/pages/work/product/query?keyword=${encodeURIComponent(searchKeyword)}`
});
},
handleCameraScan() {

View File

@ -573,9 +573,7 @@ export default {
flex: 1;
font-size: 35rpx;
color: #000;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
}
.info-row {

View File

@ -1221,7 +1221,8 @@
getStorageBodyStyle(item, mode = 'nonBatch') {
const minRows = 1;
const maxRows = 4;
const rowHeight = 56;
// 与 CSS .storage-table__row 的 min-height:72rpx + padding:8rpx 0 保持一致
const rowHeight = 88;
const rowCount = this.getStorageRowCount(item, mode);
const visibleRows = Math.min(Math.max(rowCount, minRows), maxRows);
return {
@ -2098,9 +2099,7 @@
flex: 1;
font-size: 35rpx;
color: #000;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
}
.empty-state {