From 04a71ecb03c8aaebceade470045ea8676f0baf2f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 01 七月 2022 14:31:23 +0800
Subject: [PATCH] 2022-07-01

---
 src/menu/datasource/verifycard/utils.jsx                                           |    9 ++-
 src/menu/sysinterface/settingform/simplescript/index.jsx                           |    4 +
 src/mob/searchconfig/index.jsx                                                     |    4 
 src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx |    6 +-
 src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx   |    4 +
 src/templates/formtabconfig/index.jsx                                              |    8 +-
 src/templates/zshare/verifycard/callbackcustomscript/index.jsx                     |    6 +
 src/menu/components/share/searchcomponent/index.jsx                                |    4 
 src/menu/components/form/normal-form/index.jsx                                     |    4 
 src/templates/zshare/verifycard/customscript/index.jsx                             |    6 +
 src/templates/sharecomponent/searchcomponent/index.jsx                             |    4 
 src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx              |    4 +
 src/templates/modalconfig/index.jsx                                                |    4 
 src/templates/zshare/verifycard/customform/index.jsx                               |    6 +
 src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx  |    6 +-
 src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx              |    7 +-
 src/views/billprint/index.jsx                                                      |   16 ++++
 src/templates/sharecomponent/settingcomponent/settingform/index.jsx                |    7 +-
 src/mob/modalconfig/index.jsx                                                      |    4 
 src/templates/sharecomponent/settingcomponent/settingform/utils.jsx                |    4 +
 src/menu/datasource/verifycard/index.jsx                                           |    7 +-
 src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx              |   11 ++-
 src/menu/components/form/tab-form/index.jsx                                        |    4 
 src/templates/sharecomponent/settingcalcomponent/verifycard/utils.jsx              |    8 +-
 src/menu/components/search/main-search/index.jsx                                   |    4 
 src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx            |    7 +-
 src/menu/modalconfig/index.jsx                                                     |    4 
 src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx        |    6 +-
 src/templates/sharecomponent/treesettingcomponent/settingform/utils.jsx            |    4 +
 29 files changed, 105 insertions(+), 67 deletions(-)

diff --git a/src/menu/components/form/normal-form/index.jsx b/src/menu/components/form/normal-form/index.jsx
index 46a534a..43f38bd 100644
--- a/src/menu/components/form/normal-form/index.jsx
+++ b/src/menu/components/form/normal-form/index.jsx
@@ -623,10 +623,10 @@
           LText: res.dataSource
         }
 
-        param.LText = param.LText.replace(/@\$|\$@/ig, '')
+        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
         
         param.LText = Utils.formatOptions(param.LText)
-        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
         param.secretkey = Utils.encrypt('', param.timestamp)
 
         if (window.GLOB.mainSystemApi && res.database === 'sso') {
diff --git a/src/menu/components/form/tab-form/index.jsx b/src/menu/components/form/tab-form/index.jsx
index 58643ce..f937c07 100644
--- a/src/menu/components/form/tab-form/index.jsx
+++ b/src/menu/components/form/tab-form/index.jsx
@@ -629,10 +629,10 @@
           LText: res.dataSource
         }
 
-        param.LText = param.LText.replace(/@\$|\$@/ig, '')
+        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
         
         param.LText = Utils.formatOptions(param.LText)
-        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
         param.secretkey = Utils.encrypt('', param.timestamp)
 
         if (window.GLOB.mainSystemApi && res.database === 'sso') {
diff --git a/src/menu/components/search/main-search/index.jsx b/src/menu/components/search/main-search/index.jsx
index 78e8eb4..f6f0863 100644
--- a/src/menu/components/search/main-search/index.jsx
+++ b/src/menu/components/search/main-search/index.jsx
@@ -282,10 +282,10 @@
           LText: res.dataSource
         }
 
-        param.LText = param.LText.replace(/@\$|\$@/ig, '')
+        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
         
         param.LText = Utils.formatOptions(param.LText)
