From 2a916df0471ae2e468096b258eb87d913dcc33a0 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 10 十一月 2025 11:08:38 +0800
Subject: [PATCH] 生产管控-支持生产工序定制化

---
 src/views/productionManagement/operationScheduling/components/formDia.vue |   43 +++++++++++++++++++++++++++++++++++--------
 1 files changed, 35 insertions(+), 8 deletions(-)

diff --git a/src/views/productionManagement/operationScheduling/components/formDia.vue b/src/views/productionManagement/operationScheduling/components/formDia.vue
index a4f36bf..baafa46 100644
--- a/src/views/productionManagement/operationScheduling/components/formDia.vue
+++ b/src/views/productionManagement/operationScheduling/components/formDia.vue
@@ -8,20 +8,30 @@
     >
       <el-button type="primary" @click="addRow" style="margin-bottom: 10px;">鏂板</el-button>
 			<span style="font-size: 18px;margin-left: 10px">寰呮帓浜ф暟閲忥細{{pendingNum}}</span>
+			<div style="margin-bottom: 10px; margin-left: 10px;">
+				<el-form-item label="棰嗙敤锛�" style="margin-bottom: 0;">
+					<el-input v-model="receive" placeholder="璇疯緭鍏ラ鐢�" style="width: 200px;" />
+				</el-form-item>
+			</div>
       <el-table :data="tableData" border style="width: 100%" :summary-method="summarizeMainTable" show-summary :row-key="row => row.id">
-        <el-table-column label="搴忓彿" width="60">
+        <el-table-column label="搴忓彿" width="60" align="center">
           <template #default="scope">
             {{ scope.$index + 1 }}
           </template>
         </el-table-column>
-        <el-table-column label="宸ュ簭" prop="process">
+        <el-table-column label="宸ュ簭" prop="process" width="150">
           <template #default="scope">
 						<el-input v-model="scope.row.process" placeholder="璇疯緭鍏ュ伐搴�" />
           </template>
         </el-table-column>
-        <el-table-column label="鍗曚綅" prop="unit">
+        <el-table-column label="鍗曚綅" prop="unit" width="90">
           <template #default="scope">
             <el-input v-model="scope.row.unit" placeholder="璇疯緭鍏ュ崟浣�" />
+          </template>
+        </el-table-column>
+        <el-table-column label="鍙e懗/鍝佸悕/瑙勬牸" prop="type" width="150">
+          <template #default="scope">
+            <el-input v-model="scope.row.type" placeholder="璇疯緭鍏�" />
           </template>
         </el-table-column>
         <el-table-column label="鎺掍骇鏁伴噺" width="200" prop="schedulingNum">
@@ -37,6 +47,11 @@
 						/>
           </template>
         </el-table-column>
+		<el-table-column label="鎹熻��" prop="loss" width="150">
+          <template #default="scope">
+            <el-input v-model="scope.row.loss" placeholder="璇疯緭鍏ユ崯鑰�" />
+          </template>
+        </el-table-column>
         <el-table-column label="宸ユ椂瀹氶" width="200" prop="workHours">
           <template #default="scope">
 						<el-input-number
@@ -50,12 +65,12 @@
 						/>
           </template>
         </el-table-column>
-        <el-table-column label="鎺掍骇鏃ユ湡" prop="schedulingDate">
+        <el-table-column label="鎺掍骇鏃ユ湡" prop="schedulingDate" width="200">
           <template #default="scope">
             <el-date-picker v-model="scope.row.schedulingDate" type="date" placeholder="閫夋嫨鏃ユ湡" style="width: 100%;" value-format="YYYY-MM-DD" format="YYYY-MM-DD"/>
           </template>
         </el-table-column>
-        <el-table-column label="鎺掍骇浜�" prop="schedulingUserId">
+        <el-table-column label="鎺掍骇浜�" prop="schedulingUserId" width="150">
           <template #default="scope">
 						<el-select
 							v-model="scope.row.schedulingUserId"
@@ -69,6 +84,11 @@
 								:value="user.userId"
 							/>
 						</el-select>
+          </template>
+        </el-table-column>
+        <el-table-column label="澶囨敞" prop="remark" width="200">
+          <template #default="scope">
+            <el-input v-model="scope.row.remark" placeholder="璇疯緭鍏ュ娉�" />
           </template>
         </el-table-column>
         <el-table-column label="鎿嶄綔" width="80">
@@ -98,12 +118,13 @@
 const dialogFormVisible = ref(false);
 const operationType = ref('')
 const tableData = ref([
-	{ process: '', schedulingDate: '', schedulingNum: '', schedulingUserId: '', workHours: '', unit: '' }
+	{ process: '', schedulingDate: '', schedulingNum: null, schedulingUserId: '', workHours: null, unit: '', remark: '', loss: '', type: '' }
 ]);
 const unitFromRow = ref('');
 const idFromRow = ref('');
 const pendingNum = ref('');
 const userList = ref([])
+const receive = ref('')
 
 // 鎵撳紑寮规
 const openDialog = (type, row) => {
@@ -148,7 +169,12 @@
 		proxy.$modal.msgError('鎺掍骇鏁伴噺鍚堣涓嶈兘瓒呰繃寰呮帓浜ф暟閲�');
 		return;
 	}
-	processScheduling(tableData.value).then((res) => {
+	// 3. 灏� receive 瀛楁娣诲姞鍒版瘡鏉℃暟鎹腑
+	const submitData = tableData.value.map(row => ({
+		...row,
+		receive: receive.value
+	}));
+	processScheduling(submitData).then((res) => {
 		proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
 		closeDia();
 	})
@@ -159,6 +185,7 @@
 // 鍏抽棴寮规
 const closeDia = () => {
   dialogFormVisible.value = false;
+  receive.value = '';
   emit('close')
 };
 defineExpose({
@@ -166,7 +193,7 @@
 });
 
 const addRow = () => {
-  tableData.value.push({ id: idFromRow.value, process: '', unit: unitFromRow.value, schedulingNum: '', workHours: '', schedulingDate: '', schedulingUserId: '' });
+  tableData.value.push({ id: idFromRow.value, process: '', unit: unitFromRow.value, schedulingNum: null, workHours: null, schedulingDate: '', schedulingUserId: '', remark: '', loss: '', type: '' });
 };
 const removeRow = (index) => {
   tableData.value.splice(index, 1);

--
Gitblit v1.9.3