From d68551caef23bd5d3c00035d7add3814f0fdece1 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 19 二月 2025 15:19:52 +0800
Subject: [PATCH] 搬迁检验任务11%

---
 src/views/business/inspectionTask/index.vue |  313 +++++++++++++++++++--------------------------------
 1 files changed, 118 insertions(+), 195 deletions(-)

diff --git a/src/views/business/inspectionTask/index.vue b/src/views/business/inspectionTask/index.vue
index 127d5bb..8c58f11 100644
--- a/src/views/business/inspectionTask/index.vue
+++ b/src/views/business/inspectionTask/index.vue
@@ -162,17 +162,6 @@
             </el-col>
           </el-row>
         </div>
-        <!-- <ValueTable
-          :key="upIndex"
-          ref="insOrderPlan"
-          :componentData="componentData"
-          :isColumnWidth="true"
-          :tableRowClassName="changeRowClass"
-          :upUrl="$api.user.updateUser"
-          :url="$api.insOrderPlan.selectInsOrderPlanList"
-          class="value-table"
-          @handleInspection="handleInspection"
-        /> -->
         <lims-table
           :tableData="tableData"
           :column="column"
@@ -180,6 +169,7 @@
           :tableLoading="tableLoading"
           :height="'calc(100vh - 290px)'"
           @pagination="pagination"
+          key="tableData0"
         ></lims-table>
       </div>
     </div>
@@ -281,12 +271,15 @@
     />-->
     <el-dialog :visible.sync="dataDialogVisible" title="鏁版嵁鏌ョ湅" width="80%">
       <div v-if="dataDialogVisible" style="height: 70vh; overflow-y: auto">
-        <ValueTable
-          ref="ValueTableDataLook"
-          :componentData="componentDataDataLook"
-          :rowKey="'insProductId'"
-          :url="$api.insOrder.selectSampleAndProductByOrderId"
-        />
+        <lims-table
+          :tableData="lookTableData"
+          :column="lookColumn"
+          :page="lookPage"
+          :tableLoading="lookTableLoading"
+          :height="'60vh'"
+          @pagination="lookPagination"
+          key="tableData1"
+        ></lims-table>
       </div>
     </el-dialog>
     <el-dialog
@@ -400,6 +393,7 @@
   bindingProductTreeByProductId,
   delProductTreeByProductId,
   selectInsOrderPlanList,
+  selectSampleAndProductByOrderId,
 } from "@/api/business/inspectionTask.js";
 import { mapGetters } from "vuex";
 export default {
@@ -521,182 +515,6 @@
         requiredUp: [],
       },
       dataDialogVisible: false,
-      componentData: {
-        entity: {
-          orderBy: {
-            field: "entrustCode",
-            order: "asc",
-          },
-          sonLaboratory: null,
-          insState: null,
-          userId: null,
-          typeSource: null,
-        },
-        isIndex: true,
-        showSelect: false,
-        select: false,
-        init: false,
-        needSort: ["createTime", "sendTime", "type", "appointed", "insState"],
-        do: [
-          {
-            id: "",
-            font: "鏁版嵁鏌ョ湅",
-            type: "text",
-            method: "handleDataLook",
-          },
-          {
-            id: "",
-            font: "淇敼妫�楠屽��",
-            type: "text",
-            method: "editInspection",
-            disabFun: (row, index) => {
-              return (
-                row.userName == null || row.insState == 3 || row.insState == 5
-              );
-            },
-          },
-          {
-            id: "",
-            font: "妫�楠�",
-            type: "text",
-            method: "handleInspection",
-            disabFun: (row, index) => {
-              return (
-                row.userName == null ||
-                row.insState == 3 ||
-                row.insState == 5 ||
-                (row.userName &&
-                  !row.userName.includes(
-                    JSON.parse(localStorage.getItem("user")).name
-                  ))
-              );
-            },
-          },
-          {
-            id: "",
-            font: "浜ゆ帴",
-            type: "text",
-            method: "handleConnect",
-            disabFun: (row, index) => {
-              return (
-                row.userName == null ||
-                row.insState == 5 ||
-                row.insState == 3 ||
-                (row.userName &&
-                  !row.userName.includes(
-                    JSON.parse(localStorage.getItem("user")).name
-                  ))
-              );
-            },
-          },
-          // {
-          //   font: '浜т笟閾�',
-          //   type: 'text',
-          //   method: 'openInfoDialog',
-          //   disabFun: (row, index) => {
-          //     return row.typeSource !== 1
-          //   }
-          // },
-          // {
-          // 	id: '',
-          // 	font: '璁ら',
-          // 	type: 'text',
-          // 	method: 'claimFun',
-          // 	disabFun: (row, index) => {
-          // 		return row.userName != null || row.checkName!=null
-          // 	}
-          // },
-          {
-            id: "",
-            font: "鍘熷璁板綍",
-            type: "text",
-            method: "viewInspectInfo",
-          },
-        ],
-        linkEvent: {
-          entrustCode: {
-            method: "selectAllByOne",
-          },
-        },
-        tagField: {
-          type: {
-            select: [],
-          },
-          insState: {
-            select: [],
-          },
-          insResult: {
-            select: [
-              {
-                value: 0,
-                label: "涓嶅悎鏍�",
-                type: "danger",
-              },
-              {
-                value: 1,
-                label: "鍚堟牸",
-                type: "success",
-              },
-              {
-                value: "",
-                label: "鏈嚭缁撴灉",
-                type: "info",
-              },
-            ],
-          },
-          typeSource: {
-            select: [
-              {
-                value: 0,
-                label: "鎴愬搧涓嬪崟",
-                type: "info",
-              },
-              {
-                value: 1,
-                label: "鍘熸潗鏂欎笅鍗�",
-                type: "info",
-              },
-              {
-                value: 2,
-                label: "鍘熸潗鏂欎笅鍗�",
-                type: "info",
-              },
-            ],
-          },
-          orderType: {
-            select: [
-              {
-                value: "Customer-ordered test",
-                label: "濮旀墭璇曢獙",
-                type: "success",
-                effect: "plain",
-              },
-              {
-                value: "鎶芥",
-                label: "鎶芥",
-                type: "",
-                effect: "plain",
-              },
-              {
-                value: "杩涘巶妫�楠�",
-                label: "杩涘巶妫�楠�",
-                type: "info",
-                effect: "plain",
-              },
-              {
-                value: "Quarterly inspection",
-                label: "瀛e害妫�楠�",
-                type: "warning",
-                effect: "plain",
-              },
-            ],
-          },
-        },
-        selectField: {},
-        requiredAdd: [],
-        requiredUp: [],
-      },
-      upIndex: 0,
       planTotal: 0,
       insStateList: [],
       state: 0, // 0:鍙拌处椤碉紝1锛氭楠岄〉闈�,2妫�楠岄〉闈�(澶嶆牳)锛岄粯璁や负0,3鏁版嵁鏌ョ湅
