From cbeffcc0902631909c0373f274752a97ddaf2d4e Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 06 八月 2022 01:41:54 +0800
Subject: [PATCH] 2022-08-06

---
 src/templates/zshare/modalform/index.jsx                           |   29 +
 src/assets/css/viewstyle.scss                                      |   28 +
 src/components/header/index.jsx                                    |    7 
 src/templates/formtabconfig/index.jsx                              |    2 
 src/menu/components/card/prop-card/index.scss                      |    9 
 src/templates/sharecomponent/actioncomponent/actionform/index.scss |    5 
 src/menu/components/form/formaction/index.jsx                      |    2 
 src/api/index.js                                                   |   13 
 src/menu/components/card/data-card/index.scss                      |    9 
 src/tabviews/zshare/mutilform/mkInput/index.jsx                    |   73 +++
 src/tabviews/zshare/actionList/normalbutton/index.jsx              |  665 +++++++++++++++++++++-------------
 src/menu/datasource/verifycard/columnform/index.jsx                |    4 
 src/menu/components/card/cardcellcomponent/index.jsx               |    2 
 src/menu/components/card/data-card/options.jsx                     |    1 
 src/templates/zshare/formconfig.jsx                                |   48 +
 src/menu/components/share/actioncomponent/formconfig.jsx           |   25 
 src/templates/sharecomponent/actioncomponent/actionform/index.jsx  |   26 +
 src/templates/zshare/verifycard/index.jsx                          |   13 
 src/menu/components/card/data-card/index.jsx                       |   28 +
 src/menu/components/share/actioncomponent/index.jsx                |    2 
 src/tabviews/zshare/mutilform/index.jsx                            |   10 
 src/menu/components/share/actioncomponent/actionform/index.jsx     |   45 +
 src/templates/sharecomponent/actioncomponent/index.jsx             |    2 
 src/tabviews/zshare/mutilform/mkTextArea/index.jsx                 |   25 +
 src/menu/components/card/prop-card/index.jsx                       |   27 +
 25 files changed, 768 insertions(+), 332 deletions(-)

diff --git a/src/api/index.js b/src/api/index.js
index 74c1c5b..1487f05 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -810,17 +810,16 @@
       param.LoginUID = sessionStorage.getItem('CloudLoginUID') || param.LoginUID || ''
     }
 
-    // 寰呬紭鍖栵紝澧炲姞鏄惁鏀寔璺ㄥ煙璇锋眰
-    // let url = '/webapi/dostars'
-    // if (param.rduri) {
-    //   url = param.rduri
-    //   delete param.rduri
-    // }
+    let url = '/webapi/dostars'
+    if (param.rduri && /\/dostars/.test(param.rduri)) {
+      url = param.rduri
+      delete param.rduri
+    }
 
     param = this.encryptParam(param)
 
     return axios({
-      url: `/webapi/dostars${param.func ? '/' + param.func : ''}`,
+      url: `${url}${param.func ? '/' + param.func : ''}`,
       method: 'post',
       data: param
     })
diff --git a/src/assets/css/viewstyle.scss b/src/assets/css/viewstyle.scss
index ef70846..33dc189 100644
--- a/src/assets/css/viewstyle.scss
+++ b/src/assets/css/viewstyle.scss
@@ -227,6 +227,34 @@
         }
       }
     }
