From f6b7842a7ffc4f46dad9163ee0e7f8a0898d2043 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 21 八月 2026 11:39:46 +0800
Subject: [PATCH] 湟水峡 1.检验传参修改

---
 src/views/qualityManagement/rawMaterialInspection/components/formDia.vue |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue b/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
index 78ad910..2aa03b3 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>
@@ -127,6 +128,7 @@
           :column="tableColumn"
           :tableData="tableData"
           :tableLoading="tableLoading"
+          :isShowPagination="false"
           height="400"
       >
         <template #slot="{ row }">
@@ -144,7 +146,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";
@@ -219,6 +221,12 @@
 const testStandardOptions = ref([]); // 鎸囨爣閫夋嫨涓嬫媺妗嗘暟鎹�
 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) => {
@@ -378,11 +386,9 @@
   proxy.$refs.formRef.validate(valid => {
     if (valid) {
       form.value.inspectType = 0
-			if (operationType.value === "add") {
-				tableData.value.forEach((item) => {
-					delete item.id
-				})
-			}
+			tableData.value.forEach((item) => {
+				delete item.id
+			})
       const data = {...form.value, qualityInspectParams: tableData.value}
       if (operationType.value === "add") {
         qualityInspectAdd(data).then(res => {

--
Gitblit v1.9.3