From 8b6f9a84e5eb704b25c105cce31904381bd81107 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 29 十一月 2022 18:41:58 +0800
Subject: [PATCH] 2022-11-29

---
 src/tabviews/zshare/actionList/excelInbutton/index.jsx |   81 +++++++++++++++++++++++++++++++++++-----
 1 files changed, 70 insertions(+), 11 deletions(-)

diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
index 97a19f4..09ee076 100644
--- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
@@ -14,6 +14,8 @@
 import MkIcon from '@/components/mk-icon'
 // import './index.scss'
 
+const { confirm } = Modal
+
 class ExcelInButton extends Component {
   static propTpyes = {
     BID: PropTypes.string,            // 涓昏〃ID
@@ -337,29 +339,86 @@
       
       param.excel_in_type = 'true'
       param.LText1 = Utils.formatOptions(result.insert)
-      param.LText2 = Utils.formatOptions(result.bottom)
-      param.LText = Utils.formatOptions(result.sql)
       param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+      param.LText2 = result.bottom
+      param.LText = result.sql
+
+      let unCheckParam = null
+
+      if (/\$check@|@check\$/ig.test(param.LText2) || /\$check@|@check\$/ig.test(param.LText)) {
+        unCheckParam = fromJS(param).toJS()
+        param.LText = param.LText.replace(/\$check@|@check\$/ig, '')
+        param.LText2 = param.LText2.replace(/\$check@|@check\$/ig, '')
+      }
+
+      param.LText2 = Utils.formatOptions(param.LText2)
+      param.LText = Utils.formatOptions(param.LText)
       param.secretkey = Utils.encrypt(param.LText, param.timestamp)
       if (window.GLOB.mkHS && param.timestamp) { // 浜戠楠岃瘉
         param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp)
       }
 
       param.menuname = btn.logLabel
-
+      
       if (window.GLOB.probation) {
         param.s_debug_type = 'Y'
       }
 
-      Api.genericInterface(param).then((res) => {
-        if (res.status) {
-          this.execSuccess(res)
-        } else {
-          this.execError(res)
+      if (unCheckParam) {
+        unCheckParam.LText = unCheckParam.LText.replace(/\$check@/ig, '/*').replace(/@check\$/ig, '*/')
+        unCheckParam.LText = Utils.formatOptions(unCheckParam.LText)
+        unCheckParam.LText2 = unCheckParam.LText2.replace(/\$check@/ig, '/*').replace(/@check\$/ig, '*/')
+        unCheckParam.LText2 = Utils.formatOptions(unCheckParam.LText2)
+
+        unCheckParam.secretkey = Utils.encrypt(unCheckParam.LText, unCheckParam.timestamp)
+
+        unCheckParam.menuname = btn.logLabel
+
+        if (window.GLOB.probation) {
+          unCheckParam.s_debug_type = 'Y'
         }
-      }, () => {
-        this.execError({})
-      })
+
+        Api.genericInterface(param).then(res => {
+          if (res.status) {
+            this.execSuccess(res)
+          } else if (res.ErrCode === 'C') {
+            const _this = this
+            confirm({
+              title: '缁х画鎵ц锛�',
+              content: res.message,
+              onOk() {
+                return new Promise(resolve => {
+                  Api.genericInterface(unCheckParam).then(result => {
+                    if (result.status) {
+                      _this.execSuccess(result)
+                    } else {
+                      _this.execError(result)
+                    }
+                    resolve()
+                  })
+                })
+              },
+              onCancel() {
+                _this.execError(res)
+              }
+            })
+          } else {
+            this.execError(res)
+          }
+        }, () => {
+          this.execError({})
+        })
+      } else {
+        Api.genericInterface(param).then((res) => {
+          if (res.status) {
+            this.execSuccess(res)
+          } else {
+            this.execError(res)
+          }
+        }, () => {
+          this.execError({})
+        })
+      }
     } else if (btn.intertype === 'inner' && btn.innerFunc) { // 鑷畾涔夊瓨鍌ㄨ繃绋�
       param.func = btn.innerFunc
 

--
Gitblit v1.8.0