巡视计划
This commit is contained in:
parent
1feec7655c
commit
29d899caa1
|
|
@ -3,13 +3,14 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>护线员考勤</title>
|
||||
<script src="../../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../../js/public/jq.js"></script>
|
||||
<script src="../../../js/public/public.js"></script>
|
||||
<script src="../../../js/public/public_utils.js"></script>
|
||||
<script src="../../../js/public/aescbc.js"></script>
|
||||
<script src="../../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../../plugs/layui-v2.9.2/layui/layui.js"></script>
|
||||
<link href="../../../plugs/layui-v2.9.2/layui/css/layui.css" rel="stylesheet">
|
||||
<script src="../../../util/Interceptor.js"></script>
|
||||
<!-- <script src="../../../util/Interceptor.js"></script> -->
|
||||
<!--业务js-->
|
||||
<script src="../../../js/wireManager/viewPlan/addMonthPlan.js"></script>
|
||||
|
||||
|
|
@ -167,8 +168,13 @@
|
|||
<div>
|
||||
<img src="../../../image/deliverCardIcon.png" height="60px"/>
|
||||
<div>
|
||||
<div id="planName">运检一公司昆明运检一站 2024-03 月护线员工作计划</div>
|
||||
<div id="subComName">● 待审核</div>
|
||||
<div id="planName">
|
||||
<span id="fgsName"></span>
|
||||
<span id="yjName"></span>
|
||||
<span id="insMonth" style="color: #409EFF;"></span>
|
||||
月护线员工作计划
|
||||
</div>
|
||||
<!-- <div id="subComName">● 待审核</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
|
@ -176,14 +182,14 @@
|
|||
<i class="layui-icon layui-icon-list"></i>
|
||||
提交计划
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-primary" onclick="revokeMonthPlan()">
|
||||
<!-- <button class="layui-btn layui-btn-primary" onclick="revokeMonthPlan()">
|
||||
<i class="layui-icon layui-icon-refresh-1"></i>
|
||||
撤销计划
|
||||
</button>
|
||||
</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="background-color: #F0F2F5 !important;width: 98%;height: 74%;overflow: auto;flex-direction: column;margin: 0 auto;background-color: #FFFFFF;border-radius: 10px;padding: 10px;">
|
||||
<div class="overview">
|
||||
<!-- <div class="overview" >
|
||||
<div>
|
||||
<div class="planAuditStatus1">提交</div>
|
||||
<div style="text-align: center;">
|
||||
|
|
@ -214,7 +220,7 @@
|
|||
<div class="chargePerson3">总公司</div>
|
||||
<div class="planStatus3">待处理</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>护线员考勤</title>
|
||||
<script src="../../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../../js/public/jq.js"></script>
|
||||
<script src="../../../js/public/public.js"></script>
|
||||
<script src="../../../js/public/public_utils.js"></script>
|
||||
<script src="../../../js/public/aescbc.js"></script>
|
||||
<script src="../../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../../plugs/layui-v2.9.2/layui/layui.js"></script>
|
||||
<link href="../../../plugs/layui-v2.9.2/layui/css/layui.css" rel="stylesheet">
|
||||
<script src="../../../util/Interceptor.js"></script>
|
||||
<!--业务js-->
|
||||
<script src="../../../js/wireManager/viewPlan/monthPlanDetails.js"></script>
|
||||
|
||||
|
|
@ -165,12 +165,17 @@
|
|||
<div>
|
||||
<img src="../../../image/deliverCardIcon.png" height="60px"/>
|
||||
<div>
|
||||
<div id="planName">运检一公司昆明运检一站 2024-03 月护线员工作计划</div>
|
||||
<div id="subComName">● 待审核</div>
|
||||
<div id="planName">
|
||||
<span id="fgsName"></span>
|
||||
<span id="yjName"></span>
|
||||
<span id="insMonth" style="color: #409EFF;"></span>
|
||||
月护线员工作计划
|
||||
</div>
|
||||
<div id="subComName"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button class="layui-btn layui-bg-blue" onclick="exporData()">
|
||||
<button class="layui-btn layui-bg-blue" onclick="exportData()">
|
||||
<i class="layui-icon"></i>
|
||||
导出
|
||||
</button>
|
||||
|
|
@ -183,30 +188,30 @@
|
|||
<div style="text-align: center;">
|
||||
<img class="chargePersonIcon1" src="../../../image/userIcon.png">
|
||||
</div>
|
||||
<div class="chargePerson1">李小萌</div>
|
||||
<div class="planStatus1">2024-03-25 23:26:08</div>
|
||||
<div class="chargePerson1" id="createUser"></div>
|
||||
<div class="planStatus1" id="createTime"></div>
|
||||
</div>
|
||||
<div class="comAuditLine">
|
||||
分公司审核
|
||||
</div>
|
||||
<div>
|
||||
<div class="planAuditStatus2">审核通过</div>
|
||||
<div class="planAuditStatus2" id="aiDitStatuses"></div>
|
||||
<div style="text-align: center;">
|
||||
<img class="chargePersonIcon2" src="../../../image/userIcon.png">
|
||||
</div>
|
||||
<div class="chargePerson2">李小刚</div>
|
||||
<div class="planStatus2">2024-03-25 23:26:08</div>
|
||||
<div class="chargePerson2" id="auditUserName"></div>
|
||||
<div class="planStatus2" id="auditTime"></div>
|
||||
</div>
|
||||
<div class="totalAuditLine">
|
||||
总公司审核
|
||||
</div>
|
||||
<div>
|
||||
<div class="planAuditStatus3">完结</div>
|
||||
<div class="planAuditStatus3" id="aiDitStatusTotal"></div>
|
||||
<div style="text-align: center;">
|
||||
<img class="chargePersonIcon3" src="../../../image/userIcon.png">
|
||||
</div>
|
||||
<div class="chargePerson3">总公司</div>
|
||||
<div class="planStatus3">待处理</div>
|
||||
<div class="chargePerson3" id="auditUserNameTotal"></div>
|
||||
<div class="planStatus3" id="auditTimeTotal"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,13 +3,14 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>护线员考勤</title>
|
||||
<script src="../../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../../js/public/jq.js"></script>
|
||||
<script src="../../../js/public/public.js"></script>
|
||||
<script src="../../../js/public/public_utils.js"></script>
|
||||
<script src="../../../js/public/aescbc.js"></script>
|
||||
<script src="../../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../../plugs/layui-v2.9.2/layui/layui.js"></script>
|
||||
<link href="../../../plugs/layui-v2.9.2/layui/css/layui.css" rel="stylesheet">
|
||||
<script src="../../../util/Interceptor.js"></script>
|
||||
<!-- <script src="../../../util/Interceptor.js"></script> -->
|
||||
<!--业务js-->
|
||||
<script src="../../../js/wireManager/viewPlan/monthPlanImport.js"></script>
|
||||
<!-- css -->
|
||||
|
|
@ -27,7 +28,7 @@
|
|||
<div style="color: #333333;font-size: 16px;margin-top: 2%;">填写导入数据信息</div>
|
||||
<div style="color: #999999;margin-top: 0.6%;">请按照数据模板的格式准备导入数据,模板中的表头名称不可更改,表头行不能删除。</div>
|
||||
<div style="margin-top: 1%;">
|
||||
<a id="tempId" href="../../../../downloads/导入模版.xlsx" download="导入模版.xlsx" style="color: #409EFF;">下载模板</a>
|
||||
<a id="tempId" href="../../../templateDown/导入上传月计划模板.xlsx" download="导入上传月计划模板.xlsx" style="color: #409EFF;">下载模板</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3,13 +3,14 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>特巡结果上传</title>
|
||||
<script src="../../../js/public/public.js"></script>
|
||||
<script src="../../../js/public/public_utils.js"></script>
|
||||
<script src="../../../js/public/aescbc.js"></script>
|
||||
<script src="../../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../../plugs/layui-v2.9.2/layui/layui.js"></script>
|
||||
<link href="../../../plugs/layui-v2.9.2/layui/css/layui.css" rel="stylesheet">
|
||||
<script src="../../../util/Interceptor.js"></script>
|
||||
<script src="../../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../../js/public/jq.js"></script>
|
||||
<script src="../../../js/public/public.js"></script>
|
||||
<script src="../../../js/public/public_utils.js"></script>
|
||||
<script src="../../../js/public/aescbc.js"></script>
|
||||
<script src="../../../plugs/layui-v2.9.2/layui/layui.js"></script>
|
||||
<link href="../../../plugs/layui-v2.9.2/layui/css/layui.css" rel="stylesheet">
|
||||
<!-- <script src="../../../util/Interceptor.js"></script> -->
|
||||
<script src="../../../js/wireManager/viewPlan/revokeMonthPlan.js"></script>
|
||||
<style type="text/css">
|
||||
button{
|
||||
|
|
|
|||
|
|
@ -3,21 +3,23 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>护线员考勤</title>
|
||||
<script src="../../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../../js/public/jq.js"></script>
|
||||
<script src="../../../js/public/public.js"></script>
|
||||
<script src="../../../js/public/public_utils.js"></script>
|
||||
<script src="../../../js/public/aescbc.js"></script>
|
||||
<script src="../../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../../plugs/layui-v2.9.2/layui/layui.js"></script>
|
||||
<link href="../../../plugs/layui-v2.9.2/layui/css/layui.css" rel="stylesheet">
|
||||
<script src="../../../util/Interceptor.js"></script>
|
||||
<link href="../../../plugs/layui-v2.9.2/layui/css/layui.css" rel="stylesheet">
|
||||
<!-- <script src="../../../util/Interceptor.js"></script> -->
|
||||
<!--业务js-->
|
||||
<script src="../../../js/wireManager/viewPlan/updateMonthPlan.js"></script>
|
||||
|
||||
<!-- css -->
|
||||
<!-- <link type="text/css" media="screen" href="../../../css/dataTable.css" rel="stylesheet"> -->
|
||||
<!-- css -->
|
||||
<!-- <link type="text/css" media="screen" href="../../../css/dataTable.css" rel="stylesheet"> -->
|
||||
|
||||
<style>
|
||||
body,html {
|
||||
body,
|
||||
html {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
|
|
@ -25,7 +27,8 @@
|
|||
float: left;
|
||||
background-color: #F0F2F5;
|
||||
}
|
||||
.title{
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
|
@ -34,27 +37,33 @@
|
|||
margin-bottom: 14px;
|
||||
height: 16.4%;
|
||||
}
|
||||
.title>div{
|
||||
|
||||
.title>div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.title>div:nth-child(1){
|
||||
|
||||
.title>div:nth-child(1) {
|
||||
margin-left: 40px;
|
||||
}
|
||||
#planName{
|
||||
|
||||
#planName {
|
||||
color: #666666;
|
||||
font-size: 18px;
|
||||
font-weight: 800;
|
||||
margin-left: 20px;
|
||||
}
|
||||
#subComName{
|
||||
|
||||
#subComName {
|
||||
margin-left: 20px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.title>div:nth-child(2){
|
||||
|
||||
.title>div:nth-child(2) {
|
||||
margin-right: 40px;
|
||||
}
|
||||
.overview{
|
||||
|
||||
.overview {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
|
@ -62,79 +71,87 @@
|
|||
border-radius: 10px;
|
||||
padding: 30px 0 30px 0;
|
||||
}
|
||||
|
||||
.overview>div:nth-child(1),
|
||||
.overview>div:nth-child(3),
|
||||
.overview>div:nth-child(5){
|
||||
.overview>div:nth-child(5) {
|
||||
width: 158px;
|
||||
}
|
||||
|
||||
.planAuditStatus1,
|
||||
.planAuditStatus2,
|
||||
.planAuditStatus3{
|
||||
.planAuditStatus3 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.chargePersonIcon1,
|
||||
.chargePersonIcon2,
|
||||
.chargePersonIcon3{
|
||||
.chargePersonIcon3 {
|
||||
margin-top: 10px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.chargePerson1,
|
||||
.chargePerson2,
|
||||
.chargePerson3{
|
||||
.chargePerson3 {
|
||||
margin-top: 10px;
|
||||
color:#666666;
|
||||
color: #666666;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.planStatus1,
|
||||
.planStatus2,
|
||||
.planStatus3{
|
||||
.planStatus3 {
|
||||
margin-top: 15px;
|
||||
color:#999999;
|
||||
color: #999999;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.comAuditLine{
|
||||
|
||||
.comAuditLine {
|
||||
width: 480px;
|
||||
text-align: center;
|
||||
border-bottom: 4px solid #19BE6B;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
.totalAuditLine{
|
||||
|
||||
.totalAuditLine {
|
||||
width: 480px;
|
||||
text-align: center;
|
||||
border-bottom: 4px solid #409EFF;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
/* 滚动槽 */
|
||||
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
-webkit-box-shadow: inset 0 0 5px #e8eceb;
|
||||
border-radius: 5px;
|
||||
-webkit-box-shadow: inset 0 0 5px #e8eceb;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
|
||||
/* 滚动条滑块 */
|
||||
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 10px;
|
||||
background: #ffffff;
|
||||
-webkit-box-shadow: inset 0 0 6px #cbb7b7;
|
||||
border-radius: 10px;
|
||||
background: #ffffff;
|
||||
-webkit-box-shadow: inset 0 0 6px #cbb7b7;
|
||||
}
|
||||
|
||||
|
||||
::-webkit-scrollbar-thumb:window-inactive {
|
||||
background: #e8eceb;
|
||||
background: #e8eceb;
|
||||
}
|
||||
|
||||
|
||||
::-webkit-scrollbar-corner {
|
||||
background-color: #e8eceb;
|
||||
// 颜色
|
||||
background-color: #e8eceb;
|
||||
// 颜色
|
||||
}
|
||||
.planAuditStatus1{
|
||||
|
||||
.planAuditStatus1 {
|
||||
color: #ffffff;
|
||||
height: 30px;
|
||||
padding-top: 5px;
|
||||
|
|
@ -142,7 +159,8 @@
|
|||
background-size: 50% 100%;
|
||||
background-position: center;
|
||||
}
|
||||
.planAuditStatus2{
|
||||
|
||||
.planAuditStatus2 {
|
||||
color: #ffffff;
|
||||
height: 30px;
|
||||
padding-top: 5px;
|
||||
|
|
@ -150,7 +168,8 @@
|
|||
background-size: 50% 100%;
|
||||
background-position: center;
|
||||
}
|
||||
.planAuditStatus3{
|
||||
|
||||
.planAuditStatus3 {
|
||||
color: #ffffff;
|
||||
height: 30px;
|
||||
padding-top: 5px;
|
||||
|
|
@ -160,13 +179,18 @@
|
|||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<body>
|
||||
<div class="title">
|
||||
<div>
|
||||
<img src="../../../image/deliverCardIcon.png" height="60px"/>
|
||||
<img src="../../../image/deliverCardIcon.png" height="60px" />
|
||||
<div>
|
||||
<div id="planName">运检一公司昆明运检一站 2024-03 月护线员工作计划</div>
|
||||
<div id="subComName">● 待审核</div>
|
||||
<div id="planName">
|
||||
<span id="fgsName"></span>
|
||||
<span id="yjName"></span>
|
||||
<span id="insMonth" style="color: #409EFF;"></span>
|
||||
月护线员工作计划
|
||||
</div>
|
||||
<div id="subComName"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
|
@ -180,15 +204,16 @@
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div style="background-color: #F0F2F5 !important;width: 98%;height: 74%;overflow: auto;flex-direction: column;margin: 0 auto;background-color: #FFFFFF;border-radius: 10px;padding: 10px;">
|
||||
<div
|
||||
style="background-color: #F0F2F5 !important;width: 98%;height: 74%;overflow: auto;flex-direction: column;margin: 0 auto;background-color: #FFFFFF;border-radius: 10px;padding: 10px;">
|
||||
<div class="overview">
|
||||
<div>
|
||||
<div class="planAuditStatus1">提交</div>
|
||||
<div style="text-align: center;">
|
||||
<img class="chargePersonIcon1" src="../../../image/userIcon.png">
|
||||
</div>
|
||||
<div class="chargePerson1">李小萌</div>
|
||||
<div class="planStatus1">2024-03-25 23:26:08</div>
|
||||
<div class="chargePerson1" id="createUser"></div>
|
||||
<div class="planStatus1" id="createTime"></div>
|
||||
</div>
|
||||
<div class="comAuditLine">
|
||||
分公司审核
|
||||
|
|
@ -198,23 +223,23 @@
|
|||
<div style="text-align: center;">
|
||||
<img class="chargePersonIcon2" src="../../../image/userIcon.png">
|
||||
</div>
|
||||
<div class="chargePerson2">李小刚</div>
|
||||
<div class="planStatus2">2024-03-25 23:26:08</div>
|
||||
<div class="chargePerson2" id="auditUserName"></div>
|
||||
<div class="planStatus2" id="auditTime"></div>
|
||||
</div>
|
||||
<div class="totalAuditLine">
|
||||
总公司审核
|
||||
</div>
|
||||
<div>
|
||||
<div class="planAuditStatus3">完结</div>
|
||||
<div class="planAuditStatus3" id="aiDitStatusTotal"></div>
|
||||
<div style="text-align: center;">
|
||||
<img class="chargePersonIcon3" src="../../../image/userIcon.png">
|
||||
</div>
|
||||
<div class="chargePerson3">总公司</div>
|
||||
<div class="planStatus3">待处理</div>
|
||||
<div class="chargePerson3" id="auditUserNameTotal"></div>
|
||||
<div class="planStatus3" id="auditTimeTotal"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div>
|
||||
<div class="widget-body no-padding">
|
||||
<table id="table" class="layui-table" lay-skin="row" style="width:100%;white-space: nowrap;">
|
||||
|
|
@ -222,6 +247,6 @@
|
|||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -3,14 +3,14 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>巡视计划</title>
|
||||
<script src="../../../js/public/token.js"></script>
|
||||
<script src="../../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../../js/public/jq.js"></script>
|
||||
<script src="../../../js/public/public.js"></script>
|
||||
<script src="../../../js/public/public_utils.js"></script>
|
||||
<script src="../../../js/public/aescbc.js"></script>
|
||||
<script src="../../../plugs/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../../plugs/layui-v2.9.2/layui/layui.js"></script>
|
||||
<link href="../../../plugs/layui-v2.9.2/layui/css/layui.css" rel="stylesheet">
|
||||
<script src="../../../util/Interceptor.js"></script>
|
||||
<!-- <script src="../../../util/Interceptor.js"></script> -->
|
||||
<!--业务js-->
|
||||
<script src="../../../js/wireManager/viewPlan/viewPlanList.js"></script>
|
||||
|
||||
|
|
@ -34,31 +34,26 @@
|
|||
<div class="form-group" style="margin-top: 0.5%">
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<input id="search1" type="text" class="layui-input" placeholder="输入分公司" >
|
||||
<input id="insMonth" readonly name="insMonth" type="text" class="layui-input" placeholder="请选择月份">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<input id="search2" type="text" class="layui-input" placeholder="输入工作站" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<input id="dataTime" name="dataTime" type="text" class="layui-input" placeholder="请选择月份">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<select id="proId" name="proId" class="layui-select" lay-verify="required">
|
||||
<option value="" selected>审核状态</option>
|
||||
<select id="aiDitStatus" name="aiDitStatus" class="layui-select" >
|
||||
<option value="" >全部状态</option>
|
||||
<option value="2" >已通过</option>
|
||||
<option value="3" >未通过</option>
|
||||
<option value="0" >待审核</option>
|
||||
<option value="1" >已撤销</option>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<button class="layui-btn layui-btn-sm" lay-submit lay-filter="query">
|
||||
<button class="layui-btn layui-btn-sm" onclick="queryClick()">
|
||||
<i class="layui-icon layui-icon-search"></i>
|
||||
查询
|
||||
</button>
|
||||
<button id="reset" type="button" class="layui-btn layui-btn-sm layui-btn-primary">
|
||||
<button id="reset" type="button" class="layui-btn layui-btn-sm layui-btn-primary" onclick="resetClick()">
|
||||
<i class="layui-icon layui-icon-refresh"></i>
|
||||
重置
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -1,179 +1,242 @@
|
|||
|
||||
|
||||
var pers = []
|
||||
var table,form,laydate
|
||||
layui.use(['form','layer','table','laydate'], function () {
|
||||
table = layui.table;
|
||||
form = layui.form;
|
||||
laydate = layui.laydate
|
||||
|
||||
|
||||
|
||||
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();
|
||||
|
||||
});
|
||||
var table, form, laydate
|
||||
|
||||
// 静态数据
|
||||
var tableData = [
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
];
|
||||
function setYjId(yjId) {
|
||||
layui.use(['form', 'layer', 'table', 'laydate'], function() {
|
||||
table = layui.table;
|
||||
form = layui.form;
|
||||
laydate = layui.laydate
|
||||
dataTable(yjId);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 静态数据
|
||||
var tableData = [
|
||||
|
||||
];
|
||||
|
||||
function dataTable(yjId) {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
async: false, // 默认异步true,false表示同步
|
||||
url: PATH_URL + '/inspectionPlan/getInspectionPlanList',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify({
|
||||
"yjId": yjId
|
||||
}), //获取提交的表单字段
|
||||
dataType: 'json', // 服务器返回数据类型
|
||||
success: function(data) {
|
||||
if (data.code == 200) {
|
||||
$('#fgsName').html(data.data[0].fgsName);
|
||||
$('#yjName').html(data.data[0].yjName);
|
||||
$('#insMonth').html(data.data[0].insMonth);
|
||||
|
||||
for (var i = 0; i < data.data.length; i++) {
|
||||
tableData.push({
|
||||
id: data.data[i].id,
|
||||
proName: data.data[i].proName,
|
||||
yjId:data.data[i].yjId,
|
||||
insMonth:data.data[i].insMonth
|
||||
})
|
||||
}
|
||||
} else {
|
||||
layer.alert(data.msg, {
|
||||
icon: 2
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, e) {
|
||||
top.layer.close(loadingMsg);
|
||||
layer.msg('数据请求发生异常,请稍后重试', {
|
||||
icon: 16,
|
||||
scrollbar: false
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
init();
|
||||
}
|
||||
/**
|
||||
* 初始化数据
|
||||
*/
|
||||
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',width: '15%'},
|
||||
{
|
||||
field: '',
|
||||
title: '工作内容',
|
||||
align: 'center',
|
||||
templet: function(d){
|
||||
var id = d.id
|
||||
var html = `<input class="workContent layui-input" key="${id}" type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return 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: 'proName',
|
||||
title: '线路名称',
|
||||
align: 'center',
|
||||
width: '15%',
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '工作内容',
|
||||
align: 'center',
|
||||
templet: function(d) {
|
||||
var id = d.id;
|
||||
var yjId = d.yjId;
|
||||
var proName = d.proName;
|
||||
var insMonth = d.insMonth;
|
||||
var html =
|
||||
`<input class="workContent layui-input" maxlength="500" key="${id}" yjId="${yjId}" proName="${proName}" insMonth="${insMonth}" type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '计划开始时间',
|
||||
align: 'center',
|
||||
templet: function(d) {
|
||||
var id = d.id
|
||||
var html =
|
||||
`<input class="planStartTime layui-input" key="${id}" readonly type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '计划结束时间',
|
||||
align: 'center',
|
||||
templet: function(d) {
|
||||
var id = d.id
|
||||
var html =
|
||||
`<input class="planEndTime layui-input" key="${id}" readonly type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '责任人(护线员)',
|
||||
align: 'center',
|
||||
templet: function(d) {
|
||||
var id = d.id
|
||||
var html =
|
||||
`<input class="liablePerson layui-input" maxlength="200" key="${id}" type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '督办人(设备主人)',
|
||||
align: 'center',
|
||||
templet: function(d) {
|
||||
var id = d.id
|
||||
var html =
|
||||
`<input class="proctorPerson layui-input" maxlength="200" key="${id}" type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '完成标准',
|
||||
align: 'center',
|
||||
templet: function(d) {
|
||||
var id = d.id
|
||||
var html =
|
||||
`<input class="standard layui-input" maxlength="500" key="${id}" type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '备注',
|
||||
align: 'center',
|
||||
templet: function(d) {
|
||||
var id = d.id
|
||||
var html =
|
||||
`<input class="remark layui-input" maxlength="500" key="${id}" type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
}
|
||||
]
|
||||
],
|
||||
data: tableData,
|
||||
done: function(res, curr, count, origin) {
|
||||
// 初始化开始时间和结束时间的变量
|
||||
var startDate = null;
|
||||
var endDate = null;
|
||||
laydate.render({
|
||||
elem: '.planStartTime',
|
||||
done: function(value, date, time) {
|
||||
// 将laydate的日期对象转换为原生Date对象
|
||||
startDate = new Date(date.year, date.month - 1, date.date, date.hours, date
|
||||
.minutes, date.seconds);
|
||||
|
||||
// 确保结束时间不早于开始时间
|
||||
if (startDate && endDate) {
|
||||
if (endDate.getTime() < startDate.getTime()) {
|
||||
// 清空结束时间
|
||||
// 清除DOM元素的值
|
||||
$(this.elem).val('');
|
||||
// 重置endDate变量
|
||||
endDate = null;
|
||||
layer.msg('结束时间不能早于开始时间!');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
laydate.render({
|
||||
elem: '.planEndTime',
|
||||
done: function(value, date, time) {
|
||||
// 将laydate的日期对象转换为原生Date对象
|
||||
endDate = new Date(date.year, date.month - 1, date.date, date.hours, date
|
||||
.minutes, date.seconds);
|
||||
|
||||
// 确保结束时间不早于开始时间
|
||||
if (startDate && endDate) {
|
||||
if (endDate.getTime() < startDate.getTime()) {
|
||||
// 清空结束时间
|
||||
// 清除DOM元素的值
|
||||
$(this.elem).val('');
|
||||
// 重置endDate变量
|
||||
endDate = null;
|
||||
layer.msg('结束时间不能早于开始时间!');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '计划开始时间',
|
||||
align: 'center',
|
||||
templet: function(d){
|
||||
var id = d.id
|
||||
var html = `<input class="planStartTime layui-input" key="${id}" readonly type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '计划结束时间',
|
||||
align: 'center',
|
||||
templet: function(d){
|
||||
var id = d.id
|
||||
var html = `<input class="planEndTime layui-input" key="${id}" readonly type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '责任人(护线员)',
|
||||
align: 'center',
|
||||
templet: function(d){
|
||||
var id = d.id
|
||||
var html = `<input class="liablePerson layui-input" key="${id}" type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '督办人(设备主人)',
|
||||
align: 'center',
|
||||
templet: function(d){
|
||||
var id = d.id
|
||||
var html = `<input class="proctorPerson layui-input" key="${id}" type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '完成标准',
|
||||
align: 'center',
|
||||
templet: function(d){
|
||||
var id = d.id
|
||||
var html = `<input class="standard layui-input" key="${id}" type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '备注',
|
||||
align: 'center',
|
||||
templet: function(d){
|
||||
var id = d.id
|
||||
var html = `<input class="remark layui-input" key="${id}" type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
}
|
||||
]],
|
||||
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 saveMonthPlan(){
|
||||
function saveMonthPlan() {
|
||||
//获取工作内容 DOM
|
||||
var workContents = $(".workContent");
|
||||
//获取计划开始时间 DOM
|
||||
var planStartTimes = $(".planStartTime");
|
||||
var planStartTimes = $(".planStartTime");
|
||||
//获取计划结束时间 DOM
|
||||
var planEndTimes = $(".planEndTime");
|
||||
var planEndTimes = $(".planEndTime");
|
||||
//获取责任人(护线员) DOM
|
||||
var liablePersons = $(".liablePerson");
|
||||
var liablePersons = $(".liablePerson");
|
||||
//获取督办人(设备主人) DOM
|
||||
var proctorPersons = $(".proctorPerson");
|
||||
var proctorPersons = $(".proctorPerson");
|
||||
//获取完成标准 DOM
|
||||
var standards = $(".standard");
|
||||
var standards = $(".standard");
|
||||
//获取备注 DOM
|
||||
var remarks = $(".remark");
|
||||
|
||||
|
||||
var arr = [];
|
||||
//循环获取的 DOM,将数据整合
|
||||
for (var i = 0; i < workContents.length; i++) {
|
||||
//获取此行数据 的id
|
||||
var id = $(workContents[i]).attr("key");
|
||||
var yjId = $(workContents[i]).attr("yjId");
|
||||
var proName = $(workContents[i]).attr("proName");
|
||||
var insMonth = $(workContents[i]).attr("insMonth");
|
||||
|
||||
//获取工作内容
|
||||
var workContent = $(workContents[i]).val();
|
||||
//获取计划开始时间
|
||||
|
|
@ -188,75 +251,138 @@ function saveMonthPlan(){
|
|||
var standard = $(standards[i]).val();
|
||||
//获取备注
|
||||
var remark = $(remarks[i]).val();
|
||||
|
||||
if(workContent == ""){
|
||||
layer.msg("请填写工作内容", {icon: 0});
|
||||
|
||||
if (workContent == "") {
|
||||
layer.msg("请填写工作内容", {
|
||||
icon: 0
|
||||
});
|
||||
$(workContents[i]).focus();
|
||||
return;
|
||||
}
|
||||
if(planStartTime == ""){
|
||||
layer.msg("请填写计划开始时间", {icon: 0});
|
||||
if (planStartTime == "") {
|
||||
layer.msg("请填写计划开始时间", {
|
||||
icon: 0
|
||||
});
|
||||
$(planStartTimes[i]).focus();
|
||||
return;
|
||||
}
|
||||
if(planEndTime == ""){
|
||||
layer.msg("请填写计划结束时间", {icon: 0});
|
||||
if (planEndTime == "") {
|
||||
layer.msg("请填写计划结束时间", {
|
||||
icon: 0
|
||||
});
|
||||
$(planEndTimes[i]).focus();
|
||||
return;
|
||||
}
|
||||
if(liablePerson == ""){
|
||||
layer.msg("请填写责任人(护线员)", {icon: 0});
|
||||
if (liablePerson == "") {
|
||||
layer.msg("请填写责任人(护线员)", {
|
||||
icon: 0
|
||||
});
|
||||
$(liablePersons[i]).focus();
|
||||
return;
|
||||
}
|
||||
if(proctorPerson == ""){
|
||||
layer.msg("请填写督办人(设备主人)", {icon: 0});
|
||||
if (proctorPerson == "") {
|
||||
layer.msg("请填写督办人(设备主人)", {
|
||||
icon: 0
|
||||
});
|
||||
$(proctorPersons[i]).focus();
|
||||
return;
|
||||
}
|
||||
if(standard == ""){
|
||||
layer.msg("请填写完成标准", {icon: 0});
|
||||
if (standard == "") {
|
||||
layer.msg("请填写完成标准", {
|
||||
icon: 0
|
||||
});
|
||||
$(standards[i]).focus();
|
||||
return;
|
||||
}
|
||||
if(remark == ""){
|
||||
layer.msg("请填写备注", {icon: 0});
|
||||
if (remark == "") {
|
||||
layer.msg("请填写备注", {
|
||||
icon: 0
|
||||
});
|
||||
$(remarks[i]).focus();
|
||||
return;
|
||||
}
|
||||
|
||||
var json = {
|
||||
"id": id,
|
||||
"proId": id,
|
||||
"yjId": yjId,
|
||||
"proName": proName,
|
||||
"workContent": workContent,
|
||||
"planStartTime": planStartTime,
|
||||
"planEndTime": planEndTime,
|
||||
"liablePerson": liablePerson,
|
||||
"proctorPerson": proctorPerson,
|
||||
"standard": standard,
|
||||
"remark": remark
|
||||
"stateTime": planStartTime,
|
||||
"enTime": planEndTime,
|
||||
"dutyUser": liablePerson,
|
||||
"supervisor": proctorPerson,
|
||||
"complete": standard,
|
||||
"remarks": remark,
|
||||
"insMonth":insMonth
|
||||
}
|
||||
arr.push(json);
|
||||
console.log(arr)
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 加载提示
|
||||
let loadingMsg = layer.msg('数据上传中,请稍候...', {
|
||||
icon: 16,
|
||||
scrollbar: false,
|
||||
time: 0,
|
||||
shade: [0.8, '#393D49']
|
||||
});
|
||||
// form请求地址
|
||||
let formUrl = PATH_URL + "/inspectionPlan/insertInspectionPlan";
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: formUrl, // 请求地址
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify(arr),
|
||||
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 revokeMonthPlan(){
|
||||
function revokeMonthPlan() {
|
||||
let height = '60%';
|
||||
let width = '40%';
|
||||
var index = layer.open({
|
||||
title: ['计划撤销', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
content: './revokeMonthPlan.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: './revokeMonthPlan.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()为子页面的方法
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭页面 刷新页面
|
||||
*/
|
||||
function reloading() {
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
window.parent.location.reload();
|
||||
}
|
||||
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
var pers = []
|
||||
var table,form,laydate
|
||||
layui.use(['form','layer','table','laydate'], function () {
|
||||
|
|
@ -7,39 +5,14 @@ layui.use(['form','layer','table','laydate'], function () {
|
|||
form = layui.form;
|
||||
laydate = layui.laydate
|
||||
|
||||
init();
|
||||
|
||||
});
|
||||
|
||||
// 静态数据
|
||||
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: '备注'},
|
||||
];
|
||||
|
||||
|
||||
init()
|
||||
});
|
||||
var yjIds,insMonths;
|
||||
|
||||
// 静态数据
|
||||
var tableData = [];
|
||||
|
||||
/**
|
||||
* 初始化数据
|
||||
*/
|
||||
|
|
@ -58,36 +31,125 @@ function init(){
|
|||
type: 'numbers',
|
||||
width: '5%'
|
||||
},
|
||||
{field:'lineName', title: '线路名称',align: 'center'},
|
||||
{field:'proName', 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'},
|
||||
{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){
|
||||
console.log(res); // 得到当前渲染的数据
|
||||
console.log(curr); // 得到当前页码
|
||||
console.log(count); // 得到数据总量
|
||||
console.log(origin); // 回调函数所执行的来源 --- 2.8.7+
|
||||
laydate.render({
|
||||
elem: '.planStartTime'
|
||||
});
|
||||
laydate.render({
|
||||
elem: '.planEndTime'
|
||||
});
|
||||
|
||||
},
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function setData(data,yjId,insMonth){
|
||||
yjIds = yjId;
|
||||
insMonths = insMonth;
|
||||
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){
|
||||
$('#aiDitStatuses').html(data[0].aiDitStatuses);
|
||||
$('#auditUserName').html(data[0].auditUserName);
|
||||
$('#auditTime').html(data[0].auditTime);
|
||||
}else{
|
||||
$('#aiDitStatuses').html("");
|
||||
$('#auditUserName').html("");
|
||||
$('#auditTime').html("");
|
||||
}
|
||||
|
||||
//总公司
|
||||
if(data[0].aiDitStatusTotal){
|
||||
$('#aiDitStatusTotal').html(data[0].aiDitStatusTotal);
|
||||
$('#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{
|
||||
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 += "<span style='display: flex;align-items: center'>"
|
||||
html += `<span style='width: 5px;height: 5px;background: ${color};border-radius: 50%'></span> `
|
||||
html += `<span>${text}</span>`
|
||||
html += "</span>"
|
||||
|
||||
$("#subComName").append(html);
|
||||
}
|
||||
|
||||
|
||||
//导出
|
||||
function exportData(){
|
||||
// let search1 = $('#search1').val();
|
||||
// let search2 = $('#search2').val();
|
||||
window.location.href = oiPlanUrl + "/monthlyPlanSubmission/export?token=" + token;
|
||||
|
||||
|
||||
window.location.href = PATH_URL + `/inspectionPlan/exportMonthPlanData?token=` + token
|
||||
+ "&insMonth=" + insMonths
|
||||
+ "&yjId=" + yjIds
|
||||
|
||||
|
||||
layer.msg('下载中,请稍等', {
|
||||
icon: 16,
|
||||
scrollbar: false
|
||||
});
|
||||
}
|
||||
|
|
@ -5,83 +5,64 @@ var trainFilePaths = [];
|
|||
var examFileNames = [];
|
||||
var examFilePaths = [];
|
||||
|
||||
layui.use(['layer', 'form', 'upload'], function () {
|
||||
var upload1 = layui.upload;
|
||||
var upload2 = layui.upload;
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
|
||||
getProjectSelect();
|
||||
|
||||
|
||||
$("#closeBt").click(function () {
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
});
|
||||
$("#saveBt").click(function () {
|
||||
|
||||
if(!$('#file')[0].files[0]){
|
||||
layer.msg("请上传填好的信息表", { icon: 0 })
|
||||
return
|
||||
}
|
||||
|
||||
$("#hideUpload1").trigger("click");
|
||||
|
||||
excelUpload();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function importData() {
|
||||
var fileData = new FormData();
|
||||
fileData.append('file', $('#file')[0].files[0]);
|
||||
// 加载提示
|
||||
loadingMsg = top.layer.msg('数据上传中,请稍候...', {icon: 16, scrollbar: false, time: 0, shade: [0.8, '#393D49']});
|
||||
// form请求地址
|
||||
var formUrl = oiPlanUrl + "/monthlyPlanSubmission/importData";
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: formUrl, // 请求地址
|
||||
data: fileData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function (data) {
|
||||
top.layer.close(loadingMsg); //再执行关闭
|
||||
if (data.code == 200) {
|
||||
top.layer.alert(data.msg);
|
||||
|
||||
reloading();
|
||||
} else {
|
||||
top.layer.alert(data.msg, {icon: 2});
|
||||
}
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, e) {
|
||||
layer.msg('数据请求发生异常,请稍后重试', {icon: 16, scrollbar: false});
|
||||
top.layer.close(addLoadingMsg); //再执行关闭
|
||||
}
|
||||
});
|
||||
function setYjId(yjId){
|
||||
layui.use(['layer', 'form', 'upload'], function () {
|
||||
var upload1 = layui.upload;
|
||||
var upload2 = layui.upload;
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
|
||||
$("#closeBt").click(function () {
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
});
|
||||
$("#saveBt").click(function () {
|
||||
|
||||
if(!$('#file')[0].files[0]){
|
||||
layer.msg("请上传填好的信息表", { icon: 0 })
|
||||
return
|
||||
}
|
||||
excelUploads(yjId);
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function excelUpload() {
|
||||
loadingMsg = top.layer.msg('数据上传中,请稍候...', {icon: 16, scrollbar: false, time: 0, shade: [0.8, '#393D49']}); //④创建一个formData对象
|
||||
|
||||
|
||||
function getNextMonth(currentDate) {
|
||||
let nextMonth = new Date(currentDate);
|
||||
nextMonth.setMonth(nextMonth.getMonth() + 1);
|
||||
// 确保日期格式为 YYYY-MM
|
||||
let year = nextMonth.getFullYear();
|
||||
let month = (nextMonth.getMonth() + 1).toString().padStart(2, '0');
|
||||
return `${year}-${month}`;
|
||||
}
|
||||
|
||||
function excelUploads(yjId) {
|
||||
let currentDate = new Date();
|
||||
let nextMonth = getNextMonth(currentDate);
|
||||
console.log(nextMonth);
|
||||
loadingMsg = layer.msg('数据上传中,请稍候...', {icon: 16, scrollbar: false, time: 0, shade: [0.8, '#393D49']}); //④创建一个formData对象
|
||||
var fileData = new FormData();
|
||||
fileData.append('file', $('#file')[0].files[0]);
|
||||
fileData.append('insMonth', nextMonth);
|
||||
fileData.append('yjId', yjId);
|
||||
$.ajax({
|
||||
url : oiPlanUrl + "/monthlyPlanSubmission/importData",
|
||||
url : PATH_URL + "/inspectionPlan/importData",
|
||||
type : 'POST',
|
||||
data : fileData,
|
||||
processData : false,// ⑧告诉jQuery不要去处理发送的数据
|
||||
contentType : false, // ⑨告诉jQuery不要去设置Content-Type请求头
|
||||
success : function(result) {
|
||||
console.log(result)
|
||||
top.layer.close(loadingMsg);
|
||||
if (result.data.success) {
|
||||
layer.msg(result.data.msg,{icon:1,time:1500},function () {
|
||||
// reloadData();
|
||||
reloading();
|
||||
});
|
||||
layer.close(loadingMsg);
|
||||
if (result.code == 200) {
|
||||
parent.layer.alert(result.msg,{icon:1});
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
} else {
|
||||
showModal(result.data);
|
||||
layer.alert(result.msg,{icon:2});
|
||||
}
|
||||
},
|
||||
error : function(XMLHttpRequest, textStatus, errorThrown,result) {
|
||||
|
|
|
|||
|
|
@ -5,21 +5,66 @@ var upload;
|
|||
var id;
|
||||
var formData;
|
||||
|
||||
|
||||
layui.use(['form', 'table', 'upload'], function () {
|
||||
let form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功
|
||||
form.render();
|
||||
upload = layui.upload;
|
||||
|
||||
|
||||
form.on('submit(formDemo)', function (data) {
|
||||
});
|
||||
function setData(yjId,insMonth){
|
||||
layui.use(['form', 'table', 'upload'], function () {
|
||||
let form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功
|
||||
form.render();
|
||||
upload = layui.upload;
|
||||
|
||||
$("#closeBt").click(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
|
||||
form.on('submit(formDemo)', function (data) {
|
||||
edit(yjId,insMonth);
|
||||
});
|
||||
|
||||
$("#closeBt").click(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function edit(yjId,insMonth){
|
||||
var reason = $("#revokeReason").val();
|
||||
// 加载提示
|
||||
let loadingMsg = layer.msg('数据上传中,请稍候...', {
|
||||
icon: 16,
|
||||
scrollbar: false,
|
||||
time: 0,
|
||||
shade: [0.8, '#393D49']
|
||||
});
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: PATH_URL + '/inspectionPlan/updateRevokeReason',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify({ "yjId": yjId,"insMonth": insMonth,"reason":"" }),
|
||||
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); //再执行关闭
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, e) {
|
||||
layer.close(loadingMsg);
|
||||
layer.msg('数据请求发生异常,请稍后重试', {
|
||||
icon: 16,
|
||||
scrollbar: false
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
//设置弹窗关闭
|
||||
function reloading() {
|
||||
|
|
|
|||
|
|
@ -1,179 +1,199 @@
|
|||
|
||||
|
||||
var pers = []
|
||||
var table,form,laydate
|
||||
layui.use(['form','layer','table','laydate'], function () {
|
||||
table = layui.table;
|
||||
form = layui.form;
|
||||
laydate = layui.laydate
|
||||
|
||||
|
||||
|
||||
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();
|
||||
|
||||
});
|
||||
var table, form, laydate
|
||||
var yjIds,insMonths
|
||||
|
||||
// 静态数据
|
||||
var tableData = [
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
{id: 1, lineName: '±500kV永富直'},
|
||||
];
|
||||
|
||||
|
||||
// 静态数据
|
||||
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',width: '15%'},
|
||||
{
|
||||
field: '',
|
||||
title: '工作内容',
|
||||
align: 'center',
|
||||
templet: function(d){
|
||||
var id = d.id
|
||||
var html = `<input class="workContent layui-input" key="${id}" type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return 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: 'proName',
|
||||
title: '线路名称',
|
||||
align: 'center',
|
||||
width: '15%'
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '工作内容',
|
||||
align: 'center',
|
||||
templet: function(d) {
|
||||
var id = d.id
|
||||
var workContent = d.workContent
|
||||
var yjId = d.yjId;
|
||||
var proName = d.proName;
|
||||
var insMonth = d.insMonth;
|
||||
var html =
|
||||
`<input class="workContent layui-input" maxlength="500" value="${workContent}" key="${id}" yjId="${yjId}" proName="${proName}" insMonth="${insMonth}" type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '计划开始时间',
|
||||
align: 'center',
|
||||
templet: function(d) {
|
||||
var id = d.id
|
||||
var stateTime = d.stateTime
|
||||
var html =
|
||||
`<input class="planStartTime layui-input" value="${stateTime}" key="${id}" readonly type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '计划结束时间',
|
||||
align: 'center',
|
||||
templet: function(d) {
|
||||
var id = d.id
|
||||
var enTime = d.enTime
|
||||
var html =
|
||||
`<input class="planEndTime layui-input" value="${enTime}" key="${id}" readonly type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '责任人(护线员)',
|
||||
align: 'center',
|
||||
templet: function(d) {
|
||||
var id = d.id
|
||||
var dutyUser = d.dutyUser
|
||||
var html =
|
||||
`<input class="liablePerson layui-input" value="${dutyUser}" key="${id}" type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '督办人(设备主人)',
|
||||
align: 'center',
|
||||
templet: function(d) {
|
||||
var id = d.id
|
||||
var supervisor = d.supervisor
|
||||
var html =
|
||||
`<input class="proctorPerson layui-input" value="${supervisor}" key="${id}" type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '完成标准',
|
||||
align: 'center',
|
||||
templet: function(d) {
|
||||
var id = d.id
|
||||
var complete = d.complete
|
||||
var html =
|
||||
`<input class="standard layui-input" value="${complete}" key="${id}" type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '备注',
|
||||
align: 'center',
|
||||
templet: function(d) {
|
||||
var id = d.id
|
||||
var remarks = d.remarks
|
||||
var html =
|
||||
`<input class="remark layui-input" value="${remarks}" key="${id}" type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
}
|
||||
]
|
||||
],
|
||||
data: tableData,
|
||||
done: function(res, curr, count, origin) {
|
||||
|
||||
// 初始化开始时间和结束时间的变量
|
||||
var startDate = null;
|
||||
var endDate = null;
|
||||
laydate.render({
|
||||
elem: '.planStartTime',
|
||||
done: function(value, date, time) {
|
||||
// 将laydate的日期对象转换为原生Date对象
|
||||
startDate = new Date(date.year, date.month - 1, date.date, date.hours, date
|
||||
.minutes, date.seconds);
|
||||
|
||||
// 确保结束时间不早于开始时间
|
||||
if (startDate && endDate) {
|
||||
if (endDate.getTime() < startDate.getTime()) {
|
||||
// 清空结束时间
|
||||
// 清除DOM元素的值
|
||||
$(this.elem).val('');
|
||||
// 重置endDate变量
|
||||
endDate = null;
|
||||
layer.msg('结束时间不能早于开始时间!');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
laydate.render({
|
||||
elem: '.planEndTime',
|
||||
done: function(value, date, time) {
|
||||
// 将laydate的日期对象转换为原生Date对象
|
||||
endDate = new Date(date.year, date.month - 1, date.date, date.hours, date
|
||||
.minutes, date.seconds);
|
||||
|
||||
// 确保结束时间不早于开始时间
|
||||
if (startDate && endDate) {
|
||||
if (endDate.getTime() < startDate.getTime()) {
|
||||
// 清空结束时间
|
||||
// 清除DOM元素的值
|
||||
$(this.elem).val('');
|
||||
// 重置endDate变量
|
||||
endDate = null;
|
||||
layer.msg('结束时间不能早于开始时间!');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '计划开始时间',
|
||||
align: 'center',
|
||||
templet: function(d){
|
||||
var id = d.id
|
||||
var html = `<input class="planStartTime layui-input" key="${id}" readonly type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '计划结束时间',
|
||||
align: 'center',
|
||||
templet: function(d){
|
||||
var id = d.id
|
||||
var html = `<input class="planEndTime layui-input" key="${id}" readonly type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '责任人(护线员)',
|
||||
align: 'center',
|
||||
templet: function(d){
|
||||
var id = d.id
|
||||
var html = `<input class="liablePerson layui-input" key="${id}" type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '督办人(设备主人)',
|
||||
align: 'center',
|
||||
templet: function(d){
|
||||
var id = d.id
|
||||
var html = `<input class="proctorPerson layui-input" key="${id}" type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '完成标准',
|
||||
align: 'center',
|
||||
templet: function(d){
|
||||
var id = d.id
|
||||
var html = `<input class="standard layui-input" key="${id}" type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: '',
|
||||
title: '备注',
|
||||
align: 'center',
|
||||
templet: function(d){
|
||||
var id = d.id
|
||||
var html = `<input class="remark layui-input" key="${id}" type="text" style="width: 150px;height: 25px;"/>`;
|
||||
return html;
|
||||
},
|
||||
}
|
||||
]],
|
||||
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 saveMonthPlan(){
|
||||
function saveMonthPlan() {
|
||||
//获取工作内容 DOM
|
||||
var workContents = $(".workContent");
|
||||
//获取计划开始时间 DOM
|
||||
var planStartTimes = $(".planStartTime");
|
||||
var planStartTimes = $(".planStartTime");
|
||||
//获取计划结束时间 DOM
|
||||
var planEndTimes = $(".planEndTime");
|
||||
var planEndTimes = $(".planEndTime");
|
||||
//获取责任人(护线员) DOM
|
||||
var liablePersons = $(".liablePerson");
|
||||
var liablePersons = $(".liablePerson");
|
||||
//获取督办人(设备主人) DOM
|
||||
var proctorPersons = $(".proctorPerson");
|
||||
var proctorPersons = $(".proctorPerson");
|
||||
//获取完成标准 DOM
|
||||
var standards = $(".standard");
|
||||
var standards = $(".standard");
|
||||
//获取备注 DOM
|
||||
var remarks = $(".remark");
|
||||
|
||||
|
||||
var arr = [];
|
||||
//循环获取的 DOM,将数据整合
|
||||
for (var i = 0; i < workContents.length; i++) {
|
||||
//获取此行数据 的id
|
||||
var id = $(workContents[i]).attr("key");
|
||||
var yjId = $(workContents[i]).attr("yjId");
|
||||
var proName = $(workContents[i]).attr("proName");
|
||||
var insMonth = $(workContents[i]).attr("insMonth");
|
||||
|
||||
//获取工作内容
|
||||
var workContent = $(workContents[i]).val();
|
||||
//获取计划开始时间
|
||||
|
|
@ -188,75 +208,223 @@ function saveMonthPlan(){
|
|||
var standard = $(standards[i]).val();
|
||||
//获取备注
|
||||
var remark = $(remarks[i]).val();
|
||||
|
||||
if(workContent == ""){
|
||||
layer.msg("请填写工作内容", {icon: 0});
|
||||
|
||||
if (workContent == "") {
|
||||
layer.msg("请填写工作内容", {
|
||||
icon: 0
|
||||
});
|
||||
$(workContents[i]).focus();
|
||||
return;
|
||||
}
|
||||
if(planStartTime == ""){
|
||||
layer.msg("请填写计划开始时间", {icon: 0});
|
||||
if (planStartTime == "") {
|
||||
layer.msg("请填写计划开始时间", {
|
||||
icon: 0
|
||||
});
|
||||
$(planStartTimes[i]).focus();
|
||||
return;
|
||||
}
|
||||
if(planEndTime == ""){
|
||||
layer.msg("请填写计划结束时间", {icon: 0});
|
||||
if (planEndTime == "") {
|
||||
layer.msg("请填写计划结束时间", {
|
||||
icon: 0
|
||||
});
|
||||
$(planEndTimes[i]).focus();
|
||||
return;
|
||||
}
|
||||
if(liablePerson == ""){
|
||||
layer.msg("请填写责任人(护线员)", {icon: 0});
|
||||
if (liablePerson == "") {
|
||||
layer.msg("请填写责任人(护线员)", {
|
||||
icon: 0
|
||||
});
|
||||
$(liablePersons[i]).focus();
|
||||
return;
|
||||
}
|
||||
if(proctorPerson == ""){
|
||||
layer.msg("请填写督办人(设备主人)", {icon: 0});
|
||||
if (proctorPerson == "") {
|
||||
layer.msg("请填写督办人(设备主人)", {
|
||||
icon: 0
|
||||
});
|
||||
$(proctorPersons[i]).focus();
|
||||
return;
|
||||
}
|
||||
if(standard == ""){
|
||||
layer.msg("请填写完成标准", {icon: 0});
|
||||
if (standard == "") {
|
||||
layer.msg("请填写完成标准", {
|
||||
icon: 0
|
||||
});
|
||||
$(standards[i]).focus();
|
||||
return;
|
||||
}
|
||||
if(remark == ""){
|
||||
layer.msg("请填写备注", {icon: 0});
|
||||
if (remark == "") {
|
||||
layer.msg("请填写备注", {
|
||||
icon: 0
|
||||
});
|
||||
$(remarks[i]).focus();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var json = {
|
||||
"id": id,
|
||||
"yjId": yjId,
|
||||
"workContent": workContent,
|
||||
"planStartTime": planStartTime,
|
||||
"planEndTime": planEndTime,
|
||||
"liablePerson": liablePerson,
|
||||
"proctorPerson": proctorPerson,
|
||||
"standard": standard,
|
||||
"remark": remark
|
||||
"stateTime": planStartTime,
|
||||
"enTime": planEndTime,
|
||||
"dutyUser": liablePerson,
|
||||
"supervisor": proctorPerson,
|
||||
"complete": standard,
|
||||
"remarks": remark
|
||||
}
|
||||
arr.push(json);
|
||||
console.log(arr)
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 加载提示
|
||||
let loadingMsg = layer.msg('数据上传中,请稍候...', {
|
||||
icon: 16,
|
||||
scrollbar: false,
|
||||
time: 0,
|
||||
shade: [0.8, '#393D49']
|
||||
});
|
||||
|
||||
// form请求地址
|
||||
let formUrl = PATH_URL + "/inspectionPlan/updateInspectionPlan";
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: formUrl, // 请求地址
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify(arr),
|
||||
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); //再执行关闭
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, e) {
|
||||
layer.close(loadingMsg);
|
||||
layer.msg('数据请求发生异常,请稍后重试', {
|
||||
icon: 16,
|
||||
scrollbar: false
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//撤销月计划
|
||||
function revokeMonthPlan(){
|
||||
let height = '60%';
|
||||
let width = '40%';
|
||||
function revokeMonthPlan() {
|
||||
let height = '63%';
|
||||
let width = '43%';
|
||||
var index = layer.open({
|
||||
title: ['计划撤销', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
content: './revokeMonthPlan.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: './revokeMonthPlan.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
success: function(layero, index) {
|
||||
var myIframe = window[layero.find('iframe')[0]['name']];
|
||||
var fnc = myIframe.setData(yjIds,insMonths); //aaa()为子页面的方法
|
||||
},
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function setData(data, yjId, insMonth) {
|
||||
layui.use(['form', 'layer', 'table', 'laydate'], function() {
|
||||
table = layui.table;
|
||||
form = layui.form;
|
||||
laydate = layui.laydate
|
||||
|
||||
|
||||
yjIds = yjId;
|
||||
insMonths = insMonth;
|
||||
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) {
|
||||
$('#aiDitStatuses').html(data[0].aiDitStatuses);
|
||||
$('#auditUserName').html(data[0].auditUserName);
|
||||
$('#auditTime').html(data[0].auditTime);
|
||||
} else {
|
||||
$('#aiDitStatuses').html("");
|
||||
$('#auditUserName').html("");
|
||||
$('#auditTime').html("");
|
||||
}
|
||||
|
||||
//总公司
|
||||
if (data[0].aiDitStatusTotal) {
|
||||
$('#aiDitStatusTotal').html(data[0].aiDitStatusTotal);
|
||||
$('#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 {
|
||||
layer.alert("无数据,请联系管理员", {
|
||||
icon: 2
|
||||
});
|
||||
}
|
||||
init();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
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 += "<span style='display: flex;align-items: center'>"
|
||||
html += `<span style='width: 5px;height: 5px;background: ${color};border-radius: 50%'></span> `
|
||||
html += `<span>${text}</span>`
|
||||
html += "</span>"
|
||||
|
||||
$("#subComName").append(html);
|
||||
}
|
||||
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
var pers = []
|
||||
var table,form,laydate
|
||||
layui.use(['form','layer','table','laydate'], function () {
|
||||
|
|
@ -9,81 +7,62 @@ layui.use(['form','layer','table','laydate'], function () {
|
|||
|
||||
//初始化日期选择框
|
||||
laydate.render({
|
||||
elem: '#dataTime',
|
||||
elem: '#insMonth',
|
||||
type: 'month',
|
||||
value: (new Date()).toISOString().substr(0, 7), // 获取当前日期并转换为'yyyy-MM'格式
|
||||
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 insMonth = $('#insMonth').val();
|
||||
let aiDitStatus = $('#aiDitStatus').val();
|
||||
table.reload('layui_table', {
|
||||
where: {
|
||||
yjId:$(window.parent.document).find("input[id='taskSourceId']").attr("stationId"),
|
||||
insMonth: insMonth,
|
||||
aiDitStatus: aiDitStatus,
|
||||
}
|
||||
})
|
||||
}
|
||||
//重置
|
||||
function resetClick(){
|
||||
var today = new Date();
|
||||
var year = today.getFullYear();
|
||||
var month = today.getMonth() + 1;
|
||||
if (month < 10) {
|
||||
month = '0' + month;
|
||||
}
|
||||
var currentMonth = year + '-' + month;
|
||||
$('#insMonth').val(currentMonth);
|
||||
$('#aiDitStatus').val('');
|
||||
form.render();
|
||||
table.reload('layui_table', {
|
||||
where: {
|
||||
yjId: "",
|
||||
insMonth: $('#insMonth').val(),
|
||||
aiDitStatus: "",
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 初始化数据
|
||||
*/
|
||||
function init(){
|
||||
// 渲染表格
|
||||
table.render({
|
||||
id: 'layui_table',
|
||||
elem: '#table',
|
||||
// url: "/sys/achievement",
|
||||
page: true,
|
||||
url: PATH_URL + '/inspectionPlan/getLineProjectListPage',
|
||||
where: {
|
||||
insMonth:$('#insMonth').val(),
|
||||
yjId:$(window.parent.document).find("input[id='taskSourceId']").attr("stationId")
|
||||
},
|
||||
page: true,
|
||||
method:'post',
|
||||
skin: 'line', // 表格样式
|
||||
cols: [[
|
||||
{
|
||||
|
|
@ -93,27 +72,27 @@ function init(){
|
|||
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:'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.status;
|
||||
var status = d.aiDitStatus;
|
||||
var text;
|
||||
var color;
|
||||
var html = "";
|
||||
if(status == '1'){
|
||||
text = '已审核';
|
||||
if(status == '2'){
|
||||
text = '已通过';
|
||||
color = '#19BE6B';
|
||||
}
|
||||
if(status == '2'){
|
||||
if(status == '0'){
|
||||
text = '待审核';
|
||||
color = '#FF9900';
|
||||
}
|
||||
|
|
@ -121,7 +100,7 @@ function init(){
|
|||
text = '未通过';
|
||||
color = '#F56C6C';
|
||||
}
|
||||
if(status == '4'){
|
||||
if(status == '1'){
|
||||
text = '已撤销';
|
||||
color = '#999999';
|
||||
}
|
||||
|
|
@ -138,152 +117,183 @@ function init(){
|
|||
align: 'center',
|
||||
width: '20%',
|
||||
templet: function(d){
|
||||
var id= d.id;
|
||||
var status = d.status;
|
||||
var id = id;
|
||||
var yjId= d.yjId;
|
||||
var insMonth= d.insMonth;
|
||||
var status = d.aiDitStatus;
|
||||
var status = d.aiDitStatus;
|
||||
var text;
|
||||
var html = "";
|
||||
if(status == '1'){
|
||||
//已审核
|
||||
html += `<button class="layui-btn layui-btn-sm" onclick="detailsView('${id}')">详情</button>`
|
||||
html += `<button class="layui-btn layui-btn-sm layui-btn-primary" onclick="exportData('${id}')">导出</button>`
|
||||
}
|
||||
if(status == '2'){
|
||||
//已通过
|
||||
html += `<button class="layui-btn layui-btn-sm" onclick="detailsView('${yjId}','${insMonth}')">详情</button>`
|
||||
html += `<button class="layui-btn layui-btn-sm layui-btn-primary" onclick="exportDataDetails('${yjId}','${insMonth}')">导出</button>`
|
||||
}
|
||||
if(status == '0'){
|
||||
//待审核
|
||||
html += `<button class="layui-btn layui-btn-sm" onclick="detailsView('${id}')">详情</button>`
|
||||
html += `<button type="button" class="layui-btn layui-btn-sm layui-bg-orange" onclick="revokeView('${id}')">撤销</button>`
|
||||
html += `<button class="layui-btn layui-btn-sm layui-btn-primary" onclick="exportData('${id}''${id}')">导出</button>`
|
||||
html += `<button class="layui-btn layui-btn-sm" onclick="detailsView('${yjId}','${insMonth}')">详情</button>`
|
||||
html += `<button type="button" class="layui-btn layui-btn-sm layui-bg-orange" onclick="revokeView('${yjId}','${insMonth}')">撤销</button>`
|
||||
html += `<button class="layui-btn layui-btn-sm layui-btn-primary" onclick="exportDataDetails('${yjId}','${insMonth}')">导出</button>`
|
||||
}
|
||||
if(status == '3'){
|
||||
//未通过
|
||||
html += `<button class="layui-btn layui-btn-sm" onclick="detailsView('${id}')">详情</button>`
|
||||
html += `<button type="button" class="layui-btn layui-btn-sm layui-bg-blue" onclick="updateView('${id}')">修改</button>`
|
||||
html += `<button type="button" class="layui-btn layui-btn-sm layui-bg-red" onclick="delData('${id}')">删除</button>`
|
||||
html += `<button class="layui-btn layui-btn-sm layui-btn-primary" onclick="exportData('${id}')">导出</button>`
|
||||
html += `<button class="layui-btn layui-btn-sm" onclick="detailsView('${yjId}','${insMonth}')">详情</button>`
|
||||
html += `<button type="button" class="layui-btn layui-btn-sm layui-bg-blue" onclick="updateView('${yjId}','${insMonth}')">修改</button>`
|
||||
html += `<button type="button" class="layui-btn layui-btn-sm layui-bg-red" onclick="delData('${yjId}','${insMonth}')">删除</button>`
|
||||
html += `<button class="layui-btn layui-btn-sm layui-btn-primary" onclick="exportDataDetails('${yjId}','${insMonth}')">导出</button>`
|
||||
}
|
||||
if(status == '4'){
|
||||
if(status == '1'){
|
||||
//已撤销
|
||||
html += `<button class="layui-btn layui-btn-sm" onclick="detailsView('${id}')">详情</button>`
|
||||
html += `<button type="button" class="layui-btn layui-btn-sm layui-bg-blue" onclick="updateView('${id}')">修改</button>`
|
||||
html += `<button type="button" class="layui-btn layui-btn-sm layui-bg-red" onclick="delData('${id}')">删除</button>`
|
||||
html += `<button class="layui-btn layui-btn-sm layui-btn-primary" onclick="exportData('${id}')">导出</button>`
|
||||
html += `<button class="layui-btn layui-btn-sm" onclick="detailsView('${yjId}','${insMonth}')">详情</button>`
|
||||
html += `<button type="button" class="layui-btn layui-btn-sm layui-bg-blue" onclick="updateView('${yjId}','${insMonth}')">修改</button>`
|
||||
html += `<button type="button" class="layui-btn layui-btn-sm layui-bg-red" onclick="delData('${yjId}','${insMonth}')">删除</button>`
|
||||
html += `<button class="layui-btn layui-btn-sm layui-btn-primary" onclick="exportDataDetails('${yjId}','${insMonth}')">导出</button>`
|
||||
}
|
||||
|
||||
return html;
|
||||
},
|
||||
}
|
||||
]],
|
||||
data: tableData
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
//详情
|
||||
function detailsView(id) {
|
||||
/* $.ajax({
|
||||
type: 'post',
|
||||
contentType: "application/x-www-form-urlencoded",
|
||||
url: oiPlanUrl + '/monthlyPlanSubmission/getDataById',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
function detailsView(yjId,insMonth) {
|
||||
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) {
|
||||
console.log("data:", data)
|
||||
|
||||
|
||||
var index = layer.open({
|
||||
title: ['详情', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
title: ['详情'],
|
||||
type: 2,
|
||||
content: './wagesReport/producePayrollDetails.html',
|
||||
content: './monthPlanDetails.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
success: function (layero, index) {
|
||||
console.log(data);
|
||||
// console.log(data);
|
||||
var myIframe = window[layero.find('iframe')[0]['name']];
|
||||
myIframe.hideSubmit();
|
||||
// var fnc = myIframe.setData(data.data); //aaa()为子页面的方法
|
||||
|
||||
// myIframe.hideSubmit();
|
||||
var fnc = myIframe.setData(data.data,yjId,insMonth); //aaa()为子页面的方法
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
}) */
|
||||
|
||||
//测试
|
||||
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()为子页面的方法
|
||||
|
||||
},
|
||||
});
|
||||
})
|
||||
}
|
||||
//撤销
|
||||
function revokeView(id){
|
||||
layer.confirm("确定撤销吗?", {icon: 0}, function () {
|
||||
|
||||
function revokeView(yjId,insMonth){
|
||||
let aiDitStatus = $('#aiDitStatus').val();
|
||||
let index = layer.confirm("确定撤销吗?", {icon: 0}, function () {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: PATH_URL + '/inspectionPlan/updateRevokeReason',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify({ "yjId": yjId,"insMonth": insMonth,"reason":"" }),
|
||||
success: function (data) {
|
||||
layer.close(index);
|
||||
if (data.code == 200) {
|
||||
layer.confirm("撤销成功", {icon: 1}, function () {
|
||||
table.reload('layui_table', {
|
||||
where: {
|
||||
yjId:yjId,
|
||||
insMonth: insMonth,
|
||||
aiDitStatus:aiDitStatus
|
||||
}
|
||||
})
|
||||
});
|
||||
} else {
|
||||
layer.msg("撤销失败", {icon: 2}, function () {
|
||||
// example.ajax.reload(); // 刷新页面
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
//删除
|
||||
function delData(id){
|
||||
layer.confirm("确定删除吗?", {icon: 0}, function () {
|
||||
|
||||
function delData(yjId,insMonth){
|
||||
let aiDitStatus = $('#aiDitStatus').val();
|
||||
let index = layer.confirm("确定删除吗?", {icon: 0}, function () {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: PATH_URL + '/inspectionPlan/delPlanId',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify({ "yjId": yjId,"insMonth": insMonth }),
|
||||
success: function (data) {
|
||||
layer.close(index);
|
||||
if (data.code == 200) {
|
||||
layer.msg("删除成功", {icon: 1}, function () {
|
||||
table.reload('layui_table', {
|
||||
where: {
|
||||
yjId:yjId,
|
||||
insMonth: insMonth,
|
||||
aiDitStatus:aiDitStatus
|
||||
}
|
||||
})
|
||||
});
|
||||
} else {
|
||||
layer.msg("删除失败", {icon: 2}, function () {
|
||||
// example.ajax.reload(); // 刷新页面
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
//修改
|
||||
function updateView(id) {
|
||||
function updateView(yjId,insMonth) {
|
||||
let height = '98%';
|
||||
let width = '99%';
|
||||
/* $.ajax({
|
||||
type: 'post',
|
||||
contentType: "application/x-www-form-urlencoded",
|
||||
url: oiPlanUrl + '/monthlyPlanSubmission/getDataById',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
let width = '95%';
|
||||
let aiDitStatus = $('#aiDitStatus').val();
|
||||
$.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: ['巡视结果上传', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
title: ['月计划上报'],
|
||||
type: 2,
|
||||
content: './wagesReport/producePayrollDetails.html',
|
||||
content: './updateMonthPlan.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
success: function (layero, index) {
|
||||
console.log(data);
|
||||
// console.log(data);
|
||||
var myIframe = window[layero.find('iframe')[0]['name']];
|
||||
myIframe.hideSubmit();
|
||||
// var fnc = myIframe.setData(data.data); //aaa()为子页面的方法
|
||||
|
||||
// myIframe.hideSubmit();
|
||||
var fnc = myIframe.setData(data.data,yjId,insMonth); //aaa()为子页面的方法
|
||||
|
||||
},
|
||||
end:function(){
|
||||
table.reload('layui_table', {
|
||||
where: {
|
||||
yjId:yjId,
|
||||
insMonth: insMonth,
|
||||
aiDitStatus:aiDitStatus
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}) */
|
||||
|
||||
//测试
|
||||
var index = layer.open({
|
||||
title: ['月计划上报', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
content: './updateMonthPlan.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()为子页面的方法
|
||||
|
||||
},
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
//新增月计划addMonthPlan
|
||||
function addMonthPlan(id) {
|
||||
let yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
||||
let insMonth = $('#insMonth').val();
|
||||
let aiDitStatus = $('#aiDitStatus').val();
|
||||
|
||||
let height = '98%';
|
||||
let width = '99%';
|
||||
var index = layer.open({
|
||||
|
|
@ -293,16 +303,29 @@ function addMonthPlan(id) {
|
|||
area: [width, height],
|
||||
maxmin: false,
|
||||
success: function (layero, index) {
|
||||
// var myIframe = window[layero.find('iframe')[0]['name']];
|
||||
// myIframe.hideSubmit();
|
||||
var myIframe = window[layero.find('iframe')[0]['name']];
|
||||
myIframe.setYjId($(window.parent.document).find("input[id='taskSourceId']").attr("stationId"));
|
||||
// var fnc = myIframe.setData(data.data); //aaa()为子页面的方法
|
||||
|
||||
},
|
||||
end:function(){
|
||||
table.reload('layui_table', {
|
||||
where: {
|
||||
yjId:yjId,
|
||||
insMonth: insMonth,
|
||||
aiDitStatus:aiDitStatus
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//导入计划
|
||||
function importData(){
|
||||
let yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
||||
let insMonth = $('#insMonth').val();
|
||||
let aiDitStatus = $('#aiDitStatus').val();
|
||||
|
||||
let height = '98%';
|
||||
let width = '62%';
|
||||
var index = layer.open({
|
||||
|
|
@ -312,17 +335,51 @@ function importData(){
|
|||
area: [width, height],
|
||||
maxmin: false,
|
||||
success: function (layero, index) {
|
||||
// var myIframe = window[layero.find('iframe')[0]['name']];
|
||||
// myIframe.hideSubmit();
|
||||
var myIframe = window[layero.find('iframe')[0]['name']];
|
||||
myIframe.setYjId($(window.parent.document).find("input[id='taskSourceId']").attr("stationId"));
|
||||
// var fnc = myIframe.setData(data.data); //aaa()为子页面的方法
|
||||
|
||||
},
|
||||
end:function(){
|
||||
table.reload('layui_table', {
|
||||
where: {
|
||||
yjId:yjId,
|
||||
insMonth: insMonth,
|
||||
aiDitStatus:aiDitStatus
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//导出
|
||||
function exportData(){
|
||||
// let search1 = $('#search1').val();
|
||||
// let search2 = $('#search2').val();
|
||||
window.location.href = oiPlanUrl + "/monthlyPlanSubmission/export?token=" + token;
|
||||
let insMonth = $('#insMonth').val();
|
||||
let aiDitStatus = $('#aiDitStatus').val();
|
||||
let yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
||||
|
||||
window.location.href = PATH_URL + `/inspectionPlan/exportPlanData?token=` + token
|
||||
+ "&insMonth=" + insMonth
|
||||
+ "&aiDitStatus=" + aiDitStatus + "&yjId=" + yjId
|
||||
|
||||
layer.msg('下载中,请稍等', {
|
||||
icon: 16,
|
||||
scrollbar: false
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//导出
|
||||
function exportDataDetails(yjId,insMonth){
|
||||
|
||||
|
||||
window.location.href = PATH_URL + `/inspectionPlan/exportMonthPlanData?token=` + token
|
||||
+ "&insMonth=" + insMonth
|
||||
+ "&yjId=" + yjId
|
||||
|
||||
|
||||
layer.msg('下载中,请稍等', {
|
||||
icon: 16,
|
||||
scrollbar: false
|
||||
});
|
||||
}
|
||||
Loading…
Reference in New Issue