From c1bf5ebfe65ee67c64da6e9e4e6f7c7dbb3e992e Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期二, 17 三月 2026 14:28:26 +0800
Subject: [PATCH] fix: 新增不合格原料库存时,没有皮重、毛重、净重、过磅日期、车牌号、过磅员输入框(不会存在不合格入库,把按钮屏蔽掉)

---
 src/views/qualityManagement/nonconformingManagement/index.vue |   39 +++++++++++++++++++--------------------
 1 files changed, 19 insertions(+), 20 deletions(-)

diff --git a/src/views/qualityManagement/nonconformingManagement/index.vue b/src/views/qualityManagement/nonconformingManagement/index.vue
index 169a2f3..8d635d1 100644
--- a/src/views/qualityManagement/nonconformingManagement/index.vue
+++ b/src/views/qualityManagement/nonconformingManagement/index.vue
@@ -5,9 +5,9 @@
         <div>
           <span class="search_title">绫诲瀷锛�</span>
           <el-select v-model="searchForm.inspectType" clearable style="width: 200px" @change="handleQuery">
-            <el-option label="鍘熸潗鏂欐楠�" :value="0" />
-            <el-option label="杩囩▼妫�楠�" :value="1" />
-            <el-option label="鍑哄巶妫�楠�" :value="2" />
+            <el-option label="鍏ュ巶妫�" :value="0" />
+            <el-option label="杞﹂棿妫�" :value="1" />
+            <el-option label="鍑哄巶妫�" :value="2" />
           </el-select>
         </div>
         <div style="margin-left: 10px">
@@ -72,12 +72,9 @@
     inspectType: "",
     inspectState: "",
     productName: "",
-    entryDate: [
-      dayjs().format("YYYY-MM-DD"),
-      dayjs().add(1, "day").format("YYYY-MM-DD"),
-    ], // 褰曞叆鏃ユ湡
-    entryDateStart: dayjs().format("YYYY-MM-DD"),
-    entryDateEnd: dayjs().add(1, "day").format("YYYY-MM-DD"),
+    entryDate: undefined, // 褰曞叆鏃ユ湡
+    entryDateStart: undefined,
+    entryDateEnd: undefined,
   },
 });
 const { searchForm } = toRefs(data);
@@ -117,11 +114,11 @@
     width: 120,
     formatData: (params) => {
       if (params == 0) {
-        return "鍘熸潗鏂欐楠�";
+        return "鍏ュ巶妫�";
       } else if (params == 1) {
-        return "杩囩▼妫�楠�";
+        return "杞﹂棿妫�";
       } else {
-        return '鍑哄巶妫�楠�';
+        return '鍑哄巶妫�';
       }
     },
     formatType: (params) => {
@@ -180,21 +177,15 @@
     label: "鎿嶄綔",
     align: "center",
     fixed: "right",
-    width: 120,
+    width: 100,
     operation: [
-      {
-        name: "缂栬緫",
-        type: "text",
-        clickFun: (row) => {
-          openForm("edit", row);
-        },
-      },
       {
         name: "澶勭悊",
         type: "text",
         clickFun: (row) => {
           openInspectionForm("edit", row);
         },
+        disabled: (row) => row.inspectState === 1,
       },
     ],
   },
@@ -250,12 +241,20 @@
 
 // 鎵撳紑寮规
 const openForm = (type, row) => {
+  if (type !== 'add' && row?.inspectState === 1) {
+    proxy.$modal.msgWarning("宸插鐞嗙殑鏁版嵁涓嶈兘鍐嶇紪杈�");
+    return;
+  }
   nextTick(() => {
     formDia.value?.openDialog(type, row)
   })
 };
 // 鎵撳紑澶勭悊寮规
 const openInspectionForm = (type, row) => {
+  if (row?.inspectState === 1) {
+    proxy.$modal.msgWarning("宸插鐞嗙殑鏁版嵁涓嶈兘鍐嶅鐞�");
+    return;
+  }
   nextTick(() => {
     inspectionFormDia.value?.openDialog(type, row)
   })

--
Gitblit v1.9.3