+    .data-zoom.radio.tabs, .data-zoom.checkbox.tabs {
+      .mk-card {
+        > .card-item-box {
+          border-top: none!important;
+          border-left: none!important;
+          border-right: none!important;
+          border-radius: 0px!important;
+          border-bottom: 2px solid transparent!important;
+          transition: all 0.3s;
+          cursor: pointer;
+        }
+      }
+      .mk-card:hover {
+        > .card-item-box {
+          .ant-mk-text, .ant-mk-date {
+            color: $color6;
+          }
+        }
+      }
+      .mk-card.active, .mk-card.selected {
+        > .card-item-box {
+          border-bottom-color: $color6!important;
+          .ant-mk-text, .ant-mk-date {
+            color: $color6;
+          }
+        }
+      }
+    }
   }
   .normal-group-wrap {
     .print-button:hover, .print-button:focus, .print-button:active {
diff --git a/src/components/header/index.jsx b/src/components/header/index.jsx
index 240973e..afbac7f 100644
--- a/src/components/header/index.jsx
+++ b/src/components/header/index.jsx
@@ -14,7 +14,7 @@
   initMenuPermission,
   logout
 } from '@/store/action'
-import asyncComponent from '@/utils/asyncComponent'
+import asyncComponent from '@/utils/asyncSpinComponent'
 import Api from '@/api'
 import MKEmitter from '@/utils/events.js'
 import options from '@/store/options.js'
@@ -67,6 +67,8 @@
   }
 
   resetPwdSubmit = () => {
+    if (!this.formRef) return
+
     this.formRef.handleConfirm().then(res => {
       this.setState({
         confirmLoading: true
@@ -399,9 +401,12 @@
   }
 
   loginSubmit = () => {
+    if (!this.loginRef) return
+
     this.setState({
       loginLoading: true
     })
+
     this.loginRef.handleConfirm().then(param => {
       Api.getusermsg(param.username, param.password, true).then(res => {
         if (res.status) {
diff --git a/src/menu/components/card/cardcellcomponent/index.jsx b/src/menu/components/card/cardcellcomponent/index.jsx
index 380ef62..cd73458 100644
--- a/src/menu/components/card/cardcellcomponent/index.jsx
+++ b/src/menu/components/card/cardcellcomponent/index.jsx
@@ -731,7 +731,7 @@
           <Modal
             title="鎸夐挳路缂栬緫"
             visible={actvisible}
-            width={850}
+            width={920}
             maskClosable={false}
             onCancel={this.editModalCancel}
             footer={[
diff --git a/src/menu/components/card/data-card/index.jsx b/src/menu/components/card/data-card/index.jsx
index 67eea0f..67ca766 100644
--- a/src/menu/components/card/data-card/index.jsx
+++ b/src/menu/components/card/data-card/index.jsx
@@ -573,7 +573,9 @@
   }
 
   updateWrap = (res) => {
-    let _card = {...this.state.card, wrap: res}
+    const { card } = this.state
+
+    let _card = {...card, wrap: res}
 
     if (res.supNodes) {
       _card.supNodes = res.supNodes
@@ -587,11 +589,31 @@
       delete _card.supNodes
     }
 
+    
     if (res.layout === 'flex') {
       _card.wrap.pagestyle = 'page'
     }
+    
+    if (res.selStyle === 'tabs' && card.wrap.selStyle !== 'tabs') {
+      Object.keys(_card.style).forEach(key => {
+        if (/^border/.test(key)) {
+          delete _card.style[key]
+        }
+      })
+      _card.style.borderBottomColor = '#eeeeee'
+      _card.style.borderBottomWidth = '1px'
+      _card.style.paddingBottom = '0px'
 
-    this.updateComponent(_card)
+      _card.subcards.forEach(item => {
+        delete item.style.marginBottom
+      })
+      
+      this.setState({card: {..._card, subcards: []}}, () => {
+        this.updateComponent(_card)
+      })
+    } else {
+      this.updateComponent(_card)
+    }
   }
 
   pasteComponent = (res, resolve) => {
@@ -760,7 +782,7 @@
           <ToolOutlined />
         </Popover>
         <ActionComponent config={card} type="datacard" setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/>
-        <div className={'float-' + (card.wrap.cardFloat || 'left')}>
+        <div className={'float-' + (card.wrap.cardFloat || 'left') + ' select-' + card.wrap.selStyle}>
           {card.subcards.map((subcard, index) => (<CardComponent key={subcard.uuid} cards={card} card={subcard} move={this.move} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))}
         </div>
         <div style={{clear: 'both'}}></div>
diff --git a/src/menu/components/card/data-card/index.scss b/src/menu/components/card/data-card/index.scss
index bf029bb..ed54cb3 100644
--- a/src/menu/components/card/data-card/index.scss
+++ b/src/menu/components/card/data-card/index.scss
@@ -109,6 +109,15 @@
       vertical-align: top;
     }
   }
+  .select-tabs {
+    .card-item {
+      border-top: none!important;
+      border-left: none!important;
+      border-right: none!important;
+      border-radius: 0px!important;
+      border-bottom: 2px solid transparent!important;
+    }
+  }
 }
 
 .menu-data-card-edit-box::-webkit-scrollbar {
diff --git a/src/menu/components/card/data-card/options.jsx b/src/menu/components/card/data-card/options.jsx
index 64bbde6..ba3b1f6 100644
--- a/src/menu/components/card/data-card/options.jsx
+++ b/src/menu/components/card/data-card/options.jsx
@@ -188,6 +188,7 @@
         {value: 'active', label: '澶栭槾褰�'},
         {value: 'backFont', label: '鑳屾櫙+鏂囧瓧'},
         {value: 'font', label: '鏂囧瓧'},
+        {value: 'tabs', label: '鏍囩椤�'},
         ...(subtype === 'datacard' && appType === 'mob' ? [{value: 'check', label: '鍕鹃��'}] : [])
       ],
       forbid: subtype === 'tablecard'
diff --git a/src/menu/components/card/prop-card/index.jsx b/src/menu/components/card/prop-card/index.jsx
index 9e382eb..257fe0b 100644
--- a/src/menu/components/card/prop-card/index.jsx
+++ b/src/menu/components/card/prop-card/index.jsx
@@ -574,7 +574,9 @@
   }
 
   updateWrap = (res) => {
-    let _card = {...this.state.card, wrap: res}
+    const { card } = this.state
+
+    let _card = {...card, wrap: res}
 
     if (res.datatype === 'static') {
       if (res.supModule && res.supModule.length > 0) {
@@ -587,7 +589,26 @@
       _card.wrap.pagestyle = 'page'
     }
 
-    this.updateComponent(_card)
+    if (res.selStyle === 'tabs' && card.wrap.selStyle !== 'tabs') {
+      Object.keys(_card.style).forEach(key => {
+        if (/^border/.test(key)) {
+          delete _card.style[key]
+        }
+      })
+      _card.style.borderBottomColor = '#eeeeee'
+      _card.style.borderBottomWidth = '1px'
+      _card.style.paddingBottom = '0px'
+
+      _card.subcards.forEach(item => {
+        delete item.style.marginBottom
+      })
+      
+      this.setState({card: {..._card, subcards: []}}, () => {
+        this.updateComponent(_card)
+      })
+    } else {
+      this.updateComponent(_card)
+    }
   }
 
   clickComponent = (e) => {
@@ -624,7 +645,7 @@
         } trigger="hover">
           <ToolOutlined />
         </Popover>
-        <div className={(card.wrap.layout || 'grid') + '-layout float-' + (card.wrap.cardFloat || 'left')}>
+        <div className={(card.wrap.layout || 'grid') + '-layout float-' + (card.wrap.cardFloat || 'left') + ' select-' + card.wrap.selStyle}>
           {card.subcards.map(subcard => (<CardComponent key={subcard.uuid} cards={card} card={subcard} move={this.move} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))}
         </div>
         <div className="component-name">
diff --git a/src/menu/components/card/prop-card/index.scss b/src/menu/components/card/prop-card/index.scss
index f8633d4..92e00e6 100644
--- a/src/menu/components/card/prop-card/index.scss
+++ b/src/menu/components/card/prop-card/index.scss
@@ -97,6 +97,15 @@
       vertical-align: top;
     }
   }
+  .select-tabs {
+    .card-item {
+      border-top: none!important;
+      border-left: none!important;
+      border-right: none!important;
+      border-radius: 0px!important;
+      border-bottom: 2px solid #1890ff!important;
+    }
+  }
 }
 .menu-prop-card-edit-box::after {
   display: block;
diff --git a/src/menu/components/form/formaction/index.jsx b/src/menu/components/form/formaction/index.jsx
index 5460f4f..2227f2a 100644
--- a/src/menu/components/form/formaction/index.jsx
+++ b/src/menu/components/form/formaction/index.jsx
@@ -237,7 +237,7 @@
         <Modal
           title={dict['model.edit']}
           visible={visible}
-          width={800}
+          width={920}
           maskClosable={false}
           onCancel={this.editModalCancel}
           footer={[
diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx
index 2cfa4c0..4bcfa1c 100644
--- a/src/menu/components/share/actioncomponent/actionform/index.jsx
+++ b/src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -61,13 +61,13 @@
     }],
     interTypeOptions: [{
       value: 'system',
-      text: this.props.dict['model.interface.system']
+      text: '绯荤粺'
     }, {
       value: 'inner',
-      text: this.props.dict['model.interface.inner']
+      text: '鍐呴儴'
     }, {
       value: 'outer',
-      text: this.props.dict['model.interface.outer']
+      text: '澶栭儴'
     }, {
       value: 'custom',
       text: '鑷畾涔�'
@@ -163,18 +163,33 @@
       reOptions.intertype = this.state.interTypeOptions
 
       if (intertype === 'custom') {
-        shows.push('procMode', 'interface', 'callbackType', 'cbTable', 'proInterface', 'method', 'cross')
+        shows.push('procMode', 'interface', 'callbackType', 'proInterface', 'method', 'cross')
         if (this.record.procMode === 'system') {
           shows.push('sql', 'sqlType')
-        } else {
+        } else if (this.record.procMode === 'inner') {
           reRequired.innerFunc = true
           shows.push('innerFunc')
+        }
+        if (this.record.callbackType === 'func') {
+          shows.push('callbackFunc')
+        } else if (this.record.callbackType !== 'none') {
+          shows.push('cbTable')
         }
         reReadonly.interface = false
         reRequired.interface = true
       } else if (intertype === 'outer') {
-        shows.push('innerFunc', 'sysInterface', 'interface', 'proInterface', 'outerFunc', 'callbackFunc', 'output')
-        reRequired.innerFunc = false
+        shows.push('procMode', 'sysInterface', 'interface', 'proInterface', 'outerFunc', 'callbackType', 'output')
+        if (this.record.procMode === 'system') {
+          shows.push('sql', 'sqlType')
+        } else if (this.record.procMode === 'inner') {
+          reRequired.innerFunc = true
+          shows.push('innerFunc')
+        }
+        if (this.record.callbackType === 'func') {
+          shows.push('callbackFunc')
+        } else if (this.record.callbackType !== 'none') {
+          shows.push('cbTable')
+        }
 
         if (this.record.sysInterface === 'false') {
           reReadonly.interface = false
@@ -226,8 +241,18 @@
       reOptions.intertype = this.state.interTypeOptions.filter(item => item.value !== 'custom')
 
       if (intertype === 'outer') {
-        shows.push('innerFunc', 'sysInterface', 'interface', 'proInterface', 'outerFunc', 'callbackFunc')
-        reRequired.innerFunc = false
+        shows.push('procMode', 'sysInterface', 'interface', 'proInterface', 'outerFunc', 'callbackType')
+        if (this.record.procMode === 'system') {
+          shows.push('sql', 'sqlType')
+        } else if (this.record.procMode === 'inner') {
+          reRequired.innerFunc = true
+          shows.push('innerFunc')
+        }
+        if (this.record.callbackType === 'func') {
+          shows.push('callbackFunc')
+        } else if (this.record.callbackType !== 'none') {
+          shows.push('cbTable')
+        }
 
         if (this.record.sysInterface === 'false') {
           reReadonly.interface = false
@@ -265,6 +290,7 @@
       if (this.record.intertype === 'outer') {
         shows.push('innerFunc', 'sysInterface', 'interface', 'proInterface', 'outerFunc', 'callbackFunc')
         reRequired.innerFunc = false
+        reRequired.callbackFunc = false
 
         if (this.record.sysInterface === 'false') {
           reReadonly.interface = false
@@ -346,6 +372,7 @@
         if (this.record.intertype === 'outer') {
           shows.push('innerFunc', 'sysInterface', 'interface', 'proInterface', 'outerFunc', 'callbackFunc')
           reRequired.innerFunc = false
+          reRequired.callbackFunc = false
 
           if (this.record.sysInterface === 'false') {
             reReadonly.interface = false
diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx
index 6ffb4b4..d981ba5 100644
--- a/src/menu/components/share/actioncomponent/formconfig.jsx
+++ b/src/menu/components/share/actioncomponent/formconfig.jsx
@@ -189,6 +189,13 @@
       options: opentypes
     },
     {
+      type: 'text',
+      key: 'label',
+      label: '鎸夐挳鍚嶇О',
+      initVal: card.label,
+      required: true,
+    },
+    {
       type: 'select',
       key: 'funcType',
       label: '鍔熻兘绫诲瀷',
@@ -246,13 +253,6 @@
       options: []
     },
     {
-      type: 'text',
-      key: 'label',
-      label: '鎸夐挳鍚嶇О',
-      initVal: card.label,
-      required: true,
-    },
-    {
       type: 'checkbox',
       key: 'payType',
       label: '鏀粯鏂瑰紡',
@@ -278,6 +278,9 @@
       }, {
         value: 'inner',
         text: '鍐呴儴鍑芥暟'
+      }, {
+        value: 'none',
+        text: '鏃�'
       }]
     },
     {
@@ -424,6 +427,12 @@
       }, {
         value: 'default',
         text: '鍚庡彴鑴氭湰'
+      }, {
+        value: 'func',
+        text: '鍥炶皟鍑芥暟'
+      }, {
+        value: 'none',
+        text: '鏃�'
       }]
     },
     {
@@ -438,7 +447,7 @@
       key: 'callbackFunc',
       label: Formdict['header.form.callbackFunc'],
       initVal: card.callbackFunc || '',
-      required: false,
+      required: true
     },
     {
       type: 'select',
diff --git a/src/menu/components/share/actioncomponent/index.jsx b/src/menu/components/share/actioncomponent/index.jsx
index 8d5a172..f7e1175 100644
--- a/src/menu/components/share/actioncomponent/index.jsx
+++ b/src/menu/components/share/actioncomponent/index.jsx
@@ -533,7 +533,7 @@
         <Modal
           title="鎸夐挳路缂栬緫"
           visible={visible}
-          width={850}
+          width={920}
           maskClosable={false}
           onCancel={this.editModalCancel}
           footer={[
diff --git a/src/menu/datasource/verifycard/columnform/index.jsx b/src/menu/datasource/verifycard/columnform/index.jsx
index 2606571..c378989 100644
--- a/src/menu/datasource/verifycard/columnform/index.jsx
+++ b/src/menu/datasource/verifycard/columnform/index.jsx
@@ -53,7 +53,7 @@
                     message: dict['form.required.input'] + '鍚嶇О!'
                   }
                 ]
-              })(<Input placeholder="" autoComplete="off" />)}
+              })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleConfirm}/>)}
             </Form.Item>
           </Col>
           <Col span={6}>
@@ -70,7 +70,7 @@
                     message: '瀛楁鍚嶅彧鍏佽鍖呭惈鏁板瓧銆佸瓧姣嶃�佹眽瀛椾互鍙奯'
                   }
                 ]
-              })(<Input placeholder="" autoComplete="off" />)}
+              })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleConfirm} />)}
             </Form.Item>
           </Col>
           <Col span={6}>
diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index 473d3e1..37d57c9 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -267,12 +267,20 @@
       return
     } else if (!['requiredSgl', 'notRequired', 'requiredOnce', 'required'].includes(btn.Ot)) {
       // 鏁版嵁閫夋嫨绫诲瀷鏍¢獙
-      this.actionSettingError()
+      notification.warning({
+        top: 92,
+        message: '鎸夐挳琛岃缃敊璇紒',
+        duration: 5
+      })
       return
     } else if (btn.intertype === 'system') {
       // 浣跨敤鍐呴儴鎺ュ彛鏃讹紝鎿嶄綔绫诲瀷鍜屾暟鎹簮涓嶅彲涓虹┖
       if (!btn.sql || !btn.sqlType) {
-        this.actionSettingError()
+        notification.warning({
+          top: 92,
+          message: '鎸夐挳鎿嶄綔绫诲瀷閿欒锛�',
+          duration: 5
+        })
         return
       } else if (data.length === 0 && btn.verify && btn.verify.voucher && btn.verify.voucher.enabled) {
         notification.warning({
@@ -285,12 +293,20 @@
     } else if (btn.intertype === 'inner') {
       // 浣跨敤鍐呴儴鎺ュ彛鏃讹紝鍐呴儴鍑芥暟涓嶅彲涓虹┖
       if (!btn.innerFunc) {
-        this.actionSettingError()
+        notification.warning({
+          top: 92,
+          message: '鎸夐挳鍐呴儴鍑芥暟涓嶅彲涓虹┖锛�',
+          duration: 5
+        })
         return
       }
-    } else if (btn.intertype === 'custom') {
+    } else if (btn.intertype === 'custom' || btn.intertype === 'outer') {
       if (btn.callbackType === 'script' && (!btn.verify || !btn.verify.cbScripts || !btn.verify.cbScripts.filter(item => item.status !== 'false').length === 0)) {
-        this.actionSettingError()
+        notification.warning({
+          top: 92,
+          message: '浣跨敤鑷畾涔夎剼鏈洖璋冩椂锛屽洖璋冭剼鏈笉鍙负绌猴紒',
+          duration: 5
+        })
         return
       } else if (btn.procMode === 'system' && data.length === 0 && btn.verify && btn.verify.voucher && btn.verify.voucher.enabled) {
         notification.warning({
@@ -299,7 +315,7 @@
           duration: 5
         })
         return
-      } else if (window.GLOB.systemType === 'production' && !btn.proInterface) {
+      } else if (btn.intertype === 'custom' && window.GLOB.systemType === 'production' && !btn.proInterface) {
         notification.warning({
           top: 92,
           message: '灏氭湭璁剧疆姝e紡绯荤粺鎺ュ彛鍦板潃锛�',
@@ -307,15 +323,13 @@
         })
         return
       }
-    } else if (btn.intertype === 'outer') {
-      // 鎺ュ彛鍦板潃涓嶅瓨鍦ㄦ椂鎶ラ敊
-      if (!btn.interface && btn.sysInterface !== 'true') {
-        this.actionSettingError()
-        return
-      }
     } else if (!['inner', 'outer', 'system', 'custom'].includes(btn.intertype)) {
       // 鎺ュ彛绫诲瀷閿欒
-      this.actionSettingError()
+      notification.warning({
+        top: 92,
+        message: '鎸夐挳鎺ュ彛绫诲瀷閿欒锛�',
+        duration: 5
+      })
       return
     }
 
@@ -673,13 +687,13 @@
     return _params
   }
 
-  getInnerParam = (data, formdata) => {
-    const { setting, btn } = this.props
+  getInnerParam = (data, formdata, retmsg) => {
+    const { setting, btn, columns } = this.props
     let _params = []
 
     if ( btn.Ot === 'notRequired' || btn.Ot === 'requiredSgl' || btn.Ot === 'requiredOnce' ) {
       let param = {
-        func: btn.innerFunc
+        func: btn.innerFunc || ''
       }
 
       if (this.props.BID) {
@@ -708,6 +722,10 @@
         param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
         param.secretkey = Utils.encrypt(param.LTextOut, param.timestamp)
         param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp)
+      }
+
+      if (retmsg) {
+        param.$callbacksql = this.getSysDeclareSql(btn, formdata, data[0], columns)
       }
 
       _params.push(param)
@@ -747,11 +765,188 @@
           param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp)
         }
 
+        if (retmsg) {
+          param.$callbacksql = this.getSysDeclareSql(btn, formdata, cell, columns)
+        }
+
         return param
       })
     }
 
     return _params
