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({
|
|
|
|
|
|
elem: '#dataTime',
|
|
|
|
|
|
type: 'month',
|
|
|
|
|
|
});
|
|
|
|
|
|
// 触发submit提交 按钮点击或者表单被执行提交时触发
|
|
|
|
|
|
form.on('submit(query)', function (data) {
|
|
|
|
|
|
console.log("搜索")
|
|
|
|
|
|
// 对表格进行重载。id 即 table表格的id
|
2024-08-22 13:57:12 +08:00
|
|
|
|
data.field.yjId=localStorage.getItem("selectyj");
|
|
|
|
|
|
data.field.subId=localStorage.getItem("selectSubCom");
|
2024-08-02 16:34:45 +08:00
|
|
|
|
table.reload('table', {
|
|
|
|
|
|
// //设定异步数据接口的额外参数
|
|
|
|
|
|
page:{curr : 1}
|
|
|
|
|
|
,where: data.field
|
|
|
|
|
|
})
|
|
|
|
|
|
return false; // 阻止表单跳转。如果需要表单跳转,去掉这段即可。
|
|
|
|
|
|
});
|
|
|
|
|
|
$("#reset").click(function(){
|
|
|
|
|
|
console.log("重置")
|
2024-08-22 13:57:12 +08:00
|
|
|
|
$('#userName').val('');
|
|
|
|
|
|
$('#yjName').val('');
|
|
|
|
|
|
$('#proName').val('');
|
|
|
|
|
|
$('#makeMonth').val('');
|
2024-08-02 16:34:45 +08:00
|
|
|
|
let obj = {
|
2024-08-22 13:57:12 +08:00
|
|
|
|
userName:'',
|
|
|
|
|
|
yjName:'',
|
|
|
|
|
|
proName:'',
|
|
|
|
|
|
makeMonth:'',
|
|
|
|
|
|
yjId:localStorage.getItem("selectyj"),
|
|
|
|
|
|
subId:localStorage.getItem("selectSubCom")
|
2024-08-02 16:34:45 +08:00
|
|
|
|
}
|
|
|
|
|
|
// 对表格进行重载。id 即 table表格的id
|
|
|
|
|
|
table.reload('table', {
|
|
|
|
|
|
// //设定异步数据接口的额外参数
|
|
|
|
|
|
page:{curr : 1}
|
|
|
|
|
|
,where: obj
|
|
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
table.on('tool(table)', function (obj) {
|
|
|
|
|
|
switch (obj.event) {
|
|
|
|
|
|
case 'details':
|
2024-08-22 13:57:12 +08:00
|
|
|
|
console.log('详情',obj)
|
|
|
|
|
|
detailsView(obj.data.id,obj.data.userId,obj.data.makeMonth);
|
2024-08-02 16:34:45 +08:00
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
init();
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var col = [
|
|
|
|
|
|
[
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '序号',
|
|
|
|
|
|
field: 'zizeng',
|
|
|
|
|
|
align: 'center',
|
|
|
|
|
|
type: 'numbers',
|
|
|
|
|
|
rowspan: 2
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '运检站',
|
2024-08-22 13:57:12 +08:00
|
|
|
|
field: 'yjName',
|
2024-08-02 16:34:45 +08:00
|
|
|
|
align: 'center',
|
|
|
|
|
|
rowspan: 2
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '月份',
|
2024-08-22 13:57:12 +08:00
|
|
|
|
field: 'makeMonth',
|
2024-08-02 16:34:45 +08:00
|
|
|
|
align: 'center',
|
|
|
|
|
|
rowspan: 2
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '线路名称',
|
2024-08-22 13:57:12 +08:00
|
|
|
|
field: 'proName',
|
2024-08-02 16:34:45 +08:00
|
|
|
|
align: 'center',
|
|
|
|
|
|
rowspan: 2
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '运维总区段',
|
2024-08-22 13:57:12 +08:00
|
|
|
|
field: 'allGtName',
|
2024-08-02 16:34:45 +08:00
|
|
|
|
align: 'center',
|
|
|
|
|
|
rowspan: 2
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '姓名',
|
|
|
|
|
|
field: 'userName',
|
|
|
|
|
|
align: 'center',
|
|
|
|
|
|
rowspan: 2
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '管辖线路名称',
|
2024-08-22 13:57:12 +08:00
|
|
|
|
field: 'proName',
|
2024-08-02 16:34:45 +08:00
|
|
|
|
align: 'center',
|
|
|
|
|
|
rowspan: 2,
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '负责巡护区段',
|
|
|
|
|
|
align: 'center',
|
|
|
|
|
|
rowspan: 2,
|
|
|
|
|
|
templet: function(d){
|
2024-08-22 13:57:12 +08:00
|
|
|
|
var dutyPatrol = d.gtName
|
|
|
|
|
|
var gt=dutyPatrol==null?"":dutyPatrol;
|
|
|
|
|
|
var gts=gt.split("/");
|
|
|
|
|
|
var gtnum=0;
|
|
|
|
|
|
if(gt==""){
|
|
|
|
|
|
gtnum=0;
|
|
|
|
|
|
}else{
|
|
|
|
|
|
gtnum=gts.length-1;
|
|
|
|
|
|
}
|
|
|
|
|
|
var html = `<span style="color:#F56C82">${gtnum}基:</span><span>${dutyPatrol}</span>`;
|
2024-08-02 16:34:45 +08:00
|
|
|
|
return html;
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '本月实际提供到位照区段(或塔)及张数',
|
|
|
|
|
|
colspan: 5,
|
|
|
|
|
|
align: 'center'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '操作',
|
|
|
|
|
|
toolbar: '#opeator-bar',
|
|
|
|
|
|
align: 'center',
|
|
|
|
|
|
rowspan: 2,
|
|
|
|
|
|
},
|
|
|
|
|
|
],
|
|
|
|
|
|
[
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '巡1次区段(基)',
|
2024-08-22 13:57:12 +08:00
|
|
|
|
field: 'oneGt',
|
2024-08-02 16:34:45 +08:00
|
|
|
|
align: 'center',
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '巡1次张数',
|
2024-08-22 13:57:12 +08:00
|
|
|
|
field: 'oneMake',
|
2024-08-02 16:34:45 +08:00
|
|
|
|
align: 'center',
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '巡2次区段(基)',
|
2024-08-22 13:57:12 +08:00
|
|
|
|
field: 'twoGt',
|
2024-08-02 16:34:45 +08:00
|
|
|
|
align: 'center',
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '巡2次张数',
|
2024-08-22 13:57:12 +08:00
|
|
|
|
field: 'twoMake',
|
2024-08-02 16:34:45 +08:00
|
|
|
|
align: 'center',
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '特巡天数',
|
2024-08-22 13:57:12 +08:00
|
|
|
|
field: 'special',
|
2024-08-02 16:34:45 +08:00
|
|
|
|
align: 'center',
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 初始化数据
|
|
|
|
|
|
*/
|
|
|
|
|
|
function init(){
|
2024-08-21 21:40:46 +08:00
|
|
|
|
var subComId = $(window.parent.document).find("select[id='subComId']").val();
|
2024-08-02 16:34:45 +08:00
|
|
|
|
// 渲染表格
|
|
|
|
|
|
table.render({
|
|
|
|
|
|
elem: '#table',
|
2024-08-22 13:57:12 +08:00
|
|
|
|
url: PATH_URL + "/makeInfo/getListTabs",
|
2024-08-02 16:34:45 +08:00
|
|
|
|
page: true,
|
2024-08-22 17:08:53 +08:00
|
|
|
|
where:{
|
|
|
|
|
|
yjId:localStorage.getItem("selectyj"),
|
|
|
|
|
|
subId:localStorage.getItem("selectSubCom")
|
|
|
|
|
|
},
|
2024-08-22 13:57:12 +08:00
|
|
|
|
method:'post',
|
2024-08-02 16:34:45 +08:00
|
|
|
|
border: true,
|
2024-08-22 13:57:12 +08:00
|
|
|
|
// data: tableData,
|
2024-08-02 16:34:45 +08:00
|
|
|
|
cols: col,
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//详情
|
2024-08-22 13:57:12 +08:00
|
|
|
|
function detailsView(id,userId,makeMonth) {
|
|
|
|
|
|
localStorage.setItem("resultdataId",id);
|
|
|
|
|
|
localStorage.setItem("resultdataMakeMonth",makeMonth);
|
|
|
|
|
|
localStorage.setItem("resultdataUserId",userId);
|
2024-08-02 16:34:45 +08:00
|
|
|
|
let height = '98%';
|
|
|
|
|
|
let width = '99%';
|
2024-08-22 13:57:12 +08:00
|
|
|
|
var index = layer.open({
|
|
|
|
|
|
title: ['详情', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
|
|
|
|
|
type: 2,
|
|
|
|
|
|
content: './viewStatisticsDetails.html',
|
|
|
|
|
|
area: [width, height],
|
|
|
|
|
|
maxmin: false,
|
|
|
|
|
|
success: function (layero, index) {
|
|
|
|
|
|
// var myIframe = window[layero.find('iframe')[0]['name']];
|
|
|
|
|
|
// myIframe.setDate();
|
|
|
|
|
|
// var fnc = myIframe.setData(data.data); //aaa()为子页面的方法
|
|
|
|
|
|
|
2024-08-02 16:34:45 +08:00
|
|
|
|
},
|
2024-08-22 13:57:12 +08:00
|
|
|
|
});
|
2024-08-02 16:34:45 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//修改
|
|
|
|
|
|
function updateView(id) {
|
|
|
|
|
|
let height = '98%';
|
|
|
|
|
|
let width = '99%';
|
|
|
|
|
|
/* $.ajax({
|
|
|
|
|
|
type: 'post',
|
|
|
|
|
|
contentType: "application/x-www-form-urlencoded",
|
|
|
|
|
|
url: oiPlanUrl + '/monthlyPlanSubmission/getDataById',
|
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
|
data: {
|
|
|
|
|
|
id: id
|
|
|
|
|
|
},
|
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
var index = layer.open({
|
|
|
|
|
|
title: ['巡视结果上传', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
|
|
|
|
|
type: 2,
|
|
|
|
|
|
content: './wagesReport/producePayrollDetails.html',
|
|
|
|
|
|
area: [width, height],
|
|
|
|
|
|
maxmin: false,
|
|
|
|
|
|
success: function (layero, index) {
|
|
|
|
|
|
console.log(data);
|
|
|
|
|
|
var myIframe = window[layero.find('iframe')[0]['name']];
|
|
|
|
|
|
myIframe.hideSubmit();
|
|
|
|
|
|
// var fnc = myIframe.setData(data.data); //aaa()为子页面的方法
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
}) */
|
|
|
|
|
|
|
|
|
|
|
|
//测试
|
|
|
|
|
|
var index = layer.open({
|
|
|
|
|
|
title: ['巡视结果上传', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
|
|
|
|
|
type: 2,
|
|
|
|
|
|
content: './viewResultUpdate.html',
|
|
|
|
|
|
area: [width, height],
|
|
|
|
|
|
maxmin: false,
|
|
|
|
|
|
success: function (layero, index) {
|
|
|
|
|
|
// var myIframe = window[layero.find('iframe')[0]['name']];
|
|
|
|
|
|
// myIframe.hideSubmit();
|
|
|
|
|
|
// var fnc = myIframe.setData(data.data); //aaa()为子页面的方法
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
});
|
2024-08-22 15:30:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
function exportData() {
|
|
|
|
|
|
|
|
|
|
|
|
var userName = $("#userName").val();
|
|
|
|
|
|
var proName = $("#proName").val();
|
|
|
|
|
|
var yjName = $("#yjName").val();
|
|
|
|
|
|
var makeMonth = $("#makeMonth").val();
|
|
|
|
|
|
yjId=localStorage.getItem("selectyj");
|
|
|
|
|
|
subId=localStorage.getItem("selectSubCom");
|
|
|
|
|
|
window.location.href = PATH_URL + `/makeInfo/exportDatas?token=` + token
|
|
|
|
|
|
+ "&userName=" + userName
|
|
|
|
|
|
+ "&proName=" + proName
|
|
|
|
|
|
+ "&yjName=" + yjName
|
|
|
|
|
|
+ "&makeMonth=" + makeMonth
|
|
|
|
|
|
+ "&subId=" + subId
|
|
|
|
|
|
+ "&yjId=" + yjId
|
2024-08-02 16:34:45 +08:00
|
|
|
|
}
|