From 34015dc5642c31f4f7036237039ac65a197b6ac1 Mon Sep 17 00:00:00 2001 From: zm2000 <18386612143@163.com> Date: Sat, 29 Aug 2026 11:27:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=8D=E6=A0=B8=E5=8F=91?= =?UTF-8?q?=E8=B4=A7=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- env.js | 4 +- .../order/order-review-comps/ReviewDetail.vue | 9 +++- pages/work/order/order-review.vue | 42 +++++++++++++++++-- 3 files changed, 49 insertions(+), 6 deletions(-) diff --git a/env.js b/env.js index b87b72a..c33f58a 100644 --- a/env.js +++ b/env.js @@ -1,4 +1,4 @@ -export const BASE_URL = 'http://qimen.wms.gztbyc.com' //生产环境接口地址 -// export const BASE_URL = 'http://192.168.11.56:6060' //开发环境接口地址 +// export const BASE_URL = 'http://qimen.wms.gztbyc.com' //生产环境接口地址 +export const BASE_URL = 'http://192.168.11.56:6060' //开发环境接口地址 export const API_URL = `${BASE_URL}/system` //后台接口域名 export const IMG_URL = 'https://ye4s.file.gzxunren.com' //全局网络图片地址变量,css背景图片地址变量在uni.scss diff --git a/pages/work/order/order-review-comps/ReviewDetail.vue b/pages/work/order/order-review-comps/ReviewDetail.vue index c6355a5..ae190b2 100644 --- a/pages/work/order/order-review-comps/ReviewDetail.vue +++ b/pages/work/order/order-review-comps/ReviewDetail.vue @@ -361,6 +361,8 @@ import voice from '@/core/utils/voice'; }, isAllMatched() { return this.goodsList.every(item => { + // 无需复核商品(need_recheck=N,如虚拟赠品)视为已匹配 + if (this.isNoRecheck(item)) return true; const id = String(item?.id || ''); if (!id) return false; return !!this.matchedGoodsState[id]; @@ -396,7 +398,12 @@ import voice from '@/core/utils/voice'; } const total = this.totalPlanQty; const scanned = this.totalScannedQty; - if (total > 0 && scanned >= total) { + // 全部为"无需复核"商品(need_recheck=N)时不在此触发 allScanned: + // 此类订单商品初始即"已扫满",切换订单/进入详情时 goodsList 变化会误触发, + // 导致自动模式跳过"点击商品卡片核对"直接连续自动发货。 + // 该场景改由父组件 handleGoodsItemClick(点击商品卡片)触发发货。 + const allNoRecheck = this.goodsList.length > 0 && this.goodsList.every(item => this.isNoRecheck(item)); + if (total > 0 && scanned >= total && !allNoRecheck) { this.$emit('allScanned'); } }, diff --git a/pages/work/order/order-review.vue b/pages/work/order/order-review.vue index 8da2b1d..812c9e9 100644 --- a/pages/work/order/order-review.vue +++ b/pages/work/order/order-review.vue @@ -508,6 +508,8 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue'; dprefixedAllScannedHandled: false, packageBindingCancelled: false, skipPackagePopupOnAllScanned: false, + // 订单全部为"无需复核"商品时的"点击商品卡片触发发货"防重入标志:每次进入新订单复位 + noRecheckAutoAdvanceHandled: false, showDetailView: false, showListDrawer: false, detailGoodsList: [], @@ -1718,8 +1720,13 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue'; if (this.keyword) { this.handleSearch(); } else { - this.initializeOrderList(); - this.currentPage = 1; + // 无 task_id 且无关键字:不能调用 scanTask 也无法重新搜索, + // 保持当前列表不清空(initializeOrderList 会清空 orderList, + // 导致底部统计栏 v-if="orderList.length > 0" 隐藏,刷新按钮/统计行消失) + uni.showToast({ + title: '暂无任务ID,无法刷新', + icon: 'none' + }); } return; } @@ -2451,6 +2458,8 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue'; }, goPickGoodsDetail(item, continueAfterIntercept = false) { if (!item) return; + // 复位"无需复核商品点击卡片触发发货"防重入标志(每次进入新订单重新允许触发一次) + this.noRecheckAutoAdvanceHandled = false; // 散单模式:被拦截订单不允许进入详情/复核扫描/打印/发货流程 // 语音提示"此单已拦截",并弹出当前订单的拦截信息(仅显示当前一个订单) @@ -2698,6 +2707,7 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue'; this.detailGoodsList = []; this.dprefixedBarcodeVerified = false; this.dprefixedAllScannedHandled = false; + this.noRecheckAutoAdvanceHandled = false; // 从详情返回后刷新列表 // D波次:keyword 是商品条码,scanOrder 不支持,依赖本地已更新的 orderList if (this.keyword && !this.isDprefixedWave) { @@ -2743,7 +2753,14 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue'; }, handleDrawerOrderClick(item) { this.showListDrawer = false; - this.goPickGoodsDetail(item); + // 已复核订单禁止再次进入复核流程: + // 订单列表"已复核"以 isReviewed(散单)/ unreviewedCount===0(团单)标记, + // 而 goPickGoodsDetail 只以 recheckStatus==='fin' 决定只读详情(isDetailReadOnly)。 + // 两者不一致时,从列表点击已复核订单会以可复核状态进入,此处统一兜底为 fin(只读查看)。 + const isReviewed = !!item?.isReviewed + || String(item?.recheckStatus || '').trim().toLowerCase() === 'fin' + || (this.listType !== 'single' && (item?.unreviewedCount || 0) === 0); + this.goPickGoodsDetail(isReviewed ? { ...item, recheckStatus: 'fin' } : item); }, // 判断当前订单所属波次是否含有被拦截的订单 // 散单模式(single):一个波次含多个订单,只要波次内任一订单被拦截,波次内所有订单的复核详情都显示拦截信息按钮 @@ -2916,6 +2933,25 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue'; this.weighWeight = 0; this.showWeighPopup = true; } + // 订单所有商品均为"无需复核"(need_recheck=N,如虚拟赠品)或已扫满时: + // 不直接走下一步流程,操作人员点击商品卡片核对后再触发复核发货流程 + // (自动模式直接发货,手动模式提示点击确认复核) + // 原因:ReviewDetail 的 allScanned 仅在 goodsList 变化时触发,此类订单商品从不变化, + // 不会走到 handleDetailAllScanned 发货链路,故点击商品卡片时主动触发一次。 + // 排除 D前缀波次(有自己的自动复核流程 completeDprefixedAutoReview)和已复核只读订单(fin) + if ( + !this.isDprefixedWave && + !this.noRecheckAutoAdvanceHandled && + this.detailGoodsList.length > 0 && + String(this.detailInfo?.recheckStatus || '').toLowerCase() !== 'fin' && + this.detailGoodsList.every(g => + String(g.need_recheck || '').trim().toUpperCase() === 'N' || + Number(g.scannedQty || 0) >= Number(g.planQty || 0) + ) + ) { + this.noRecheckAutoAdvanceHandled = true; + this.handleDetailAllScanned(); + } }, afterPackageBinding() { // D前缀波次:跳过称重,确认复核后返回列表,等待下一个商品条码