diff --git a/env.js b/env.js index b87b72a..c33f58a 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/order/order-review-comps/ReviewDetail.vue b/pages/work/order/order-review-comps/ReviewDetail.vue index 6a04da5..6228e78 100644 --- a/pages/work/order/order-review-comps/ReviewDetail.vue +++ b/pages/work/order/order-review-comps/ReviewDetail.vue @@ -340,7 +340,7 @@ import voice from '@/core/utils/voice'; return this.goodsList.reduce((sum, item) => sum + (item.planQty || 0), 0); }, totalScannedQty() { - return this.goodsList.reduce((sum, item) => sum + (item.scannedQty || 0), 0); + return this.goodsList.reduce((sum, item) => sum + (this.isNoRecheck(item) ? (item.planQty || 0) : (item.scannedQty || 0)), 0); }, isReadOnly() { return String(this.detailInfo?.recheckStatus || '').toLowerCase() === 'fin'; @@ -351,6 +351,8 @@ import voice from '@/core/utils/voice'; return Number(this.pickMode) === 3; }, isScannedComplete() { + // 无需复核商品(need_recheck=N)视为已扫完成 + if (this.isNoRecheck(this.currentGoods)) return true; const plan = Number(this.currentGoods?.planQty || 0); const scanned = Number(this.currentGoods?.scannedQty || 0); return plan > 0 && scanned >= plan; @@ -363,7 +365,7 @@ import voice from '@/core/utils/voice'; }); }, isAllScanned() { - return this.goodsList.every(item => (item.scannedQty || 0) >= (item.planQty || 0)); + return this.goodsList.every(item => this.isNoRecheck(item) || (item.scannedQty || 0) >= (item.planQty || 0)); }, canConfirmRecheck() { return this.isAllMatched && this.isAllScanned; @@ -421,7 +423,13 @@ import voice from '@/core/utils/voice'; } return waybill || '--'; }, + isNoRecheck(item) { + // 无需复核商品(need_recheck=N,如虚拟赠品):视为已扫 + return String((item && item.need_recheck) || '').trim().toUpperCase() === 'N'; + }, isGoodsMatched(item) { + // 无需复核商品(need_recheck=N)直接视为已匹配/已扫 + if (this.isNoRecheck(item)) return true; const id = String(item?.id || ''); if (!id) return false; return !!this.matchedGoodsState[id]; diff --git a/pages/work/order/order-review.vue b/pages/work/order/order-review.vue index 2fa56cb..e5497ed 100644 --- a/pages/work/order/order-review.vue +++ b/pages/work/order/order-review.vue @@ -2507,6 +2507,8 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue'; const imageUrl = images.length > 0 ? String(images[0] || '') : ''; const planQty = Number(stockItem?.plan_qty ?? rawItem?.plan_qty ?? 0); const scannedQty = Number(rawItem?.scanned_qty ?? rawItem?.finish_qty ?? rawItem?.scannedQty ?? 0); + // 无需复核商品(need_recheck=N,如虚拟赠品):直接标记为已扫,已扫数量取计划数 + const needRecheck = String(stockItem?.need_recheck ?? rawItem?.need_recheck ?? '').trim().toUpperCase(); const stockName = stockItem ? String(stockItem.item_name || '').trim() : ''; const barcodeSource = stockItem?.barcodes || rawItem?.barcodes || rawItem?.barcode || snapshot?.barcodes || snapshot?.barcode || []; const stockBarcodes = this.normalizeBarcodeValues(barcodeSource); @@ -2517,7 +2519,9 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue'; lineNo: Number(rawItem?.order_line_no) || (index + 1), boxNo, planQty: isNaN(planQty) ? 0 : planQty, - scannedQty: isNaN(scannedQty) ? 0 : scannedQty, + // 无需复核商品(need_recheck=N):已扫数量视为计划数,卡片标记为已扫 + scannedQty: needRecheck === 'N' ? (isNaN(planQty) ? 0 : planQty) : (isNaN(scannedQty) ? 0 : scannedQty), + need_recheck: needRecheck, packageRequirement: String(rawItem?.packing_requirements || rawItem?.package_requirement || rawItem?.packageRequirement || rawItem?.packing_requirement || '').trim() || '--', skuCode: String(stockItem?.item_code || rawItem?.item_code || snapshot?.item_code || ''), skuName: stockName || String(snapshot?.item_name || rawItem?.item_name || '--'),