302 lines
13 KiB
Plaintext
302 lines
13 KiB
Plaintext
|
|
<%@ page language="java" pageEncoding="UTF-8"%>
|
|||
|
|
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
|||
|
|
<%request.setAttribute("Status_Cancel_Problem",Maintenance.Status_Cancel_Problem);%>
|
|||
|
|
<%request.setAttribute("Status_Confirm_Maintainer",Maintenance.Status_Confirm_Maintainer);%>
|
|||
|
|
<%request.setAttribute("Status_Cancel_Maintainer",Maintenance.Status_Cancel_Maintainer);%>
|
|||
|
|
<%request.setAttribute("Status_CancelTOMaintainer",Maintenance.Status_CancelTOMaintainer);%>
|
|||
|
|
<%request.setAttribute("Status_Submit_Problem",Maintenance.Status_Submit_Problem);%>
|
|||
|
|
<%request.setAttribute("Status_Launch",Maintenance.Status_Launch);%>
|
|||
|
|
<%request.setAttribute("Status_Edit",Maintenance.Status_Edit);%>
|
|||
|
|
<%request.setAttribute("Status_Finish",Maintenance.Status_Finish);%>
|
|||
|
|
<%request.setAttribute("Status_Submit_Maintainer",Maintenance.Status_Submit_Maintainer);%>
|
|||
|
|
|
|||
|
|
<%request.setAttribute("TYPE_MAINTENANCE",Maintenance.TYPE_MAINTENANCE);%>
|
|||
|
|
<%request.setAttribute("TYPE_SUPPLEMENT",Maintenance.TYPE_SUPPLEMENT);%>
|
|||
|
|
<!DOCTYPE html>
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
var viewFun = function(id) {
|
|||
|
|
$.post(ext.contextPath + '/maintenance/showMaintenanceView.do', {id:id} , function(data) {
|
|||
|
|
$("#subDiv").html(data);
|
|||
|
|
openModal('subModal');
|
|||
|
|
});
|
|||
|
|
};
|
|||
|
|
var editFun = function(id) {
|
|||
|
|
$.post(ext.contextPath + '/command/emergencyRecords/showFuncEdit.do', {id:id} , function(data) {
|
|||
|
|
$("#subDiv").html(data);
|
|||
|
|
openModal('subModal');
|
|||
|
|
});
|
|||
|
|
};
|
|||
|
|
var subFun = function(id) {
|
|||
|
|
stopBubbleDefaultEvent();
|
|||
|
|
$.post(ext.contextPath + '/maintenance/submitProblem.do', {id:id} , function(data) {
|
|||
|
|
$("#subDiv").html(data);
|
|||
|
|
openModal('subModal');
|
|||
|
|
});
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
function delFun(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 + '/command/emergencyRecords/deleteMenu.do', {id:id}, function(data) {
|
|||
|
|
if(data.res>0){
|
|||
|
|
$("#table").bootstrapTable('refresh');
|
|||
|
|
}else{
|
|||
|
|
showAlert('d','删除失败','alertDiv_power');
|
|||
|
|
}
|
|||
|
|
},'json');
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* 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 cancelFun = function(id) {
|
|||
|
|
stopBubbleDefaultEvent();
|
|||
|
|
swal({
|
|||
|
|
title: "驳回!",
|
|||
|
|
text: "请输入驳回理由:",
|
|||
|
|
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
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
content: {
|
|||
|
|
element: "input",
|
|||
|
|
attributes: {
|
|||
|
|
placeholder: "驳回理由...",
|
|||
|
|
},
|
|||
|
|
},
|
|||
|
|
})
|
|||
|
|
.then((value) => {
|
|||
|
|
if(value){
|
|||
|
|
$.post(ext.contextPath + "/maintenance/updateStatus.do", {id:id,status:'${Status_Cancel_Problem}',cancelreason:value}, function(data) {
|
|||
|
|
if (data.res == 1) {
|
|||
|
|
$("#table").bootstrapTable('refresh');
|
|||
|
|
}else if(data.res == 0){
|
|||
|
|
showAlert('d','驳回失败');
|
|||
|
|
}else{
|
|||
|
|
showAlert('d',data.res);
|
|||
|
|
}
|
|||
|
|
},'json');
|
|||
|
|
}
|
|||
|
|
});;
|
|||
|
|
};
|
|||
|
|
var dosearch = function() {
|
|||
|
|
$("#table").bootstrapTable('refresh');
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
|
|||
|
|
$(function() {
|
|||
|
|
$("#table").bootstrapTable({ // 对应table标签的id
|
|||
|
|
url: ext.contextPath + '/command/emergencyRecords/getSubListByStatus.do', // 获取表格数据的url
|
|||
|
|
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
|||
|
|
striped: true, //表格显示条纹,默认为false
|
|||
|
|
pagination: true, // 在表格底部显示分页组件,默认false
|
|||
|
|
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
|||
|
|
pageSize: 50, // 页面数据条数
|
|||
|
|
pageNumber: 1, // 首页页码
|
|||
|
|
sidePagination: 'server', // 设置为服务器端分页
|
|||
|
|
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
|||
|
|
return {
|
|||
|
|
rows: params.limit, // 每页要显示的数据条数
|
|||
|
|
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
|||
|
|
sort: params.sort, // 要排序的字段
|
|||
|
|
order: params.order,
|
|||
|
|
status:'0',
|
|||
|
|
search_name: $('#search_name').val(),
|
|||
|
|
search_code: $('#bizid').val()
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
sortName: 'id', // 要排序的字段
|
|||
|
|
sortOrder: 'desc', // 排序规则
|
|||
|
|
onClickRow: function (row) {//单击行事件,执行查看功能
|
|||
|
|
viewFun(row.id);
|
|||
|
|
},
|
|||
|
|
columns: [
|
|||
|
|
{
|
|||
|
|
field: 'firstmenu', // 返回json数据中的name
|
|||
|
|
title: '异常大类', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle',
|
|||
|
|
/*formatter:function(value,row,index){
|
|||
|
|
return row.company.name;
|
|||
|
|
}*/
|
|||
|
|
},{
|
|||
|
|
field: 'secondmenu', // 返回json数据中的name
|
|||
|
|
title: '异常类型', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle' // 上下居中
|
|||
|
|
}, {
|
|||
|
|
field: 'thirdmenu', // 返回json数据中的name
|
|||
|
|
title: '触发条件', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle' // 上下居中
|
|||
|
|
},{
|
|||
|
|
field: 'reportperson', // 返回json数据中的name
|
|||
|
|
title: '提交人', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle' // 上下居中
|
|||
|
|
},{
|
|||
|
|
field: 'insdt', // 返回json数据中的name
|
|||
|
|
title: '提交时间', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle',
|
|||
|
|
formatter:function(value,row,index){
|
|||
|
|
return value.substring(0,19);
|
|||
|
|
}
|
|||
|
|
},{
|
|||
|
|
field: 'status', // 返回json数据中的name
|
|||
|
|
title: '状态', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle' // 上下居中
|
|||
|
|
},/*{
|
|||
|
|
field: 'type', // 返回json数据中的name
|
|||
|
|
title: '厂名', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle', // 上下居中
|
|||
|
|
formatter:function(value,row,index){
|
|||
|
|
switch (value) {
|
|||
|
|
case '${TYPE_MAINTENANCE}':
|
|||
|
|
return '运维';
|
|||
|
|
case '${TYPE_SUPPLEMENT}':
|
|||
|
|
return '补录';
|
|||
|
|
default:
|
|||
|
|
return '';
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},{
|
|||
|
|
field: 'status', // 返回json数据中的name
|
|||
|
|
title: '状态', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle', // 上下居中
|
|||
|
|
formatter:function(value,row,index){
|
|||
|
|
switch (value) {
|
|||
|
|
case '${Status_Edit}':
|
|||
|
|
return '编辑中';
|
|||
|
|
case '${Status_Cancel_Problem}':
|
|||
|
|
return '驳回至问题发起人';
|
|||
|
|
case '${Status_Cancel_Maintainer}':
|
|||
|
|
return '退回至厂区负责人';
|
|||
|
|
case '${Status_CancelTOMaintainer}':
|
|||
|
|
return '驳回至运维商';
|
|||
|
|
case '${Status_Confirm_Maintainer}':
|
|||
|
|
return '维护商已确认';
|
|||
|
|
case '${Status_Submit_Problem}':
|
|||
|
|
return '问题已发布';
|
|||
|
|
case '${Status_Launch}':
|
|||
|
|
return '问题已发起';
|
|||
|
|
case '${Status_Finish}':
|
|||
|
|
return '完成';
|
|||
|
|
case '${Status_Submit_Maintainer}':
|
|||
|
|
return '维护商完成提交';
|
|||
|
|
default:
|
|||
|
|
return '';
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},*/{
|
|||
|
|
title: "操作",
|
|||
|
|
align: 'center',
|
|||
|
|
valign: 'middle',
|
|||
|
|
width: 200, // 定义列的宽度,单位为像素px
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
|||
|
|
'<button class="btn btn-default btn-sm" onclick="delFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>'+
|
|||
|
|
'<button class="btn btn-default btn-sm" onclick="subFun(\'' + row.id + '\')"><i class="fa fa-check-square"></i></button></div>';
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
onLoadSuccess: function(){ //加载成功时执行
|
|||
|
|
setDataCardView("table");
|
|||
|
|
var businessKey=sessionStorage.getItem("businessKey");
|
|||
|
|
markRow("table",businessKey)
|
|||
|
|
},
|
|||
|
|
onLoadError: function(){ //加载失败时执行
|
|||
|
|
console.info("加载数据失败");
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
})
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
</script>
|
|||
|
|
<div class="form-group " >
|
|||
|
|
<div class="form-group pull-right" >
|
|||
|
|
<div class="input-group input-group-sm" style="width: 250px;">
|
|||
|
|
<input type="text" id="search_name" name="search_name" class="form-control pull-right" placeholder="问题描述">
|
|||
|
|
<input id="bizid" name="bizid" type="hidden" value="${bizid}"/>
|
|||
|
|
<div class="input-group-btn">
|
|||
|
|
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
<table id="table"></table>
|