From f6082c04ca8c98c1f130d88585d8e7cf67175279 Mon Sep 17 00:00:00 2001
From: chenrui <1187576398@qq.com>
Date: 星期三, 05 三月 2025 17:41:54 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev

---
 src/views/business/materialOrder/index.vue |  118 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 110 insertions(+), 8 deletions(-)

diff --git a/src/views/business/materialOrder/index.vue b/src/views/business/materialOrder/index.vue
index 783010f..4b4bbc4 100644
--- a/src/views/business/materialOrder/index.vue
+++ b/src/views/business/materialOrder/index.vue
@@ -359,8 +359,42 @@
       tableData2: [],
       tableLoading2: false,
       column2: [
-        { label: '濮旀墭缂栧彿', prop: 'entrustCode' },
-        { label: '妫�楠岀姸鎬�', prop: 'inspectStatus' },
+        { 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: 'qtyArrived' },
         { label: '涓嬪彂鏃堕棿', prop: 'sendTime' },
@@ -472,8 +506,42 @@
       tableData3: [],
       tableLoading3: false,
       column3: [
-        { label: '濮旀墭缂栧彿', prop: 'entrustCode' },
-        { label: '妫�楠岀姸鎬�', prop: 'inspectStatus' },
+        { 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: 'qtyArrived' },
         { label: '涓嬪彂鏃堕棿', prop: 'sendTime' },
@@ -538,8 +606,42 @@
       tableData4: [],
       tableLoading4: false,
       column4: [
-        { label: '濮旀墭缂栧彿', prop: 'entrustCode' },
-        { label: '妫�楠岀姸鎬�', prop: 'inspectStatus' },
+        { 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: 'qtyArrived' },
         { label: '涓嬪彂鏃堕棿', prop: 'sendTime' },
@@ -1077,8 +1179,8 @@
       this.outLoading = true
       rawAllExport({ entity: entity }).then(res => {
         this.outLoading = false
-        let url = this.javaApi + '/word/' + res.data
-        this.$download.saveAs(url, '鍘熸潗鏂欐娴嬩俊鎭鍑�.xlsx');
+        const blob = new Blob([res], { type: 'application/octet-stream' });
+        this.$download.saveAs(blob, '鍘熸潗鏂欐娴嬩俊鎭鍑�.xlsx');
       })
     },
     // 鎻愪氦淇敼濮旀墭缂栧彿淇℃伅

--
Gitblit v1.9.3