diff --git a/activiti/src/main/resources/template/js/addSignTask/jointlySign.js b/activiti/src/main/resources/template/js/addSignTask/jointlySign.js new file mode 100644 index 0000000000000000000000000000000000000000..b7de375b6f8543db74e56c11f2aae6719fb9e5a6 --- /dev/null +++ b/activiti/src/main/resources/template/js/addSignTask/jointlySign.js @@ -0,0 +1,160 @@ + +// 会签 +layui.config({ + base: basePath, + version: skyeyeVersion +}).extend({ + window: 'js/winui.window' +}).define(['window', 'jquery', 'winui', 'soulTable', 'table', 'form'], function (exports) { + winui.renderColor(); + var index = parent.layer.getFrameIndex(window.name); + var $ = layui.$, + form = layui.form, + table = layui.table, + soulTable = layui.soulTable; + + var chooseUserList = new Array(); + var taskId = GetUrlParam("taskId"); + + // 获取会签节点信息 + AjaxPostUtil.request({url: reqBasePath + "activitiTask006", params: {taskId: taskId}, method: "GET", type: 'json', callback: function(json) { + if(json.returnCode == 0) { + if(json.bean.isSequential){ + $("#jointlySignType").html("串行多实例会签"); + }else{ + $("#jointlySignType").html("并行多实例会签"); + } + chooseUserList = [].concat(json.bean.assigneeList); + } else { + winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); + } + }, async: false}); + + table.render({ + id: 'messageTable', + elem: '#messageTable', + method: 'get', + 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){ + return '' + + ''; + }}, + { field: 'email', title: '邮箱', align: 'left', width: 200} + ]], + done: function(res){ + for (var i = 0; i < res.rows.length; i++) { + // 不允许删除的设置为不可选中 + if(res.rows[i].noDelete){ + disabledRow(res.rows[i].LAY_TABLE_INDEX); + } + } + matchingLanguage(); + soulTable.render(this); + } + }); + + function disabledRow(index) { + // 第index行复选框不可选 + let t = $(".layui-table tr[data-index=" + index + "] input[type='checkbox']"); + t.prop('disabled', true); + t.addClass('layui-btn-disabled'); + t.next().css("cursor", "not-allowed"); + } + + 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}); + return false; + } + var params = { + taskId: taskId, + chooseUserMation: JSON.stringify(table.cache.messageTable) + }; + AjaxPostUtil.request({url: reqBasePath + "activitiTask005", params: params, type: 'json', method: "POST", callback: function(json){ + if(json.returnCode == 0){ + parent.layer.close(index); + parent.refreshCode = '0'; + }else{ + winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); + } + }}); + } + return false; + }); + + $("body").on("click", "#addRow", function(){ + addRow(); + }); + + $("body").on("click", "#deleteRow", function(){ + deleteRow(); + }); + + // 新增行 + var rowNum = 1; + function addRow() { + chooseUserList = [].concat(table.cache.messageTable); + chooseUserList.push({id: rowNum}); + table.reload("messageTable", {data: chooseUserList}); + rowNum++; + } + + // 删除行 + function deleteRow() { + chooseUserList = [].concat(table.cache.messageTable); + var check_box = table.checkStatus('messageTable').data; + for (var i = 0; i < check_box.length; i++){ + var list = []; + $.each(chooseUserList, function(j, item){ + if(item.id != check_box[i].id){ + list.push(item); + } + }); + chooseUserList = [].concat(list); + } + table.reload("messageTable", {data: chooseUserList}); + } + + // 人员选择 + $("body").on("click", ".chooseApprovalIdBtn", function(){ + var trId = $(this).parent().find("input").attr("id").replace("approvalId", ""); + systemCommonUtil.userReturnList = []; + systemCommonUtil.chooseOrNotMy = "2"; // 人员列表中是否包含自己--1.包含;其他参数不包含 + systemCommonUtil.chooseOrNotEmail = "2"; // 人员列表中是否必须绑定邮箱--1.必须;其他参数没必要 + systemCommonUtil.checkType = "2"; // 人员选择类型,1.多选;其他。单选 + systemCommonUtil.openSysUserStaffChoosePage(function (staffChooseList){ + loadUseTableMation(trId, staffChooseList[0]); + }); + }); + + function loadUseTableMation(trId, userReturnMation){ + var inIndex = -1; + $.each(chooseUserList, function(j, item){ + if(item.id == trId){ + inIndex = j; + return; + } + }); + if(inIndex != -1){ + chooseUserList[inIndex] = userReturnMation; + } + table.reload("messageTable", {data: chooseUserList}); + } + + // 取消 + $("body").on("click", "#cancle", function(){ + parent.layer.close(index); + }); + +}); \ No newline at end of file diff --git a/activiti/src/main/resources/template/js/approvalActiviti/approvalPersonChoose.js b/activiti/src/main/resources/template/js/approvalActiviti/approvalPersonChoose.js index f856ac8ce759cc29047006d0db58aa211e92f882..ef4c8eb1f64e3412d6d954d580cb0885dc14587e 100644 --- a/activiti/src/main/resources/template/js/approvalActiviti/approvalPersonChoose.js +++ b/activiti/src/main/resources/template/js/approvalActiviti/approvalPersonChoose.js @@ -28,7 +28,7 @@ layui.config({ { field: 'jobNumber', title: '工号', align: 'left', rowspan: '2', width: 120}, { field: 'userName', title: '姓名', align: 'left', rowspan: '2', width: 120}, { title: '公司信息', align: 'center', colspan: '3'}, - { field: 'userEmail', title: '邮箱', align: 'left', rowspan: '2', width: 200} + { field: 'email', title: '邮箱', align: 'left', rowspan: '2', width: 200} ],[ { field: 'companyName', title: '公司', align: 'left', width: 120}, { field: 'departmentName', title: '部门', align: 'left', width: 120}, diff --git a/activiti/src/main/resources/template/js/approvalActiviti/startProcessPersonChoose.js b/activiti/src/main/resources/template/js/approvalActiviti/startProcessPersonChoose.js index af1a54053ae84f80809553a93942bcd305870521..e1d991afdd7ce292ac3268079b4c22b5e12566f9 100644 --- a/activiti/src/main/resources/template/js/approvalActiviti/startProcessPersonChoose.js +++ b/activiti/src/main/resources/template/js/approvalActiviti/startProcessPersonChoose.js @@ -30,7 +30,7 @@ layui.config({ { field: 'jobNumber', title: '工号', align: 'left', rowspan: '2', width: 120}, { field: 'userName', title: '姓名', align: 'left', rowspan: '2', width: 120}, { title: '公司信息', align: 'center', colspan: '3'}, - { field: 'userEmail', title: '邮箱', align: 'left', rowspan: '2', width: 200} + { field: 'email', title: '邮箱', align: 'left', rowspan: '2', width: 200} ],[ { field: 'companyName', title: '公司', align: 'left', width: 120}, { field: 'departmentName', title: '部门', align: 'left', width: 120}, diff --git a/activiti/src/main/resources/template/js/myActiviti/pendingProcess.js b/activiti/src/main/resources/template/js/myActiviti/pendingProcess.js index 9e46741601cc9f9321572990d79ee4c5d27dbccf..23d3aad3f5c129ce1eab77e8628926d4478ead2d 100644 --- a/activiti/src/main/resources/template/js/myActiviti/pendingProcess.js +++ b/activiti/src/main/resources/template/js/myActiviti/pendingProcess.js @@ -70,9 +70,7 @@ layui.config({ subTasks(data, obj); } else if (layEvent === 'details') { //详情 activitiUtil.activitiDetails(data); - } else if (layEvent === 'turnMultiInstance') { //转为会签 - activitiUtil.turnMultiInstance(data.processInstanceId, data.id); - } + } }); // 提交任务 diff --git a/activiti/src/main/resources/template/tpl/addSignTask/jointlySign.html b/activiti/src/main/resources/template/tpl/addSignTask/jointlySign.html new file mode 100644 index 0000000000000000000000000000000000000000..4030b480c9aed33885a26a4bf8ef01273f814093 --- /dev/null +++ b/activiti/src/main/resources/template/tpl/addSignTask/jointlySign.html @@ -0,0 +1,50 @@ + + +
+ +