830 lines
31 KiB
JavaScript
830 lines
31 KiB
JavaScript
var token = localStorage.getItem("smz-token");
|
||
var example = null;
|
||
var pers = checkPermission();
|
||
var timeArr = getCurrentDateTimeArr();
|
||
var laydate;
|
||
var parentData;
|
||
var parentRewordNum;
|
||
let loadingMsg;
|
||
layui.use(['form', 'layer', 'laydate'], function () {
|
||
laydate = layui.laydate;
|
||
|
||
// 年月范围
|
||
laydate.render({
|
||
elem: '#month',
|
||
type: 'month',
|
||
trigger: 'click',
|
||
btns: [ 'now', 'confirm'],
|
||
done: function(value, date) {
|
||
$("#month").val(value);
|
||
console.log(value)
|
||
var idNumber = document.getElementById("idNumber").innerText;
|
||
detailsView(idNumber,value);
|
||
}
|
||
});
|
||
|
||
})
|
||
|
||
/**
|
||
* 获取数据
|
||
*/
|
||
function detailsView(idNumber, month) {
|
||
$.ajax({
|
||
type: 'POST',
|
||
contentType: "application/x-www-form-urlencoded",
|
||
url: smz_ht_url + '/salaryPaymentAndAttendanceRecords/getDetailData',
|
||
data:{
|
||
"idNumber":idNumber,
|
||
"month": month
|
||
},
|
||
dataType: 'json',
|
||
success: function (data) {
|
||
console.log(data)
|
||
setData(data);
|
||
}
|
||
})
|
||
}
|
||
|
||
function setData(data) {
|
||
if (data == null || data.length < 1){
|
||
parentRewordNum = "";
|
||
$("#attendancRecordNo").empty();
|
||
$("#attendancRecordNum").text(data.length);
|
||
parentData = data;
|
||
init("", parentData);
|
||
|
||
|
||
// $("#attendancRecordNo").empty();
|
||
// $("#inforTypeContent").empty();
|
||
// $("#salaryPaymentContent").empty();
|
||
// $("#rewardConfirmContent").empty();
|
||
// $("#transferFileDiskContent").empty();
|
||
// $("#attendanceContent").empty();
|
||
// $("#basicInforContent").empty();
|
||
// $("#fileCheckTable").empty();
|
||
// $("#fileTable").empty();
|
||
// $("#operationRecord").empty();
|
||
}else{
|
||
parentData = data;
|
||
initTitle(data);
|
||
init("", parentData);
|
||
}
|
||
|
||
}
|
||
function initTitle(data) {
|
||
console.log(data)
|
||
$("#userName").text(data[0].name);
|
||
$("#idNumber").text(data[0].idNumber);
|
||
$("#attendancRecordNum").text(data.length);
|
||
$("#month").val(data[0].month);
|
||
console.log(data[0].month)
|
||
|
||
//顶部选项卡
|
||
var html1 = "";
|
||
for (let i = 0; i < data.length; i++) {
|
||
if (i == 0){
|
||
html1 += `<div onclick="attendancRecordNoClick('${ data[i].rewordNum }',this)" class="attendancRecordNoStyle">${ data[i].rewordNum }</div>`;
|
||
}else{
|
||
html1 += `<div onclick="attendancRecordNoClick('${ data[i].rewordNum }',this)">${ data[i].rewordNum }</div>`;
|
||
}
|
||
}
|
||
parentRewordNum = data[0].rewordNum;
|
||
$("#attendancRecordNo").empty();
|
||
$("#attendancRecordNo").append(html1);
|
||
}
|
||
function attendancRecordNoClick(rewordNum, event) {
|
||
$("#attendancRecordNo>div").removeClass("attendancRecordNoStyle");
|
||
$(event).addClass("attendancRecordNoStyle");
|
||
parentRewordNum = rewordNum
|
||
init(rewordNum, parentData);
|
||
}
|
||
|
||
function init(rewordNum, parentData) {
|
||
var data;
|
||
//首次进入,默认展示第一条数据
|
||
if(rewordNum == ""){
|
||
data = parentData[0]
|
||
}else{
|
||
for (let i = 0; i < parentData.length; i++) {
|
||
if(rewordNum == parentData[i].rewordNum){
|
||
data = parentData[i]
|
||
}
|
||
}
|
||
}
|
||
//个人相关信息 - 基本信息
|
||
var html2 = `
|
||
<tr align="center">
|
||
<td>人员姓名</td>
|
||
<td>身份证号</td>
|
||
<td>核定编号</td>
|
||
<td>考勤月份</td>
|
||
<td>工程名称</td>
|
||
<td>分包名称</td>
|
||
</tr>
|
||
`;
|
||
if (isObjectEmpty(data)){
|
||
html2 += isEmpty(6)
|
||
}else{
|
||
html2 += `
|
||
<tr align="center">
|
||
<td>${ data.name }</td>
|
||
<td>${ data.idNumber }</td>
|
||
<td>${ data.rewordNum} </td>
|
||
<td>${ data.month }</td>
|
||
<td>${ data.proName }</td>
|
||
<td>${ data.subName }</td>
|
||
</tr>
|
||
`;
|
||
}
|
||
$("#inforTypeContent").empty();
|
||
$("#inforTypeContent").append(html2);
|
||
|
||
|
||
//个人相关信息 - 农民工工资支付表
|
||
var html3 = `
|
||
<tr align="center">
|
||
<td>所在班组</td>
|
||
<td>岗位</td>
|
||
<td>出勤天数</td>
|
||
<td>应发工资</td>
|
||
<td>其中代扣/代缴</td>
|
||
<td>实发工资</td>
|
||
<td>开户银行</td>
|
||
<td>银行卡号</td>
|
||
</tr>
|
||
`;
|
||
if (isObjectEmpty(data)){
|
||
html3 += isEmpty(8)
|
||
}else {
|
||
var jxWorkerPay = data.jxWorkerPayList;
|
||
if (jxWorkerPay.length < 1){
|
||
html3 += isEmpty(8)
|
||
}else{
|
||
for (let i = 0; i < jxWorkerPay.length; i++) {
|
||
html3 += `
|
||
<tr align="center">
|
||
<td>${ jxWorkerPay[i].teamName }</td>
|
||
<td>${ jxWorkerPay[i].post }</td>
|
||
<td>${ jxWorkerPay[i].attenNum }</td>
|
||
<td>${ jxWorkerPay[i].payable }</td>
|
||
<td>${ jxWorkerPay[i].withhold }</td>
|
||
<td>${ jxWorkerPay[i].payIn }</td>
|
||
<td>${ jxWorkerPay[i].bank }</td>
|
||
<td>${ jxWorkerPay[i].bankNum }</td>
|
||
</tr>
|
||
`;
|
||
}
|
||
}
|
||
}
|
||
|
||
$("#salaryPaymentContent").empty();
|
||
$("#salaryPaymentContent").append(html3);
|
||
|
||
|
||
//个人相关信息 - 劳动报酬确认单
|
||
var html4 = `
|
||
<tr align="center">
|
||
<td rowspan="2" style="width: 5%">岗位</td>
|
||
<td colspan="3" style="width: 15%">当月计日工资</td>
|
||
<td colspan="3" style="width: 15%">当月计件工资</td>
|
||
<td colspan="3" style="width: 15%">当月停工、窝工工资</td>
|
||
<td colspan="3" style="width: 15%">当月加班工资</td>
|
||
<td colspan="3" style="width: 15%">当月绩效奖金</td>
|
||
<td rowspan="2" style="width: 5%">报酬小计</td>
|
||
<td rowspan="2" style="width: 5%">签名</td>
|
||
</tr>
|
||
<tr align="center" style="background-color: #F7F8FC">
|
||
<td style="width: 5%">单价</td>
|
||
<td style="width: 5%">考勤天数</td>
|
||
<td style="width: 5%">小计</td>
|
||
<td style="width: 5%">单价</td>
|
||
<td style="width: 5%">考勤天数</td>
|
||
<td style="width: 5%">小计</td>
|
||
<td style="width: 5%">单价</td>
|
||
<td style="width: 5%">考勤天数</td>
|
||
<td style="width: 5%">小计</td>
|
||
<td style="width: 5%">单价</td>
|
||
<td style="width: 5%">考勤天数</td>
|
||
<td style="width: 5%">小计</td>
|
||
<td style="width: 5%">单价</td>
|
||
<td style="width: 5%">考勤天数</td>
|
||
<td style="width: 5%">小计</td>
|
||
</tr>
|
||
`;
|
||
if (isObjectEmpty(data)){
|
||
html4 += isEmpty(18)
|
||
}else {
|
||
var jxConfimationPay = data.jxConfimationPayList;
|
||
if (jxConfimationPay.length < 1){
|
||
html4 += isEmpty(12)
|
||
}else{
|
||
for (let i = 0; i < jxConfimationPay.length; i++) {
|
||
html4 += `
|
||
<tr align="center" style="background-color: #fff;">
|
||
<td>${ jxConfimationPay[i].post }</td>
|
||
<td>${ jxConfimationPay[i].basePrice }</td>
|
||
<td>${ jxConfimationPay[i].baseNum }</td>
|
||
<td>${ jxConfimationPay[i].baseAll }</td>
|
||
|
||
<td>${ jxConfimationPay[i].piecePrice }</td>
|
||
<td>${ jxConfimationPay[i].pieceNum }</td>
|
||
<td>${ jxConfimationPay[i].pieceAll }</td>
|
||
|
||
<td>${ jxConfimationPay[i].sutDownPrice }</td>
|
||
<td>${ jxConfimationPay[i].sutDownNum }</td>
|
||
<td>${ jxConfimationPay[i].sutDownAll }</td>
|
||
|
||
<td>${ jxConfimationPay[i].overtimePrice }</td>
|
||
<td>${ jxConfimationPay[i].overtimeNum }</td>
|
||
<td>${ jxConfimationPay[i].overtimeAll }</td>
|
||
|
||
<td>${ jxConfimationPay[i].achievementsPrice }</td>
|
||
<td>${ jxConfimationPay[i].achievementsNum }</td>
|
||
<td>${ jxConfimationPay[i].achievementsAll }</td>
|
||
|
||
<td>${ jxConfimationPay[i].rewardAll }</td>
|
||
<td>${ jxConfimationPay[i].bonus }</td>
|
||
</tr>
|
||
`;
|
||
}
|
||
}
|
||
}
|
||
$("#rewardConfirmContent").empty();
|
||
$("#rewardConfirmContent").append(html4);
|
||
|
||
|
||
|
||
//个人相关信息 - 传盘文件
|
||
var html5 = `
|
||
<tr align="center">
|
||
<td>所在班组</td>
|
||
<td>岗位</td>
|
||
<td>出勤天数</td>
|
||
<td>应发工资</td>
|
||
<td>其中:代扣/代缴</td>
|
||
<td>实发工资</td>
|
||
<td>银行卡号</td>
|
||
</tr>
|
||
`;
|
||
if (isObjectEmpty(data)){
|
||
html5 += isEmpty(7)
|
||
} else {
|
||
var jxDiskReword = data.jxDiskRewordList;
|
||
if (jxDiskReword.length < 1){
|
||
html5 += isEmpty(7)
|
||
}else{
|
||
for (let i = 0; i < data.jxDiskRewordList.length; i++) {
|
||
html5 += `
|
||
<tr align="center">
|
||
<td>${ jxDiskReword[i].teamName }</td>
|
||
<td>${ jxDiskReword[i].post }</td>
|
||
<td>${ jxDiskReword[i].attenNum }</td>
|
||
<td>${ jxDiskReword[i].payable }</td>
|
||
<td>${ jxDiskReword[i].withhold }</td>
|
||
<td>${ jxDiskReword[i].payIn }</td>
|
||
<td>${ jxDiskReword[i].bankNum }</td>
|
||
</tr>
|
||
`;
|
||
}
|
||
}
|
||
}
|
||
|
||
$("#transferFileDiskContent").empty();
|
||
$("#transferFileDiskContent").append(html5);
|
||
|
||
|
||
//个人相关信息 - 系统考勤
|
||
var html6 = `
|
||
<tr align="center">
|
||
<td style="width: 7%">工种</td>
|
||
<td style="width: 13%">工程名称</td>
|
||
<td style="width: 13%">分包商</td>
|
||
<td style="width: 8%">班组</td>
|
||
<td style="width: 4%">计日天数</td>
|
||
<td style="width: 4%">计件天数</td>
|
||
<td style="width: 4%">停窝工天数</td>
|
||
<td style="width: 4%">休息天数</td>
|
||
<td style="width: 4%">缺勤天数</td>
|
||
<td style="width: 5%">合同工资</td>
|
||
<td style="width: 10%">合同绩效</td>
|
||
<td style="width: 10%">银行卡号</td>
|
||
</tr>
|
||
`;
|
||
if (isObjectEmpty(data)){
|
||
html6 += isEmpty(12)
|
||
} else {
|
||
var jxAttendanceReword = data.jxAttendanceRewordList;
|
||
if (jxAttendanceReword.length < 1){
|
||
html6 += isEmpty(10)
|
||
}else{
|
||
for (let i = 0; i < jxAttendanceReword.length; i++) {
|
||
html6 += `
|
||
<tr align="center">
|
||
<td>${ jxAttendanceReword[i].post }</td>
|
||
<td>${ jxAttendanceReword[i].proName }</td>
|
||
<td>${ jxAttendanceReword[i].subName }</td>
|
||
<td>${ jxAttendanceReword[i].teamName }</td>
|
||
<td>${ jxAttendanceReword[i].attenNum }</td>
|
||
<td>${ jxAttendanceReword[i].pieceNum }</td>
|
||
<td>${ jxAttendanceReword[i].sutDownNum }</td>
|
||
<td>${ jxAttendanceReword[i].restNum }</td>
|
||
<td>${ jxAttendanceReword[i].noworkNum }</td>
|
||
<td>${ jxAttendanceReword[i].basePay }</td>
|
||
<td>${ jxAttendanceReword[i].achievementsPay }</td>
|
||
<td>${ jxAttendanceReword[i].bankNum }</td>
|
||
</tr>
|
||
`;
|
||
}
|
||
|
||
}
|
||
}
|
||
|
||
$("#attendanceContent").empty();
|
||
$("#attendanceContent").append(html6);
|
||
|
||
|
||
|
||
//工资考勤核对信息 - 基本信息
|
||
var html7 = `
|
||
<tr style="text-indent: 16px">
|
||
<td>工资考勤月份</td>
|
||
<td>工程名称</td>
|
||
<td>分包名称</td>
|
||
<td>是否存在异常数据</td>
|
||
</tr>
|
||
`;
|
||
if (isObjectEmpty(data)){
|
||
html7 += isEmpty(4)
|
||
} else {
|
||
var salaryAndAttendanceVerification = data.salaryAndAttendanceVerificationList;
|
||
if (salaryAndAttendanceVerification.length < 1){
|
||
html7 += isEmpty(4)
|
||
}else{
|
||
for (let i = 0; i < salaryAndAttendanceVerification.length; i++) {
|
||
if (salaryAndAttendanceVerification[i].abnormalNum != 0 && salaryAndAttendanceVerification[i].abnormalNum != null){
|
||
html7 += `
|
||
<tr style="text-indent: 16px">
|
||
<td>${ salaryAndAttendanceVerification[i].month }</td>
|
||
<td>${ salaryAndAttendanceVerification[i].proName }</td>
|
||
<td>${ salaryAndAttendanceVerification[i].subName }</td>
|
||
<td style="color: #F56C6C">
|
||
异常数据 <span style="font-size: 16px">${ salaryAndAttendanceVerification[i].abnormalNum }</span> 人
|
||
<span onclick="abnormalView('${ data.idNumber }', '${ data.rewordNum }')" style="color: #409EFF;cursor:pointer;">查看</span>
|
||
</td>
|
||
</tr>
|
||
`;
|
||
}else {
|
||
html7 += `
|
||
<tr style="text-indent: 16px">
|
||
<td>${ salaryAndAttendanceVerification[i].month }</td>
|
||
<td>${ salaryAndAttendanceVerification[i].proName }</td>
|
||
<td>${ salaryAndAttendanceVerification[i].subName }</td>
|
||
<td style="color: #00be67">数据正常</td>
|
||
</tr>
|
||
`;
|
||
}
|
||
|
||
}
|
||
}
|
||
}
|
||
|
||
html7 += `
|
||
<tr style="text-indent: 16px">
|
||
<td>施工人数</td>
|
||
<td>考勤天数</td>
|
||
<td>应发金额</td>
|
||
<td>实发金额</td>
|
||
</tr>
|
||
`;
|
||
if (isObjectEmpty(data)){
|
||
html7 += isEmpty(4)
|
||
} else {
|
||
if (salaryAndAttendanceVerification.length < 1){
|
||
html7 += isEmpty(4)
|
||
}else{
|
||
for (let i = 0; i < salaryAndAttendanceVerification.length; i++) {
|
||
html7 += `
|
||
<tr style="text-indent: 16px">
|
||
<td>${ salaryAndAttendanceVerification[i].workerNum }</td>
|
||
<td>${ salaryAndAttendanceVerification[i].attenNum }</td>
|
||
<td>${ salaryAndAttendanceVerification[i].payable }</td>
|
||
<td>${ salaryAndAttendanceVerification[i].payIn }</td>
|
||
</tr>
|
||
`;
|
||
}
|
||
}
|
||
}
|
||
|
||
html7 += `
|
||
<tr style="text-indent: 16px">
|
||
<td colspan="4">备注描述</td>
|
||
</tr>
|
||
`;
|
||
if (isObjectEmpty(data)){
|
||
html7 += isEmpty(4)
|
||
} else {
|
||
if (salaryAndAttendanceVerification.length < 1){
|
||
html7 += isEmpty(4)
|
||
}else{
|
||
for (let i = 0; i < salaryAndAttendanceVerification.length; i++) {
|
||
html7 += `
|
||
<tr style="text-indent: 16px">
|
||
<td colspan="4">${salaryAndAttendanceVerification[i].checkRemark}</td>
|
||
</tr>
|
||
`;
|
||
}
|
||
}
|
||
}
|
||
|
||
|
||
$("#basicInforContent").empty();
|
||
$("#basicInforContent").append(html7);
|
||
|
||
|
||
//线下确认附件
|
||
var html8 = `
|
||
<tr style="text-indent: 16px">
|
||
<td>是否分包代发</td>
|
||
<td>情况说明备注</td>
|
||
</tr>
|
||
`;
|
||
if (isObjectEmpty(data)){
|
||
html8 += isEmpty(2)
|
||
}else{
|
||
html8 += `
|
||
<tr style="text-indent: 16px">
|
||
<td>${ data.isSubLssued }</td>
|
||
<td>${ data.remark }</td>
|
||
</tr>
|
||
`;
|
||
}
|
||
$("#fileCheckTable").empty();
|
||
$("#fileCheckTable").append(html8);
|
||
|
||
|
||
|
||
//线下确认附件 - 附件文档
|
||
var html9 = `
|
||
<tr style="text-indent: 16px">
|
||
<td style="width: 20%;">文件类型</td>
|
||
<td style="width: 30%;">文件名</td>
|
||
<td style="width: 15%;">上传人员</td>
|
||
<td style="width: 15%;">上传时间</td>
|
||
<td style="width: 20%;">操作</td>
|
||
</tr>
|
||
`;
|
||
if (isObjectEmpty(data)){
|
||
html9 += isEmpty(5)
|
||
} else {
|
||
var JxFileReword = data.jxFileRewordList;
|
||
if (JxFileReword.length < 1){
|
||
html9 += isEmpty(5)
|
||
}else{
|
||
for (let i = 0; i < JxFileReword.length; i++) {
|
||
html9 += `
|
||
<tr style="text-indent: 16px">
|
||
<td>${ JxFileReword[i].type }</td>
|
||
<td>${ JxFileReword[i].fileName }</td>
|
||
<td>${ JxFileReword[i].userName }</td>
|
||
<td>${ JxFileReword[i].uploadTime }</td>
|
||
<td>
|
||
<span onclick="filePreView('${ JxFileReword[i].filePath }', '${ JxFileReword[i].fileName }','${JxFileReword[i].id}')" style="color: #409EFF;cursor:pointer;">
|
||
<i class='layui-icon'></i>
|
||
预览
|
||
</span>
|
||
<span onclick="download('${ JxFileReword[i].id }')" style="color: #409EFF;cursor:pointer;">
|
||
<i class='layui-icon'></i>
|
||
下载
|
||
</span>
|
||
</td>
|
||
</tr>
|
||
`;
|
||
}
|
||
}
|
||
}
|
||
|
||
$("#fileTable").empty();
|
||
$("#fileTable").append(html9);
|
||
|
||
|
||
|
||
//操作记录
|
||
if (!isObjectEmpty(data)){
|
||
var operationRecord = data.operationRecordList;
|
||
var operationHistory = data.operationRecordListNew;
|
||
var html10 = '';
|
||
|
||
if (!Array.isArray) {
|
||
Array.isArray = function(arg) {
|
||
return Object.prototype.toString.call(arg) === '[object Array]';
|
||
};
|
||
}
|
||
if(Array.isArray(data.operationRecordListNew) && data.operationRecordListNew.length > 0){
|
||
$.each(data.operationRecordListNew,function (index,item){
|
||
var remarkPrefix = '';
|
||
if(item.auditResult == 0) {
|
||
remarkPrefix = '已驳回:';
|
||
}
|
||
var auditRemark = '';
|
||
if(item.auditRemark != null && item.auditRemark != '') {
|
||
auditRemark = item.auditRemark;
|
||
}else {
|
||
auditRemark = ' 无';
|
||
}
|
||
var elapsedTime = '';
|
||
if(item.elapsedTime != null && item.elapsedTime != '') {
|
||
elapsedTime = '共间隔'+ item.elapsedTime +',';
|
||
}
|
||
html10 += `
|
||
<div class="layui-timeline-item">
|
||
<i class="layui-icon layui-timeline-axis"></i>
|
||
<div class="layui-timeline-content layui-text">
|
||
<h3 class="layui-timeline-title">${ item.submitTime.substring(0,10) }</h3>
|
||
<div>
|
||
<div>
|
||
<img src="../../../img/head.png" width="30"/>
|
||
<span>${ item.submitterName }</span>
|
||
<span>${ item.userPhone }</span>
|
||
<span>${ item.roleName }</span>
|
||
</div>
|
||
<div style="margin-left: 40px;">
|
||
${ elapsedTime }备注原因:${ remarkPrefix + auditRemark }
|
||
</div>
|
||
<div style="position: relative;top: -41px;left: 85%;color: #999999;width: 180px;">
|
||
<i class='layui-icon'></i>
|
||
${ item.submitTime }
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>`;
|
||
});
|
||
}else {
|
||
html10 += `
|
||
<div class="layui-timeline-item">
|
||
<i class="layui-icon layui-timeline-axis"></i>
|
||
<div class="layui-timeline-content layui-text">
|
||
<h3 class="layui-timeline-title">${ operationRecord[0].upCompanyTime.split(" ")[0] }</h3>
|
||
<div>
|
||
<div>
|
||
<img src="../../../img/head.png" width="30"/>
|
||
<span>${ operationRecord[0].upCompanyName }</span>
|
||
<span>${ operationRecord[0].upCompanyPhone }</span>
|
||
<span>${ operationRecord[0].upCompanyRole }</span>
|
||
</div>
|
||
<div style="margin-left: 40px;">
|
||
共间隔${ operationRecord[0].upTotalTime }备注原因:${ operationRecord[0].upCompanyRemark }
|
||
</div>
|
||
<div style="position: relative;top: -41px;left: 85%;color: #999999;width: 180px;">
|
||
<i class='layui-icon'></i>
|
||
${ operationRecord[0].upCompanyTime }
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="layui-timeline-item">
|
||
<i class="layui-icon layui-timeline-axis"></i>
|
||
<div class="layui-timeline-content layui-text">
|
||
<h3 class="layui-timeline-title">${ operationRecord[0].upSubcompanyTime.split(" ")[0] }</h3>
|
||
<div>
|
||
<div>
|
||
<img src="../../../img/head.png" width="30"/>
|
||
<span>${ operationRecord[0].upSubcompanyName }</span>
|
||
<span>${ operationRecord[0].upSubcompanyPhone }</span>
|
||
<span>${ operationRecord[0].upSubcompanyRole }</span>
|
||
</div>
|
||
<div style="margin-left: 40px;">
|
||
备注原因:${ operationRecord[0].upSubcompanyRemark }
|
||
</div>
|
||
<div style="position: relative;top: -41px;left: 85%;color: #999999;width: 180px;">
|
||
<i class='layui-icon'></i>
|
||
${ operationRecord[0].upSubcompanyTime }
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="layui-timeline-item">
|
||
<i class="layui-icon layui-timeline-axis"></i>
|
||
<div class="layui-timeline-content layui-text">
|
||
<h3 class="layui-timeline-title">${ operationRecord[0].companyTime.split(" ")[0] }</h3>
|
||
<div>
|
||
<div>
|
||
<img src="../../../img/head.png" width="30"/>
|
||
<span>${ operationRecord[0].companyName }</span>
|
||
<span>${ operationRecord[0].companyPhone }</span>
|
||
<span>${ operationRecord[0].companyRole }</span>
|
||
</div>
|
||
<div style="margin-left: 40px;">
|
||
共间隔${ operationRecord[0].totalTime }备注原因:${ operationRecord[0].companyRemark }
|
||
</div>
|
||
<div style="position: relative;top: -41px;left: 85%;color: #999999;width: 180px;">
|
||
<i class='layui-icon'></i>
|
||
${ operationRecord[0].companyTime }
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
<div class="layui-timeline-item">
|
||
<i class="layui-icon layui-timeline-axis"></i>
|
||
<div class="layui-timeline-content layui-text">
|
||
<h3 class="layui-timeline-title">${ operationRecord[0].subcompanyTime.split(" ")[0] }</h3>
|
||
<div>
|
||
<div>
|
||
<img src="../../../img/head.png" width="30"/>
|
||
<span>${ operationRecord[0].subcompanyName }</span>
|
||
<span>${ operationRecord[0].subcompanyPhone }</span>
|
||
<span>${ operationRecord[0].subcompanyRole }</span>
|
||
</div>
|
||
<div style="margin-left: 40px;">
|
||
备注原因:${ operationRecord[0].subcompanyRemark }
|
||
</div>
|
||
<div style="position: relative;top: -41px;left: 85%;color: #999999;width: 180px;">
|
||
<i class='layui-icon'></i>
|
||
${ operationRecord[0].subcompanyTime }
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
<div class="layui-timeline-item">
|
||
<i class="layui-icon layui-timeline-axis"></i>
|
||
<div class="layui-timeline-content layui-text">
|
||
<h3 class="layui-timeline-title">${ operationRecord[0].projecterTime.split(" ")[0] }</h3>
|
||
<div>
|
||
<div>
|
||
<img src="../../../img/head.png" width="30"/>
|
||
<span>${ operationRecord[0].projecterName }</span>
|
||
<span>${ operationRecord[0].projecterPhone }</span>
|
||
<span>${ operationRecord[0].projecterRole }</span>
|
||
</div>
|
||
<div style="margin-left: 40px;">
|
||
备注原因:${ operationRecord[0].projecterRemark }
|
||
</div>
|
||
<div style="position: relative;top: -41px;left: 85%;color: #999999;width: 180px;">
|
||
<i class='layui-icon'></i>
|
||
${ operationRecord[0].projecterTime }
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
`;
|
||
}
|
||
|
||
$("#operationRecord").empty();
|
||
$("#operationRecord").append(html10);
|
||
} else {
|
||
$("#operationRecord").empty();
|
||
}
|
||
|
||
}
|
||
|
||
//文件下载
|
||
function download(id) {
|
||
//列表
|
||
loadingMsg = top.layer.msg('加载中,请稍候...', {icon: 16, scrollbar: false, time: 0, shade: [0.8, '#393D49']});
|
||
//列表
|
||
$.ajax({
|
||
type: 'POST',
|
||
async: true, // 默认异步true,false表示同步
|
||
url: smz_ht_url + "/salaryPaymentAndAttendanceRecords/checkSalaryFileIsActive", // 请求地址
|
||
contentType: "application/json; charset=utf-8",
|
||
dataType: 'json', // 服务器返回数据类型
|
||
data: JSON.stringify({
|
||
type: "2",
|
||
id: id
|
||
}), //获取提交的表单字段
|
||
success: function (data) {
|
||
if (data.code == 200) {
|
||
top.layer.close(loadingMsg);
|
||
window.location.href = smz_ht_url + '/salaryPaymentAndAttendanceRecords/downloadFile?id=' + id + '&token=' + token;
|
||
} else {
|
||
top.layer.close(loadingMsg);
|
||
layer.alert(data.msg);
|
||
}
|
||
},
|
||
error: function (XMLHttpRequest, textStatus, e) {
|
||
top.layer.close(loadingMsg);
|
||
layer.msg('数据请求发生异常,请稍后重试', {icon: 16, scrollbar: false});
|
||
}
|
||
});
|
||
}
|
||
|
||
//异常数据页面跳转
|
||
function abnormalView(idNumber, rewordNum) {
|
||
//跳转页面传参
|
||
localStorage.setItem("uprewordNum", rewordNum);
|
||
$.ajax({
|
||
type: 'POST',
|
||
contentType: "application/x-www-form-urlencoded",
|
||
url: smz_ht_url + '/salaryPaymentAndAttendanceRecords/getAbnormalDataByIdNumber',
|
||
data:{
|
||
"rewordNum":rewordNum,
|
||
"idNumber": idNumber
|
||
},
|
||
dataType: 'json',
|
||
success: function (data) {
|
||
console.log("data:", data)
|
||
var height = '97.5%';
|
||
var width = '97.5%';
|
||
var index = parent.layer.open({
|
||
title: ['比对结果-异常数据','color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||
type: 2,
|
||
content: './abnormalDetails.html',
|
||
area: [width, height],
|
||
maxmin: false,
|
||
// btn: ['关闭'],
|
||
success:function(layero,index){
|
||
// var myIframe = parent.window[layero.find('iframe')[0]['name']];
|
||
// var fnc = myIframe.setData(data); //aaa()为子页面的方法
|
||
},
|
||
});
|
||
}
|
||
})
|
||
|
||
|
||
}
|
||
|
||
//更多按钮点击
|
||
function moreClick(event) {
|
||
$(".hideShow").css("display", "");
|
||
$(event).css("display", "none")
|
||
}
|
||
|
||
|
||
//表格空值赋值
|
||
function isEmpty(num) {
|
||
var html = `
|
||
<tr align="center" style="background-color: #fff;">
|
||
<td colspan="${ num }">无数据</td>
|
||
</tr>
|
||
`
|
||
return html
|
||
}
|
||
|
||
//判断对象是否有值
|
||
function isObjectEmpty(obj) {
|
||
if (obj == null || obj == undefined){
|
||
return true;
|
||
}
|
||
return Object.keys(obj).length === 0;
|
||
}
|
||
|
||
//打包下载
|
||
function packageDownload() {
|
||
if (parentRewordNum == null || parentRewordNum == ""){
|
||
layer.msg("暂无数据");
|
||
return;
|
||
}
|
||
//列表
|
||
loadingMsg = top.layer.msg('加载中,请稍候...', {icon: 16, scrollbar: false, time: 0, shade: [0.8, '#393D49']});
|
||
//列表
|
||
$.ajax({
|
||
type: 'POST',
|
||
async: true, // 默认异步true,false表示同步
|
||
url: smz_ht_url + "/salaryPaymentAndAttendanceRecords/checkSalaryFileIsActive", // 请求地址
|
||
contentType: "application/json; charset=utf-8",
|
||
dataType: 'json', // 服务器返回数据类型
|
||
data: JSON.stringify({
|
||
type: "1",
|
||
rewordNum: parentRewordNum
|
||
}), //获取提交的表单字段
|
||
success: function (data) {
|
||
if (data.code == 200) {
|
||
top.layer.close(loadingMsg);
|
||
window.location.href = smz_ht_url + '/salaryPaymentAndAttendanceRecords/exportSalaryFile?rewordNum=' + parentRewordNum + '&token=' + token;
|
||
} else {
|
||
top.layer.close(loadingMsg);
|
||
layer.alert(data.msg);
|
||
}
|
||
},
|
||
error: function (XMLHttpRequest, textStatus, e) {
|
||
top.layer.close(loadingMsg);
|
||
layer.msg('数据请求发生异常,请稍后重试', {icon: 16, scrollbar: false});
|
||
}
|
||
});
|
||
}
|
||
|
||
//文件预览
|
||
function filePreView(url,fileName,fileId) {
|
||
localStorage.setItem("filePaths", url);
|
||
localStorage.setItem("fileNames", fileName);
|
||
// localStorage.setItem("fileTimes", time);
|
||
localStorage.setItem("fileId", fileId);
|
||
var height = '97.5%';
|
||
var width = '97.5%';
|
||
var index = layer.open({
|
||
title: ["查看", 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||
type: 2,
|
||
content: '../publicFileViewNew.html',
|
||
area: [width, height],
|
||
maxmin: false
|
||
});
|
||
}
|