修改复核发货页面

This commit is contained in:
zm2000 2026-08-29 11:27:35 +08:00
parent 512ed452e4
commit 34015dc564
3 changed files with 49 additions and 6 deletions

4
env.js
View File

@ -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

View File

@ -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');
}
},

View File

@ -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前缀波次:跳过称重,确认复核后返回列表,等待下一个商品条码