From edc6b742457bcdfcfbd49ff41a625f956a733459 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 25 五月 2026 11:16:04 +0800
Subject: [PATCH] 合格率统计:明细数据表格高度显示异常修复

---
 src/views/business/unpass/index-manage.vue |  326 ++++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 264 insertions(+), 62 deletions(-)

diff --git a/src/views/business/unpass/index-manage.vue b/src/views/business/unpass/index-manage.vue
index 1ed6b55..d5da046 100644
--- a/src/views/business/unpass/index-manage.vue
+++ b/src/views/business/unpass/index-manage.vue
@@ -98,10 +98,10 @@
     </el-dialog>
     <el-dialog
       title="閫夋嫨涓嶅悎鏍艰鍗�"
-      :show-close="false"
       :close-on-press-escape="false"
       :close-on-click-modal="false"
       :visible.sync="insOrderVisible"
+      @closed="resetInsOrderForm"
       width="50%">
       <el-row :gutter="20" style="margin-bottom:10px">
         <el-col :span="12">
@@ -111,18 +111,39 @@
           <el-button size="small" type="primary" @click="searchInsOrderList">鎼滅储</el-button>
         </el-col>
       </el-row>
-      <lims-table ref="insOrderTable"
-                  :tableData="insOrderDataList"
-                  :column="insOrderTableDataColumn"
-                  :isSelection="true"
-                  :selectionSelectable="insOrderSelectable"
-                  :handleSelectionChange="selectMethod"
-                  :rowClassName="insOrderRowClassName"
-                  @pagination="insOrderPageination"
-                  :height="500"
-                  :page="insOrderPage"
-                  :tableLoading="insOrderTableLoading">
-      </lims-table>
+      <el-tabs v-model="activeName" @tab-click="searchInsOrderList">
+        <el-tab-pane label="鍘熸潗鏂欎笅鍗�" name="raw">
+          <lims-table ref="rawInsOrderTable"
+                      v-if="activeName==='raw'"
+                      :tableData="insOrderDataList"
+                      :column="insOrderTableDataColumn"
+                      :isSelection="true"
+                      :selectionSelectable="insOrderSelectable"
+                      :handleSelectionChange="selectRawMethod"
+                      :rowClassName="insOrderRowClassName"
+                      @pagination="insOrderPageination"
+                      :height="500"
+                      :page="insOrderPage"
+                      :tableLoading="insOrderTableLoading">
+          </lims-table>
+        </el-tab-pane>
+        <el-tab-pane label="澶栬喘涓嬪崟" name="wg">
+          <lims-table ref="wgInsOrderTable"
+                      v-if="activeName==='wg'"
+                      :tableData="wgInsOrderDataList"
+                      :column="wgInsOrderTableDataColumn"
+                      :isSelection="true"
+                      :selectionSelectable="insOrderSelectable"
+                      :handleSelectionChange="selectWgMethod"
+                      :rowClassName="insOrderRowClassName"
+                      @pagination="wgInsOrderPageination"
+                      :height="500"
+                      :page="wgInsOrderPage"
+                      :tableLoading="insOrderTableLoading">
+          </lims-table>
+        </el-tab-pane>
+      </el-tabs>
+
       <span slot="footer" class="dialog-footer">
         <el-button @click="resetInsOrderForm">鍙� 娑�</el-button>
         <el-button type="primary" @click="openAddUnqualifiedHandlerView">纭� 瀹�</el-button>
@@ -134,6 +155,7 @@
                   :unPassDialog="unPassDialog"></UnPassDialog>
     <OAProcess ref="OAProcess"
                :OAProcess="OAProcess"
+               :isOldData="isOldData"
                @closeOAProcess="closeOAProcess"
                v-if="OAProcess"></OAProcess>
   </div>
@@ -141,6 +163,7 @@
 
 <script>
 import {getIfsByAll} from "@/api/business/rawMaterialOrder";
+import {  getIfsByAll as getIfsByWgAll } from "@/api/business/outsourcingFinishProductInspection";
 import UnPassDialog from "./components/unPassDialog.vue";
 import OAProcess from "./components/OAProcess.vue";
 import limsTable from "@/components/Table/lims-table.vue";
@@ -152,9 +175,10 @@
     OAProcess,
     UnPassDialog,
   },
