提交 6f99d2d6 编写于 作者: U unknown

自定义提交

上级 5111f823
...@@ -64,14 +64,17 @@ ...@@ -64,14 +64,17 @@
<input type="radio" onclick="if (this.checked) { <input type="radio" onclick="if (this.checked) {
$('text{$.pid}selectSubmitForm').setStyle('display', 'none'); $('text{$.pid}selectSubmitForm').setStyle('display', 'none');
$('text{$.pid}scriptSubmitForm').setStyle('display', 'none'); $('text{$.pid}scriptSubmitForm').setStyle('display', 'none');
$('text{$.pid}submitScript').setStyle('display', 'none');
}" name="submitFormType" value="default" text{($.submitFormType!='script' && $.submitFormType!='select' )?'checked':''}/>系统默认 }" name="submitFormType" value="default" text{($.submitFormType!='script' && $.submitFormType!='select' )?'checked':''}/>系统默认
<input type="radio" onclick="if (this.checked) { <input type="radio" onclick="if (this.checked) {
$('text{$.pid}selectSubmitForm').setStyle('display', 'block'); $('text{$.pid}selectSubmitForm').setStyle('display', 'block');
$('text{$.pid}scriptSubmitForm').setStyle('display', 'none'); $('text{$.pid}scriptSubmitForm').setStyle('display', 'none');
$('text{$.pid}submitScript').setStyle('display', 'block');
}" name="submitFormType" value="select" text{($.submitFormType=='select')?'checked':''}/>选择表单 }" name="submitFormType" value="select" text{($.submitFormType=='select')?'checked':''}/>选择表单
<input type="radio" onclick="if (this.checked) { <input type="radio" onclick="if (this.checked) {
$('text{$.pid}selectSubmitForm').setStyle('display', 'none'); $('text{$.pid}selectSubmitForm').setStyle('display', 'none');
$('text{$.pid}scriptSubmitForm').setStyle('display', 'block');} $('text{$.pid}scriptSubmitForm').setStyle('display', 'block');}
$('text{$.pid}submitScript').setStyle('display', 'block');
" name="submitFormType" value="script" text{($.submitFormType=='script')?'checked':''}/>计算表单<br/> " name="submitFormType" value="script" text{($.submitFormType=='script')?'checked':''}/>计算表单<br/>
</td> </td>
</tr> </tr>
...@@ -100,6 +103,9 @@ ...@@ -100,6 +103,9 @@
}; <br/> 本应用:<br/>return "表单名称"; </div> }; <br/> 本应用:<br/>return "表单名称"; </div>
<div class="MWFScriptArea" name="submitFormScript" title="提交表单脚本 (S)"></div> <div class="MWFScriptArea" name="submitFormScript" title="提交表单脚本 (S)"></div>
</div> </div>
<div id="text{$.pid}submitScript" style="display: text{($.submitFormType=='script' || $.submitFormType=='select')?'block':'none'}">
<div class="MWFScriptArea" name="submitScript" title="提交(继续流转)操作脚本"></div>
</div>
<table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable"> <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
<tr> <tr>
......
...@@ -1728,6 +1728,9 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({ ...@@ -1728,6 +1728,9 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
} }
var submitFormContainer = new Element("div").inject( layout.mobile ? $(document.body) : this.app.content ); var submitFormContainer = new Element("div").inject( layout.mobile ? $(document.body) : this.app.content );
this.submitFormModule = new MWF["APPSubmitform"]( submitFormContainer , this.json, this); this.submitFormModule = new MWF["APPSubmitform"]( submitFormContainer , this.json, this);
this.submitFormModule.addEvent("load", function () {
this.submitFormModule.show();
}.bind(this))
this.submitFormModule.load(); this.submitFormModule.load();
}else{ }else{
this.submitFormModule.show(); this.submitFormModule.show();
......
...@@ -197,6 +197,9 @@ MWF.xApplication.process.Xform.SubmitForm = MWF.APPSubmitform = new Class({ ...@@ -197,6 +197,9 @@ MWF.xApplication.process.Xform.SubmitForm = MWF.APPSubmitform = new Class({
}.bind(this)); }.bind(this));
}, },
show : function(){ show : function(){
if (this.json.submitScript.code) {
this.form.Macro.exec(this.json.submitScript.code, this);
}
// this.fireSubFormEvent("load"); // this.fireSubFormEvent("load");
}, },
// fireSubFormEvent : function( name ){ // fireSubFormEvent : function( name ){
...@@ -209,7 +212,7 @@ MWF.xApplication.process.Xform.SubmitForm = MWF.APPSubmitform = new Class({ ...@@ -209,7 +212,7 @@ MWF.xApplication.process.Xform.SubmitForm = MWF.APPSubmitform = new Class({
if (this.subformData){ if (this.subformData){
if( !this.checkSubformUnique( this.subformData.json.id ) ){ //如果提交表单已经嵌入到表单中,那么把这个表单弹出来 if( !this.checkSubformUnique( this.subformData.json.id ) ){ //如果提交表单已经嵌入到表单中,那么把这个表单弹出来
// this.form.notice(MWF.xApplication.process.Xform.LP.subformUniqueError, "error"); // this.form.notice(MWF.xApplication.process.Xform.LP.subformUniqueError, "error");
this.isEmbedded = true;
}else if( !this.checkSubformNested( this.subformData.json.id ) ){ }else if( !this.checkSubformNested( this.subformData.json.id ) ){
this.form.notice(MWF.xApplication.process.Xform.LP.subformNestedError, "error"); this.form.notice(MWF.xApplication.process.Xform.LP.subformNestedError, "error");
}else{ }else{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册