From 6f2b0cab4c9a4dacfebb2d6fbd4ec2fdc14e22ba Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 29 四月 2024 15:29:58 +0800
Subject: [PATCH] 2024-04-29

---
 src/tabviews/zshare/actionList/exceloutbutton/index.jsx |   26 ++++++++++++++++++++++----
 1 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
index 9899496..f16a983 100644
--- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
@@ -605,6 +605,15 @@
               }
             }
 
+            if (val !== '') {
+              if (col.prefix) {
+                val = col.prefix + val
+              }
+              if (col.postfix) {
+                val = val + col.postfix
+              }
+            }
+
             _row[col.Column] = val
           })
   
@@ -707,6 +716,15 @@
               }
             }
 
+            if (val !== '') {
+              if (col.prefix) {
+                val = col.prefix + val
+              }
+              if (col.postfix) {
+                val = val + col.postfix
+              }
+            }
+
             _row[col.Column] = val
           })
   
@@ -762,7 +780,7 @@
         const wb = XLSX.utils.book_new()
         XLSX.utils.book_append_sheet(wb, ws, btn.verify.sheet || 'Sheet1')
   
-        XLSX.writeFile(wb, `${btn.$menuName || ''}${moment().format('YYYYMMDDHHmmss')}.xlsx`)
+        XLSX.writeFile(wb, `${btn.verify.excelName || btn.$menuName || ''}${moment().format('YYYYMMDDHHmmss')}.xlsx`)
   
         this.execSuccess({ErrCode: ErrCode || 'S', message: msg || '瀵煎嚭鎴愬姛锛�'})
       }
@@ -860,9 +878,9 @@
       _setting.arr_field = []
 
       btn.verify.columns.forEach(col => {
-        if (col.Column && col.Column !== '$Index') {
-          _setting.arr_field.push(col.Column)
-        }
+        if (col.output === 'false' || !col.Column || col.Column === '$Index') return
+        
+        _setting.arr_field.push(col.Column)
       })
       _setting.arr_field = _setting.arr_field.join(',')
       _setting.execute = btn.verify.defaultSql !== 'false'

--
Gitblit v1.8.0