diff --git a/package.json b/package.json index b7983b7..c5923b0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wms-pda", - "version": "1.0.140", + "version": "1.0.141", "private": true, "description": "天豹云仓 WMS_PDA(uni-app Vue2 + @vue/cli 4.5)", "scripts": { diff --git a/src/manifest.json b/src/manifest.json index e3c004b..accf726 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,8 +2,8 @@ "name" : "WMS_PDA", "appid" : "__UNI__0B3DAD3", "description" : "多平台快速开发的UI框架", - "versionName" : "1.0.140", - "versionCode" : 1000140, + "versionName" : "1.0.141", + "versionCode" : 1000141, "transformPx" : false, "app-plus" : { "statusbar" : { diff --git a/src/pages/configuration/Workbench.vue b/src/pages/configuration/Workbench.vue index bdd963d..885e60b 100644 --- a/src/pages/configuration/Workbench.vue +++ b/src/pages/configuration/Workbench.vue @@ -9,9 +9,9 @@ - {{ opt.label }} + + + {{ opt.label }} + + @@ -53,7 +57,9 @@ plain :disabled="Number(item.status) !== 1" @click="openBindPopup(item)" - >绑定 + > + 绑定 + @@ -84,17 +90,13 @@ - - 绑定工作台 - - - - + 绑定工作台 工作台: {{ bindPopup.workbench ? (bindPopup.workbench.name || '--') : '--' }} @@ -105,7 +107,9 @@ v-model="bindCode" border="surround" :maxlength="6" - placeholder="扫描/输入绑定码(6位)" + placeholder="扫描/输入工作台屏幕二维码" + fontSize="36rpx" + placeholderStyle="font-size: 36rpx;" :focus="bindCodeFocus" @confirm="confirmBind" @blur="bindCodeFocus = false" @@ -121,10 +125,13 @@ - 扫描工作台屏幕二维码 - 关闭 - 确定 + 关闭 + {{ binding ? '提交中...' : '确定' }} @@ -431,6 +438,18 @@ }, getStatusType(status) { return Number(status) === 1 ? 'success' : 'warning'; + }, + // 筛选按钮激活态:启用=绿、禁用=橙,与列表状态标签 u-tag 保持一致 + filterItemClass(opt) { + const classes = { 'filter-group__item--active': this.statusFilter === opt.value }; + if (this.statusFilter === opt.value) { + if (opt.value === 1) { + classes['filter-group__item--success'] = true; + } else if (opt.value === 0) { + classes['filter-group__item--warning'] = true; + } + } + return classes; } } } @@ -452,7 +471,7 @@ .search-filter { background: #ffffff; - padding: 20rpx 24rpx 12rpx; + padding: 16rpx 24rpx 12rpx; border-bottom: 1rpx solid #f0f0f0; } @@ -468,24 +487,55 @@ margin-top: 16rpx; } - /* 真机 WebView 对 flex gap 兼容性差,改用 margin 拉开按钮间隔 */ - .status-filter__chip { - padding: 8rpx 28rpx; - font-size: 26rpx; - color: #606266; - background: #f5f5f5; - border-radius: 999rpx; - transition: all 0.2s; - margin-right: 32rpx; + .filter-group { + flex: 1; + display: flex; } - .status-filter__chip:last-child { - margin-right: 0; + .filter-group__item { + flex: 1; + height: 56rpx; + padding: 0 12rpx; + display: flex; + align-items: center; + justify-content: center; + background: #f5f7fa; + border: 1rpx solid #ebeef5; + border-radius: 28rpx; } - .status-filter__chip--active { - color: #ffffff; + .filter-group__item + .filter-group__item { + margin-left: 16rpx; + } + + .filter-group__item--active { background: #2979ff; + border-color: #2979ff; + box-shadow: 0 4rpx 12rpx rgba(41, 121, 255, 0.28); + } + + /* 启用=绿(#5ac725)/ 禁用=橙(#f9ae3d),与列表 u-tag success/warning 一致 */ + .filter-group__item--success { + background: #5ac725; + border-color: #5ac725; + box-shadow: 0 4rpx 12rpx rgba(90, 199, 37, 0.28); + } + + .filter-group__item--warning { + background: #f9ae3d; + border-color: #f9ae3d; + box-shadow: 0 4rpx 12rpx rgba(249, 174, 61, 0.28); + } + + .filter-group__item-text { + font-size: 34rpx; + color: #606266; + white-space: nowrap; + } + + .filter-group__item--active .filter-group__item-text { + color: #ffffff; + font-weight: bold; } .list-content { @@ -507,13 +557,13 @@ } .empty-text { - font-size: 34rpx; - font-weight: 600; + font-size: 36rpx; + font-weight: bold; color: #303133; } .empty-hint { - font-size: 26rpx; + font-size: 32rpx; color: #909399; text-align: center; } @@ -546,7 +596,7 @@ .workbench-card__name { font-size: 38rpx; - font-weight: 600; + font-weight: bold; color: #303133; flex: 1; min-width: 0; @@ -556,6 +606,41 @@ flex-shrink: 0; display: flex; align-items: center; + + /* 状态标签(启用/禁用)文字字号 */ + ::v-deep .u-tag__text { + font-size: 34rpx; + line-height: 1; + } + + /* 状态标签宽高:与 34rpx 文字协调,并与绑定按钮等高对齐 */ + ::v-deep .u-tag { + height: 56rpx; + line-height: 56rpx; + padding: 0 16rpx; + box-sizing: border-box; + } + + /* 绑定按钮宽高:与 36rpx 文字协调,避免 mini 尺寸过于紧凑 */ + ::v-deep .u-button { + height: 56rpx; + min-width: auto; + padding: 0 24rpx; + line-height: 56rpx; + } + + /* 禁用时置灰(去掉半透明效果,改为明确的灰底灰字) */ + ::v-deep .u-button--disabled { + opacity: 1; + color: #c0c4cc; + background-color: #f5f7fa; + border-color: #dcdfe6; + } + } + + .workbench-card__bind-text { + font-size: 36rpx; + line-height: 1; } /* 状态标签与绑定按钮间隔(用 margin 兼容真机 WebView) */ @@ -566,7 +651,7 @@ .workbench-card__row { display: flex; align-items: flex-start; - font-size: 26rpx; + font-size: 34rpx; padding: 6rpx 0; } @@ -583,78 +668,80 @@ word-break: break-all; } - /* 绑定面板 */ + /* 绑定面板(样式参考完成盘点确认弹窗) */ .bind-popup { - width: 580rpx; - padding: 40rpx 36rpx; + width: 640rpx; + padding: 40rpx 32rpx 32rpx; + background: #ffffff; + border-radius: 20rpx; box-sizing: border-box; } - .bind-popup__header { - position: relative; - margin-bottom: 50rpx; - } - .bind-popup__title { - font-size: 34rpx; - font-weight: 600; + font-size: 42rpx; + font-weight: bold; color: #303133; text-align: center; - } - - .bind-popup__close { - position: absolute; - top: 50%; - right: -2rpx; - transform: translateY(-50%); - z-index: 2; - padding: 6rpx; - display: flex; - align-items: center; - justify-content: center; + margin-bottom: 32rpx; } .bind-popup__workbench { display: flex; align-items: center; - gap: 8rpx; - padding: 16rpx 20rpx; + padding: 24rpx; margin-bottom: 24rpx; - background: #f5f6f8; + background: #f5f7fa; border-radius: 12rpx; } .bind-popup__label { flex-shrink: 0; - font-size: 26rpx; + font-size: 32rpx; color: #909399; + margin-right: 8rpx; } .bind-popup__name { font-size: 38rpx; - font-weight: 600; + font-weight: bold; color: #303133; } - .bind-popup__hint { - margin-top: 12rpx; - font-size: 24rpx; - color: #909399; - text-align: center; - } - .bind-popup__actions { display: flex; align-items: center; - margin-top: 32rpx; + margin-top: 64rpx; } - .bind-popup__actions ::v-deep .u-button { + .bind-popup__btn { flex: 1; + height: 88rpx; + border-radius: 12rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 36rpx; + font-weight: 500; } - .bind-popup__actions ::v-deep .u-button + .u-button { - margin-left: 48rpx; + .bind-popup__btn + .bind-popup__btn { + margin-left: 20rpx; + } + + .bind-popup__btn--cancel { + background: #f5f7fa; + color: #606266; + border: 1rpx solid #dcdfe6; + } + + .bind-popup__btn--confirm { + background: #2979ff; + color: #ffffff; + } + + .bind-popup__btn--disabled { + opacity: 0.6; + pointer-events: none; } /* 输入框行:输入框 + 行末扫码图标按钮 */ @@ -666,6 +753,8 @@ .bind-popup__input-row ::v-deep .bind-popup__input { flex: 1; min-width: 0; + height: 88rpx; + box-sizing: border-box; } .bind-popup__input-row ::v-deep .bind-popup__scan-btn { diff --git a/src/pages/warehouse/inventoryTransfer.vue b/src/pages/warehouse/inventoryTransfer.vue index 343af56..920e1db 100644 --- a/src/pages/warehouse/inventoryTransfer.vue +++ b/src/pages/warehouse/inventoryTransfer.vue @@ -558,14 +558,14 @@ export default { } .filter-group__item-text { - font-size: 30rpx; - color: #303133; + font-size: 34rpx; + color: #606266; white-space: nowrap; } .filter-group__item--active .filter-group__item-text { color: #ffffff; - font-weight: 600; + font-weight: bold; } /* 移出(橙色警示) */ @@ -613,7 +613,7 @@ export default { .empty-hint { margin-top: 12rpx; - font-size: 30rpx; + font-size: 32rpx; color: #c0c4cc; } diff --git a/src/pages/work/order/gBWaveStrategy.vue b/src/pages/work/order/gBWaveStrategy.vue index 680bc6e..31658bd 100644 --- a/src/pages/work/order/gBWaveStrategy.vue +++ b/src/pages/work/order/gBWaveStrategy.vue @@ -24,8 +24,7 @@ 策略类型:{{ currentStrategy.strategyTypeText }} 分批模式: - {{ currentStrategy.batchModeText }} - {{ currentStrategy.batchMode }} + {{ currentStrategy.batchModeText || currentStrategy.batchMode }} @@ -81,7 +80,7 @@ color="#ffffff" :volume-icon="false" :more-icon="false" - :speed="60" + :speed="30" :padding="0" :radius="0" :autoplay="true" @@ -103,8 +102,8 @@ - 刷新 - 抓取团购 + + @@ -597,7 +596,7 @@ } .card-title { - font-size: 34rpx; + font-size: 38rpx; font-weight: 600; color: #303133; margin-bottom: 14rpx; @@ -681,6 +680,7 @@ } .label { + font-size: 34rpx; width: auto; white-space: nowrap; margin-right: 6rpx; @@ -688,6 +688,7 @@ } .value { + font-size: 36rpx; flex: 1; min-width: 0; color: #303133; @@ -855,6 +856,43 @@ box-sizing: border-box; } + .action-btn { + display: flex; + align-items: center; + justify-content: center; + height: 88rpx; + margin: 0; + padding: 0; + font-size: 36rpx; + line-height: 1; + color: #606266; + background: #ffffff; + border: 1rpx solid #dcdfe6; + border-radius: 12rpx; + box-sizing: border-box; + } + + .action-btn::after { + border: none; + } + + .action-btn--primary { + color: #ffffff; + background: #2979ff; + border-color: #2979ff; + } + + .action-btn--hover { + opacity: 0.85; + } + + .action-btn--primary[disabled] { + opacity: 0.6; + color: #ffffff; + background: #2979ff; + border-color: #2979ff; + } + .limit-popup-mask { position: fixed; left: 0; diff --git a/src/pages/work/order/order-review-comps/ReviewDetail.vue b/src/pages/work/order/order-review-comps/ReviewDetail.vue index f4d4f24..39e4832 100644 --- a/src/pages/work/order/order-review-comps/ReviewDetail.vue +++ b/src/pages/work/order/order-review-comps/ReviewDetail.vue @@ -122,10 +122,16 @@ {{ item.skuName || '--' }} {{'、'}} - {{ item.barcode || '--' }} + {{ displayBarcode(item) }} + {{ isBarcodeExpanded(item) ? '收起' : '展开' }} {{'、'}} {{ item.location || '--' }} + + SN: + {{ snCountOf(item) }}/{{ item.planQty || 0 }} + {{ isSnComplete(item) ? '已完成' : '录入' }} + {{ item.packageRequirement }} @@ -204,6 +210,29 @@ + + + + SN 录入 + {{ snPopupItemName }} + 已录 {{ snPopupCount }} / {{ snPopupPlanQty }} + + + 录入 + + + + {{ sn }} + 删除 + + 暂无SN,请扫描或输入 + + + 关闭 + + + + @@ -324,7 +353,13 @@ import voice from '@/core/utils/voice'; noBarcodeItemTotalQty: 0, showInterceptInfoPopup: false, // 单品单件自动复核场景弹窗确认回调(弹窗关闭/确认后调用,继续自动复核发货) - sharedBarcodeOnClose: null + sharedBarcodeOnClose: null, + // 商品条码展开/收起状态(键为商品 id),超过 3 个条码时默认收起 + barcodeExpandedMap: {}, + // SN(序列号)录入弹窗状态 + showSnPopup: false, + snInputValue: '', + snPopupIndex: -1 }; }, computed: { @@ -385,6 +420,23 @@ import voice from '@/core/utils/voice'; return (listType === 'single' || listType === 'group') && Array.isArray(this.detailInfo?.interceptList) && this.detailInfo.interceptList.length > 0; + }, + snPopupItem() { + const idx = this.snPopupIndex; + if (idx < 0 || idx >= this.goodsList.length) return {}; + return this.goodsList[idx] || {}; + }, + snPopupItemName() { + return this.snPopupItem.skuName || '商品'; + }, + snPopupPlanQty() { + return Number(this.snPopupItem.planQty || 0); + }, + snPopupList() { + return Array.isArray(this.snPopupItem.snList) ? this.snPopupItem.snList : []; + }, + snPopupCount() { + return this.snPopupList.length; } }, watch: { @@ -441,9 +493,127 @@ import voice from '@/core/utils/voice'; if (!id) return false; return !!this.matchedGoodsState[id]; }, + isSnItem(item) { + return String((item && item.need_sn) || '').trim().toUpperCase() === 'Y'; + }, + snCountOf(item) { + return Array.isArray(item?.snList) ? item.snList.map(v => String(v ?? '').trim()).filter(Boolean).length : 0; + }, + isSnComplete(item) { + return this.isSnItem(item) && this.snCountOf(item) >= Number(item?.planQty || 0); + }, + openSnPopup(index) { + if (this.isReadOnly) return; + const idx = typeof index === 'number' && index >= 0 ? index : this.currentGoodsIndex; + if (idx < 0 || idx >= this.goodsList.length) return; + if (!this.isSnItem(this.goodsList[idx])) return; + this.currentGoodsIndex = idx; + this.snPopupIndex = idx; + this.snInputValue = ''; + this.showSnPopup = true; + }, + closeSnPopup() { + this.showSnPopup = false; + this.snPopupIndex = -1; + this.snInputValue = ''; + }, + handleSnInputConfirm() { + const code = this.normalizeBarcode(this.snInputValue); + this.snInputValue = ''; + if (!code) { + uni.showToast({ title: '请输入或扫描SN码', icon: 'none' }); + return; + } + this.addSn(code, this.snPopupIndex >= 0 ? this.snPopupIndex : this.currentGoodsIndex); + }, + addSn(code, index) { + const raw = this.normalizeBarcode(code); + if (!raw) return false; + const idx = (typeof index === 'number' && index >= 0 && index < this.goodsList.length) + ? index + : (this.snPopupIndex >= 0 ? this.snPopupIndex : this.currentGoodsIndex); + if (idx < 0 || idx >= this.goodsList.length) return false; + const item = this.goodsList[idx]; + if (!this.isSnItem(item)) return false; + const planQty = Number(item.planQty || 0); + const list = (Array.isArray(item.snList) ? item.snList : []).map(v => String(v ?? '').trim()).filter(Boolean); + if (list.includes(raw)) { + uni.showToast({ title: 'SN码重复', icon: 'none' }); + voice.speak('重复SN'); + return true; + } + if (list.length >= planQty) { + uni.showToast({ title: 'SN已录满', icon: 'none' }); + voice.speak('超出订单数'); + return true; + } + const nextList = [...list, raw]; + this.$emit('updateSnList', idx, nextList); + this.$emit('speakDataConsistent', item); + if (nextList.length >= planQty) { + this.markBarcodeMatched(String(item.id || '')); + uni.showToast({ title: `SN录入完成(${nextList.length}/${planQty})`, icon: 'success' }); + if (this.showSnPopup && this.snPopupIndex === idx) { + this.closeSnPopup(); + } + } else { + voice.speak('数据一致'); + } + return true; + }, + removeSn(code) { + const idx = this.snPopupIndex; + if (idx < 0 || idx >= this.goodsList.length) return; + const item = this.goodsList[idx]; + const raw = this.normalizeBarcode(code); + const list = (Array.isArray(item.snList) ? item.snList : []).map(v => String(v ?? '').trim()).filter(Boolean); + const nextList = list.filter(v => v !== raw); + this.$emit('updateSnList', idx, nextList); + const matchedId = String(item.id || ''); + if (matchedId && this.matchedGoodsState[matchedId] && nextList.length < Number(item.planQty || 0)) { + if (typeof this.$set === 'function') { + this.$set(this.matchedGoodsState, matchedId, false); + } else { + this.matchedGoodsState[matchedId] = false; + } + } + }, normalizeBarcode(value) { return String(value || '').replace(/\s+/g, '').toUpperCase(); }, + // 提取商品条码列表(优先取 barcodes 数组,兜底拆分 barcode 字符串),仅用于展示,不影响匹配 + barcodeListOf(item) { + const arr = Array.isArray(item?.barcodes) ? item.barcodes : []; + if (arr.length) { + return arr.map(v => String(v == null ? '' : v).trim()).filter(Boolean); + } + const text = String(item?.barcode || '').trim(); + if (!text) return []; + return text.split(/[,;,、\s]+/).map(v => v.trim()).filter(Boolean); + }, + hasMoreBarcodes(item) { + return this.barcodeListOf(item).length > 3; + }, + isBarcodeExpanded(item) { + return !!this.barcodeExpandedMap[String(item?.id || '')]; + }, + toggleBarcodeExpand(item) { + const key = String(item?.id || ''); + const next = !this.barcodeExpandedMap[key]; + if (typeof this.$set === 'function') { + this.$set(this.barcodeExpandedMap, key, next); + } else { + this.barcodeExpandedMap[key] = next; + } + }, + // 列表模式展示的条码文本:超过 3 个时默认只显示前 3 个,展开后显示全部 + displayBarcode(item) { + const list = this.barcodeListOf(item); + if (!list.length) return '--'; + const shown = this.isBarcodeExpanded(item) ? list : list.slice(0, 3); + const text = shown.join(', '); + return list.length > shown.length ? `${text}…` : text; + }, extractBarcodeCandidates(item) { const sourceList = [item?.barcode, item?.skuCode]; const result = []; @@ -476,6 +646,12 @@ import voice from '@/core/utils/voice'; const code = this.normalizeBarcode(scanCode); if (!code) return false; + // SN 录入弹窗打开时:扫描结果作为 SN 录入 + if (this.showSnPopup) { + this.snInputValue = ''; + return this.addSn(code, this.snPopupIndex); + } + // 基于时间的去重:300ms 内相同条码跳过,防止广播重复触发导致弹窗多次 const now = Date.now(); const elapsed = now - this.lastScanTime; @@ -501,10 +677,29 @@ import voice from '@/core/utils/voice'; }); if (matchIndices.length === 0) { + // 当前商品为需SN商品且未录满时,扫描结果作为SN录入 + const currentItem = this.goodsList[this.currentGoodsIndex]; + if (this.isSnItem(currentItem) && !this.isSnComplete(currentItem)) { + return this.addSn(code, this.currentGoodsIndex); + } voice.speak('无记录'); return false; } + // 命中需SN商品:选中该商品并打开SN录入弹窗(SN商品不按普通商品累加数量) + const snMatchIdx = matchIndices.find(idx => this.isSnItem(this.goodsList[idx])); + if (snMatchIdx !== undefined) { + const snItem = this.goodsList[snMatchIdx]; + if (this.isSnComplete(snItem)) { + uni.showToast({ title: '该商品SN已录满', icon: 'none' }); + voice.speak('超出订单数'); + return true; + } + this.openSnPopup(snMatchIdx); + voice.speak('请录入SN'); + return true; + } + // 命中行中存在 has_shared_barcode(库内存在共享同一条码的其他商品)时,弹出底部抽屉提示 const sharedIdx = matchIndices.find(idx => this.goodsList[idx]?.has_shared_barcode); if (sharedIdx !== undefined) { @@ -628,6 +823,11 @@ import voice from '@/core/utils/voice'; handleBarcodeClick() { const item = this.currentGoods; if (!item) return; + // 需SN商品:打开SN录入弹窗 + if (this.isSnItem(item)) { + this.openSnPopup(this.currentGoodsIndex); + return; + } // 无需复核商品(need_recheck=N):无需扫码/无条码复核,提示"无需复核"而非"已复核完成" if (this.isNoRecheck(item)) { uni.showToast({ title: '该商品无需复核', icon: 'none' }); @@ -675,6 +875,11 @@ import voice from '@/core/utils/voice'; }, openNoBarcodePopup(item) { if (!item) return; + // 需SN商品:长按/点击打开SN录入弹窗,而不是无条码复核 + if (this.isSnItem(item)) { + this.openSnPopup(this.currentGoodsIndex); + return; + } // 无需复核商品(need_recheck=N,如虚拟赠品):无需扫码/无条码复核, // 提示"无需复核"而非"已复核完成",避免与真实已复核订单混淆 if (this.isNoRecheck(item)) { @@ -729,6 +934,11 @@ import voice from '@/core/utils/voice'; }, selectGoods(index) { this.currentGoodsIndex = index; + const item = this.goodsList[index]; + // 点击需SN商品时自动打开SN录入弹窗(兼容宫格/列表模式手动录入) + if (item && this.isSnItem(item) && !this.isSnComplete(item) && !this.isReadOnly) { + this.openSnPopup(index); + } this.$emit('goodsItemClick'); }, toggleViewMode() { @@ -767,6 +977,8 @@ import voice from '@/core/utils/voice'; this.lastScanCode = ''; this.lastScanTime = 0; this.sharedBarcodeOnClose = null; + // 切换订单时重置条码展开状态,避免跨订单残留 + this.barcodeExpandedMap = {}; }, /** * 外部调用:单品单件 D 前缀波次自动复核场景,库内有相同商品时弹出确认弹窗 @@ -1429,6 +1641,14 @@ import voice from '@/core/utils/voice'; line-height: 1.5; } + .barcode-toggle { + font-size: 32rpx; + color: #2979ff; + line-height: 1.5; + margin-left: 12rpx; + padding: 0 10rpx; + } + .list-card-space { font-size: 38rpx; color: #000000; @@ -1722,4 +1942,150 @@ import voice from '@/core/utils/voice'; background: #2979ff; color: #ffffff; } + + /* SN 录入弹窗 */ + .sn-popup { + padding: 40rpx 32rpx 32rpx; + background: #ffffff; + border-radius: 20rpx 20rpx 0 0; + box-sizing: border-box; + } + + .sn-popup__title { + font-size: 42rpx; + font-weight: 600; + color: #303133; + text-align: center; + } + + .sn-popup__subtitle { + font-size: 32rpx; + color: #909399; + text-align: center; + margin-top: 12rpx; + } + + .sn-popup__progress { + font-size: 34rpx; + color: #303133; + text-align: center; + margin-top: 20rpx; + margin-bottom: 24rpx; + } + + .sn-popup__progress-num { + color: #2979ff; + font-weight: 600; + } + + .sn-popup__input-row { + display: flex; + align-items: center; + } + + .sn-popup__input { + flex: 1; + height: 88rpx; + background: #f5f7fa; + border: 1rpx solid #dcdfe6; + border-radius: 12rpx; + padding: 0 24rpx; + font-size: 36rpx; + } + + .sn-popup__add-btn { + flex-shrink: 0; + height: 88rpx; + line-height: 88rpx; + padding: 0 36rpx; + margin-left: 16rpx; + border-radius: 12rpx; + background: #2979ff; + color: #ffffff; + font-size: 34rpx; + } + + .sn-popup__list { + margin-top: 24rpx; + max-height: 480rpx; + min-height: 120rpx; + } + + .sn-popup__item { + display: flex; + align-items: center; + justify-content: space-between; + padding: 18rpx 8rpx; + border-bottom: 1rpx solid #f0f0f0; + } + + .sn-popup__item-text { + font-size: 32rpx; + color: #303133; + word-break: break-all; + } + + .sn-popup__item-del { + font-size: 30rpx; + color: #f56c6c; + padding-left: 24rpx; + } + + .sn-popup__empty { + padding: 40rpx 0; + text-align: center; + font-size: 32rpx; + color: #c0c4cc; + } + + .sn-popup__footer { + margin-top: 24rpx; + } + + .sn-popup__btn { + height: 88rpx; + border-radius: 12rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 36rpx; + font-weight: 500; + } + + .sn-popup__btn--cancel { + background: #f5f7fa; + color: #606266; + border: 1rpx solid #dcdfe6; + } + + /* 列表卡片 SN 进度 */ + .sn-progress-row { + display: flex; + align-items: center; + padding: 0 16rpx 16rpx; + } + + .sn-progress-row__label { + font-size: 30rpx; + color: #606266; + } + + .sn-progress-row__value { + font-size: 30rpx; + color: #2979ff; + font-weight: 600; + } + + .sn-progress-row__value--done { + color: #07c160; + } + + .sn-progress-row__btn { + margin-left: auto; + font-size: 28rpx; + color: #2979ff; + border: 1rpx solid #2979ff; + border-radius: 8rpx; + padding: 4rpx 16rpx; + } diff --git a/src/pages/work/order/order-review.vue b/src/pages/work/order/order-review.vue index ac22d74..09d4a57 100644 --- a/src/pages/work/order/order-review.vue +++ b/src/pages/work/order/order-review.vue @@ -61,6 +61,7 @@ :scannedPackageMaterial="scannedPackageMaterial" :pickMode="pickMode" @updateScannedQty="handleUpdateScannedQty" + @updateSnList="handleUpdateSnList" @allScanned="handleDetailAllScanned" @resetScanQty="handleResetScanQty" @confirmRecheck="handleConfirmRecheck" @@ -2846,6 +2847,7 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue'; const scannedQty = Number(rawItem?.scanned_qty ?? rawItem?.finish_qty ?? rawItem?.scannedQty ?? 0); // 无需复核商品(need_recheck=N,如虚拟赠品):直接标记为已扫,已扫数量取计划数 const needRecheck = String(stockItem?.need_recheck ?? rawItem?.need_recheck ?? '').trim().toUpperCase(); + const needSn = String(stockItem?.need_sn ?? rawItem?.need_sn ?? '').trim().toUpperCase(); const stockName = stockItem ? String(stockItem.item_name || '').trim() : ''; const barcodeSource = stockItem?.barcodes || rawItem?.barcodes || rawItem?.barcode || snapshot?.barcodes || snapshot?.barcode || []; const stockBarcodes = this.normalizeBarcodeValues(barcodeSource); @@ -2859,6 +2861,9 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue'; // 无需复核商品(need_recheck=N):已扫数量视为计划数,卡片标记为已扫 scannedQty: needRecheck === 'N' ? (isNaN(planQty) ? 0 : planQty) : (isNaN(scannedQty) ? 0 : scannedQty), need_recheck: needRecheck, + need_sn: needSn, + stock_id: stockItem?.stock_id ?? rawItem?.stock_id ?? '', + snList: [], packageRequirement: String(stockItem?.recheck_requirements || rawItem?.recheck_requirements || stockItem?.packing_requirements || rawItem?.packing_requirements || rawItem?.package_requirement || rawItem?.packageRequirement || rawItem?.packing_requirement || '').trim() || '--', skuCode: String(stockItem?.item_code || rawItem?.item_code || snapshot?.item_code || ''), skuName: stockName || String(snapshot?.item_name || rawItem?.item_name || '--'), @@ -3037,6 +3042,29 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue'; this.dprefixedBarcodeVerified = false; this.dprefixedAllScannedHandled = false; this.noRecheckAutoAdvanceHandled = false; + // 返回列表时清空当前订单详情信息,避免残留上一单数据 + this.detailInfo = { + recordId: '', + orderId: 0, + waveId: '', + waveNo: '--', + waybillNo: '', + matchType: '', + recheckStatus: '', + pickerName: '--', + cartNo: '--', + status: 'pending', + unreviewedCount: 0, + storeRemark: '', + storeName: '', + waveIndex: '', + orderIds: [], + interceptStatus: '', + printStationId: '', + printStationName: '', + boxNo: '', + packingRequirements: '' + }; // 从详情返回后刷新列表 // D波次:keyword 是商品条码,scanOrder 不支持,依赖本地已更新的 orderList if (this.keyword && !this.isDprefixedWave) { @@ -3144,7 +3172,39 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue'; return waveId ? { wave_id: waveId } : null; } const orderId = Number(this.detailInfo?.orderId || this.detailInfo?.recordId || 0); - return orderId > 0 ? { order_id: orderId } : null; + if (orderId <= 0) return null; + const params = { order_id: orderId }; + const snMap = this.buildSnMap(); + if (Object.keys(snMap).length) { + params.sn_map = snMap; + } + return params; + }, + buildSnMap() { + const map = {}; + (Array.isArray(this.detailGoodsList) ? this.detailGoodsList : []).forEach(item => { + if (!item || String(item.need_sn || '').trim().toUpperCase() !== 'Y') return; + const stockId = String(item.stock_id ?? item.id ?? '').trim(); + if (!stockId) return; + const snList = Array.isArray(item.snList) ? item.snList.map(v => String(v ?? '').trim()).filter(Boolean) : []; + if (!snList.length) return; + if (!map[stockId]) { + map[stockId] = []; + } + snList.forEach(sn => { + if (!map[stockId].includes(sn)) { + map[stockId].push(sn); + } + }); + }); + return map; + }, + hasIncompleteSn() { + return (Array.isArray(this.detailGoodsList) ? this.detailGoodsList : []).some(item => { + if (!item || String(item.need_sn || '').trim().toUpperCase() !== 'Y') return false; + const snCount = Array.isArray(item.snList) ? item.snList.map(v => String(v ?? '').trim()).filter(Boolean).length : 0; + return snCount < Number(item.planQty || 0); + }); }, async callConfirmRecheck() { const params = this.buildRecheckParams(); @@ -3152,6 +3212,12 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue'; uni.showToast({ title: '缺少订单/波次ID', icon: 'none' }); return false; } + // SN未录齐时阻止确认复核(need_sn=Y 商品需录入足够数量的SN) + if (this.hasIncompleteSn()) { + uni.showToast({ title: 'SN未录齐,无法确认复核', icon: 'none' }); + this.speakVoice('SN未录齐'); + return false; + } // 弱网防重入:上一次确认复核请求未完成时忽略本次触发,避免弱网下重复提交导致重复复核/重复发货 if (this.confirmRechecking) { return false; @@ -3582,6 +3648,9 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue'; if (!params) { throw new Error('缺少订单/波次ID'); } + if (this.hasIncompleteSn()) { + throw new Error('SN未录齐,无法确认复核'); + } // 确认复核为写操作:弱网下快速失败(10s);toastAfter=false 关闭全局 toast,由 doGroupShip 的 catch 统一处理 await this.$http('order.recheckOrder.confirmRecheck', params, '', false, 'text', 10000); // 通知订单复核页面更新列表状态 @@ -3895,6 +3964,9 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue'; } else if (action === 'manual' && !this.autoShip) { // 手动发货:复核完成后留在当前页,由用户继续操作 } else { + // 自动模式:复核成功后先清空当前详情数据,再进入下一单(下一单会重新构建详情) + this.showDetailView = false; + this.detailGoodsList = []; setTimeout(() => this.goToNextOrder(), 500); } }, @@ -3987,6 +4059,17 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue'; this.detailGoodsList[index].scannedQty = newQty; } }, + handleUpdateSnList(index, snList) { + if (index < 0 || index >= this.detailGoodsList.length) return; + const list = Array.isArray(snList) ? snList.map(v => String(v ?? '').trim()).filter(Boolean) : []; + const item = this.detailGoodsList[index] || {}; + const next = { ...item, snList: list, scannedQty: list.length }; + if (typeof this.$set === 'function') { + this.$set(this.detailGoodsList, index, next); + } else { + this.detailGoodsList.splice(index, 1, next); + } + }, handleResetScanQty() { this.scanQuantity = 1; this.saveSettings(); diff --git a/src/pages/work/order/returnRecord-comps/ReturnScanPanel.vue b/src/pages/work/order/returnRecord-comps/ReturnScanPanel.vue index 45c1b4f..6ea0037 100644 --- a/src/pages/work/order/returnRecord-comps/ReturnScanPanel.vue +++ b/src/pages/work/order/returnRecord-comps/ReturnScanPanel.vue @@ -156,6 +156,8 @@ placeholder="输入新备注并添加" border="surround" :maxlength="50" + fontSize="36rpx" + placeholderStyle="font-size: 36rpx;" :customStyle="{ flex: 1 }" @confirm="handleAddRemark" > @@ -1316,7 +1318,7 @@ export default { flex-shrink: 0; .remark-popup__add-btn-text { - font-size: 32rpx; + font-size: 36rpx; color: #ffffff; } } @@ -1324,8 +1326,10 @@ export default { .remark-popup__scroll { flex: 1; - min-height: 120rpx; - margin-top: 20rpx; + /* 真机 flex 收缩不可靠,需给 scroll-view 明确的高度上限,内部滚动且不遮挡底部按钮 */ + min-height: 160rpx; + max-height: 40vh; + margin-top: 48rpx; } .remark-popup__empty { @@ -1335,7 +1339,7 @@ export default { justify-content: center; .remark-popup__empty-text { - font-size: 28rpx; + font-size: 32rpx; color: #c0c4cc; } } @@ -1382,13 +1386,13 @@ export default { display: flex; align-items: center; justify-content: center; - background: #f5f7fa; - border: 1rpx solid #e6e8eb; + background: #fff1f0; + border: 1rpx solid #ffccc7; border-radius: 12rpx; .remark-popup__btn-text { - font-size: 32rpx; - color: #606266; + font-size: 36rpx; + color: #f5222d; } } } diff --git a/src/pages/work/order/scatter-wave-strategy.vue b/src/pages/work/order/scatter-wave-strategy.vue index d97211c..b2d9bad 100644 --- a/src/pages/work/order/scatter-wave-strategy.vue +++ b/src/pages/work/order/scatter-wave-strategy.vue @@ -24,8 +24,7 @@ 策略类型:{{ currentStrategy.strategyTypeText }} 分批模式: - {{ currentStrategy.batchModeText }} - {{ currentStrategy.batchMode }} + {{ currentStrategy.batchModeText || currentStrategy.batchMode }} @@ -81,7 +80,7 @@ color="#ffffff" :volume-icon="false" :more-icon="false" - :speed="60" + :speed="30" :padding="0" :radius="0" :autoplay="true" @@ -103,8 +102,8 @@ - 刷新 - 抓取散单 + + @@ -249,7 +248,7 @@ return { calculate_next_fetch_order_count: 1, where: { - strategy_type: 1 + strategy_type: [1, 3] }, pagination: { page: 1, @@ -301,6 +300,9 @@ if (type === 2) { return '团购'; } + if (type === 3) { + return 'SN(序列号管理)'; + } return '--'; }, normalizeBatchModeText(value) { @@ -597,7 +599,7 @@ } .card-title { - font-size: 34rpx; + font-size: 38rpx; font-weight: 600; color: #303133; margin-bottom: 14rpx; @@ -681,6 +683,7 @@ } .label { + font-size: 34rpx; width: auto; white-space: nowrap; margin-right: 6rpx; @@ -688,6 +691,7 @@ } .value { + font-size: 36rpx; flex: 1; min-width: 0; color: #303133; @@ -855,6 +859,43 @@ box-sizing: border-box; } + .action-btn { + display: flex; + align-items: center; + justify-content: center; + height: 88rpx; + margin: 0; + padding: 0; + font-size: 36rpx; + line-height: 1; + color: #606266; + background: #ffffff; + border: 1rpx solid #dcdfe6; + border-radius: 12rpx; + box-sizing: border-box; + } + + .action-btn::after { + border: none; + } + + .action-btn--primary { + color: #ffffff; + background: #2979ff; + border-color: #2979ff; + } + + .action-btn--hover { + opacity: 0.85; + } + + .action-btn--primary[disabled] { + opacity: 0.6; + color: #ffffff; + background: #2979ff; + border-color: #2979ff; + } + .limit-popup-mask { position: fixed; left: 0;