From dc3af0cbb4a6d105bdff497b510cc0a87b3e8d0a Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期五, 28 二月 2025 17:53:44 +0800
Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/lims-ruoyi-before into dev

---
 src/views/business/rawMaterialInspection/index.vue |  125 ++++++++++++++++++++++++++++++-----------
 1 files changed, 92 insertions(+), 33 deletions(-)

diff --git a/src/views/business/rawMaterialInspection/index.vue b/src/views/business/rawMaterialInspection/index.vue
index 3430970..7573f89 100644
--- a/src/views/business/rawMaterialInspection/index.vue
+++ b/src/views/business/rawMaterialInspection/index.vue
@@ -79,6 +79,7 @@
       <!--寰呮姤妫�銆佸緟涓嬪崟-->
       <div class="table">
         <lims-table :tableData="tableData" :column="column" v-if="tabIndex === 0 || tabIndex === 1"
+                    :isSelection="true" :handleSelectionChange="selectMethod"
                     @pagination="pagination" :height="'calc(100vh - 290px)'"
                     :page="page" :tableLoading="tableLoading"></lims-table>
       </div>
@@ -179,7 +180,7 @@
 </template>
 
 <script>
-import DataLookVisible from "@/components/rawMaterialInspection/dataLookVisible.vue";
+import DataLookVisible from "@/views/business/materialOrderComponents/materialOrder/dataLookVisible.vue";
 import {
   addIfsInventoryQuantity,
   advancedGodown,
@@ -201,7 +202,41 @@
       tableData: [],
       tableLoading: false,
       column: [
-        {label: '妫�楠岀姸鎬�', prop: 'inspectStatus'},
+        {
+          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: 'qtyArrived',width: '140px',},
         {label: '鎵瑰彿', prop: 'updateBatchNo'},
@@ -216,14 +251,14 @@
             if (params == 1) {
               return '杩囨湡鐗╂枡'
             } else {
-              return ''
+              return null
             }
           },
           formatType: (params) => {
             if (params == 1) {
               return 'info'
             } else {
-              return ''
+              return null
             }
           }
         },
