2024-08-02 16:34:45 +08:00
|
|
|
var pers = []
|
|
|
|
|
var table,form,laydate
|
|
|
|
|
layui.use(['form','layer','table','laydate'], function () {
|
|
|
|
|
table = layui.table;
|
|
|
|
|
form = layui.form;
|
|
|
|
|
laydate = layui.laydate
|
|
|
|
|
|
|
|
|
|
//初始化日期选择框
|
|
|
|
|
laydate.render({
|
2024-08-27 21:11:57 +08:00
|
|
|
elem: '#wagesMonth',
|
2024-08-02 16:34:45 +08:00
|
|
|
type: 'month',
|
|
|
|
|
});
|
|
|
|
|
// 触发submit提交 按钮点击或者表单被执行提交时触发
|
|
|
|
|
form.on('submit(query)', function (data) {
|
2024-08-28 17:54:21 +08:00
|
|
|
var yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
|
|
|
|
var fgsId = $(window.parent.document).find("select[id='subComId']").val();
|
2024-08-02 16:34:45 +08:00
|
|
|
table.reload('table', {
|
|
|
|
|
// //设定异步数据接口的额外参数
|
|
|
|
|
page:{curr : 1}
|
2024-08-28 17:54:21 +08:00
|
|
|
,where: {
|
|
|
|
|
yjName:$('#yjName').val(),
|
|
|
|
|
wagesMonth:$('#wagesMonth').val(),
|
|
|
|
|
yjId : yjId,
|
|
|
|
|
fgsId : fgsId,
|
|
|
|
|
}
|
2024-08-02 16:34:45 +08:00
|
|
|
})
|
|
|
|
|
return false; // 阻止表单跳转。如果需要表单跳转,去掉这段即可。
|
|
|
|
|
});
|
|
|
|
|
$("#reset").click(function(){
|
|
|
|
|
console.log("重置")
|
2024-08-27 21:11:57 +08:00
|
|
|
$('#yjName').val('');
|
|
|
|
|
$('#wagesMonth').val('');
|
2024-08-28 17:54:21 +08:00
|
|
|
var yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
|
|
|
|
var fgsId = $(window.parent.document).find("select[id='subComId']").val();
|
2024-08-02 16:34:45 +08:00
|
|
|
let obj = {
|
2024-08-28 17:54:21 +08:00
|
|
|
yjName:'',
|
|
|
|
|
fgsId:fgsId,
|
2024-08-27 21:11:57 +08:00
|
|
|
wagesMonth:''
|
2024-08-02 16:34:45 +08:00
|
|
|
}
|
|
|
|
|
// 对表格进行重载。id 即 table表格的id
|
|
|
|
|
table.reload('table', {
|
|
|
|
|
// //设定异步数据接口的额外参数
|
|
|
|
|
page:{curr : 1}
|
|
|
|
|
,where: obj
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
init();
|
|
|
|
|
});
|
|
|
|
|
|
2024-08-27 21:11:57 +08:00
|
|
|
|
2024-08-02 16:34:45 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 初始化数据
|
|
|
|
|
*/
|
|
|
|
|
function init(){
|
2024-08-28 17:54:21 +08:00
|
|
|
var yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
|
|
|
|
var fgsId = $(window.parent.document).find("select[id='subComId']").val();
|
2024-08-02 16:34:45 +08:00
|
|
|
// 渲染表格
|
|
|
|
|
table.render({
|
|
|
|
|
elem: '#table',
|
2024-08-21 21:40:46 +08:00
|
|
|
where: {
|
2024-08-28 17:54:21 +08:00
|
|
|
yjId:yjId,
|
2024-08-27 21:11:57 +08:00
|
|
|
fgsId: fgsId
|
2024-08-21 21:40:46 +08:00
|
|
|
},
|
2024-08-27 21:11:57 +08:00
|
|
|
url: PATH_URL + '/wages/getWagesEscalationList',
|
2024-08-02 16:34:45 +08:00
|
|
|
page: true,
|
2024-08-27 21:11:57 +08:00
|
|
|
method: 'post',
|
2024-08-02 16:34:45 +08:00
|
|
|
skin: 'line', // 表格样式
|
2024-08-27 21:11:57 +08:00
|
|
|
cols: [
|
|
|
|
|
[{
|
|
|
|
|
title: '序号',
|
|
|
|
|
field: 'zizeng',
|
|
|
|
|
align: 'center',
|
|
|
|
|
type: 'numbers'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'fgsName',
|
|
|
|
|
title: '分公司',
|
|
|
|
|
align: 'center',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'yjName',
|
|
|
|
|
title: '运检站',
|
|
|
|
|
align: 'center',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'wagesMonth',
|
|
|
|
|
title: '月份',
|
|
|
|
|
align: 'center',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'peopleNum',
|
|
|
|
|
title: '人数',
|
|
|
|
|
align: 'center',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'xsNum',
|
|
|
|
|
title: '巡视运检站(基*次)',
|
|
|
|
|
align: 'center',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'txNum',
|
|
|
|
|
title: '特巡天数(人*天)',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 170
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'phonePrice',
|
|
|
|
|
title: '通讯费',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 170
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'reward',
|
|
|
|
|
title: '奖惩',
|
|
|
|
|
align: 'center',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'wages',
|
|
|
|
|
title: '实发金额',
|
|
|
|
|
align: 'center',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: '',
|
|
|
|
|
title: '操作',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: '20%',
|
|
|
|
|
templet: function(d){
|
|
|
|
|
var yjId= d.yjId;
|
|
|
|
|
var yjName= d.yjName;
|
|
|
|
|
var gsName= d.fgsName;
|
|
|
|
|
var wagesMonth= d.wagesMonth;
|
|
|
|
|
var html = `<button class="layui-btn layui-btn-sm" onclick="detailsView('${yjId}','${yjName}','${gsName}','${wagesMonth}')">详情</button>`
|
|
|
|
|
return html;
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
],
|
2024-08-02 16:34:45 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-08-27 21:11:57 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查看
|
|
|
|
|
* */
|
|
|
|
|
function detailsView(yjId,yjName,gsName,wagesMonth) {
|
2024-08-02 16:34:45 +08:00
|
|
|
let height = '98%';
|
|
|
|
|
let width = '99%';
|
2024-08-27 21:11:57 +08:00
|
|
|
//测试
|
2024-08-02 16:34:45 +08:00
|
|
|
var index = layer.open({
|
2024-08-27 21:11:57 +08:00
|
|
|
title: ['详情', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
|
|
|
|
type: 2,
|
|
|
|
|
content: './wagesStatisticsDetails.html',
|
|
|
|
|
area: [width, height],
|
|
|
|
|
maxmin: false,
|
|
|
|
|
success: function(layero, index) {
|
|
|
|
|
// //打开页面成功时执行
|
|
|
|
|
var myIframe = window[layero.find('iframe')[0]['name']];
|
|
|
|
|
//getTaskSource()为子页面的方法
|
|
|
|
|
myIframe.setData(yjId, yjName, gsName, wagesMonth);
|
|
|
|
|
|
|
|
|
|
},
|
2024-08-02 16:34:45 +08:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//导出
|
2024-08-27 21:11:57 +08:00
|
|
|
function exportData() {
|
|
|
|
|
var yjName = $("#yjName").val();
|
|
|
|
|
var wagesMonth = $("#wagesMonth").val();
|
2024-08-28 17:54:21 +08:00
|
|
|
|
|
|
|
|
var yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
|
|
|
|
var fgsId = $(window.parent.document).find("select[id='subComId']").val();
|
2024-08-27 21:11:57 +08:00
|
|
|
|
|
|
|
|
window.location.href = PATH_URL + `/wages/exportWagesEscalationDatas?token=` + token +
|
|
|
|
|
"&yjName=" + yjName +
|
|
|
|
|
"&wagesMonth=" + wagesMonth+ "&fgsId=" + fgsId
|
2024-08-02 16:34:45 +08:00
|
|
|
}
|