提交 11204254 编写于 作者: NoSubject's avatar NoSubject

Merge branch 'feature/process_asyncSupported' into 'develop'

Feature/process async supported 增加提交异步返回功能

See merge request o2oa/o2oa!1577
......@@ -75,6 +75,17 @@
<div class="MWFScriptText" name="appendTaskIdentityScriptText"></div><hr />
</div>
</div>
<table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
<tr>
<td class="editTableTitle">异步返回:</td>
<td class="editTableValue">
<input class="editTableRadio" name="asyncSupported" text{($.asyncSupported===true)?'checked':''} type="radio" value="true"/>
<input class="editTableRadio" name="asyncSupported" text{($.asyncSupported!==true)?'checked':''} type="radio" value="false"/>
</td>
</tr>
</table>
</div>
<div title="扩展" class="MWFTab">
<table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
......
......@@ -1358,24 +1358,51 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
if (data.completed) {
content += MWF.xApplication.process.Xform.LP.workCompleted;
} else {
if (data.properties.nextManualList && data.properties.nextManualList.length) {
var activityUsers = [];
data.properties.nextManualList.each(function (a) {
var ids = [];
a.taskIdentityList.each(function (i) {
ids.push(o2.name.cn(i))
});
var t = "<b>" + MWF.xApplication.process.Xform.LP.nextActivity + "</b><span style='color: #ea621f'>" + a.activityName + "</span>;<b>" + MWF.xApplication.process.Xform.LP.nextUser + "</b><span style='color: #ea621f'>" + ids.join(",") + "</span>";
activityUsers.push(t);
});
content += activityUsers.join("<br>");
} else {
if (data.arrivedActivityName) {
content += MWF.xApplication.process.Xform.LP.arrivedActivity + data.arrivedActivityName;
} else {
if (data.occurSignalStack){
if (data.signalStack && data.signalStack.length){
var activityUsers = [];
data.signalStack.each(function(stack){
var ids = [];
if (stack.splitExecute){
ids = stack.splitExecute.splitValueList || [];
}
if (stack.manualExecute){
ids = stack.manualExecute.identities || [];
}
var count = 0;
if (ids.length>8){
count = ids.length;
ids = ids.slice(0,8);
}
ids = o2.name.cns(ids);
var lp = MWF.xApplication.process.Xform.LP;
var t = "<b>" + lp.nextActivity + "</b><span style='color: #ea621f'>" + stack.name + "</span>;<b>" + lp.nextUser + "</b><span style='color: #ea621f'>" + ids.join(",") + "</span> <b>"+ ((count) ? ","+lp.next_etc.replace("{count}", count) : "")+"</b>";
activityUsers.push(t);
}.bind(this));
content += activityUsers.join("<br>");
}else{
content += MWF.xApplication.process.Xform.LP.taskCompleted;
}
}else{
if (data.properties.nextManualList && data.properties.nextManualList.length) {
var activityUsers = [];
data.properties.nextManualList.each(function (a) {
var ids = [];
a.taskIdentityList.each(function (i) {
ids.push(o2.name.cn(i))
});
var t = "<b>" + MWF.xApplication.process.Xform.LP.nextActivity + "</b><span style='color: #ea621f'>" + a.activityName + "</span>;<b>" + MWF.xApplication.process.Xform.LP.nextUser + "</b><span style='color: #ea621f'>" + ids.join(",") + "</span>";
activityUsers.push(t);
});
content += activityUsers.join("<br>");
} else {
if (data.arrivedActivityName) {
content += MWF.xApplication.process.Xform.LP.arrivedActivity + data.arrivedActivityName;
} else {
content += MWF.xApplication.process.Xform.LP.taskCompleted;
}
}
}
}
var title = this.businessData.data.title || this.businessData.data.subject || this.businessData.work.title
......@@ -1548,7 +1575,7 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
if (processor && processor.node) processor.node.unmask();
return false;
}
debugger;
if (!this.formValidation(routeName, opinion, medias)) {
this.app.content.unmask();
//this.app.notice("", "error", target, where, offset);
......
......@@ -17,6 +17,7 @@ MWF.xApplication.process.Xform.LP = {
"arrivedActivitys": "到达活动",
"arrivedUsers": "到达处理人",
"replace": "",
"next_etc": "等{count}人",
"processStarted": "文件已启动",
"processStartedMessage": "您启动了一个新的工作:",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册