提交 add7f0ff 编写于 作者: doc_wei's avatar doc_wei

feat: 薪资发放信息托管到表单布局

上级 aa9b5dcb
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 '<a lay-event="details" class="notice-title-click">' + d.payMonth + '</p>';
}},
{ 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', {});
});
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 '<a lay-event="details" class="notice-title-click">' + d.payMonth + '</p>';
}},
{ field: 'state', title: '状态', align: 'center', width: 80, templet: function (d) {
return "<span class='state-down'>待发放</span>";
}},
{ 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', {});
});
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 '<a lay-event="details" class="notice-title-click">' + d.payMonth + '</p>';
}},
{ 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 "<span class='state-down'>待发放</span>";
} else if (d.state == '2'){
return "<span class='state-up'>已发放</span>";
}
}},
{ 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', {});
});
......@@ -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();
......
......@@ -104,11 +104,16 @@ layui.config({
systemCommonUtil.getSysCompanyList(function (json) {
// 加载企业数据
$("#companyList").html(getDataUseHandlebars(selTemplate, json));
form.render('select');
});
}
// 初始化部门
function initDepartment(){
if (isNull($("#companyList").val())) {
$("#companyList").val('')
form.render('select');
} else {
showGrid({
id: "departmentList",
url: reqBasePath + "companydepartment007",
......@@ -122,6 +127,7 @@ layui.config({
}
});
}
}
function initJob(){
// 根据部门id获取岗位集合
......
......@@ -103,11 +103,16 @@ layui.config({
systemCommonUtil.getSysCompanyList(function (json) {
// 加载企业数据
$("#companyList").html(getDataUseHandlebars(selTemplate, json));
form.render('select');
});
}
// 初始化部门
function initDepartment(){
if (isNull($("#companyList").val())) {
$("#companyList").val('')
form.render('select');
} else {
showGrid({
id: "departmentList",
url: reqBasePath + "companydepartment007",
......@@ -121,6 +126,7 @@ layui.config({
}
});
}
}
function initJob(){
// 根据部门id获取岗位集合
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
</div>
</div>
<div style="margin: auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/wagesPaymentHistory/'}).use('wagesAllGrantPaymentHistoryList');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
</div>
</div>
<div style="margin: auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
{{# if(auth('')){ }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="grant">发放</a>
{{# } }}
</script>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/wagesPaymentHistory/'}).use('wagesAllNotGrantPaymentHistoryList');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="txtcenter" style="margin:0 auto;padding-top:10px;">
<form class="layui-form layui-form-pane" action="" autocomplete="off">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">月份</label>
<div class="layui-input-inline">
<input type="text" id="payMonth" name="payMonth" placeholder="请输入月份" class="layui-input" />
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" lay-submit lay-filter="formSearch"><language showName="com.skyeye.search2"></language></button>
</div>
</div>
</form>
</div>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn">
<i class="fa fa-refresh" aria-hidden="true"></i>
<language showName="com.skyeye.refreshDataBtn"></language>
</button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/wagesPaymentHistory/'}).use('wagesMyPaymentHistoryList');
</script>
</body>
</html>
\ No newline at end of file
......@@ -57,11 +57,17 @@ var systemCommonUtil = {
* @param callback 回执函数
*/
queryJobListByDepartmentId: function (departmentId, callback){
if (isNull(departmentId)) {
if(typeof(callback) == "function") {
callback({});
}
} else {
AjaxPostUtil.request({url: reqBasePath + "companyjob007", params: {departmentId: departmentId}, type: 'json', method: "GET", callback: function(json) {
if(typeof(callback) == "function") {
callback(json);
}
}, async: false});
}
},
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册