diff --git a/checkwork/src/main/resources/template/js/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceAdd.js b/checkwork/src/main/resources/template/js/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceAdd.js index effdcc12b9e94f6f7d3aa78ba0825d0cd003c563..3ad3d9bcd1a9cffd7642c6498cb3162dc2c1746b 100644 --- a/checkwork/src/main/resources/template/js/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceAdd.js +++ b/checkwork/src/main/resources/template/js/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceAdd.js @@ -69,20 +69,11 @@ layui.config({ }); } - //初始化申诉原因类型 - function initAppealReasonId(){ - showGrid({ - id: "appealReasonId", - url: flowableBasePath + "checkworkreason010", - params: {}, - pagination: false, - template: getFileContent('tpl/template/select-option.tpl'), - ajaxSendLoadBefore: function(hdb){}, - ajaxSendAfter:function (json) { - form.render('select'); - initWorkId(); - } - }); + function initAppealReasonId() { + // 考勤申诉原因 + sysDictDataUtil.showDictDataListByDictTypeCode(sysDictData["hrCheckWorkReason"]["key"], 'select', "appealReasonId", '', form); + + initWorkId(); } //申诉类型监听事件 diff --git a/checkwork/src/main/resources/template/js/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceList.js b/checkwork/src/main/resources/template/js/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceList.js index 784e5d68bb43a7f48b2f08e683177e2ec085010b..234a0d5dc68f3c10ebe03508515908fb9a459370 100644 --- a/checkwork/src/main/resources/template/js/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceList.js +++ b/checkwork/src/main/resources/template/js/checkWorkAbnormalAttendance/checkWorkAbnormalAttendanceList.js @@ -8,7 +8,6 @@ layui.config({ window: 'js/winui.window' }).define(['window', 'table', 'jquery', 'winui', 'laydate', 'form', 'tableSelect'], function (exports) { winui.renderColor(); - var $ = layui.$, table = layui.table, form = layui.form, @@ -19,24 +18,11 @@ layui.config({ authBtn('1597502935353'); // 审批日期选取时间段表格 - laydate.render({ - elem: '#checkDate', - range: '~' - }); - - // 初始化申诉原因类型 - showGrid({ - id: "appealReasonId", - url: flowableBasePath + "checkworkreason010", - params: {}, - pagination: false, - template: getFileContent('tpl/template/select-option.tpl'), - ajaxSendLoadBefore: function(hdb){}, - ajaxSendAfter:function (json) { - form.render('select'); - } - }); - + laydate.render({elem: '#checkDate', range: '~'}); + + // 考勤申诉原因 + sysDictDataUtil.showDictDataListByDictTypeCode(sysDictData["hrCheckWorkReason"]["key"], 'select', "appealReasonId", '', form); + var ids = ""; tableSelect.render({ elem: '#approvalId', //定义输入框input对象 diff --git a/checkwork/src/main/resources/template/js/checkWorkApprove/checkWorkApproveList.js b/checkwork/src/main/resources/template/js/checkWorkApprove/checkWorkApproveList.js index 9963b4ceb3cbd8799fb4b82627a60a70758a5db5..4887cade3a8c9cd87c678b9ef59a63868d484d40 100644 --- a/checkwork/src/main/resources/template/js/checkWorkApprove/checkWorkApproveList.js +++ b/checkwork/src/main/resources/template/js/checkWorkApprove/checkWorkApproveList.js @@ -8,7 +8,6 @@ layui.config({ window: 'js/winui.window' }).define(['window', 'table', 'jquery', 'winui', 'laydate', 'form', 'tableSelect'], function (exports) { winui.renderColor(); - var $ = layui.$, table = layui.table, form = layui.form, @@ -16,24 +15,11 @@ layui.config({ tableSelect = layui.tableSelect; // 审批日期选取时间段表格 - laydate.render({ - elem: '#checkDate', - range: '~' - }); - - // 初始化申诉原因类型 - showGrid({ - id: "appealReasonId", - url: flowableBasePath + "checkworkreason010", - params: {}, - pagination: false, - template: getFileContent('tpl/template/select-option.tpl'), - ajaxSendLoadBefore: function(hdb){}, - ajaxSendAfter:function (json) { - form.render('select'); - } - }); - + laydate.render({elem: '#checkDate', range: '~'}); + + // 考勤申诉原因 + sysDictDataUtil.showDictDataListByDictTypeCode(sysDictData["hrCheckWorkReason"]["key"], 'select', "appealReasonId", '', form); + var createid = ""; tableSelect.render({ elem: '#createId', //定义输入框input对象 diff --git a/checkwork/src/main/resources/template/js/checkWorkReason/checkWorkReasonAdd.js b/checkwork/src/main/resources/template/js/checkWorkReason/checkWorkReasonAdd.js deleted file mode 100644 index fbcca8267029b697e0a0dc00d7daf81f6e82d77c..0000000000000000000000000000000000000000 --- a/checkwork/src/main/resources/template/js/checkWorkReason/checkWorkReasonAdd.js +++ /dev/null @@ -1,32 +0,0 @@ - -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 index = parent.layer.getFrameIndex(window.name); - var $ = layui.$; - - matchingLanguage(); - form.render(); - form.on('submit(formAddBean)', function (data) { - if (winui.verifyForm(data.elem)) { - var params = { - appealName: $("#appealName").val(), - }; - AjaxPostUtil.request({url: flowableBasePath + "checkworkreason002", params: params, type: 'json', method: "POST", 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/checkWorkReason/checkWorkReasonEdit.js b/checkwork/src/main/resources/template/js/checkWorkReason/checkWorkReasonEdit.js deleted file mode 100644 index 81611d10d1c35d4004ce59810406df024b2a0185..0000000000000000000000000000000000000000 --- a/checkwork/src/main/resources/template/js/checkWorkReason/checkWorkReasonEdit.js +++ /dev/null @@ -1,42 +0,0 @@ - -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 index = parent.layer.getFrameIndex(window.name); - var $ = layui.$; - - showGrid({ - id: "showForm", - url: flowableBasePath + "checkworkreason006", - params: {rowId: parent.rowId}, - pagination: false, - method: "GET", - template: $("#beanTemplate").html(), - ajaxSendAfter:function (json) { - matchingLanguage(); - form.on('submit(formEditBean)', function (data) { - if (winui.verifyForm(data.elem)) { - var params = { - rowId: parent.rowId, - appealName: $("#appealName").val(), - }; - AjaxPostUtil.request({url: flowableBasePath + "checkworkreason007", params: params, type: 'json', method: "PUT", 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/checkWorkReason/checkWorkReasonList.js b/checkwork/src/main/resources/template/js/checkWorkReason/checkWorkReasonList.js deleted file mode 100644 index a4c054169f26d234066e742e011d7e7af8b8a283..0000000000000000000000000000000000000000 --- a/checkwork/src/main/resources/template/js/checkWorkReason/checkWorkReasonList.js +++ /dev/null @@ -1,173 +0,0 @@ - -var rowId = ""; - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { - winui.renderColor(); - var $ = layui.$, - form = layui.form, - table = layui.table; - - authBtn('1556530225067'); - - table.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - url: flowableBasePath + 'checkworkreason001', - where: getTableParams(), - even: true, - page: true, - limits: getLimits(), - limit: getLimit(), - cols: [[ - { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers'}, - { field: 'appealName', title: '名称', align: 'left', width: 120 }, - { field: 'state', title: '状态', width: 80, align: 'center', templet: function (d) { - if(d.state == '2'){ - return "线下"; - }else if(d.state == '1'){ - return "线上"; - }else if(d.state == '0'){ - return "新建"; - } - }}, - { field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 }, - { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 }, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 257, toolbar: '#tableBar'} - ]], - done: function(){ - matchingLanguage(); - } - }); - - table.on('tool(messageTable)', function (obj) { - var data = obj.data; - var layEvent = obj.event; - if (layEvent === 'edit') { //编辑 - edit(data); - }else if (layEvent === 'delet') { //删除 - delet(data); - }else if (layEvent === 'up') { //上线 - up(data); - }else if (layEvent === 'down') { //下线 - down(data); - }else if (layEvent === 'upMove') { //上移 - upMove(data); - }else if (layEvent === 'downMove') { //下移 - downMove(data); - } - }); - - // 添加 - $("body").on("click", "#addBean", function() { - _openNewWindows({ - url: "../../tpl/checkWorkReason/checkWorkReasonAdd.html", - title: systemLanguage["com.skyeye.addPageTitle"][languageType], - pageId: "checkWorkReasonAdd", - area: ['90vw', '90vh'], - callBack: function(refreshCode){ - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - }); - - // 删除 - function delet(data){ - layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ - layer.close(index); - AjaxPostUtil.request({url: flowableBasePath + "checkworkreason003", params: {rowId: data.id}, type: 'json', method: "DELETE", callback: function (json) { - winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - }); - } - - // 上线 - function up(data){ - var msg = '确认上线该条申诉原因吗?'; - layer.confirm(msg, { icon: 3, title: '上线操作' }, function (index) { - layer.close(index); - AjaxPostUtil.request({url: flowableBasePath + "checkworkreason004", params: {rowId: data.id}, type: 'json', method: "PUT", callback: function (json) { - winui.window.msg("上线成功", {icon: 1, time: 2000}); - loadTable(); - }}); - }); - } - - // 下线 - function down(data){ - var msg = '确认下线该条申诉原因吗?'; - layer.confirm(msg, { icon: 3, title: '下线操作' }, function (index) { - layer.close(index); - AjaxPostUtil.request({url: flowableBasePath + "checkworkreason005", params: {rowId: data.id}, type: 'json', method: "PUT", callback: function (json) { - winui.window.msg("下线成功", {icon: 1, time: 2000}); - loadTable(); - }}); - }); - } - - // 编辑 - function edit(data){ - rowId = data.id; - _openNewWindows({ - url: "../../tpl/checkWorkReason/checkWorkReasonEdit.html", - title: systemLanguage["com.skyeye.editPageTitle"][languageType], - pageId: "checkWorkReasonEdit", - area: ['90vw', '90vh'], - callBack: function(refreshCode){ - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadTable(); - } - }); - } - - // 上移 - function upMove(data){ - AjaxPostUtil.request({url: flowableBasePath + "checkworkreason008", params: {rowId: data.id}, type: 'json', method: "PUT", callback: function (json) { - winui.window.msg(systemLanguage["com.skyeye.moveUpOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - } - - // 下移 - function downMove(data){ - AjaxPostUtil.request({url: flowableBasePath + "checkworkreason009", params: {rowId: data.id}, type: 'json', method: "PUT", callback: function (json) { - winui.window.msg(systemLanguage["com.skyeye.moveDownOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - } - - form.render(); - form.on('submit(formSearch)', function (data) { - if (winui.verifyForm(data.elem)) { - refreshTable(); - } - return false; - }); - - // 刷新数据 - $("body").on("click", "#reloadTable", function() { - loadTable(); - }); - - function loadTable(){ - table.reload("messageTable", {where: getTableParams()}); - } - - function refreshTable(){ - table.reload("messageTable", {page: {curr: 1}, where: getTableParams()}); - } - - function getTableParams(){ - return { - appealName:$("#appealName").val() - }; - } - - exports('checkWorkReasonList', {}); -}); diff --git a/checkwork/src/main/resources/template/tpl/checkWorkReason/checkWorkReasonAdd.html b/checkwork/src/main/resources/template/tpl/checkWorkReason/checkWorkReasonAdd.html deleted file mode 100644 index 436c13d3db82cc71a6cdf4d9f2abf3d0ca6005a6..0000000000000000000000000000000000000000 --- a/checkwork/src/main/resources/template/tpl/checkWorkReason/checkWorkReasonAdd.html +++ /dev/null @@ -1,32 +0,0 @@ - - -
- -