From 10bd1c0bbba80d86313b86559546557b2bdbc920 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 20 二月 2025 10:21:13 +0800
Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/lims-ruoyi-before into dev

---
 src/views/business/productOrder/index.vue |  342 +++++++++++++++++++++++++++++++--------------------------
 1 files changed, 186 insertions(+), 156 deletions(-)

diff --git a/src/views/business/productOrder/index.vue b/src/views/business/productOrder/index.vue
index d562f24..ad315e7 100644
--- a/src/views/business/productOrder/index.vue
+++ b/src/views/business/productOrder/index.vue
@@ -64,7 +64,7 @@
     <div class="table">
       <lims-table :tableData="tableData" :column="column"
                   :isSelection="true" :handleSelectionChange="selectMethod"
-                  @pagination="pagination" :height="'calc(100vh - 290px)'" key="tableData"
+                  @pagination="pagination" :height="'calc(100vh - 280px)'" key="tableData"
                   :page="page" :tableLoading="tableLoading"></lims-table>
     </div>
     <div>
@@ -148,34 +148,33 @@
 				</span>
       </el-dialog>
       <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"/>
+        <div v-if="dataDialogVisible">
+          <lims-table :tableData="tableDataLook" :column="tableDataLookColumn"
+                      @pagination="tableDataLookPagination" height="500px" key="tableDataLook"
+                      :page="tableDataLookPage" :tableLoading="tableDataLookTableLoading"></lims-table>
         </div>
       </el-dialog>
       <el-dialog :visible.sync="filesDialogVisible" title="闄勪欢鏌ョ湅" width="80%">
-        <div v-if="filesDialogVisible" style="height: 70vh;overflow-y: auto;">
-          <ValueTable :key="upIndex" ref="fileList"
-                      :componentData="componentData0"
-                      :url="$api.insOrderPlan.getFileList"
-                      class="value-table"/>
+        <div v-if="filesDialogVisible">
+          <lims-table :tableData="tableDataFile" :column="columnFile"
+                      @pagination="paginationFile" height="500px" key="tableDataFile"
+                      :page="pageFile" :tableLoading="tableLoadingFile"></lims-table>
         </div>
       </el-dialog>
       <el-dialog :title="deleteTilte" :visible.sync="deleteDialogVisible" width="80%">
         <div v-if="deleteDialogVisible" style="height: 70vh;overflow-y: auto;">
-          <ValueTable ref="ValueTableDataDelete" :componentData="componentDataDelete"
-                      :isColumnWidth="true" :url="$api.insOrder.selectNoProducts+'?orderId='+orderId+'&ids='+this.revocationInsProductIds"/>
+          <lims-table :tableData="componentDataDelete" :column="columnDelete"
+                      :isSelection="true" :handleSelectionChange="selectDelete"
+                      @pagination="paginationDelete" height="500px" key="componentDataDelete"
+                      :page="pageDelete" :tableLoading="tableLoadingDelete"></lims-table>
         </div>
         <span slot="footer" class="dialog-footer">
-        <el-row>
-          <el-button @click="handleNo">{{deleteTilte=='鎾ら攢'?'鍙� 娑�':'涓嶉�氳繃'}}</el-button>
-          <el-button :loading="printLoading" type="primary" @click="submitDelete">{{deleteTilte=='鎾ら攢'?'纭� 瀹�':'閫� 杩�'}}</el-button>
-        </el-row>
-      </span>
+          <el-row>
+            <el-button @click="handleNo">{{deleteTilte=='鎾ら攢'?'鍙� 娑�':'涓嶉�氳繃'}}</el-button>
+            <el-button :loading="printLoading" type="primary" @click="submitDelete">{{deleteTilte=='鎾ら攢'?'纭� 瀹�':'閫� 杩�'}}</el-button>
+          </el-row>
+        </span>
       </el-dialog>