+  }
+
+  /**
+   * @description 鑾峰彇鍥炶皟鑴氭湰鐨勫瓧娈靛畾涔�
+   */
+  getSysDeclareSql = (btn, formdata, data, columns) => {
+    let datavars = {}                 // 澹版槑鐨勫彉閲忥紝琛ㄥ崟鍙婃樉绀哄垪
+    // 闇�瑕佸0鏄庣殑鍙橀噺闆�
+    let _vars = ['tbid', 'errorcode', 'retmsg', 'billcode', 'bvoucher', 'fibvoucherdate', 'fiyear', 'username', 'fullname', 'modulardetailcode', 'roleid', 'mk_departmentcode', 'mk_organization', 'mk_user_type', 'mk_nation', 'mk_province', 'mk_city', 'mk_district', 'mk_address', 'bid']
+  
+    // sql璇彞
+    let _sql = ''
+  
+    let _initvars = [] // 宸茶祴鍊煎瓧娈甸泦
+    let _initFormfields = []
+    let _initColfields = []
+    let _declarefields = []
+  
+    // 鑾峰彇瀛楁閿�煎
+    formdata && formdata.forEach(form => {
+      let _key = form.key.toLowerCase()
+      datavars[_key] = form.value
+  
+      if (!_initvars.includes(_key)) {
+        _initvars.push(_key)
+  
+        if (form.type === 'number' || form.type === 'rate') {
+          let val = form.value
+          if (typeof(val) !== 'number') {
+            val = parseFloat(val)
+            if (isNaN(val)) {
+              val = 0
+            }
+          }
+          _initFormfields.push(`@${_key}=${val}`)
+        } else if (['date', 'datemonth', 'datetime'].includes(form.type)) {
+          _initFormfields.push(`@${_key}='${form.value || '1949-10-01'}'`)
+        } else {
+          _initFormfields.push(`@${_key}='${form.value}'`)
+        }
+      }
+      
+      if (!_vars.includes(_key)) {
+        _vars.push(_key)
+  
+        if (form.fieldlen && form.fieldlen > 2048) {
+          form.fieldlen = 'max'
+        }
+  
+        let _type = `nvarchar(${form.fieldlen})`
+  
+        if (form.type.match(/date/ig)) {
+          _type = 'datetime'
+        } else if (form.type === 'number') {
+          _type = `decimal(18,${form.fieldlen})`
+        } else if (form.type === 'rate') {
+          _type = `decimal(18,2)`
+        }
+  
+        _declarefields.push(`@${_key} ${_type}`)
+      }
+    })
+  
+    if (data) {
+      Object.keys(data).forEach(key => {
+        data[key.toLowerCase()] = data[key]
+      })
+    }
+  
+    // 娣诲姞鏁版嵁涓瓧娈碉紝琛ㄥ崟鍊间紭鍏�(鎸夐挳涓嶉�夎鎴栧琛屾嫾鎺ユ椂璺宠繃)
+    if (data && btn.Ot !== 'notRequired' && btn.Ot !== 'requiredOnce') {
+      datavars = {...data, ...datavars}
+  
+      const setField = (col) => {
+        if (!col.field) return
+        let _key = col.field.toLowerCase()
+  
+        if (!_initvars.includes(_key)) {
+          let _val = datavars.hasOwnProperty(_key) ? datavars[_key] : ''
+  
+          if (col.datatype && /^date/ig.test(col.datatype) && !_val) {
+            _val = '1949-10-01'
+          }
+  
+          _initvars.push(_key)
+          _initColfields.push(`@${_key}='${_val}'`)
+        }
+        
+        if (!_vars.includes(_key)) {
+          _vars.push(_key)
+  
+          if (col.datatype) {
+            _declarefields.push(`@${_key} ${col.datatype}`)
+          } else {
+            if (col.fieldlength && col.fieldlength > 2048) {
+              col.fieldlength = 'max'
+            }
+  
+            let _type = `nvarchar(${col.fieldlength || 50})`
+  
+            if (col.type === 'number') {
+              let _length = col.decimal ? col.decimal : 0
+              _type = `decimal(18,${_length})`
+            } else if (col.type === 'picture' || col.type === 'textarea') {
+              _type = `nvarchar(${col.fieldlength || 512})`
+            }
+  
+            _declarefields.push(`@${_key} ${_type}`)
+          }
+        }
+      }
+  
+      if (columns && columns.length > 0) {
+        columns.forEach(col => {
+          if (col.type === 'colspan' || col.type === 'old_colspan') {
+            col.subcols.forEach(cell => {
+              setField(cell)
+            })
+          } else {
+            setField(col)
+          }
+        })
+      }
+    }
+  
+    // 鍙橀噺澹版槑
+    _declarefields = _declarefields.join(',')
+    if (_declarefields) {
+      _declarefields = ',' + _declarefields
+    }
+    _sql = `/* 绯荤粺鐢熸垚 */
+        Declare @tbid nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@BillCode nvarchar(50),@BVoucher nvarchar(50),@FIBVoucherDate nvarchar(50), @FiYear nvarchar(50),@ModularDetailCode nvarchar(50), @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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),@bid nvarchar(50)${_declarefields}
+      `
+  
+    let userName = sessionStorage.getItem('User_Name') || ''
+    let fullName = sessionStorage.getItem('Full_Name') || ''
+    let RoleID = sessionStorage.getItem('role_id') || ''
+    let departmentcode = sessionStorage.getItem('departmentcode') || ''
+    let organization = sessionStorage.getItem('organization') || ''
+    let mk_user_type = sessionStorage.getItem('mk_user_type') || ''
+    let nation = sessionStorage.getItem('nation') || ''
+    let province = sessionStorage.getItem('province') || ''
+    let city = sessionStorage.getItem('city') || ''
+    let district = sessionStorage.getItem('district') || ''
+    let address = sessionStorage.getItem('address') || ''
+  
+    if (sessionStorage.getItem('isEditState') === 'true') {
+      userName = sessionStorage.getItem('CloudUserName') || ''
+      fullName = sessionStorage.getItem('CloudFullName') || ''
+    }
+  
+    // 鍒濆鍖栧嚟璇佸強鐢ㄦ埛淇℃伅瀛楁
+    _sql += `
+        /* 鍑瘉鍙婄敤鎴蜂俊鎭垵濮嬪寲璧嬪�� */
+        select @BVoucher='',@FIBVoucherDate='',@FiYear='',@ErrorCode='',@retmsg='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}', @BillCode='', @ModularDetailCode=''
+        `
+  
+    // 琛ㄥ崟鍙橀噺璧嬪��
+    if (_initFormfields.length > 0) {
+      _sql += `
+        /* 琛ㄥ崟鍙橀噺璧嬪�� */
+        select ${_initFormfields.join(',')}
+        `
+    }
+    // 鏄剧ず鍒楀彉閲忚祴鍊�
+    if (_initColfields.length > 0) {
+      _sql += `
+        /* 鏄剧ず鍒楀彉閲忚祴鍊� */
+        select ${_initColfields.join(',')}
+        `
+    }
+
+    return _sql
   }
 
   /**
@@ -875,58 +1070,10 @@
       /** *********************璋冪敤澶栭儴鎺ュ彛************************* */
       let _params = [] // 璇锋眰鍙傛暟鏁扮粍
 
