From ab9d199fe3c6e42776c9ef20222660136207763f Mon Sep 17 00:00:00 2001 From: HongxuanG <1359774872@qq.com> Date: Tue, 18 Aug 2026 14:06:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(storegoods):=20=E6=89=AB=E7=A0=81=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E5=B1=95=E7=A4=BA=E7=BB=86=E7=A0=81=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E5=B9=B6=E5=8E=BB=E6=8E=89=E6=9C=AC=E8=A1=8C=E5=8C=B9=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- src/common/storeGoodsProcessReturnIn.js | 12 +++++++++++- src/components/storegoods/ProcessInScanDetail.vue | 8 ++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/common/storeGoodsProcessReturnIn.js b/src/common/storeGoodsProcessReturnIn.js index 486a4ca..b50a325 100644 --- a/src/common/storeGoodsProcessReturnIn.js +++ b/src/common/storeGoodsProcessReturnIn.js @@ -213,6 +213,16 @@ export function getEmptyScanDetail() { }; } +/** 刚扫细码的数量(公斤存储值):优先细码 weight */ +function pickScannedFineWeight(res) { + if (!res) return 0; + if (res.weight != null && res.weight !== '') return res.weight; + if (res.base_unit_weight != null && res.base_unit_weight !== '') return res.base_unit_weight; + if (res.settle_weight != null && res.settle_weight !== '') return res.settle_weight; + if (res.actually_weight != null && res.actually_weight !== '') return res.actually_weight; + return res.item_weight; +} + /** 从扫码接口返回构建详情区(匹数÷100,数量÷10000) */ export function buildScanDetailFromScanResponse(res) { if (!res) return getEmptyScanDetail(); @@ -225,7 +235,7 @@ export function buildScanDetailFromScanResponse(res) { order_roll: formatRoll(res.order_roll != null ? res.order_roll : res.total_roll), item_roll: formatRoll(res.item_roll != null ? res.item_roll : res.roll), order_weight: formatWeightKg(res.order_weight != null ? res.order_weight : res.total_weight), - item_weight: formatWeightKg(res.item_weight != null ? res.item_weight : res.weight), + item_weight: formatWeightKg(pickScannedFineWeight(res)), }; } diff --git a/src/components/storegoods/ProcessInScanDetail.vue b/src/components/storegoods/ProcessInScanDetail.vue index ee246c1..089e2e7 100644 --- a/src/components/storegoods/ProcessInScanDetail.vue +++ b/src/components/storegoods/ProcessInScanDetail.vue @@ -10,15 +10,11 @@ 成品色号:{{ detail.product_color_code || '-' }} - 本行匹数:{{ detail.item_roll != null ? detail.item_roll : '-' }} + 本行数量:{{ detail.item_weight != null ? detail.item_weight : '-' }} - 本行数量:{{ detail.item_weight != null ? detail.item_weight : '-' }} 本单匹数:{{ detail.order_roll != null ? detail.order_roll : '-' }} - - - 本单数量: - {{ detail.order_weight != null ? detail.order_weight : '-' }} + 本单数量:{{ detail.order_weight != null ? detail.order_weight : '-' }}