-    </div>
-    <div>
-<!--      <Add v-if="active<4" :active="active" :currentId="currentId" :examine = "examine" :tabIndex="tabIndex" />-->
     </div>
     <el-dialog :visible.sync="printDialogVisible" title="鏍囩鎵撳嵃" top="5vh" width="40%">
       <div v-loading="loadPint" style="width:100%;height: 400px;overflow-y: auto;">
@@ -307,17 +306,15 @@
 import PrintDialog from "@/views/business/productOrder/components/printDialog.vue";
 import AddInspectionDia from "@/views/business/productOrder/components/addInspectionDia.vue";
 import limsTable from "@/components/Table/lims-table.vue";
-import {getWarehouseSubmit} from "@/api/business/materialInspection";
 import {
   checkUpdate, delInsOrder,
   rawAllInsOrderExport,
-  selectInsOrderParameter, selectOrderManDay,
+  selectInsOrderParameter, selectNoProducts, selectOrderManDay,
   updateInspected,
   updateOrderEntrustCode, updateStatus, upInsOrder, upPlanUser2
 } from "@/api/business/productOrder";
-import {Message} from "element-ui";
 import {selectUserCondition} from "@/api/performance/class";
-import {downFile} from "@/api/business/rawMaterialOrder";
+import {downFile, getFileList, selectSampleAndProductByOrderId} from "@/api/business/rawMaterialOrder";
 // import Inspection from "../do/b1-inspect-order-plan/Inspection.vue";
 export default {
   components: {
@@ -533,7 +530,104 @@
       quashDialogVisible: false,
       issuedDialogVisible: false,
       dataDialogVisible: false, // 鏁版嵁鏌ョ湅寮规
+      tableDataLookTableLoading: false, // 鏁版嵁鏌ョ湅寮规
+      tableDataLook: [],
+      tableDataLookPage: {
+        total:0,
+        size:10,
+        current:1
+      },
+      tableDataLookColumn: [
+        {label: '鏍峰搧缂栧彿', prop: 'sampleCode'},
+        {label: '鏍峰搧鍚嶇О', prop: 'sample'},
+        {label: '妫�楠岄」鍒嗙被', prop: 'inspectionItemClass'},
+        {label: '妫�楠岄」', prop: 'inspectionItem'},
+        {label: '妫�楠屽瓙椤�', prop: 'inspectionItemSubclass'},
+        {label: '鍗曚綅', prop: 'unit'},
+        {label: '鏍峰搧鍨嬪彿', prop: 'model'},
+        {label: '鏉′欢', prop: 'radius'},
+        {label: '鐢电紗鏍囪瘑', prop: 'cableTag'},
+        {label: '璇曢獙瑕佹眰', prop: 'tell'},
+        {label: '妫�楠岀粨鏋�', prop: 'lastValue'},
+        {
+          dataType: 'tag',
+          label: '缁撴灉鍒ゅ畾',
+          prop: 'insResult',
+          formatData: (params) => {
+            if (params == 1) {
+              return '鍚堟牸'
+            } else if (params == 0) {
+              return '涓嶅悎鏍�'
+            } else if (params == 3) {
+              return '涓嶅垽瀹�'
+            } else {
+              return ''
+            }
+          },
+          formatType: (params) => {
+            if (params == 1) {
+              return 'success'
+            } else if (params == 0) {
+              return 'danger'
+            } else if (params == 3) {
+              return ''
+            }  else {
+              return ''
+            }
+          }
+        },
+      ],
       filesDialogVisible: false, // 闄勪欢鏌ョ湅寮规
+      tableDataFile: [],
+      tableLoadingFile: false,
+      columnFile: [
+        {
+          dataType: 'tag',
+          label: '绫诲瀷',
+          prop: 'type',
+          formatData: (params) => {
+            if (params == 1) {
+              return '鍥剧墖'
+            } else if (params == 2) {
+              return '鏂囦欢'
+            } else {
+              return ''
+            }
+          },
+          formatType: (params) => {
+            if (params == 1) {
+              return 'success'
+            } else if (params == 2) {
+              return 'warning'
+            } else {
+              return ''
+            }
+          }
+        },
+        {label: '闄勪欢鍚嶇О', prop: 'fileName'},
+        {label: '涓婁紶浜�', prop: 'name'},
+        {label: '涓婁紶鏃堕棿', prop: 'createTime'},
+        {
+          dataType: 'action',
+          fixed: 'right',
+          label: '鎿嶄綔',
+          width: '170px',
+          operation: [
+            {
+              name: '涓嬭浇',
+              type: 'text',
+              clickFun: (row) => {
+                this.handleDown(row);
+              }
+            }
+          ]
+        }
+      ],
+      pageFile: {
+        total:0,
+        size:10,
+        current:1
+      },
       formData: {},
       formData0: {},
       formData1: {},
@@ -551,130 +645,25 @@
       personList: [],
       orderId:'',
       revocationInsProductIds:'',
-      componentDataDataLook: {
-        entity: {
-          id: 0,
-          orderBy: {
-            field: 'sampleCode',
-            order: 'asc'
-          }
-        },
-        isIndex: false,
-        showSelect: false,
-        select: false,
-        do: [],
-        tagField: {
-          insState: {
-            select: []
-          },
-          insResult: {
-            select: [{
-              value: 1,
-              label: '鍚堟牸',
-              type: 'success'
-            },{
-              value: 0,
-              label: '涓嶅悎鏍�',
-              type: 'danger'
-            },{
-              value: 3,
-              label: '涓嶅垽瀹�',
-              type: ''
-            }]
-          }
-        },
-        selectField: {},
-        spanConfig:{
-          rows:[
-            {
-              name:'sampleCode',
-              index:0
-            },
-            {
-              name:'sample',
-              index:1
-            },
-            {
-              name:'model',
-              index:6
-            }
-          ]
-        },
-        requiredAdd: [],
-        requiredUp: []
-      },
-      componentData0: {
-        entity: {
-          insOrderId:''
-        },
-        isIndex: true,
-        showSelect: false,
-        select: false,
-        sort: false,
-        init:false,
-        do: [
-          {
-            id: 'parent',
-            font: '涓嬭浇',
-            type: 'text',
-            method: 'handleDown'
-          }
-        ],
-        isPage: false,
-        linkEvent: {},
-        tagField: {
-          type:{
-            select:[
-              {
-                value: 1,
-                label: '鍥剧墖'
-              },
-              {
-                value: 2,
-                label: '鏂囦欢'
-              }
-            ]
-          }
-        },
-        currentId: '',
-        selectField: {},
-        requiredAdd: [],
-        requiredUp: []
-      },
-      componentDataDelete: {
-        entity: {
-          // orderId: '',
-          // orderBy: {
-          // 	field: 'sampleCode',
-          // 	order: 'asc'
-          // }
-        },
-        isPage:true,
-        isIndex: false,
-        showSelect: true,
-        select: true,
-        selectMethod: 'selectDelete',
-        do: [],
-        tagField: {
-          insState: {
-            select: []
-          },
-          insResult: {
-            select: [{
-              value: 1,
-              label: '鍚堟牸',
-              type: 'success'
-            },{
-              value: 0,
-              label: '涓嶅悎鏍�',
-              type: 'danger'
-            }]
-          }
-        },
-        selectField: {},
-        spanConfig:{},
-        requiredAdd: [],
-        requiredUp: []
+      componentDataDelete: [],
+      tableLoadingDelete: false,
+      columnDelete: [
+        {label: '鏍峰搧缂栧彿', prop: 'sampleCode'},
+        {label: '妫�楠岄」鍒嗙被', prop: 'inspectionItemClass'},
+        {label: '妫�楠岄」', prop: 'inspectionItem'},
+        {label: '妫�楠岄」瀛愮被', prop: 'inspectionItemSubclass'},
+        {label: '鏍峰搧鍒嗙被', prop: 'sampleType'},
+        {label: '鏍峰搧', prop: 'sample'},
+        {label: '鍨嬪彿', prop: 'model'},
+        {label: '绾胯姱', prop: 'cableTag'},
+        {label: '璇曢獙瀹�', prop: 'sonLaboratory'},
+        {label: '瑕佹眰鍊�', prop: 'ask'},
+        {label: '瑕佹眰鎻忚堪', prop: 'tell'},
+      ],
+      pageDelete: {
+        total:0,
+        size:10,
+        current:1
       },
       deleteDialogVisible:false,
       upLoad: false,
@@ -935,16 +924,46 @@
     },
     // 鏁版嵁鏌ョ湅
     handleDataLook(row) {
-      this.componentDataDataLook.entity.id = row.id
       this.dataDialogVisible = true;
+      this.getDataTableList(row)
+    },
+    // 鏌ヨ鏁版嵁鏌ョ湅鍒楄〃鏁版嵁
+    getDataTableList (row) {
+      this.tableDataLookTableLoading = true
+      selectSampleAndProductByOrderId({id: row.id}).then(res => {
+        this.tableDataLookTableLoading = false
+        if (res.code === 200) {
+          this.tableDataLook = res.data.records
+          this.tableDataLookPage.total = res.data.total
+        }
+      }).catch(err => {
+        this.tableDataLookTableLoading = false
+      })
+    },
+    tableDataLookPagination (page) {
+      this.tableDataLookPage.size = page.limit
+      this.getDataTableList()
     },
     // 闄勪欢鏌ョ湅
     handleFileLook (row) {
-      this.componentData0.entity.insOrderId = row.id;
       this.filesDialogVisible = true
-      this.$nextTick(() => {
-        this.$refs.fileList.selectList()
+      this.getFileList(row)
+    },
+    getFileList(row) {
+      this.tableLoadingFile = true
+      getFileList({insOrderId: row.id}).then(res => {
+        this.tableLoadingFile = false
+        if (res.code === 200) {
+          this.tableDataFile = res.data.records
+          this.pageFile.total = res.data.total
+        }
+      }).catch(err => {
+        this.tableLoadingFile = false
       })
+    },
+    paginationFile (page) {
+      this.pageFile.size = page.limit
+      this.getFileList()
     },
     // 闄勪欢涓嬭浇
     handleDown(row){
@@ -993,14 +1012,26 @@
         this.quashDialogVisible = true;
         this.insOrderRow=row
       }else{
-        // this.componentDataDelete.entity.orderId = row.id
         this.orderId = row.id
         this.revocationInsProductIds = ''
-        this.componentDataDelete.showSelect= true
-        this.componentDataDelete.select= true
         this.deleteTilte = '鎾ら攢'
-        this.deleteDialogVisible = true;
+        this.deleteDialogVisible = true
+        this.getDeleteList()
       }
+    },
+    getDeleteList () {
+      this.tableLoadingDelete = true
+      selectNoProducts({orderId: this.orderId, revocationInsProductIds: this.revocationInsProductIds}).then(res => {
+        this.tableLoadingDelete = false
+        this.componentDataDelete = res.data.records
+        this.pageDelete.total = res.data.total
+      }).catch(err => {
+        this.tableLoadingDelete = false
+      })
+    },
+    paginationDelete (page) {
+      this.pageDelete.size = page.limit
+      this.getDeleteList()
     },
     selectDelete(arr){
       this.deleteList = arr;
@@ -1033,7 +1064,6 @@
       }
     },
     handlEquashCheck(row){
-      // this.componentDataDelete.entity.orderId = row.id
       this.orderId = row.id
       this.revocationInsProductIds = row.revocationInsProductIds
       this.componentDataDelete.showSelect= false

--
Gitblit v1.9.3