From d340a56429b12c3c893762730638631e147e047c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 27 八月 2023 13:46:34 +0800
Subject: [PATCH] 2023-08-27

---
 src/tabviews/zshare/actionList/excelInbutton/index.jsx |   37 +++++++++++++++++++------------------
 1 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
index 0104e10..2a9e4a7 100644
--- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
@@ -271,7 +271,7 @@
    * @description Excel 瀵煎叆
    */
   getexceldata = (data, errors, sheetName, errDetail) => {
-    const { btn } = this.props
+    const { btn, BID } = this.props
 
     if (errors) {
       if (errors === 'notexit') {
@@ -314,7 +314,7 @@
       })
     }
 
-    let result = getExcelInSql(btn, data, (this.props.BID || ''), this.state.primaryId)
+    let result = getExcelInSql(btn, data, (BID || ''), this.state.primaryId)
 
     if (result.errors) {
       notification.warning({
@@ -331,30 +331,29 @@
       excel_in: result.lines
     }
 
-    if (this.props.BID) {
-      param.BID = this.props.BID
+    if (BID) {
+      param.BID = BID
     }
 
     if (btn.intertype === 'system') { // 绯荤粺瀛樺偍杩囩▼
       param.func = 'sPC_TableData_InUpDe'
 
-      param.excel_in_type = 'true'
-      param.LText1 = Utils.formatOptions(result.insert)
-      param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-      param.LText2 = result.bottom
+      delete param.excel_in
+
+      // param.excel_in_type = 'true'
+      param.exec_type = 'y'
       param.LText = result.sql
+      param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
 
       let unCheckParam = null
 
-      if (/\$check@|@check\$/ig.test(param.LText2) || /\$check@|@check\$/ig.test(param.LText)) {
+      if (/\$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)
+      param.secretkey = Utils.encrypt('', param.timestamp)
       if (window.GLOB.mkHS && param.timestamp) { // 浜戠楠岃瘉
         param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp)
       }
@@ -368,11 +367,7 @@
       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.secretkey = Utils.encrypt('', unCheckParam.timestamp)
         unCheckParam.menuname = btn.logLabel
 
         if (window.GLOB.probation) {
@@ -424,6 +419,11 @@
       }
     } else if (btn.intertype === 'inner' && btn.innerFunc) { // 鑷畾涔夊瓨鍌ㄨ繃绋�
       param.func = btn.innerFunc
+
+      if (btn.recordUser === 'true') {
+        param.username = sessionStorage.getItem('User_Name') || ''
+        param.fullname = sessionStorage.getItem('Full_Name') || ''
+      }
 
       Api.genericInterface(param).then((res) => {
         if (res.status) {
@@ -515,7 +515,8 @@
         }
         
         if (window.GLOB.mkHS && res.func === 's_sDataDictb_excelIn') { // s_sDataDictb_excelIn 浜戠楠岃瘉
-          param.LText = Utils.formatOptions(result.sql)
+          let sql = `Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@tbid Nvarchar(512)`
+          param.LText = Utils.formatOptions(sql)
           param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
           param.secretkey = Utils.encrypt(param.LText, param.timestamp)
           param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp)

--
Gitblit v1.8.0