From c6d13e58d85fbaaceb49d4c24401b50143050173 Mon Sep 17 00:00:00 2001
From: zhang_12370 <z2864490065@outlook.com>
Date: 星期四, 26 六月 2025 18:01:24 +0800
Subject: [PATCH] 调整 基础管理煤种生产人 更改采购数计算逻辑 处理供应商数据回显问题

---
 src/views/production/components/ProductionDetailsTable.vue |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/views/production/components/ProductionDetailsTable.vue b/src/views/production/components/ProductionDetailsTable.vue
index 8331deb..dd89b4b 100644
--- a/src/views/production/components/ProductionDetailsTable.vue
+++ b/src/views/production/components/ProductionDetailsTable.vue
@@ -9,6 +9,7 @@
             @change="(value) => handleCoalSelectChange(row, value)"
             filterable
             :key="`coalId-select-${$index}-${weekList.length}`"
+            :disabled="isViewMode"
         >
           <el-option
               v-for="(item, index) of weekList"
@@ -26,6 +27,7 @@
             placeholder="璇疯緭鍏ョ敓浜ф暟閲�"
             type="number"
             @input="handleInput('productionQuantity', $index, $event)"
+            :disabled="isViewMode"
         />
       </template>
     </el-table-column>
@@ -37,6 +39,7 @@
             placeholder="璇疯緭鍏ヤ汉宸ユ垚鏈�"
             type="number"
             @input="handleInput('laborCost', $index, $event)"
+            :disabled="isViewMode"
         >
           <template #suffix>
             <i style="font-style: normal">鍏�</i>
@@ -52,6 +55,7 @@
             placeholder="璇疯緭鍏ヨ兘鑰楁垚鏈�"
             type="number"
             @input="handleInput('energyConsumptionCost', $index, $event)"
+            :disabled="isViewMode"
         >
           <template #suffix>
             <i style="font-style: normal">鍏�</i>
@@ -67,6 +71,7 @@
             placeholder="璇疯緭鍏ヨ澶囨姌鏃�"
             type="number"
             @input="handleInput('equipmentDepreciation', $index, $event)"
+            :disabled="isViewMode"
         >
           <template #suffix>
             <i style="font-style: normal">鍏�</i>
@@ -82,6 +87,7 @@
             placeholder="璇疯緭鍏ラ噰璐崟浠�"
             type="number"
             @input="handleInput('purchasePrice', $index, $event)"
+            :disabled="isViewMode"
         >
           <template #suffix>
             <i style="font-style: normal">鍏�</i>
@@ -99,6 +105,7 @@
             type="number"
             :readonly="autoCalculate"
             @input="handleInput('totalCost', $index, $event)"
+            
         >
           <template #suffix>
             <i style="font-style: normal">鍏�</i>
@@ -115,6 +122,7 @@
             @change="(value) => handleUserSelectChange(row, value)"
             filterable
             :key="`producer-select-${$index}-${userList.length}`"
+            :disabled="isViewMode"
         >
           <el-option
               v-for="(item, index) of userList"
@@ -126,10 +134,10 @@
       </template>
     </el-table-column>
     <el-table-column
-        v-if="showOperations"
         label="鎿嶄綔"
         width="120"
         fixed="right"
+        v-if="dialogType !== 'viewRow'"
     >
       <template #default="{ $index }">
         <el-button
@@ -169,8 +177,12 @@
     type: Boolean,
     default: true,
   },
+  dialogType:{
+    type: String,
+    default:'add'
+  }
 });
-
+const isViewMode = computed(() => props.dialogType === "viewRow");
 const emit = defineEmits(["update:modelValue", "input-change", "delete-row"]);
 
 // 浣跨敤 v-model 杩涜鍙屽悜缁戝畾

--
Gitblit v1.9.3