修改拣货。复核发货模块
This commit is contained in:
parent
6c2f8895a6
commit
ddc61a3ac8
@ -57,41 +57,43 @@
|
|||||||
|
|
||||||
<u-popup v-if="showPrintPopup" :show="showPrintPopup" mode="bottom" :closeable="true" border-radius="20" :z-index="10090" @close="handlePrintPopupClose">
|
<u-popup v-if="showPrintPopup" :show="showPrintPopup" mode="bottom" :closeable="true" border-radius="20" :z-index="10090" @close="handlePrintPopupClose">
|
||||||
<view class="print-popup">
|
<view class="print-popup">
|
||||||
<view class="print-popup-title">打印设置</view>
|
<scroll-view scroll-y class="print-popup-scroll">
|
||||||
<view class="print-row print-row--station">
|
<view class="print-popup-title">打印设置</view>
|
||||||
<text class="print-label">打印台</text>
|
<view class="print-row print-row--station">
|
||||||
<view class="print-picker" @click="togglePrintStationDropdown">
|
<text class="print-label">打印台</text>
|
||||||
<text class="print-picker-value">{{ printStationName || '--' }}</text>
|
<view class="print-picker" @click="togglePrintStationDropdown">
|
||||||
<u-icon :name="showPrintStationDropdown ? 'arrow-up' : 'arrow-down'" size="24" color="#909399"></u-icon>
|
<text class="print-picker-value">{{ printStationName || '--' }}</text>
|
||||||
</view>
|
<u-icon :name="showPrintStationDropdown ? 'arrow-up' : 'arrow-down'" size="24" color="#909399"></u-icon>
|
||||||
<view v-if="showPrintStationDropdown" class="print-station-dropdown">
|
</view>
|
||||||
<view
|
<view v-if="showPrintStationDropdown" class="print-station-dropdown">
|
||||||
v-for="station in printStationList"
|
<view
|
||||||
:key="station.id"
|
v-for="station in printStationList"
|
||||||
class="print-station-option"
|
:key="station.id"
|
||||||
:class="{ 'print-station-option--active': station.id === printStationId }"
|
class="print-station-option"
|
||||||
@click.stop="handlePrintStationSelect(station)"
|
:class="{ 'print-station-option--active': station.id === printStationId }"
|
||||||
>
|
@click.stop="handlePrintStationSelect(station)"
|
||||||
{{ station.name }}
|
>
|
||||||
|
{{ station.name }}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="print-row print-row--action">
|
||||||
<view class="print-row print-row--action">
|
<text class="print-label">打印</text>
|
||||||
<text class="print-label">打印</text>
|
<u-button
|
||||||
<u-button
|
type="primary"
|
||||||
type="primary"
|
size="mini"
|
||||||
size="mini"
|
:customStyle="{ backgroundColor: '#2979ff', borderColor: '#2979ff', fontSize: '26rpx', height: '64rpx', lineHeight: '64rpx', padding: '0 20rpx' }"
|
||||||
:customStyle="{ backgroundColor: '#2979ff', borderColor: '#2979ff', fontSize: '26rpx', height: '64rpx', lineHeight: '64rpx', padding: '0 20rpx' }"
|
@click="handleConfirmPrint"
|
||||||
@click="handleConfirmPrint"
|
@tap="handleConfirmPrint"
|
||||||
@tap="handleConfirmPrint"
|
>
|
||||||
>
|
打印
|
||||||
打印
|
</u-button>
|
||||||
</u-button>
|
</view>
|
||||||
</view>
|
<view class="print-row print-row--message">
|
||||||
<view class="print-row print-row--message">
|
<text class="print-label">打印消息</text>
|
||||||
<text class="print-label">打印消息</text>
|
<text class="print-message">{{ printMessage || '暂无打印消息' }}</text>
|
||||||
<text class="print-message">{{ printMessage || '暂无打印消息' }}</text>
|
</view>
|
||||||
</view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
</view>
|
</view>
|
||||||
@ -836,10 +838,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.print-popup {
|
.print-popup {
|
||||||
padding: 24rpx 24rpx calc(20rpx + env(safe-area-inset-bottom));
|
height: 70vh;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border-top-left-radius: 20rpx;
|
border-top-left-radius: 20rpx;
|
||||||
border-top-right-radius: 20rpx;
|
border-top-right-radius: 20rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.print-popup-scroll {
|
||||||
|
flex: 1;
|
||||||
|
padding: 24rpx 24rpx calc(20rpx + env(safe-area-inset-bottom));
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.print-popup-title {
|
.print-popup-title {
|
||||||
|
|||||||
@ -128,37 +128,41 @@
|
|||||||
|
|
||||||
<u-popup v-if="showPrintPopup" :show="showPrintPopup" mode="bottom" :closeable="true" border-radius="20" :z-index="10090" @close="showPrintPopup = false">
|
<u-popup v-if="showPrintPopup" :show="showPrintPopup" mode="bottom" :closeable="true" border-radius="20" :z-index="10090" @close="showPrintPopup = false">
|
||||||
<view class="print-popup">
|
<view class="print-popup">
|
||||||
<view class="print-popup-title">打印设置</view>
|
<scroll-view scroll-y class="print-popup-scroll">
|
||||||
<view class="print-row print-row--station">
|
<view class="print-popup-title">打印设置</view>
|
||||||
<text class="print-label">打印台</text>
|
<view class="print-row print-row--station">
|
||||||
<view class="print-station-input-wrap">
|
<text class="print-label">打印台</text>
|
||||||
<u-input
|
<view class="print-station-input-wrap">
|
||||||
v-model="printStationInputKeyword"
|
<u-input
|
||||||
placeholder="请输入或扫描打印台编号"
|
v-model="printStationInputKeyword"
|
||||||
:clearable="true"
|
placeholder="请输入或扫描打印台编号"
|
||||||
:customStyle="{ fontSize: '28rpx', height: '80rpx', lineHeight: '80rpx', padding: '0 20rpx', background: '#fafafa', borderRadius: '10rpx' }"
|
:clearable="true"
|
||||||
@input="handlePrintStationInput"
|
:customStyle="{ fontSize: '28rpx', height: '80rpx', lineHeight: '80rpx', padding: '0 20rpx', background: '#fafafa', borderRadius: '10rpx' }"
|
||||||
@focus="handlePrintStationInputFocus"
|
@input="handlePrintStationInput"
|
||||||
@blur="handlePrintStationInputBlur"
|
@focus="handlePrintStationInputFocus"
|
||||||
@confirm="handlePrintStationInputConfirm"
|
@blur="handlePrintStationInputBlur"
|
||||||
></u-input>
|
@confirm="handlePrintStationInputConfirm"
|
||||||
<view v-if="showPrintStationDropdown && printStationFilteredList.length > 0" class="print-station-dropdown">
|
></u-input>
|
||||||
<view
|
<view v-if="showPrintStationDropdown && printStationFilteredList.length > 0" class="print-station-dropdown">
|
||||||
v-for="station in printStationFilteredList"
|
<scroll-view scroll-y class="print-station-dropdown-scroll">
|
||||||
:key="station.id"
|
<view
|
||||||
class="print-station-option print-station-option--row"
|
v-for="station in printStationFilteredList"
|
||||||
:class="{ 'print-station-option--active': station.id === printStationId }"
|
:key="station.id"
|
||||||
@mousedown.stop="handlePrintStationSelect(station)"
|
class="print-station-option print-station-option--row"
|
||||||
>
|
:class="{ 'print-station-option--active': station.id === printStationId }"
|
||||||
<text class="station-option-name">{{ station.name }}</text>
|
@mousedown.stop="handlePrintStationSelect(station)"
|
||||||
<text v-if="station.customBarcode" class="station-option-code">{{ station.customBarcode }}</text>
|
>
|
||||||
|
<text class="station-option-name">{{ station.name }}</text>
|
||||||
|
<text v-if="station.customBarcode" class="station-option-code">{{ station.customBarcode }}</text>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
<view v-if="showPrintStationDropdown && printStationInputKeyword && printStationFilteredList.length === 0" class="print-station-dropdown">
|
||||||
|
<view class="print-station-option print-station-option--empty">未匹配到打印台</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="showPrintStationDropdown && printStationInputKeyword && printStationFilteredList.length === 0" class="print-station-dropdown">
|
|
||||||
<view class="print-station-option print-station-option--empty">未匹配到打印台</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
|
||||||
@ -2291,11 +2295,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.print-popup {
|
.print-popup {
|
||||||
padding: 48rpx 32rpx calc(40rpx + env(safe-area-inset-bottom));
|
height: 70vh;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border-top-left-radius: 20rpx;
|
border-top-left-radius: 20rpx;
|
||||||
border-top-right-radius: 20rpx;
|
border-top-right-radius: 20rpx;
|
||||||
min-height: 500rpx;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.print-popup-scroll {
|
||||||
|
flex: 1;
|
||||||
|
padding: 48rpx 32rpx calc(40rpx + env(safe-area-inset-bottom));
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.print-popup-title {
|
.print-popup-title {
|
||||||
@ -2347,12 +2358,18 @@
|
|||||||
right: 0;
|
right: 0;
|
||||||
top: 100%;
|
top: 100%;
|
||||||
max-height: 600rpx;
|
max-height: 600rpx;
|
||||||
overflow-y: auto;
|
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border: 1rpx solid #ebeef5;
|
border: 1rpx solid #ebeef5;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
z-index: 10091;
|
z-index: 10091;
|
||||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
|
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.print-station-dropdown-scroll {
|
||||||
|
flex: 1;
|
||||||
|
max-height: 600rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.print-station-option {
|
.print-station-option {
|
||||||
|
|||||||
@ -1236,6 +1236,11 @@
|
|||||||
title: '完成成功',
|
title: '完成成功',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
|
// 通知列表页更新该波次状态为已复核
|
||||||
|
const completedBatchNo = String(this.taskInfo?.batchNo || '').trim();
|
||||||
|
if (completedBatchNo) {
|
||||||
|
uni.setStorageSync('pick_completed_wave', completedBatchNo);
|
||||||
|
}
|
||||||
this.taskId = '';
|
this.taskId = '';
|
||||||
this.keyword = '';
|
this.keyword = '';
|
||||||
this.taskInfo = {
|
this.taskInfo = {
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<text class="page-head-picker">拣货人:{{ detailInfo.pickerName }}</text>
|
<text class="page-head-picker">拣货人:{{ detailInfo.pickerName }}</text>
|
||||||
<view class="page-head-actions">
|
<view class="page-head-actions">
|
||||||
<view class="page-head-btn" @click="handleReprint">面单补打</view>
|
<view class="page-head-btn" @click="handleReprint">面单补打</view>
|
||||||
<view class="page-head-btn page-head-btn--primary" @click="handleWeigh">称重</view>
|
<view class="page-head-btn page-head-btn--primary" :class="{ 'page-head-btn--disabled': detailInfo.listType === 'single' }" @click="handleWeigh" :disabled="detailInfo.listType === 'single'">称重</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -36,12 +36,11 @@
|
|||||||
<view class="goods-image-name-row">
|
<view class="goods-image-name-row">
|
||||||
<view class="goods-thumb" @click.stop="previewCurrentGoodsImage">
|
<view class="goods-thumb" @click.stop="previewCurrentGoodsImage">
|
||||||
<u-image
|
<u-image
|
||||||
v-if="getCurrentGoodsImageList().length <= 1"
|
|
||||||
class="goods-image"
|
class="goods-image"
|
||||||
:src="currentGoods.imageUrl || ''"
|
:src="currentGoods.imageUrl || ''"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
width="240rpx"
|
width="168rpx"
|
||||||
height="240rpx"
|
height="168rpx"
|
||||||
>
|
>
|
||||||
<template #error>
|
<template #error>
|
||||||
<view class="image-placeholder image-placeholder--large">
|
<view class="image-placeholder image-placeholder--large">
|
||||||
@ -49,35 +48,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</u-image>
|
</u-image>
|
||||||
<view v-else class="goods-image-grid">
|
<view v-if="getCurrentGoodsImageList().length > 1" class="image-badge">
|
||||||
<view
|
<text class="image-badge-text">1/{{ getCurrentGoodsImageList().length }}</text>
|
||||||
v-for="(img, imgIndex) in getCurrentGoodsImageGridList()"
|
|
||||||
:key="img.url + '-' + imgIndex"
|
|
||||||
class="grid-cell"
|
|
||||||
:class="{ 'grid-cell--empty': !img.url }"
|
|
||||||
>
|
|
||||||
<template v-if="img.url">
|
|
||||||
<u-image
|
|
||||||
class="grid-image"
|
|
||||||
:src="img.url"
|
|
||||||
mode="aspectFill"
|
|
||||||
width="100%"
|
|
||||||
height="100%"
|
|
||||||
>
|
|
||||||
<template #error>
|
|
||||||
<view class="image-placeholder image-placeholder--small">
|
|
||||||
<u-icon name="photo" size="24" color="#c0c4cc"></u-icon>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
</u-image>
|
|
||||||
<view v-if="imgIndex === 3 && getCurrentGoodsExtraImageCount() > 0" class="more-mask">
|
|
||||||
<text class="more-text">+{{ getCurrentGoodsExtraImageCount() }}</text>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<view v-else class="image-placeholder image-placeholder--small image-placeholder--empty">
|
|
||||||
<u-icon name="photo" size="24" color="#c0c4cc"></u-icon>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="goods-name">{{ currentGoods.skuName || '--' }}</text>
|
<text class="goods-name">{{ currentGoods.skuName || '--' }}</text>
|
||||||
@ -760,11 +732,18 @@
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn('[confirmRecheck] 缓存复核完成数据失败:', e);
|
console.warn('[confirmRecheck] 缓存复核完成数据失败:', e);
|
||||||
}
|
}
|
||||||
// 复核成功后弹出称重弹窗
|
// 复核成功后弹出称重弹窗(散单模式不弹窗)
|
||||||
this._weighAfterReview = true;
|
if (this.detailInfo.listType !== 'single') {
|
||||||
setTimeout(() => {
|
this._weighAfterReview = true;
|
||||||
this.handleWeigh();
|
setTimeout(() => {
|
||||||
}, 800);
|
this.handleWeigh();
|
||||||
|
}, 800);
|
||||||
|
} else {
|
||||||
|
this._weighAfterReview = false;
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack({ delta: 1 });
|
||||||
|
}, 800);
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: this.getApiErrorMessage(error, '确认复核失败'),
|
title: this.getApiErrorMessage(error, '确认复核失败'),
|
||||||
@ -966,8 +945,8 @@
|
|||||||
this.weighWeight = parseInt(digits, 10);
|
this.weighWeight = parseInt(digits, 10);
|
||||||
},
|
},
|
||||||
async handleWeighSave() {
|
async handleWeighSave() {
|
||||||
if (this.weighWeight < 100) {
|
if (this.weighWeight <= 0) {
|
||||||
uni.showToast({ title: '重量至少输入三位数', icon: 'none' });
|
uni.showToast({ title: '请输入有效重量', icon: 'none' });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1200,6 +1179,12 @@
|
|||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.page-head-btn--disabled {
|
||||||
|
background: #c0c4cc;
|
||||||
|
pointer-events: none;
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
|
||||||
.page-head-item {
|
.page-head-item {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -1224,9 +1209,9 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 14rpx;
|
margin-top: 8rpx;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
line-height: 58rpx;
|
line-height: 44rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.barcode-value {
|
.barcode-value {
|
||||||
@ -1382,85 +1367,46 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.goods-thumb {
|
.goods-thumb {
|
||||||
width: 240rpx;
|
position: relative;
|
||||||
height: 240rpx;
|
width: 168rpx;
|
||||||
|
height: 168rpx;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-image {
|
.goods-image {
|
||||||
width: 240rpx;
|
width: 168rpx;
|
||||||
height: 240rpx;
|
height: 168rpx;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: #f5f7fa;
|
background: #f5f7fa;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-image-grid {
|
|
||||||
width: 240rpx;
|
|
||||||
height: 240rpx;
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-content: space-between;
|
|
||||||
}
|
|
||||||
|
|
||||||
.grid-cell {
|
|
||||||
position: relative;
|
|
||||||
width: 116rpx;
|
|
||||||
height: 116rpx;
|
|
||||||
border-radius: 10rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
background: #f5f7fa;
|
|
||||||
}
|
|
||||||
|
|
||||||
.grid-cell--empty {
|
|
||||||
border: 1rpx dashed #dcdfe6;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background: #fafafa;
|
|
||||||
}
|
|
||||||
|
|
||||||
.grid-image {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
border-radius: 10rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.image-placeholder {
|
.image-placeholder {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background: #f5f7fa;
|
background: #f5f7fa;
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-placeholder--large {
|
.image-badge {
|
||||||
height: 240rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.image-placeholder--small {
|
|
||||||
height: 116rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.image-placeholder--empty {
|
|
||||||
background: #fafafa;
|
|
||||||
}
|
|
||||||
|
|
||||||
.more-mask {
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
min-width: 36rpx;
|
||||||
|
height: 32rpx;
|
||||||
|
padding: 0 8rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background: rgba(0, 0, 0, 0.35);
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
border-top-left-radius: 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.more-text {
|
.image-badge-text {
|
||||||
font-size: 38rpx;
|
font-size: 28rpx;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
@ -1470,18 +1416,18 @@
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
font-size: 42rpx;
|
font-size: 42rpx;
|
||||||
line-height: 56rpx;
|
line-height: 44rpx;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: #303133;
|
color: #303133;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-info {
|
.top-info {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 22rpx;
|
margin-top: 14rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-row--pick-btn {
|
.goods-row--pick-btn {
|
||||||
margin-top: 12rpx;
|
margin-top: 6rpx;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
<scroll-view class="detail-scroll" scroll-y>
|
<scroll-view class="detail-scroll" scroll-y>
|
||||||
<view v-if="displayOrderList.length === 0" class="empty-state">
|
<view v-if="displayOrderList.length === 0" class="empty-state">
|
||||||
<u-icon name="list" size="86" color="#c0c4cc"></u-icon>
|
<u-icon name="list" size="86" color="#c0c4cc"></u-icon>
|
||||||
<text class="empty-text">暂无未复核订单</text>
|
<text class="empty-text">暂无未拣货订单</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="record-list">
|
<view v-else class="record-list">
|
||||||
<view v-for="item in displayOrderList" :key="item.id" class="record-item" @click="goPickGoodsDetail(item)">
|
<view v-for="item in displayOrderList" :key="item.id" class="record-item" @click="goPickGoodsDetail(item)">
|
||||||
@ -41,7 +41,7 @@
|
|||||||
<view class="record-line"><text class="record-label">总订单数:</text><text class="record-value">{{ item.totalOrderCount }}</text></view>
|
<view class="record-line"><text class="record-label">总订单数:</text><text class="record-value">{{ item.totalOrderCount }}</text></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="record-right">
|
<view class="record-right">
|
||||||
<text class="record-count">未复核 {{ item.unreviewedCount }}</text>
|
<text class="record-count">未拣货 {{ item.unreviewedCount }}</text>
|
||||||
<text class="record-status">{{ getStatusText(item.status) }}</text>
|
<text class="record-status">{{ getStatusText(item.status) }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -52,7 +52,7 @@
|
|||||||
:customStyle="{ backgroundColor: '#2979ff', borderColor: '#2979ff', fontSize: '26rpx', height: '64rpx', lineHeight: '64rpx', padding: '0 20rpx' }"
|
:customStyle="{ backgroundColor: '#2979ff', borderColor: '#2979ff', fontSize: '26rpx', height: '64rpx', lineHeight: '64rpx', padding: '0 20rpx' }"
|
||||||
@click.native.stop="handlePrintAllUnreviewed(item)"
|
@click.native.stop="handlePrintAllUnreviewed(item)"
|
||||||
>
|
>
|
||||||
打印所有未复核订单
|
打印所有未拣货订单
|
||||||
</u-button>
|
</u-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -79,40 +79,42 @@
|
|||||||
|
|
||||||
<u-popup v-if="showPrintPopup" :show="showPrintPopup" mode="bottom" :closeable="true" border-radius="20" :z-index="10090" @close="showPrintPopup = false">
|
<u-popup v-if="showPrintPopup" :show="showPrintPopup" mode="bottom" :closeable="true" border-radius="20" :z-index="10090" @close="showPrintPopup = false">
|
||||||
<view class="print-popup">
|
<view class="print-popup">
|
||||||
<view class="print-popup-title">打印设置</view>
|
<scroll-view scroll-y class="print-popup-scroll">
|
||||||
<view class="print-row print-row--station">
|
<view class="print-popup-title">打印设置</view>
|
||||||
<text class="print-label">打印台</text>
|
<view class="print-row print-row--station">
|
||||||
<view class="print-picker" @click="togglePrintStationDropdown">
|
<text class="print-label">打印台</text>
|
||||||
<text class="print-picker-value">{{ printStationName || '--' }}</text>
|
<view class="print-picker" @click="togglePrintStationDropdown">
|
||||||
<u-icon :name="showPrintStationDropdown ? 'arrow-up' : 'arrow-down'" size="24" color="#909399"></u-icon>
|
<text class="print-picker-value">{{ printStationName || '--' }}</text>
|
||||||
</view>
|
<u-icon :name="showPrintStationDropdown ? 'arrow-up' : 'arrow-down'" size="24" color="#909399"></u-icon>
|
||||||
<view v-if="showPrintStationDropdown" class="print-station-dropdown">
|
</view>
|
||||||
<view
|
<view v-if="showPrintStationDropdown" class="print-station-dropdown">
|
||||||
v-for="station in printStationList"
|
<view
|
||||||
:key="station.id"
|
v-for="station in printStationList"
|
||||||
class="print-station-option"
|
:key="station.id"
|
||||||
:class="{ 'print-station-option--active': station.id === printStationId }"
|
class="print-station-option"
|
||||||
@click.stop="handlePrintStationSelect(station)"
|
:class="{ 'print-station-option--active': station.id === printStationId }"
|
||||||
>
|
@click.stop="handlePrintStationSelect(station)"
|
||||||
{{ station.name }}
|
>
|
||||||
|
{{ station.name }}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="print-row print-row--action">
|
||||||
<view class="print-row print-row--action">
|
<text class="print-label">打印</text>
|
||||||
<text class="print-label">打印</text>
|
<u-button
|
||||||
<u-button
|
type="primary"
|
||||||
type="primary"
|
size="mini"
|
||||||
size="mini"
|
:customStyle="{ backgroundColor: '#2979ff', borderColor: '#2979ff', fontSize: '26rpx', height: '64rpx', lineHeight: '64rpx', padding: '0 20rpx' }"
|
||||||
:customStyle="{ backgroundColor: '#2979ff', borderColor: '#2979ff', fontSize: '26rpx', height: '64rpx', lineHeight: '64rpx', padding: '0 20rpx' }"
|
@click="handleConfirmPrint"
|
||||||
@click="handleConfirmPrint"
|
>
|
||||||
>
|
打印
|
||||||
打印
|
</u-button>
|
||||||
</u-button>
|
</view>
|
||||||
</view>
|
<view class="print-row print-row--message">
|
||||||
<view class="print-row print-row--message">
|
<text class="print-label">打印消息</text>
|
||||||
<text class="print-label">打印消息</text>
|
<text class="print-message">{{ printMessage || '暂无打印消息' }}</text>
|
||||||
<text class="print-message">{{ printMessage || '暂无打印消息' }}</text>
|
</view>
|
||||||
</view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
</view>
|
</view>
|
||||||
@ -122,7 +124,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '拣货详情(未复核)',
|
title: '拣货详情(未拣货)',
|
||||||
grabCount: 0,
|
grabCount: 0,
|
||||||
keyword: '',
|
keyword: '',
|
||||||
onlyMine: false,
|
onlyMine: false,
|
||||||
@ -162,29 +164,79 @@
|
|||||||
? Math.max(0, parsedGrabCount)
|
? Math.max(0, parsedGrabCount)
|
||||||
: 5;
|
: 5;
|
||||||
this.loadBatchWaveNoList(1);
|
this.loadBatchWaveNoList(1);
|
||||||
|
|
||||||
|
// 监听订单复核完成事件
|
||||||
|
uni.$on('orderReviewCompleted', this.handleOrderReviewCompleted);
|
||||||
|
},
|
||||||
|
onUnload() {
|
||||||
|
this.safeDispatchBroadcast('stop');
|
||||||
|
uni.$off('orderReviewCompleted', this.handleOrderReviewCompleted);
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.safeDispatchBroadcast('setCallbacks', {
|
this.safeDispatchBroadcast('setCallbacks', {
|
||||||
onResult: this.handleBroadcastResult
|
onResult: this.handleBroadcastResult
|
||||||
});
|
});
|
||||||
this.safeDispatchBroadcast('resume');
|
this.safeDispatchBroadcast('resume');
|
||||||
|
// 检查是否有刚完成的拣货/复核任务,更新列表状态
|
||||||
|
this.updateCompletedWaveStatus();
|
||||||
|
this.updateReviewCompletedStatus();
|
||||||
},
|
},
|
||||||
onHide() {
|
onHide() {
|
||||||
this.safeDispatchBroadcast('pause');
|
this.safeDispatchBroadcast('pause');
|
||||||
},
|
},
|
||||||
onUnload() {
|
|
||||||
this.safeDispatchBroadcast('stop');
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
|
updateCompletedWaveStatus() {
|
||||||
|
const completedWaveNo = uni.getStorageSync('pick_completed_wave');
|
||||||
|
if (completedWaveNo && Array.isArray(this.orderList)) {
|
||||||
|
const index = this.orderList.findIndex(item => item.waveNo === completedWaveNo);
|
||||||
|
if (index >= 0) {
|
||||||
|
const updated = { ...this.orderList[index], status: '已复核', unreviewedCount: 0 };
|
||||||
|
if (typeof this.$set === 'function') {
|
||||||
|
this.$set(this.orderList, index, updated);
|
||||||
|
} else {
|
||||||
|
this.orderList.splice(index, 1, updated);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
uni.removeStorageSync('pick_completed_wave');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
updateReviewCompletedStatus() {
|
||||||
|
const completedData = uni.getStorageSync('pendingReviewComplete');
|
||||||
|
if (completedData && completedData.waveNo && Array.isArray(this.orderList)) {
|
||||||
|
const index = this.orderList.findIndex(item => item.waveNo === completedData.waveNo);
|
||||||
|
if (index >= 0) {
|
||||||
|
const updated = { ...this.orderList[index], status: '已复核', unreviewedCount: 0 };
|
||||||
|
if (typeof this.$set === 'function') {
|
||||||
|
this.$set(this.orderList, index, updated);
|
||||||
|
} else {
|
||||||
|
this.orderList.splice(index, 1, updated);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
uni.removeStorageSync('pendingReviewComplete');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleOrderReviewCompleted(data) {
|
||||||
|
if (data && data.waveNo && Array.isArray(this.orderList)) {
|
||||||
|
const index = this.orderList.findIndex(item => item.waveNo === data.waveNo);
|
||||||
|
if (index >= 0) {
|
||||||
|
const updated = { ...this.orderList[index], status: '已复核', unreviewedCount: 0 };
|
||||||
|
if (typeof this.$set === 'function') {
|
||||||
|
this.$set(this.orderList, index, updated);
|
||||||
|
} else {
|
||||||
|
this.orderList.splice(index, 1, updated);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
normalizeReviewAssignmentStatus(status) {
|
normalizeReviewAssignmentStatus(status) {
|
||||||
const rawValue = status ?? '';
|
const rawValue = status ?? '';
|
||||||
const normalized = String(rawValue).trim();
|
const normalized = String(rawValue).trim();
|
||||||
const lowerValue = normalized.toLowerCase();
|
const lowerValue = normalized.toLowerCase();
|
||||||
const statusMap = {
|
const statusMap = {
|
||||||
'0': '未复核',
|
'0': '未拣货',
|
||||||
unreviewed: '未复核',
|
unreviewed: '未拣货',
|
||||||
pending: '未复核',
|
pending: '未拣货',
|
||||||
todo: '未复核',
|
todo: '未拣货',
|
||||||
'1': '部分复核',
|
'1': '部分复核',
|
||||||
partial: '部分复核',
|
partial: '部分复核',
|
||||||
partial_reviewed: '部分复核',
|
partial_reviewed: '部分复核',
|
||||||
@ -202,10 +254,10 @@
|
|||||||
if (statusMap[lowerValue]) {
|
if (statusMap[lowerValue]) {
|
||||||
return statusMap[lowerValue];
|
return statusMap[lowerValue];
|
||||||
}
|
}
|
||||||
if (['未复核', '部分复核', '已复核'].includes(normalized)) {
|
if (['未拣货', '部分复核', '已复核'].includes(normalized)) {
|
||||||
return normalized;
|
return normalized;
|
||||||
}
|
}
|
||||||
return normalized || '未复核';
|
return normalized || '未拣货';
|
||||||
},
|
},
|
||||||
buildBatchListParams(page = this.currentPage) {
|
buildBatchListParams(page = this.currentPage) {
|
||||||
const where = {
|
const where = {
|
||||||
@ -575,6 +627,14 @@
|
|||||||
if (!item) {
|
if (!item) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// 已复核的波次不再创建拣货任务
|
||||||
|
if (item.status === '已复核') {
|
||||||
|
uni.showToast({
|
||||||
|
title: '该波次已复核',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
const waveKeyword = String(item.waveNo || '').trim();
|
const waveKeyword = String(item.waveNo || '').trim();
|
||||||
const waybillKeyword = String(item.waybillCode || '').trim();
|
const waybillKeyword = String(item.waybillCode || '').trim();
|
||||||
const keyword = waybillKeyword || waveKeyword;
|
const keyword = waybillKeyword || waveKeyword;
|
||||||
@ -652,7 +712,7 @@
|
|||||||
const target = item && typeof item === 'object' ? item : null;
|
const target = item && typeof item === 'object' ? item : null;
|
||||||
if (!target) {
|
if (!target) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '暂无未复核订单可打印',
|
title: '暂无未拣货订单可打印',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@ -682,7 +742,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.pendingPrintCount = Number(target.unreviewedCount || 0);
|
this.pendingPrintCount = Number(target.unreviewedCount || 0);
|
||||||
this.printMessage = `待打印未复核订单 ${this.pendingPrintCount} 条`;
|
this.printMessage = `待打印未拣货订单 ${this.pendingPrintCount} 条`;
|
||||||
this.showPrintStationDropdown = false;
|
this.showPrintStationDropdown = false;
|
||||||
this.showPrintPopup = true;
|
this.showPrintPopup = true;
|
||||||
},
|
},
|
||||||
@ -730,7 +790,7 @@
|
|||||||
if (!success) {
|
if (!success) {
|
||||||
throw new Error(response?.message || response?.msg || '打印失败');
|
throw new Error(response?.message || response?.msg || '打印失败');
|
||||||
}
|
}
|
||||||
this.printMessage = `打印已发送,未复核订单 ${effectivePrintCount} 条`;
|
this.printMessage = `打印已发送,未拣货订单 ${effectivePrintCount} 条`;
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: `已发起打印${effectivePrintCount}条`,
|
title: `已发起打印${effectivePrintCount}条`,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
@ -972,10 +1032,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.print-popup {
|
.print-popup {
|
||||||
padding: 24rpx 24rpx calc(20rpx + env(safe-area-inset-bottom));
|
height: 70vh;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border-top-left-radius: 20rpx;
|
border-top-left-radius: 20rpx;
|
||||||
border-top-right-radius: 20rpx;
|
border-top-right-radius: 20rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.print-popup-scroll {
|
||||||
|
flex: 1;
|
||||||
|
padding: 24rpx 24rpx calc(20rpx + env(safe-area-inset-bottom));
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.print-popup-title {
|
.print-popup-title {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user