修改复核模块的包材功能

This commit is contained in:
zm2000 2026-06-17 17:18:13 +08:00
parent 348d1e8cc7
commit 3b380f4761

View File

@ -17,7 +17,7 @@
</view>
<view class="page-head-row page-head-row--wave">
<text class="page-head-label">{{ detailInfo.listType === 'group' ? '运单:' : '波次:' }}</text>
<text class="page-head-wave">{{ detailInfo.listType === 'group' ? (detailInfo.waybillNo || '--') : (detailInfo.waveNo || '--') }}</text>
<text class="page-head-wave">{{ detailInfo.listType === 'group' ? (detailInfo.waybillNo && detailInfo.waybillNo !== '--' ? detailInfo.waybillNo : '') : (detailInfo.waveNo && detailInfo.waveNo !== '--' ? detailInfo.waveNo : '') }}</text>
</view>
<view class="page-head-row page-head-row--bottom">
<text class="page-head-picker">拣货人:{{ detailInfo.pickerName }}</text>
@ -152,6 +152,8 @@
v-model="packagingWaybillNo"
placeholder="请输入运单号"
placeholder-style="color:#c0c4cc;font-size:32rpx"
@focus="packagingWaybillFocused = true"
@blur="packagingWaybillFocused = false"
/>
</view>
<view class="packaging-row">
@ -176,8 +178,8 @@
:class="{ 'packaging-option--active': packagingSelectedCode === (item.code || '') }"
@mousedown.stop="handlePackagingSelect(item)"
>
<text class="packaging-option-code">{{ item.code || '--' }}</text>
<text class="packaging-option-name">{{ item.name || '--' }}</text>
<text class="packaging-option-code">{{ item.code || '' }}</text>
<text class="packaging-option-name">{{ item.name || '' }}</text>
</view>
</scroll-view>
</view>
@ -215,6 +217,7 @@
_weighAfterReview: false,
showPackagingPopup: false,
packagingWaybillNo: '',
packagingWaybillFocused: false,
packagingSearchKeyword: '',
packagingSelectedCode: '',
packagingSelectedName: '',
@ -226,7 +229,7 @@
orderId: 0,
waveId: '',
waveNo: '--',
waybillNo: '--',
waybillNo: '',
matchType: '',
recheckStatus: '',
pickerName: '--',
@ -272,7 +275,7 @@
},
headMatchValue() {
if (this.detailInfo?.matchType === 'waybill') {
return this.detailInfo?.waybillNo || '--';
return (this.detailInfo?.waybillNo && this.detailInfo.waybillNo !== '--') ? this.detailInfo.waybillNo : '';
}
if (this.detailInfo?.matchType === 'cart') {
return this.detailInfo?.cartNo || '--';
@ -364,7 +367,7 @@
orderId: Number(options?.orderId || options?.recordId || 0),
waveId: String(options?.waveId || '').trim(),
waveNo: safeDecode(options?.waveNo) || '--',
waybillNo: safeDecode(options?.waybillNo) || '--',
waybillNo: safeDecode(options?.waybillNo) || '',
matchType,
recheckStatus,
pickerName: safeDecode(options?.pickerName) || '--',
@ -928,7 +931,7 @@
}
},
async handlePackaging() {
this.packagingWaybillNo = this.detailInfo?.waybillNo || '';
this.packagingWaybillNo = (this.detailInfo?.waybillNo && this.detailInfo.waybillNo !== '--') ? this.detailInfo.waybillNo : '';
this.packagingSearchKeyword = '';
this.packagingSelectedCode = '';
this.packagingSelectedName = '';
@ -1014,6 +1017,12 @@
this.showPackagingDropdown = false;
},
async handlePackagingScanMatch(scanCode) {
// 焦点在运单号输入框时,回填到运单号
if (this.packagingWaybillFocused) {
this.packagingWaybillNo = scanCode;
uni.showToast({ title: '已填入运单号', icon: 'none' });
return;
}
// 确保包材列表已加载
if (this.packagingMaterialList.length === 0) {
await this.loadPackagingMaterialList();