From 0af4ccb5dacacce56c5fddd0d70288fc377c56be Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期二, 01 九月 2026 17:04:37 +0800
Subject: [PATCH] feat(inspection): 1.添加报告类型功能并优化检验流程 2.设备管理组件中的部门列表获取方法优化

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

diff --git a/src/views/business/inspectionView/index.vue b/src/views/business/inspectionView/index.vue
index aed573d..bba64e6 100644
--- a/src/views/business/inspectionView/index.vue
+++ b/src/views/business/inspectionView/index.vue
@@ -2561,6 +2561,7 @@
       this.$refs.viewManHourDia.showDialog(this.id, 99);
     },
     openAddVerifyDia() {
+      this.reportType = null;
       this.addVerifyDia = true;
     },
     submit() {
@@ -2584,15 +2585,17 @@
       checkSubmitPlan({
         orderId: this.orderId,
         laboratory: this.sonLaboratory,
+        reportType: this.reportType,
       }).then((res) => {
         if (res.code === 200) {
-          if (!res.data || res.data.length == 0) {
+          if (!res.data || res.data.errorMsg.length == 0) {
             this.submitLoading = true;
             submitPlan({
               orderId: this.orderId,
               laboratory: this.sonLaboratory,
               verifyUser: this.verifyUser,
               entrustCode: this.insOrder.entrustCode,
+              registerInsResults: this.reportType === 1,
               reportType: this.reportType,
             }).then((res) => {
               if (res.code === 200) {
@@ -2609,16 +2612,16 @@
           } else {
             let newData = [];
             const h = this.$createElement;
-            for (let i in res.data) {
-              const lastChar = res.data[i].slice(-1);
+            for (let i in res.data.errorMsg) {
+              const lastChar = res.data.errorMsg[i].slice(-1);
               if (lastChar == "-") {
-                res.data[i] = res.data[i].slice(0, -1);
+                res.data.errorMsg[i] = res.data.errorMsg[i].slice(0, -1);
               }
               newData.push(
                 h(
                   "p",
                   { style: "font-size: 14px;color: red;" },
-                  Number(i) + 1 + "銆�" + res.data[i]
+                  Number(i) + 1 + "銆�" + res.data.errorMsg[i]
                 )
               );
             }
@@ -2645,6 +2648,7 @@
                   orderId: this.orderId,
                   laboratory: this.sonLaboratory,
                   verifyUser: this.verifyUser,
+                  registerInsResults: false,
                   reportType: this.reportType,
                 }).then((res) => {
                   if (res.code === 200) {

--
Gitblit v1.9.3