From cbbd61172fc3701f44cf934c87d7ac0ee32c2a6e Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 13 三月 2025 13:45:02 +0800
Subject: [PATCH] 检验任务-添加不合格查看弹框

---
 src/views/business/inspectionTask/index.vue |   51 +++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 41 insertions(+), 10 deletions(-)

diff --git a/src/views/business/inspectionTask/index.vue b/src/views/business/inspectionTask/index.vue
index eabfb22..515c16e 100644
--- a/src/views/business/inspectionTask/index.vue
+++ b/src/views/business/inspectionTask/index.vue
@@ -181,6 +181,16 @@
     </el-dialog>
     <el-dialog :visible.sync="dataDialogVisible" title="鏁版嵁鏌ョ湅" width="80%">
       <div v-if="dataDialogVisible" style="height: 70vh; overflow-y: auto">
+        <div>
+          <el-form :model="entity" :inline="true">
+            <el-form-item label="妫�楠岄」" prop="outputWorkTime">
+              <el-input v-model="entity.inspectionItem" clearable size="small"></el-input>
+            </el-form-item>
+            <el-form-item>
+              <el-button size="small" type="primary" @click="getLookList">鏌ヨ</el-button>
+            </el-form-item>
+          </el-form>
+        </div>
         <lims-table :tableData="lookTableData" :column="lookColumn" :page="lookPage" :tableLoading="lookTableLoading"
           :height="'60vh'" @pagination="lookPagination" key="tableData1"></lims-table>
       </div>
@@ -236,6 +246,8 @@
     <edit-inspection-item ref="editInspectionItem"></edit-inspection-item>
     <!--鏌ョ湅宸ユ椂寮规-->
     <viewManHourDia ref="viewManHourDia"></viewManHourDia>
+    <!--涓嶅悎鏍煎娴嬫煡鐪嬪脊妗�-->
+    <un-pass-retest-result v-if="retestVisible" :retestInfo="retestInfo" :retestVisible="retestVisible" @closeRetestLook="closeRetestLook"></un-pass-retest-result>
   </div>
 </template>
 
@@ -244,6 +256,7 @@
 import EditInspectionItem from "./components/EditInspectionItem.vue";
 import limsTable from "@/components/Table/lims-table.vue";
 import viewManHourDia from "./components/viewManHourDia.vue"
+import UnPassRetestResult from "@/components/rawMaterialInspection/unPassRetestResult.vue"
 import {
   claimInsOrderPlan,
   upPlanUser2,
@@ -257,12 +270,14 @@
   selectSampleAndProductByOrderId,
 } from "@/api/business/inspectionTask.js";
 import { mapGetters } from "vuex";
+import {getRetestResult} from "@/api/business/rawMaterialOrder";
 export default {
   name: 'InspectionTask',
   components: {
     EditInspectionItem,
     limsTable,
-    viewManHourDia
+    viewManHourDia,
+    UnPassRetestResult
   },
   dicts: ["urgency_level", "inspection_task_state"],
   computed: {
@@ -511,6 +526,9 @@
         },
       ],
       // 鏁版嵁鏌ョ湅鐩稿叧瀛楁---寮�濮�
+      entity: {
+        inspectionItem: "",
+      },
       lookTableData: [],
       lookColumn: [
         {
@@ -556,6 +574,16 @@
           label: "鎿嶄綔",
           operation: [
             {
+              name: "涓嶅悎鏍煎娴嬫煡鐪�",
+              type: "text",
+              clickFun: (row) => {
+                this.getRetestResultInfo(row);
+              },
+              disabled: (row) => {
+                return row.insResult!=0
+              },
+            },
+            {
               name: "妫�楠岄」缁戝畾",
               type: "text",
               clickFun: (row) => {
@@ -579,6 +607,7 @@
       },
       lookTableLoading: false,
       // 鏁版嵁鏌ョ湅鐩稿叧瀛楁---缁撴潫
+      retestVisible: false,
     };
   },
   mounted() {
@@ -620,7 +649,7 @@
     },
     getLookList() {
       this.lookTableLoading = true;
-      let param = { id: this.lookInfo.id, ...this.lookPage };
+      let param = { id: this.lookInfo.id, ...this.lookPage, inspectionItem: this.entity.inspectionItem };
       delete param.total;
       selectSampleAndProductByOrderId({ ...param })
         .then((res) => {
@@ -915,15 +944,21 @@
         this.personList = data;
       });
     },
+    // 鏌ョ湅涓嶅悎鏍煎娴嬬粨鏋�
+    getRetestResultInfo (row) {
+      getRetestResult({insProductId: row.insProductId}).then(res => {
+        this.retestVisible = true
+        this.retestInfo = res.data
+      })
+    },
+    closeRetestLook () {
+      this.retestVisible = false
+    },
     // 缁戝畾妫�楠岄」缁戝畾
     getBinding(row) {
       this.bindCurrentInfo = row;
       getBindingProductByProductId({ productId: row.insProductId })
         .then((res) => {
-          if (res.coe == 201) {
-            // this.$message.error('鏈粦瀹氭楠岄」')
-            return;
-          }
           // console.log(res)
           this.bindTableData = res.data;
           this.bindDialogVisible = true;
@@ -937,10 +972,6 @@
         productId: this.bindCurrentInfo.insProductId,
       })
         .then((res) => {
-          if (res.coe == 201) {
-            // this.$message.error('鏈粦瀹氭楠岄」')
-            return;
-          }
           // console.log(res)
           this.bindAddTableData = res.data;
           this.bindAddDialogVisible = true;

--
Gitblit v1.9.3