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/finalInspection/components/formDia.vue |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/src/views/qualityManagement/finalInspection/components/formDia.vue b/src/views/qualityManagement/finalInspection/components/formDia.vue
index 6a3e774..f307a80 100644
--- a/src/views/qualityManagement/finalInspection/components/formDia.vue
+++ b/src/views/qualityManagement/finalInspection/components/formDia.vue
@@ -58,7 +58,7 @@
           </el-col>
           <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"/>
+              <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="form.quantity" placeholder="璇疯緭鍏�" clearable :precision="2" :disabled="quantityDisabled"/>
             </el-form-item>
           </el-col>
         </el-row>
@@ -106,6 +106,7 @@
 				:column="tableColumn"
 				:tableData="tableData"
 				:tableLoading="tableLoading"
+				:isShowPagination="false"
 				height="400"
 			>
 				<template #slot="{ row }">
@@ -123,7 +124,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";
@@ -164,6 +165,11 @@
   },
 });
 const { form, rules } = toRefs(data);
+// 缂栬緫鏃讹細productMainId 鎴� purchaseLedgerId 浠讳竴鏈夊�煎垯鏁伴噺缃伆
+const quantityDisabled = computed(() => {
+  const v = form.value || {};
+  return !!(v.productMainId != null || v.purchaseLedgerId != null);
+});
 const supplierList = ref([]);
 const productOptions = ref([]);
 const tableColumn = ref([
@@ -341,11 +347,9 @@
   proxy.$refs.formRef.validate(valid => {
     if (valid) {
       form.value.inspectType = 2
-			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