修改订单复核页面
This commit is contained in:
parent
70dd419632
commit
5aa29019b4
4
env.js
4
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
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<view class="goods-info-list">
|
||||
<view v-for="item in goodsInfoList" :key="item.id" class="goods-info-item">
|
||||
<view class="goods-info-row goods-info-row--top">
|
||||
<view class="goods-info-cell"><text class="goods-info-label">蓝号:</text><text class="goods-info-value">{{ item.basketNo || '--' }}</text></view>
|
||||
<view class="goods-info-cell"><text class="goods-info-label">篮号:</text><text class="goods-info-value">{{ item.basketNo || '--' }}</text></view>
|
||||
<view class="goods-info-cell"><text class="goods-info-label">数量:</text><text class="goods-info-value">{{ item.planQty || 0 }}</text></view>
|
||||
<view class="goods-info-cell"><text class="goods-info-label">已扫:</text><text class="goods-info-value">{{ item.scannedQty || 0 }}</text></view>
|
||||
</view>
|
||||
@ -61,7 +61,7 @@
|
||||
:class="getReviewStatusText(item) === '已复核' ? 'record-value--reviewed' : 'record-value--unreviewed'"
|
||||
>{{ getReviewStatusText(item) }}</text>
|
||||
<text
|
||||
v-if="item.waveIndex"
|
||||
v-if="item.waveIndex && Number(pickMode) !== 3 && Number(pickMode) !== 2"
|
||||
class="record-value record-value--wave-index"
|
||||
:class="{ 'record-value--wave-index-reviewed': getReviewStatusText(item) === '已复核' }"
|
||||
>[{{ item.waveIndex }}]</text>
|
||||
@ -69,7 +69,7 @@
|
||||
class="record-value record-value--id"
|
||||
:class="{ 'record-value--id-reviewed': getReviewStatusText(item) === '已复核' }"
|
||||
>{{ listType === 'single' ? (item.waybillNo || '--') : (item.waveNo || '--') }}</text>
|
||||
<text v-if="item.boxNo" class="record-value record-value--box-no">{{ item.boxNo }}号篮</text>
|
||||
<text v-if="item.boxNo && Number(pickMode) !== 3" class="record-value record-value--box-no">{{ item.boxNo }}号篮</text>
|
||||
<view class="record-print-col">
|
||||
<text v-if="getPrintStatusText(item) === '已打印'" class="record-value record-value--printed">已打印</text>
|
||||
<text
|
||||
@ -121,6 +121,10 @@
|
||||
printMode: {
|
||||
type: String,
|
||||
default: 'printFirst'
|
||||
},
|
||||
pickMode: {
|
||||
type: [Number, String],
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
@ -22,8 +22,11 @@
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="detailInfo.storeName && detailInfo.listType !== 'group'" class="store-info-row">
|
||||
<text class="store-info-text">蓝号:{{ detailInfo.waveIndex || detailInfo.boxNo || '--' }}</text>
|
||||
<text class="store-info-divider"></text>
|
||||
<!-- 单品单件(pick_mode=2)不显示篮号;散单分播(pick_mode=3)时蓝号在商品列表蓝号列展示 -->
|
||||
<template v-if="Number(pickMode) !== 3 && Number(pickMode) !== 2">
|
||||
<text class="store-info-text">篮号:{{ detailInfo.waveIndex || detailInfo.boxNo || '--' }}</text>
|
||||
<text class="store-info-divider"></text>
|
||||
</template>
|
||||
<text class="store-info-text">货主:{{ detailInfo.storeName }}</text>
|
||||
</view>
|
||||
<view v-if="detailInfo.listType === 'group'" class="wave-info-row">
|
||||
@ -83,7 +86,7 @@
|
||||
<view class="list-card-row__top">
|
||||
<view class="list-card-qty-group">
|
||||
<view v-if="showBoxNoColumn" class="list-card-qty-item">
|
||||
<text class="list-card-label">蓝号</text>
|
||||
<text class="list-card-label">篮号</text>
|
||||
<text class="list-card-value">{{ item.boxNo || '--' }}</text>
|
||||
</view>
|
||||
<view class="list-card-qty-item">
|
||||
@ -1155,8 +1158,8 @@ import voice from '@/core/utils/voice';
|
||||
color: #000000;
|
||||
flex-shrink: 0;
|
||||
width: 100rpx;
|
||||
text-align: center;
|
||||
padding: 0 6rpx;
|
||||
text-align: left;
|
||||
padding: 0;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
|
||||
@ -94,6 +94,7 @@
|
||||
:displayList="displayOrderList"
|
||||
:listType="listType"
|
||||
:printMode="printMode"
|
||||
:pickMode="pickMode"
|
||||
:activeOrderId="showDetailView ? (detailInfo.orderId || detailInfo.recordId || '') : ''"
|
||||
@orderClick="handleDrawerOrderClick"
|
||||
@printClick="handlePrintOrder"
|
||||
@ -562,8 +563,10 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
|
||||
return this.printMode;
|
||||
},
|
||||
isDprefixedWave() {
|
||||
// D前缀波次:单品单件订单,无需逐件扫描
|
||||
// 单品单件订单,无需逐件扫描
|
||||
// 优先根据 pick_mode=2 判断(scanOrder 接口返回),D前缀波次作为兼容兜底
|
||||
if (this.listType !== 'single') return false;
|
||||
if (Number(this.pickMode) === 2) return true;
|
||||
const list = Array.isArray(this.orderList) ? this.orderList : [];
|
||||
if (!list.length) return false;
|
||||
return list.some(item => String(item.waveNo || '').startsWith('D'));
|
||||
@ -1136,11 +1139,27 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
|
||||
}, 600);
|
||||
}
|
||||
},
|
||||
matchPrintStation(text) {
|
||||
if (!text || !Array.isArray(this.printStationList) || !this.printStationList.length) {
|
||||
async matchPrintStation(text) {
|
||||
if (!text) {
|
||||
uni.showToast({ title: '暂无可用打印台', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
// 打印台列表未加载时自动加载,保证广播扫描/列表视图下无需打开弹窗即可直接匹配绑定
|
||||
if (!Array.isArray(this.printStationList) || !this.printStationList.length) {
|
||||
try {
|
||||
uni.showLoading({ title: '加载打印台...' });
|
||||
await this.loadPrintStations(1, false);
|
||||
} catch (error) {
|
||||
console.warn('[OrderReview][matchPrintStation] 加载打印台失败:', error);
|
||||
} finally {
|
||||
uni.hideLoading();
|
||||
}
|
||||
}
|
||||
if (!Array.isArray(this.printStationList) || !this.printStationList.length) {
|
||||
uni.showToast({ title: '暂无可用打印台', icon: 'none' });
|
||||
this.speakVoice('未绑定打印台');
|
||||
return;
|
||||
}
|
||||
const kw = text.toLowerCase();
|
||||
const matched = this.printStationList.find(station =>
|
||||
String(station.name).toLowerCase() === kw
|
||||
@ -1347,6 +1366,25 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
/**
|
||||
* D前缀波次:按快递面单号(waybillNo)在订单列表中定位所属订单
|
||||
* @param {string} waybillNo - 扫描到的快递面单号
|
||||
* @returns {Object|null} 匹配到的订单,未匹配返回 null
|
||||
*/
|
||||
findOrderByWaybillNo(waybillNo) {
|
||||
if (!waybillNo || !Array.isArray(this.orderList)) return null;
|
||||
const kw = String(waybillNo).trim().toLowerCase();
|
||||
if (!kw) return null;
|
||||
for (const order of this.orderList) {
|
||||
// 跳过已复核的订单
|
||||
if (order.isReviewed) continue;
|
||||
const orderWaybill = String(order.waybillNo || order.waybillCode || '').trim().toLowerCase();
|
||||
if (orderWaybill === kw) {
|
||||
return order;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
},
|
||||
handleSearch() {
|
||||
const text = this.normalizeKeyword(this.keyword);
|
||||
if (!text) return;
|
||||
@ -1381,7 +1419,13 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
|
||||
this.goPickGoodsDetail(matchedOrder);
|
||||
return;
|
||||
}
|
||||
// 商品条码未匹配时,尝试用车号/运单号查询后端(支持扫拣货车进入下一个波次)
|
||||
// 商品条码未命中时,按快递面单号(waybillNo)定位所属订单并进入复核详情
|
||||
const waybillOrder = this.findOrderByWaybillNo(text);
|
||||
if (waybillOrder) {
|
||||
this.goPickGoodsDetail(waybillOrder);
|
||||
return;
|
||||
}
|
||||
// 仍未匹配时,尝试用车号/运单号查询后端(支持扫拣货车进入下一个波次)
|
||||
if (this.printStationId || this.printMode === 'noPrint') {
|
||||
this.requestScanOrder(text);
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user