-      if (btn.Ot === 'notRequired' || btn.Ot === 'requiredSgl' || btn.Ot === 'requiredOnce') {
-        let param = {}
-
-        if (this.props.BID) {
-          param.BID = this.props.BID
-        }
-
-        if ((btn.OpenType === 'pop' || btn.OpenType === 'formSubmit' || btn.OpenType === 'form') && formdata) { // 琛ㄥ崟
-          formdata.forEach(_data => {
-            param[_data.key] = _data.value
-          })
-        }
-
-        // 鑾峰彇id
-        if (btn.Ot === 'notRequired') {
-          
-        } else if (btn.Ot === 'requiredSgl' && setting.primaryKey) {
-          param[setting.primaryKey] = data[0][setting.primaryKey]
-        } else if (btn.Ot === 'requiredOnce' && setting.primaryKey) {
-          let ids = data.map(d => { return d[setting.primaryKey]})
-          param[setting.primaryKey] = ids.join(',')
-        }
-
-        _params.push(param)
-      } else if (btn.Ot === 'required') {
-        // 閫夋嫨澶氳锛屽惊鐜皟鐢�
-        _params = data.map((cell, index) => {
-          let _cell = {}
-
-          if (this.props.BID) {
-            _cell.BID = this.props.BID
-          }
-
-          let _formparam = {}
-          if (btn.OpenType === 'pop' && formdata) { // 琛ㄥ崟
-            formdata.forEach(_data => {
-              if (index !== 0 && _data.readin && cell.hasOwnProperty(_data.key)) {
-                _formparam[_data.key] = cell[_data.key]
-              } else {
-                _formparam[_data.key] = _data.value
-              }
-            })
-          }
-
-          if (setting.primaryKey) {
-            _cell[setting.primaryKey] = cell[setting.primaryKey]
-          }
-
-          _cell = {..._formparam, ..._cell}
-
-          return _cell
-        })
+      if (btn.procMode === 'system') {
+        _params = this.getSystemParam(data, formdata, btn.callbackType === 'script')
+      } else {
+        _params = this.getInnerParam(data, formdata, btn.callbackType === 'script')
       }
 
       if (_params.length > 1 && btn.progress === 'progressbar' && btn.$toolbtn) {
@@ -936,18 +1083,18 @@
       }
 
       // 寰幆璋冪敤澶栭儴鎺ュ彛锛堝寘鎷唴閮ㄥ強鍥炶皟鍑芥暟锛�
-      this.outerLoopRequest(_params, btn, _resolve)
+      this.outerLoopRequest(_params, _resolve)
     } else if (btn.intertype === 'custom') { // 绯荤粺鎺ュ彛
       let params = []
 
       if (btn.procMode === 'system') {
-        params = this.getSystemParam(data, formdata, true)
+        params = this.getSystemParam(data, formdata, btn.callbackType === 'script')
         params = params.map(item => {
           item.script_type = 'Y'
           return item
         })
       } else {
-        params = this.getInnerParam(data, formdata)
+        params = this.getInnerParam(data, formdata, btn.callbackType === 'script')
       }
 
       if (params.length > 1 && btn.progress === 'progressbar' && btn.$toolbtn) {
@@ -978,6 +1125,11 @@
 
     delete param.$callbacksql
 
+    if (!param.func) {
+      this.customOuterRequest(params, param, record, _resolve)
+      return
+    }
+
     Api.genericInterface(param).then(res => {
       if (res.status) {
         if ((res.mk_ex_invoke === 'false' || res.mk_ex_invoke === false) && params.length === 0) {
@@ -988,41 +1140,6 @@
         } else {
           this.customOuterRequest(params, res, record, _resolve)
         }
-      } else if (res.ErrCode === 'C' && this.state.checkParam) {
-        const _this = this
-        confirm({
-          title: res.message || res.ErrMesg,
-          content: '缁х画鎵ц锛�',
-          onOk() {
-            return new Promise(resolve => {
-              Api.genericInterface(_this.state.checkParam).then((result) => {
-                if (result.status) {
-                  if ((result.mk_ex_invoke === 'false' || result.mk_ex_invoke === false) && params.length === 0) {
-                    _this.execSuccess(result)
-                    _resolve()
-                  } else if ((result.mk_ex_invoke === 'false' || result.mk_ex_invoke === false) && params.length > 0) {
-                    _this.customLoopRequest(params, _resolve)
-                  } else {
-                    _this.customOuterRequest(params, result, record, _resolve)
-                  }
-                } else {
-                  _this.execError(result)
-                  _resolve()
-                }
-                resolve()
-              }, () => {
-                _this.updateStatus()
-                resolve()
-                _resolve()
-              })
-            })
-          },
-          onCancel() {
-            _this.execError({...res, ErrCode: 'P'})
-            _resolve()
-          }
-        })
-        this.setState({checkParam: null})
       } else {
         this.execError(res)
         _resolve()
@@ -1105,6 +1222,68 @@
    * @description 鍥炶皟璇锋眰寰幆鎵ц
    */
   customCallbackRequest = (params, result, record, _resolve) => {
+    const { btn } = this.props
+
+    let param = null
+
+    if (btn.callbackType === 'script' || btn.callbackType === 'default') {
+      param = this.getCallBackSql(result, record)
+    } else if (btn.callbackType === 'func') {
+      param = {
+        func: btn.callbackFunc,
+        ...result
+      }
+      if (result.$ErrCode === 'E') {
+        delete param.$ErrCode
+        delete param.$ErrMesg
+
+        param.ErrCode = 'E'
+      }
+    } else {
+      if (result.$ErrCode === 'E') {
+        result.status = false
+        result.message = result.$ErrMesg
+        result.ErrCode = 'E'
+        result.ErrMesg = result.$ErrMesg
+      } else {
+        result.status = result.status !== false
+        result.ErrCode = result.ErrCode || '-1'
+      }
+
+      if (result.status) {
+        if (params.length === 0) {
+          this.execSuccess(result)
+          _resolve()
+        } else {
+          this.customLoopRequest(params, _resolve)
+        }
+      } else {
+        this.execError(result)
+        _resolve()
+      }
+
+      return
+    }
+
+    Api.genericInterface(param).then(res => {
+      if (res.status) {
+        if (params.length === 0) {
+          this.execSuccess(res)
+          _resolve()
+        } else {
+          this.customLoopRequest(params, _resolve)
+        }
+      } else {
+        this.execError(res)
+        _resolve()
+      }
+    }, () => {
+      this.updateStatus()
+      _resolve()
+    })
+  }
+
+  getCallBackSql = (result, record) => {
     const { btn } = this.props
     let lines = []
     let pre = btn.callbackType === 'script' ? '@' : ''
@@ -1273,22 +1452,7 @@
       }
     }
 
-    Api.genericInterface(param).then(res => {
-      if (res.status) {
-        if (params.length === 0) {
-          this.execSuccess(res)
-          _resolve()
-        } else {
-          this.customLoopRequest(params, _resolve)
-        }
-      } else {
-        this.execError(res)
-        _resolve()
-      }
-    }, () => {
-      this.updateStatus()
-      _resolve()
-    })
+    return param
   }
 
   /**
@@ -1352,137 +1516,153 @@
   /**
    * @description 澶栭儴璇锋眰寰幆鎵ц
    */
-  outerLoopRequest = (params, btn, _resolve) => {
+  outerLoopRequest = (params, _resolve) => {
     if (!params && params.length === 0) return
 
     let param = params.shift()
-    let _outParam = null
 
     this.setState({
       loadingNumber: params.length
     })
 
-    new Promise(resolve => {
-      // 鍐呴儴璇锋眰
-      if (btn.innerFunc) {
-        param.func = btn.innerFunc
+    let record = {
+      BID: param.BID || '',
+      ID: param.ID || '',
+      callbacksql: param.$callbacksql || ''
+    }
 
-        // 鍑芥暟 s_sDataDictb_TBBack 浜戠楠岃瘉
-        if (window.GLOB.mkHS && param.func === 's_sDataDictb_TBBack' && param.LTextOut) {
-          param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-          param.secretkey = Utils.encrypt(param.LTextOut, param.timestamp)
-          param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp)
-        }
+    delete param.$callbacksql
 
-        // 瀛樺湪鍐呴儴鍑芥暟鏃讹紝鏁版嵁棰勫鐞�
-        Api.genericInterface(param).then(res => {
-          if (res.status) {
-            delete res.ErrCode
-            delete res.ErrMesg
-            delete res.message
-            delete res.status
+    if (!param.func) {
+      this.outerOuterRequest(params, param, record, _resolve)
+      return
+    }
 
-            // 浣跨敤澶勭悊鍚庣殑鏁版嵁璋冪敤澶栭儴鎺ュ彛
-            let keys = Object.keys(res) // 鎻愪氦澶栭儴鎺ュ彛鍓嶏紝娣诲姞BID
-            if (this.props.BID && keys.filter(key => key.toLowerCase() === 'bid').length === 0) {
-              res.BID = this.props.BID
-            }
-            
-            resolve(res)
-          } else {
-            this.execError(res, btn)
-            resolve(false)
-            _resolve()
-          }
-        }, () => {
-          this.updateStatus()
-          _resolve()
-        })
-      } else {
-        resolve(param)
-      }
-    }).then(res => {
-      if (!res) return
-      // 澶栭儴璇锋眰
-      _outParam = JSON.parse(JSON.stringify(res))
-
-      if (btn.outerFunc) {
-        res.func = btn.outerFunc
-      }
-      if (window.GLOB.mkHS) {
-        if (btn.sysInterface === 'true' && options.cloudServiceApi) {
-          res.rduri = options.cloudServiceApi
-        } else if (btn.sysInterface !== 'true') {
-          if (window.GLOB.systemType === 'production' && btn.proInterface) {
-            res.rduri = btn.proInterface
-          } else {
-            res.rduri = btn.interface
-          }
-        }
-
-        // 鍑芥暟 s_sDataDictb_TBBack 浜戠楠岃瘉
-        if (res.func === 's_sDataDictb_TBBack' && res.LTextOut) {
-          res.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-          res.secretkey = Utils.encrypt(res.LTextOut, res.timestamp)
-          res.open_key = Utils.encryptOpenKey(res.secretkey, res.timestamp)
-        }
-      } else {
-        if (btn.sysInterface === 'true' && window.GLOB.mainSystemApi) {
-          res.rduri = window.GLOB.mainSystemApi
-        } else if (btn.sysInterface !== 'true') {
-          if (window.GLOB.systemType === 'production' && btn.proInterface) {
-            res.rduri = btn.proInterface
-          } else {
-            res.rduri = btn.interface
-          }
-        }
-      }
-
-      return Api.genericInterface(res)
-    }).then(response => {
-      if (!response) return
-      // 鍥炶皟璇锋眰
-      if (btn.callbackFunc) {
-        // 瀛樺湪鍥炶皟鍑芥暟鏃讹紝璋冪敤
-        delete response.message
-        delete response.status
-
-        response.func = btn.callbackFunc
-
-        let _callbackparam = {..._outParam, ...response}
-
-        // 鍑芥暟 s_sDataDictb_TBBack 浜戠楠岃瘉
-        if (window.GLOB.mkHS && _callbackparam.func === 's_sDataDictb_TBBack' && _callbackparam.LTextOut) {
-          _callbackparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-          _callbackparam.secretkey = Utils.encrypt(_callbackparam.LTextOut, _callbackparam.timestamp)
-          _callbackparam.open_key = Utils.encryptOpenKey(_callbackparam.secretkey, _callbackparam.timestamp)
-        }
-
-        return Api.genericInterface(_callbackparam)
-      } else {
-        if (response.status) {
-          // 涓�娆¤姹傛垚鍔燂紝杩涜涓嬩竴椤硅姹�
-
-          if (params.length === 0) {
-            this.execSuccess(response)
-            _resolve()
-          } else {
-            this.outerLoopRequest(params, btn, _resolve)
-          }
-        } else {
-          this.execError(response)
-          _resolve()
-        }
-      }
-    }).then(res => {
-      if (!res) return
-
+    Api.genericInterface(param).then(res => {
       if (res.status) {
+        if ((res.mk_ex_invoke === 'false' || res.mk_ex_invoke === false) && params.length === 0) {
+          this.execSuccess(res)
+          _resolve()
+        } else if ((res.mk_ex_invoke === 'false' || res.mk_ex_invoke === false) && params.length > 0) {
+          this.outerLoopRequest(params, _resolve)
+        } else {
+          delete res.mk_ex_invoke
+          delete res.ErrCode
+          delete res.ErrMesg
+          delete res.message
+          delete res.status
+
+          // 浣跨敤澶勭悊鍚庣殑鏁版嵁璋冪敤澶栭儴鎺ュ彛
+          let keys = Object.keys(res) // 鎻愪氦澶栭儴鎺ュ彛鍓嶏紝娣诲姞BID
+          if (this.props.BID && keys.filter(key => key.toLowerCase() === 'bid').length === 0) {
+            res.BID = this.props.BID
+          }
+
+          this.outerOuterRequest(params, res, record, _resolve)
+        }
+      } else {
+        this.execError(res)
+        _resolve()
+      }
+    }, () => {
+      this.updateStatus()
+      _resolve()
+    })
+  }
+
+  outerOuterRequest = (params, result, record, _resolve) => {
+    const { btn } = this.props
+    let outParam = JSON.parse(JSON.stringify(result))
+
+    if (btn.outerFunc) {
+      result.func = btn.outerFunc
+    }
+    if (window.GLOB.mkHS) {
+      if (btn.sysInterface === 'true' && options.cloudServiceApi) {
+        result.rduri = options.cloudServiceApi
+      } else if (btn.sysInterface !== 'true') {
+        if (window.GLOB.systemType === 'production' && btn.proInterface) {
+          result.rduri = btn.proInterface
+        } else {
+          result.rduri = btn.interface
+        }
+      }
+
+      // 鍑芥暟 s_sDataDictb_TBBack 浜戠楠岃瘉
+      if (result.func === 's_sDataDictb_TBBack' && result.LTextOut) {
+        result.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+        result.secretkey = Utils.encrypt(result.LTextOut, result.timestamp)
+        result.open_key = Utils.encryptOpenKey(result.secretkey, result.timestamp)
+      }
+    } else {
+      if (btn.sysInterface === 'true' && window.GLOB.mainSystemApi) {
+        result.rduri = window.GLOB.mainSystemApi
+      } else if (btn.sysInterface !== 'true') {
+        if (window.GLOB.systemType === 'production' && btn.proInterface) {
+          result.rduri = btn.proInterface
+        } else {
+          result.rduri = btn.interface
+        }
+      }
+    }
+
+    Api.genericInterface(result).then(res => {
+      this.outerCallbackRequest(params, res, record, outParam, _resolve)
+    }, () => {
+      this.outerCallbackRequest(params, {status: false, message: 500, ErrCode: 'E', ErrMesg: 500}, record, outParam, _resolve)
+    })
+  }
+
+  /**
+   * @description 鍥炶皟璇锋眰寰幆鎵ц
+   */
+  outerCallbackRequest = (params, result, record, outParam, _resolve) => {
+    const { btn } = this.props
+
+    let param = null
+
+    if (btn.callbackType === 'script' || btn.callbackType === 'default') {
+      param = this.getCallBackSql(result, record)
+    } else if (btn.callbackType === 'func' || btn.callbackFunc) {
+      delete result.message
+      delete result.status
+
+      param = {
+        func: btn.callbackFunc,
+        ...outParam,
+        ...result
+      }
+
+      // 鍑芥暟 s_sDataDictb_TBBack 浜戠楠岃瘉
+      if (window.GLOB.mkHS && param.func === 's_sDataDictb_TBBack' && param.LTextOut) {
+        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+        param.secretkey = Utils.encrypt(param.LTextOut, param.timestamp)
+        param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp)
+      }
+    } else {
+      if (result.status) {
+        if (params.length === 0) {
+          this.execSuccess(result)
+          _resolve()
+        } else {
+          this.outerLoopRequest(params, _resolve)
+        }
+      } else {
+        this.execError(result)
+        _resolve()
+      }
+
+      return
+    }
+
+    Api.genericInterface(param).then(res => {
+      if (res.status) {
+        // 涓�娆¤姹傛垚鍔燂紝杩涜涓嬩竴椤硅姹�
         if (params.length === 0) {
           this.execSuccess(res)
           _resolve()
         } else {
-          this.outerLoopRequest(params, btn, _resolve)
+          this.outerLoopRequest(params, _resolve)
         }
       } else {
         this.execError(res)
@@ -1935,17 +2115,6 @@
       let data = this.props.selectedData && this.props.selectedData[0] ? this.props.selectedData[0] : null
       this.setState({check: data && data[btn.field] === btn.openVal})
     }
-  }
-
-  /**
-   * @description 鎸夐挳閰嶇疆淇℃伅閿欒鎻愮ず
-   */
-  actionSettingError = () => {
-    notification.warning({
-      top: 92,
-      message: this.state.dict['main.action.settingerror'],
-      duration: 5
-    })
   }
 
   handleModelConfig = (config) => {
diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx
index 1496a1f..ffb77bc 100644
--- a/src/tabviews/zshare/mutilform/index.jsx
+++ b/src/tabviews/zshare/mutilform/index.jsx
@@ -306,10 +306,8 @@
           {
             max: item.fieldlength,
             message: formRule.input.formMessage.replace('@max', item.fieldlength)
-          }
-        ]
-        if (item.encryption !== 'true') {
-          _rules.push({
+          },
+          {
             pattern: /^[^']*$/ig,
             message: '涓嶅彲浣跨敤鑻辨枃鐘舵�佺殑鍗曞紩鍙凤紒'
           }, {
@@ -320,8 +318,8 @@
                 callback()
               }
             }
-          })
-        }
+          }
+        ]
         item.rules = _rules
       } else if (item.type === 'brafteditor') {
         item.rules = [
diff --git a/src/tabviews/zshare/mutilform/mkInput/index.jsx b/src/tabviews/zshare/mutilform/mkInput/index.jsx
index fd313ea..f147110 100644
--- a/src/tabviews/zshare/mutilform/mkInput/index.jsx
+++ b/src/tabviews/zshare/mutilform/mkInput/index.jsx
@@ -1,6 +1,7 @@
 import React, { Component } from 'react'
 import { is, fromJS } from 'immutable'
 import { Input } from 'antd'
+import md5 from 'md5'
 
 import MKEmitter from '@/utils/events.js'
 
@@ -14,9 +15,25 @@
     super(props)
     
     const config = props.config
+    let _value = config.initval
+    let encryption = 'false'
+
+    if (config.encryption === 'true') {
+      encryption = 'true'
+      if (_value) {
+        try {
+          _value = window.decodeURIComponent(window.atob(_value))
+        } catch (e) {
+          _value = config.initval
+        }
+      }
+    } else if (config.encryption === 'md5') {
+      encryption = 'md5'
+    }
     
     this.state = {
-      value: config.initval
+      value: _value,
+      encryption
     }
   }
   
@@ -43,27 +60,55 @@
       this.inputRef.current.select()
     } else if (type === 'input') {
       this.setState({value})
-      this.props.onChange(value, true)
+      let _val = value
+
+      if (this.state.encryption === 'true') {
+        try {
+          _val = window.btoa(window.encodeURIComponent(_val))
+        } catch (e) {
+          _val = value
+        }
+        this.props.onChange(_val)
+      } else if (this.state.encryption === 'md5') {
+        _val = _val + ''
+        _val = md5(_val.toLowerCase())
+        _val = _val.toUpperCase()
+        
+        this.props.onChange(_val)
+      } else {
+        this.props.onChange(_val, true)
+      }
     }
   }
 
   handleChange = (e) => {
     let val = e.target.value
+    let submit = /\n/ig.test(val)
 
-    if (!/\n/ig.test(val)) {
-      this.props.onChange(val)
-      this.setState({value: val})
-      if (!val) {
+    val = val.replace(/\n/ig, '')
+
+    let _val = val
+
+    if (this.state.encryption === 'true') {
+      try {
+        _val = window.btoa(window.encodeURIComponent(_val))
+      } catch (e) {
+        _val = val
+      }
+    } else if (this.state.encryption === 'md5') {
+      _val = md5(_val.toLowerCase())
+      _val = _val.toUpperCase()
+    }
+
+    this.props.onChange(_val)
+
+    this.setState({value: val}, () => {
+      if (submit) {
+        this.handleInputSubmit()
+      } else if (!val) {
         this.inputRef.current.focus()
       }
-    } else {
-      val = val.replace(/\n/ig, '')
-
-      this.props.onChange(val)
-      this.setState({value: val}, () => {
-        this.handleInputSubmit()
-      })
-    }
+    })
   }
 
   handleInputSubmit = () => {
diff --git a/src/tabviews/zshare/mutilform/mkTextArea/index.jsx b/src/tabviews/zshare/mutilform/mkTextArea/index.jsx
index 444d185..90668e5 100644
--- a/src/tabviews/zshare/mutilform/mkTextArea/index.jsx
+++ b/src/tabviews/zshare/mutilform/mkTextArea/index.jsx
@@ -1,6 +1,7 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { Input } from 'antd'
+import md5 from 'md5'
 
 import MKEmitter from '@/utils/events.js'
 
@@ -33,6 +34,8 @@
           _value = config.initval
         }
       }
+    } else if (config.encryption === 'md5') {
+      encryption = 'md5'
     }
     
     this.setState({
@@ -58,7 +61,23 @@
       this.inputRef.current.focus()
     } else if (type === 'input') {
       this.setState({value})
-      this.props.onChange(value, true)
+      let _val = value
+
+      if (this.state.encryption === 'true') {
+        try {
+          _val = window.btoa(window.encodeURIComponent(_val))
+        } catch (e) {
+          _val = value
+        }
+        this.props.onChange(_val)
+      } else if (this.state.encryption === 'md5') {
+        _val = _val + ''
+        _val = md5(_val.toLowerCase())
+        _val = _val.toUpperCase()
+        this.props.onChange(_val)
+      } else {
+        this.props.onChange(_val, true)
+      }
     }
   }
 
