diff --git a/wages/src/main/resources/template/js/wagesPaymentHistory/wagesAllGrantPaymentHistoryList.js b/wages/src/main/resources/template/js/wagesPaymentHistory/wagesAllGrantPaymentHistoryList.js deleted file mode 100644 index a6b29d47116e56949381bc284e4abfb836f7a21f..0000000000000000000000000000000000000000 --- a/wages/src/main/resources/template/js/wagesPaymentHistory/wagesAllGrantPaymentHistoryList.js +++ /dev/null @@ -1,92 +0,0 @@ - -var rowId = ""; -var payMonth = ""; - -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; - - // 获取所有已发放薪资发放历史列表 - table.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - url: sysMainMation.wagesBasePath + 'wagespaymenthistory001', - where: getTableParams(), - even: true, - page: true, - limits: getLimits(), - limit: getLimit(), - cols: [[ - { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'companyName', title: '公司', align: 'left', width: 150 }, - { field: 'departmentName', title: '部门', align: 'left', width: 150 }, - { field: 'jobName', title: '职位', align: 'left', width: 120 }, - { field: 'userName', title: '员工', align: 'left', width: 150 }, - { field: 'payMonth', title: '月份', align: 'center', width: 80, templet: function (d) { - return '' + d.payMonth + '

'; - }}, - { field: 'actWages', title: '实发工资', align: 'left', width: 100 }, - { field: 'type', title: '核算方式', align: 'center', width: 80, templet: function (d) { - if(d.type == '1'){ - return "人工核算"; - } else if (d.type == '2'){ - return "系统核算"; - } - }}, - { field: 'createTime', title: '核算日期', align: 'center', width: 150 } - ]], - done: function(json){ - matchingLanguage(); - initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入员工姓名、员工工号", function () { - table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}); - }); - } - }); - - table.on('tool(messageTable)', function (obj) { - var data = obj.data; - var layEvent = obj.event; - if (layEvent === 'details') { //详情 - details(data); - } - }); - - // 详情 - function details(data) { - rowId = data.staffId; - payMonth = data.payMonth; - _openNewWindows({ - url: "../../tpl/wagesPaymentHistory/wagesStaffPaymentDetail.html", - title: systemLanguage["com.skyeye.detailsPageTitle"][languageType], - pageId: "wagesStaffPaymentDetail", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - } - }); - } - - form.render(); - - // 刷新数据 - $("body").on("click", "#reloadTable", function() { - loadTable(); - }); - - function loadTable() { - table.reloadData("messageTable", {where: getTableParams()}); - } - - function getTableParams() { - return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable")); - } - - exports('wagesAllGrantPaymentHistoryList', {}); -}); diff --git a/wages/src/main/resources/template/js/wagesPaymentHistory/wagesAllNotGrantPaymentHistoryList.js b/wages/src/main/resources/template/js/wagesPaymentHistory/wagesAllNotGrantPaymentHistoryList.js deleted file mode 100644 index 1b4a8321c51410042b42d2e99ed9f98395fb1768..0000000000000000000000000000000000000000 --- a/wages/src/main/resources/template/js/wagesPaymentHistory/wagesAllNotGrantPaymentHistoryList.js +++ /dev/null @@ -1,106 +0,0 @@ - -var rowId = ""; -var payMonth = ""; - -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, - table = layui.table, - laydate = layui.laydate; - - laydate.render({elem: '#payMonth', type: 'month'}); - - // 获取所有待发放薪资列表 - table.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - url: sysMainMation.wagesBasePath + 'wagespaymenthistory003', - where: getTableParams(), - even: true, - page: true, - limits: getLimits(), - limit: getLimit(), - cols: [[ - { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'companyName', title: '公司', align: 'left', width: 150 }, - { field: 'departmentName', title: '部门', align: 'left', width: 150 }, - { field: 'jobName', title: '职位', align: 'left', width: 120 }, - { field: 'userName', title: '员工', align: 'left', width: 120}, - { field: 'payMonth', title: '月份', align: 'center', width: 80, templet: function (d) { - return '
' + d.payMonth + '

