修改订单复核页面

This commit is contained in:
zm2000 2026-08-14 16:51:20 +08:00
parent a1a68d9cb3
commit 3174c068db
5 changed files with 189 additions and 8 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

@ -71,6 +71,7 @@ import voice from '@/core/utils/voice';
const map = {
'': '未拦截',
'none': '未拦截',
'requested': '拦截中',
'pending': '拦截中',
'intercepting': '拦截中',
'intercepted': '仓库已拦截',

View File

@ -78,7 +78,7 @@
:class="isPrintDisabled(item) ? 'record-value--print-disabled' : 'record-value--unprinted'"
@click.stop="!isPrintDisabled(item) && $emit('printClick', item)"
>未打印</text>
<text v-if="item.interceptStatus && item.interceptStatus !== 'none'" class="record-value--intercepted">拦截</text>
<text v-if="isIntercepted(item)" class="record-value--intercepted">拦截</text>
</view>
</view>
</view>
@ -89,6 +89,19 @@
</template>
<script>
// 统一的拦截状态集合(与 interceptionLog.vue 的拦截状态映射保持一致)
// '' 与 'none' 视为未拦截,其余(含 requested/pending/intercepting/intercepted 等)均视为已拦截
const INTERCEPT_STATUSES = [
'requested',
'pending',
'intercepting',
'intercepted',
'intercepted_at_warehouse',
'intercept_success',
'intercept_failed',
'cancelled'
];
export default {
name: 'OrderList',
created() {
@ -133,6 +146,10 @@
}
},
methods: {
isIntercepted(item) {
const status = String(item?.interceptStatus || '').trim();
return INTERCEPT_STATUSES.includes(status);
},
getReviewStatusText(item) {
if (!item) return '--';
if (this.listType === 'single') {

View File

@ -28,6 +28,9 @@
<text class="store-info-divider"></text>
</template>
<text class="store-info-text">货主:{{ detailInfo.storeName }}</text>
<view v-if="isIntercepted" class="intercept-info-btn intercept-info-btn--row" @click="showInterceptInfoPopup = true">
<text class="intercept-info-btn__text">拦截信息</text>
</view>
</view>
<view v-if="detailInfo.listType === 'group'" class="wave-info-row">
<text class="wave-info-text">订单数:{{ detailInfo.totalOrders || '--' }}</text>
@ -35,6 +38,9 @@
<text class="wave-info-text">篮号:{{ detailInfo.waveIndex || detailInfo.boxNo || '--' }}</text>
<text class="wave-info-divider"></text>
<text class="wave-info-text">货主:{{ detailInfo.storeName || '--' }}</text>
<view v-if="isIntercepted" class="intercept-info-btn intercept-info-btn--row" @click="showInterceptInfoPopup = true">
<text class="intercept-info-btn__text">拦截信息</text>
</view>
</view>
<!-- 推荐包材提示 -->
<view v-if="detailInfo.listType === 'group' && detailInfo.suggestedPkg" class="package-info-hint">
@ -143,7 +149,7 @@
<text class="bottom-summary-scan">已扫:<text class="bottom-summary-value">{{ totalScannedQty }}</text><text class="bottom-summary-split">/</text><text class="bottom-summary-total">{{ totalPlanQty }}</text>件</text>
<view v-if="canConfirmRecheck && !autoShip" class="confirm-btn" @click="$emit('confirmRecheck')">确认复核</view>
<view class="view-mode-toggle" @click="toggleViewMode">
<u-icon :name="viewMode === 'grid' ? 'list' : 'grid'" size="32" color="#2979ff"></u-icon>
<u-icon :name="viewMode === 'grid' ? 'list' : 'grid'" size="24" color="#2979ff"></u-icon>
<text class="view-mode-text">{{ viewMode === 'grid' ? '列表' : '宫格' }}</text>
</view>
</view>
@ -203,6 +209,27 @@
</view>
</view>
</u-popup>
<!-- 拦截信息弹窗 -->
<u-popup v-if="showInterceptInfoPopup" :show="showInterceptInfoPopup" mode="center" :closeable="true" border-radius="20" @close="showInterceptInfoPopup = false">
<view class="intercept-info-popup">
<view class="intercept-info-popup__title">拦截信息</view>
<view class="intercept-info-popup__body">
<view class="intercept-info-popup__row">
<text class="intercept-info-popup__label">运单号</text>
<text class="intercept-info-popup__value">{{ detailInfo.waybillNo || '--' }}</text>
</view>
<view class="intercept-info-popup__row">
<text class="intercept-info-popup__label">拦截状态</text>
<text class="intercept-info-popup__value intercept-info-popup__value--warn">{{ interceptStatusText() }}</text>
</view>
<view class="intercept-info-popup__tip">该订单已被拦截,请勿复核发货</view>
</view>
<view class="intercept-info-popup__footer">
<view class="intercept-info-popup__btn" @click="showInterceptInfoPopup = false">关闭</view>
</view>
</view>
</u-popup>
</view>
</template>
@ -287,7 +314,8 @@ import voice from '@/core/utils/voice';
showNoBarcodePopup: false,
noBarcodeItemName: '',
noBarcodePickedCount: 0,
noBarcodeItemTotalQty: 0
noBarcodeItemTotalQty: 0,
showInterceptInfoPopup: false
};
},
computed: {
@ -330,6 +358,13 @@ import voice from '@/core/utils/voice';
},
canConfirmRecheck() {
return this.isAllMatched && this.isAllScanned;
},
isIntercepted() {
// 散单模式:波次内任一订单被拦截即显示拦截信息按钮(waveHasIntercept)
// 其它模式:直接看当前订单/波次的拦截状态
if (!!this.detailInfo?.waveHasIntercept) return true;
const status = String(this.detailInfo?.interceptStatus || '').trim();
return !!status && status !== 'none';
}
},
watch: {
@ -352,6 +387,23 @@ import voice from '@/core/utils/voice';
}
},
methods: {
interceptStatusText(status) {
// 统一的拦截状态映射(与 interceptionLog.vue 保持一致)
const map = {
'': '未拦截',
'none': '未拦截',
'requested': '拦截中',
'pending': '拦截中',
'intercepting': '拦截中',
'intercepted': '仓库已拦截',
'intercepted_at_warehouse': '仓库已拦截',
'intercept_success': '拦截成功',
'intercept_failed': '拦截失败',
'cancelled': '已取消'
};
const key = String(status ?? this.detailInfo?.interceptStatus ?? '').trim();
return map[key] || key || '未拦截';
},
isGoodsMatched(item) {
const id = String(item?.id || '');
if (!id) return false;
@ -1081,8 +1133,8 @@ import voice from '@/core/utils/voice';
.view-mode-toggle {
display: flex;
align-items: center;
gap: 4rpx;
padding: 4rpx 8rpx;
gap: 2rpx;
padding: 2rpx 6rpx;
border: 1rpx solid #2979ff;
border-radius: 6rpx;
flex-shrink: 0;
@ -1093,10 +1145,100 @@ import voice from '@/core/utils/voice';
}
.view-mode-text {
font-size: 22rpx;
font-size: 18rpx;
color: #2979ff;
}
.intercept-info-btn {
display: flex;
align-items: center;
padding: 4rpx 16rpx;
border: 1rpx solid #fa3534;
border-radius: 6rpx;
background: #fef0f0;
flex-shrink: 0;
}
.intercept-info-btn:active {
opacity: 0.7;
}
.intercept-info-btn__text {
font-size: 26rpx;
color: #fa3534;
line-height: 1.6;
}
.intercept-info-btn--row {
margin-left: auto;
}
.intercept-info-popup {
width: 560rpx;
padding: 32rpx;
box-sizing: border-box;
}
.intercept-info-popup__title {
font-size: 34rpx;
font-weight: 600;
color: #303133;
text-align: center;
margin-bottom: 28rpx;
}
.intercept-info-popup__row {
display: flex;
align-items: center;
padding: 12rpx 0;
}
.intercept-info-popup__label {
width: 160rpx;
font-size: 30rpx;
color: #909399;
}
.intercept-info-popup__value {
flex: 1;
font-size: 30rpx;
color: #303133;
word-break: break-all;
}
.intercept-info-popup__value--warn {
color: #fa3534;
font-weight: 500;
}
.intercept-info-popup__tip {
margin-top: 20rpx;
padding: 16rpx;
background: #fef0f0;
border-radius: 8rpx;
font-size: 28rpx;
color: #fa3534;
text-align: center;
}
.intercept-info-popup__footer {
display: flex;
justify-content: center;
margin-top: 28rpx;
}
.intercept-info-popup__btn {
padding: 12rpx 48rpx;
background: #2979ff;
border-radius: 8rpx;
font-size: 30rpx;
color: #ffffff;
}
.intercept-info-popup__btn:active {
opacity: 0.7;
}
/* 列表模式卡片样式 */
.pick-list--table {
display: flex;

View File

@ -2454,6 +2454,7 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
totalOrders: Number(item?.totalOrders ?? item?.orderCount ?? 0),
orderIds: Array.isArray(item?.orderIds) ? item.orderIds : [],
interceptStatus: String(item?.interceptStatus || '').trim(),
waveHasIntercept: this.resolveWaveHasIntercept(item),
printStationId: String(this.printStationId || ''),
printStationName: String(this.printStationName || ''),
boxNo: String(item.boxNo || ''),
@ -2521,6 +2522,26 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
this.showListDrawer = false;
this.goPickGoodsDetail(item);
},
// 判断当前订单所属波次是否含有被拦截的订单
// 散单模式(single):一个波次含多个订单,只要波次内任一订单被拦截,波次内所有订单的复核详情都显示拦截信息按钮
// 其它模式:直接看当前订单/波次的拦截状态
resolveWaveHasIntercept(item) {
if (this.listType !== 'single') {
const status = String(item?.interceptStatus || '').trim();
return !!status && status !== 'none';
}
const waveNo = String(item?.waveNo || '').trim();
const hasOrderList = Array.isArray(this.orderList) && this.orderList.length > 0;
if (!waveNo || !hasOrderList) {
const status = String(item?.interceptStatus || '').trim();
return !!status && status !== 'none';
}
return this.orderList.some(o => {
if (String(o?.waveNo || '').trim() !== waveNo) return false;
const s = String(o?.interceptStatus || '').trim();
return !!s && s !== 'none';
});
},
buildRecheckParams() {
const listType = String(this.detailInfo?.listType || '').trim();
if (listType === 'group') {