[JavaScript] 纯文本查看 复制代码
var contentNode = this.form.get("div_1").node.show();
var node = contentNode.getFirst();
var _self = this;
this.form.dataGridDlg = o2.DL.open({
"title": "提交审批",
"width": "600",
"height": "400",
"overflow": "auto",
"mask": true,
"content": node,
"isTitle": false,
"isClose":false,
"container":this.form.node(),
"positionNode": this.form.getApp().content,
"onQueryClose": function(){
node.inject(contentNode);
contentNode.hide();
}.bind(this),
"onQueryLoad": function(){
if (this.form.get("LC").getData().includes("会办部门意见") == true){
this.form.get("SPR").show();
this.form.get("SPR").setData([]);
} else{
this.form.get("SPR").hide();
}
}.bind(this),
"buttonList": [
{
"text": "提交",
"action": function(){
//判断是否有选择审批人
var spr = this.form.get("LC").getData();
if (spr == "" || spr == null){
var ts = confirm("没有选择下一步的办理人,流程将直接办结,是否继续?");
if (ts == false){
return;
}
}
spr = spr.split(",");
//判断选择了会办,是否选择会办人
var hb_spr = this.form.get("SPR").getData();
if (spr.includes("会办部门意见") == true || hb_spr.length == 0){
confirm("选择了会办,但是没有选择需要审批的会办人");
return;
}
this.form.dataGridDlg.close();
_self.form.process();
}.bind(this)
},
{
"text": "关闭",
"action": function(){
this.form.dataGridDlg.close();
}.bind(this)
}]
})