diff --git a/hxy-web/html/dataStatistics/header.html b/hxy-web/html/dataStatistics/header.html index 3fd9855..611417a 100644 --- a/hxy-web/html/dataStatistics/header.html +++ b/hxy-web/html/dataStatistics/header.html @@ -3,177 +3,186 @@ 护线员子系统 + + - - + - - + + - -
-
-
-
-
护线员管理
-
- 运检一公司 -
-
- -
-
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
- - -
- i 系统检测到您有5条计划待审核,请尽快处理。 - >>去处理 - X + +
+
+
+
+
护线员管理
+
+ 运检一公司 +
-
- - + + + //后台获取待审核计划数 + $.ajax({ + type: 'POST', + url: PATH_URL + '/inspectionPlan/waitAuditNum', + contentType: "application/json; charset=utf-8", + data: JSON.stringify({ + fgsId:'26' + }), + success: function(data) { + if (data.code == 200) { + $("#waitAuditNum").text(data.data.waitAuditNum); + if (data.data.waitAuditNum > 0) { + $("#waitAuditNum").addClass("arrow_box"); + } + $("#waitAuditNums").text(data.data.waitAuditNum); + } else { + $("#waitAuditNum").text("0"); + $("#waitAuditNums").text("0"); + } + } + }) + + + }); + + //关闭底部的提示框 + function closeTop(event) { + $(event).parent().css("display", "none"); + } + \ No newline at end of file diff --git a/hxy-web/html/dataStatistics/viewPlan/monthPlanAudit.html b/hxy-web/html/dataStatistics/viewPlan/monthPlanAudit.html index af1f184..dbce4f9 100644 --- a/hxy-web/html/dataStatistics/viewPlan/monthPlanAudit.html +++ b/hxy-web/html/dataStatistics/viewPlan/monthPlanAudit.html @@ -3,14 +3,14 @@ 月计划审核 - + + - - - + + @@ -159,6 +159,14 @@ background-size: 50% 100%; background-position: center; } + .planAuditStatus4 { + color: #ffffff; + height: 30px; + padding-top: 5px; + background: url(../../../image/dialogBox_red.png) no-repeat; + background-size: 50% 100%; + background-position: center; + } @@ -166,8 +174,13 @@
-
运检一公司昆明运检一站 2024-03 月护线员工作计划
-
● 待审核
+
+ + + + 月护线员工作计划 +
+
@@ -188,30 +201,30 @@
-
李小萌
-
2024-03-25 23:26:08
+
+
分公司审核
-
审核通过
+
-
李小刚
-
2024-03-25 23:26:08
+
+
总公司审核
-
完结
+
-
总公司
-
待处理
+
+
diff --git a/hxy-web/html/dataStatistics/viewPlan/monthPlanDetails.html b/hxy-web/html/dataStatistics/viewPlan/monthPlanDetails.html index 277f3c0..963fbaf 100644 --- a/hxy-web/html/dataStatistics/viewPlan/monthPlanDetails.html +++ b/hxy-web/html/dataStatistics/viewPlan/monthPlanDetails.html @@ -2,23 +2,24 @@ - 护线员考勤 - + 月计划详情 + + - - - + + - - + + - +
- +
-
运检一公司昆明运检一站 2024-03 月护线员工作计划
-
● 待审核
+
+ + + + 月护线员工作计划 +
+
-
-
+
提交
-
李小萌
-
2024-03-25 23:26:08
+
+
分公司审核
-
审核通过
+
-
李小刚
-
2024-03-25 23:26:08
+
+
+ +
总公司审核
-
完结
+
-
总公司
-
待处理
-
+
+
+
- +
- - + +
@@ -221,6 +255,6 @@
-
+
\ No newline at end of file diff --git a/hxy-web/html/dataStatistics/viewPlan/noPassReason.html b/hxy-web/html/dataStatistics/viewPlan/noPassReason.html index 4e6daaf..3860ffe 100644 --- a/hxy-web/html/dataStatistics/viewPlan/noPassReason.html +++ b/hxy-web/html/dataStatistics/viewPlan/noPassReason.html @@ -1,47 +1,49 @@ - - - 特巡结果上传 - - - - - - - - - - - - -
-
-
-
- -
- -
- 已输入  - 0 - /300 + + + 分公司-审核不通过 + + + + + + + + + + + + +
+ +
+
+ +
+ +
+ 已输入  + 0 + /300 +
+
+
- -
+ + + + +
- - - - - -
- - + + \ No newline at end of file diff --git a/hxy-web/html/dataStatistics/viewPlan/viewPlanList.html b/hxy-web/html/dataStatistics/viewPlan/viewPlanList.html index 1d4ff9f..dd6f49a 100644 --- a/hxy-web/html/dataStatistics/viewPlan/viewPlanList.html +++ b/hxy-web/html/dataStatistics/viewPlan/viewPlanList.html @@ -2,15 +2,15 @@ - 护线员考勤 - + 巡视计划 + + - - + @@ -34,31 +34,36 @@
- +
- +
- +
- + + + + + +
- - diff --git a/hxy-web/html/wireManager/viewPlan/monthPlanDetails.html b/hxy-web/html/wireManager/viewPlan/monthPlanDetails.html index 1584e25..6e3cd6a 100644 --- a/hxy-web/html/wireManager/viewPlan/monthPlanDetails.html +++ b/hxy-web/html/wireManager/viewPlan/monthPlanDetails.html @@ -2,7 +2,7 @@ - 护线员考勤 + 月计划详情 @@ -158,6 +158,14 @@ background-size: 50% 100%; background-position: center; } + .planAuditStatus4 { + color: #ffffff; + height: 30px; + padding-top: 5px; + background: url(../../../image/dialogBox_red.png) no-repeat; + background-size: 50% 100%; + background-position: center; + } diff --git a/hxy-web/js/dataStatistics/viewPlan/monthPlanAudit.js b/hxy-web/js/dataStatistics/viewPlan/monthPlanAudit.js index 9cf253b..e1ec8bf 100644 --- a/hxy-web/js/dataStatistics/viewPlan/monthPlanAudit.js +++ b/hxy-web/js/dataStatistics/viewPlan/monthPlanAudit.js @@ -1,124 +1,256 @@ - - var pers = [] -var table,form,laydate -layui.use(['form','layer','table','laydate'], function () { - table = layui.table; - form = layui.form; - laydate = layui.laydate - - init(); - - setData(); -}); -function setData(){ -} - // 静态数据 - var tableData = [ - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - ]; +var table, form, laydate + +var yjIds, insMonths, ids; +// 静态数据 +var tableData = []; + +function setData(data, yjId, insMonth, id) { + yjIds = yjId; + insMonths = insMonth; + ids = id; + + layui.use(['form', 'layer', 'table', 'laydate'], function() { + table = layui.table; + form = layui.form; + laydate = layui.laydate + + if (data.length > 0) { + $('#fgsName').html(data[0].fgsName); + $('#yjName').html(data[0].yjName); + $('#insMonth').html(data[0].insMonth); + setAiDitStatus(data[0].aiDitStatus); + + $('#createUser').html(data[0].createUser); + $('#createTime').html(data[0].createTime); + //分公司 + if (data[0].aiDitStatuses) { + // 获取元素 + var element = document.getElementById('aiDitStatuses'); + // 移除旧的类 + element.classList.remove('planAuditStatus3'); + if (data[0].aiDitStatuses == 2) { + element.classList.add('planAuditStatus2'); + $('#aiDitStatuses').html("审核通过"); + } else if (data[0].aiDitStatuses == 3) { + element.classList.add('planAuditStatus4'); + $('#aiDitStatuses').html("审核不通过"); + } + + $('#auditUserName').html(data[0].auditUserName); + $('#auditTime').html(data[0].auditTime); + } else { + $('#aiDitStatuses').html(""); + $('#auditUserName').html(""); + $('#auditTime').html("待处理"); + } + + //总公司 + if (data[0].aiDitStatusTotal) { + + // 获取元素 + var element = document.getElementById('aiDitStatusTotal'); + // 移除旧的类 + element.classList.remove('planAuditStatus3'); + if (data[0].aiDitStatusTotal == 2) { + element.classList.add('planAuditStatus2'); + $('#aiDitStatusTotal').html("审核通过"); + } else if (data[0].aiDitStatusTotal == 3) { + element.classList.add('planAuditStatus4'); + $('#aiDitStatusTotal').html("审核不通过"); + } + $('#auditUserNameTotal').html(data[0].auditUserNameTotal); + $('#auditTimeTotal').html(data[0].auditTimeTotal); + } else { + $('#aiDitStatusTotal').html(""); + $('#auditUserNameTotal').html(""); + $('#auditTimeTotal').html("待处理"); + } + for (var i = 0; i < data.length; i++) { + tableData.push({ + id: data[i].id, + proName: data[i].proName, + yjId: data[i].yjId, + insMonth: data[i].insMonth, + + workContent: data[i].workContent, + stateTime: data[i].stateTime, + enTime: data[i].enTime, + dutyUser: data[i].dutyUser, + supervisor: data[i].supervisor, + complete: data[i].complete, + remarks: data[i].remarks, + + }) + } + init(); + } else { + init(); + layer.alert("无数据,请联系管理员", { + icon: 2 + }); + } + }); +} + +function setAiDitStatus(status) { + $("#subComName").empty(); + var text; + var color; + var html = ""; + if (status == '2') { + text = '已通过'; + color = '#19BE6B'; + } + if (status == '0') { + text = '待审核'; + color = '#FF9900'; + } + if (status == '3') { + text = '未通过'; + color = '#F56C6C'; + } + if (status == '1') { + text = '已撤销'; + color = '#999999'; + } + html += "" + html += `  ` + html += `${text}` + html += "" + + $("#subComName").append(html); +} + - /** * 初始化数据 */ -function init(){ - // 渲染表格 - table.render({ - elem: '#table', - // url: "/sys/achievement", - // page: true, - skin: 'line', // 表格样式 - cols: [[ - { - title: '序号', - field: 'zizeng', - align: 'center', - type: 'numbers', - width: '5%' - }, - {field:'lineName', title: '线路名称',align: 'center'}, - {field:'workContent', title: '工作内容',align: 'center'}, - {field:'planStartTime', title: '计划开始时间',align: 'center'}, - {field:'planEndTime', title: '计划结束时间',align: 'center'}, - {field:'liablePerson', title: '责任人(护线员)',align: 'center'}, - {field:'proctorPerson', title: '督办人(设备主人)',align: 'center'}, - {field:'standard', title: '完成标准',align: 'center'}, - {field:'remark', title: '备注',align: 'center'}, - ]], - data: tableData, - done: function(res, curr, count, origin){ - console.log(res); // 得到当前渲染的数据 - console.log(curr); // 得到当前页码 - console.log(count); // 得到数据总量 - console.log(origin); // 回调函数所执行的来源 --- 2.8.7+ - laydate.render({ - elem: '.planStartTime' - }); - laydate.render({ - elem: '.planEndTime' - }); - }, - }); - +function init() { + // 渲染表格 + table.render({ + elem: '#table', + skin: 'line', // 表格样式 + cols: [ + [{ + title: '序号', + field: 'zizeng', + align: 'center', + type: 'numbers', + width: '5%' + }, + { + field: 'proName', + title: '线路名称', + align: 'center' + }, + { + field: 'workContent', + title: '工作内容', + align: 'center' + }, + { + field: 'stateTime', + title: '计划开始时间', + align: 'center' + }, + { + field: 'enTime', + title: '计划结束时间', + align: 'center' + }, + { + field: 'dutyUser', + title: '责任人(护线员)', + align: 'center' + }, + { + field: 'supervisor', + title: '督办人(设备主人)', + align: 'center' + }, + { + field: 'complete', + title: '完成标准', + align: 'center' + }, + { + field: 'remarks', + title: '备注', + align: 'center' + }, + ] + ], + data: tableData, + done: function(res, curr, count, origin) { + + }, + }); + } //审核通过按钮点击 -function pass(){ - layer.confirm("是否确定审核通过?",{icon: 3},function(){ - /* $.ajax({ - type: 'post', - contentType: "application/x-www-form-urlencoded", - url: "", - dataType: 'json', - data: { - id: id - }, - success: function (data) { - }, - }) */ +function pass() { + layer.confirm("是否确定审核通过?", { + icon: 3 + }, function() { + // 加载提示 + let loadingMsg = layer.msg('数据上传中,请稍候...', { + icon: 16, + scrollbar: false, + time: 0, + shade: [0.8, '#393D49'] + }); + // form请求地址 + let formUrl = PATH_URL + "/inspectionPlan/updateDivideExamine"; + $.ajax({ + type: 'POST', + url: formUrl, // 请求地址 + contentType: "application/json; charset=utf-8", + data: JSON.stringify({ + "insMonth": insMonths, + "yjId": yjIds, + "id": ids, + "auditStatus": 4 + }), + success: function(data) { + layer.close(loadingMsg); // 关闭提示层 + if (data.code == 200) { + parent.layer.msg("审核成功", { + icon: 1 + }); + var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引 + parent.layer.close(index); //再执行关闭 + reloading(); + } else { + layer.alert(data.msg); + } + }, + error: function(XMLHttpRequest, textStatus, e) { + layer.close(loadingMsg); + layer.msg('数据请求发生异常,请稍后重试', { + icon: 16, + scrollbar: false + }); + } + }); }) } //审核不通过按钮点击 -function noPass(){ +function noPass() { let height = '65%'; - let width = '40%'; + let width = '41%'; var index = layer.open({ - title: ['审核不通过', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'], - type: 2, - content: './noPassReason.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()为子页面的方法 - - }, + title: ['审核不通过', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'], + type: 2, + content: './noPassReason.html', + area: [width, height], + maxmin: false, + success: function(layero, index) { + var myIframe = window[layero.find('iframe')[0]['name']]; + var fnc = myIframe.setData(yjIds, insMonths, ids); //aaa()为子页面的方法 + }, }); } \ No newline at end of file diff --git a/hxy-web/js/dataStatistics/viewPlan/monthPlanDetails.js b/hxy-web/js/dataStatistics/viewPlan/monthPlanDetails.js index 2f439d9..dbda604 100644 --- a/hxy-web/js/dataStatistics/viewPlan/monthPlanDetails.js +++ b/hxy-web/js/dataStatistics/viewPlan/monthPlanDetails.js @@ -1,96 +1,204 @@ - - var pers = [] -var table,form,laydate -layui.use(['form','layer','table','laydate'], function () { - table = layui.table; - form = layui.form; - laydate = layui.laydate - - init(); - - setData(); -}); -function setData(){ - $("#noPassReason").text("±500kV永富直流线填写作业内容不合理,核算后重新填写上传±500kV永富直流线填写作业内容不合理,核算后重新填写上传±500kV永富直流线填写作业内容不合理,核算后重新填写上传±500kV永富直流线填写作业内容不合理,核算后重新填写上传") -} - // 静态数据 - var tableData = [ - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - {id: 1, lineName: '±500kV永富直', workContent: '500kV草宝甲线开展2次/月巡视,按全线开展。开展2次巡视,第2次执行关键重要区段巡视。2、关键重要区段:(1)关键交叉跨越管控区段:#001-#003、#046-#047 (2)重要交叉跨越管控区段:#107-#108、#115-#116 ', planStartTime: '2024-03-01', planEndTime: '2024-03-31', liablePerson: '周应福、毕兴武、李永辉', proctorPerson: '马俊伟', standard: '巡视表单、通话记录', remark: '备注'}, - ]; +var table, form, laydate - +var yjIds, insMonths; +// 静态数据 +var tableData = []; /** * 初始化数据 */ -function init(){ - // 渲染表格 - table.render({ - elem: '#table', - // url: "/sys/achievement", - // page: true, - skin: 'line', // 表格样式 - cols: [[ - { - title: '序号', - field: 'zizeng', - align: 'center', - type: 'numbers', - width: '5%' - }, - {field:'lineName', title: '线路名称',align: 'center'}, - {field:'workContent', title: '工作内容',align: 'center'}, - {field:'planStartTime', title: '计划开始时间',align: 'center'}, - {field:'planEndTime', title: '计划结束时间',align: 'center'}, - {field:'liablePerson', title: '责任人(护线员)',align: 'center'}, - {field:'proctorPerson', title: '督办人(设备主人)',align: 'center'}, - {field:'standard', title: '完成标准',align: 'center'}, - {field:'remark', title: '备注',align: 'center'}, - ]], - data: tableData, - done: function(res, curr, count, origin){ - console.log(res); // 得到当前渲染的数据 - console.log(curr); // 得到当前页码 - console.log(count); // 得到数据总量 - console.log(origin); // 回调函数所执行的来源 --- 2.8.7+ - laydate.render({ - elem: '.planStartTime' - }); - laydate.render({ - elem: '.planEndTime' - }); - }, - }); - +function init() { + // 渲染表格 + table.render({ + elem: '#table', + skin: 'line', // 表格样式 + cols: [ + [{ + title: '序号', + field: 'zizeng', + align: 'center', + type: 'numbers', + width: '5%' + }, + { + field: 'proName', + title: '线路名称', + align: 'center' + }, + { + field: 'workContent', + title: '工作内容', + align: 'center' + }, + { + field: 'stateTime', + title: '计划开始时间', + align: 'center' + }, + { + field: 'enTime', + title: '计划结束时间', + align: 'center' + }, + { + field: 'dutyUser', + title: '责任人(护线员)', + align: 'center' + }, + { + field: 'supervisor', + title: '督办人(设备主人)', + align: 'center' + }, + { + field: 'complete', + title: '完成标准', + align: 'center' + }, + { + field: 'remarks', + title: '备注', + align: 'center' + }, + ] + ], + data: tableData, + done: function(res, curr, count, origin) { + + }, + }); + +} + +function setData(data, yjId, insMonth) { + yjIds = yjId; + insMonths = insMonth; + + layui.use(['form', 'layer', 'table', 'laydate'], function() { + table = layui.table; + form = layui.form; + laydate = layui.laydate + if (data.length > 0) { + $('#fgsName').html(data[0].fgsName); + $('#yjName').html(data[0].yjName); + $('#insMonth').html(data[0].insMonth); + setAiDitStatus(data[0].aiDitStatus); + + $('#createUser').html(data[0].createUser); + $('#createTime').html(data[0].createTime); + //分公司 + if (data[0].aiDitStatuses) { + // 获取元素 + var element = document.getElementById('aiDitStatuses'); + // 移除旧的类 + element.classList.remove('planAuditStatus3'); + if(data[0].aiDitStatuses == 2){ + element.classList.add('planAuditStatus2'); + $('#aiDitStatuses').html("审核通过"); + }else if(data[0].aiDitStatuses == 3){ + element.classList.add('planAuditStatus4'); + $('#aiDitStatuses').html("审核不通过"); + + $('#noPassReason').html(data[0].auditReason); + } + + $('#auditUserName').html(data[0].auditUserName); + $('#auditTime').html(data[0].auditTime); + } else { + $('#aiDitStatuses').html(""); + $('#auditUserName').html(""); + $('#auditTime').html("待处理"); + } + + //总公司 + if (data[0].aiDitStatusTotal) { + + // 获取元素 + var element = document.getElementById('aiDitStatusTotal'); + // 移除旧的类 + element.classList.remove('planAuditStatus3'); + if(data[0].aiDitStatusTotal == 2){ + element.classList.add('planAuditStatus2'); + $('#aiDitStatusTotal').html("审核通过"); + }else if(data[0].aiDitStatusTotal == 3){ + element.classList.add('planAuditStatus4'); + $('#aiDitStatusTotal').html("审核不通过"); + + $('#noPassReasonTotal').html(data[0].auditReason); + } + $('#auditUserNameTotal').html(data[0].auditUserNameTotal); + $('#auditTimeTotal').html(data[0].auditTimeTotal); + } else { + $('#aiDitStatusTotal').html(""); + $('#auditUserNameTotal').html(""); + $('#auditTimeTotal').html("待处理"); + } + for (var i = 0; i < data.length; i++) { + tableData.push({ + id: data[i].id, + proName: data[i].proName, + yjId: data[i].yjId, + insMonth: data[i].insMonth, + + workContent: data[i].workContent, + stateTime: data[i].stateTime, + enTime: data[i].enTime, + dutyUser: data[i].dutyUser, + supervisor: data[i].supervisor, + complete: data[i].complete, + remarks: data[i].remarks, + + }) + } + init(); + } else { + init(); + layer.alert("无数据,请联系管理员", { + icon: 2 + }); + } + + console.log(data) + }); +} + +function setAiDitStatus(status) { + $("#subComName").empty(); + var text; + var color; + var html = ""; + if (status == '2') { + text = '已通过'; + color = '#19BE6B'; + } + if (status == '0') { + text = '待审核'; + color = '#FF9900'; + } + if (status == '3') { + text = '未通过'; + color = '#F56C6C'; + } + if (status == '1') { + text = '已撤销'; + color = '#999999'; + } + html += "" + html += `  ` + html += `${text}` + html += "" + + $("#subComName").append(html); } //导出 -function exportData(){ - // let search1 = $('#search1').val(); - // let search2 = $('#search2').val(); - window.location.href = oiPlanUrl + "/monthlyPlanSubmission/export?token=" + token; +function exportData() { + window.location.href = PATH_URL + `/inspectionPlan/exportMonthPlanData?token=` + token + + "&insMonth=" + insMonths + + "&yjId=" + yjIds + layer.msg('下载中,请稍等', { + icon: 16, + scrollbar: false + }); } \ No newline at end of file diff --git a/hxy-web/js/dataStatistics/viewPlan/noPassReason.js b/hxy-web/js/dataStatistics/viewPlan/noPassReason.js index 204bdc1..b200963 100644 --- a/hxy-web/js/dataStatistics/viewPlan/noPassReason.js +++ b/hxy-web/js/dataStatistics/viewPlan/noPassReason.js @@ -5,156 +5,75 @@ var upload; var id; var formData; +var yjIds, insMonths, ids; -layui.use(['form', 'table', 'upload', 'laydate'], function () { - let form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功 - form.render(); - upload = layui.upload; - var laydate = layui.laydate; - - laydate.render({ - elem: '#dataTime' - }); +function setData(yjId, insMonth, id) { + yjIds = yjId; + insMonths = insMonth; + ids = id; + layui.use(['form', 'layer', 'table', 'laydate'], function() { + let form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功 + form.render(); - uploadFile(); + $("#closeBt").click(function() { + var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引 + parent.layer.close(index); //再执行关闭 + }); + $("#searchBt").click(function() { + // 加载提示 + let loadingMsg = layer.msg('数据上传中,请稍候...', { + icon: 16, + scrollbar: false, + time: 0, + shade: [0.8, '#393D49'] + }); + // form请求地址 + let formUrl = PATH_URL + "/inspectionPlan/updateDivideExamine"; + + let revokeReason = $("#revokeReason").val(); + $.ajax({ + type: 'POST', + url: formUrl, // 请求地址 + contentType: "application/json; charset=utf-8", + data: JSON.stringify({ + "insMonth": insMonths, + "yjId": yjIds, + "id": ids, + "auditStatus": 2, + "auditReason":revokeReason + }), + success: function(data) { + layer.close(loadingMsg); // 关闭提示层 + if (data.code == 200) { + parent.layer.msg("审核成功", { + icon: 1 + }); + var index = parent.layer.getFrameIndex(window + .name); //先得到当前 iframe层的索引 + parent.layer.close(index); //再执行关闭 + reloading(); + } else { + layer.alert(data.msg); + } + }, + error: function(XMLHttpRequest, textStatus, e) { + layer.close(loadingMsg); + layer.msg('数据请求发生异常,请稍后重试', { + icon: 16, + scrollbar: false + }); + } + }); - form.on('submit(formDemo)', function (data) { - add(); - }); - - $("#closeBt").click(function(){ - var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引 - parent.layer.close(index); //再执行关闭 - }) -}); - -function uploadFile(){ - var uploadcom = upload.render({ - elem: '#test', - url: '', //改成您自己的上传接口 - multiple: true, //是否允许多文件上传,默认未false - dataType: "json", - // data: {"pickId": id}, - exts: 'jpg|png|mp4', - //acceptMime: 'image/jpg,image/png,image/jpeg,file/pdf,file/xlsx', - auto: false, //是否自动上传 ,默认为true - number: 9, //最大上传数量 - // size: 1024*5, //最大文件大小,单位k - bindAction: '#hideUpload', //绑定的按钮 - field: 'file', //传到后台的字段名,默认file - choose: function (obj) { - flag = false; - var suffixType = ''; //后缀类型 - uploadcom.config.elem.next()[0].value = ''; - obj.files = obj.pushFile(); - startWorkFiles = obj.pushFile(); - obj.preview(function (index, file, result) { - console.log(index); //得到文件索引 - console.log(file.name); //得到文件对象 - var files = $('#demo img') - if(files.length <= 2){ - $('#demo').append( - '
' + - '
' + - '
' + - '' + - '
' + - '' + file.name + '' + - '
' + (file.name.length > 8 ? (file.name.substr(0, 8) + "..") : file.name) + '
' + - '
'+ - '
' - ); - }else{ - layer.msg('最多上传2张照片',{icon:2}) - } - addDelete(startWorkFiles); - }); - }, - before: function (obj) { - this.data = { - photoType: "supplyChainBlack" - }; - }, - done: function (data) { - }, - allDone: function (data) { - top.layer.close(loadingMsg); - top.layer.msg(data.msg, {icon: 1}); - reloading(); - }, - error: function (e) { - //请求异常回调 - console.log(e) - } - }); + }); + }); } -function add() { - // loadingMsg = top.layer.msg('数据上传中,请稍候...', {icon: 16, scrollbar: false, time: 0, shade: [0.8, '#393D49']}); - var files = $('#demo img') - if(files.length == 0){ - layer.msg('请上传文件', {icon: 2}); - return; - } - - $.ajax({ - type: 'POST', - async: true, // 默认异步true,false表示同步 - url: ctxPath + '/supplyChainBlack/addBlack', - contentType: "application/json; charset=utf-8", - data: JSON.stringify(formData.field), //获取提交的表单字段 - dataType: 'json', // 服务器返回数据类型 - success: function (data) { - if (data.code == 200) { - $("#hideUpload").trigger("click"); - } else { - layer.alert(data.msg, {icon: 2}); - } - }, - error: function (XMLHttpRequest, textStatus, e) { - top.layer.close(loadingMsg); - layer.msg('数据请求发生异常,请稍后重试', {icon: 16, scrollbar: false}); - } - }); -} - - - -var deletePhoto = []; -function delPhoto(i,id) { - var parentcolor = document.getElementById("demo" + i); - var childcolor = document.getElementById(id + ""); - var path = childcolor.name; - deletePhoto.push(path); - parentcolor.removeChild(childcolor); - var photoNum = $("#demo" + i).children().length; - if (photoNum == 0) { - $("#preview" + i).css("display", "none"); - } -} -function addDelete(arr) { - $('#demo').click(function (e) { - var target = $(e.target) - if (target.hasClass('handle') || target.hasClass('layui-icon')) { - var dataIdx = target.attr('data-idx') - var filePath = $('#' + dataIdx).children().children().next().attr('file') - delete arr[dataIdx]; // 通过获取绑定在标签上的index,删除files对象中对应的key属性即可 - target.parents('.item').remove() // 页面文件标签也删除 - } - }); -} //设置弹窗关闭 function reloading() { - var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引 - parent.layer.close(index); //再执行关闭 - window.parent.location.reload(); -} - - -//字数检测 -function wordCount(event){ - var count = $("#revokeReason").val().length; - $("#wordCount").text(count); + var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引 + parent.layer.close(index); //再执行关闭 + window.parent.location.reload(); } \ No newline at end of file diff --git a/hxy-web/js/dataStatistics/viewPlan/viewPlanList.js b/hxy-web/js/dataStatistics/viewPlan/viewPlanList.js index 38526f6..7da8b00 100644 --- a/hxy-web/js/dataStatistics/viewPlan/viewPlanList.js +++ b/hxy-web/js/dataStatistics/viewPlan/viewPlanList.js @@ -1,249 +1,330 @@ - var pers = [] -var table,form,laydate -layui.use(['form','layer','table','laydate'], function () { - table = layui.table; - form = layui.form; +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', + elem: '#insMonth', + type: 'month', + btns: ['now', 'confirm'] }); - // 触发submit提交 按钮点击或者表单被执行提交时触发 - form.on('submit(query)', function (data) { - console.log("搜索") - // 对表格进行重载。id 即 table表格的id - table.reload('table', { - // //设定异步数据接口的额外参数 - page:{curr : 1} - ,where: data.field - }) - return false; // 阻止表单跳转。如果需要表单跳转,去掉这段即可。 - }); - $("#reset").click(function(){ - console.log("重置") - $('#search1').val(''); - $('#search2').val(''); - $('#search3').val(''); - let obj = { - search1:'', - search2:'', - search3:'' - } - // 对表格进行重载。id 即 table表格的id - table.reload('table', { - // //设定异步数据接口的额外参数 - page:{curr : 1} - ,where: obj - }) - }) - - table.on('tool(table)', function (obj) { - switch (obj.event) { - case 'details': - console.log('详情',obj) - detailsView(obj.id) - break; - case 'uploadResult': - console.log('上传结果',obj) - updateView() - break; - } - }); - init(); + + init(); }); - // 静态数据 - var tableData = [ - {id: 1, comName: '运检一公司',sName: '昆明运检一站', month: '2024-03', workPlan: '21', subPerson: '郭福林', subTime: '2024-02-28 18:10:10', status: '1'}, - {id: 1, comName: '运检一公司',sName: '昆明运检一站', month: '2024-03', workPlan: '21', subPerson: '郭福林', subTime: '2024-02-28 18:10:10', status: '1'}, - {id: 1, comName: '运检一公司',sName: '昆明运检一站', month: '2024-03', workPlan: '21', subPerson: '郭福林', subTime: '2024-02-28 18:10:10', status: '1'}, - {id: 1, comName: '运检一公司',sName: '昆明运检一站', month: '2024-03', workPlan: '21', subPerson: '郭福林', subTime: '2024-02-28 18:10:10', status: '2'}, - {id: 1, comName: '运检一公司',sName: '昆明运检一站', month: '2024-03', workPlan: '21', subPerson: '郭福林', subTime: '2024-02-28 18:10:10', status: '2'}, - {id: 1, comName: '运检一公司',sName: '昆明运检一站', month: '2024-03', workPlan: '21', subPerson: '郭福林', subTime: '2024-02-28 18:10:10', status: '2'}, - {id: 1, comName: '运检一公司',sName: '昆明运检一站', month: '2024-03', workPlan: '21', subPerson: '郭福林', subTime: '2024-02-28 18:10:10', status: '3'}, - {id: 1, comName: '运检一公司',sName: '昆明运检一站', month: '2024-03', workPlan: '21', subPerson: '郭福林', subTime: '2024-02-28 18:10:10', status: '3'}, - {id: 1, comName: '运检一公司',sName: '昆明运检一站', month: '2024-03', workPlan: '21', subPerson: '郭福林', subTime: '2024-02-28 18:10:10', status: '3'}, - {id: 1, comName: '运检一公司',sName: '昆明运检一站', month: '2024-03', workPlan: '21', subPerson: '郭福林', subTime: '2024-02-28 18:10:10', status: '4'}, - {id: 1, comName: '运检一公司',sName: '昆明运检一站', month: '2024-03', workPlan: '21', subPerson: '郭福林', subTime: '2024-02-28 18:10:10', status: '4'}, - {id: 1, comName: '运检一公司',sName: '昆明运检一站', month: '2024-03', workPlan: '21', subPerson: '郭福林', subTime: '2024-02-28 18:10:10', status: '4'}, - {id: 1, comName: '运检一公司',sName: '昆明运检一站', month: '2024-03', workPlan: '21', subPerson: '郭福林', subTime: '2024-02-28 18:10:10', status: '4'}, - {id: 1, comName: '运检一公司',sName: '昆明运检一站', month: '2024-03', workPlan: '21', subPerson: '郭福林', subTime: '2024-02-28 18:10:10', status: '4'} - ]; +//查询 +function queryClick() { + let fgsName = $('#fgsName').val(); + let yjName = $('#yjName').val(); + let insMonth = $('#insMonth').val(); + let aiDitStatus = $('#aiDitStatus').val(); + table.reload('layui_table', { + where: { + fgsId: '26', + fgsName: fgsName, + yjName: yjName, + insMonth: insMonth, + aiDitStatus: aiDitStatus, + } + }) +} +//重置 +function resetClick() { + $('#fgsName').val(''); + $('#yjName').val(''); + $('#insMonth').val(''); + $('#aiDitStatus').val('0'); + form.render(); + table.reload('layui_table', { + where: { + fgsId: "26", + fgsName: "", + yjName: "", + insMonth: "", + aiDitStatus: "", + } + }) +} - /** * 初始化数据 */ -function init(){ - // 渲染表格 - table.render({ - elem: '#table', - // url: "/sys/achievement", - page: true, - skin: 'line', // 表格样式 - cols: [[ - { - title: '序号', - field: 'zizeng', - align: 'center', - type: 'numbers', - width: '5%' - }, - {field:'comName', title: '分公司',align: 'center',width: '15%'}, - {field:'sName', title: '运检站',align: 'center',width: '15%'}, - {field:'month', title: '月份',align: 'center',width: '6%'}, - {field:'workPlan', title: '工程计划数量',align: 'center',width: '7%'}, - {field:'subPerson', title: '提交人',align: 'center',width: '7%'}, - {field:'subTime', title: '提交时间',align: 'center',width: '15%'}, - { - field: '', - title: '审核状态', - align: 'center', - width: '10%', - templet: function(d){ - var status = d.status; - - var text; - var color; - var html = ""; - if(status == '1'){ - text = '已审核'; - color = '#19BE6B'; - } - if(status == '2'){ - text = '待审核'; - color = '#FF9900'; - - } - if(status == '3'){ - text = '未通过'; - color = '#F56C6C'; - } - if(status == '4'){ - text = '已撤销'; - color = '#999999'; - } - html += "" - html += `  ` - html += `${text}` - html += "" - return html; - }, +function init() { + let aiDitStatus = $('#aiDitStatus').val(); + // 渲染表格 + table.render({ + id: 'layui_table', + elem: '#table', + url: PATH_URL + '/inspectionPlan/getLineProjectListAuditPage', + where: { + fgsId: '26', + aiDitStatus: aiDitStatus }, - { - field: '', - title: '操作', - align: 'center', - width: '20%', - templet: function(d){ - var id= d.id; - var status = d.status; - var text; - var html = ""; - if(status == '1'){ - //已审核 - html += `` - html += `` - } - if(status == '2'){ - //待审核 - html += `` - html += `` - html += `` - } - if(status == '3'){ - //未通过 - html += `` - html += `` - } - - return html; - }, - } - ]], - data: tableData - }); - + page: true, + method: 'post', + skin: 'line', // 表格样式 + cols: [ + [{ + title: '序号', + field: 'zizeng', + align: 'center', + type: 'numbers', + width: '5%' + }, + { + field: 'fgsName', + title: '分公司', + align: 'center', + width: '15%' + }, + { + field: 'yjName', + title: '运检站', + align: 'center', + width: '15%' + }, + { + field: 'insMonth', + title: '月份', + align: 'center', + width: '6%' + }, + { + field: 'proPlanNum', + title: '工程计划数量', + align: 'center', + width: '7%' + }, + { + field: 'createUser', + title: '提交人', + align: 'center', + width: '7%' + }, + { + field: 'createTime', + title: '提交时间', + align: 'center', + width: '15%' + }, + { + field: '', + title: '审核状态', + align: 'center', + width: '10%', + templet: function(d) { + var status = d.aiDitStatus; + console.log(status) + var text; + var color; + var html = ""; + if (status == '2') { + text = '已通过'; + color = '#19BE6B'; + } + if (status == '0') { + text = '待审核'; + color = '#FF9900'; + } + if (status == '3') { + text = '未通过'; + color = '#F56C6C'; + } + if (status == '1') { + text = '已撤销'; + color = '#999999'; + } + html += + "" + html += + `  ` + html += `${text}` + html += "" + return html; + }, + }, + { + field: '', + title: '操作', + align: 'center', + width: '20%', + templet: function(d) { + var id = d.id; + var yjId = d.yjId; + var insMonth = d.insMonth; + var status = d.aiDitStatus; + var text; + var html = ""; + if (status == '2') { + //已审核 + html += + `` + html += + `` + } + if (status == '0') { + //分公司待审核 + html += + `` + html += + `` + html += + `` + } + + if (status == '4') { + //总公司待审核 + html += + `` + html += + `` + html += + `` + } + + if (status == '3') { + //未通过 + html += + `` + html += + `` + } + + return html; + }, + } + ] + ], + }); + } //详情 -function detailsView(id) { - /* $.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()为子页面的方法 - - }, - }); - } - }) */ - - //测试 +function detailsView(yjId, insMonth) { let height = '98%'; - let width = '99%'; - var index = layer.open({ - title: ['月计划详情', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'], - type: 2, - content: './monthPlanDetails.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()为子页面的方法 - - }, - }); + let width = '95%'; + $.ajax({ + type: 'POST', + url: PATH_URL + '/inspectionPlan/getDetails', + contentType: "application/json; charset=utf-8", + data: JSON.stringify({ + "yjId": yjId, + "insMonth": insMonth + }), + success: function(data) { + console.log("data:", data) + var index = layer.open({ + title: ['月计划详情'], + type: 2, + content: './monthPlanDetails.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, yjId, insMonth); //aaa()为子页面的方法 + + }, + }); + } + }) } //审批 -function auditView(id){ +function auditView(yjId, insMonth,id) { let height = '98%'; - let width = '99%'; - var index = layer.open({ - title: ['月计划审核', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'], - type: 2, - content: './monthPlanAudit.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()为子页面的方法 + let width = '95%'; + $.ajax({ + type: 'POST', + url: PATH_URL + '/inspectionPlan/getDetails', + contentType: "application/json; charset=utf-8", + data: JSON.stringify({ + "yjId": yjId, + "insMonth": insMonth + }), + success: function(data) { + var index = layer.open({ + title: ['月计划审核'], + type: 2, + content: './monthPlanAudit.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, yjId, insMonth,id); //aaa()为子页面的方法 - }, - }); -} -//删除 -function delData(id){ - layer.confirm("确定删除吗?", {icon: 0}, function () { - + }, + }); + } }) } +//总公司审批 +function auditTotalView(yjId, insMonth,id) { + let height = '98%'; + let width = '95%'; + $.ajax({ + type: 'POST', + url: PATH_URL + '/inspectionPlan/getDetails', + contentType: "application/json; charset=utf-8", + data: JSON.stringify({ + "yjId": yjId, + "insMonth": insMonth + }), + success: function(data) { + var index = layer.open({ + title: ['月计划审核'], + type: 2, + content: './monthPlanAuditTotal.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, yjId, insMonth,id); //aaa()为子页面的方法 + + }, + }); + } + }) +} + +//导出 +function exportData() { + + let fgsName = $('#fgsName').val(); + let yjName = $('#yjName').val(); + let insMonth = $('#insMonth').val(); + let aiDitStatus = $('#aiDitStatus').val(); + let fgsId = '26' + + window.location.href = PATH_URL + `/inspectionPlan/exportAuditPlanData?token=` + token + + "&fgsName=" + fgsName + + "&yjName=" + yjName + + "&insMonth=" + insMonth + + "&aiDitStatus=" + aiDitStatus + "&fgsId=" + fgsId + + layer.msg('下载中,请稍等', { + icon: 16, + scrollbar: false + }); +} + //导出 -function exportData(){ - // let search1 = $('#search1').val(); - // let search2 = $('#search2').val(); - window.location.href = oiPlanUrl + "/monthlyPlanSubmission/export?token=" + token; +function exportDataDetails(yjId, insMonth) { + window.location.href = PATH_URL + `/inspectionPlan/exportMonthPlanData?token=` + token + + "&insMonth=" + insMonth + + "&yjId=" + yjId + layer.msg('下载中,请稍等', { + icon: 16, + scrollbar: false + }); } \ No newline at end of file diff --git a/hxy-web/js/wireManager/viewPlan/monthPlanDetails.js b/hxy-web/js/wireManager/viewPlan/monthPlanDetails.js index 229cfe1..55baafc 100644 --- a/hxy-web/js/wireManager/viewPlan/monthPlanDetails.js +++ b/hxy-web/js/wireManager/viewPlan/monthPlanDetails.js @@ -1,14 +1,14 @@ var pers = [] -var table,form,laydate -layui.use(['form','layer','table','laydate'], function () { - table = layui.table; - form = layui.form; +var table, form, laydate +layui.use(['form', 'layer', 'table', 'laydate'], function() { + table = layui.table; + form = layui.form; laydate = layui.laydate - - + + init() }); -var yjIds,insMonths; +var yjIds, insMonths; // 静态数据 var tableData = []; @@ -16,92 +16,125 @@ var tableData = []; /** * 初始化数据 */ -function init(){ - // 渲染表格 - table.render({ - elem: '#table', - // url: "/sys/achievement", - // page: true, - skin: 'line', // 表格样式 - cols: [[ - { - title: '序号', - field: 'zizeng', - align: 'center', - type: 'numbers', - width: '5%' - }, - {field:'proName', title: '线路名称',align: 'center'}, - {field:'workContent', title: '工作内容',align: 'center'}, - {field:'stateTime', title: '计划开始时间',align: 'center'}, - {field:'enTime', title: '计划结束时间',align: 'center'}, - {field:'dutyUser', title: '责任人(护线员)',align: 'center'}, - {field:'supervisor', title: '督办人(设备主人)',align: 'center'}, - {field:'complete', title: '完成标准',align: 'center'}, - {field:'remarks', title: '备注',align: 'center'}, - ]], - data: tableData, - done: function(res, curr, count, origin){ - - }, - }); - +function init() { + // 渲染表格 + table.render({ + elem: '#table', + // url: "/sys/achievement", + // page: true, + skin: 'line', // 表格样式 + cols: [ + [{ + title: '序号', + field: 'zizeng', + align: 'center', + type: 'numbers', + width: '5%' + }, + { + field: 'proName', + title: '线路名称', + align: 'center' + }, + { + field: 'workContent', + title: '工作内容', + align: 'center' + }, + { + field: 'stateTime', + title: '计划开始时间', + align: 'center' + }, + { + field: 'enTime', + title: '计划结束时间', + align: 'center' + }, + { + field: 'dutyUser', + title: '责任人(护线员)', + align: 'center' + }, + { + field: 'supervisor', + title: '督办人(设备主人)', + align: 'center' + }, + { + field: 'complete', + title: '完成标准', + align: 'center' + }, + { + field: 'remarks', + title: '备注', + align: 'center' + }, + ] + ], + data: tableData, + done: function(res, curr, count, origin) { + + }, + }); + } -function setData(data,yjId,insMonth){ +function setData(data, yjId, insMonth) { yjIds = yjId; insMonths = insMonth; - if(data.length>0){ + if (data.length > 0) { $('#fgsName').html(data[0].fgsName); $('#yjName').html(data[0].yjName); $('#insMonth').html(data[0].insMonth); - + setAiDitStatus(data[0].aiDitStatus); - - $('#createUser').html(data[0].createUser); - $('#createTime').html(data[0].createTime); - + + $('#createUser').html(data[0].createUser); + $('#createTime').html(data[0].createTime); + //分公司 - if(data[0].aiDitStatuses){ - $('#aiDitStatuses').html(data[0].aiDitStatuses); - $('#auditUserName').html(data[0].auditUserName); - $('#auditTime').html(data[0].auditTime); - }else{ + if (data[0].aiDitStatuses) { + $('#aiDitStatuses').html(data[0].aiDitStatuses); + $('#auditUserName').html(data[0].auditUserName); + $('#auditTime').html(data[0].auditTime); + } else { $('#aiDitStatuses').html(""); - $('#auditUserName').html(""); - $('#auditTime').html(""); + $('#auditUserName').html(""); + $('#auditTime').html(""); } - + //总公司 - if(data[0].aiDitStatusTotal){ + if (data[0].aiDitStatusTotal) { $('#aiDitStatusTotal').html(data[0].aiDitStatusTotal); - $('#auditUserNameTotal').html(data[0].auditUserNameTotal); - $('#auditTimeTotal').html(data[0].auditTimeTotal); - }else{ + $('#auditUserNameTotal').html(data[0].auditUserNameTotal); + $('#auditTimeTotal').html(data[0].auditTimeTotal); + } else { $('#aiDitStatusTotal').html(""); - $('#auditUserNameTotal').html(""); - $('#auditTimeTotal').html(""); + $('#auditUserNameTotal').html(""); + $('#auditTimeTotal').html(""); } - + for (var i = 0; i < data.length; i++) { tableData.push({ id: data[i].id, proName: data[i].proName, - yjId:data[i].yjId, - insMonth:data[i].insMonth, - - workContent:data[i].workContent, - stateTime:data[i].stateTime, - enTime:data[i].enTime, - dutyUser:data[i].dutyUser, - supervisor:data[i].supervisor, - complete:data[i].complete, - remarks:data[i].remarks, - + yjId: data[i].yjId, + insMonth: data[i].insMonth, + + workContent: data[i].workContent, + stateTime: data[i].stateTime, + enTime: data[i].enTime, + dutyUser: data[i].dutyUser, + supervisor: data[i].supervisor, + complete: data[i].complete, + remarks: data[i].remarks, + }) } init(); - }else{ + } else { layer.alert("无数据,请联系管理员", { icon: 2 }); @@ -109,24 +142,24 @@ function setData(data,yjId,insMonth){ } -function setAiDitStatus(status){ +function setAiDitStatus(status) { $("#subComName").empty(); var text; var color; var html = ""; - if(status == '2'){ + if (status == '2') { text = '已通过'; color = '#19BE6B'; } - if(status == '0'){ + if (status == '0') { text = '待审核'; color = '#FF9900'; } - if(status == '3'){ + if (status == '3') { text = '未通过'; color = '#F56C6C'; } - if(status == '1'){ + if (status == '1') { text = '已撤销'; color = '#999999'; } @@ -134,20 +167,20 @@ function setAiDitStatus(status){ html += `  ` html += `${text}` html += "" - + $("#subComName").append(html); } //导出 -function exportData(){ - - - window.location.href = PATH_URL + `/inspectionPlan/exportMonthPlanData?token=` + token - + "&insMonth=" + insMonths - + "&yjId=" + yjIds - - +function exportData() { + + + window.location.href = PATH_URL + `/inspectionPlan/exportMonthPlanData?token=` + token + + "&insMonth=" + insMonths + + "&yjId=" + yjIds + + layer.msg('下载中,请稍等', { icon: 16, scrollbar: false diff --git a/hxy-web/js/wireManager/viewPlan/viewPlanList.js b/hxy-web/js/wireManager/viewPlan/viewPlanList.js index 68602ef..8a754cb 100644 --- a/hxy-web/js/wireManager/viewPlan/viewPlanList.js +++ b/hxy-web/js/wireManager/viewPlan/viewPlanList.js @@ -121,7 +121,6 @@ function init(){ var yjId= d.yjId; var insMonth= d.insMonth; var status = d.aiDitStatus; - var status = d.aiDitStatus; var text; var html = ""; if(status == '2'){ @@ -173,7 +172,7 @@ function detailsView(yjId,insMonth) { var index = layer.open({ - title: ['详情'], + title: ['月计划详情'], type: 2, content: './monthPlanDetails.html', area: [width, height], @@ -201,7 +200,7 @@ function revokeView(yjId,insMonth){ success: function (data) { layer.close(index); if (data.code == 200) { - layer.confirm("撤销成功", {icon: 1}, function () { + layer.msg("撤销成功", {icon: 1}, function () { table.reload('layui_table', { where: { yjId:yjId,