feat(订单复核): 优化SN序列号录入与删除交互
- SN 删除增加二次确认弹窗,避免误删;删除/录入结果带语音播报 - SN 录入完成进度行新增绿色完成态样式 - 未匹配商品条码时不再自动录入 SN,仅弹窗内可录入 - 播报文案由"数据一致"改为"录入成功",并新增 speakSnRecorded 事件按商品去重播报复核要求 - SN 弹窗样式统一(round 圆角、字号加粗等) - 波次策略列表过滤禁用项后再排序,并默认选中首个启用项 - 版本升级至 1.0.144
This commit is contained in:
parent
82e2722dc0
commit
1a429a5261
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "wms-pda",
|
"name": "wms-pda",
|
||||||
"version": "1.0.143",
|
"version": "1.0.144",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "天豹云仓 WMS_PDA(uni-app Vue2 + @vue/cli 4.5)",
|
"description": "天豹云仓 WMS_PDA(uni-app Vue2 + @vue/cli 4.5)",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
"name" : "WMS_PDA",
|
"name" : "WMS_PDA",
|
||||||
"appid" : "__UNI__0B3DAD3",
|
"appid" : "__UNI__0B3DAD3",
|
||||||
"description" : "多平台快速开发的UI框架",
|
"description" : "多平台快速开发的UI框架",
|
||||||
"versionName" : "1.0.142",
|
"versionName" : "1.0.144",
|
||||||
"versionCode" : 1000142,
|
"versionCode" : 1000144,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
"statusbar" : {
|
"statusbar" : {
|
||||||
|
|||||||
@ -448,10 +448,11 @@
|
|||||||
try {
|
try {
|
||||||
const params = this.buildWaveStrategyListParams();
|
const params = this.buildWaveStrategyListParams();
|
||||||
const response = await this.$http('order.wave.waveStrategyList', params);
|
const response = await this.$http('order.wave.waveStrategyList', params);
|
||||||
const parsedList = this.parseWaveStrategyResponse(response);
|
const parsedList = this.parseWaveStrategyResponse(response)
|
||||||
|
.filter(item => !item.disabled);
|
||||||
parsedList.sort((a, b) => Number(b.matchedOrderCountFiltered) - Number(a.matchedOrderCountFiltered));
|
parsedList.sort((a, b) => Number(b.matchedOrderCountFiltered) - Number(a.matchedOrderCountFiltered));
|
||||||
this.strategyList = parsedList;
|
this.strategyList = parsedList;
|
||||||
const firstEnabled = this.strategyList.find(item => !item.disabled);
|
const firstEnabled = this.strategyList[0];
|
||||||
this.currentStrategyId = firstEnabled?.id || '';
|
this.currentStrategyId = firstEnabled?.id || '';
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.currentStrategyId = '';
|
this.currentStrategyId = '';
|
||||||
|
|||||||
@ -127,7 +127,7 @@
|
|||||||
<text class="list-card-space">{{'、'}}</text>
|
<text class="list-card-space">{{'、'}}</text>
|
||||||
<text class="list-card-tag">{{ item.location || '--' }}</text>
|
<text class="list-card-tag">{{ item.location || '--' }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="isSnItem(item)" class="sn-progress-row" @click.stop="openSnPopup(index)">
|
<view v-if="isSnItem(item)" class="sn-progress-row" :class="{ 'sn-progress-row--done': isSnComplete(item) }" @click.stop="openSnPopup(index)">
|
||||||
<text class="sn-progress-row__label">SN:</text>
|
<text class="sn-progress-row__label">SN:</text>
|
||||||
<text class="sn-progress-row__value" :class="{ 'sn-progress-row__value--done': isSnComplete(item) }">{{ snCountOf(item) }}/{{ item.planQty || 0 }}</text>
|
<text class="sn-progress-row__value" :class="{ 'sn-progress-row__value--done': isSnComplete(item) }">{{ snCountOf(item) }}/{{ item.planQty || 0 }}</text>
|
||||||
<text class="sn-progress-row__btn">{{ isSnComplete(item) ? '已完成' : '录入' }}</text>
|
<text class="sn-progress-row__btn">{{ isSnComplete(item) ? '已完成' : '录入' }}</text>
|
||||||
@ -211,7 +211,7 @@
|
|||||||
</u-popup>
|
</u-popup>
|
||||||
|
|
||||||
<!-- SN(序列号)录入弹窗 -->
|
<!-- SN(序列号)录入弹窗 -->
|
||||||
<u-popup v-if="showSnPopup" :show="showSnPopup" mode="bottom" :closeable="true" :closeOnClickOverlay="false" border-radius="20" :z-index="10110" @close="closeSnPopup">
|
<u-popup v-if="showSnPopup" :show="showSnPopup" mode="bottom" :closeable="true" :closeOnClickOverlay="false" round="20" :z-index="10110" @close="closeSnPopup">
|
||||||
<view class="sn-popup">
|
<view class="sn-popup">
|
||||||
<view class="sn-popup__title">SN 录入</view>
|
<view class="sn-popup__title">SN 录入</view>
|
||||||
<view class="sn-popup__subtitle">{{ snPopupItemName }}</view>
|
<view class="sn-popup__subtitle">{{ snPopupItemName }}</view>
|
||||||
@ -223,7 +223,7 @@
|
|||||||
<scroll-view class="sn-popup__list" scroll-y>
|
<scroll-view class="sn-popup__list" scroll-y>
|
||||||
<view v-for="(sn, idx) in snPopupList" :key="idx" class="sn-popup__item">
|
<view v-for="(sn, idx) in snPopupList" :key="idx" class="sn-popup__item">
|
||||||
<text class="sn-popup__item-text">{{ sn }}</text>
|
<text class="sn-popup__item-text">{{ sn }}</text>
|
||||||
<text class="sn-popup__item-del" @click="removeSn(sn)">删除</text>
|
<text class="sn-popup__item-del" @click="requestDeleteSn(sn)">删除</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="!snPopupList.length" class="sn-popup__empty">暂无SN,请扫描或输入</view>
|
<view v-if="!snPopupList.length" class="sn-popup__empty">暂无SN,请扫描或输入</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
@ -233,6 +233,20 @@
|
|||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
|
||||||
|
<!-- SN 删除二次确认弹窗 -->
|
||||||
|
<u-popup :show="showSnDeleteConfirm" mode="center" :closeable="true" :closeOnClickOverlay="false" round="20" @close="cancelDeleteSn">
|
||||||
|
<view class="sn-delete-confirm-popup">
|
||||||
|
<view class="sn-delete-confirm-popup__title">删除SN</view>
|
||||||
|
<view class="sn-delete-confirm-popup__body">
|
||||||
|
<text class="sn-delete-confirm-popup__text">确定要删除该SN码吗?</text>
|
||||||
|
</view>
|
||||||
|
<view class="sn-delete-confirm-popup__actions">
|
||||||
|
<view class="sn-delete-confirm-popup__btn sn-delete-confirm-popup__btn--cancel" @click="cancelDeleteSn">取消</view>
|
||||||
|
<view class="sn-delete-confirm-popup__btn sn-delete-confirm-popup__btn--confirm" @click="confirmDeleteSn">删除</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
|
||||||
<!-- 拦截信息弹窗 -->
|
<!-- 拦截信息弹窗 -->
|
||||||
<u-popup v-if="showInterceptInfoPopup" :show="showInterceptInfoPopup" mode="bottom" :closeable="false" :closeOnClickOverlay="false" border-radius="20" @close="showInterceptInfoPopup = false">
|
<u-popup v-if="showInterceptInfoPopup" :show="showInterceptInfoPopup" mode="bottom" :closeable="false" :closeOnClickOverlay="false" border-radius="20" @close="showInterceptInfoPopup = false">
|
||||||
<view class="intercept-info-popup">
|
<view class="intercept-info-popup">
|
||||||
@ -359,7 +373,10 @@ import voice from '@/core/utils/voice';
|
|||||||
// SN(序列号)录入弹窗状态
|
// SN(序列号)录入弹窗状态
|
||||||
showSnPopup: false,
|
showSnPopup: false,
|
||||||
snInputValue: '',
|
snInputValue: '',
|
||||||
snPopupIndex: -1
|
snPopupIndex: -1,
|
||||||
|
// SN 删除二次确认弹窗状态
|
||||||
|
showSnDeleteConfirm: false,
|
||||||
|
pendingDeleteSn: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -557,7 +574,7 @@ import voice from '@/core/utils/voice';
|
|||||||
// 新录入的 SN 放在最前面,最新显示在列表顶部
|
// 新录入的 SN 放在最前面,最新显示在列表顶部
|
||||||
const nextList = [raw, ...list];
|
const nextList = [raw, ...list];
|
||||||
this.$emit('updateSnList', idx, nextList);
|
this.$emit('updateSnList', idx, nextList);
|
||||||
this.$emit('speakDataConsistent', item);
|
this.$emit('speakSnRecorded', item);
|
||||||
if (nextList.length >= planQty) {
|
if (nextList.length >= planQty) {
|
||||||
this.markBarcodeMatched(String(item.id || ''));
|
this.markBarcodeMatched(String(item.id || ''));
|
||||||
uni.showToast({ title: `SN录入完成(${nextList.length}/${planQty})`, icon: 'success' });
|
uni.showToast({ title: `SN录入完成(${nextList.length}/${planQty})`, icon: 'success' });
|
||||||
@ -565,17 +582,42 @@ import voice from '@/core/utils/voice';
|
|||||||
this.closeSnPopup();
|
this.closeSnPopup();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
voice.speak('数据一致');
|
voice.speak('录入成功');
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
requestDeleteSn(code) {
|
||||||
|
const raw = this.normalizeBarcode(code);
|
||||||
|
if (!raw) return;
|
||||||
|
this.pendingDeleteSn = raw;
|
||||||
|
this.showSnDeleteConfirm = true;
|
||||||
|
},
|
||||||
|
cancelDeleteSn() {
|
||||||
|
this.showSnDeleteConfirm = false;
|
||||||
|
this.pendingDeleteSn = '';
|
||||||
|
},
|
||||||
|
confirmDeleteSn() {
|
||||||
|
this.showSnDeleteConfirm = false;
|
||||||
|
const removed = this.removeSn(this.pendingDeleteSn);
|
||||||
|
this.pendingDeleteSn = '';
|
||||||
|
if (removed) {
|
||||||
|
uni.showToast({ title: '删除成功', icon: 'success' });
|
||||||
|
voice.speak('删除成功');
|
||||||
|
} else {
|
||||||
|
uni.showToast({ title: '删除失败', icon: 'none' });
|
||||||
|
voice.speak('删除失败');
|
||||||
|
}
|
||||||
|
},
|
||||||
removeSn(code) {
|
removeSn(code) {
|
||||||
const idx = this.snPopupIndex;
|
const idx = this.snPopupIndex;
|
||||||
if (idx < 0 || idx >= this.goodsList.length) return;
|
if (idx < 0 || idx >= this.goodsList.length) return false;
|
||||||
const item = this.goodsList[idx];
|
const item = this.goodsList[idx];
|
||||||
const raw = this.normalizeBarcode(code);
|
const raw = this.normalizeBarcode(code);
|
||||||
const list = (Array.isArray(item.snList) ? item.snList : []).map(v => String(v ?? '').trim()).filter(Boolean);
|
const list = (Array.isArray(item.snList) ? item.snList : []).map(v => String(v ?? '').trim()).filter(Boolean);
|
||||||
const nextList = list.filter(v => v !== raw);
|
const nextList = list.filter(v => v !== raw);
|
||||||
|
if (nextList.length === list.length) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
this.$emit('updateSnList', idx, nextList);
|
this.$emit('updateSnList', idx, nextList);
|
||||||
const matchedId = String(item.id || '');
|
const matchedId = String(item.id || '');
|
||||||
if (matchedId && this.matchedGoodsState[matchedId] && nextList.length < Number(item.planQty || 0)) {
|
if (matchedId && this.matchedGoodsState[matchedId] && nextList.length < Number(item.planQty || 0)) {
|
||||||
@ -585,6 +627,7 @@ import voice from '@/core/utils/voice';
|
|||||||
this.matchedGoodsState[matchedId] = false;
|
this.matchedGoodsState[matchedId] = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
normalizeBarcode(value) {
|
normalizeBarcode(value) {
|
||||||
return String(value || '').replace(/\s+/g, '').toUpperCase();
|
return String(value || '').replace(/\s+/g, '').toUpperCase();
|
||||||
@ -721,11 +764,7 @@ import voice from '@/core/utils/voice';
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (matchIndices.length === 0) {
|
if (matchIndices.length === 0) {
|
||||||
// 当前商品为需SN商品且未录满时,扫描结果作为SN录入
|
// 未匹配到商品条码时不直接录入 SN,避免误录;SN 仅在录入弹窗打开时录入
|
||||||
const currentItem = this.goodsList[this.currentGoodsIndex];
|
|
||||||
if (this.isSnItem(currentItem) && !this.isSnComplete(currentItem)) {
|
|
||||||
return this.addSn(code, this.currentGoodsIndex);
|
|
||||||
}
|
|
||||||
voice.speak('无记录');
|
voice.speak('无记录');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1600,7 +1639,8 @@ import voice from '@/core/utils/voice';
|
|||||||
.list-card-row--matched .list-card-label,
|
.list-card-row--matched .list-card-label,
|
||||||
.list-card-row--matched .list-card-value,
|
.list-card-row--matched .list-card-value,
|
||||||
.list-card-row--matched .list-card-name,
|
.list-card-row--matched .list-card-name,
|
||||||
.list-card-row--matched .list-card-tag {
|
.list-card-row--matched .list-card-tag,
|
||||||
|
.list-card-row--matched .list-card-space {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1991,26 +2031,27 @@ import voice from '@/core/utils/voice';
|
|||||||
.sn-popup {
|
.sn-popup {
|
||||||
padding: 40rpx 32rpx 32rpx;
|
padding: 40rpx 32rpx 32rpx;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border-radius: 20rpx 20rpx 0 0;
|
border-radius: 20px 20px 0 0;
|
||||||
|
overflow: hidden;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sn-popup__title {
|
.sn-popup__title {
|
||||||
font-size: 42rpx;
|
font-size: 40rpx;
|
||||||
font-weight: 600;
|
font-weight: bold;
|
||||||
color: #303133;
|
color: #303133;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sn-popup__subtitle {
|
.sn-popup__subtitle {
|
||||||
font-size: 32rpx;
|
font-size: 36rpx;
|
||||||
color: #909399;
|
color: #909399;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 12rpx;
|
margin-top: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sn-popup__progress {
|
.sn-popup__progress {
|
||||||
font-size: 34rpx;
|
font-size: 38rpx;
|
||||||
color: #303133;
|
color: #303133;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
@ -2018,8 +2059,9 @@ import voice from '@/core/utils/voice';
|
|||||||
}
|
}
|
||||||
|
|
||||||
.sn-popup__progress-num {
|
.sn-popup__progress-num {
|
||||||
|
font-size: 38rpx;
|
||||||
color: #2979ff;
|
color: #2979ff;
|
||||||
font-weight: 600;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sn-popup__input-row {
|
.sn-popup__input-row {
|
||||||
@ -2046,7 +2088,7 @@ import voice from '@/core/utils/voice';
|
|||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
background: #2979ff;
|
background: #2979ff;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-size: 34rpx;
|
font-size: 36rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sn-popup__list {
|
.sn-popup__list {
|
||||||
@ -2064,13 +2106,17 @@ import voice from '@/core/utils/voice';
|
|||||||
}
|
}
|
||||||
|
|
||||||
.sn-popup__item-text {
|
.sn-popup__item-text {
|
||||||
font-size: 32rpx;
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
font-size: 34rpx;
|
||||||
color: #303133;
|
color: #303133;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sn-popup__item-del {
|
.sn-popup__item-del {
|
||||||
font-size: 30rpx;
|
flex-shrink: 0;
|
||||||
|
white-space: nowrap;
|
||||||
|
font-size: 36rpx;
|
||||||
color: #f56c6c;
|
color: #f56c6c;
|
||||||
padding-left: 24rpx;
|
padding-left: 24rpx;
|
||||||
}
|
}
|
||||||
@ -2078,7 +2124,7 @@ import voice from '@/core/utils/voice';
|
|||||||
.sn-popup__empty {
|
.sn-popup__empty {
|
||||||
padding: 40rpx 0;
|
padding: 40rpx 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 32rpx;
|
font-size: 34rpx;
|
||||||
color: #c0c4cc;
|
color: #c0c4cc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2102,6 +2148,67 @@ import voice from '@/core/utils/voice';
|
|||||||
border: 1rpx solid #dcdfe6;
|
border: 1rpx solid #dcdfe6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* SN 删除二次确认弹窗 */
|
||||||
|
.sn-delete-confirm-popup {
|
||||||
|
width: 640rpx;
|
||||||
|
padding: 40rpx 32rpx 32rpx;
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sn-delete-confirm-popup__title {
|
||||||
|
font-size: 42rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #303133;
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 32rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sn-delete-confirm-popup__body {
|
||||||
|
margin-bottom: 36rpx;
|
||||||
|
padding: 24rpx;
|
||||||
|
background: #f5f7fa;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sn-delete-confirm-popup__text {
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: #303133;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sn-delete-confirm-popup__actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sn-delete-confirm-popup__btn {
|
||||||
|
flex: 1;
|
||||||
|
height: 88rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sn-delete-confirm-popup__btn + .sn-delete-confirm-popup__btn {
|
||||||
|
margin-left: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sn-delete-confirm-popup__btn--cancel {
|
||||||
|
background: #f5f7fa;
|
||||||
|
color: #606266;
|
||||||
|
border: 1rpx solid #dcdfe6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sn-delete-confirm-popup__btn--confirm {
|
||||||
|
background: #f56c6c;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
/* 列表卡片 SN 进度 */
|
/* 列表卡片 SN 进度 */
|
||||||
.sn-progress-row {
|
.sn-progress-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -2110,14 +2217,14 @@ import voice from '@/core/utils/voice';
|
|||||||
}
|
}
|
||||||
|
|
||||||
.sn-progress-row__label {
|
.sn-progress-row__label {
|
||||||
font-size: 30rpx;
|
font-size: 38rpx;
|
||||||
color: #606266;
|
color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sn-progress-row__value {
|
.sn-progress-row__value {
|
||||||
font-size: 30rpx;
|
font-size: 38rpx;
|
||||||
color: #2979ff;
|
color: #2979ff;
|
||||||
font-weight: 600;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sn-progress-row__value--done {
|
.sn-progress-row__value--done {
|
||||||
@ -2126,10 +2233,25 @@ import voice from '@/core/utils/voice';
|
|||||||
|
|
||||||
.sn-progress-row__btn {
|
.sn-progress-row__btn {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
font-size: 28rpx;
|
font-size: 36rpx;
|
||||||
color: #2979ff;
|
color: #2979ff;
|
||||||
border: 1rpx solid #2979ff;
|
border: 1rpx solid #2979ff;
|
||||||
border-radius: 8rpx;
|
border-radius: 8rpx;
|
||||||
padding: 4rpx 16rpx;
|
padding: 4rpx 16rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sn-progress-row--done {
|
||||||
|
background: #07c160;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sn-progress-row--done .sn-progress-row__label,
|
||||||
|
.sn-progress-row--done .sn-progress-row__value {
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sn-progress-row--done .sn-progress-row__btn {
|
||||||
|
color: #ffffff;
|
||||||
|
border-color: #ffffff;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -69,6 +69,7 @@
|
|||||||
@reprint="handleReprint"
|
@reprint="handleReprint"
|
||||||
@goodsItemClick="handleGoodsItemClick"
|
@goodsItemClick="handleGoodsItemClick"
|
||||||
@speakDataConsistent="handleSpeakDataConsistent"
|
@speakDataConsistent="handleSpeakDataConsistent"
|
||||||
|
@speakSnRecorded="handleSpeakSnRecorded"
|
||||||
/>
|
/>
|
||||||
<view v-else class="detail-empty">
|
<view v-else class="detail-empty">
|
||||||
<u-icon :name="isDprefixedWave ? 'scan' : 'list'" size="86" color="#c0c4cc"></u-icon>
|
<u-icon :name="isDprefixedWave ? 'scan' : 'list'" size="86" color="#c0c4cc"></u-icon>
|
||||||
@ -1421,6 +1422,20 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
|
|||||||
}
|
}
|
||||||
this.recheckReqChain = chain.catch(() => {});
|
this.recheckReqChain = chain.catch(() => {});
|
||||||
},
|
},
|
||||||
|
// 子组件(ReviewDetail)SN 录入成功播报统一入口:先播报"录入成功",再播报该商品的复核要求内容
|
||||||
|
handleSpeakSnRecorded(item) {
|
||||||
|
const prev = this.recheckReqChain;
|
||||||
|
let chain = (prev && typeof prev.then === 'function') ? prev : Promise.resolve();
|
||||||
|
chain = chain.then(() => voice.speak('录入成功', { minInterval: 800 }));
|
||||||
|
const req = String((item && item.packageRequirement) || '').trim();
|
||||||
|
const itemId = String((item && item.id) || '').trim();
|
||||||
|
// 同一商品(按商品 id 去重)仅播报一次复核要求内容,商品数量>1 时多次录入不再重复播报
|
||||||
|
if (req && req !== '--' && itemId && !this.spokenReqItemIds.includes(itemId)) {
|
||||||
|
this.spokenReqItemIds.push(itemId);
|
||||||
|
chain = chain.then(() => voice.speak(`${req}`, { minInterval: 800 }));
|
||||||
|
}
|
||||||
|
this.recheckReqChain = chain.catch(() => {});
|
||||||
|
},
|
||||||
loadScanQuantity() {
|
loadScanQuantity() {
|
||||||
try {
|
try {
|
||||||
const stored = uni.getStorageSync('review_scan_quantity');
|
const stored = uni.getStorageSync('review_scan_quantity');
|
||||||
|
|||||||
@ -451,10 +451,11 @@
|
|||||||
try {
|
try {
|
||||||
const params = this.buildWaveStrategyListParams();
|
const params = this.buildWaveStrategyListParams();
|
||||||
const response = await this.$http('order.wave.waveStrategyList', params);
|
const response = await this.$http('order.wave.waveStrategyList', params);
|
||||||
const parsedList = this.parseWaveStrategyResponse(response);
|
const parsedList = this.parseWaveStrategyResponse(response)
|
||||||
|
.filter(item => !item.disabled);
|
||||||
parsedList.sort((a, b) => Number(b.matchedOrderCountFiltered) - Number(a.matchedOrderCountFiltered));
|
parsedList.sort((a, b) => Number(b.matchedOrderCountFiltered) - Number(a.matchedOrderCountFiltered));
|
||||||
this.strategyList = parsedList;
|
this.strategyList = parsedList;
|
||||||
const firstEnabled = this.strategyList.find(item => !item.disabled);
|
const firstEnabled = this.strategyList[0];
|
||||||
this.currentStrategyId = firstEnabled?.id || '';
|
this.currentStrategyId = firstEnabled?.id || '';
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.currentStrategyId = '';
|
this.currentStrategyId = '';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user