yn_hxy_web/hxy-web/js/wireManager/wagesReport/producePayrollDetails.js

135 lines
13 KiB
JavaScript
Raw Normal View History

2024-07-29 17:51:23 +08:00
var pers = []
var table,form,layer
layui.use(['form','layer','table'], function () {
table = layui.table;
form = layui.form;
layer = layui.layer;
//测试
setData(null);
// 触发submit提交 按钮点击或者表单被执行提交时触发
form.on('submit(query)', function (data) {
// 对表格进行重载。id 即 table表格的id
table.reload('table', {
// //设定异步数据接口的额外参数
where: data.field
})
return false; // 阻止表单跳转。如果需要表单跳转,去掉这段即可。
});
form.on('submit(reset)', function () {
$('#username').val('');
$('#proname').val('');
form.render();
let obj = {
username:'',
proname:'',
}
// 对表格进行重载。id 即 table表格的id
table.reload('table', {
// //设定异步数据接口的额外参数
where: obj
})
return false; // 阻止表单跳转。如果需要表单跳转,去掉这段即可。
});
//取消按钮点击
$("#closeBt").click(() => {
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
parent.layer.close(index); //再执行关闭
})
//保存按钮点击
$("#submitBt").click(() => {
save();
})
init();
});
// 静态数据
var tableData = [
{id: 1, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
{id: 2, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
{id: 3, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
{id: 4, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
{id: 4, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
{id: 4, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
{id: 4, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
{id: 4, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
{id: 4, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
{id: 4, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
{id: 4, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
{id: 4, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
{id: 4, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
{id: 4, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
{id: 4, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
{id: 4, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
{id: 4, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
{id: 4, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
{id: 4, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
{id: 4, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
{id: 4, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
{id: 4, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
{id: 4, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
{id: 4, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
{id: 4, username: '李云飞', idNumber: '342224196202241356', lineName: '500kV大宝回线',phone:'15665366624',bank:'中国银行',bankNumber:'xxxxxxxxxxxxxxxxxxxx',UnionPayNumber:'xxxxxxxxxxxx',visitationWorkSecond:'33',laborPrice:'10',visitationWorkDay:'5',laborPriceDay:'115', totalPrice: '800', messages: '100', bonusPenaltys: '100', remark: '绩效奖励', netSalarys: '1000'},
];
/**
* 初始化数据
*/
function init(){
// 渲染表格
table.render({
elem: '#table',
// url: "/sys/achievement",
// page: true,
skin: 'line', // 表格样式
data: tableData,
cols: [[
{
title: '序号',
field: 'zizeng',
align: 'center',
type: 'numbers'
},
{field:'username', title: '姓 名',align: 'center',},
{field:'idNumber', title: '身份证号',align: 'center',},
{field:'lineName', title: '管辖线路名称',align: 'center',},
{field:'phone', title: '手机号',align: 'center',},
{field:'bank', title: '开户行',align: 'center',},
{field:'bankNumber', title: '银行卡号',align: 'center'},
{field:'UnionPayNumber', title: '银联号',align: 'center'},
{field:'visitationWorkSecond', title: '巡视工作量(基*次)',align: 'center', },
{field:'laborPrice', title: '约定巡视工价(元/(基*次)',align: 'center', },
{field:'visitationWorkDay', title: '特巡工作量(人*天)',align: 'center', },
{field:'laborPriceDay', title: '约定特巡工价(元/(人*天)',align: 'center', },
{field:'totalPrice', title: '合价(元)',align: 'center', },
{field:'messages', title: '通讯费',align: 'center', },
{field:'bonusPenaltys', title: '奖惩',align: 'center', },
{field:'remark', title: '备注',align: 'center', },
{field:'netSalarys', title: '实发工资',align: 'center', },
]],
});
}
//页面赋值
function setData(data){
$("#inspectionStation").text("迪庆运检站");
$("#subComName").text("运检二公司");
$("#proNum").text("60");
$("#lineProtector").text("16");
$("#month").text("3月")
}
//判断是否为数字
function isNumber(variable){
return !isNaN(Number(variable));
}