From 3170982ed5683650e623e1a14b80c60256e8288d Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期二, 28 四月 2026 16:01:17 +0800
Subject: [PATCH] 先排产 排产根据机台绑定生产人 报工根据生产排产选择的生产人来选择对应的报工人
---
src/views/safeProduction/hazardousMaterialsControl/index.vue | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/src/views/safeProduction/hazardousMaterialsControl/index.vue b/src/views/safeProduction/hazardousMaterialsControl/index.vue
index f4f30aa..a53490c 100644
--- a/src/views/safeProduction/hazardousMaterialsControl/index.vue
+++ b/src/views/safeProduction/hazardousMaterialsControl/index.vue
@@ -264,7 +264,8 @@
@selection-change="handleSafeHazardSelectionChange"
style="width: 100%">
<el-table-column type="selection"
- width="55" />
+ width="55"
+ :selectable="isSelectable" />
<el-table-column prop="code"
label="鍗遍櫓婧愮紪鐮�"
width="180"
@@ -604,6 +605,11 @@
});
};
+ const isSelectable = row => {
+ // 鍙湁搴撳瓨鏁伴噺澶т簬0鐨勮鎵嶈兘琚�夋嫨
+ return Number(row.stockQty) > 0;
+ };
+
const handleSafeHazardSelectionChange = selection => {
// 鍙繚鐣欐渶鍚庝竴涓�変腑鐨勯」
if (selection.length > 1) {
@@ -647,15 +653,7 @@
// 閫夋嫨鍙樺寲澶勭悊
const handleSelectionChange = selection => {
- // 涓昏〃鏍间篃鍙繚鐣欐渶鍚庝竴涓�変腑鐨勯」
- if (selection.length > 1) {
- const lastSelected = selection[selection.length - 1];
- selectedIds.value = [lastSelected.id];
- } else if (selection.length === 1) {
- selectedIds.value = [selection[0].id];
- } else {
- selectedIds.value = [];
- }
+ selectedIds.value = selection.map(item => item.id);
};
// 鎵撳紑琛ㄥ崟
--
Gitblit v1.9.3