-  dicts: ['material_prop_type','oa_workflow_state'],
+  dicts: ['material_prop_type','oa_workflow_state','categories_no_conformities','attribution_no_conformities'],
   data() {
     return {
+      activeName: 'raw',
       lotBatchNo:null,
       insOrderVisible:false,
       insOrderTableLoading:false,
@@ -221,8 +245,8 @@
         { label: '鎵瑰彿', prop: 'updateBatchNo',width:'160' },
         { label: '闆朵欢鍙�', prop: 'partNo',width:'140' },
         { label: '闆朵欢鎻忚堪', prop: 'partDesc' },
-        { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName' },
-        { label: '涓嶅悎鏍兼弿杩�', prop: 'unqualifiedDesc',width:'160' },
+        { label: '渚涘簲鍟嗙紪鐮�', prop: 'supplierId',width:'140' },
+        { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName',width:'140' },
         {
           dataType: 'tag',
           label: '鍏嶆',
@@ -292,6 +316,140 @@
         size: 20,
         current: 1
       },
+      wgInsOrderTableDataColumn:[
+        {
+          label: 'IFS鍩�',
+          prop: 'contract',
+          width: '120px',
+          dataType: 'tag',
+          formatData: (params) => {
+            return params
+          },
+          formatType: (params) => {
+            if (params === 'ZTNS') {
+              return ''
+            } else if (params === 'KJNS') {
+              return 'success'
+            }else {
+              return null
+            }
+          }
+
+        },
+        { label: '濮旀墭缂栧彿', prop: 'entrustCode', width: "160px", },
+        {
+          dataType: 'tag',
+          label: '妫�楠岀姸鎬�',
+          prop: 'inspectStatus',
+          formatData: (params) => {
+            if (params == 0) {
+              return '妫�楠屼腑'
+            } else if (params == 1) {
+              return '鍚堟牸'
+            } else if (params == 2) {
+              return '涓嶅悎鏍�'
+            } else if (params == 3) {
+              return '鏈笅鍗�'
+            } else if (params == 4) {
+              return '璁╂鏀捐'
+            } else {
+              return null
+            }
+          },
+          formatType: (params) => {
+            if (params == 0) {
+              return 'warning'
+            } else if (params == 1) {
+              return 'success'
+            } else if (params == 2) {
+              return 'danger'
+            } else if (params == 3) {
+              return 'info'
+            } else if (params == 4) {
+              return ''
+            } else {
+              return null
+            }
+          }
+        },
+        { label: '璁㈠崟鍙�', prop: 'orderNo' },
+        { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'purQtyInStore', width: '130px' },
+        { label: '涓嬪彂鏃堕棿', prop: 'sendTime', width: '130px' },
+        { label: '鎵瑰彿', prop: 'updateBatchNo', width: '130px' },
+        { label: '闆朵欢鍙�', prop: 'partNo', width: '140px' },
+        { label: '闆朵欢鎻忚堪', prop: 'partDesc' },
+        { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName' },
+        {
+          dataType: 'tag',
+          label: '鍏嶆',
+          prop: 'isExemption',
+          formatData: (params) => {
+            if (params == 1) {
+              return '鍏嶆'
+            } else {
+              return null
+            }
+          },
+          formatType: (params) => {
+            if (params == 1) {
+              return 'success'
+            } else {
+              return null
+            }
+          }
+        },
+        {
+          label: '鏍峰搧鍚嶇О',
+          prop: 'sampleName',
+          width: "160px",
+        },
+        { label: '鏍峰搧鍨嬪彿', prop: 'sampleModel' },
+        { label: '妫�楠屼汉', prop: 'userName' },
+        {
+          label: '鐗╂枡灞炴��',
+          prop: 'materialProp',
+          formatData: (params) => {
+            if (!params) return null
+
+            for (let i = 0; i < this.dict.type.material_prop_type.length; i++) {
+              const item = this.dict.type.material_prop_type[i]
+              if (item.value == params) {
+                return item.label
+              }
+            }
+            return null
+          }
+        },
+        {
+          dataType: 'tag',
+          label: '鐗╂枡绫诲瀷',
+          prop: 'isExpire',
+          formatData: (params) => {
+            if (params == 1) {
+              return '杩囨湡鐗╂枡'
+            } else {
+              return null
+            }
+          },
+          formatType: (params) => {
+            if (params == 1) {
+              return 'info'
+            } else {
+              return null
+            }
+          }
+        },
+        { label: '鍗曚綅', prop: 'buyUnitMeas' },
+        { label: '鎺ユ敹鏃堕棿', prop: 'receiverDate' },
+        { label: '鎶ユ鏃堕棿', prop: 'declareDate' },
+      ],
+      wgInsOrderPage:{
+        total: 0,
+        size: 20,
+        current: 1
+      },
+      wgInsOrderTableLoading:false,
+      wgInsOrderDataList:[],
       handlerId: null,
       contract:null,
       entity: {
@@ -372,8 +530,8 @@
         { label: '鐗╂枡鍚嶇О', prop: 'materialName',width: "160px" },
         { label: '鐢熶骇鎵规', prop: 'productionBatch',width: "160px" },
         { label: '鍒拌揣鏁伴噺', prop: 'cargoQuantity' },
-        { label: '瑙勬牸鍨嬪彿', prop: 'specsModels' },
-        { label: '鎶ユ鏃ユ湡', prop: 'inspectTime' },
+        { label: '瑙勬牸鍨嬪彿', prop: 'specsModels',width:'140' },
+        { label: '鎶ユ鏃ユ湡', prop: 'inspectTime',width:'120' },
         { label: '鐘舵��', prop: 'statusDB' },
         { label: '鍙嶉浜�', prop: 'feedbackUser' },
         { label: '瑕佹楠岀殑閲囪喘鏁伴噺', prop: 'qtyToInspect',width: "140px" },
@@ -384,47 +542,48 @@
           width: "100px",
           dataType: "tag",
           formatData: (params) => {
-            if (params == 0) {
-              return "涓�绫讳笉鍚堟牸";
-            } else if(params == 1) {
-              return "浜岀被涓嶅悎鏍�";
-            } else {
-              return null
-            }
+            let label = null
+            this.dict.type.categories_no_conformities.forEach(item=>{
+              if(item.raw.dictValue==params){
+                label = item.raw.dictLabel
+              }
+            })
+            return label
           },
           formatType: (params) => {
-            if (params == 0) {
-              return "warning";
-            } else if(params == 1) {
-              return "info";
-            } else {
-              return "null";
-            }
+            let type = null
+            this.dict.type.categories_no_conformities.forEach(item=>{
+              if(item.raw.dictValue==params){
+                type =  item.raw.listClass
+              }
+            })
+            return type
           },
         },
-        { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName' },
+        { label: '渚涘簲鍟嗙紪鐮�', prop: 'supplierId',width:'140' },
+        { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName',width:'140' },
         {
           label: "涓嶅悎鏍煎綊灞�",
           prop: "offGradeAscription",
           width: "120px",
           dataType: "tag",
           formatData: (params) => {
-            if (params == 0) {
-              return "妫�娴嬩笉鍚堟牸";
-            } else if(params == 1) {
-              return "鐢熶骇鍙嶉涓嶅悎鏍�";
-            } else {
-              return null
-            }
+            let label = params
+            this.dict.type.attribution_no_conformities.forEach(item=>{
+              if(item.raw.dictValue==params){
+                label = item.raw.dictLabel
+              }
+            })
+            return label
           },
           formatType: (params) => {
-            if (params == 0) {
-              return "danger";
-            } else if(params == 1) {
-              return "warning";
-            } else {
-              return "null";
-            }
+            let type = null
+            this.dict.type.attribution_no_conformities.forEach(item=>{
+              if(item.raw.dictValue==params){
+                type = item.raw.listClass
+              }
+            })
+            return type
           },
         },
         { label: '涓嶅悎鏍兼弿杩�', prop: 'unqualifiedDesc',width: "160px" },
@@ -479,7 +638,8 @@
       submitOALoading: false, // OA娴佺▼寮规鎻愪氦鎸夐挳loading
       deleteVisible: false, // OA娴佺▼鍒犻櫎寮规
       cancelOALoading: false, // OA娴佺▼鍒犻櫎寮规鎻愪氦鎸夐挳loading
-      exportLoading:false
+      exportLoading:false,
+      isOldData: true,//鏄惁鏄棫鏁版嵁
     };
   },
   mounted() {
@@ -518,9 +678,21 @@
       return this.isDisabledInsOrderRow(row) ? 'disabled-selection-row' : ''
     },
     resetInsOrderForm(){
+      this.activeName = 'raw'
       this.insOrderDataList = []
+      this.wgInsOrderDataList = []
       this.lotBatchNo = null
       this.orderId = ''
+      this.insOrderPage = {
+        total: 0,
+        size: 20,
+        current: 1,
+      }
+      this.wgInsOrderPage = {
+        total: 0,
+        size: 20,
+        current: 1,
+      }
       this.$nextTick(()=>{
         this.insOrderVisible = false
       })
@@ -533,23 +705,38 @@
       const params = {
         updateBatchNo: this.lotBatchNo,
         isInspect: 1,
-        ...this.insOrderPage
       }
-      getIfsByAll(params).then(res => {
-        this.insOrderTableLoading = false
-        if (res.code === 200) {
-          this.insOrderDataList = res.data.records
-          this.insOrderPage.total = res.data.total
-        }
-      }).catch(err => {
-        this.insOrderTableLoading = false
-      })
+      if(this.activeName==='raw'){
+        getIfsByAll({...params,...this.insOrderPage}).then(res => {
+          this.insOrderTableLoading = false
+          if (res.code === 200) {
+            this.insOrderDataList = res.data.records
+            this.insOrderPage.total = res.data.total
+          }
+        }).catch(err => {
+          this.insOrderTableLoading = false
+        })
+      }else if(this.activeName==='wg'){
+        getIfsByWgAll({...params,...this.wgInsOrderPage}).then(res => {
+          this.insOrderTableLoading = false
+          if (res.code === 200) {
+            this.wgInsOrderDataList = res.data.records
+            this.wgInsOrderPage.total = res.data.total
+          }
+        }).catch(err => {
+          this.insOrderTableLoading = false
+        })
+      }
     },
     insOrderPageination(page){
       this.insOrderPage.size = page.limit
       this.searchInsOrderList()
     },
-    selectMethod(val){
+    wgInsOrderPageination(page){
+      this.wgInsOrderPage.size = page.limit
+      this.searchInsOrderList()
+    },
+    selectRawMethod(val){
       if (!val || val.length === 0) {
         this.orderId = ''
         return
@@ -558,9 +745,23 @@
       const currentRow = val[val.length - 1]
       this.orderId = this.getInsOrderRowId(currentRow)
 
-      if (val.length > 1 && this.$refs.insOrderTable && this.$refs.insOrderTable.$refs.multipleTable) {
-        this.$refs.insOrderTable.$refs.multipleTable.clearSelection()
-        this.$refs.insOrderTable.$refs.multipleTable.toggleRowSelection(currentRow, true)
+      if (val.length > 1 && this.$refs.rawInsOrderTable && this.$refs.rawInsOrderTable.$refs.multipleTable) {
+        this.$refs.rawInsOrderTable.$refs.multipleTable.clearSelection()
+        this.$refs.rawInsOrderTable.$refs.multipleTable.toggleRowSelection(currentRow, true)
+      }
+    },
+    selectWgMethod(val){
+      if (!val || val.length === 0) {
+        this.orderId = ''
+        return
+      }
+
+      const currentRow = val[val.length - 1]
+      this.orderId = this.getInsOrderRowId(currentRow)
+
+      if (val.length > 1 && this.$refs.wgInsOrderTable && this.$refs.wgInsOrderTable.$refs.multipleTable) {
+        this.$refs.wgInsOrderTable.$refs.multipleTable.clearSelection()
+        this.$refs.wgInsOrderTable.$refs.multipleTable.toggleRowSelection(currentRow, true)
       }
     },
     //鎵撳紑鏂板涓嶅悎鏍煎鐞嗗脊妗�
@@ -666,6 +867,7 @@
     // 鏌ョ湅OA娴佺▼
     OAView (row) {
       this.OAProcess = true
+      this.isOldData = row.isOldData
       this.$nextTick(() => {
         this.$refs.OAProcess.getInfo(row.handlerId,row?row.unqualifiedDesc:"")
       })

--
Gitblit v1.9.3