提交 0bc79c31 编写于 作者: Skyeye云's avatar Skyeye云

会签任务支持串行会签实例

上级 07b9474d
......@@ -31,7 +31,7 @@ layui.config({
{ type: 'checkbox', align: 'center' },
{ field: 'name', title: '审批人', align: 'left', width: 180, templet: function(d){
return '<input type="text" id="approvalId' + d.LAY_TABLE_INDEX + '" placeholder="请选择审批人" class="layui-input" readonly="readonly" ' +
'value="' + (isNull(d.name) ? "" : d.name) + '"/>' +
'value="' + (isNull(d.name) ? "" : d.name) + '" win-verify="required"/>' +
'<i class="fa fa-plus-circle input-icon chooseApprovalIdBtn" style="top: 8px;"></i>';
}},
{ field: 'email', title: '邮箱', align: 'left', width: 200}
......
......@@ -31,7 +31,7 @@ layui.config({
{ type: 'checkbox', align: 'center' },
{ field: 'name', title: '审批人', align: 'left', width: 180, templet: function(d){
return '<input type="text" id="approvalId' + d.LAY_TABLE_INDEX + '" placeholder="请选择审批人" class="layui-input" readonly="readonly" ' +
'value="' + (isNull(d.name) ? "" : d.name) + '"/>' +
'value="' + (isNull(d.name) ? "" : d.name) + '" win-verify="required"/>' +
'<i class="fa fa-plus-circle input-icon chooseApprovalIdBtn" style="top: 8px;"></i>';
}},
{ field: 'email', title: '邮箱', align: 'left', width: 200}
......
......@@ -5,20 +5,22 @@ layui.config({
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'soulTable', 'table', 'form'], function (exports) {
}).define(['window', 'jquery', 'winui', 'table', 'form'], function (exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form,
table = layui.table,
soulTable = layui.soulTable;
table = layui.table;
var chooseUserList = new Array();
var taskId = GetUrlParam("taskId");
var taskBean;
// 获取会签节点信息
AjaxPostUtil.request({url: reqBasePath + "activitiTask006", params: {taskId: taskId}, method: "GET", type: 'json', callback: function(json) {
if(json.returnCode == 0) {
taskBean = json.bean;
if(json.bean.isSequential){
$("#jointlySignType").html("串行多实例会签");
}else{
......@@ -37,19 +39,15 @@ layui.config({
data: chooseUserList,
even: true,
page: false,
rowDrag: {
trigger: 'row',
done: function(obj) {}
},
cols: [[
{ type: 'checkbox', align: 'center' },
{ field: 'name', title: '会签人', align: 'left', width: 180, templet: function(d){
if(d.type == 1 || d.noDelete){
return '<input type="text" id="approvalId' + d.LAY_TABLE_INDEX + '" placeholder="请选择审批人" class="layui-input" readonly="readonly" ' +
'value="' + (isNull(d.name) ? "" : d.name) + '"/>';
'value="' + (isNull(d.name) ? "" : d.name) + '" win-verify="required"/>';
}else{
return '<input type="text" id="approvalId' + d.LAY_TABLE_INDEX + '" placeholder="请选择审批人" class="layui-input" readonly="readonly" ' +
'value="' + (isNull(d.name) ? "" : d.name) + '"/>' +
'value="' + (isNull(d.name) ? "" : d.name) + '" win-verify="required"/>' +
'<i class="fa fa-plus-circle input-icon chooseApprovalIdBtn" style="top: 8px;"></i>';
}
}},
......@@ -84,7 +82,6 @@ layui.config({
}
}
matchingLanguage();
soulTable.render(this);
}
});
......@@ -112,8 +109,8 @@ layui.config({
form.render();
form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) {
if(table.cache.messageTable.length == 0){
winui.window.msg('请最少选择一条数据.', {icon: 2,time: 2000});
if(table.cache.messageTable.length == 1){
winui.window.msg('请最少选择一位参与人.', {icon: 2,time: 2000});
return false;
}
if(!judgeSimple()){
......@@ -170,8 +167,17 @@ layui.config({
// 新增行
var rowNum = 1;
function addRow() {
// 串行
chooseUserList = [].concat(table.cache.messageTable);
chooseUserList.push({id: rowNum});
if(taskBean.isSequential){
var length = chooseUserList.length;
var tmp = chooseUserList[length - 1];
chooseUserList[length - 1] = {id: rowNum};
chooseUserList.push(tmp);
}else{
// 并行
chooseUserList.push({id: rowNum});
}
table.reload("messageTable", {data: chooseUserList});
rowNum++;
}
......
......@@ -194,13 +194,13 @@ layui.config({
$("#processInstanceIdImg").attr("src", fileBasePath + 'images/upload/activiti/' + processInstanceId + ".png?cdnversion=" + Math.ceil(new Date()/3600000));
// 是否委派,如果是委派||并行会签的子实例,则不需要选择下一个节点的审批人
if(!j.bean.delegation && !j.bean.parallelMultilnStanceExecttionChild){
if(!j.bean.delegation && !j.bean.multilnStanceExecttionChild){
// 加载下个节点审批人选择信息
activitiUtil.initApprovalPerson("approvalOpinionDom", processInstanceId, taskId, $("input[name='flag']:checked").val());
}
// 并行会签的子实例,不支持工作流的其他操作
if(!j.bean.parallelMultilnStanceExecttionChild){
if(!j.bean.multilnStanceExecttionChild){
activitiUtil.activitiMenuOperator("otherMenuOperator", j.bean, function (){
parent.layer.close(index);
parent.refreshCode = '0';
......@@ -219,7 +219,7 @@ layui.config({
$("#multiInstanceState").html('已完成');
if(j.bean.nrOfActiveInstances != 0){
// 正在执行的会签总数不为0并且不是子实例,说明会签还未结束,不能提交到下一个审批节点
if(!j.bean.parallelMultilnStanceExecttionChild){
if(!j.bean.multilnStanceExecttionChild){
$("#approvalOpinionDom").hide();
$("#subBtnBox").hide();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册