@@ -232,9 +267,7 @@
         {label: '鎶ユ鏃堕棿', prop: 'declareDate'},
         {
           dataType: 'action',
-          fixed: 'right',
           label: '鎿嶄綔',
-          width: '150px',
           operation: [
             {
               name: '鎶ユ',
@@ -278,7 +311,41 @@
       tableLoading1: false,
       column1: [
         {label: '濮旀墭缂栧彿', prop: 'entrustCode'},
-        {label: '妫�楠岀姸鎬�', prop: 'inspectStatus'},
+        {
+          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: 'qtyArrived'},
         {label: '涓嬪彂鏃堕棿', prop: 'sendTime'},
@@ -299,14 +366,14 @@
             if (params == 1) {
               return '杩囨湡鐗╂枡'
             } else {
-              return ''
+              return null
             }
           },
           formatType: (params) => {
             if (params == 1) {
               return 'info'
             } else {
-              return ''
+              return null
             }
           }
         },
@@ -317,7 +384,6 @@
           dataType: 'action',
           fixed: 'right',
           label: '鎿嶄綔',
-          width: '140px',
           operation: [
             {
               name: '鏁版嵁鏌ョ湅',
@@ -483,7 +549,7 @@
     // 寰呮姤妫�銆佸緟涓嬪崟鏌ヨ
     getWarehouseSubmitApi () {
       this.tableLoading = true
-      const params = {...this.componentData, isInspect: this.tabIndex, state: this.tabIndex === 0 ? null : 0}
+      const params = {...this.componentData, isInspect: this.tabIndex, state: this.tabIndex === 0 ? null : 0, ...this.page}
       getWarehouseSubmit(params).then(res => {
         this.tableLoading = false
         if (res.code === 200) {
@@ -497,7 +563,7 @@
     // 宸插畬鎴愰儴鏌ヨ
     getIfsByFinishList () {
       this.tableLoading1 = true
-      getIfsByFinish({...this.componentData}).then(res => {
+      getIfsByFinish({...this.componentData, ...this.page1}).then(res => {
         this.tableLoading1 = false
         if (res.code === 200) {
           this.tableData1 = res.data.records
@@ -510,7 +576,7 @@
     // 鍏ㄩ儴鏌ヨ
     getIfsByAllList () {
       this.tableLoading1 = true
-      getIfsByAll({...this.componentData}).then(res => {
+      getIfsByAll({...this.componentData, ...this.page1}).then(res => {
         this.tableLoading1 = false
         if (res.code === 200) {
           this.tableData1 = res.data.records
@@ -552,8 +618,8 @@
     },
     // 鏁版嵁鏌ョ湅
     handleDataLook(row) {
-      this.dataDialogVisible = true;
       this.dataLookInfo = row
+      this.dataDialogVisible = true;
     },
     // 鐩存帴鏀捐
     goPass (row) {
@@ -568,7 +634,7 @@
               type: 'success',
               message: '鏀捐鎴愬姛!'
             });
-            this.refresh()
+            this.refreshTable()
           }
         })
       }).catch(() => {
@@ -591,7 +657,7 @@
               type: 'success',
               message: '鎿嶄綔鎴愬姛!'
             });
-            this.refresh()
+            this.refreshTable()
           }
         })
       }).catch(() => {
@@ -630,7 +696,7 @@
         if (res.code === 200) {
           this.declareDialogSVisible = false
           this.$message.success('鎶ユ鎴愬姛')
-          this.refresh()
+          this.refreshTable()
         }
         this.submitDeclareLoading = false
       }).catch(err => {
@@ -653,7 +719,7 @@
               if (res.code === 200) {
                 this.declareDialogVisible = false
                 this.$message.success('鎶ユ鎴愬姛')
-                this.refresh()
+                this.refreshTable()
               }
             }).catch(err => {
               console.log(err)
@@ -673,7 +739,7 @@
               if (res.code === 200) {
                 this.declareDialogVisible = false
                 this.$message.success('鎶ユ鎴愬姛')
-                this.refresh()
+                this.refreshTable()
               }
             }).catch(err => {
               console.log(err)
@@ -698,11 +764,9 @@
     submitDelete () {
       this.deleteLoading = true
       delIfsInventory({id: this.deleteInfo.id}).then(res => {
-        if (res.code === 200) {
-          this.deleteVisible = false
-          this.$message.success('鍒犻櫎鎴愬姛')
-          this.refresh()
-        }
+        this.deleteVisible = false
+        this.$message.success('鍒犻櫎鎴愬姛')
+        this.refreshTable()
         this.deleteLoading = false
       }).catch(err => {
         console.log(err)
@@ -717,7 +781,7 @@
     openIFS() {
       this.btnLoading = true
       getIfsOrder().then(res => {
-        this.refresh()
+        this.refreshTable()
         this.btnLoading = false
       }).catch(err => {
         this.btnLoading = false
@@ -731,16 +795,11 @@
       this.outLoading = true
       rawAllExport({
         entity:entity
-      },{
-        responseType: "blob"}).then(res => {
+      }).then(res => {
         this.outLoading = false
         this.$message.success('瀵煎嚭鎴愬姛')
-        const blob = new Blob([res],{ type: 'application/octet-stream' });
-        const url = URL.createObjectURL(blob);
-        const link = document.createElement('a');
-        link.href = url;
-        link.download = '鍘熸潗鏂欐娴嬩俊鎭鍑�.xlsx';
-        link.click();
+        let url = this.javaApi + '/word/' + res.data
+        this.$download.saveAs(url, "鍘熸潗鏂欐娴嬩俊鎭鍑�.xlsx");
       })
     },
     clear() {

--
Gitblit v1.9.3