@@ -75,7 +94,11 @@
       } catch (e) {
         _val = val
       }
+    } else if (encryption === 'md5') {
+      _val = md5(_val.toLowerCase())
+      _val = _val.toUpperCase()
     }
+
     this.props.onChange(_val)
   }
 
diff --git a/src/templates/formtabconfig/index.jsx b/src/templates/formtabconfig/index.jsx
index c37b457..aef7eda 100644
--- a/src/templates/formtabconfig/index.jsx
+++ b/src/templates/formtabconfig/index.jsx
@@ -1955,7 +1955,7 @@
         <Modal
           title={this.state.dict['model.action'] + '-' + this.state.dict['model.edit']}
           visible={modaltype === 'actionEdit'}
-          width={900}
+          width={920}
           maskClosable={false}
           onCancel={this.editModalCancel}
           footer={[
diff --git a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx
index e244c74..b2fb7b4 100644
--- a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx
@@ -149,18 +149,34 @@
       reOptions.intertype = this.state.interTypeOptions
 
       if (intertype === 'custom') {
-        shows.push('procMode', 'interface', 'callbackType', 'cbTable', 'proInterface', 'method', 'cross')
+        shows.push('procMode', 'interface', 'callbackType', 'proInterface', 'method', 'cross')
         if (this.record.procMode === 'system') {
           shows.push('sql', 'sqlType')
-        } else {
+        } else if (this.record.procMode === 'inner') {
           reRequired.innerFunc = true
           shows.push('innerFunc')
+        }
+        if (this.record.callbackType === 'func') {
+          shows.push('callbackFunc')
+        } else if (this.record.callbackType !== 'none') {
+          shows.push('cbTable')
         }
         reReadonly.interface = false
         reRequired.interface = true
       } else if (intertype === 'outer') {
-        shows.push('innerFunc', 'sysInterface', 'interface', 'proInterface', 'outerFunc', 'callbackFunc', 'output')
-        reRequired.innerFunc = false
+        shows.push('procMode', 'sysInterface', 'interface', 'proInterface', 'outerFunc', 'callbackType', 'output')
+        // reRequired.innerFunc = false
+        if (this.record.procMode === 'system') {
+          shows.push('sql', 'sqlType')
+        } else if (this.record.procMode === 'inner') {
+          reRequired.innerFunc = true
+          shows.push('innerFunc')
+        }
+        if (this.record.callbackType === 'func') {
+          shows.push('callbackFunc')
+        } else if (this.record.callbackType !== 'none') {
+          shows.push('cbTable')
+        }
 
         if (this.record.sysInterface === 'false') {
           reReadonly.interface = false
@@ -198,6 +214,7 @@
       if (this.record.intertype === 'outer') {
         shows.push('innerFunc', 'sysInterface', 'interface', 'proInterface', 'outerFunc', 'callbackFunc')
         reRequired.innerFunc = false
+        reRequired.callbackFunc = false
 
         if (this.record.sysInterface === 'false') {
           reReadonly.interface = false
@@ -260,6 +277,7 @@
         if (this.record.intertype === 'outer') {
           shows.push('innerFunc', 'sysInterface', 'interface', 'proInterface', 'outerFunc', 'callbackFunc')
           reRequired.innerFunc = false
+          reRequired.callbackFunc = false
 
           if (this.record.sysInterface === 'false') {
             reReadonly.interface = false
diff --git a/src/templates/sharecomponent/actioncomponent/actionform/index.scss b/src/templates/sharecomponent/actioncomponent/actionform/index.scss
index fab019a..5e09b99 100644
--- a/src/templates/sharecomponent/actioncomponent/actionform/index.scss
+++ b/src/templates/sharecomponent/actioncomponent/actionform/index.scss
@@ -4,6 +4,11 @@
     color: #1890ff;
     cursor: pointer;
   }
+  >.ant-row >.ant-col {
+    float: none;
+    display: inline-block;
+    vertical-align: top;
+  }
   .textarea {
     .ant-col-sm-7 {
       width: 14%;
diff --git a/src/templates/sharecomponent/actioncomponent/index.jsx b/src/templates/sharecomponent/actioncomponent/index.jsx
index 9e10a8f..2e82251 100644
--- a/src/templates/sharecomponent/actioncomponent/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/index.jsx
@@ -932,7 +932,7 @@
           title={dict['model.action'] + '-' + (card && card.copyType === 'action' ? dict['model.copy'] : dict['model.edit'])}
           wrapClassName="model-table-action-edit-modal"
           visible={visible}
-          width={850}
+          width={920}
           maskClosable={false}
           onCancel={this.editModalCancel}
           footer={[
diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx
index 3ad7d6b..d9700d5 100644
--- a/src/templates/zshare/formconfig.jsx
+++ b/src/templates/zshare/formconfig.jsx
@@ -947,6 +947,10 @@
     card.control = 'disabled'
   }
 
+  if (card.intertype === 'outer' && !card.procMode && !card.innerFunc) { // 鍏煎澶栭儴鍑芥暟鐩翠紶绫诲瀷
+    card.procMode = 'none'
+  }
+
   return [
     {
       type: 'select',
@@ -955,6 +959,14 @@
       initVal: card.OpenType,
       required: true,
       options: opentypes
+    },
+    {
+      type: 'text',
+      key: 'label',
+      label: '鎸夐挳鍚嶇О',
+      initVal: card.label,
+      required: true,
+      readonly: false
     },
     {
       type: 'select',
@@ -1018,7 +1030,8 @@
       type: 'radio',
       key: 'procMode',
       label: '鍙傛暟澶勭悊',
-      initVal: card.procMode || 'system',
+      initVal: card.procMode || (card.innerFunc ? 'inner' : 'system'),
+      tooltip: '褰撹繑鍥炲�煎瓨鍦� mk_ex_invoke 涓斿�间负 false 鏃讹紝涓嶄細璋冪敤澶栭儴鎺ュ彛銆�',
       required: true,
       options: [{
         value: 'system',
@@ -1026,6 +1039,9 @@
       }, {
         value: 'inner',
         text: '鍐呴儴鍑芥暟'
+      }, {
+        value: 'none',
+        text: '鏃�'
       }]
     },
     {
@@ -1035,14 +1051,6 @@
       initVal: card.sqlType || '',
       required: true,
       options: []
-    },
-    {
-      type: 'text',
-      key: 'label',
-      label: '鎸夐挳鍚嶇О',
-      initVal: card.label,
-      required: true,
-      readonly: false
     },
     {
       type: 'text',
@@ -1193,7 +1201,7 @@
       type: 'radio',
       key: 'callbackType',
       label: '鍥炶皟鏂瑰紡',
-      initVal: card.callbackType || 'script',
+      initVal: card.callbackType || (card.callbackFunc ? 'func' : 'script'),
       tooltip: '浣跨敤鍚庡彴鑴氭湰鎵ц鏃讹紝闇�瑕侀厤鍚堣鍒掍换鍔°��',
       required: true,
       options: [{
@@ -1202,6 +1210,12 @@
       }, {
         value: 'default',
         text: '鍚庡彴鑴氭湰'
+      }, {
+        value: 'func',
+        text: '鍥炶皟鍑芥暟'
+      }, {
+        value: 'none',
+        text: '鏃�'
       }]
     },
     {
@@ -1216,7 +1230,7 @@
       key: 'callbackFunc',
       label: Formdict['header.form.callbackFunc'],
       initVal: card.callbackFunc || '',
-      required: false,
+      required: true,
       readonly: false
     },
     {
@@ -3267,12 +3281,16 @@
       key: 'encryption',
       label: '鍔犲瘑浼犺緭',
       initVal: card.type === 'brafteditor' ? (card.encryption || 'true') : (card.encryption || 'false'),
+      tooltip: '浣跨敤md5鍔犲瘑鏃讹紝鍔犲瘑鍓嶅唴瀹逛細杞负灏忓啓锛屽姞瀵嗗悗鐨刴d5鍊间负32浣嶅ぇ鍐欍��',
       options: [{
-        value: 'true',
-        text: Formdict['model.true']
-      }, {
         value: 'false',
-        text: Formdict['model.false']
+        text: '鏃�'
+      }, {
+        value: 'true',
+        text: 'base64鍔犲瘑'
+      }, {
+        value: 'md5',
+        text: 'md5鍔犲瘑'
       }]
     },
     {
diff --git a/src/templates/zshare/modalform/index.jsx b/src/templates/zshare/modalform/index.jsx
index da963fa..4c16e8a 100644
--- a/src/templates/zshare/modalform/index.jsx
+++ b/src/templates/zshare/modalform/index.jsx
@@ -19,7 +19,7 @@
 const MkEditIcon = asyncComponent(() => import('@/components/mkIcon'))
 
 const modalTypeOptions = {
-  text: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'regular', 'interception', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'scan', 'splitline', 'placeholder', 'place', 'marginTop', 'marginBottom', 'lenControl'],
+  text: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'regular', 'interception', 'span', 'labelwidth', 'encryption', 'tooltip', 'extra', 'enter', 'cursor', 'scan', 'splitline', 'placeholder', 'place', 'marginTop', 'marginBottom', 'lenControl'],
   number: ['initval', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'splitline', 'place', 'marginTop', 'marginBottom'],
   select: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'declare', 'setAll', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom'],
   checkbox: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'arrange', 'marginTop', 'marginBottom'],
@@ -32,7 +32,7 @@
   date: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'marginTop', 'marginBottom', 'minDate', 'maxDate', 'precision'],
   datemonth: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'splitline', 'marginTop', 'marginBottom'],
   datetime: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'marginTop', 'marginBottom', 'minDate', 'maxDate'],
-  textarea: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'span', 'labelwidth', 'maxRows', 'encryption', 'interception', 'tooltip', 'extra', 'count', 'placeholder', 'marginTop', 'marginBottom', 'enterReplace'],
+  textarea: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'span', 'labelwidth', 'maxRows', 'encryption', 'interception', 'tooltip', 'extra', 'count', 'placeholder', 'marginTop', 'marginBottom'],
   cascader: ['readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'marginTop', 'marginBottom', 'separator'],
   color: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'marginTop', 'marginBottom'],
   rate: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'splitline', 'tooltip', 'extra', 'marginTop', 'marginBottom', 'allowHalf', 'rateCount', 'character', 'place'],
@@ -233,6 +233,10 @@
       } else {
         shows.push('suffix')
       }
+    } else if (type === 'textarea') {
+      if (this.record.encryption === 'false') {
+        shows.push('enterReplace')
+      }
     }
 
     if (type === 'cascader') {
@@ -265,6 +269,27 @@
       }]
     }
 
