235 lines
11 KiB
Plaintext
235 lines
11 KiB
Plaintext
|
|
<%@ page language="java" pageEncoding="UTF-8"%>
|
||
|
|
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
|
||
|
|
<%@ page import="com.sipai.entity.base.ServerObject"%>
|
||
|
|
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security"%>
|
||
|
|
<!DOCTYPE html>
|
||
|
|
<!-- <html lang="zh-CN"> -->
|
||
|
|
<!-- BEGIN HEAD -->
|
||
|
|
<head>
|
||
|
|
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||
|
|
<!-- 引用页头及CSS页-->
|
||
|
|
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||
|
|
<!-- bootstrap switch -->
|
||
|
|
<script type="text/javascript">
|
||
|
|
var addFun = function() {
|
||
|
|
$.post(ext.contextPath + '/maintenance/addProblem.do', {} , function(data) {
|
||
|
|
$("#subDiv").html(data);
|
||
|
|
openModal('subModal');
|
||
|
|
});
|
||
|
|
};
|
||
|
|
//补录
|
||
|
|
var addSupplementFun = function() {
|
||
|
|
$.post(ext.contextPath + '/maintenance/add.do', {} , function(data) {
|
||
|
|
$("#subDiv").html(data);
|
||
|
|
openModal('subModal');
|
||
|
|
//$('#subModal').css('width','600px');
|
||
|
|
|
||
|
|
});
|
||
|
|
};
|
||
|
|
var getSubmitListFun = function(index) {
|
||
|
|
$.post(ext.contextPath + '/maintenance/showSubListByStatus.do', {status:index} , function(data) {
|
||
|
|
$("#tabcontent").html(data);
|
||
|
|
});
|
||
|
|
};
|
||
|
|
var deleteFun = function(id) {
|
||
|
|
swal({
|
||
|
|
text: "您确定要删除此记录?",
|
||
|
|
dangerMode: true,
|
||
|
|
buttons: {
|
||
|
|
cancel: {
|
||
|
|
text: "取消",
|
||
|
|
value: null,
|
||
|
|
visible: true,
|
||
|
|
className: "btn btn-default btn-sm",
|
||
|
|
closeModal: true,
|
||
|
|
},
|
||
|
|
confirm: {
|
||
|
|
text: "确定",
|
||
|
|
value: true,
|
||
|
|
visible: true,
|
||
|
|
className: "btn btn-danger btn-sm",
|
||
|
|
closeModal: true
|
||
|
|
}
|
||
|
|
}
|
||
|
|
})
|
||
|
|
.then(function(willDelete) {
|
||
|
|
if (willDelete) {
|
||
|
|
$.post(ext.contextPath + '/maintenance/delete.do', {id : id}, function(data) {
|
||
|
|
if(data==1){
|
||
|
|
$("#table").bootstrapTable('refresh');
|
||
|
|
}else{
|
||
|
|
showAlert('d','删除失败','mainAlertdiv');
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
}
|
||
|
|
});
|
||
|
|
};
|
||
|
|
var initialTab = function(){
|
||
|
|
var tabIndex=sessionStorage.tabIndex;
|
||
|
|
if(tabIndex==null ||tabIndex==""){
|
||
|
|
$('#myTab a:first').tab('show');
|
||
|
|
getSubmitListFun($('#myTab a:first').attr("index"));
|
||
|
|
}else{
|
||
|
|
$('#myTab a[index="'+tabIndex+'"]').tab('show');
|
||
|
|
getSubmitListFun(tabIndex);
|
||
|
|
sessionStorage.setItem("tabIndex", '');
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
$(function() {
|
||
|
|
//init();
|
||
|
|
/* $("#search_code").select2({
|
||
|
|
ajax: {
|
||
|
|
type:'POST',
|
||
|
|
url: ext.contextPath +"/user/getSearchBizsByUserId4Select.do",
|
||
|
|
dataType: 'json',
|
||
|
|
delay: 250,
|
||
|
|
processResults: function (data) {
|
||
|
|
return {
|
||
|
|
results: data
|
||
|
|
}
|
||
|
|
},
|
||
|
|
cache: true
|
||
|
|
},
|
||
|
|
placeholder:'请选择',//默认文字提示
|
||
|
|
allowClear: true,//允许清空
|
||
|
|
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||
|
|
language: "zh-CN",
|
||
|
|
minimumInputLength: 0,
|
||
|
|
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||
|
|
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||
|
|
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||
|
|
}).on("change",function(){
|
||
|
|
dosearch();
|
||
|
|
});
|
||
|
|
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'}) */
|
||
|
|
$.post(ext.contextPath + "/user/getSearchBizsByUserId4Select.do", {}, function(data) {
|
||
|
|
var selelct =$("#search_code").select2({
|
||
|
|
data: data,
|
||
|
|
placeholder:'请选择',//默认文字提示
|
||
|
|
allowClear: false,//允许清空
|
||
|
|
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||
|
|
language: "zh-CN",
|
||
|
|
minimumInputLength: 0,
|
||
|
|
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||
|
|
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||
|
|
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||
|
|
});
|
||
|
|
selelct.on("change",function(e){
|
||
|
|
dosearch();
|
||
|
|
});
|
||
|
|
if(data.length==1){
|
||
|
|
//选择厂区为一个厂时隐藏选择框
|
||
|
|
selelct.val(data[0].id).trigger("change");
|
||
|
|
$("#search_code").next().css("display", "none");
|
||
|
|
selelct.attr("disabled","disabled");
|
||
|
|
var companyText = $("#search_code").text();
|
||
|
|
console.info(companyText);
|
||
|
|
$("#company").text(companyText);
|
||
|
|
$("#companylabel").html("厂区:");
|
||
|
|
}else{
|
||
|
|
selelct.val("").trigger("change");
|
||
|
|
$("#company").css("display", "none");
|
||
|
|
};
|
||
|
|
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'});
|
||
|
|
},'json');
|
||
|
|
|
||
|
|
initialTab();
|
||
|
|
});
|
||
|
|
</script>
|
||
|
|
|
||
|
|
</head>
|
||
|
|
<body onload="initMenu();" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||
|
|
<div class="wrapper">
|
||
|
|
<!-- 引用top -->
|
||
|
|
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||
|
|
<!-- 菜单栏 -->
|
||
|
|
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||
|
|
<div class="content-wrapper">
|
||
|
|
<!-- Content Header (Page header) -->
|
||
|
|
<section class="content-header">
|
||
|
|
<h1 id ="head_title"></h1>
|
||
|
|
<ol class="breadcrumb">
|
||
|
|
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||
|
|
<!-- <li class="active">Here</li> -->
|
||
|
|
</ol>
|
||
|
|
</section>
|
||
|
|
<!-- Main content -->
|
||
|
|
<section class="content container-fluid">
|
||
|
|
<div id="mainAlertdiv"></div>
|
||
|
|
<div id="subDiv"></div>
|
||
|
|
<div id="fileInputDiv"></div>
|
||
|
|
<div id="maintenanceDetailDiv"></div>
|
||
|
|
<div id="user4SelectDiv"></div>
|
||
|
|
<div id="fault4SelectDiv"></div>
|
||
|
|
<div id="equ4SelectDiv"></div>
|
||
|
|
<div id="handleDetailDiv"></div>
|
||
|
|
<div >
|
||
|
|
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||
|
|
<security:authorize buttonUrl="maintenance/addProblem.do">
|
||
|
|
<button type="button" class="btn btn-default" onclick="addFun();"><i class="fa fa-plus"></i> 新增问题</button>
|
||
|
|
</security:authorize>
|
||
|
|
<security:authorize buttonUrl="Maintenance/addSupplement.do">
|
||
|
|
<button type="button" class="btn btn-default" onclick="addSupplementFun();"><i class="fa fa-plus"></i> 补录</button>
|
||
|
|
</security:authorize>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
<div class="form-group " style="padding:0;">
|
||
|
|
<label class="form-label" id="companylabel">厂区</label>
|
||
|
|
<select class="form-control select2 " id="search_code" name ="search_code" style="width: 220px;" ></select>
|
||
|
|
<span class="select2-selection select2-selection--single" id="company" style="width:220px;border: none;background: transparent;" ></span>
|
||
|
|
</div>
|
||
|
|
<div class="nav-tabs-custom">
|
||
|
|
<!-- Tabs within a box -->
|
||
|
|
<ul class="nav nav-tabs" id="myTab">
|
||
|
|
<security:authorize buttonUrl="maintenance/getSubListByStatus.do?0">
|
||
|
|
<li ><a onclick="getSubmitListFun('0');" data-toggle="tab" index="0">待发布</a></li>
|
||
|
|
</security:authorize>
|
||
|
|
<security:authorize buttonUrl="maintenance/getSubListByStatus.do?1">
|
||
|
|
<li><a onclick="getSubmitListFun('1');" data-toggle="tab" index="1">待确认</a></li>
|
||
|
|
</security:authorize>
|
||
|
|
<security:authorize buttonUrl="maintenance/getSubListByStatus.do?2">
|
||
|
|
<li><a onclick="getSubmitListFun('2');" data-toggle="tab" index="2">待确认(维护商)</a></li>
|
||
|
|
</security:authorize>
|
||
|
|
<security:authorize buttonUrl="maintenance/getSubListByStatus.do?3">
|
||
|
|
<li><a onclick="getSubmitListFun('3');" data-toggle="tab" index="3">维护中</a></li>
|
||
|
|
</security:authorize>
|
||
|
|
<security:authorize buttonUrl="maintenance/getSubListByStatus.do?4">
|
||
|
|
<li><a onclick="getSubmitListFun('4');" data-toggle="tab" index="4">已完成</a></li>
|
||
|
|
</security:authorize>
|
||
|
|
</ul>
|
||
|
|
<div class="tab-content no-padding" >
|
||
|
|
<!-- Morris chart - Sales -->
|
||
|
|
<div class="chart tab-pane active" id="tabcontent" style="position: relative; padding:5px;">
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</section>
|
||
|
|
<!-- /.content -->
|
||
|
|
</div>
|
||
|
|
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||
|
|
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||
|
|
</div>
|
||
|
|
</body>
|
||
|
|
<!-- 文件上传-->
|
||
|
|
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
||
|
|
<%-- <script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js" charset="utf-8"></script>
|
||
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js" charset="utf-8"></script> --%>
|
||
|
|
<script type="text/javascript">
|
||
|
|
document.write("<scr"+"ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js\"></sc"+"ript>")
|
||
|
|
document.write("<scr"+"ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js\"></sc"+"ript>")
|
||
|
|
</script>
|
||
|
|
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js" charset="utf-8"></script>
|
||
|
|
</html>
|