From a8ebfcbec49fb628fa2fa1a66bc1950125bc0786 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期一, 18 五月 2026 14:51:14 +0800
Subject: [PATCH] 优化设备保养表单:新增保养人选择器,确保保养人必填,加载保养人列表
---
src/pages/inventoryManagement/scanIn/index.vue | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/src/pages/inventoryManagement/scanIn/index.vue b/src/pages/inventoryManagement/scanIn/index.vue
index 889ceea..9ed2371 100644
--- a/src/pages/inventoryManagement/scanIn/index.vue
+++ b/src/pages/inventoryManagement/scanIn/index.vue
@@ -303,6 +303,11 @@
item.operateQuantity = String(Math.max(0, n));
};
+ const hasEditableInboundItems = computed(() => {
+ if (!recordList.value?.length) return false;
+ return recordList.value.some(item => !isFullyStocked(item));
+ });
+
const formatCell = (item, row, idx) => {
if (row.key === "index") {
const v = item.index;
@@ -404,6 +409,7 @@
};
const handleSelectContact = data => {
+ if (data?.source === "scanShip") return;
const { stepIndex, contact } = data || {};
if (stepIndex === null || stepIndex === undefined) return;
const idx = Number(stepIndex);
@@ -426,6 +432,10 @@
modal.msgError("缂哄皯璁㈠崟淇℃伅锛岃閲嶆柊鎵爜");
return;
}
+ if (!hasEditableInboundItems.value) {
+ modal.msgError("璇ヤ骇鍝佸凡缁忓叏閮ㄥ叆搴�");
+ return;
+ }
const salesLedgerProductList = buildSalesLedgerProductList(recordList.value);
if (!hasAnyPositiveStockedQty(salesLedgerProductList)) {
modal.msgError("璇疯嚦灏戝~鍐欎竴琛屽ぇ浜� 0 鐨勫叆搴撴暟閲�");
@@ -439,7 +449,10 @@
}
const runApi = currentSubmitConfig.runApi;
const approveUserIds = stockApproverNodes.value.map(node => node.userId).join(",");
- const payload = currentSubmitConfig.payloadBuilder(salesLedgerProductList, approveUserIds);
+ const payload = currentSubmitConfig.payloadBuilder(
+ salesLedgerProductList,
+ approveUserIds
+ );
try {
submitLoading.value = true;
modal.loading("鎻愪氦涓�...");
@@ -571,6 +584,9 @@
.module-icon {
width: 140rpx;
height: 140rpx;
+ min-width: 140rpx;
+ min-height: 140rpx;
+ flex-shrink: 0;
border-radius: 32rpx;
display: flex;
justify-content: center;
@@ -591,6 +607,8 @@
.module-info {
display: flex;
flex-direction: column;
+ flex: 1;
+ min-width: 0;
}
.module-label {
--
Gitblit v1.9.3