fix(storegoods): 扫码详情展示细码数量并去掉本行匹数
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
863f0fe850
commit
ab9d199fe3
@ -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)),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -10,15 +10,11 @@
|
||||
</view>
|
||||
<view class="fabric-out-scanDetailRow fabric-out-scanDetailRow--2col">
|
||||
<text class="fabric-out-scanDetailCell">成品色号:{{ detail.product_color_code || '-' }}</text>
|
||||
<text class="fabric-out-scanDetailCell">本行匹数:{{ detail.item_roll != null ? detail.item_roll : '-' }}</text>
|
||||
<text class="fabric-out-scanDetailCell">本行数量:{{ detail.item_weight != null ? detail.item_weight : '-' }}</text>
|
||||
</view>
|
||||
<view class="fabric-out-scanDetailRow fabric-out-scanDetailRow--2col">
|
||||
<text class="fabric-out-scanDetailCell">本行数量:{{ detail.item_weight != null ? detail.item_weight : '-' }}</text>
|
||||
<text class="fabric-out-scanDetailCell">本单匹数:{{ detail.order_roll != null ? detail.order_roll : '-' }}</text>
|
||||
</view>
|
||||
<view class="fabric-out-scanDetailRow">
|
||||
<text class="fabric-out-scanDetailLabel">本单数量:</text>
|
||||
<text class="fabric-out-scanDetailValue">{{ detail.order_weight != null ? detail.order_weight : '-' }}</text>
|
||||
<text class="fabric-out-scanDetailCell">本单数量:{{ detail.order_weight != null ? detail.order_weight : '-' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user