From a02fc6a77fa1b35c6516b2d37108d80e260c6c85 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 07 十一月 2024 22:05:08 +0800
Subject: [PATCH] 2024-11-07

---
 src/menu/components/share/actioncomponent/index.jsx |   29 +++++++++++++++++++++++------
 1 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/src/menu/components/share/actioncomponent/index.jsx b/src/menu/components/share/actioncomponent/index.jsx
index 27bde39..e71e10d 100644
--- a/src/menu/components/share/actioncomponent/index.jsx
+++ b/src/menu/components/share/actioncomponent/index.jsx
@@ -20,6 +20,7 @@
 const VerifyExcelIn = asyncSpinComponent(() => import('@/templates/sharecomponent/actioncomponent/verifyexcelin'))
 const VerifyExcelOut = asyncSpinComponent(() => import('@/templates/sharecomponent/actioncomponent/verifyexcelout'))
 const VerifyMegvii = asyncSpinComponent(() => import('@/templates/sharecomponent/actioncomponent/verifymegvii'))
+const VerifyPay = asyncSpinComponent(() => import('@/templates/sharecomponent/actioncomponent/verifypay'))
 
 class ActionComponent extends Component {
   static propTpyes = {
@@ -156,7 +157,7 @@
       card: element
     })
 
-    MKEmitter.emit('changeStyle', options, _style, this.getStyle)
+    MKEmitter.emit('changeStyle', options, _style, this.getStyle, 'toolBtn')
   }
 
   addButton = (cardId, element) => {
@@ -489,19 +490,19 @@
    */
   deleteElement = (card) => {
     const { config } = this.props
-    let _this = this
+    let that = this
 
     confirm({
       content: `纭畾鍒犻櫎 - ${card.label} 锛焋,
       onOk() {
-        let _actionlist = fromJS(_this.state.actionlist).toJS()
+        let _actionlist = fromJS(that.state.actionlist).toJS()
 
         _actionlist = _actionlist.filter(item => item.uuid !== card.uuid)
 
-        _this.setState({
+        that.setState({
           actionlist: _actionlist
         }, () => {
-          _this.props.updateaction({...config, action: _actionlist})
+          that.props.updateaction({...config, action: _actionlist})
         })
       },
       onCancel() {}
@@ -524,11 +525,21 @@
   verifySubmit = () => {
     const { config } = this.props
     const { card } = this.state
-    
+
     this.verifyRef.handleConfirm().then(res => {
       let _actionlist = fromJS(this.state.actionlist).toJS()
       _actionlist = _actionlist.filter(item => !item.origin || item.uuid === card.uuid)
 
+      res.customverifys && res.customverifys.forEach(item => {
+        item.sql = item.sql.replace(/\t+|\v+/g, ' ')
+      })
+      res.scripts && res.scripts.forEach(item => {
+        item.sql = item.sql.replace(/\t+|\v+/g, ' ')
+      })
+      res.cbScripts && res.cbScripts.forEach(item => {
+        item.sql = item.sql.replace(/\t+|\v+/g, ' ')
+      })
+      
       _actionlist = _actionlist.map(item => {
         if (item.uuid === card.uuid) {
           item.verify = res
@@ -698,6 +709,12 @@
         columns={config.columns}
         wrappedComponentRef={(inst) => this.verifyRef = inst}
       />
+    } else if (card.payMode === 'system') {
+      return <VerifyPay
+        card={card}
+        columns={config.columns}
+        wrappedComponentRef={(inst) => this.verifyRef = inst}
+      />
     }
   }
 

--
Gitblit v1.8.0