From 1f69274b3f62e60378d7c5dbce05357366aaf2a6 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 19 三月 2025 17:21:50 +0800
Subject: [PATCH] 能力范围修改80%+合并装备代码

---
 src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue |   61 ++++++++++++++++++++++++------
 1 files changed, 48 insertions(+), 13 deletions(-)

diff --git a/src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue b/src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue
index 92e3e56..23bf010 100644
--- a/src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue
+++ b/src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue
@@ -38,10 +38,10 @@
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="closeBindPartDialog">鍙� 娑�</el-button>
-        <el-button type="primary" @click="submitBind" :loading="bindLoad">纭� 璁�</el-button>
+        <el-button type="primary" @click="submitBind">纭� 璁�</el-button>
       </span>
     </el-dialog>
-    <el-dialog title="淇敼璁板綍" :visible.sync="editItem" width="600px">
+    <el-dialog title="淇敼璁板綍" :visible.sync="editItem" width="900px">
       <div class="body" v-if="editItem">
         <lims-table :tableData="editList" :column="editColumn" height="460px" :tableLoading="tableLoading0" :key="2"
           :page="editPage" @pagination="editPagination"></lims-table>
@@ -54,9 +54,16 @@
 import limsTable from "@/components/Table/lims-table.vue";
 import {
   addProductPart,
-  addTestObjectPart, deleteProductPart, deleteTestObjectPart,
+  addTestObjectPart,
+  deleteProductPart,
+  deleteTestObjectPart,
   selectByProductId,
-  selectByTestObjectId, updateProductPart, updateTestObjectPart, inspectionItems, productPartReview
+  selectByTestObjectId,
+  updateProductPart,
+  updateTestObjectPart,
+  inspectionItems,
+  productPartReview,
+  productPartLogList
 } from "@/api/structural/structureTestObjectPart";
 
 export default {
@@ -93,6 +100,7 @@
         { label: '闆朵欢鍙�', prop: 'partNo' },
         { label: '棰滆壊', prop: 'color' },
         { label: '鑹叉爣', prop: 'colorCode' },
+        { label: '杩涘巶妫�楠岄」', prop: 'inspectionItem' },
         {
           label: '鐘舵��', prop: 'review',
           dataType: "tag",
@@ -136,7 +144,7 @@
                     productPartReview({ id: row.id }).then((res) => {
                       if (res.code == 200) {
                         this.$message.success("澶嶆牳閫氳繃");
-                        this.getList()();
+                        this.getList();
                       }
                     });
                   })
@@ -207,12 +215,23 @@
       editItem: false,
       editList: [],
       editColumn: [
-        { label: '闆朵欢鍙�', prop: 'inspectionItem' },
-        { label: '棰滆壊', prop: 'inspectionItemSubclass' },
-        { label: '鑹叉爣', prop: 'ask' },
-        { label: '杩涘巶妫�楠岄」', prop: 'askTell' },
-        { label: '淇敼鏃堕棿', prop: 'method' },
-        { label: '淇敼浜�', prop: 'method' },
+        { label: '闆朵欢鍙�', prop: 'partNo' },
+        { label: '棰滆壊', prop: 'color' },
+        { label: '鑹叉爣', prop: 'colorCode' },
+        { label: '杩涘巶妫�楠岄」', prop: 'inspectionItem' },
+        {
+          label: '鐘舵��', prop: 'review',
+          dataType: "tag",
+          formatType: (params) => {
+            if (params == '寰呭鏍�') {
+              return 'danger'
+            } else {
+              return 'success'
+            }
+          },
+        },
+        { label: '淇敼鏃堕棿', prop: 'operTime' },
+        { label: '淇敼浜�', prop: 'operName' },
       ],
       editPage: {
         total: 0,
@@ -220,6 +239,7 @@
         current: 0,
       },
       tableLoading0: false,
+      currentPart: {},//褰撳墠闆朵欢
       // mutilSelect: []
     }
   },
@@ -240,11 +260,21 @@
       })
     },
     // 淇敼璁板綍
-    lookList() {
+    lookList(row) {
+      this.currentPart = row;
       this.editItem = true;
       this.getEditList()
     },
-    getEditList() { },
+    getEditList() {
+      this.tableLoading0 = true
+      productPartLogList({ id: this.currentPart.id, ...this.editPage }).then(res => {
+        this.tableLoading0 = false
+        if (res.code == 200) {
+          this.editList = res.data.records
+          this.editPage.total = res.data.total
+        }
+      })
+    },
     editPagination() {
       this.editPage.current = page;
       this.editPage.size = limit;
@@ -282,6 +312,8 @@
       if (type === 'edit') {
         this.bindPartData = this.HaveJson(row)
         this.bindPartData.inspectionItem = this.bindPartData.inspectionItem ? this.bindPartData.inspectionItem.split(',') : []
+      } else {
+        this.bindPartData = {}
       }
     },
     // 鎻愪氦闆朵欢缁戝畾
@@ -294,12 +326,14 @@
             color: this.bindPartData.color,
             colorCode: this.bindPartData.colorCode,
             partNo: this.bindPartData.partNo,
+            id: this.bindPartData.id,
             inspectionItem: this.bindPartData.inspectionItem && this.bindPartData.inspectionItem.length > 0 ? this.bindPartData.inspectionItem.join(',') : ''
           } : {
             productId: this.currentRow.id,
             color: this.bindPartData.color,
             colorCode: this.bindPartData.colorCode,
             partNo: this.bindPartData.partNo,
+            id: this.bindPartData.id,
             inspectionItem: this.bindPartData.inspectionItem && this.bindPartData.inspectionItem.length > 0 ? this.bindPartData.inspectionItem.join(',') : ''
           }
           this.bindLoad = true
@@ -319,6 +353,7 @@
               })
             } else {
               addProductPart(params).then(res => {
+                this.bindLoad = false
                 if (res.code === 200) {
                   this.resetForm('bindPartData')
                   this.addBindPartDialog = false

--
Gitblit v1.9.3