Prechádzať zdrojové kódy

主从表关闭二次确认

zhuth 7 rokov pred
rodič
commit
7d4ff7465d

+ 1 - 0
frontend/saas-web/app/view/core/form/FormPanel.js

@@ -37,6 +37,7 @@ Ext.define('saas.view.core.form.FormPanel', {
     remoteConfig: true, // 是否需要从远端读取form配置
     toolBtns: [], // 自定义按钮
     codeInHeader: true, // 单据编号显示在toolbar
+    closeConfirm: true, // 关闭确认
 
     auditTexts: {
         auditCode: 'AUDITED',

+ 2 - 2
frontend/saas-web/app/view/core/tab/Controller.js

@@ -31,7 +31,7 @@ Ext.define('saas.view.core.tab.Controller', {
          
                 if (me.fireEvent('beforeclose', me) !== false) {
                     if (me.tabBar) {
-                        if(typeof tabView.isDirty == 'function' && tabView.isDirty()) {
+                        if(tabView.closeConfirm && tabView.isDirty()) {
                             showConfirm('提示', '表单数据有修改,确定要退出吗?')
                             .then(function(yes) {
                                 if(yes == 'yes') {
@@ -46,7 +46,7 @@ Ext.define('saas.view.core.tab.Controller', {
                             }
                         }
                     } else {
-                        if(typeof tabView.isDirty == 'function' && tabView.isDirty()) {
+                        if(tabView.closeConfirm == 'function' && tabView.isDirty()) {
                             showConfirm('提示', '表单数据有修改,确定要退出吗?')
                             .then(function(yes) {
                                 if(yes == 'yes') {