From e200b8192f3c9d34645faec0013518f6b70722df Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 05 一月 2026 11:47:17 +0800
Subject: [PATCH] 海川开心: 1.销售管理、仓储物流一些字段赋默认值 2.生产报工改成可以多个报工

---
 src/views/productionManagement/productionReporting/index.vue |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/views/productionManagement/productionReporting/index.vue b/src/views/productionManagement/productionReporting/index.vue
index 731946b..11769fa 100644
--- a/src/views/productionManagement/productionReporting/index.vue
+++ b/src/views/productionManagement/productionReporting/index.vue
@@ -139,7 +139,7 @@
 </template>
 
 <script setup>
-import {onMounted, ref} from "vue";
+import {onMounted, ref, reactive, toRefs, getCurrentInstance, nextTick} from "vue";
 import FormDia from "@/views/productionManagement/productionReporting/components/formDia.vue";
 import {staffJoinDel, staffJoinListPage} from "@/api/personnelManagement/onboarding.js";
 import {ElMessageBox} from "element-plus";
@@ -400,16 +400,21 @@
 };
 // 鎵撳紑寮规
 const openForm = (type, row) => {
-	if (selectedRows.value.length !== 1) {
-		proxy.$message.error("璇烽�夋嫨涓�鏉℃暟鎹�");
+	if (selectedRows.value.length === 0) {
+		proxy.$message.error("璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�");
 		return;
 	}
-	if (selectedRows.value[0].pendingFinishNum == 0) {
-		proxy.$message.warning("鏃犻渶鍐嶆姤宸�");
+	// 杩囨护鎺夊緟鎶ュ伐鏁伴噺涓�0鐨勬暟鎹�
+	const validRows = selectedRows.value.filter(item => item.pendingFinishNum > 0);
+	if (validRows.length === 0) {
+		proxy.$message.warning("鎵�閫夋暟鎹潎鏃犻渶鍐嶆姤宸�");
 		return;
+	}
+	if (validRows.length < selectedRows.value.length) {
+		proxy.$message.warning(`宸茶繃婊� ${selectedRows.value.length - validRows.length} 鏉℃棤闇�鎶ュ伐鐨勬暟鎹甡);
 	}
 	nextTick(() => {
-		const rowInfo = type === 'add' ? selectedRows.value[0] : row
+		const rowInfo = type === 'add' ? validRows : (row ? [row] : [])
 		formDia.value?.openDialog(type, rowInfo)
 	})
 };

--
Gitblit v1.9.3