Просмотр исходного кода

Merge branch 'fix/Process.form_close_redirect' into 'develop'

Merge of fix/[流程管理]修复表单提交后立即关闭重定向的问题 to develop

See merge request o2oa/o2oa!1366
蔡祥熠 5 лет назад
Родитель
Сommit
83c1ff2fea
1 измененных файлов с 9 добавлено и 1 удалено
  1. 9 1
      o2web/source/x_component_process_Xform/Form.js

+ 9 - 1
o2web/source/x_component_process_Xform/Form.js

@@ -1575,7 +1575,15 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
             "buttonList": [
                 {
                     "text": this.app.lp.closePage,
-                    "action": function () { dlg.close(); this.app.close(); }.bind(this)
+                    "action": function () {
+                        dlg.close();
+                        if (this.json.afterProcessAction=="redirect" && this.json.afterProcessRedirectScript && this.json.afterProcessRedirectScript.code){
+                            var url = this.Macro.exec(this.json.afterProcessRedirectScript.code, this);
+                            (new URI(url)).go();
+                        }else{
+                            this.app.close();
+                        }
+                    }.bind(this)
                 }
             ]
         };