diff --git a/pages/work/order/order-review-comps/ReviewDetail.vue b/pages/work/order/order-review-comps/ReviewDetail.vue
index 0e6a664..afae545 100644
--- a/pages/work/order/order-review-comps/ReviewDetail.vue
+++ b/pages/work/order/order-review-comps/ReviewDetail.vue
@@ -178,6 +178,22 @@
+
+
+
+
+
@@ -253,7 +269,11 @@ import voice from '@/core/utils/voice';
pendingScanCode: '',
_dismissedMultiMatchCodes: [],
_lastScanCode: '',
- _lastScanTime: 0
+ _lastScanTime: 0,
+ showNoBarcodePopup: false,
+ noBarcodeItemName: '',
+ noBarcodePickedCount: 0,
+ noBarcodeItemTotalQty: 0
};
},
computed: {
@@ -512,27 +532,31 @@ import voice from '@/core/utils/voice';
return;
}
- uni.showModal({
- title: '无条码复核',
- content: `将商品「${skuName}」标记为已复核(${scannedQty}/${planQty} → ${planQty}/${planQty})?`,
- success: (res) => {
- if (!res.confirm) return;
- this.$emit('updateScannedQty', this.currentGoodsIndex, planQty);
- const matchId = String(item.id || '');
- if (matchId) {
- this.matchedGoodsId = matchId;
- if (typeof this.$set === 'function') {
- this.$set(this.matchedGoodsState, matchId, true);
- } else {
- this.matchedGoodsState[matchId] = true;
- }
- }
- // 标记当前商品条码匹配
- this.$emit('barcodeMatched', matchId);
- uni.showToast({ title: `已标记为已复核(${planQty}/${planQty})`, icon: 'success' });
- voice.speak('数据一致');
+ // 设置弹窗数据
+ this.noBarcodeItemName = skuName;
+ this.noBarcodePickedCount = scannedQty;
+ this.noBarcodeItemTotalQty = planQty;
+ this.showNoBarcodePopup = true;
+ },
+ confirmNoBarcodeReview() {
+ const item = this.currentGoods;
+ if (!item) return;
+ const planQty = item.planQty || 0;
+ this.showNoBarcodePopup = false;
+ this.$emit('updateScannedQty', this.currentGoodsIndex, planQty);
+ const matchId = String(item.id || '');
+ if (matchId) {
+ this.matchedGoodsId = matchId;
+ if (typeof this.$set === 'function') {
+ this.$set(this.matchedGoodsState, matchId, true);
+ } else {
+ this.matchedGoodsState[matchId] = true;
}
- });
+ }
+ // 标记当前商品条码匹配
+ this.$emit('barcodeMatched', matchId);
+ uni.showToast({ title: `已标记为已复核(${planQty}/${planQty})`, icon: 'success' });
+ voice.speak('数据一致');
},
previewCurrentGoodsImage() {
const images = this.getCurrentGoodsImageList();
@@ -1309,4 +1333,62 @@ import voice from '@/core/utils/voice';
.multi-match-footer-btn:active {
opacity: 0.7;
}
+
+ /* 无条码复核弹窗 */
+ .no-barcode-popup {
+ width: 640rpx;
+ padding: 40rpx 32rpx 32rpx;
+ background: #ffffff;
+ border-radius: 20rpx;
+ box-sizing: border-box;
+ }
+
+ .no-barcode-popup__title {
+ font-size: 42rpx;
+ font-weight: 600;
+ color: #303133;
+ text-align: center;
+ margin-bottom: 32rpx;
+ }
+
+ .no-barcode-popup__body {
+ margin-bottom: 36rpx;
+ padding: 24rpx;
+ background: #f8f9fa;
+ border-radius: 12rpx;
+ }
+
+ .no-barcode-popup__text {
+ font-size: 36rpx;
+ color: #303133;
+ line-height: 1.6;
+ }
+
+ .no-barcode-popup__actions {
+ display: flex;
+ align-items: center;
+ gap: 20rpx;
+ }
+
+ .no-barcode-popup__btn {
+ flex: 1;
+ height: 88rpx;
+ border-radius: 12rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 36rpx;
+ font-weight: 500;
+ }
+
+ .no-barcode-popup__btn--cancel {
+ background: #f5f7fa;
+ color: #606266;
+ border: 1rpx solid #dcdfe6;
+ }
+
+ .no-barcode-popup__btn--confirm {
+ background: #2979ff;
+ color: #ffffff;
+ }
diff --git a/pages/work/order/order-review.vue b/pages/work/order/order-review.vue
index a219694..035ba37 100644
--- a/pages/work/order/order-review.vue
+++ b/pages/work/order/order-review.vue
@@ -524,6 +524,13 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
return 'reviewFirst';
}
return this.printMode;
+ },
+ isDprefixedWave() {
+ // D前缀波次:单品单件订单,无需逐件扫描
+ if (this.listType !== 'single') return false;
+ const list = Array.isArray(this.orderList) ? this.orderList : [];
+ if (!list.length) return false;
+ return list.some(item => String(item.waveNo || '').startsWith('D'));
}
},
onLoad(options) {
@@ -1154,6 +1161,38 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
}
this.goPickGoodsDetail(target);
},
+ findOrderByProductBarcode(barcode) {
+ if (!barcode || !Array.isArray(this.orderList)) return null;
+ const kw = String(barcode).trim().toLowerCase();
+ if (!kw) return null;
+ for (const order of this.orderList) {
+ // 跳过已复核的订单
+ if (order.isReviewed) continue;
+ const items = Array.isArray(order.detailItems) ? order.detailItems : [];
+ for (const item of items) {
+ if (!item || typeof item !== 'object') continue;
+ // 检查 stock 中的 barcodes 数组
+ const stock = item.stock && typeof item.stock === 'object' ? item.stock : null;
+ if (stock && Array.isArray(stock.barcodes)) {
+ if (stock.barcodes.some(b => String(b || '').trim().toLowerCase() === kw)) {
+ return order;
+ }
+ }
+ // 检查 item_snapshot 中的条码
+ const snapshot = item.item_snapshot && typeof item.item_snapshot === 'object' ? item.item_snapshot : null;
+ if (snapshot) {
+ const snapBarcode = String(snapshot.barcode || '').trim().toLowerCase();
+ if (snapBarcode === kw) return order;
+ const snapCode = String(snapshot.item_code || '').trim().toLowerCase();
+ if (snapCode === kw) return order;
+ }
+ // 检查 item 直接字段
+ const itemCode = String(item.item_code || '').trim().toLowerCase();
+ if (itemCode === kw) return order;
+ }
+ }
+ return null;
+ },
handleSearch() {
const text = this.normalizeKeyword(this.keyword);
if (!text) return;
@@ -1179,6 +1218,17 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
}
return;
}
+ // D前缀波次:在订单列表中查找商品条码所属订单
+ if (this.isDprefixedWave) {
+ const matchedOrder = this.findOrderByProductBarcode(text);
+ if (matchedOrder) {
+ this.goPickGoodsDetail(matchedOrder);
+ } else {
+ uni.showToast({ title: '未找到匹配的商品', icon: 'none' });
+ this.speakVoice('无记录');
+ }
+ return;
+ }
// 已绑定打印台或设置为不打印时,切换到搜索订单功能
if (this.printStationId || this.printMode === 'noPrint') {
this.requestScanOrder(text);
@@ -1593,8 +1643,10 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
icon: 'none'
});
}
+ // D前缀波次:不自动进入详情,等待扫描商品条码定位所属订单
// 自动选中订单:输入搜索选第一个,任务刷新选最后一个
this.$nextTick(() => {
+ if (this.isDprefixedWave) return;
const unreviewedItems = this.orderList.filter(item => !item.isReviewed);
const target = this._autoSelectFirst ? unreviewedItems[0] : unreviewedItems.pop();
if (target) {
@@ -1907,6 +1959,17 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
this.showDetailView = true;
this.listExpanded = false;
+ // D前缀波次:自动标记所有商品为已扫,跳过逐件扫描
+ if (this.isDprefixedWave && this.detailGoodsList.length > 0) {
+ this.detailGoodsList = this.detailGoodsList.map(g => ({
+ ...g,
+ scannedQty: g.planQty
+ }));
+ this.$nextTick(() => {
+ this.handleDetailAllScanned();
+ });
+ }
+
// 先打印后复核:进入详情时自动触发未打印订单的打印
if (this.effectivePrintMode === 'printFirst' && this.printStationId) {
const isGroup = this.listType === 'group';
@@ -2029,6 +2092,11 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
}
},
afterPackageBinding() {
+ // D前缀波次:跳过称重,确认复核后返回列表,等待下一个商品条码
+ if (this.isDprefixedWave) {
+ this.handleDprefixedAutoConfirm();
+ return;
+ }
// 团购模式始终需要称重,散单根据设置
const needWeigh = this.listType === 'group' || this.weighAfterReview;
if (needWeigh) {
@@ -2296,6 +2364,15 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
setTimeout(() => this.goToNextOrder(), 500);
}
},
+ async handleDprefixedAutoConfirm() {
+ // D前缀波次:确认复核后返回列表,等待下一个商品条码扫描定位
+ const ok = await this.callConfirmRecheck();
+ if (ok) {
+ setTimeout(() => {
+ this.backToList();
+ }, 500);
+ }
+ },
goToNextOrder() {
// 标记当前已复核
const currentId = String(this.detailInfo?.orderId || this.detailInfo?.recordId || '');
diff --git a/pages/work/order/picking.vue b/pages/work/order/picking.vue
index edb8d0c..13251d3 100644
--- a/pages/work/order/picking.vue
+++ b/pages/work/order/picking.vue
@@ -51,6 +51,7 @@
class="detail-main-right"
:class="{ 'detail-main-right--matched': isSelectedItemMatchedHighlight() }"
@click="goProductQueryByCurrentBarcode"
+ @longpress="handleLongPressItem"
>
{{ selectedPickItem.itemName || '--' }}
@@ -159,6 +160,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+