From 2f952c67cb4eddd4ad916a8418b3aee4cae82111 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 02 十一月 2021 10:00:09 +0800
Subject: [PATCH] 2021-11-02

---
 src/templates/zshare/verifycard/index.jsx |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/src/templates/zshare/verifycard/index.jsx b/src/templates/zshare/verifycard/index.jsx
index 5b55948..2db3ea3 100644
--- a/src/templates/zshare/verifycard/index.jsx
+++ b/src/templates/zshare/verifycard/index.jsx
@@ -35,6 +35,7 @@
   state = {
     initsql: '',            // sql楠岃瘉鏃跺彉閲忓0鏄庡強璧嬪��
     notes: [],              // 鐭俊妯℃澘
+    setting: null,
     verify: {},
     fields: [],
     usefulfields: '',
@@ -572,6 +573,7 @@
     }
 
     this.setState({
+      setting: config.setting || {},
       verify: _verify
     })
 
@@ -806,9 +808,15 @@
           if (!_arr.includes('submituserid')) {
             _form.push('submituserid=@userid@')
           }
+          if (!_arr.includes('submituser')) {
+            _form.push('submituser=@username')
+          }
         } else {
           if (!_arr.includes('modifydate')) {
             _form.push('modifydate=getdate()')
+          }
+          if (!_arr.includes('modifyuser')) {
+            _form.push('modifyuser=@username')
           }
           if (!_arr.includes('modifyuserid')) {
             _form.push('modifyuserid=@userid@')
@@ -852,7 +860,7 @@
         if (_verify.voucher && _verify.voucher.enabled) {
           _voucher = ',BVoucher=@BVoucher,FIBVoucherDate=@FIBVoucherDate,FiYear=@FiYear'
         }
-        _defaultsql = `update ${card.sql} set deleted=1,modifydate=getdate(),modifyuserid=@userid@${_voucher} where ${config.setting.primaryKey || 'id'}${card.Ot !== 'requiredOnce' ? '=@ID@' : ' in (select ID  from dbo.SplitComma(@ID@))'};`
+        _defaultsql = `update ${card.sql} set deleted=1,modifydate=getdate(),modifyuser=@username,modifyuserid=@userid@${_voucher} where ${config.setting.primaryKey || 'id'}${card.Ot !== 'requiredOnce' ? '=@ID@' : ' in (select ID  from dbo.SplitComma(@ID@))'};`
       } else if (card.sqlType === 'delete') {
         let _msg = ''
         if (columns && columns.length > 0 && card.Ot !== 'notRequired' && card.Ot !== 'requiredOnce') {
@@ -1310,6 +1318,7 @@
 
   handleConfirm = () => {
     const { card } = this.props
+    const { setting } = this.state
     let verify = fromJS(this.state.verify).toJS()
     
     // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭�
@@ -1328,6 +1337,13 @@
           duration: 5
         })
         return
+      } else if (verify.invalid === 'true' && setting.maxScript && setting.maxScript >= 100) {
+        notification.warning({
+          top: 92,
+          message: '鏁版嵁婧愪腑鑷畾涔夎剼鏈繃浜庡鏉傦紝涓嶈兘浣跨敤澶辨晥楠岃瘉锛�',
+          duration: 5
+        })
+        return
       }
 
       let msg = ''

--
Gitblit v1.8.0