From 38ab644750d75a495c207dbb965c2e1fe842e730 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期五, 21 三月 2025 14:07:46 +0800
Subject: [PATCH] 报检类型,供应商批号和查询添加

---
 src/views/business/inspectionReview/index.vue |   57 ++++++++++++++++++++++++++++++++-------------------------
 1 files changed, 32 insertions(+), 25 deletions(-)

diff --git a/src/views/business/inspectionReview/index.vue b/src/views/business/inspectionReview/index.vue
index 8b979dc..af918dd 100644
--- a/src/views/business/inspectionReview/index.vue
+++ b/src/views/business/inspectionReview/index.vue
@@ -98,7 +98,7 @@
             if (params == 0) {
               return "鎴愬搧涓嬪崟";
             } else {
-              return "鍘熸潗鏂欎笅鍗�";
+              return "鍘熻緟鏂欎笅鍗�";
             }
           },
         },
@@ -108,7 +108,18 @@
           prop: "type",
           dataType: "tag",
           formatData: (params) => {
-            return this.urgencyLevel.find((m) => m.value == params).label;
+            if (this.urgencyLevel.find((m) => m.value == params)) {
+              return this.urgencyLevel.find((m) => m.value == params).label;
+            } else {
+              return null
+            }
+          },
+          formatType: (params) => {
+            if (this.urgencyLevel.find((m) => m.value == params)) {
+              return this.urgencyLevel.find((m) => m.value == params).type;
+            } else {
+              return null
+            }
           },
         },
         {
@@ -128,11 +139,18 @@
           prop: "insState",
           dataType: "tag",
           formatData: (params) => {
-            return this.inspectionTaskState.find((m) => m.value == params)
-              .label;
+            if (this.inspectionTaskState.find((m) => m.value == params)) {
+              return this.inspectionTaskState.find((m) => m.value == params).label;
+            } else {
+              return null
+            }
           },
           formatType: (params) => {
-            return this.inspectionTaskState.find((m) => m.value == params).type;
+            if (this.inspectionTaskState.find((m) => m.value == params)) {
+              return this.inspectionTaskState.find((m) => m.value == params).type;
+            } else {
+              return null
+            }
           },
         },
         { label: "妫�楠屼汉", prop: "userName" },
@@ -219,20 +237,20 @@
       sonLaboratoryList: [],
       typeSourceList: [
         { label: '鎴愬搧涓嬪崟', value: 0 },
-        { label: '鍘熸潗鏂欎笅鍗�', value: 1 },
+        { label: '鍘熻緟鏂欎笅鍗�', value: 1 },
       ],
       isCopper: null,
       customsInspection: {},
-      typeSource: null,// 0:鎴愬搧涓嬪崟锛�1锛氬師鏉愭枡涓嬪崟
+      typeSource: null,// 0:鎴愬搧涓嬪崟锛�1锛氬師杈呮枡涓嬪崟
       showInfoDialog: false, // 浜т笟閾句俊鎭煡鐪�
       issuedVisible: false,
       fullscreen: false,
       option: null,
       orderTypeList: [
-        { label: '濮旀墭璇曢獙', value: 'Customer-ordered test' },
-        { label: '鎶芥', value: '鎶芥' },
-        { label: '杩涘巶妫�楠�', value: '杩涘巶妫�楠�' },
-        { label: '瀛e害妫�楠�', value: 'Quarterly inspection' },
+        { label: '濮旀墭璇曢獙', value: 'Customer-ordered test', type: 'success' },
+        { label: '鎶芥', value: '鎶芥', type: 'danger' },
+        { label: '杩涘巶妫�楠�', value: '杩涘巶妫�楠�', type: 'info' },
+        { label: '瀛e害妫�楠�', value: 'Quarterly inspection', type: '' },
       ],
       urgencyLevel: [],
       inspectionTaskState: [],
@@ -286,13 +304,6 @@
       }
       return "";
     },
-    // 鏌ョ湅浜т笟閾句俊鎭�
-    // openInfoDialog (row) {
-    //   this.showInfoDialog = true
-    //   this.$nextTick(() => {
-    //     this.$refs.showInfoDialog.getInfo(row.ifsInventoryId)
-    //   })
-    // },
     selectAllByOne(row) {
       this.isCopper = row.isCopper
       this.customsInspection = row
@@ -302,7 +313,7 @@
       this.currentId = parseInt(row.id)
       switch (row.isCopper) {
         case 0:
-          // 鍘熸潗鏂�
+          // 鍘熻緟鏂�
           this.$router.push({
             path: "/materialOrder/customsInspection", query: {
               customsInspection: row,
@@ -347,7 +358,7 @@
     },
     // 涓嬭浇鎶ュ憡
     download(row) {
-      let url = (row.urlS===null||row.urlS==='')?row.url:row.urlS
+      let url = (row.urlS === null || row.urlS === '') ? row.url : row.urlS
       const link = document.createElement('a');
       link.href = this.javaApi + url;
       link.target = '_blank';
@@ -373,10 +384,6 @@
     // 鏌ョ湅鎶ュ憡
     handleIssued(row) {
       // todo: 鏌ョ湅鎶ュ憡缁勪欢
-/*      if (!row.tempUrlPdf) return this.$message.warning('鏂囦欢鏈笂浼�')
-      this.currentInfo = row
-      this.lookDialogVisible = true*/
-      console.log(this.javaApi)
       this.currentInfo = row;
       let fileName = row.url
       let fileType = "docx"
@@ -384,7 +391,7 @@
         fileName = row.tempUrlPdf
         fileType = "pdf"
       }
-      fileName = fileName.replace('/word/','')
+      fileName = fileName.replace('/word/', '')
       const userName = this.nickName
       this.option = {
         url: this.javaApi + "/word/" + fileName,

--
Gitblit v1.9.3