'; - }}, - { field: 'state', title: '状态', align: 'center', width: 80, templet: function (d) { - return "待发放"; - }}, - { field: 'actWages', title: '实发工资', align: 'left', width: 100 }, - { field: 'type', title: '核算方式', align: 'center', width: 80, templet: function (d) { - if(d.type == '1'){ - return "人工核算"; - } else if (d.type == '2'){ - return "系统核算"; - } - }}, - { field: 'createTime', title: '核算日期', align: 'center', width: 150 }, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 100, toolbar: '#tableBar'} - ]], - done: function(json) { - matchingLanguage(); - initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入员工姓名、员工工号", function () { - table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}); - }); - } - }); - - table.on('tool(messageTable)', function (obj) { - var data = obj.data; - var layEvent = obj.event; - if (layEvent === 'details') { //详情 - details(data); - } else if (layEvent === 'grant') { //发放 - grant(data); - } - }); - - // 详情 - function details(data) { - rowId = data.staffId; - payMonth = data.payMonth; - _openNewWindows({ - url: "../../tpl/wagesPaymentHistory/wagesStaffPaymentDetail.html", - title: systemLanguage["com.skyeye.detailsPageTitle"][languageType], - pageId: "wagesStaffPaymentDetail", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - } - }); - } - - // 发放 - function grant(data) { - - } - - form.render(); - - // 刷新数据 - $("body").on("click", "#reloadTable", function() { - loadTable(); - }); - - function loadTable() { - table.reloadData("messageTable", {where: getTableParams()}); - } - - function getTableParams() { - return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable")); - } - - exports('wagesAllNotGrantPaymentHistoryList', {}); -}); diff --git a/wages/src/main/resources/template/js/wagesPaymentHistory/wagesMyPaymentHistoryList.js b/wages/src/main/resources/template/js/wagesPaymentHistory/wagesMyPaymentHistoryList.js deleted file mode 100644 index bd94920c8d5dedfcc44dc401496b011e0c3f8fd1..0000000000000000000000000000000000000000 --- a/wages/src/main/resources/template/js/wagesPaymentHistory/wagesMyPaymentHistoryList.js +++ /dev/null @@ -1,111 +0,0 @@ - -var rowId = ""; -var payMonth = ""; - -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, - table = layui.table, - laydate = layui.laydate; - - laydate.render({elem: '#payMonth', type: 'month'}); - - // 获取我的薪资发放历史列表 - table.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - url: sysMainMation.wagesBasePath + 'wagespaymenthistory002', - where: getTableParams(), - even: true, - page: true, - limits: getLimits(), - limit: getLimit(), - cols: [[ - { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'companyName', title: '公司', align: 'left', width: 150 }, - { field: 'departmentName', title: '部门', align: 'left', width: 150 }, - { field: 'jobName', title: '职位', align: 'left', width: 120 }, - { field: 'userName', title: '员工', align: 'left', width: 100}, - { field: 'payMonth', title: '月份', align: 'center', width: 80, templet: function (d) { - return '
' + d.payMonth + '

