diff --git a/package.json b/package.json
index 5b2ab0a..096afb2 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "wms-pda",
- "version": "1.0.135",
+ "version": "1.0.136",
"private": true,
"description": "天豹云仓 WMS_PDA(uni-app Vue2 + @vue/cli 4.5)",
"scripts": {
diff --git a/src/manifest.json b/src/manifest.json
index 3f71d89..c8f6b61 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -2,8 +2,8 @@
"name" : "WMS_PDA",
"appid" : "__UNI__0B3DAD3",
"description" : "多平台快速开发的UI框架",
- "versionName" : "1.0.132",
- "versionCode" : 1000132,
+ "versionName" : "1.0.136",
+ "versionCode" : 1000136,
"transformPx" : false,
"app-plus" : {
"optimization" : {
diff --git a/src/pages/warehouse/inventoryCount-comps/CountGoodsCard.vue b/src/pages/warehouse/inventoryCount-comps/CountGoodsCard.vue
index 3bbc29c..5b460aa 100644
--- a/src/pages/warehouse/inventoryCount-comps/CountGoodsCard.vue
+++ b/src/pages/warehouse/inventoryCount-comps/CountGoodsCard.vue
@@ -17,6 +17,7 @@
{{ row.checked ? '已盘' : '未盘' }}
+ 待拣货
{{ row.subtitle }}
@@ -29,6 +30,7 @@
{{ row.amount.bookHint }}
已盘记录 {{ row.recordCount || 0 }} 条
+ {{ pickingHint }}
{{ locationText }}
@@ -57,6 +59,12 @@ export default {
if (!codes.length) return '';
if (codes.length === 1) return codes[0];
return `${codes.length} 个库位`;
+ },
+ // 静态盘点拣货未完成提示(带锁定量时一并显示,便于判断还差多少)
+ pickingHint() {
+ if (!this.row.pickingPending) return '';
+ const locked = this.row.lockedQuantity;
+ return locked === null || locked === undefined ? '拣货未完成' : `拣货未完成(锁定 ${locked})`;
}
},
methods: {
@@ -151,6 +159,11 @@ export default {
color: #ff9800;
}
+/* 静态盘点拣货未完成(后端会拒绝上报,需置灰入口) */
+.goods-card__flag--picking {
+ color: #e64340;
+}
+
.goods-card__subtitle {
margin-top: 6rpx;
font-size: 34rpx;
diff --git a/src/pages/warehouse/inventoryCount-comps/countModel.js b/src/pages/warehouse/inventoryCount-comps/countModel.js
index d537b8c..22533f6 100644
--- a/src/pages/warehouse/inventoryCount-comps/countModel.js
+++ b/src/pages/warehouse/inventoryCount-comps/countModel.js
@@ -544,6 +544,26 @@ function pickBookMeta(source, fallbackIsStatic) {
};
}
+/**
+ * 静态盘点拣货完成标记(0.3.320):
+ * picking_completed=1 已完成拣货 / 0 未完成(仓库内该商品 SUM(locked_quantity)==0 视为完成);
+ * locked_quantity 仅明盘返回,盲盘不输出。非静态任务后端不返回这两个字段。
+ */
+function pickPickingMeta(source) {
+ const obj = source && typeof source === 'object' ? source : {};
+ const completedRaw = obj.picking_completed !== undefined ? obj.picking_completed : obj.pickingCompleted;
+ const lockedRaw = obj.locked_quantity !== undefined ? obj.locked_quantity : obj.lockedQuantity;
+ const hasPickingFlag = completedRaw !== undefined && completedRaw !== null && String(completedRaw).trim() !== '';
+ const pickingCompleted = hasPickingFlag && toBool(completedRaw);
+ return {
+ hasPickingFlag,
+ pickingCompleted,
+ lockedQuantity: toNumberOrNull(lockedRaw),
+ // 未完成拣货时后端会拒绝 report,前端据此置灰上报入口
+ pickingPending: hasPickingFlag && !pickingCompleted
+ };
+}
+
/**
* 账面口径元信息:system_quantity 为本次参与差异计算的账面(静态=快照、普通=当前库存),
* storage_quantity / snapshot_quantity 为另一口径参考值,两者不一致时给出提示文案。
@@ -824,6 +844,7 @@ function normalizeGoodsWorkRow(item, index, open, options = {}) {
const checkedNumber = toNumberOrNull(checkedRaw);
// 账面口径(0.3.318):is_static/book_source/storage_quantity/snapshot_quantity
const bookMeta = pickBookMeta(source, options.isStatic);
+ const pickingMeta = pickPickingMeta(source);
const stockIdValue = firstValue(source, ['stock_id', 'stockId']);
// 行唯一键:0.3.309 起 goods 视图行不再返回 detail_id,优先用 stock_id
const rowKey = stockIdValue || detailId || `${index + 1}`;
@@ -864,6 +885,11 @@ function normalizeGoodsWorkRow(item, index, open, options = {}) {
bookSource: bookMeta.bookSource,
storageQuantity: bookMeta.storageQuantity,
snapshotQuantity: bookMeta.snapshotQuantity,
+ // 静态盘点拣货完成标记(0.3.320):pickingPending=true 时 report 会被后端拒绝
+ hasPickingFlag: pickingMeta.hasPickingFlag,
+ pickingCompleted: pickingMeta.pickingCompleted,
+ pickingPending: pickingMeta.pickingPending,
+ lockedQuantity: pickingMeta.lockedQuantity,
// 列表行(CountGoodsCard)与商品作业页(概况带入路由)用的字段:一行一个商品,操作剥离到操作页
images: imageList,
image: imageList[0] || '',
@@ -1092,6 +1118,8 @@ export function normalizeGoodsDetailInfo(row, mode, options = {}) {
const open = isOpenCheckMode(mode) || hasQuantity;
// 账面口径(0.3.318):顶层 is_static/book_source
const bookMeta = pickBookMeta(source, options.isStatic);
+ // 静态盘点拣货完成标记(0.3.320):顶层 picking_completed / locked_quantity
+ const pickingMeta = pickPickingMeta(source);
// 库位行形态:商品信息/图片取 goods 首项兜底
const firstGoods = Array.isArray(source.goods) && source.goods.length ? (source.goods[0] || {}) : {};
const pickText = keys => firstValue(source, keys) || firstValue(firstGoods, keys) || '';
@@ -1222,6 +1250,11 @@ export function normalizeGoodsDetailInfo(row, mode, options = {}) {
bookSourceText: summaryBook.bookSourceText,
storageQuantity: summaryBook.storageQuantity,
snapshotQuantity: summaryBook.snapshotQuantity,
+ // 静态盘点拣货完成标记(0.3.320):pickingPending=true 时 report 会被后端拒绝
+ hasPickingFlag: pickingMeta.hasPickingFlag,
+ pickingCompleted: pickingMeta.pickingCompleted,
+ pickingPending: pickingMeta.pickingPending,
+ lockedQuantity: pickingMeta.lockedQuantity,
systemQuantity: toNumberOrNull(systemRaw),
checkedQuantity: toNumberOrNull(checkedRaw),
amount: buildWorkAmount(systemRaw, checkedRaw, diffRaw, open, {
diff --git a/src/pages/warehouse/inventoryCountGoods.vue b/src/pages/warehouse/inventoryCountGoods.vue
index e4836bc..03d2681 100644
--- a/src/pages/warehouse/inventoryCountGoods.vue
+++ b/src/pages/warehouse/inventoryCountGoods.vue
@@ -25,6 +25,8 @@
>
当前盘点任务状态不可作业,仅可查看
+ 静态盘点:该商品尚未完成拣货,拣货完成前不能上报
+
加载中...
@@ -51,6 +53,7 @@
class="inv-goods-card__flag"
:class="hasChecked ? 'inv-goods-card__flag--done' : 'inv-goods-card__flag--todo'"
>{{ hasChecked ? '已盘' : '未盘' }}
+ 待拣货
{{ goodsMetaText }}
@@ -58,6 +61,7 @@
已盘 {{ checkedTotalText }}
{{ diffText }}
{{ bookHintText }}
+ {{ pickingHintText }}
@@ -254,6 +258,14 @@ export default {
hasChecked() {
return resolveHasChecked(this.goodsInfo);
},
+ // 静态盘点拣货未完成(0.3.320):后端 report 会拒绝,前端先置灰上报入口
+ pickingPending() {
+ return !!this.goodsInfo.pickingPending;
+ },
+ pickingHintText() {
+ const locked = this.goodsInfo.lockedQuantity;
+ return locked === null || locked === undefined ? '拣货未完成,暂不能上报' : `拣货未完成(锁定 ${locked}),暂不能上报`;
+ },
// 账面数量(接口 system_quantity)
systemQuantityValue() {
return resolveSystemQuantity(this.goodsInfo);
@@ -415,6 +427,13 @@ export default {
this.openEntryPopup(this.scanKeyword);
},
openEntryPopup(keyword) {
+ if (!this.editable) return;
+ // 静态盘点拣货未完成时后端拒绝上报,这里先拦住,避免录完数量才失败
+ if (this.pickingPending) {
+ uni.showToast({ title: '商品尚未完成拣货,请等待拣货完成', icon: 'none' });
+ this.speakMessage('拣货未完成,暂不能上报', { force: true, minInterval: 0 });
+ return;
+ }
this.pendingLocation = String(keyword || '').trim();
this.showEntryPopup = true;
},
@@ -456,6 +475,12 @@ export default {
/** 上报(check.report:detail_id=该库位明细,location=库位) */
async submitReport(payload) {
if (!this.editable || this.submitting) return false;
+ // 静态盘点拣货未完成:后端会拦,前端先给明确提示
+ if (this.pickingPending) {
+ uni.showToast({ title: '商品尚未完成拣货,请等待拣货完成', icon: 'none' });
+ this.speakMessage('拣货未完成,暂不能上报', { force: true, minInterval: 0 });
+ return false;
+ }
if (!payload || (!payload.detailId && !payload.stockId)) {
uni.showToast({ title: '缺少盘点明细ID', icon: 'none' });
return false;
@@ -771,6 +796,11 @@ export default {
color: #ff9800;
}
+/* 静态盘点拣货未完成(后端会拒绝上报,需置灰上报入口) */
+.inv-goods-card__flag--picking {
+ color: #e64340;
+}
+
.inv-goods-card__line {
margin-top: 6rpx;
font-size: 34rpx;