@@ -819,7 +637,6 @@
           dataType: "action",
           fixed: "right",
           label: "鎿嶄綔",
-          width: "260px",
           operation: [
             {
               name: "鏁版嵁鏌ョ湅",
@@ -887,6 +704,91 @@
       },
       tableLoading: false,
       queryParams: {},
+      insResultList: [
+        {
+          value: 1,
+          label: "鍚堟牸",
+          type: "success",
+        },
+        {
+          value: 0,
+          label: "涓嶅悎鏍�",
+          type: "danger",
+        },
+        {
+          value: 3,
+          label: "涓嶅垽瀹�",
+          type: "",
+        },
+      ],
+      lookTableData: [],
+      lookColumn: [
+        {
+          label: "鏍峰搧缂栧彿",
+          prop: "sampleCode",
+          width: "140px",
+          dataType: "link",
+          linkMethod: "selectAllByOne",
+        },
+        { label: "鏍峰搧鍚嶇О", prop: "sample", width: "140px" },
+        { label: "妫�楠岄」鍒嗙被", prop: "inspectionItemClass" },
+        { label: "妫�楠岄」", prop: "inspectionItem", width: "140px" },
+        { label: "妫�楠屽瓙椤�", prop: "inspectionItemSubclass" },
+        { label: "鍗曚綅", prop: "unit" },
+        { label: "鏍峰搧鍨嬪彿", prop: "model" },
+        { label: "鏉′欢", prop: "radius" },
+        { label: "鐢电紗鏍囪瘑", prop: "cableTag" },
+        { label: "璇曢獙瑕佹眰", prop: "tell" },
+        { label: "妫�楠岀粨鏋�", prop: "lastValue" },
+        {
+          label: "缁撴灉鍒ゅ畾",
+          prop: "insResult",
+          dataType: "tag",
+          formatData: (params) => {
+            return this.insResultList.find((m) => m.value == params).label;
+          },
+          formatType: (params) => {
+            return this.insResultList.find((m) => m.value == params).type;
+          },
+        },
+        {
+          dataType: "action",
+          fixed: "right",
+          label: "鎿嶄綔",
+          operation: [
+            {
+              name: "涓嶅悎鏍煎娴嬫煡鐪�",
+              type: "text",
+              clickFun: (row) => {
+                this.getRetestResult(row);
+              },
+              disabled: (row) => {
+                return row.insResult != 0;
+              },
+            },
+            {
+              name: "妫�楠岄」缁戝畾",
+              type: "text",
+              clickFun: (row) => {
+                this.getBinding(row);
+              },
+              disabled: (row) => {
+                return (
+                  this.lookInfo.userName == null ||
+                  this.lookInfo.insState == 3 ||
+                  this.lookInfo.insState == 5
+                );
+              },
+            },
+          ],
+        },
+      ],
+      lookPage: {
+        total: 0,
+        size: 10,
+        current: 0,
+      },
+      lookTableLoading: false,
     };
   },
   created() {
@@ -926,6 +828,27 @@
       this.page.size = limit;
       this.getList();
     },
+    getLookList() {
+      this.lookTableLoading = true;
+      let param = { id: this.lookInfo.id, ...this.lookPage };
+      delete param.total;
+      selectSampleAndProductByOrderId({ ...param })
+        .then((res) => {
+          this.lookTableLoading = false;
+          if (res.code === 200) {
+            this.lookTableData = res.data.records;
+            this.lookPage.total = res.data.total;
+          }
+        })
+        .catch((err) => {
+          this.lookTableLoading = false;
+        });
+    },
+    lookPagination({ page, limit }) {
+      this.lookPage.current = page;
+      this.lookPage.size = limit;
+      this.getLookList();
+    },
     // 淇敼妫�楠屽��
     editInspection(row) {
       this.$refs.editInspectionItem.showDialog(row.id);
@@ -937,7 +860,7 @@
     // 鏁版嵁鏌ョ湅
     handleDataLook(row) {
       this.lookInfo = row;
-      this.componentDataDataLook.entity.id = row.id;
+      this.getLookList();
       this.dataDialogVisible = true;
     },
     // 鏌ョ湅涓嶅悎鏍煎娴嬬粨鏋�

--
Gitblit v1.9.3