'; - }}, - { field: 'actWages', title: '实发工资', align: 'left', width: 100 }, - { field: 'type', title: '核算方式', align: 'center', width: 80, templet: function (d) { - if(d.type == '1'){ - return "人工核算"; - } else if (d.type == '2'){ - return "系统核算"; - } - }}, - { field: 'state', title: '状态', align: 'center', width: 80, templet: function (d) { - if(d.state == '1'){ - return "待发放"; - } else if (d.state == '2'){ - return "已发放"; - } - }}, - { field: 'createTime', title: '核算日期', align: 'center', width: 150 } - ]], - done: function(json) { - matchingLanguage(); - } - }); - - table.on('tool(messageTable)', function (obj) { - var data = obj.data; - var layEvent = obj.event; - if (layEvent === 'details') { //详情 - details(data); - } - }); - - form.render(); - form.on('submit(formSearch)', function (data) { - if (winui.verifyForm(data.elem)) { - refreshloadTable(); - } - return false; - }); - - // 详情 - function details(data) { - rowId = data.staffId; - payMonth = data.payMonth; - _openNewWindows({ - url: "../../tpl/wagesPaymentHistory/wagesStaffPaymentDetail.html", - title: systemLanguage["com.skyeye.detailsPageTitle"][languageType], - pageId: "wagesStaffPaymentDetail", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - } - }); - } - - // 刷新数据 - $("body").on("click", "#reloadTable", function() { - loadTable(); - }); - - function loadTable() { - table.reloadData("messageTable", {where: getTableParams()}); - } - - function refreshloadTable() { - table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}); - } - - function getTableParams() { - return { - payMonth: $("#payMonth").val() - }; - } - - exports('wagesMyPaymentHistoryList', {}); -}); diff --git a/wages/src/main/resources/template/js/wagesPaymentHistory/wagesStaffPaymentDetail.js b/wages/src/main/resources/template/js/wagesPaymentHistory/wagesStaffPaymentDetail.js index 3bc99a1de0fbdd6fedce854223dc2b16aca9d52c..e3103324b33dc2890e7ac3f1350ce1809604d00f 100644 --- a/wages/src/main/resources/template/js/wagesPaymentHistory/wagesStaffPaymentDetail.js +++ b/wages/src/main/resources/template/js/wagesPaymentHistory/wagesStaffPaymentDetail.js @@ -10,10 +10,13 @@ layui.config({ var index = parent.layer.getFrameIndex(window.name); var $ = layui.$; + const staffId = GetUrlParam("staffId"); + const payMonth = GetUrlParam("payMonth"); + showGrid({ id: "showForm", - url: sysMainMation.wagesBasePath + "wagesstaff005", - params: {staffId: parent.rowId, payMonth: parent.payMonth}, + url: sysMainMation.wagesBasePath + "queryWagesStaffPaymentDetail", + params: {staffId: staffId, payMonth: payMonth}, pagination: false, method: "GET", template: $("#showBaseTemplate").html(), @@ -21,7 +24,7 @@ layui.config({ }, ajaxSendAfter:function (json) { // 加载员工信息 - $("#staffMation").html(getUserStaffHtmlMationByStaffId(parent.rowId)); + $("#staffMation").html(getUserStaffHtmlMationByStaffId(staffId)); matchingLanguage(); form.render(); diff --git a/wages/src/main/resources/template/js/wagesStaffMation/wagesStaffDesignMationList.js b/wages/src/main/resources/template/js/wagesStaffMation/wagesStaffDesignMationList.js index cf5cb465dde7bf16a998be555d63ca5c80c2b1eb..0d68260892279762078a2f21a6d36c49883e4af0 100644 --- a/wages/src/main/resources/template/js/wagesStaffMation/wagesStaffDesignMationList.js +++ b/wages/src/main/resources/template/js/wagesStaffMation/wagesStaffDesignMationList.js @@ -104,23 +104,29 @@ layui.config({ systemCommonUtil.getSysCompanyList(function (json) { // 加载企业数据 $("#companyList").html(getDataUseHandlebars(selTemplate, json)); + form.render('select'); }); } // 初始化部门 function initDepartment(){ - showGrid({ - id: "departmentList", - url: reqBasePath + "companydepartment007", - params: {companyId: $("#companyList").val()}, - pagination: false, - method: 'POST', - template: selTemplate, - ajaxSendLoadBefore: function(hdb) {}, - ajaxSendAfter:function (json) { - form.render('select'); - } - }); + if (isNull($("#companyList").val())) { + $("#companyList").val('') + form.render('select'); + } else { + showGrid({ + id: "departmentList", + url: reqBasePath + "companydepartment007", + params: {companyId: $("#companyList").val()}, + pagination: false, + method: 'POST', + template: selTemplate, + ajaxSendLoadBefore: function(hdb) {}, + ajaxSendAfter:function (json) { + form.render('select'); + } + }); + } } function initJob(){ diff --git a/wages/src/main/resources/template/js/wagesStaffMation/wagesStaffWaitDesignMationList.js b/wages/src/main/resources/template/js/wagesStaffMation/wagesStaffWaitDesignMationList.js index f4e17875682d99c493561271fb83eec90340785e..bf8e850b3f28b18901e091301997d8160c6f5bab 100644 --- a/wages/src/main/resources/template/js/wagesStaffMation/wagesStaffWaitDesignMationList.js +++ b/wages/src/main/resources/template/js/wagesStaffMation/wagesStaffWaitDesignMationList.js @@ -103,23 +103,29 @@ layui.config({ systemCommonUtil.getSysCompanyList(function (json) { // 加载企业数据 $("#companyList").html(getDataUseHandlebars(selTemplate, json)); + form.render('select'); }); } // 初始化部门 function initDepartment(){ - showGrid({ - id: "departmentList", - url: reqBasePath + "companydepartment007", - params: {companyId: $("#companyList").val()}, - pagination: false, - method: 'POST', - template: selTemplate, - ajaxSendLoadBefore: function(hdb) {}, - ajaxSendAfter:function (json) { - form.render('select'); - } - }); + if (isNull($("#companyList").val())) { + $("#companyList").val('') + form.render('select'); + } else { + showGrid({ + id: "departmentList", + url: reqBasePath + "companydepartment007", + params: {companyId: $("#companyList").val()}, + pagination: false, + method: 'POST', + template: selTemplate, + ajaxSendLoadBefore: function(hdb) {}, + ajaxSendAfter:function (json) { + form.render('select'); + } + }); + } } function initJob(){ diff --git a/wages/src/main/resources/template/tpl/wagesPaymentHistory/wagesAllGrantPaymentHistoryList.html b/wages/src/main/resources/template/tpl/wagesPaymentHistory/wagesAllGrantPaymentHistoryList.html deleted file mode 100644 index 342fdfd26877c75497c332dcb43b48c29cc4b206..0000000000000000000000000000000000000000 --- a/wages/src/main/resources/template/tpl/wagesPaymentHistory/wagesAllGrantPaymentHistoryList.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - -
-
- -
-
-
-
-
- - - - - \ No newline at end of file diff --git a/wages/src/main/resources/template/tpl/wagesPaymentHistory/wagesAllNotGrantPaymentHistoryList.html b/wages/src/main/resources/template/tpl/wagesPaymentHistory/wagesAllNotGrantPaymentHistoryList.html deleted file mode 100644 index e2a1a068f41f9b14218a378625a71d646b755d8b..0000000000000000000000000000000000000000 --- a/wages/src/main/resources/template/tpl/wagesPaymentHistory/wagesAllNotGrantPaymentHistoryList.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - -
-
- -
-
-
-
- -
- - - - - \ No newline at end of file diff --git a/wages/src/main/resources/template/tpl/wagesPaymentHistory/wagesMyPaymentHistoryList.html b/wages/src/main/resources/template/tpl/wagesPaymentHistory/wagesMyPaymentHistoryList.html deleted file mode 100644 index 208f80262e58cf7ef4a4a53a3761a459436626e3..0000000000000000000000000000000000000000 --- a/wages/src/main/resources/template/tpl/wagesPaymentHistory/wagesMyPaymentHistoryList.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - -
-
-
-
- -
- -
- - -
-
-
-
-
-
- -
-
-
-
-
- - - - - \ No newline at end of file diff --git a/web/src/main/resources/template/assets/lib/layui/customer/common/systemCommonUtil.js b/web/src/main/resources/template/assets/lib/layui/customer/common/systemCommonUtil.js index 00b28cdbc7a8e5475265c893d3efd325950a8ae2..da1b70be6191bd872aa799aba5a2194407d2879e 100644 --- a/web/src/main/resources/template/assets/lib/layui/customer/common/systemCommonUtil.js +++ b/web/src/main/resources/template/assets/lib/layui/customer/common/systemCommonUtil.js @@ -57,11 +57,17 @@ var systemCommonUtil = { * @param callback 回执函数 */ queryJobListByDepartmentId: function (departmentId, callback){ - AjaxPostUtil.request({url: reqBasePath + "companyjob007", params: {departmentId: departmentId}, type: 'json', method: "GET", callback: function(json) { + if (isNull(departmentId)) { if(typeof(callback) == "function") { - callback(json); + callback({}); } - }, async: false}); + } else { + AjaxPostUtil.request({url: reqBasePath + "companyjob007", params: {departmentId: departmentId}, type: 'json', method: "GET", callback: function(json) { + if(typeof(callback) == "function") { + callback(json); + } + }, async: false}); + } }, /**