修改复核模块的包材功能

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