From 716dfa54209e2d300a66998d0e0e4f024741ab44 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 01 十二月 2022 18:59:31 +0800
Subject: [PATCH] 2022-12-01

---
 src/menu/components/card/cardcellcomponent/index.jsx |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 49 insertions(+), 0 deletions(-)

diff --git a/src/menu/components/card/cardcellcomponent/index.jsx b/src/menu/components/card/cardcellcomponent/index.jsx
index d2529af..9241c6a 100644
--- a/src/menu/components/card/cardcellcomponent/index.jsx
+++ b/src/menu/components/card/cardcellcomponent/index.jsx
@@ -7,6 +7,7 @@
 import { getCardCellForm } from './formconfig'
 import { getActionForm, getBaseTableActionForm } from '@/menu/components/share/actioncomponent/formconfig'
 
+import Utils, { FuncUtils } from '@/utils/utils.js'
 import MKEmitter from '@/utils/events.js'
 import MenuUtils from '@/utils/utils-custom.js'
 import ElementForm from './elementform'
@@ -629,6 +630,54 @@
     })
   }
 
+  /**
+   * @description 鍒涘缓鎸夐挳瀛樺偍杩囩▼
+   */
+  creatFunc = () => {
+    const menu = window.GLOB.customMenu
+    let _config = fromJS(this.props.cards).toJS()
+
+    this.actionFormRef.handleConfirm().then(res => {
+      let btn = res         // 鎸夐挳淇℃伅
+      let newLText = ''     // 鍒涘缓瀛樺偍杩囩▼sql
+      let DelText = ''      // 鍒犻櫎瀛樺偍杩囩▼sql
+
+      if (btn.intertype !== 'inner') return
+
+      if (btn.OpenType === 'pop') {
+        let _param = {
+          funcName: btn.innerFunc,
+          name: _config.setting.tableName || '',
+          fields: btn.modal ? btn.modal.fields : [],
+          menuNo: menu.MenuNo
+        }
+        newLText = Utils.formatOptions(FuncUtils.getfunc(_param, btn, menu, _config))
+        DelText = Utils.formatOptions(FuncUtils.dropfunc(btn.innerFunc))
+      } else if (btn.OpenType === 'excelIn') {
+        let _param = {
+          funcName: btn.innerFunc,
+          menuNo: menu.MenuNo
+        }
+        newLText = Utils.formatOptions(FuncUtils.getexcelInfunc(_param, btn, menu))
+        DelText = Utils.formatOptions(FuncUtils.dropfunc(btn.innerFunc))
+      } else if (btn.OpenType === 'excelOut') {
+        newLText = Utils.formatOptions(FuncUtils.getTableFunc(btn.innerFunc, menu, _config)) // 鍒涘缓瀛樺偍杩囩▼sql
+        DelText = Utils.formatOptions(FuncUtils.dropfunc(btn.innerFunc))
+      } else {
+        let _param = {
+          funcName: btn.innerFunc,
+          name: _config.setting.tableName || '',
+          fields: '',
+          menuNo: menu.MenuNo
+        }
+        newLText = Utils.formatOptions(FuncUtils.getfunc(_param, btn, menu, _config))
+        DelText = Utils.formatOptions(FuncUtils.dropfunc(btn.innerFunc))
+      }
+
+      this.refs.btnCreatFunc.exec(btn.innerFunc, newLText, DelText)
+    })
+  }
+
   getVerify = (card) => {
     const { cards } = this.props
 

--
Gitblit v1.8.0