feat(盘点): 库位模式商品行接入待拣货标记,未拣完置灰录入框
space 视图(stock.check.workData / workDataSpaceDetails)的 goods 子项已返回 picking_completed / locked_quantity,据此补齐库位模式的静态拣货提示: - countModel.normalizeSpaceWorkRow:goods 子项输出 pickingPending/lockedQuantity, 录入单元带 pickingPending;库位行输出 pickingPendingCount - CountWorkCard:子项显示红色「待拣货」标记 + 「拣货未完成(锁定 N)」, 未拣完时不再渲染输入框,改为只读「待拣货」 - inventoryCountSpace:顶部提示「N 项商品尚未完成拣货,仅这些商品暂不能上报」, handleWorkReport 按商品拦截并语音播报 - 拦截粒度仅为商品行:同库位其他商品照常录入,库位行本身不拦截 - 无 picking_completed 字段(普通盘点/旧后端)时行为不变 - 版本升级至 1.0.137 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
d5607f58b1
commit
106162d43f
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wms-pda",
|
||||
"version": "1.0.136",
|
||||
"version": "1.0.137",
|
||||
"private": true,
|
||||
"description": "天豹云仓 WMS_PDA(uni-app Vue2 + @vue/cli 4.5)",
|
||||
"scripts": {
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
"name" : "WMS_PDA",
|
||||
"appid" : "__UNI__0B3DAD3",
|
||||
"description" : "多平台快速开发的UI框架",
|
||||
"versionName" : "1.0.136",
|
||||
"versionCode" : 1000136,
|
||||
"versionName" : "1.0.137",
|
||||
"versionCode" : 1000137,
|
||||
"transformPx" : false,
|
||||
"app-plus" : {
|
||||
"optimization" : {
|
||||
|
||||
@ -66,16 +66,18 @@
|
||||
</view>
|
||||
<view class="work-child__side">
|
||||
<text v-if="child.statusText" class="work-card__tag" :class="child.statusClass">{{ child.statusText }}</text>
|
||||
<text v-if="child.pickingPending" class="work-card__tag work-card__tag--picking">待拣货</text>
|
||||
<text v-if="child.amount" class="work-child__amount">
|
||||
{{ child.amount.systemLabel || '账面' }} {{ child.amount.systemText }} · 已盘 {{ child.amount.checkedText }}
|
||||
</text>
|
||||
<text v-else-if="child.quantityText !== ''" class="work-child__amount">实盘 {{ child.quantityText }}</text>
|
||||
<text v-if="child.amount && child.amount.bookHint" class="work-child__hint">{{ child.amount.bookHint }}</text>
|
||||
<text v-if="child.pickingPending" class="work-child__hint work-child__hint--picking">{{ pickingHint(child) }}</text>
|
||||
</view>
|
||||
<view v-if="child.unit" class="work-child__input">
|
||||
<view class="work-input" :class="{ 'work-input--reported': child.unit.reported }">
|
||||
<input
|
||||
v-if="editable"
|
||||
v-if="editable && !child.pickingPending"
|
||||
class="work-input__field"
|
||||
type="number"
|
||||
v-model="child.unit.inputValue"
|
||||
@ -84,6 +86,10 @@
|
||||
@blur="$emit('report', child.unit)"
|
||||
@confirm="$emit('report', child.unit)"
|
||||
/>
|
||||
<text
|
||||
v-else-if="child.pickingPending"
|
||||
class="work-input__readonly work-input__readonly--picking"
|
||||
>待拣货</text>
|
||||
<text
|
||||
v-else
|
||||
class="work-input__readonly"
|
||||
@ -140,6 +146,13 @@ export default {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 静态盘点拣货未完成提示(带锁定量时一并显示)
|
||||
pickingHint(child) {
|
||||
const locked = child ? child.lockedQuantity : null;
|
||||
return locked === null || locked === undefined ? '拣货未完成' : `拣货未完成(锁定 ${locked})`;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -215,6 +228,12 @@ export default {
|
||||
background: #fdecec;
|
||||
}
|
||||
|
||||
/* 静态盘点拣货未完成(后端会拒绝上报) */
|
||||
.work-card__tag--picking {
|
||||
color: #e64340;
|
||||
background: #fdecec;
|
||||
}
|
||||
|
||||
.work-card__meta {
|
||||
margin-top: 10rpx;
|
||||
display: flex;
|
||||
@ -406,6 +425,16 @@ export default {
|
||||
color: #b8811a;
|
||||
}
|
||||
|
||||
/* 拣货未完成提示:红色(与账面口径提示区分) */
|
||||
.work-child__hint--picking {
|
||||
color: #e64340;
|
||||
}
|
||||
|
||||
/* 拣货未完成时的录入框占位(不可录入) */
|
||||
.work-input__readonly--picking {
|
||||
color: #e64340;
|
||||
}
|
||||
|
||||
.work-child__side .work-card__amount {
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
|
||||
@ -677,7 +677,7 @@ function buildWorkAmount(systemQuantity, checkedQuantity, diffQuantity, open, me
|
||||
}
|
||||
|
||||
/** 录入单元:detailId + location + 输入值(original 用于判断是否已修改) */
|
||||
function buildWorkUnit(detailId, location, currentQuantity, reported, stockId, spaceId) {
|
||||
function buildWorkUnit(detailId, location, currentQuantity, reported, stockId, spaceId, pickingPending = false) {
|
||||
const value = toNumberString(currentQuantity);
|
||||
const done = !!reported;
|
||||
return {
|
||||
@ -689,7 +689,9 @@ function buildWorkUnit(detailId, location, currentQuantity, reported, stockId, s
|
||||
inputValue: done ? value : '',
|
||||
original: done ? value : '',
|
||||
reported: done,
|
||||
reporting: false
|
||||
reporting: false,
|
||||
// 静态盘点拣货未完成(0.3.320):录入框置灰,report 会被后端拒绝
|
||||
pickingPending: !!pickingPending
|
||||
};
|
||||
}
|
||||
|
||||
@ -757,6 +759,7 @@ function normalizeSpaceWorkRow(item, index, open, options = {}) {
|
||||
const checkedRaw = good.checked_quantity !== undefined ? good.checked_quantity : good.checkedQuantity;
|
||||
const done = String(good.status || '').trim().toLowerCase() === 'checked';
|
||||
const bookMeta = pickBookMeta(good, options.isStatic);
|
||||
const pickingMeta = pickPickingMeta(good);
|
||||
return {
|
||||
key: `${spaceCode}-${detailId || goodIndex + 1}`,
|
||||
title: firstValue(good, ['item_name', 'itemName']) || '--',
|
||||
@ -770,8 +773,13 @@ function normalizeSpaceWorkRow(item, index, open, options = {}) {
|
||||
open,
|
||||
bookMeta
|
||||
),
|
||||
// 静态盘点拣货完成标记(0.3.320)
|
||||
hasPickingFlag: pickingMeta.hasPickingFlag,
|
||||
pickingCompleted: pickingMeta.pickingCompleted,
|
||||
pickingPending: pickingMeta.pickingPending,
|
||||
lockedQuantity: pickingMeta.lockedQuantity,
|
||||
quantityText: '',
|
||||
unit: buildWorkUnit(detailId, spaceCode, checkedRaw, done, firstValue(good, ['stock_id', 'stockId']), rowSpaceId)
|
||||
unit: buildWorkUnit(detailId, spaceCode, checkedRaw, done, firstValue(good, ['stock_id', 'stockId']), rowSpaceId, pickingMeta.pickingPending)
|
||||
};
|
||||
});
|
||||
// 库位统计(口径=商品条数):商品 status=checked 即该明细在该库位已有作业记录
|
||||
@ -779,6 +787,8 @@ function normalizeSpaceWorkRow(item, index, open, options = {}) {
|
||||
const checkedCount = rawGoods.filter(row => String((row && row.status) || '').trim().toLowerCase() === 'checked').length;
|
||||
const uncheckedCount = Math.max(0, total - checkedCount);
|
||||
const allDone = total > 0 && checkedCount === total;
|
||||
// 静态盘点:该库位下拣货未完成的商品数(宫格与作业页提示用)
|
||||
const pickingPendingCount = children.filter(child => child.pickingPending).length;
|
||||
const spaceName = firstValue(source, ['custom_name', 'customName']);
|
||||
return {
|
||||
key: `space-${firstValue(source, ['id']) || spaceCode}`,
|
||||
@ -808,6 +818,8 @@ function normalizeSpaceWorkRow(item, index, open, options = {}) {
|
||||
unknownCount: 0,
|
||||
checkedCount,
|
||||
uncheckedCount,
|
||||
// 静态盘点拣货未完成的商品数(>0 时宫格/作业页提示「待拣货」)
|
||||
pickingPendingCount,
|
||||
gridText: spaceName || spaceCode,
|
||||
gridCode: spaceCode,
|
||||
gridLabel: shortLocationLabel(spaceCode),
|
||||
|
||||
@ -34,6 +34,10 @@
|
||||
|
||||
<view v-if="!editable" class="inv-space-tip">当前盘点任务状态不可作业,仅可查看</view>
|
||||
|
||||
<view v-if="editable && pickingPendingCount" class="inv-space-tip">
|
||||
静态盘点:{{ pickingPendingCount }} 项商品尚未完成拣货,仅这些商品暂不能上报
|
||||
</view>
|
||||
|
||||
<view v-if="loading && !row" class="inv-space-tip">加载中...</view>
|
||||
|
||||
<!-- 该库位下的任务商品:逐条录入实盘数量并上报(check.report) -->
|
||||
@ -108,6 +112,11 @@ export default {
|
||||
progressText() {
|
||||
if (!this.row) return '--';
|
||||
return this.row.gridProgressText || `${this.row.goodsCount || 0} 项`;
|
||||
},
|
||||
// 静态盘点:本库位下拣货未完成的商品数(>0 时顶部提示)
|
||||
pickingPendingCount() {
|
||||
const children = this.row && Array.isArray(this.row.children) ? this.row.children : [];
|
||||
return children.filter(child => child && child.pickingPending).length;
|
||||
}
|
||||
},
|
||||
onLoad(options = {}) {
|
||||
@ -227,6 +236,12 @@ export default {
|
||||
// ===== 录入上报(check.report)=====
|
||||
async handleWorkReport(unit) {
|
||||
if (!this.editable || !unit || unit.reporting) return;
|
||||
// 静态盘点拣货未完成:后端会拒绝上报,这里先给明确提示
|
||||
if (unit.pickingPending) {
|
||||
uni.showToast({ title: '商品尚未完成拣货,请等待拣货完成', icon: 'none' });
|
||||
this.speakMessage('拣货未完成,暂不能上报', { force: true, minInterval: 0 });
|
||||
return;
|
||||
}
|
||||
const raw = String(unit.inputValue || '').trim();
|
||||
if (raw === '') return;
|
||||
if (raw === String(unit.original || '')) return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user