From 2e77330d87341624c88301562fd137b58f9a101a Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 25 十二月 2025 10:57:35 +0800
Subject: [PATCH] 1.海川开心-录入日期都默认当天,封装公用组件和方法

---
 src/views/qualityManagement/rawMaterialInspection/index.vue |   39 ++++++++++++---------------------------
 1 files changed, 12 insertions(+), 27 deletions(-)

diff --git a/src/views/qualityManagement/rawMaterialInspection/index.vue b/src/views/qualityManagement/rawMaterialInspection/index.vue
index 477b55e..ac6c551 100644
--- a/src/views/qualityManagement/rawMaterialInspection/index.vue
+++ b/src/views/qualityManagement/rawMaterialInspection/index.vue
@@ -40,12 +40,13 @@
     </div>
     <InspectionFormDia ref="inspectionFormDia" @close="handleQuery"></InspectionFormDia>
     <FormDia ref="formDia" @close="handleQuery"></FormDia>
+    <DetailDia ref="detailDia"></DetailDia>
     <files-dia ref="filesDia" @close="handleQuery"></files-dia>
     <el-dialog v-model="dialogFormVisible" title="缂栬緫妫�楠屽憳" width="30%"
                @close="closeDia">
       <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef">
         <el-form-item label="妫�楠屽憳锛�" prop="checkName">
-          <el-select v-model="form.checkName" placeholder="璇烽�夋嫨" clearable>
+          <el-select v-model="form.checkName" placeholder="璇烽�夋嫨" clearable filterable>
             <el-option v-for="item in userList" :key="item.nickName" :label="item.nickName"
                        :value="item.nickName"/>
           </el-select>
@@ -67,6 +68,7 @@
 import {onMounted, ref} from "vue";
 import InspectionFormDia from "@/views/qualityManagement/rawMaterialInspection/components/inspectionFormDia.vue";
 import FormDia from "@/views/qualityManagement/rawMaterialInspection/components/formDia.vue";
+import DetailDia from "@/views/qualityManagement/rawMaterialInspection/components/detailDia.vue";
 import {ElMessageBox} from "element-plus";
 import {
   downloadQualityInspect,
@@ -123,11 +125,6 @@
     width: 120
   },
   {
-    label: "妫�娴嬪崟浣�",
-    prop: "checkCompany",
-    width: 120
-  },
-  {
     label: "妫�娴嬬粨鏋�",
     prop: "checkResult",
     dataType: "tag",
@@ -157,11 +154,10 @@
     label: "鎿嶄綔",
     align: "center",
     fixed: "right",
-    width: 300,
+    width: 250,
     operation: [
       {
         name: "缂栬緫",
-        type: "text",
         clickFun: (row) => {
           openForm("edit", row);
         },
@@ -170,15 +166,7 @@
 				}
       },
       {
-        name: "闄勪欢",
-        type: "text",
-        clickFun: (row) => {
-          openFilesFormDia(row);
-        },
-      },
-      {
         name: "鎻愪氦",
-        type: "text",
         clickFun: (row) => {
           submit(row.id);
         },
@@ -187,22 +175,13 @@
 				}
       },
       {
-        name: "鍒嗛厤妫�楠屽憳",
-        type: "text",
+        name: "鏌ョ湅",
         clickFun: (row) => {
-          if (!row.checkName) {
-            open(row)
-          } else {
-            proxy.$modal.msgError("妫�楠屽憳宸插瓨鍦�");
-          }
+          openDetail(row);
         },
-				disabled: (row) => {
-					return row.inspectState == 1 || row.checkName;
-				}
       },
       {
         name: "涓嬭浇",
-        type: "text",
         clickFun: (row) => {
           downLoadFile(row);
         },
@@ -227,6 +206,7 @@
 const formDia = ref()
 const filesDia = ref()
 const inspectionFormDia = ref()
+const detailDia = ref()
 const {proxy} = getCurrentInstance()
 const changeDaterange = (value) => {
   searchForm.value.entryDateStart = undefined;
@@ -271,6 +251,11 @@
     formDia.value?.openDialog(type, row)
   })
 };
+const openDetail = (row) => {
+  nextTick(() => {
+    detailDia.value?.openDialog(row)
+  })
+};
 // 鎵撳紑闄勪欢寮规
 const openFilesFormDia = (type, row) => {
   nextTick(() => {

--
Gitblit v1.9.3