修改称重、订单拣货页面

This commit is contained in:
zm2000 2026-08-03 20:16:23 +08:00
parent a8d495346e
commit ec5dd24860
2 changed files with 43 additions and 8 deletions

View File

@ -28,6 +28,10 @@
</view>
<template v-else>
<view v-if="taskInfo.batchNo" class="wave-banner">
<text class="wave-banner__label">波次:</text>
<text class="wave-banner__value">{{ taskInfo.batchNo }}</text>
</view>
<view class="top-detail-panel">
<view v-if="!selectedPickItem" class="list-empty">暂无拣货数据</view>
<view v-else class="pick-card">
@ -1934,11 +1938,11 @@ import voice from '@/core/utils/voice';
.content-wrap {
flex: 1;
padding: 24rpx;
padding: 12rpx 24rpx 24rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
gap: 16rpx;
gap: 8rpx;
min-height: 0;
}
@ -1947,6 +1951,34 @@ import voice from '@/core/utils/voice';
min-height: 0;
}
.wave-banner {
flex: none;
display: flex;
align-items: center;
gap: 12rpx;
background: #ffffff;
border: 1rpx solid #ebeef5;
border-radius: 12rpx;
padding: 8rpx 24rpx;
}
.wave-banner__label {
flex-shrink: 0;
font-size: 28rpx;
color: #303133;
}
.wave-banner__value {
flex: 1;
min-width: 0;
font-size: 30rpx;
font-weight: 600;
color: #303133;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.nav-right {
padding-right: 24rpx;
display: flex;

View File

@ -163,14 +163,17 @@ import voice from '@/core/utils/voice';
this.orderItems = detailData.items || [];
this.expresses = detailData.expresses || [];
// 从订单详情中更新商品净重
if (detailData.detail && detailData.detail.items_weight !== undefined && detailData.detail.items_weight !== null) {
// 从订单详情中更新商品净重(仅在扫码接口未提供子单净重时,用主单净重兜底)
if (!this.netWeight && detailData.detail && detailData.detail.items_weight !== undefined && detailData.detail.items_weight !== null) {
this.netWeight = detailData.detail.items_weight;
}
// 从运单信息中更新称重重量
const firstExpress = (detailData.expresses || [])[0];
if (firstExpress && firstExpress.weighing_weight !== undefined && firstExpress.weighing_weight !== null) {
this.manualWeight = String(Math.round(firstExpress.weighing_weight));
// 从运单信息中更新称重重量:仅当扫描的子单号能精确匹配到对应运单时才填充,
// 匹配不到时称重重量留空,避免误用主单/其它运单的重量,由用户手动输入
const matchedExpress = (detailData.expresses || []).find(exp => exp.waybill_code === code);
if (matchedExpress && matchedExpress.weighing_weight !== undefined && matchedExpress.weighing_weight !== null) {
this.manualWeight = String(Math.round(matchedExpress.weighing_weight));
} else {
this.manualWeight = '';
}
}
} catch (e) {