From 2ab68f3051300b3dc5c0edb5a53c505e401a08a3 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期五, 11 七月 2025 16:40:10 +0800
Subject: [PATCH] 过程检验、出厂检验编辑页面字段改下(检测结果项建议必填,不输入检测结果会展示空框)

---
 src/views/basicData/product/index.vue |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/views/basicData/product/index.vue b/src/views/basicData/product/index.vue
index d71d7cb..b88d678 100644
--- a/src/views/basicData/product/index.vue
+++ b/src/views/basicData/product/index.vue
@@ -55,7 +55,7 @@
                 >
                   缂栬緫
                 </el-button>
-                <el-button type="primary" link @click="openProDia('add', data)">
+                <el-button type="primary" link @click="openProDia('add', data)" :disabled="node.level >= 3">
                   娣诲姞浜у搧
                 </el-button>
                 <el-button
@@ -97,10 +97,9 @@
         @selection-change="handleSelectionChange"
         :tableLoading="tableLoading"
         @pagination="pagination"
-        :total="total"
       ></PIMTable>
     </div>
-    <el-dialog v-model="productDia" title="浜у搧" width="400px">
+    <el-dialog v-model="productDia" title="浜у搧" width="400px" @keydown.enter.prevent>
       <el-form
         :model="form"
         label-width="140px"
@@ -115,6 +114,7 @@
                 v-model="form.productName"
                 placeholder="璇疯緭鍏ヤ骇鍝佸悕绉�"
                 clearable
+                @keydown.enter.prevent
               />
             </el-form-item>
           </el-col>
@@ -132,6 +132,7 @@
       title="瑙勬牸鍨嬪彿"
       width="400px"
       @close="closeModelDia"
+      @keydown.enter.prevent
     >
       <el-form
         :model="modelForm"
@@ -147,6 +148,7 @@
                 v-model="modelForm.model"
                 placeholder="璇疯緭鍏ヨ鏍煎瀷鍙�"
                 clearable
+                @keydown.enter.prevent
               />
             </el-form-item>
           </el-col>
@@ -158,6 +160,7 @@
                 v-model="modelForm.unit"
                 placeholder="璇疯緭鍏ュ崟浣�"
                 clearable
+                @keydown.enter.prevent
               />
             </el-form-item>
           </el-col>
@@ -227,11 +230,11 @@
 const tableData = ref([]);
 const tableLoading = ref(false);
 const isShowButton = ref(false);
-const total = ref(0);
 const selectedRows = ref([]);
 const page = reactive({
   current: 1,
   size: 10,
+  total: 0,
 });
 const data = reactive({
   form: {
@@ -316,6 +319,7 @@
   proxy.$refs.formRef.resetFields();
   productDia.value = false;
 };
+
 // 鍒犻櫎浜у搧
 const remove = (node, data) => {
   let ids = [];
@@ -388,7 +392,7 @@
   }).then((res) => {
     console.log("res", res);
     tableData.value = res.records;
-    total.value = res.total;
+    page.total = res.total;
     tableLoading.value = false;
   });
 };

--
Gitblit v1.9.3