-        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
         param.secretkey = Utils.encrypt('', param.timestamp)
 
         if (window.GLOB.mainSystemApi && res.database === 'sso') {
diff --git a/src/menu/components/share/searchcomponent/index.jsx b/src/menu/components/share/searchcomponent/index.jsx
index 5c18abf..e452927 100644
--- a/src/menu/components/share/searchcomponent/index.jsx
+++ b/src/menu/components/share/searchcomponent/index.jsx
@@ -223,10 +223,10 @@
           LText: res.dataSource
         }
 
-        param.LText = param.LText.replace(/@\$|\$@/ig, '')
+        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
         
         param.LText = Utils.formatOptions(param.LText)
-        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
         param.secretkey = Utils.encrypt('', param.timestamp)
 
         if (window.GLOB.mainSystemApi && res.database === 'sso') {
diff --git a/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx b/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx
index e4af9ba..7f9fc1f 100644
--- a/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx
+++ b/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx
@@ -160,7 +160,8 @@
           LText: this.state.verifySql + _initCustomScript + _prevCustomScript + _backCustomScript + tail
         }
 
-        param.LText = param.LText.replace(/@\$|\$@/ig, '')
+        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
 
         // 澶栬仈鏁版嵁搴撴浛鎹�
         if (window.GLOB.externalDatabase !== null) {
@@ -168,7 +169,6 @@
         }
 
         param.LText = Utils.formatOptions(param.LText)
-        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
         param.secretkey = Utils.encrypt('', param.timestamp)
         
         this.setState({loading: true})
