From 40d0394df1e68081b004b7e720c815c9927357b0 Mon Sep 17 00:00:00 2001
From: 周宾 <2802492122@qq.com>
Date: 星期三, 10 十二月 2025 14:32:15 +0800
Subject: [PATCH] 海川开心-修改仓储物流

---
 src/views/productionManagement/operationScheduling/components/formDia.vue |   51 ++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 44 insertions(+), 7 deletions(-)

diff --git a/src/views/productionManagement/operationScheduling/components/formDia.vue b/src/views/productionManagement/operationScheduling/components/formDia.vue
index 056c8a2..048ddce 100644
--- a/src/views/productionManagement/operationScheduling/components/formDia.vue
+++ b/src/views/productionManagement/operationScheduling/components/formDia.vue
@@ -24,6 +24,23 @@
 						<el-input v-model="scope.row.process" placeholder="璇疯緭鍏ュ伐搴�" />
           </template>
         </el-table-column>
+		<el-table-column label="浜х嚎" prop="productionLine" width="150">
+          <template #default="scope">
+            <el-select
+              v-model="scope.row.productionLine"
+              placeholder="閫夋嫨浜х嚎"
+              style="width: 100%;"
+              clearable
+            >
+              <el-option
+                v-for="line in productionLines"
+                :key="line.value"
+                :label="line.label"
+                :value="line.value"
+              />
+            </el-select>
+          </template>
+        </el-table-column>
         <el-table-column label="鍗曚綅" prop="unit" width="90">
           <template #default="scope">
             <el-input v-model="scope.row.unit" placeholder="璇疯緭鍏ュ崟浣�" />
@@ -71,6 +88,9 @@
 							v-model="scope.row.schedulingUserId"
 							placeholder="閫夋嫨浜哄憳"
 							style="width: 100%;"
+              filterable
+              default-first-option
+              :reserve-keyword="false"
 						>
 							<el-option
 								v-for="user in userList"
@@ -119,31 +139,47 @@
 const pendingNum = ref(0);
 const userList = ref([])
 const receive = ref('')
+const sunqianUserId = ref('')
+// 浜х嚎閫夐」
+const productionLines = ref([
+  { label: '浜х嚎1', value: '浜х嚎1' },
+  { label: '浜х嚎2', value: '浜х嚎2' },
+  { label: '浜х嚎3', value: '浜х嚎3' },
+  { label: '浜х嚎4', value: '浜х嚎4' }
+])
 
 // 鎵撳紑寮规
 const openDialog = (type, row) => {
   operationType.value = type;
   dialogFormVisible.value = true;
-	userListNoPageByTenantId().then((res) => {
-		userList.value = res.data;
-	});
 	pendingNum.value = row?.pendingNum ?? 0;
 	unitFromRow.value = row?.unit ?? '';
 	idFromRow.value = row?.id ?? '';
 	specificationModelFromRow.value = row?.specificationModel ?? '';
-	tableData.value = [createRow()];
+	
+	userListNoPageByTenantId().then((res) => {
+		userList.value = res.data;
+		// 鎵惧埌瀛欏�╃殑鐢ㄦ埛ID骞惰缃负榛樿鍊�
+		const sunqianUser = userList.value.find(user => user.nickName === '瀛欏��');
+		if (sunqianUser) {
+			sunqianUserId.value = sunqianUser.userId;
+		}
+		// 鍦ㄧ敤鎴峰垪琛ㄥ姞杞藉畬鎴愬悗鍒涘缓琛屾暟鎹�
+		tableData.value = [createRow()];
+	});
 }
 
 const createRow = () => ({
 	id: idFromRow.value,
-	process: '',
+	process: '鍖呰',
 	schedulingDate: '',
 	schedulingNum: null,
-	schedulingUserId: '',
+	schedulingUserId: sunqianUserId.value, // 榛樿璁剧疆涓哄瓩鍊╃殑鐢ㄦ埛ID
 	workHours: null,
 	unit: unitFromRow.value,
 	remark: '',
 	type: specificationModelFromRow.value,
+	productionLine: '', // 浜х嚎瀛楁
 });
 
 const submitForm = () => {
@@ -156,7 +192,8 @@
 			row.schedulingNum === '' || row.schedulingNum === null ||
 			!row.schedulingUserId ||
 			row.workHours === '' || row.workHours === null ||
-			!row.unit
+			!row.unit ||
+			!row.productionLine
 		) {
 			proxy.$modal.msgError(`绗�${i + 1}琛屾暟鎹湭濉啓瀹屾暣`);
 			return;

--
Gitblit v1.9.3