diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..5beb781 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/hxy-web/html/dataStatistics/viewPlan/monthPlanAuditTotal.html b/hxy-web/html/dataStatistics/viewPlan/monthPlanAuditTotal.html new file mode 100644 index 0000000..531f67d --- /dev/null +++ b/hxy-web/html/dataStatistics/viewPlan/monthPlanAuditTotal.html @@ -0,0 +1,242 @@ + + + + + 月计划审核 + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + 月护线员工作计划 +
+
+
+
+
+ + +
+
+
+
+
+
提交
+
+ +
+
+
+
+
+ 分公司审核 +
+
+
+
+ +
+
+
+
+
+ 总公司审核 +
+
+
+
+ +
+
+
+
+ +
+ + +
+
+ + +
+
+
+
+ + \ No newline at end of file diff --git a/hxy-web/html/dataStatistics/viewPlan/noPassReasonTotal.html b/hxy-web/html/dataStatistics/viewPlan/noPassReasonTotal.html new file mode 100644 index 0000000..9aff6a4 --- /dev/null +++ b/hxy-web/html/dataStatistics/viewPlan/noPassReasonTotal.html @@ -0,0 +1,49 @@ + + + + + 分公司-审核不通过 + + + + + + + + + + + + +
+
+
+
+ +
+ +
+ 已输入  + 0 + /300 +
+
+ +
+
+ + + + +
+
+ + \ No newline at end of file diff --git a/hxy-web/js/dataStatistics/viewPlan/monthPlanAuditTotal.js b/hxy-web/js/dataStatistics/viewPlan/monthPlanAuditTotal.js new file mode 100644 index 0000000..614de13 --- /dev/null +++ b/hxy-web/js/dataStatistics/viewPlan/monthPlanAuditTotal.js @@ -0,0 +1,256 @@ +var pers = [] +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', + 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() { + // 加载提示 + let loadingMsg = layer.msg('数据上传中,请稍候...', { + icon: 16, + scrollbar: false, + time: 0, + shade: [0.8, '#393D49'] + }); + // form请求地址 + let formUrl = PATH_URL + "/inspectionPlan/updateTotalExamine"; + $.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() { + let height = '65%'; + 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']]; + var fnc = myIframe.setData(yjIds, insMonths, ids); //aaa()为子页面的方法 + }, + }); +} \ No newline at end of file diff --git a/hxy-web/js/dataStatistics/viewPlan/noPassReasonTotal.js b/hxy-web/js/dataStatistics/viewPlan/noPassReasonTotal.js new file mode 100644 index 0000000..47b95a8 --- /dev/null +++ b/hxy-web/js/dataStatistics/viewPlan/noPassReasonTotal.js @@ -0,0 +1,79 @@ +//全局的页面遮盖 +let loadingMsg; +var startWorkFiles = {}; +var upload; +var id; +var formData; + +var yjIds, insMonths, ids; + +function setData(yjId, insMonth, id) { + yjIds = yjId; + insMonths = insMonth; + ids = id; + layui.use(['form', 'layer', 'table', 'laydate'], function() { + let form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功 + form.render(); + + $("#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/updateTotalExamine"; + + 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 + }); + } + }); + + }); + }); +} + + + +//设置弹窗关闭 +function reloading() { + var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引 + parent.layer.close(index); //再执行关闭 + window.parent.location.reload(); +} \ No newline at end of file