@@ -274,7 +274,7 @@
           </Col>
           {usefulfields ? <Col span={24} className="sqlfield">
             <Form.Item label={'鍙敤瀛楁'}>
-              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey</span></Tooltip>,&nbsp;
+              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id</span></Tooltip>,&nbsp;
               <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip>,&nbsp;
               {usefulfields},data_type锛堟敞锛歫skey涓轰富閿�硷紝鏂板鏃跺墠绔敓鎴愶紱data_type涓烘搷浣滅被鍨嬶紝鏂板 - add銆佷慨鏀� - upt銆佸垹闄� - del锛�
             </Form.Item>
diff --git a/src/menu/datasource/verifycard/index.jsx b/src/menu/datasource/verifycard/index.jsx
index 656728e..16a205d 100644
--- a/src/menu/datasource/verifycard/index.jsx
+++ b/src/menu/datasource/verifycard/index.jsx
@@ -583,7 +583,8 @@
     }
 
     if ((setting.interType === 'system' && setting.execute !== 'false') || _scripts.length > 0) {
-      let r = SettingUtils.getDebugSql(setting, _scripts, columns, searches, defaultSearch)
+      let timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+      let r = SettingUtils.getDebugSql(setting, _scripts, columns, searches, defaultSearch, timestamp)
 
       if (r.error) {
         notification.warning({
@@ -601,8 +602,8 @@
         LText: r.sql
       }
       param.LText = Utils.formatOptions(param.LText)
-      param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-      param.secretkey = Utils.encrypt('', param.timestamp)
+      param.timestamp = timestamp
+      param.secretkey = Utils.encrypt('', timestamp)
 
       let sumParam = null
       if (r.sumSql) {
diff --git a/src/menu/datasource/verifycard/utils.jsx b/src/menu/datasource/verifycard/utils.jsx
index d911f20..7dc431d 100644
--- a/src/menu/datasource/verifycard/utils.jsx
+++ b/src/menu/datasource/verifycard/utils.jsx
@@ -7,7 +7,7 @@
    * @return {Object}  setting       椤甸潰璁剧疆
    * @return {Array}   columns       鏄剧ず瀛楁
    */
-  static getDebugSql (setting, scripts, columns, searches = [], defSearch) {
+  static getDebugSql (setting, scripts, columns, searches = [], defSearch, timestamp) {
     let sql = ''
     let error = ''
     let _dataresource = ''
@@ -40,6 +40,9 @@
     //   error = '绯荤粺鍑芥暟' + _customScript.match(/\$ex@.{1,50}@ex\$/g)[0].replace(/\$ex@|@ex\$/g, '') + '鏈畾涔�'
     // }
 
+    _dataresource = _dataresource.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${timestamp}'`)
+    _customScript = _customScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${timestamp}'`)
+
     _dataresource = _dataresource.replace(/@\$|\$@/ig, '')
     _customScript = _customScript.replace(/@\$|\$@/ig, '')
     _dataresource = _dataresource.replace(/@select\$|\$select@/ig, '')
@@ -65,8 +68,8 @@
     if (window.GLOB.urlFields) {
       window.GLOB.urlFields.forEach(field => {
         let reg = new RegExp('@' + field + '@', 'ig')
-        _dataresource = _dataresource.replace(reg, '0')
-        _customScript = _customScript.replace(reg, '0')
+        _dataresource = _dataresource.replace(reg, `'0'`)
+        _customScript = _customScript.replace(reg, `'0'`)
       })
     }
 
diff --git a/src/menu/modalconfig/index.jsx b/src/menu/modalconfig/index.jsx
index aba31bb..89d315a 100644
--- a/src/menu/modalconfig/index.jsx
+++ b/src/menu/modalconfig/index.jsx
@@ -278,10 +278,10 @@
           LText: res.dataSource
         }
 
-        param.LText = param.LText.replace(/@\$|\$@/ig, '')
+        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
         
         param.LText = Utils.formatOptions(param.LText)
-        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
         param.secretkey = Utils.encrypt('', param.timestamp)
 
         if (window.GLOB.mainSystemApi && res.database === 'sso') {
diff --git a/src/menu/sysinterface/settingform/simplescript/index.jsx b/src/menu/sysinterface/settingform/simplescript/index.jsx
index 1026595..49a666f 100644
--- a/src/menu/sysinterface/settingform/simplescript/index.jsx
+++ b/src/menu/sysinterface/settingform/simplescript/index.jsx
@@ -252,8 +252,10 @@
       exec_type: 'y',
       LText: SettingUtils.getCustomDebugSql(_scripts)
     }
-    param.LText = Utils.formatOptions(param.LText)
+
     param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+    param.LText = param.LText.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
+    param.LText = Utils.formatOptions(param.LText)
     param.secretkey = Utils.encrypt('', param.timestamp)
     
     this.setState({loading: true})
diff --git a/src/mob/modalconfig/index.jsx b/src/mob/modalconfig/index.jsx
index aedd93b..2bc3d6c 100644
--- a/src/mob/modalconfig/index.jsx
+++ b/src/mob/modalconfig/index.jsx
@@ -277,10 +277,10 @@
           LText: res.dataSource
         }
 
-        param.LText = param.LText.replace(/@\$|\$@/ig, '')
+        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
         
         param.LText = Utils.formatOptions(param.LText)
-        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
         param.secretkey = Utils.encrypt('', param.timestamp)
 
         if (window.GLOB.mainSystemApi && res.database === 'sso') {
diff --git a/src/mob/searchconfig/index.jsx b/src/mob/searchconfig/index.jsx
index afd204d..a240a6c 100644
--- a/src/mob/searchconfig/index.jsx
+++ b/src/mob/searchconfig/index.jsx
@@ -238,10 +238,10 @@
           LText: res.dataSource
         }
 
-        param.LText = param.LText.replace(/@\$|\$@/ig, '')
+        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
         
         param.LText = Utils.formatOptions(param.LText)
-        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
         param.secretkey = Utils.encrypt('', param.timestamp)
 
         if (window.GLOB.mainSystemApi && res.database === 'sso') {
diff --git a/src/templates/formtabconfig/index.jsx b/src/templates/formtabconfig/index.jsx
index f9d7b32..c37b457 100644
--- a/src/templates/formtabconfig/index.jsx
+++ b/src/templates/formtabconfig/index.jsx
@@ -598,10 +598,10 @@
             LText: res.dataSource
           }
 
-          param.LText = param.LText.replace(/@\$|\$@/ig, '')
+          param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+          param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
 
           param.LText = Utils.formatOptions(param.LText)
-          param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
           param.secretkey = Utils.encrypt('', param.timestamp)
   
           if (window.GLOB.mainSystemApi && res.database === 'sso') {
@@ -1448,10 +1448,10 @@
           LText: res.dataresource
         }
 
-        param.LText = param.LText.replace(/@\$|\$@/ig, '')
+        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
 
         param.LText = Utils.formatOptions(param.LText)
-        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
         param.secretkey = Utils.encrypt('', param.timestamp)
         
         Api.getLocalConfig(param).then(result => {
diff --git a/src/templates/modalconfig/index.jsx b/src/templates/modalconfig/index.jsx
index 92e35be..e6212f8 100644
--- a/src/templates/modalconfig/index.jsx
+++ b/src/templates/modalconfig/index.jsx
@@ -420,10 +420,10 @@
           LText: res.dataSource
         }
 
-        param.LText = param.LText.replace(/@\$|\$@/ig, '')
+        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
         
         param.LText = Utils.formatOptions(param.LText)
-        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
         param.secretkey = Utils.encrypt('', param.timestamp)
 
         if (window.GLOB.mainSystemApi && res.database === 'sso') {
diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx
index d4e3ece..586de39 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx
@@ -173,7 +173,8 @@
           LText: this.state.verifySql + _initCustomScript + _prevCustomScript + _backCustomScript + tail
         }
 
-        param.LText = param.LText.replace(/@\$|\$@/ig, '')
+        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
 
         // 澶栬仈鏁版嵁搴撴浛鎹�
         if (window.GLOB.externalDatabase !== null) {
@@ -181,7 +182,6 @@
         }
 
         param.LText = Utils.formatOptions(param.LText)
-        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
         param.secretkey = Utils.encrypt('', param.timestamp)
         
         this.setState({loading: true})
@@ -288,7 +288,7 @@
           </Col>
           <Col span={24} className="sqlfield">
             <Form.Item label={'鍙敤瀛楁'}>
-              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey</span></Tooltip>,&nbsp;
+              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id</span></Tooltip>,&nbsp;
               <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip>,&nbsp;
               {usefulfields}
             </Form.Item>
diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx
index 5baf7cb..eb41078 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx
@@ -161,7 +161,8 @@
           LText: this.state.verifySql + _initCustomScript + _prevCustomScript + _backCustomScript + tail
         }
 
-        param.LText = param.LText.replace(/@\$|\$@/ig, '')
+        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
 
         // 澶栬仈鏁版嵁搴撴浛鎹�
         if (window.GLOB.externalDatabase !== null) {
@@ -169,7 +170,6 @@
         }
 
         param.LText = Utils.formatOptions(param.LText)
-        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
         param.secretkey = Utils.encrypt('', param.timestamp)
         
         this.setState({loading: true})
@@ -269,7 +269,7 @@
           </Col>
           <Col span={24} className="sqlfield">
             <Form.Item label={'鍙敤瀛楁'}>
-              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey</span></Tooltip>,&nbsp;
+              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id</span></Tooltip>,&nbsp;
               <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip>,&nbsp;
               {usefulfields}
             </Form.Item>
diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
index e32df92..e94f798 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
@@ -648,10 +648,10 @@
           LText: values.sql
         }
 
-        param.LText = param.LText.replace(/@\$|\$@/ig, '')
+        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
 
         param.LText = Utils.formatOptions(param.LText)
-        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
         param.secretkey = Utils.encrypt('', param.timestamp)
         
         this.setState({
@@ -877,15 +877,16 @@
   sqlverify = (_resolve, _reject, scripts) => {
     const { searches, verify } = this.state
 
-    let sql = SettingUtils.getDebugSql(verify, scripts, searches, Utils)
+    let timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+    let sql = SettingUtils.getDebugSql(verify, scripts, searches, Utils, timestamp)
     let param = {
       func: 's_debug_sql',
       exec_type: 'y',
       LText: sql
     }
     param.LText = Utils.formatOptions(param.LText)
-    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-    param.secretkey = Utils.encrypt('', param.timestamp)
+    param.timestamp = timestamp
+    param.secretkey = Utils.encrypt('', timestamp)
 
     Api.getLocalConfig(param).then(result => {
       if (result.status) {
diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx
index 78bdce9..c8fa24e 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx
@@ -5,7 +5,7 @@
   /**
    * @description 鐢熸垚椤甸潰鏌ヨ璇彞
    */
-  static getDebugSql (verify, scripts, searches, Utils) {
+  static getDebugSql (verify, scripts, searches, Utils, timestamp) {
     let sql = ''
     let _dataresource = verify.dataresource || ''
     let regoptions = this.getRegOptions(searches)
@@ -49,6 +49,8 @@
       })
     }
     
+    _dataresource = _dataresource.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${timestamp}'`)
+    _customScript = _customScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${timestamp}'`)
     _dataresource = _dataresource.replace(/@\$|\$@/ig, '')
     _customScript = _customScript.replace(/@\$|\$@/ig, '')
 
diff --git a/src/templates/sharecomponent/searchcomponent/index.jsx b/src/templates/sharecomponent/searchcomponent/index.jsx
index b461319..c90b728 100644
--- a/src/templates/sharecomponent/searchcomponent/index.jsx
+++ b/src/templates/sharecomponent/searchcomponent/index.jsx
@@ -245,10 +245,10 @@
           LText: res.dataSource
         }
 
-        param.LText = param.LText.replace(/@\$|\$@/ig, '')
+        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
         
         param.LText = Utils.formatOptions(param.LText)
-        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
         param.secretkey = Utils.encrypt('', param.timestamp)
 
         if (window.GLOB.mainSystemApi && res.database === 'sso') {
diff --git a/src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx b/src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx
index d8918a1..a478d38 100644
--- a/src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx
+++ b/src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx
@@ -291,14 +291,15 @@
     } else if (type === 'scripts' && _scripts.length === 0) {
       resolve()
     } else if (setting.execute !== 'false' || _scripts.length > 0) {
+      let timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
       let param = {
         func: 's_debug_sql',
         exec_type: 'y',
-        LText: SettingUtils.getDebugSql(setting, _scripts, columns, this.getRegOptions(searches), config.calendar, config.urlFields)
+        LText: SettingUtils.getDebugSql(setting, _scripts, columns, this.getRegOptions(searches), config.calendar, config.urlFields, timestamp)
       }
       param.LText = Utils.formatOptions(param.LText)
-      param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-      param.secretkey = Utils.encrypt('', param.timestamp)
+      param.timestamp = timestamp
+      param.secretkey = Utils.encrypt('', timestamp)
       
       Api.getLocalConfig(param).then(result => {
         if (result.status) {
diff --git a/src/templates/sharecomponent/settingcalcomponent/verifycard/utils.jsx b/src/templates/sharecomponent/settingcalcomponent/verifycard/utils.jsx
index b48f75f..478739f 100644
--- a/src/templates/sharecomponent/settingcalcomponent/verifycard/utils.jsx
+++ b/src/templates/sharecomponent/settingcalcomponent/verifycard/utils.jsx
@@ -7,7 +7,7 @@
    * @return {Object}  setting       椤甸潰璁剧疆
    * @return {Array}   columns       鏄剧ず瀛楁
    */
-  static getDebugSql (setting, scripts, columns, searches, calendar, urlFields = []) {
+  static getDebugSql (setting, scripts, columns, searches, calendar, urlFields = [], timestamp) {
     let sql = ''
     let _dataresource = ''
     let _customScript = ''
@@ -39,6 +39,8 @@
       })
     }
     
+    _dataresource = _dataresource.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${timestamp}'`)
+    _customScript = _customScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${timestamp}'`)
     _dataresource = _dataresource.replace(/@\$|\$@/ig, '')
     _customScript = _customScript.replace(/@\$|\$@/ig, '')
     
@@ -49,8 +51,8 @@
     }
 
     urlFields.forEach(field => {
-      _dataresource = _dataresource.replace(new RegExp('@' + field + '@', 'ig'), '0')
-      _customScript = _customScript.replace(new RegExp('@' + field + '@', 'ig'), '0')
+      _dataresource = _dataresource.replace(new RegExp('@' + field + '@', 'ig'), `'0'`)
+      _customScript = _customScript.replace(new RegExp('@' + field + '@', 'ig'), `'0'`)
     })
     
     // 姝e垯鏇挎崲
diff --git a/src/templates/sharecomponent/settingcomponent/settingform/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/index.jsx
index c78bd0a..2fec3e1 100644
--- a/src/templates/sharecomponent/settingcomponent/settingform/index.jsx
+++ b/src/templates/sharecomponent/settingcomponent/settingform/index.jsx
@@ -323,15 +323,16 @@
     } else if (type === 'scripts' && _scripts.length === 0) {
       _resolve()
     } else { // type 涓� submit 銆� verify 锛屼互鍙婂叾浠栭渶瑕侀獙璇佺殑鍦烘櫙
-      let r = SettingUtils.getDebugSql(setting, _scripts, arr_field, regoptions, search)
+      let timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+      let r = SettingUtils.getDebugSql(setting, _scripts, arr_field, regoptions, search, timestamp)
       let param = {
         func: 's_debug_sql',
         exec_type: 'y',
         LText: r.sql
       }
       param.LText = Utils.formatOptions(param.LText)
-      param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-      param.secretkey = Utils.encrypt('', param.timestamp)
+      param.timestamp = timestamp
+      param.secretkey = Utils.encrypt('', timestamp)
 
       let sumParam = null
       if (r.sumSql) {
diff --git a/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx
index a54097c..d882c99 100644
--- a/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx
+++ b/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx
@@ -289,8 +289,10 @@
       exec_type: 'y',
       LText: SettingUtils.getCustomDebugSql(_scripts, this.props.regoptions)
     }
-    param.LText = Utils.formatOptions(param.LText)
+
     param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+    param.LText = param.LText.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
+    param.LText = Utils.formatOptions(param.LText)
     param.secretkey = Utils.encrypt('', param.timestamp)
     
     this.setState({loading: true})
diff --git a/src/templates/sharecomponent/settingcomponent/settingform/utils.jsx b/src/templates/sharecomponent/settingcomponent/settingform/utils.jsx
index 63e3a84..a9f3e69 100644
--- a/src/templates/sharecomponent/settingcomponent/settingform/utils.jsx
+++ b/src/templates/sharecomponent/settingcomponent/settingform/utils.jsx
@@ -7,7 +7,7 @@
    * @return {Object}  setting       椤甸潰璁剧疆
    * @return {Array}   regoptions    鎼滅储鏉′欢姝e垯鏇挎崲
    */
-  static getDebugSql (setting, scripts, arr_field, regoptions, search) {
+  static getDebugSql (setting, scripts, arr_field, regoptions, search, timestamp) {
     let sql = ''
     let _dataresource = setting.dataresource || ''
     let _customScript = ''
@@ -35,6 +35,8 @@
       })
     }
     
+    _dataresource = _dataresource.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${timestamp}'`)
+    _customScript = _customScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${timestamp}'`)
     _dataresource = _dataresource.replace(/@\$|\$@/ig, '')
     _customScript = _customScript.replace(/@\$|\$@/ig, '')
     _dataresource = _dataresource.replace(/@select\$|\$select@/ig, '')
diff --git a/src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx b/src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx
index bb5ebe8..b3958a5 100644
--- a/src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx
+++ b/src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx
@@ -135,14 +135,15 @@
     } else if (type === 'scripts' && _scripts.length === 0) {
       _resolve()
     } else { // type 涓� submit 銆� verify 锛屼互鍙婂叾浠栭渶瑕侀獙璇佺殑鍦烘櫙
+      let timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
       let param = {
         func: 's_debug_sql',
         exec_type: 'y',
-        LText: SettingUtils.getDebugSql(setting, _scripts)
+        LText: SettingUtils.getDebugSql(setting, _scripts, timestamp)
       }
       param.LText = Utils.formatOptions(param.LText)
-      param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-      param.secretkey = Utils.encrypt('', param.timestamp)
+      param.timestamp = timestamp
+      param.secretkey = Utils.encrypt('', timestamp)
       
       Api.getLocalConfig(param).then(result => {
         if (result.status) {
diff --git a/src/templates/sharecomponent/treesettingcomponent/settingform/utils.jsx b/src/templates/sharecomponent/treesettingcomponent/settingform/utils.jsx
index 0833c70..4a49e77 100644
--- a/src/templates/sharecomponent/treesettingcomponent/settingform/utils.jsx
+++ b/src/templates/sharecomponent/treesettingcomponent/settingform/utils.jsx
@@ -5,7 +5,7 @@
    * @return {String}  scripts       鑷畾涔夎剼鏈�
    * @return {Object}  setting       椤甸潰璁剧疆
    */
-  static getDebugSql (setting, scripts) {
+  static getDebugSql (setting, scripts, timestamp) {
     let arr_field = `${setting.valueField},${setting.labelField},${setting.parentField}`
     let sql = ''
     let _dataresource = setting.dataresource || ''
@@ -35,6 +35,8 @@
       })
     }
     
+    _dataresource = _dataresource.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${timestamp}'`)
+    _customScript = _customScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${timestamp}'`)
     _dataresource = _dataresource.replace(/@\$|\$@/ig, '')
     _customScript = _customScript.replace(/@\$|\$@/ig, '')
 
diff --git a/src/templates/zshare/verifycard/callbackcustomscript/index.jsx b/src/templates/zshare/verifycard/callbackcustomscript/index.jsx
index f17e3e7..1320227 100644
--- a/src/templates/zshare/verifycard/callbackcustomscript/index.jsx
+++ b/src/templates/zshare/verifycard/callbackcustomscript/index.jsx
@@ -146,10 +146,12 @@
           param.LText = param.LText.replace(/@db@/ig, window.GLOB.externalDatabase)
         }
 
+        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+        param.LText = param.LText.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
+
         console.info(`/* sql 楠岃瘉 */\n${param.LText.replace(/\n\s{6,20}/ig, '\n')}`)
 
         param.LText = Utils.formatOptions(param.LText)
-        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
         param.secretkey = Utils.encrypt('', param.timestamp)
         
         this.setState({loading: true})
@@ -237,7 +239,7 @@
           </Col>
           {usefulfields ? <Col span={24} className="sqlfield">
             <Form.Item label={'鍙敤瀛楁'}>
-              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey</span></Tooltip>,&nbsp;
+              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id</span></Tooltip>,&nbsp;
               <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip>,&nbsp;
               <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞跺湪鍗曞彿鐢熸垚鎴栧垱寤哄嚟璇佹椂浣跨敤銆�'}><span style={{color: '#13c2c2'}}>BillCode, BVoucher, FIBVoucherDate, FiYear, ModularDetailCode</span></Tooltip>,&nbsp;
               {_usefulfields}
diff --git a/src/templates/zshare/verifycard/customform/index.jsx b/src/templates/zshare/verifycard/customform/index.jsx
index 4817dc5..5321773 100644
--- a/src/templates/zshare/verifycard/customform/index.jsx
+++ b/src/templates/zshare/verifycard/customform/index.jsx
@@ -116,8 +116,10 @@
           param.LText = param.LText.replace(/@db@/ig, window.GLOB.externalDatabase)
         }
 
-        param.LText = Utils.formatOptions(param.LText)
         param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+        param.LText = param.LText.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
+
+        param.LText = Utils.formatOptions(param.LText)
         param.secretkey = Utils.encrypt('', param.timestamp)
         
         this.setState({loading: true})
@@ -166,7 +168,7 @@
         <Row gutter={24}>
           {usefulfields ? <Col span={21} className="sqlfield">
             <Form.Item label={'鍙敤瀛楁'}>
-              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey</span></Tooltip>,&nbsp;
+              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id</span></Tooltip>,&nbsp;
               <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip>,&nbsp;
               <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞跺湪鍗曞彿鐢熸垚鎴栧垱寤哄嚟璇佹椂浣跨敤銆�'}><span style={{color: '#13c2c2'}}>BillCode, BVoucher, FIBVoucherDate, FiYear, ModularDetailCode</span></Tooltip>,&nbsp;
               {_usefulfields}
diff --git a/src/templates/zshare/verifycard/customscript/index.jsx b/src/templates/zshare/verifycard/customscript/index.jsx
index 75bc197..76a76f1 100644
--- a/src/templates/zshare/verifycard/customscript/index.jsx
+++ b/src/templates/zshare/verifycard/customscript/index.jsx
@@ -176,10 +176,12 @@
           param.LText = param.LText.replace(/@db@/ig, window.GLOB.externalDatabase)
         }
 
+        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+        param.LText = param.LText.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
+
         console.info(`/* sql 楠岃瘉 */\n${param.LText.replace(/\n\s{6,20}/ig, '\n')}`)
 
         param.LText = Utils.formatOptions(param.LText)
-        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
         param.secretkey = Utils.encrypt('', param.timestamp)
         
         this.setState({loading: true})
@@ -270,7 +272,7 @@
           </Col> : null}
           {!_type && usefulfields ? <Col span={24} className="sqlfield">
             <Form.Item label={'鍙敤瀛楁'}>
-              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey</span></Tooltip>,&nbsp;
+              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id</span></Tooltip>,&nbsp;
               <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip>,&nbsp;
               <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞跺湪鍗曞彿鐢熸垚鎴栧垱寤哄嚟璇佹椂浣跨敤銆�'}><span style={{color: '#13c2c2'}}>BillCode, BVoucher, FIBVoucherDate, FiYear, ModularDetailCode</span></Tooltip>,&nbsp;
               {_usefulfields}
diff --git a/src/views/billprint/index.jsx b/src/views/billprint/index.jsx
index 5493e12..62ead55 100644
--- a/src/views/billprint/index.jsx
+++ b/src/views/billprint/index.jsx
@@ -37,6 +37,7 @@
     data: '',
     tempId: '',
     config: null,
+    urlParam: null,
     auto: true
   }
 
@@ -58,7 +59,8 @@
         sessionStorage.setItem('localDataM', param.dataM || '')
         this.setState({
           BID: param.id || '',
-          tempId: param.tempId
+          tempId: param.tempId,
+          urlParam: param
         }, () => {
           this.getMenuParam()
         })
@@ -135,7 +137,7 @@
   }
 
   getMenuParam = () => {
-    const { tempId, BID } = this.state
+    const { tempId, BID, urlParam } = this.state
 
     let _param = {
       func: 'sPC_Get_LongParam',
@@ -243,6 +245,16 @@
           })
         }
 
+        if (config.urlFields) {
+          config.urlFields.forEach(field => {
+            let val = `'${urlParam ? (urlParam[field] || '') : ''}'`
+            regs.push({
+              reg: new RegExp('@' + field + '@', 'ig'),
+              value: val
+            })
+          })
+        }
+
         config.components = config.components.map(component => {
           if (component.action) component.action = []
           if (component.search) component.search = []

--
Gitblit v1.8.0