From 84a03a1929b9dfcffdbbd5acdc8e92e0d85de423 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期二, 10 二月 2026 10:24:32 +0800
Subject: [PATCH] fix: 原材料检验编辑时供应商、数量框置灰。过程检验工序、数量框置灰。出厂检验数量框置灰

---
 src/views/qualityManagement/rawMaterialInspection/components/formDia.vue |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue b/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
index 78ad910..7e373bf 100644
--- a/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
+++ b/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
@@ -14,6 +14,7 @@
                   v-model="form.supplier"
                   placeholder="璇烽�夋嫨"
                   clearable
+                  :disabled="supplierQuantityDisabled"
               >
                 <el-option
                     v-for="item in supplierList"
@@ -77,7 +78,7 @@
           <el-col :span="12">
             <el-form-item label="鏁伴噺锛�" prop="quantity">
               <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="form.quantity" placeholder="璇疯緭鍏�"
-                               clearable :precision="2"/>
+                               clearable :precision="2" :disabled="supplierQuantityDisabled"/>
             </el-form-item>
           </el-col>
         </el-row>
@@ -144,7 +145,7 @@
 </template>
 
 <script setup>
-import {ref, reactive, toRefs, getCurrentInstance, nextTick} from "vue";
+import {ref, reactive, toRefs, computed, getCurrentInstance, nextTick} from "vue";
 import {getOptions} from "@/api/procurementManagement/procurementLedger.js";
 import {modelList, productTreeList} from "@/api/basicData/product.js";
 import {qualityInspectAdd, qualityInspectUpdate} from "@/api/qualityManagement/rawMaterialInspection.js";
@@ -220,6 +221,12 @@
 const modelOptions = ref([]);
 const userList = ref([]); // 妫�楠屽憳涓嬫媺鍒楄〃
 
+// 缂栬緫鏃讹細productMainId 鎴� purchaseLedgerId 浠讳竴鏈夊�煎垯渚涘簲鍟嗐�佹暟閲忕疆鐏�
+const supplierQuantityDisabled = computed(() => {
+  const v = form.value || {};
+  return !!(v.productMainId != null || v.purchaseLedgerId != null);
+});
+
 // 鎵撳紑寮规
 const openDialog = async (type, row) => {
   operationType.value = type;

--
Gitblit v1.9.3