From 1d77753877b81b7ebf02c137a8b3774cd784fa37 Mon Sep 17 00:00:00 2001 From: weizhiqiang <598748873@qq.com> Date: Sun, 24 Apr 2022 21:44:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=9B=E8=81=98=E6=A8=A1=E5=9D=97---?= =?UTF-8?q?=E8=BD=AC=E6=AD=A3=E7=94=B3=E8=AF=B7=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bossInterviewRegularWorkerAdd.js | 66 ++++++ .../bossInterviewRegularWorkerDetails.js | 34 +++ .../bossInterviewRegularWorkerEdit.js | 95 ++++++++ .../bossInterviewRegularWorkerList.js | 203 ++++++++++++++++++ .../bossInterviewRegularWorkerAdd.html | 68 ++++++ .../bossInterviewRegularWorkerDetails.html | 73 +++++++ .../bossInterviewRegularWorkerEdit.html | 76 +++++++ .../bossInterviewRegularWorkerList.html | 74 +++++++ .../assets/lib/layui/customer/codeDocUtil.js | 2 +- .../template/json/activitiNameKey.json | 3 +- 10 files changed, 692 insertions(+), 2 deletions(-) create mode 100644 boss/src/main/resources/template/js/bossInterviewRegularWorker/bossInterviewRegularWorkerAdd.js create mode 100644 boss/src/main/resources/template/js/bossInterviewRegularWorker/bossInterviewRegularWorkerDetails.js create mode 100644 boss/src/main/resources/template/js/bossInterviewRegularWorker/bossInterviewRegularWorkerEdit.js create mode 100644 boss/src/main/resources/template/js/bossInterviewRegularWorker/bossInterviewRegularWorkerList.js create mode 100644 boss/src/main/resources/template/tpl/bossInterviewRegularWorker/bossInterviewRegularWorkerAdd.html create mode 100644 boss/src/main/resources/template/tpl/bossInterviewRegularWorker/bossInterviewRegularWorkerDetails.html create mode 100644 boss/src/main/resources/template/tpl/bossInterviewRegularWorker/bossInterviewRegularWorkerEdit.html create mode 100644 boss/src/main/resources/template/tpl/bossInterviewRegularWorker/bossInterviewRegularWorkerList.html diff --git a/boss/src/main/resources/template/js/bossInterviewRegularWorker/bossInterviewRegularWorkerAdd.js b/boss/src/main/resources/template/js/bossInterviewRegularWorker/bossInterviewRegularWorkerAdd.js new file mode 100644 index 000000000..d1098d924 --- /dev/null +++ b/boss/src/main/resources/template/js/bossInterviewRegularWorker/bossInterviewRegularWorkerAdd.js @@ -0,0 +1,66 @@ +layui.config({ + base: basePath, + version: skyeyeVersion +}).extend({ + window: 'js/winui.window' +}).define(['window', 'jquery', 'winui', 'fileUpload', 'form', 'textool', 'laydate'], function(exports) { + winui.renderColor(); + var index = parent.layer.getFrameIndex(window.name); + var $ = layui.$, + laydate = layui.laydate, + textool = layui.textool, + form = layui.form; + + // 转正日期 + laydate.render({elem: '#regularTime', type: 'date'}); + + textool.init({ + eleId: 'remark', + maxlength: 200, + tools: ['count', 'copy', 'reset'] + }); + + skyeyeEnclosure.init('enclosureUpload'); + matchingLanguage(); + // 保存为草稿 + form.on('submit(formAddBean)', function(data) { + if(winui.verifyForm(data.elem)) { + saveData("1", ""); + } + return false; + }); + + // 提交审批 + form.on('submit(formSubBean)', function(data) { + if(winui.verifyForm(data.elem)) { + activitiUtil.startProcess(sysActivitiModel["bossInterviewRegularWorker"]["key"], function (approvalId) { + saveData("2", approvalId); + }); + } + return false; + }); + + function saveData(subType, approvalId){ + var params = { + departmentId: $("#departmentId").attr("departmentId"), + jobId: $("#jobId").attr("jobId"), + regularTime: $("#regularTime").val(), + remark: $("#remark").val(), + enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload'), + subType: subType, // 表单类型 1.保存草稿 2.提交审批 + approvalId: approvalId + }; + AjaxPostUtil.request({url: flowableBasePath + "insertBossInterviewRegularWorker", 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}); + } + }}); + } + + $("body").on("click", "#cancle", function() { + parent.layer.close(index); + }); +}); \ No newline at end of file diff --git a/boss/src/main/resources/template/js/bossInterviewRegularWorker/bossInterviewRegularWorkerDetails.js b/boss/src/main/resources/template/js/bossInterviewRegularWorker/bossInterviewRegularWorkerDetails.js new file mode 100644 index 000000000..4dd042913 --- /dev/null +++ b/boss/src/main/resources/template/js/bossInterviewRegularWorker/bossInterviewRegularWorkerDetails.js @@ -0,0 +1,34 @@ +layui.config({ + base: basePath, + version: skyeyeVersion +}).extend({ + window: 'js/winui.window' +}).define(['window', 'jquery', 'winui'], function (exports) { + winui.renderColor(); + layui.use(['form'], function (form) { + var $ = layui.$; + + showGrid({ + id: "showForm", + url: flowableBasePath + "queryBossInterviewRegularWorkerDetailsById", + params: {id: parent.rowId}, + pagination: false, + method: "GET", + template: $("#beanTemplate").html(), + ajaxSendLoadBefore: function(hdb, json) { + json.bean.remark = stringManipulation.textAreaShow(json.bean.remark); + json.bean.stateName = activitiUtil.showStateName2(json.bean.state, 1); + }, + ajaxSendAfter: function(json){ + // 附件回显 + skyeyeEnclosure.showDetails({'enclosureUpload': json.bean.enclosureInfo}); + + matchingLanguage(); + } + }); + + $("body").on("click", ".enclosureItem", function(){ + download(fileBasePath + $(this).attr("rowpath"), $(this).html()); + }); + }); +}); \ No newline at end of file diff --git a/boss/src/main/resources/template/js/bossInterviewRegularWorker/bossInterviewRegularWorkerEdit.js b/boss/src/main/resources/template/js/bossInterviewRegularWorker/bossInterviewRegularWorkerEdit.js new file mode 100644 index 000000000..f47bd370c --- /dev/null +++ b/boss/src/main/resources/template/js/bossInterviewRegularWorker/bossInterviewRegularWorkerEdit.js @@ -0,0 +1,95 @@ +layui.config({ + base: basePath, + version: skyeyeVersion +}).extend({ + window: 'js/winui.window' +}).define(['window', 'jquery', 'winui', 'fileUpload', 'form', 'textool', 'laydate'], function (exports) { + winui.renderColor(); + var index = parent.layer.getFrameIndex(window.name); + var $ = layui.$, + laydate = layui.laydate, + textool = layui.textool, + form = layui.form; + + showGrid({ + id: "showForm", + url: flowableBasePath + "queryBossInterviewRegularWorkerToEditById", + params: {id: parent.rowId}, + pagination: false, + method: "GET", + template: $("#beanTemplate").html(), + ajaxSendAfter: function(json){ + // 附件回显 + skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo}); + + // 转正日期 + laydate.render({elem: '#regularTime', type: 'date'}); + + textool.init({ + eleId: 'remark', + maxlength: 200, + tools: ['count', 'copy', 'reset'] + }); + + if(json.bean.state == '1'){ + $(".typeTwo").removeClass("layui-hide"); + }else{ + $(".typeOne").removeClass("layui-hide"); + } + + matchingLanguage(); + form.render(); + } + }); + + // 保存为草稿 + form.on('submit(formEditBean)', function(data) { + if(winui.verifyForm(data.elem)) { + saveData('1', ""); + } + return false; + }); + + // 提交审批 + form.on('submit(formSubBean)', function(data) { + if(winui.verifyForm(data.elem)) { + activitiUtil.startProcess(sysActivitiModel["bossInterviewRegularWorker"]["key"], function (approvalId) { + saveData("2", approvalId); + }); + } + return false; + }); + + // 工作流中保存 + form.on('submit(subBean)', function(data) { + if(winui.verifyForm(data.elem)) { + saveData('3', ""); + } + return false; + }); + + function saveData(subType, approvalId){ + var params = { + departmentId: $("#departmentId").attr("departmentId"), + jobId: $("#jobId").attr("jobId"), + regularTime: $("#regularTime").val(), + remark: $("#remark").val(), + enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload'), + subType: subType, // 表单类型 1.保存草稿 2.提交审批 + approvalId: approvalId, + id: parent.rowId + }; + AjaxPostUtil.request({url: flowableBasePath + "updateBossInterviewRegularWorker", params: params, type: 'json', method: "PUT", callback: function(json) { + if(json.returnCode == 0) { + parent.layer.close(index); + parent.refreshCode = '0'; + } else { + winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); + } + }}); + } + + $("body").on("click", "#cancle", function(){ + parent.layer.close(index); + }); +}); \ No newline at end of file diff --git a/boss/src/main/resources/template/js/bossInterviewRegularWorker/bossInterviewRegularWorkerList.js b/boss/src/main/resources/template/js/bossInterviewRegularWorker/bossInterviewRegularWorkerList.js new file mode 100644 index 000000000..041ccdda1 --- /dev/null +++ b/boss/src/main/resources/template/js/bossInterviewRegularWorker/bossInterviewRegularWorkerList.js @@ -0,0 +1,203 @@ +var rowId = ""; + +// 转正申请 +layui.config({ + base: basePath, + version: skyeyeVersion +}).extend({ + window: 'js/winui.window' +}).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) { + winui.renderColor(); + var $ = layui.$, + form = layui.form, + laydate = layui.laydate, + table = layui.table; + + // 新增 + authBtn('1650787545029'); + + laydate.render({ + elem: '#createTime', + range: '~' + }); + + table.render({ + id: 'messageTable', + elem: '#messageTable', + method: 'post', + url: flowableBasePath + 'queryBossInterviewRegularWorkerList', + where: getTableParams(), + even: true, + page: true, + limits: getLimits(), + limit: getLimit(), + cols: [[ + { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers'}, + { field: 'createName', title: '申请人', width: 140}, + { field: 'departmentName', title: '转正部门', width: 140}, + { field: 'jobName', title: '转正岗位', width: 150 }, + { field: 'regularTime', title: '转正日期', align: 'center', width: 100 }, + { field: 'processInstanceId', title: '流程ID', width: 100, templet: function(d){ + return '' + d.processInstanceId + ''; + }}, + { field: 'stateName', title: '状态', width: 90, templet: function(d) { + return activitiUtil.showStateName2(d.state, 1); + }}, + { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], width: 150}, + { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 257, toolbar: '#messageTableBar'} + ]], + done: function(){ + matchingLanguage(); + } + }); + + table.on('tool(messageTable)', function (obj) { + var data = obj.data; + var layEvent = obj.event; + if (layEvent === 'details') { // 详情 + details(data); + }else if (layEvent === 'edit') { // 编辑 + edit(data); + }else if (layEvent === 'subApproval') { // 提交审批 + subApproval(data); + }else if(layEvent === 'cancellation') { // 作废 + cancellation(data); + }else if(layEvent === 'processDetails') { // 流程详情 + activitiUtil.activitiDetails(data); + }else if(layEvent === 'revoke') { // 撤销申请 + revoke(data); + } + }); + + // 添加 + $("body").on("click", "#addBean", function(){ + _openNewWindows({ + url: "../../tpl/bossInterviewRegularWorker/bossInterviewRegularWorkerAdd.html", + title: systemLanguage["com.skyeye.addPageTitle"][languageType], + pageId: "bossInterviewRegularWorkerAdd", + area: ['90vw', '90vh'], + callBack: function(refreshCode){ + if (refreshCode == '0') { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1,time: 2000}); + loadTable(); + } else if (refreshCode == '-9999') { + winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); + } + }}); + }); + + // 撤销 + function revoke(data){ + layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) { + layer.close(index); + AjaxPostUtil.request({url: flowableBasePath + "revokeBossInterviewRegularWorker", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function(json){ + if(json.returnCode == 0){ + winui.window.msg("提交成功", {icon: 1, time: 2000}); + loadTable(); + }else{ + winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); + } + }}); + }); + } + + // 编辑申请 + function edit(data){ + rowId = data.id; + _openNewWindows({ + url: "../../tpl/bossInterviewRegularWorker/bossInterviewRegularWorkerEdit.html", + title: systemLanguage["com.skyeye.editPageTitle"][languageType], + pageId: "bossInterviewRegularWorkerEdit", + area: ['90vw', '90vh'], + callBack: function(refreshCode){ + if (refreshCode == '0') { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1,time: 2000}); + loadTable(); + } else if (refreshCode == '-9999') { + winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); + } + } + }); + } + + // 提交审批 + function subApproval(data){ + layer.confirm(systemLanguage["com.skyeye.approvalOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.approvalOperation"][languageType]}, function (index) { + layer.close(index); + activitiUtil.startProcess(sysActivitiModel["bossInterviewRegularWorker"]["key"], function (approvalId) { + var params = { + id: data.id, + approvalId: approvalId + }; + AjaxPostUtil.request({url: flowableBasePath + "editBossInterviewRegularWorkerToSubApproval", params: params, type: 'json', method: "POST", callback: function(json){ + if(json.returnCode == 0){ + winui.window.msg("提交成功", {icon: 1, time: 2000}); + loadTable(); + }else{ + winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); + } + }}); + }); + }); + } + + // 作废 + function cancellation(data){ + layer.confirm('确认作废该申请吗?', { icon: 3, title: '作废操作' }, function (index) { + layer.close(index); + AjaxPostUtil.request({url: flowableBasePath + "updateBossInterviewRegularWorkerToCancellation", params: {id: data.id}, type: 'json', method: "PUT", callback: function(json){ + if(json.returnCode == 0){ + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + loadTable(); + }else{ + winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); + } + }}); + }); + } + + // 详情 + function details(data){ + rowId = data.id; + _openNewWindows({ + url: "../../tpl/bossInterviewRegularWorker/bossInterviewRegularWorkerDetails.html", + title: systemLanguage["com.skyeye.detailsPageTitle"][languageType], + pageId: "bossInterviewRegularWorkerDetails", + area: ['90vw', '90vh'], + callBack: function(refreshCode){ + } + }); + } + + form.render(); + form.on('submit(formSearch)', function (data) { + if (winui.verifyForm(data.elem)) { + table.reload("messageTable", {page: {curr: 1}, where: getTableParams()}); + } + return false; + }); + + // 刷新 + $("body").on("click", "#reloadTable", function(){ + loadTable(); + }); + + function loadTable(){ + table.reload("messageTable", {where: getTableParams()}); + } + + function getTableParams(){ + var startTime = "", endTime = ""; + if(!isNull($("#createTime").val())){ + startTime = $("#createTime").val().split('~')[0].trim() + ' 00:00:00'; + endTime = $("#createTime").val().split('~')[1].trim() + ' 23:59:59'; + } + return { + state: $("#state").val(), + startTime: startTime, + endTime: endTime + }; + } + + exports('bossInterviewRegularWorkerList', {}); +}); diff --git a/boss/src/main/resources/template/tpl/bossInterviewRegularWorker/bossInterviewRegularWorkerAdd.html b/boss/src/main/resources/template/tpl/bossInterviewRegularWorker/bossInterviewRegularWorkerAdd.html new file mode 100644 index 000000000..8ac8d7c74 --- /dev/null +++ b/boss/src/main/resources/template/tpl/bossInterviewRegularWorker/bossInterviewRegularWorkerAdd.html @@ -0,0 +1,68 @@ + + +
+ +