From bbaece70d6cf5d32a7a7220fa2360dbadb35f28f Mon Sep 17 00:00:00 2001 From: "DESKTOP-ESU4BDD\\WeiZhiQiang" <598748873@qq.com> Date: Tue, 18 Jul 2023 22:54:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E5=8B=A4=E7=94=B3=E8=AF=89=E6=89=98?= =?UTF-8?q?=E7=AE=A1=E5=88=B0=E8=A1=A8=E5=8D=95=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../checkWorkAbnormalAttendanceAdd.js | 131 --------- .../checkWorkAbnormalAttendanceDetails.js | 33 --- .../checkWorkAbnormalAttendanceList.js | 256 ++++++++---------- .../js/checkWorkApprove/checkWorkApprove.js | 44 --- .../checkWorkApprove/checkWorkApproveList.js | 175 ------------ .../checkWorkBusinessTripList.js | 3 + .../checkWorkCancelLeaveList.js | 3 + .../checkWorkMyAttendanceStatistics.js | 9 - .../template/js/checkwork/checkworkreport.js | 226 ++++++---------- .../checkWorkAbnormalAttendanceAdd.html | 64 ----- .../checkWorkAbnormalAttendanceDetails.html | 21 -- ...kWorkAbnormalAttendanceDetailsTemplate.tpl | 56 ---- .../checkWorkAbnormalAttendanceList.html | 63 ++--- .../checkWorkApprove/checkWorkApprove.html | 21 -- .../checkWorkApproveList.html | 71 ----- .../checkWorkApproveTemplate.tpl | 51 ---- .../checkWorkMyAttendanceStatistics.html | 1 - .../tpl/checkwork/checkworkreport.html | 51 +--- .../template/assets/lib/layui/custom.js | 1 - .../lib/layui/customer/checkWorkUtil.js | 19 -- .../lib/layui/customer/sysCustomerUtil.js | 21 +- .../template/json/sysServiceMation.json | 1 + 22 files changed, 257 insertions(+), 1064 deletions(-) delete mode 100644 checkwork/src/main/resources/template/js/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceAdd.js delete mode 100644 checkwork/src/main/resources/template/js/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceDetails.js delete mode 100644 checkwork/src/main/resources/template/js/checkWorkApprove/checkWorkApprove.js delete mode 100644 checkwork/src/main/resources/template/js/checkWorkApprove/checkWorkApproveList.js delete mode 100644 checkwork/src/main/resources/template/tpl/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceAdd.html delete mode 100644 checkwork/src/main/resources/template/tpl/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceDetails.html delete mode 100644 checkwork/src/main/resources/template/tpl/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceDetailsTemplate.tpl delete mode 100644 checkwork/src/main/resources/template/tpl/checkWorkApprove/checkWorkApprove.html delete mode 100644 checkwork/src/main/resources/template/tpl/checkWorkApprove/checkWorkApproveList.html delete mode 100644 checkwork/src/main/resources/template/tpl/checkWorkApprove/checkWorkApproveTemplate.tpl delete mode 100644 web/src/main/resources/template/assets/lib/layui/customer/checkWorkUtil.js diff --git a/checkwork/src/main/resources/template/js/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceAdd.js b/checkwork/src/main/resources/template/js/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceAdd.js deleted file mode 100644 index 8a94494c4..000000000 --- a/checkwork/src/main/resources/template/js/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceAdd.js +++ /dev/null @@ -1,131 +0,0 @@ -var workId = ""; -var appealType = "1"; -var appealReasonId = ""; - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'jquery', 'winui', 'tableSelect'], function (exports) { - winui.renderColor(); - layui.use(['form'], function (form) { - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$, - tableSelect = layui.tableSelect; - - var ids = ""; - tableSelect.render({ - elem: '#approvalId', //定义输入框input对象 - checkedKey: 'id', //表格的唯一键值,非常重要,影响到选中状态 必填 - searchKey: 'userName', //搜索输入框的name值 默认keyword - searchPlaceholder: '审批人搜索', //搜索输入框的提示文字 默认关键词搜索 - table: { //定义表格参数,与LAYUI的TABLE模块一致,只是无需再定义表格elem - url: flowableBasePath + 'checkwork008', - where: {userName: $("#userName").val()}, - method: 'post', - page: true, - limits: [8, 16, 24, 32, 40, 48, 56], - limit: 8, - cols: [[ - { type: 'radio'}, - { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'userName', title: '审批人', width: 100 }, - { field: 'userSex', title: '性别', width: 60, templet: function (d) { - if(d.userSex == '0'){ - return "保密"; - } else if (d.userSex == '1'){ - return "男"; - } else if (d.userSex == '2'){ - return "女"; - } else { - return "参数错误"; - } - }}, - { field: 'departmentName', title: '所在部门', width: 100 }, - ]] - }, - done: function (elem, data) { - var newJson = data.data[0].userName; - ids = data.data[0].id; - elem.val(newJson); - elem.attr('ts-selected', ids); - } - }) - - initAppealReasonId(); - //初始化申诉内容 - function initWorkId(){ - showGrid({ - id: "workId", - url: flowableBasePath + "checkwork004", - params: {appealType: appealType}, - pagination: false, - template: getFileContent('tpl/template/select-option.tpl'), - ajaxSendLoadBefore: function(hdb) {}, - ajaxSendAfter:function (json) { - form.render('select'); - } - }); - } - - function initAppealReasonId() { - // 考勤申诉原因 - sysDictDataUtil.showDictDataListByDictTypeCode(sysDictData["hrCheckWorkReason"]["key"], 'select', "appealReasonId", '', form); - - initWorkId(); - } - - //申诉类型监听事件 - form.on('select(appealType)', function(data) { - appealType = data.value; - workId = ''; - initWorkId(); - }); - - //申诉内容监听事件 - form.on('select(workId)', function(data) { - workId = data.value; - }); - - //申诉原因类型监听事件 - form.on('select(appealReasonId)', function(data) { - appealReasonId = data.value; - }); - - matchingLanguage(); - form.render(); - form.on('submit(formAddBean)', function (data) { - if (winui.verifyForm(data.elem)) { - if(isNull(workId)){ - winui.window.msg('请选择申诉内容', {icon: 2, time: 2000}); - return false; - } - if(isNull(appealReasonId)){ - winui.window.msg('请选择申诉原因类型', {icon: 2, time: 2000}); - return false; - } - var params = { - appealType: appealType, - workId: workId, - appealReasonId: appealReasonId, - appealReason: encodeURIComponent($("#appealReason").val()), - approvalId: ids - }; - if (!isNull($("#approvalId").val()) && !isNull(ids)){ - AjaxPostUtil.request({url: flowableBasePath + "checkwork005", params: params, type: 'json', callback: function (json) { - parent.layer.close(index); - parent.refreshCode = '0'; - }}); - } else { - winui.window.msg("请选择审批人!", {icon: 2, time: 2000}); - } - } - return false; - }); - - $("body").on("click", "#cancle", function() { - parent.layer.close(index); - }); - }); -}); \ No newline at end of file diff --git a/checkwork/src/main/resources/template/js/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceDetails.js b/checkwork/src/main/resources/template/js/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceDetails.js deleted file mode 100644 index bc36c1708..000000000 --- a/checkwork/src/main/resources/template/js/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceDetails.js +++ /dev/null @@ -1,33 +0,0 @@ - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui'], function (exports) { - winui.renderColor(); - layui.use(['form'], function (form) { - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$; - - showGrid({ - id: "showForm", - url: flowableBasePath + "checkwork012", - params: {rowId:parent.rowId}, - pagination: false, - template: getFileContent('tpl/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceDetailsTemplate.tpl'), - ajaxSendAfter:function (json) { - if(json.bean.state == "申诉中"){ - $("#approvalTime").hide(); - $("#appealRemark").hide(); - } - matchingLanguage(); - form.render(); - } - }); - - $("body").on("click", "#cancle", function() { - parent.layer.close(index); - }); - }); -}); \ No newline at end of file diff --git a/checkwork/src/main/resources/template/js/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceList.js b/checkwork/src/main/resources/template/js/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceList.js index 27054ee61..afdd6615c 100644 --- a/checkwork/src/main/resources/template/js/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceList.js +++ b/checkwork/src/main/resources/template/js/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceList.js @@ -1,176 +1,158 @@ -var rowId = ""; - layui.config({ base: basePath, version: skyeyeVersion }).extend({ window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui', 'laydate', 'form', 'tableSelect'], function (exports) { +}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { winui.renderColor(); var $ = layui.$, table = layui.table, - form = layui.form, - laydate = layui.laydate, - tableSelect = layui.tableSelect; - - // 新增申诉 + form = layui.form; + var serviceClassName = sysServiceMation["checkWorkAppeal"]["key"]; + authBtn('1597502935353'); - - // 审批日期选取时间段表格 - laydate.render({elem: '#checkDate', range: '~'}); - // 考勤申诉原因 - sysDictDataUtil.showDictDataListByDictTypeCode(sysDictData["hrCheckWorkReason"]["key"], 'select', "appealReasonId", '', form); + // 我的考勤申诉列表 + table.render({ + id: 'messageTable', + elem: '#messageTable', + method: 'post', + url: sysMainMation.checkworkBasePath + 'queryAppealList', + where: getTableParams(), + even: true, + page: true, + limits: getLimits(), + limit: getLimit(), + cols: [[ + { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, + { field: 'oddNumber', title: '单号', width: 200, align: 'center', templet: function (d) { + return '' + d.oddNumber + ''; + }}, + { field: 'processInstanceId', title: '流程ID', width: 80, align: 'center', templet: function (d) { + return '' + d.processInstanceId + ''; + }}, + { field: 'state', title: '状态', width: 90, align: 'center', templet: function (d) { + return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("flowableStateEnum", 'id', d.state, 'name'); + }}, + { field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 }, + { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 }, + { field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 }, + { field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 }, + { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 257, toolbar: '#messageTableBar'} + ]], + done: function(json) { + matchingLanguage(); + initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单号", function () { + table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}); + }); + } + }); - var ids = ""; - tableSelect.render({ - elem: '#approvalId', //定义输入框input对象 - checkedKey: 'id', //表格的唯一键值,非常重要,影响到选中状态 必填 - searchKey: 'userName', //搜索输入框的name值 默认keyword - searchPlaceholder: '审批人搜索', //搜索输入框的提示文字 默认关键词搜索 - table: { //定义表格参数,与LAYUI的TABLE模块一致,只是无需再定义表格elem - url: flowableBasePath + 'checkwork008', - where: {userName: $("#userName").val()}, - method: 'post', - page: true, - limits: [8, 16, 24, 32, 40, 48, 56], - limit: 8, - cols: [[ - { type: 'radio'}, - { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'userName', title: '审批人', width: 100 }, - { field: 'userSex', title: '性别', width: 60, templet: function (d) { - if(d.userSex == '0'){ - return "保密"; - } else if (d.userSex == '1'){ - return "男"; - } else if (d.userSex == '2'){ - return "女"; - } else { - return "参数错误"; - } - }}, - { field: 'departmentName', title: '所在部门', width: 100 } - ]] - }, - done: function (elem, data) { - var newJson = data.data[0].userName; - ids = data.data[0].id; - elem.val(newJson); - elem.attr('ts-selected', ids); - } - }) - - initMyAppealTable(); - // 我的申诉申请列表 - function initMyAppealTable(){ - table.render({ - id: 'myAppealTable', - elem: '#myAppealTable', - method: 'post', - url: flowableBasePath + 'checkwork006', - where: getTableParams(), - even: true, - page: true, - limits: getLimits(), - limit: getLimit(), - cols: [[ - { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'checkDate', title: '申诉内容', align: 'left', width: 160, templet: function (d) { - var text = d.checkDate; - return text += d.situation; - }}, - { field: 'appealName', title: '申诉原因', align: 'center', width: 100 }, - { field: 'appealReason', title: '申诉具体原因', align: 'left', width: 170 }, - { field: 'createTime', title: '申诉时间', align: 'center', width: 150 }, - { field: 'state', title: '申诉状态', width: 100, align: 'center', templet: function (d) { - if(d.state == '0'){ - return "申诉中"; - } else if (d.state == '1'){ - return "申诉通过"; - } else if (d.state == '2'){ - return "申诉不通过"; - } else { - return "参数错误"; - } - }}, - { field: 'userName', title: '审批人', align: 'center', width: 80}, - { field: 'approvalTime', title: '审批时间', align: 'center', width: 150 }, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 100, toolbar: '#tableBar1'} - ]], - done: function(json) { - matchingLanguage(); - } - }); - } - - form.render(); - - table.on('tool(myAppealTable)', function (obj) { + table.on('tool(messageTable)', function (obj) { var data = obj.data; var layEvent = obj.event; - if (layEvent === 'details') { //我的申诉申请详情 - details(data); - } + 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/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceAdd.html", - title: "新增申诉", + url: systemCommonUtil.getUrl('FP2023071800009', null), + title: systemLanguage["com.skyeye.addPageTitle"][languageType], pageId: "checkWorkAbnormalAttendanceAdd", area: ['90vw', '90vh'], callBack: function (refreshCode) { winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - reloadMyAppealTable(); + loadTable(); }}); }); + + function revoke(data) { + layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) { + layer.close(index); + AjaxPostUtil.request({url: sysMainMation.checkworkBasePath + "revokeAppeal", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) { + winui.window.msg("提交成功", {icon: 1, time: 2000}); + loadTable(); + }}); + }); + } + + function edit(data) { + _openNewWindows({ + url: systemCommonUtil.getUrl('FP2023071800010&id=' + data.id, null), + title: systemLanguage["com.skyeye.editPageTitle"][languageType], + pageId: "checkWorkAbnormalAttendanceEdit", + area: ['90vw', '90vh'], + callBack: function (refreshCode) { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + loadTable(); + } + }); + } + + // 出差申请提交审批 + 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(serviceClassName, null, function (approvalId) { + var params = { + id: data.id, + approvalId: approvalId + }; + AjaxPostUtil.request({url: sysMainMation.checkworkBasePath + "submitAppeal", params: params, type: 'json', method: "POST", callback: function (json) { + winui.window.msg("提交成功", {icon: 1, time: 2000}); + loadTable(); + }}); + }); + }); + } + + // 出差申请作废 + function cancellation(data) { + layer.confirm('确认作废该申请吗?', { icon: 3, title: '作废操作' }, function (index) { + layer.close(index); + AjaxPostUtil.request({url: sysMainMation.checkworkBasePath + "invalidAppeal", params: {id: data.id}, type: 'json', method: "POST", callback: function (json) { + winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); + loadTable(); + }}); + }); + } // 我的申诉申请详情 function details(data) { - rowId = data.id; _openNewWindows({ - url: "../../tpl/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceDetails.html", + url: systemCommonUtil.getUrl('FP2023071800011&id=' + data.id, null), title: systemLanguage["com.skyeye.detailsPageTitle"][languageType], pageId: "checkWorkAbnormalAttendanceDetails", area: ['90vw', '90vh'], callBack: function (refreshCode) { }}); } - - // 搜索我的申诉申请 - $("body").on("click", "#searchForm1", function() { - table.reloadData("myAppealTable", {page: {curr: 1}, where: getTableParams()}); + + form.render(); + $("body").on("click", "#reloadTable", function() { + loadTable(); }); - - // 刷新我的申诉申请 - $("body").on("click", "#reloadTable", function() { - reloadMyAppealTable(); - }); - - function reloadMyAppealTable(){ - table.reloadData("myAppealTable", {where: getTableParams()}); - } - - function getTableParams() { - if(isNull($("#approvalId").val())) { - ids = ""; - } - var startTime = "", endTime = ""; - if (!isNull($("#checkDate").val())) { - startTime = $("#checkDate").val().split('~')[0].trim() + ' 00:00:00'; - endTime = $("#checkDate").val().split('~')[1].trim() + ' 23:59:59'; - } - return { - firstTime: startTime, - lastTime: endTime, - approvalId: ids, - state: $("#state").val(), - appealReasonId: $("#appealReasonId").val() - }; - } + function loadTable() { + table.reloadData("messageTable", {where: getTableParams()}); + } + + function getTableParams() { + return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable")); + } exports('checkWorkAbnormalAttendanceList', {}); }); diff --git a/checkwork/src/main/resources/template/js/checkWorkApprove/checkWorkApprove.js b/checkwork/src/main/resources/template/js/checkWorkApprove/checkWorkApprove.js deleted file mode 100644 index 6f12dcf39..000000000 --- a/checkwork/src/main/resources/template/js/checkWorkApprove/checkWorkApprove.js +++ /dev/null @@ -1,44 +0,0 @@ - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui'], function (exports) { - winui.renderColor(); - layui.use(['form'], function (form) { - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$; - - showGrid({ - id: "showForm", - url: flowableBasePath + "checkwork010", - params: {rowId:parent.rowId}, - pagination: false, - template: getFileContent('tpl/checkWorkApprove/checkWorkApproveTemplate.tpl'), - ajaxSendAfter:function (json) { - matchingLanguage(); - form.render(); - form.on('submit(formEditBean)', function (data) { - if (winui.verifyForm(data.elem)) { - var params = { - rowId: parent.rowId, - state: $("input[name='appealstate']:checked").val(), - appealRemark: $("#appealRemark").val() - }; - - AjaxPostUtil.request({url: flowableBasePath + "checkwork011", params: params, type: 'json', callback: function (json) { - parent.layer.close(index); - parent.refreshCode = '0'; - }}); - } - return false; - }); - } - }); - - $("body").on("click", "#cancle", function() { - parent.layer.close(index); - }); - }); -}); \ No newline at end of file diff --git a/checkwork/src/main/resources/template/js/checkWorkApprove/checkWorkApproveList.js b/checkwork/src/main/resources/template/js/checkWorkApprove/checkWorkApproveList.js deleted file mode 100644 index 662faa420..000000000 --- a/checkwork/src/main/resources/template/js/checkWorkApprove/checkWorkApproveList.js +++ /dev/null @@ -1,175 +0,0 @@ - -var rowId = ""; - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui', 'laydate', 'form', 'tableSelect'], function (exports) { - winui.renderColor(); - var $ = layui.$, - table = layui.table, - form = layui.form, - laydate = layui.laydate, - tableSelect = layui.tableSelect; - - // 审批日期选取时间段表格 - laydate.render({elem: '#checkDate', range: '~'}); - - // 考勤申诉原因 - sysDictDataUtil.showDictDataListByDictTypeCode(sysDictData["hrCheckWorkReason"]["key"], 'select', "appealReasonId", '', form); - - var createid = ""; - tableSelect.render({ - elem: '#createId', //定义输入框input对象 - checkedKey: 'id', //表格的唯一键值,非常重要,影响到选中状态 必填 - searchKey: 'userName', //搜索输入框的name值 默认keyword - searchPlaceholder: '审批人搜索', //搜索输入框的提示文字 默认关键词搜索 - table: { //定义表格参数,与LAYUI的TABLE模块一致,只是无需再定义表格elem - url: flowableBasePath + 'checkwork008', - where: {userName: $("#userName").val()}, - method: 'post', - page: true, - limits: [8, 16, 24, 32, 40, 48, 56], - limit: 8, - cols: [[ - { type: 'radio'}, - { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'userName', title: '申诉人', width: 100 }, - { field: 'userSex', title: '性别', width: 60, templet: function (d) { - if(d.userSex == '0'){ - return "保密"; - } else if (d.userSex == '1'){ - return "男"; - } else if (d.userSex == '2'){ - return "女"; - } else { - return "参数错误"; - } - }}, - { field: 'departmentName', title: '所在部门', width: 100 } - ]] - }, - done: function (elem, data) { - var newJson = data.data[0].userName; - createid = data.data[0].id; - elem.val(newJson); - elem.attr('ts-selected', createid); - } - }) - - initMyGetTable(); - // 员工考勤申诉审批列表 - function initMyGetTable(){ - table.render({ - id: 'myGetTable', - elem: '#myGetTable', - method: 'post', - url: flowableBasePath + 'checkwork007', - where: getTableParams(), - even: true, - page: true, - limits: getLimits(), - limit: getLimit(), - cols: [[ - { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'checkDate', title: '申诉内容', align: 'left', width: 160, templet: function (d) { - var text = d.checkDate; - return text + d.situation; - }}, - { field: 'appealName', title: '申诉原因', align: 'center', width: 100 }, - { field: 'appealReason', title: '申诉具体原因', align: 'left', width: 170 }, - { field: 'createTime', title: '申诉时间', align: 'center', width: 150 }, - { field: 'state', title: '申诉状态', align: 'left', width: 100, templet: function (d) { - if(d.state == '0'){ - return "申诉中"; - } else if (d.state == '1'){ - return "申诉通过"; - } else if (d.state == '2'){ - return "申诉不通过"; - } else { - return "参数错误"; - } - }}, - { field: 'userName', title: '申诉人', align: 'left', width: 80}, - { field: 'approvalTime', title: '审批时间', align: 'center', width: 150 }, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 140, toolbar: '#tableBar2'} - ]], - done: function(json) { - matchingLanguage(); - } - }); - table.on('tool(myGetTable)', function (obj) { - var data = obj.data; - var layEvent = obj.event; - if (layEvent === 'approve') { //审批员工的申诉申请 - approve(data); - } else if (layEvent === 'appealdetails'){ //员工的申诉申请详情 - appealdetails(data); - } - }); - } - - form.render(); - - // 审批员工的申诉申请 - function approve(data) { - rowId = data.id; - _openNewWindows({ - url: "../../tpl/checkWorkApprove/checkWorkApprove.html", - title: "审批申诉申请", - pageId: "checkWorkApprove", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - reloadMyGetTable(); - }}); - } - - // 员 工的申诉申请详情 - function appealdetails(data) { - rowId = data.id; - _openNewWindows({ - url: "../../tpl/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceDetails.html", - title: systemLanguage["com.skyeye.detailsPageTitle"][languageType], - pageId: "checkWorkAbnormalAttendanceDetails", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - }}); - } - - // 搜索员工考勤申诉审批 - $("body").on("click", "#searchForm2", function() { - table.reloadData("myGetTable", {page: {curr: 1}, where: getTableParams()}); - }); - - // 刷新员工考勤申诉审批 - $("body").on("click", "#reloadGetTable", function() { - reloadMyGetTable(); - }); - - function reloadMyGetTable(){ - table.reloadData("myGetTable", {where: getTableParams()}); - } - - function getTableParams(){ - if(isNull($("#createId").val())) { - createid = ""; - } - var startTime = "", endTime = ""; - if (!isNull($("#checkDate").val())) { - startTime = $("#checkDate").val().split('~')[0].trim() + ' 00:00:00'; - endTime = $("#checkDate").val().split('~')[1].trim() + ' 23:59:59'; - } - return { - firstTime: startTime, - lastTime: endTime, - createId: createid, - state: $("#state").val(), - appealReasonId: $("#appealReasonId").val() - }; - } - - exports('checkWorkApproveList', {}); -}); diff --git a/checkwork/src/main/resources/template/js/checkWorkBusinessTrip/checkWorkBusinessTripList.js b/checkwork/src/main/resources/template/js/checkWorkBusinessTrip/checkWorkBusinessTripList.js index 24bbc7d12..3bff8e2f6 100644 --- a/checkwork/src/main/resources/template/js/checkWorkBusinessTrip/checkWorkBusinessTripList.js +++ b/checkwork/src/main/resources/template/js/checkWorkBusinessTrip/checkWorkBusinessTripList.js @@ -44,6 +44,9 @@ layui.config({ ]], done: function(json) { matchingLanguage(); + initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单号,标题", function () { + table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}); + }); } }); diff --git a/checkwork/src/main/resources/template/js/checkWorkCancelLeave/checkWorkCancelLeaveList.js b/checkwork/src/main/resources/template/js/checkWorkCancelLeave/checkWorkCancelLeaveList.js index 8fc8747ef..c7bf2209b 100644 --- a/checkwork/src/main/resources/template/js/checkWorkCancelLeave/checkWorkCancelLeaveList.js +++ b/checkwork/src/main/resources/template/js/checkWorkCancelLeave/checkWorkCancelLeaveList.js @@ -44,6 +44,9 @@ layui.config({ ]], done: function(json) { matchingLanguage(); + initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单号,标题", function () { + table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}); + }); } }); diff --git a/checkwork/src/main/resources/template/js/checkWorkMyAttendanceStatistics/checkWorkMyAttendanceStatistics.js b/checkwork/src/main/resources/template/js/checkWorkMyAttendanceStatistics/checkWorkMyAttendanceStatistics.js index 9bbcfef8f..c8ec5a732 100644 --- a/checkwork/src/main/resources/template/js/checkWorkMyAttendanceStatistics/checkWorkMyAttendanceStatistics.js +++ b/checkwork/src/main/resources/template/js/checkWorkMyAttendanceStatistics/checkWorkMyAttendanceStatistics.js @@ -149,15 +149,6 @@ layui.config({ form.render(); - // 个人考勤情况导出 - $("body").on("click", "#download", function() { - postDownLoadFile({ - url : flowableBasePath + 'checkwork017', - params: getTableParams(), - method : 'post' - }); - }); - // 搜索我的考勤统计 $("body").on("click", "#searchForm", function() { table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}); diff --git a/checkwork/src/main/resources/template/js/checkwork/checkworkreport.js b/checkwork/src/main/resources/template/js/checkwork/checkworkreport.js index f2743ee52..ffd721a7a 100644 --- a/checkwork/src/main/resources/template/js/checkwork/checkworkreport.js +++ b/checkwork/src/main/resources/template/js/checkwork/checkworkreport.js @@ -12,11 +12,10 @@ layui.config({ window: 'js/winui.window', echarts: '../echarts/echarts', echartsTheme: '../echarts/echartsTheme' -}).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate', 'echarts'], function (exports) { +}).define(['window', 'table', 'jquery', 'winui', 'form', 'echarts'], function (exports) { winui.renderColor(); var $ = layui.$, form = layui.form, - laydate = layui.laydate, table = layui.table; var selTemplate = getFileContent('tpl/template/select-option.tpl'); @@ -37,139 +36,91 @@ layui.config({ } }); - //初始化统计时间 - var day = getTodayDay(); - endTime = getYesterdayYMDFormatDate();//结束日期为今天的前一天 - if(day === "1" || day == 1){//如果当前为本月一号,则查询上个月的 - startTime = getTOneYMDFormatDate();//开始日期为上个月一号 - } else { - startTime = getOneYMDFormatDate();//开始日期为本月一号 - } - - //'统计表'页面的选取时间段表格 - laydate.render({ - elem: '#checkTime', //指定元素 - max: getYesterdayYMDFormatDate(),// 设置最大可选的日期 - range: '~', - value: startTime + " ~ " + endTime,//初始化统计日期 - done: function(value, date, endDate){ - if(isNull(value)){ - startTime = ""; - endTime = ""; - } else { - startTime = value.split("~")[0].trim(); - endTime = value.split("~")[1].trim(); - } + table.render({ + id: 'messageTable', + elem: '#messageTable', + method: 'post', + url: sysMainMation.checkworkBasePath + 'checkwork015', + where: getTableParams(), + even: true, + page: true, + limits: getLimits(), + limit: getLimit(), + cols: [[ + { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, + { field: 'userId', title: 'ID', width: 50,style:'display:none;'}, + { field: 'companyName', title: '公司', align: 'left', width: 200 }, + { field: 'departmentName', title: '部门', align: 'left', width: 120 }, + { field: 'jobName', title: '职位', align: 'left', width: 120 }, + { field: 'userName', title: '姓名', align: 'left', width: 80 }, + { field: 'shouldTime', title: '应出勤(次)', align: 'center', width: 100 }, + { field: 'fullTime', title: '全勤(次)', align: 'center', width: 100, templet: function (d) { + if(d.fullTime != '0'){ + return "" + d.fullTime + ""; + } else { + return d.fullTime; + } + }}, + { field: 'absenteeism', title: '缺勤(次)', align: 'center', width: 100, templet: function (d) { + if(d.absenteeism != '0'){ + return "" + d.absenteeism + ""; + } else { + return d.absenteeism; + } + }}, + { field: 'lackTime', title: '工时不足(次)', align: 'center', width: 100, templet: function (d) { + if(d.lackTime != '0'){ + return "" + d.lackTime + ""; + } else { + return d.lackTime; + } + }}, + { field: 'late', title: '迟到(次)', align: 'center', width: 100, templet: function (d) { + if(d.late != '0'){ + return "" + d.late + ""; + } else { + return d.late; + } + }}, + { field: 'leaveEarly', title: '早退(次)', align: 'center', width: 100, templet: function (d) { + if(d.leaveEarly != '0'){ + return "" + d.leaveEarly + ""; + } else { + return d.leaveEarly; + } + }}, + { field: 'missing', title: '漏签(次)', align: 'center', width: 100, templet: function (d) { + if(d.missing != '0'){ + return "" + d.missing + ""; + } else { + return d.missing; + } + }} + ] + ], + done: function(json) { + matchingLanguage(); + $('table.layui-table thead tr th:eq(1)').addClass('layui-hide'); } }); - - // 加载考勤班次 - /*showGrid({ - id: "timeId", - url: sysMainMation.checkworkBasePath + "queryEnableCheckWorkTimeList", - params: {}, - method: 'GET', - pagination: false, - template: selTemplate, - ajaxSendLoadBefore: function(hdb, json){ - $.each(json.rows, function(i, item) { - item.name = item.title + ' [' + item.startTime + ' ~ ' + item.endTime + ']'; - }); - }, - ajaxSendAfter:function (json) { - initCompany(); - } - });*/ - initCompany(); - - function initTable(){ - $("#title").text(startTime + "至" + endTime + " 考勤情况统计"); - table.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - url: flowableBasePath + 'checkwork015', - where: getTableParams(), - even: true, - page: true, - limits: [10, 20, 30, 40, 50, 100], - limit: 10, - cols: [[ - { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - {field: 'userId', title: 'ID', width: 50,style:'display:none;'}, - { field: 'companyName', title: '公司', align: 'left', width: 200 }, - { field: 'departmentName', title: '部门', align: 'left', width: 120 }, - { field: 'jobName', title: '职位', align: 'left', width: 120 }, - { field: 'userName', title: '姓名', align: 'left', width: 80 }, - { field: 'shouldTime', title: '应出勤(次)', align: 'center', width: 100 }, - { field: 'fullTime', title: '全勤(次)', align: 'center', width: 100, templet: function (d) { - if(d.fullTime != '0'){ - return "" + d.fullTime + ""; - } else { - return d.fullTime; - } - }}, - { field: 'absenteeism', title: '缺勤(次)', align: 'center', width: 100, templet: function (d) { - if(d.absenteeism != '0'){ - return "" + d.absenteeism + ""; - } else { - return d.absenteeism; - } - }}, - { field: 'lackTime', title: '工时不足(次)', align: 'center', width: 100, templet: function (d) { - if(d.lackTime != '0'){ - return "" + d.lackTime + ""; - } else { - return d.lackTime; - } - }}, - { field: 'late', title: '迟到(次)', align: 'center', width: 100, templet: function (d) { - if(d.late != '0'){ - return "" + d.late + ""; - } else { - return d.late; - } - }}, - { field: 'leaveEarly', title: '早退(次)', align: 'center', width: 100, templet: function (d) { - if(d.leaveEarly != '0'){ - return "" + d.leaveEarly + ""; - } else { - return d.leaveEarly; - } - }}, - { field: 'missing', title: '漏签(次)', align: 'center', width: 100, templet: function (d) { - if(d.missing != '0'){ - return "" + d.missing + ""; - } else { - return d.missing; - } - }} - ] - ], - done: function(json) { - matchingLanguage(); - $('table.layui-table thead tr th:eq(1)').addClass('layui-hide'); - } - }); - table.on('tool(messageTable)', function (obj) { - var data = obj.data; - var layEvent = obj.event; - if (layEvent === 'fullTime') { - detail(data, '1'); - } else if (layEvent === 'absenteeism'){ - detail(data, '2'); - } else if (layEvent === 'lackTime'){ - detail(data, '3'); - } else if (layEvent === 'late'){ - detail(data, '4'); - } else if (layEvent === 'leaveEarly'){ - detail(data, '5'); - } else if (layEvent === 'missing'){ - detail(data, '6'); - } - }); - } - + table.on('tool(messageTable)', function (obj) { + var data = obj.data; + var layEvent = obj.event; + if (layEvent === 'fullTime') { + detail(data, '1'); + } else if (layEvent === 'absenteeism'){ + detail(data, '2'); + } else if (layEvent === 'lackTime'){ + detail(data, '3'); + } else if (layEvent === 'late'){ + detail(data, '4'); + } else if (layEvent === 'leaveEarly'){ + detail(data, '5'); + } else if (layEvent === 'missing'){ + detail(data, '6'); + } + }); + function detail(data, detailType){ var userName = data.userName; var title = ""; @@ -273,15 +224,6 @@ layui.config({ } }); - //导出 - $("body").on("click", "#download", function() { - postDownLoadFile({ - url : flowableBasePath + 'checkwork020', - params: getTableParams(), - method : 'post' - }); - }); - function loadTable() { if(isNull($("#checkTime").val())) {//一定要记得,当createTime为空时 winui.window.msg("请选择时间段", {icon: 2, time: 2000}); diff --git a/checkwork/src/main/resources/template/tpl/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceAdd.html b/checkwork/src/main/resources/template/tpl/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceAdd.html deleted file mode 100644 index abf211425..000000000 --- a/checkwork/src/main/resources/template/tpl/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceAdd.html +++ /dev/null @@ -1,64 +0,0 @@ - - -
- -