From 90c8680cbc67d4b2680b1e5af4ad1129a96efa0c Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 06 五月 2025 14:39:09 +0800
Subject: [PATCH] 1.设备工具明细和树-过期标红

---
 src/views/business/productOrder/index.vue |   74 +++++++++++++++++++++++++++---------
 1 files changed, 55 insertions(+), 19 deletions(-)

diff --git a/src/views/business/productOrder/index.vue b/src/views/business/productOrder/index.vue
index 09bb69e..b674f14 100644
--- a/src/views/business/productOrder/index.vue
+++ b/src/views/business/productOrder/index.vue
@@ -784,6 +784,11 @@
     ...mapGetters(["nickName"]),
   },
   mounted() {
+    if (this.checkPermi(['get:raw:await'])) {
+      this.tabIndex = 0
+    } else {
+      this.tabIndex = 2
+    }
     this.refreshTable()
     this.getAuthorizedPerson()
   },
@@ -922,7 +927,12 @@
     },
     // 瀵煎嚭璁板綍
     downLoad() {
-      const params = { ...this.entity, state: this.tabList[this.tabIndex].value }
+      let params = {}
+      if (this.multipleSelection.length > 0) {
+        params.ids = this.multipleSelection.map(item => item.id).join(',');
+      } else {
+        params = { ...this.entity, state: this.tabList[this.tabIndex].value }
+      }
       rawAllInsOrderExport({ ...params }).then(res => {
         const blob = new Blob([res], { type: 'application/octet-stream' });
         this.$download.saveAs(blob, '濮旀墭妫�娴嬩俊鎭鍑�.xlsx');
@@ -975,14 +985,26 @@
     },
     // 鐐瑰嚮鏍峰搧鍚嶇О
     selectAllByOne(row) {
-      this.$router.push({
-        path: "/productOrder/addView", query: {
-          examine: 1,
-          active: 2,
-          currentId: row.id,
-          tabIndex: this.tabIndex,
-        }
-      });
+      if (this.tabIndex === 4) {
+        this.$router.push({
+          path: "/productOrder/addOrder", query: {
+            examine: 1,
+            active: 2,
+            currentId: row.id,
+            tabIndex: this.tabIndex,
+          }
+        });
+      } else {
+        this.$router.push({
+          path: "/productOrder/addView", query: {
+            examine: 1,
+            active: 2,
+            currentId: row.id,
+            tabIndex: this.tabIndex,
+          }
+        });
+      }
+
     },
     // 淇敼鏍峰搧鍨嬪彿
     editSampleModel (row) {
@@ -1255,6 +1277,7 @@
     },
     handleTab(i) {
       this.tabIndex = i;
+      this.multipleSelection = []
       this.refreshTable()
     },
     // 鏌ョ湅妫�楠屾暟鎹�
@@ -1265,16 +1288,29 @@
         inspectorList = row.userName.split(',')
       }
       inspectorList.push(this.nickName)
-      this.$router.push({
-        path: "/inspectionTask/inspection",
-        query: {
-          sonLaboratory: row.sonLaboratory,
-          state: 3,
-          typeSource: row.typeSource,
-          orderId: row.id,
-          inspectorList: inspectorList,
-        },
-      })
+      if (this.checkPermi(['business:inspectionView'])) {
+        this.$router.push({
+          name: "InspectionView",
+          query: {
+            sonLaboratory: row.sonLaboratory,
+            state: 3,
+            typeSource: row.typeSource,
+            orderId: row.id,
+            inspectorList: inspectorList,
+          },
+        })
+      } else {
+        this.$router.push({
+          path: "/inspectionTask/inspection",
+          query: {
+            sonLaboratory: row.sonLaboratory,
+            state: 3,
+            typeSource: row.typeSource,
+            orderId: row.id,
+            inspectorList: inspectorList,
+          },
+        })
+      }
     },
     goback() {
       this.state = 0

--
Gitblit v1.9.3