From 1bec8d69cf14bd88591eee5b0320c5c8f6c25a08 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 08 三月 2024 21:19:31 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/templates/zshare/verifycard/callbackcustomscript/index.jsx |   30 ++++++++++++++++++++----------
 1 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/src/templates/zshare/verifycard/callbackcustomscript/index.jsx b/src/templates/zshare/verifycard/callbackcustomscript/index.jsx
index bad06ba..c0c0a6c 100644
--- a/src/templates/zshare/verifycard/callbackcustomscript/index.jsx
+++ b/src/templates/zshare/verifycard/callbackcustomscript/index.jsx
@@ -12,7 +12,8 @@
   static propTpyes = {
     btn: PropTypes.object,          // 鎸夐挳淇℃伅
     initsql: PropTypes.string,      // 鍒濆鍖栬剼鏈�
-    usefulfields: PropTypes.string, // 鍙敤瀛楁
+    formfields: PropTypes.string,
+    colfields: PropTypes.string,
     systemScripts: PropTypes.array, // 绯荤粺鑴氭湰
     customScripts: PropTypes.array, // 鑷畾涔夎剼鏈�
     scriptsChange: PropTypes.func   // 琛ㄥ崟
@@ -56,6 +57,15 @@
       }
 
       if (!err) {
+        if (/^[\s\n]+$/.test(values.sql)) {
+          notification.warning({
+            top: 92,
+            message: '璇疯緭鍏ql!',
+            duration: 5
+          })
+          return
+        }
+
         values.uuid = editItem ? editItem.uuid : ''
         values.position = values.position || (editItem ? editItem.position : 'front')
 
@@ -115,6 +125,7 @@
 
         // 鏁版嵁鏉冮檺
         sql = sql.replace(/@\$|\$@/ig, '').replace(/\$check@|@check\$/ig, '')
+        sql = sql.replace(/@datam@/ig, `''`)
         sql = sql.replace(/@typename@/ig, `'debug'`)
         
         if (skip) {
@@ -187,7 +198,7 @@
   }
 
   render() {
-    const { usefulfields, systemScripts, btn, type } = this.props
+    const { formfields, colfields, systemScripts, btn, type } = this.props
     const { getFieldDecorator } = this.props.form
     const { editItem, skip } = this.state
     const formItemLayout = {
@@ -201,27 +212,26 @@
       }
     }
 
-    // let _usefulfields = usefulfields ? usefulfields.replace(/(BID|ID|LoginUID|SessionUid|UserID|Appkey|UserName|FullName|RoleID|mk_departmentcode|mk_organization|mk_nation|mk_province|mk_city|mk_district|mk_address|mk_user_type|BillCode|BVoucher|FIBVoucherDate|FiYear|ModularDetailCode),\s/ig, '') : null
-
     return (
       <Form {...formItemLayout} className="verify-form verify-custom-callback-scripts" id="verify-custom-callback-scripts">
         <Row gutter={24}>
           {!type ? <Col span={8}>
-            <Form.Item label={'琛ㄥ悕'} style={{whiteSpace: 'nowrap', margin: 0}}>
+            <Form.Item label="琛ㄥ悕" style={{whiteSpace: 'nowrap', margin: 0}}>
               {btn.cbTable}
             </Form.Item>
           </Col> : null}
           {!type ? <Col span={10}>
-            <Form.Item label={'鎶ラ敊瀛楁'} style={{margin: 0, whiteSpace: 'nowrap'}}>
+            <Form.Item label="鎶ラ敊瀛楁" style={{margin: 0, whiteSpace: 'nowrap'}}>
               ErrorCode锛堝鍔犲悗缂�NT琛ㄧず鏁版嵁涓嶅洖婊氾紝濡侲NT銆丯NT銆丗NT銆丯MNT銆丆NT銆�-2NT锛�, retmsg
             </Form.Item>
           </Col> : null}
           {!type ? <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, time_id, typename</span></Tooltip>,&nbsp;
+            <Form.Item label="鍙敤瀛楁">
+              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id, typename, datam</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, mk_deleted</span></Tooltip>,&nbsp;
               <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞跺湪鍗曞彿鐢熸垚鎴栧垱寤哄嚟璇佹椂浣跨敤銆�'}><span style={{color: '#13c2c2'}}>BillCode, BVoucher, FIBVoucherDate, FiYear, ModularDetailCode</span></Tooltip>
-              {usefulfields ? <span>, {usefulfields}</span> : ''}
+              {formfields ? <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title="琛ㄥ崟鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��">, <span style={{color: '#8E44AD'}}>{formfields}</span></Tooltip> : ''}
+              {colfields ? <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title="瀛楁闆嗗彉閲忥紝绯荤粺浼氬畾涔夊彉閲忓苟璧嬪�笺��">, {colfields}</Tooltip> : ''}
             </Form.Item>
           </Col> : null}
           {!type ? <Col span={8} style={{whiteSpace: 'nowrap'}}>
@@ -242,7 +252,7 @@
             </Form.Item>
           </Col> : null}
           {!type ? <Col span={8}>
-            <Form.Item label={'蹇嵎娣诲姞'} style={{marginBottom: 0}}>
+            <Form.Item label="蹇嵎娣诲姞" style={{marginBottom: 0}}>
               <Select
                 allowClear
                 showSearch

--
Gitblit v1.8.0