+    if (type === 'brafteditor') {
+      reOptions.encryption = [{
+        value: 'false',
+        text: '鏃�'
+      }, {
+        value: 'true',
+        text: 'base64鍔犲瘑'
+      }]
+    } else {
+      reOptions.encryption = [{
+        value: 'false',
+        text: '鏃�'
+      }, {
+        value: 'true',
+        text: 'base64鍔犲瘑'
+      }, {
+        value: 'md5',
+        text: 'md5鍔犲瘑'
+      }]
+    }
+
     if (['multiselect', 'checkbox'].includes(type)) {
       reTooltip.initval = '娣诲姞澶氫釜鍒濆鍊艰浣跨敤閫楀彿鍒嗛殧銆�'
     } else if (['select', 'link', 'radio'].includes(type)) {
diff --git a/src/templates/zshare/verifycard/index.jsx b/src/templates/zshare/verifycard/index.jsx
index 0ae5a3a..118c3f0 100644
--- a/src/templates/zshare/verifycard/index.jsx
+++ b/src/templates/zshare/verifycard/index.jsx
@@ -594,17 +594,22 @@
       item.$index = i + 1
     })
 
-    let verifyInter = card.intertype === 'system' || (card.intertype === 'custom' && card.procMode === 'system') ? 'system' : 'inner'
+    let verifyInter = card.intertype === 'system' || card.procMode === 'system' ? 'system' : 'inner'
+    let activeKey = verifyInter === 'system' || card.intertype === 'inner' ? 'base' : 'tip'
+
+    if (card.callbackType === 'script') {
+      activeKey = 'cbScripts'
+    }
 
     this.setState({
-      activeKey: verifyInter === 'system' || card.intertype === 'inner' ? 'base' : 'tip',
+      activeKey: activeKey,
       verifyInter: verifyInter,
       setting: config.setting || {},
       verify: _verify,
       oriVerify: fromJS(_verify).toJS()
     })
 
-    if (config.Template !== 'FormTab' && (card.intertype === 'inner' || card.intertype === 'outer')) { // 鍐呴儴鎴栧閮ㄦ帴鍙�
+    if (config.Template !== 'FormTab' && card.intertype === 'inner') {
       return
     }
 
@@ -1613,7 +1618,7 @@
             />
             <EditTable actions={['move']} data={verify.scripts} columns={scriptsColumns} onChange={(scripts) => {this.setState({verify: {...verify, scripts}})}}/>
           </TabPane> : null}
-          {card.callbackType === 'script' && card.intertype === 'custom' ? <TabPane tab={
+          {card.callbackType === 'script' ? <TabPane tab={
             <span>
               鍥炶皟鑴氭湰
               {verify.cbScripts.length ? <span className="count-tip">{verify.cbScripts.length}</span> : null}

--
Gitblit v1.8.0