From 407c0f1765c7d085218a91ad8842784977383d05 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 23 十月 2020 00:18:13 +0800 Subject: [PATCH] 2020-10-23 --- src/tabviews/formtab/actionList/index.jsx | 49 ++++++++++++++++++++++++++++++------------------- 1 files changed, 30 insertions(+), 19 deletions(-) diff --git a/src/tabviews/formtab/actionList/index.jsx b/src/tabviews/formtab/actionList/index.jsx index 6d45e05..e2a213e 100644 --- a/src/tabviews/formtab/actionList/index.jsx +++ b/src/tabviews/formtab/actionList/index.jsx @@ -71,15 +71,41 @@ let _primaryId = primaryId if (btn.intertype === 'inner') { - // 浣跨敤鍐呴儴鎺ュ彛鏃讹紝鍐呴儴鍑芥暟鍜屾暟鎹簮涓嶅彲鍚屾椂涓虹┖, 浣跨敤绯荤粺鍑芥暟鏃讹紝绫诲瀷涓嶅彲涓虹┖ - if (!btn.innerFunc && (!btn.sql || (btn.sql && !btn.sqlType))) { + let param = { // 绯荤粺瀛樺偍杩囩▼ + func: btn.innerFunc, + BID: '' + } + + param[setting.primaryKey] = primaryId + + formdata.forEach(_data => { + param[_data.key] = _data.value + }) + + if (!param[setting.primaryKey]) { + param[setting.primaryKey] = Utils.getguid() + } + + _primaryId = param[setting.primaryKey] + + Api.genericInterface(param).then((res) => { + if (res.status) { + this.execSuccess(btn, res, _primaryId, formdata) + } else { + this.execError(res, btn) + } + _resolve() + }) + } else if (btn.intertype === 'system') { + // 浣跨敤绯荤粺鎺ュ彛鏃讹紝鏁版嵁婧愪笉鍙负绌�, 浣跨敤绯荤粺鍑芥暟鏃讹紝绫诲瀷涓嶅彲涓虹┖ + if (!btn.sql || !btn.sqlType) { this.actionSettingError() _resolve() return } // 鍒涘缓鍑瘉鏃讹紝闇�瑕侀�夋嫨琛屾椂 - if (!data && !btn.innerFunc && btn.verify && btn.verify.voucher && btn.verify.voucher.enabled) { + if (!data && btn.verify && btn.verify.voucher && btn.verify.voucher.enabled) { notification.warning({ top: 92, message: '浣跨敤鍒涘缓鍑瘉鍑芥暟锛岄渶瑕侀�夋嫨琛岋紒', @@ -93,22 +119,7 @@ BID: '' } - if (btn.innerFunc) { - param.func = btn.innerFunc - - param[setting.primaryKey] = primaryId - - formdata.forEach(_data => { - param[_data.key] = _data.value - }) - - if (!param[setting.primaryKey]) { - param[setting.primaryKey] = Utils.getguid() - } - - _primaryId = param[setting.primaryKey] - - } else if (btn.sql && btn.sqlType === 'insert') { // 绯荤粺鍑芥暟娣诲姞鏃讹紝鐢熸垚uuid + if (btn.sql && btn.sqlType === 'insert') { // 绯荤粺鍑芥暟娣诲姞鏃讹紝鐢熸垚uuid param.ID = Utils.getguid() param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, data, logcolumns) // 鏁版嵁婧� -- Gitblit v1.8.0