first commit

This commit is contained in:
2026-01-16 14:13:44 +08:00
commit 903ff8d495
34603 changed files with 8585054 additions and 0 deletions

View File

@ -0,0 +1,158 @@
<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail"%>
<%request.setAttribute("Wait", MaintenanceDetail.Status_Wait); %>
<style type="text/css">
.select2-container .select2-selection--single{
height:34px;
line-height: 34px;
}
.select2-selection__arrow{
margin-top:3px;
}
</style>
<script type="text/javascript">
function dosave() {
$('#subForm').data('bootstrapValidator')
.updateStatus('happenDate', 'NOT_VALIDATED',null)
.validateField('happenDate');
$('#subForm').data('bootstrapValidator')
.updateStatus('accidentTypeName', 'NOT_VALIDATED',null)
.validateField('accidentTypeName');
$("#subForm").bootstrapValidator('validate');//提交验证
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath + "/accident/accident/dosave.do", $("#subForm").serialize(), function(data) {
if (data.code == 1){
showAlert('s','保存成功');
closeModal('subModal')
$("#table").bootstrapTable('refresh');
}else if(data.code == 0){
showAlert('d','保存失败');
}else{
showAlert('d',data.res);
}
},'json');
}
}
$("#subForm").bootstrapValidator({
live: 'disabled',//验证时机enabled是内容有变化就验证默认disabled和submitted是提交再验证
fields: {
happenDate: {
validators: {
notEmpty: {
message: '日期不能为空'
}
}
},
happenPlace: {
validators: {
notEmpty: {
message: '地点不能为空'
}
}
},
accidentTypeName: {
validators: {
notEmpty: {
message: '事故分类不能为空'
}
}
},
emergencyPlanTrue: {
validators: {
notEmpty: {
message: '是否响应应急预案不能为空'
}
}
},
}
});
$(function(){
$("#emergencyPlanTrue").select2({ minimumResultsForSearch: 10 }).val("0").trigger("change");
$("#happenDate").datetimepicker({
// startDate: date,
language:'zh-CN',
format: 'yyyy-mm-dd',
startView: "month", //初始化视图是‘年’
minView: 2,
maxView: "year",
autoclose: true
// todayBtn: "linked"
});
});
//选择设备根据厂区id和工艺段id选择厂内设备可多选
var showEquipment4SelectsFun = function(formId,hiddenId,textId) {
$.post(ext.contextPath + '/accident/accidentType/showAccidentType4Select4Use.do', { formId: formId, hiddenId: hiddenId, textId: textId }, function (data) {
$("#equ4SelectDiv").html(data);
openModal("equipment4SelectModal");
});
};
</script>
<div class="modal fade" id="subModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">新增事故管理</h4>
</div>
<div class="modal-body">
<!-- 新增界面formid强制为subForm -->
<form class="form-horizontal" id="subForm">
<!-- 界面提醒div强制id为alertDiv -->
<div id="alertDiv"></div>
<input type="hidden" class="form-control" id="id" name ="id" value ="${accident.id}">
<input type="hidden" class="form-control" id="unitId" name ="unitId" value ="${param.unitId}">
<div class="form-group">
<label class="col-sm-2 control-label">*日期</label>
<div class="col-sm-4">
<input class="form-control" type="text" id="happenDate" name ="happenDate" value="${accident.happenDate}">
</div>
<label class="col-sm-2 control-label">*地点</label>
<div class="col-sm-4">
<input class="form-control" type="text" id="happenPlace" name ="happenPlace" value="${accident.happenPlace}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">事故分类</label>
<div class="col-sm-10">
<input class="form-control" id="accidentTypeId" name="accidentTypeId" type="hidden" value="${accident.accidentTypeId}" />
<input class="form-control" id="accidentTypeName" name ="accidentTypeName" value="${accident.accidentType.name}" onclick="showEquipment4SelectsFun('subForm','accidentTypeId','accidentTypeName');" placeholder="选择事故分类">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">是否响应应急预案</label>
<div class="col-sm-4">
<select id="emergencyPlanTrue" name="emergencyPlanTrue" class="form-control select2">
<option value="1">是</option>
<option value="0">否</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">处理结果</label>
<div class="col-sm-10">
<textarea class="form-control" rows="2" id ="handleResult" name ="handleResult" placeholder="处理结果">${accident.handleResult}</textarea>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>

View File

@ -0,0 +1,311 @@
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail"%>
<%@ 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"%>
<%String contextPath = request.getContextPath();%>
<%request.setAttribute("Finish", MaintenanceDetail.Status_Finish); %>
<%request.setAttribute("Start", MaintenanceDetail.Status_Start); %>
<%request.setAttribute("Wait", MaintenanceDetail.Status_Wait); %>
<!DOCTYPE html>
<!-- <html lang="zh-CN"> -->
<!-- BEGIN HEAD -->
<head>
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
<!-- 引用页头及CSS页-->
<jsp:include page="/jsp/inc.jsp"></jsp:include>
<style type="text/css">
.select2-container .select2-selection--single{
height:34px;
line-height: 34px;
}
.select2-selection__arrow{
margin-top:3px;
}
.table-hover>tbody>tr:hover {
cursor: pointer;
}
</style>
<!-- 文件上传-->
<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">
var addFun = function() {
$.post(ext.contextPath + '/accident/accident/doadd.do', {unitId:unitId} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
var editFun = function(id) {
stopBubbleDefaultEvent();
$.post(ext.contextPath + '/accident/accident/doedit.do', {id:id} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
var viewFun = function(id) {
$.post(ext.contextPath + '/accident/accident/doview.do', {id:id} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
var deleteFun = function(id) {
stopBubbleDefaultEvent();
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 + '/accident/accident/dodelete.do', {id : id}, function(data) {
if(data==1){
$("#table").bootstrapTable('refresh');
}else{
showAlert('d','删除失败','mainAlertdiv');
}
});
}
});
};
var deletesFun = function() {
var checkedItems = $("#table").bootstrapTable('getSelections');
var datas="";
$.each(checkedItems, function(index, item){
datas+=item.id+",";
});
if(datas==""){
showAlert('d','请先选择记录','mainAlertdiv');
}else{
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 + '/accident/accident/dodeletes.do', {ids:datas} , function(data) {
if(data>0){
$("#table").bootstrapTable('refresh');
}else{
showAlert('d','删除失败','mainAlertdiv');
}
});
}
});
}
};
var dosearch = function() {
$("#table").bootstrapTable('refresh');
};
var companyId = unitId;
$(function() {
companyId = unitId;
initFun();
});
var initFun = function(){
$("#table").bootstrapTable({ // 对应table标签的id
url: ext.contextPath + '/accident/accident/getList.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,
search_name: $('#search_name').val(),
unitId: unitId,
// pSectionId: $("#processSection").val(),
// statusSelect:$("#statusSelect").val(),
}
},
onClickRow: function (row) {//单击行事件,执行查看功能
viewFun(row.id);
},
sortName: 'insdt', // 要排序的字段
sortOrder: 'desc', // 排序规则
columns: [
// {
// checkbox: true, // 显示一个勾选框
// },
{
field: 'happenDate', // 返回json数据中的name
title: '日期', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle',
formatter:function(value,row,index){
return value.substring(0,10);
}
},{
field: 'happenPlace', // 返回json数据中的name
title: '地点', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
},{
field: 'accidentType.name', // 返回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: 'user.caption', // 返回json数据中的name
title: '上报人', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
}
// ,{
// title: "操作",
// align: 'center',
// valign: 'middle',
// width: 120, // 定义列的宽度单位为像素px
// formatter: function (value, row, index) {
// var buts="";
// buts+= '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
// buts+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteFun(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
// buts='<div class="btn-group" >'+buts+'</div>';
// return buts;
// }
// }
],
onLoadSuccess: function(){ //加载成功时执行
adjustBootstrapTableView("table");
},
onLoadError: function(){ //加载失败时执行
console.info("加载数据失败");
}
});
}
</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" style="width: 220px;height:10px;"></div>
<div id="subDivAbnorm"></div>
<div id="menu4SelectDiv"></div>
<div id="equ4SelectDiv"></div>
<div id="library4SelectDiv"></div>
<div id="problemTyp4SelectDiv"></div>
<div id="user4SelectDiv"></div>
<div id="fileInputDiv"></div>
<div >
<div class="form-group " style="margin-bottom:10px;">
<input id="search_pid" name="search_pid" type="hidden" />
<span id="companyName" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold"></span>
</div>
<div class="form-group form-inline" style="padding:0;">
<div class="btn-group" style="width: 280px;padding-bottom:10px;">
<!-- <security:authorize buttonUrl="maintenance/abnormity/add.do"> -->
<!-- <button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i class="fa fa-plus"></i> 新增</button>
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button> -->
<!--
<button type="button" class="btn btn-default btn-sm" title="异常中有设备的生成维修,没设备的生成缺陷" onclick="createDefectFun();"><i class="fa fa-send-o"></i>生成缺陷或维修单</button> -->
<!-- </security:authorize> -->
</div>
<!--
<div class="form-group pull-right form-inline" >
<div class="form-group">
<label class="form-label">工艺段:</label>
<select class="form-control select2 " id="processSection" name ="processSection" style="width: 160px;"></select>
<label class="form-label">状态:</label>
<select class="form-control select2 " id="statusSelect" name ="statusSelect" style="width: 160px;">
<option value= "${Wait}">待处理</option>
<option value= "${Start}">处理中</option>
<option value= "${Finish}">已完成</option>
</select>
</div>
<div class="form-group" >
<div class="input-group input-group-sm" style="width: 250px;">
<input type="text" id="search_name" name="search_name" class="form-control pull-right" style="height:34px;" placeholder="名称">
<div class="input-group-btn">
<button class="btn btn-default" style="height:34px;" onclick="dosearch();"><i class="fa fa-search"></i></button>
</div>
</div>
</div>
</div> -->
</div>
<table id="table"></table>
</div>
</section>
<!-- /.content -->
</div>
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
</div>
</body>
<!-- bootstrap switch -->
<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>

View File

@ -0,0 +1,154 @@
<%@ page language="java" pageEncoding="UTF-8"%>
<style type="text/css">
.select2-container .select2-selection--single{
height:34px;
line-height: 34px;
}
.select2-selection__arrow{
margin-top:3px;
}
</style>
<script type="text/javascript">
function doupdate() {
$('#subForm').data('bootstrapValidator')
.updateStatus('happenDate', 'NOT_VALIDATED',null)
.validateField('happenDate');
$('#subForm').data('bootstrapValidator')
.updateStatus('accidentTypeName', 'NOT_VALIDATED',null)
.validateField('accidentTypeName');
$("#subForm").bootstrapValidator('validate');//提交验证
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath + "/accident/accident/doupdate.do", $("#subForm").serialize(), function(data) {
if (data.code == 1){
showAlert('s','保存成功');
closeModal('subModal')
$("#table").bootstrapTable('refresh');
}else if(data.code == 0){
showAlert('d','保存失败');
}else{
showAlert('d',data.msg);
}
},'json');
}
}
$("#subForm").bootstrapValidator({
live: 'disabled',//验证时机enabled是内容有变化就验证默认disabled和submitted是提交再验证
fields: {
happenDate: {
validators: {
notEmpty: {
message: '日期不能为空'
}
}
},
happenPlace: {
validators: {
notEmpty: {
message: '地点不能为空'
}
}
},
accidentTypeName: {
validators: {
notEmpty: {
message: '事故分类不能为空'
}
}
},
emergencyPlanTrue: {
validators: {
notEmpty: {
message: '是否响应应急预案不能为空'
}
}
},
}
});
$(function(){
$("#emergencyPlanTrue").select2({ minimumResultsForSearch: 10 }).val("${accident.emergencyPlanTrue}").trigger("change");
$("#happenDate").datetimepicker({
// startDate: date,
language:'zh-CN',
format: 'yyyy-mm-dd',
startView: "month", //初始化视图是‘年’
minView: 2,
maxView: "year",
autoclose: true
// todayBtn: "linked"
});
})
//选择设备根据厂区id和工艺段id选择厂内设备可多选
var showEquipment4SelectsFun = function(formId,hiddenId,textId) {
$.post(ext.contextPath + '/accident/accidentType/showAccidentType4Select4Use.do', { formId: formId, hiddenId: hiddenId, textId: textId }, function (data) {
$("#equ4SelectDiv").html(data);
openModal("equipment4SelectModal");
});
};
</script>
<div class="modal fade" id="subModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">编辑事故管理</h4>
</div>
<div class="modal-body">
<!-- 新增界面formid强制为subForm -->
<form class="form-horizontal" id="subForm">
<!-- 界面提醒div强制id为alertDiv -->
<div id="alertDiv"></div>
<input type="hidden" class="form-control" id="id" name ="id" value ="${accident.id}">
<input type="hidden" class="form-control" id="unitId" name ="unitId" value ="${accident.unitId}">
<div class="form-group">
<label class="col-sm-2 control-label">*日期</label>
<div class="col-sm-4">
<input class="form-control" type="text" id="happenDate" name ="happenDate" value="${accident.happenDate.substring(0,10)}">
</div>
<label class="col-sm-2 control-label">*地点</label>
<div class="col-sm-4">
<input class="form-control" type="text" id="happenPlace" name ="happenPlace" value="${accident.happenPlace}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">事故分类</label>
<div class="col-sm-10">
<input class="form-control" id="accidentTypeId" name="accidentTypeId" type="hidden" value="${accident.accidentTypeId}" />
<input class="form-control" id="accidentTypeName" name ="accidentTypeName" value="${accident.accidentType.name}" onclick="showEquipment4SelectsFun('subForm','accidentTypeId','accidentTypeName');" placeholder="选择事故分类">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">是否响应应急预案</label>
<div class="col-sm-4">
<select id="emergencyPlanTrue" name="emergencyPlanTrue" class="form-control select2">
<option value="1">是</option>
<option value="0">否</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">处理结果</label>
<div class="col-sm-10">
<textarea class="form-control" rows="2" id ="handleResult" name ="handleResult" placeholder="处理结果">${accident.handleResult}</textarea>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" onclick="doupdate()" id="btn_save">保存</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>

View File

@ -0,0 +1,308 @@
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail"%>
<%@ 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"%>
<%String contextPath = request.getContextPath();%>
<%request.setAttribute("Finish", MaintenanceDetail.Status_Finish); %>
<%request.setAttribute("Start", MaintenanceDetail.Status_Start); %>
<%request.setAttribute("Wait", MaintenanceDetail.Status_Wait); %>
<!DOCTYPE html>
<!-- <html lang="zh-CN"> -->
<!-- BEGIN HEAD -->
<head>
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
<!-- 引用页头及CSS页-->
<jsp:include page="/jsp/inc.jsp"></jsp:include>
<style type="text/css">
.select2-container .select2-selection--single{
height:34px;
line-height: 34px;
}
.select2-selection__arrow{
margin-top:3px;
}
.table-hover>tbody>tr:hover {
cursor: pointer;
}
</style>
<!-- 文件上传-->
<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">
var addFun = function() {
$.post(ext.contextPath + '/accident/accident/doadd.do', {unitId:unitId} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
var editFun = function(id) {
stopBubbleDefaultEvent();
$.post(ext.contextPath + '/accident/accident/doedit.do', {id:id} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
var viewFun = function(id) {
$.post(ext.contextPath + '/accident/accident/doview.do', {id:id} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
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 + '/accident/accident/dodelete.do', {id : id}, function(data) {
if(data.code=="1"){
$("#table").bootstrapTable('refresh');
}else{
showAlert('d','删除失败','mainAlertdiv');
}
},'json');
}
});
};
var deletesFun = function() {
var checkedItems = $("#table").bootstrapTable('getSelections');
var datas="";
$.each(checkedItems, function(index, item){
datas+=item.id+",";
});
if(datas==""){
showAlert('d','请先选择记录','mainAlertdiv');
}else{
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 + '/accident/accident/dodeletes.do', {ids:datas} , function(data) {
if(data.code>0){
$("#table").bootstrapTable('refresh');
}else{
showAlert('d','删除失败','mainAlertdiv');
}
},'json');
}
});
}
};
var dosearch = function() {
$("#table").bootstrapTable('refresh');
};
var companyId = unitId;
$(function() {
companyId = unitId;
initFun();
});
var initFun = function(){
$("#table").bootstrapTable({ // 对应table标签的id
url: ext.contextPath + '/accident/accident/getList.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,
search_name: $('#search_name').val(),
unitId: unitId,
// pSectionId: $("#processSection").val(),
// statusSelect:$("#statusSelect").val(),
}
},
// onClickRow: function (row) {//单击行事件,执行查看功能
// viewFun(row.id);
// },
sortName: 'insdt', // 要排序的字段
sortOrder: 'desc', // 排序规则
columns: [
{
checkbox: true, // 显示一个勾选框
},{
field: 'happenDate', // 返回json数据中的name
title: '日期', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle',
formatter:function(value,row,index){
return value.substring(0,10);
}
},{
field: 'happenPlace', // 返回json数据中的name
title: '地点', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
},{
field: 'accidentType.name', // 返回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: 'user.caption', // 返回json数据中的name
title: '上报人', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
},{
title: "操作",
align: 'center',
valign: 'middle',
width: 120, // 定义列的宽度单位为像素px
formatter: function (value, row, index) {
var buts="";
buts+= '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
buts+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteFun(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
buts='<div class="btn-group" >'+buts+'</div>';
return buts;
}
}
],
onLoadSuccess: function(){ //加载成功时执行
adjustBootstrapTableView("table");
},
onLoadError: function(){ //加载失败时执行
console.info("加载数据失败");
}
});
}
</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" style="width: 220px;height:10px;"></div>
<div id="subDivAbnorm"></div>
<div id="menu4SelectDiv"></div>
<div id="equ4SelectDiv"></div>
<div id="library4SelectDiv"></div>
<div id="problemTyp4SelectDiv"></div>
<div id="user4SelectDiv"></div>
<div id="fileInputDiv"></div>
<div >
<div class="form-group " style="margin-bottom:10px;">
<input id="search_pid" name="search_pid" type="hidden" />
<span id="companyName" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold"></span>
</div>
<div class="form-group form-inline" style="padding:0;">
<div class="btn-group" style="width: 280px;padding-bottom:10px;">
<!-- <security:authorize buttonUrl="maintenance/abnormity/add.do"> -->
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i class="fa fa-plus"></i> 新增</button>
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button>
<!--
<button type="button" class="btn btn-default btn-sm" title="异常中有设备的生成维修,没设备的生成缺陷" onclick="createDefectFun();"><i class="fa fa-send-o"></i>生成缺陷或维修单</button> -->
<!-- </security:authorize> -->
</div>
<!--
<div class="form-group pull-right form-inline" >
<div class="form-group">
<label class="form-label">工艺段:</label>
<select class="form-control select2 " id="processSection" name ="processSection" style="width: 160px;"></select>
<label class="form-label">状态:</label>
<select class="form-control select2 " id="statusSelect" name ="statusSelect" style="width: 160px;">
<option value= "${Wait}">待处理</option>
<option value= "${Start}">处理中</option>
<option value= "${Finish}">已完成</option>
</select>
</div>
<div class="form-group" >
<div class="input-group input-group-sm" style="width: 250px;">
<input type="text" id="search_name" name="search_name" class="form-control pull-right" style="height:34px;" placeholder="名称">
<div class="input-group-btn">
<button class="btn btn-default" style="height:34px;" onclick="dosearch();"><i class="fa fa-search"></i></button>
</div>
</div>
</div>
</div> -->
</div>
<table id="table"></table>
</div>
</section>
<!-- /.content -->
</div>
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
</div>
</body>
<!-- bootstrap switch -->
<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>

View File

@ -0,0 +1,43 @@
<%@ page language="java" pageEncoding="UTF-8"%>
<script type="text/javascript">
var selectMenu = function() {
alert('${param.hiddenId}'+'${param.textId}');
}
$(function() {
$.post(ext.contextPath + '/accident/accidentType/getAccidentTypeTree.do', {ng:''} , function(data) {
// console.info(data);
if(data.length>0){
$('#menu_select_tree').treeview({
data: data,
});
$('#menu_select_tree').on('nodeSelected', function(event, data) {
$('#${param.formId} #${param.hiddenId}' ).val(data.id);
$('#${param.formId} #${param.textId}').val(data.text);
closeModal("menu4SelectModal")
});
}
},'json');
});
</script>
<div class="modal fade" id="menu4SelectModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">选择事故分类</h4>
</div>
<div class="modal-body">
<div id="menu_select_tree" style="height:430px;overflow:auto;width:100%"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<!-- <button type="button" class="btn btn-primary" onclick="selectMenu()">保存</button> -->
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>

View File

@ -0,0 +1,43 @@
<%@ page language="java" pageEncoding="UTF-8"%>
<script type="text/javascript">
var selectMenu = function() {
alert('${param.hiddenId}'+'${param.textId}');
}
$(function() {
$.post(ext.contextPath + '/accident/accidentType/getAccidentTypeTree4Use.do', {ng:''} , function(data) {
// console.info(data);
if(data.length>0){
$('#menu_select_tree').treeview({
data: data,
});
$('#menu_select_tree').on('nodeSelected', function(event, data) {
$('#${param.formId} #${param.hiddenId}' ).val(data.id);
$('#${param.formId} #${param.textId}').val(data.text);
closeModal("equipment4SelectModal")
});
}
},'json');
});
</script>
<div class="modal fade" id="equipment4SelectModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">选择事故分类</h4>
</div>
<div class="modal-body">
<div id="menu_select_tree" style="height:430px;overflow:auto;width:100%"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<!-- <button type="button" class="btn btn-primary" onclick="selectMenu()">保存</button> -->
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>

View File

@ -0,0 +1,143 @@
<%@ page language="java" pageEncoding="UTF-8"%>
<style type="text/css">
.select2-container .select2-selection--single {
height: 34px;
line-height: 34px;
}
.select2-selection__arrow {
margin-top: 3px;
}
</style>
<script type="text/javascript">
var showMenu4SelectFun = function () {
$.post(ext.contextPath + '/accident/accidentType/showAccidentType4Select.do', { formId: "subForm", hiddenId: "pid", textId: "_pname" }, function (data) {
$("#menu4SelectDiv").html(data);
openModal('menu4SelectModal');
});
};
function dosave() {
$("#subForm").bootstrapValidator('validate');//提交验证
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath + "/accident/accidentType/dosave.do", $("#subForm").serialize(), function (result) {
if (result.code == 1) {
initTreeView();
showAlert('s','保存成功');
} else {
showAlert('d', '保存失败');
}
},'json');
}
}
$("#subForm").bootstrapValidator({
live: 'disabled',//验证时机enabled是内容有变化就验证默认disabled和submitted是提交再验证
fields: {
name: {
validators: {
notEmpty: {
message: '名称不能为空'
}
}
},
// _pname: {
// validators: {
// notEmpty: {
// message: '上级菜单不能为空'
// }
// }
// },
morder: {
validators: {
notEmpty: {
message: '顺序不能为空'
},
regexp: {
regexp: /^[0-9]*$/,
message: '顺序必须为数字'
}
}
},
active: {
validators: {
notEmpty: {
message: '启用不能为空'
}
}
}
}
});
$(function () {
//var active=$("#active").select2();
$("#active").select2({ minimumResultsForSearch: 10 }).val("").trigger("change");
});
</script>
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">新增</h3>
<div class="box-tools pull-right">
<a onclick="dosave()" class="btn btn-box-tool" data-toggle="tooltip" title="保存"><i
class="glyphicon glyphicon-floppy-disk"></i></a>
</div>
</div>
<!-- /.box-header -->
<div class="box-body ">
<form class="form-horizontal " id="subForm">
<input id="id" name="id" type="hidden" value="${accidentType.id}" />
<!-- 界面提醒div强制id为alertDiv -->
<div id="alertDiv"></div>
<div id="menu4SelectDiv"></div>
<div class="form-group">
<label class="col-sm-2 control-label">名称</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="name" name="name" placeholder="名称"
value="${accidentType.name}">
</div>
<label class="col-sm-2 control-label">上级分类</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="_pname" name="_pname" placeholder="上级分类"
onclick="showMenu4SelectFun();" value="${pname}">
<input id="pid" name="pid" type="hidden" value="${param.pid}" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">危害性描述</label>
<div class="col-sm-10">
<textarea class="form-control" rows="2" id ="harmDescription" name ="harmDescription" placeholder="危害性描述">${accidentType.harmDescription}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">注意事项</label>
<div class="col-sm-10">
<textarea class="form-control" rows="2" id ="note" name ="note" placeholder="注意事项">${accidentType.note}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">备注</label>
<div class="col-sm-10">
<textarea class="form-control" rows="2" id ="memo" name ="memo" placeholder="备注">${accidentType.meme}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">顺序</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="morder" name="morder" placeholder="顺序"
value="${accidentType.morder}">
</div>
<label class="col-sm-2 control-label">启用</label>
<div class="col-sm-4">
<select id="active" name="active" class="form-control select2">
<option value="启用">启用</option>
<option value="禁用">禁用</option>
</select>
</div>
</div>
</form>
</div>
</div>

View File

@ -0,0 +1,183 @@
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<style type="text/css">
.select2-container .select2-selection--single {
height: 34px;
line-height: 34px;
}
.select2-selection__arrow {
margin-top: 3px;
}
</style>
<script type="text/javascript">
var showMenu4SelectFun = function () {
$.post(ext.contextPath + '/accident/accidentType/showAccidentType4Select.do', { formId: "subForm", hiddenId: "pid", textId: "_pname" }, function (data) {
$("#menu4SelectDiv").html(data);
openModal("menu4SelectModal")
});
};
function dosave() {
$("#subForm").bootstrapValidator('validate');//提交验证
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath + "/accident/accidentType/doupdate.do", $("#subForm").serialize(), function (result) {
if (result.code == 1) {
showAlert('s', '保存成功');
} else {
showAlert('d', '保存失败');
}
},'json');
}
}
$("#subForm").bootstrapValidator({
live: 'disabled',//验证时机enabled是内容有变化就验证默认disabled和submitted是提交再验证
fields: {
name: {
validators: {
notEmpty: {
message: '名称不能为空'
}
}
},
_pname: {
validators: {
notEmpty: {
message: '上级菜单不能为空'
}
}
},
morder: {
validators: {
notEmpty: {
message: '顺序不能为空'
},
regexp: {
regexp: /^[0-9]*$/,
message: '顺序必须为数字'
}
}
},
active: {
validators: {
notEmpty: {
message: '启用不能为空'
}
}
}
}
});
function dodel() {
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 + '/accident/accidentType/dodelete.do', $("#subForm").serialize(), function (data) {
if (data.code > 0) {
initTreeView();
showAlert('s', '删除成功');
} else {
showAlert('d', data.msg);
}
}, 'json');
}
});
}
$(function () {
$("#active").select2({ minimumResultsForSearch: 10 }).val("${accidentType.active}").trigger("change");
});
</script>
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">详情</h3>
<div class="box-tools pull-right">
<a onclick="dosave()" class="btn btn-box-tool" data-toggle="tooltip" title="保存"><i
class="glyphicon glyphicon-floppy-disk"></i></a>
<a onclick="dodel()" class="btn btn-box-tool" data-toggle="tooltip" title="删除"><i
class="glyphicon glyphicon-trash"></i></a>
</div>
</div>
<!-- /.box-header -->
<div class="box-body ">
<form class="form-horizontal " id="subForm">
<input id="id" name="id" type="hidden" value="${accidentType.id}" />
<!-- 界面提醒div强制id为alertDiv -->
<div id="alertDiv"></div>
<div id="menu4SelectDiv"></div>
<div class="form-group">
<label class="col-sm-2 control-label">名称</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="name" name="name" placeholder="名称" value="${accidentType.name}">
</div>
<label class="col-sm-2 control-label">上级分类</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="_pname" name="_pname" placeholder="上级分类"
onclick="showMenu4SelectFun();" value="${pname}">
<input id="pid" name="pid" type="hidden" value="${accidentType.pid}" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">危害性描述</label>
<div class="col-sm-10">
<textarea class="form-control" rows="2" id ="harmDescription" name ="harmDescription" placeholder="危害性描述">${accidentType.harmDescription}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">注意事项</label>
<div class="col-sm-10">
<textarea class="form-control" rows="2" id ="note" name ="note" placeholder="注意事项">${accidentType.note}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">备注</label>
<div class="col-sm-10">
<textarea class="form-control" rows="2" id ="memo" name ="memo" placeholder="备注">${accidentType.memo}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">顺序</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="morder" name="morder" placeholder="顺序"
value="${accidentType.morder}">
</div>
<label class="col-sm-2 control-label">启用</label>
<div class="col-sm-4">
<select id="active" name="active" class="form-control select2">
<option value="启用">启用</option>
<option value="禁用">禁用</option>
</select>
</div>
</div>
</form>
</div>
</div>

View File

@ -0,0 +1,100 @@
<%@ 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>
<script type="text/javascript">
var addFun = function() {
var node=$('#tree').treeview('getSelected');
var pid="";
if(node!=null && node.length>0){
pid=node[0].id;
}
$.post(ext.contextPath + '/accident/accidentType/doadd.do', {pid:pid} , function(data) {
$("#menuBox").html(data);
});
};
var editFun = function(id) {
$.post(ext.contextPath + '/accident/accidentType/doedit.do', {id:id} , function(data) {
$("#menuBox").html(data);
});
};
var initTreeView = function() {
$.post(ext.contextPath + '/accident/accidentType/getAccidentTypeTree.do', {ng:''} , function(data) {
//console.info(data)
$('#tree').treeview({data: data,
});
$('#tree').on('nodeSelected', function(event, data) {
editFun(data.id);
//var node=$('#tree').treeview('getSelected');
});
},'json');
$("#menuBox").html("");
};
$(function() {
initTreeView();
});
</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 class="row">
<div class="col-md-3">
<div class="box box-solid">
<div class="box-header with-border">
<h3 class="box-title">事故分类</h3>
<div class="box-tools">
<button type="button" class="btn btn-box-tool" onclick="addFun();"><i class="fa fa-plus"></i>
</button>
</div>
</div>
<div class="box-body no-padding">
<div id="tree" style="height:550px;overflow:auto; "></div>
</div>
<!-- /.box-body -->
</div>
</div>
<div class="col-md-9" id="menuBox">
</div>
</div>
</section>
<!-- /.content -->
</div>
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
</div>
</body>
</html>

View File

@ -0,0 +1,157 @@
<%@ page language="java" pageEncoding="UTF-8"%>
<style type="text/css">
.select2-container .select2-selection--single{
height:34px;
line-height: 34px;
}
.select2-selection__arrow{
margin-top:3px;
}
</style>
<script type="text/javascript">
function doupdate() {
$('#subForm').data('bootstrapValidator')
.updateStatus('happenDate', 'NOT_VALIDATED',null)
.validateField('happenDate');
$('#subForm').data('bootstrapValidator')
.updateStatus('accidentTypeName', 'NOT_VALIDATED',null)
.validateField('accidentTypeName');
$("#subForm").bootstrapValidator('validate');//提交验证
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath + "/accident/accident/doupdate.do", $("#subForm").serialize(), function(data) {
if (data.code == 1){
showAlert('s','保存成功');
closeModal('subModal')
$("#table").bootstrapTable('refresh');
}else if(data.code == 0){
showAlert('d','保存失败');
}else{
showAlert('d',data.msg);
}
},'json');
}
}
$("#subForm").bootstrapValidator({
live: 'disabled',//验证时机enabled是内容有变化就验证默认disabled和submitted是提交再验证
fields: {
happenDate: {
validators: {
notEmpty: {
message: '日期不能为空'
}
}
},
happenPlace: {
validators: {
notEmpty: {
message: '地点不能为空'
}
}
},
accidentTypeName: {
validators: {
notEmpty: {
message: '事故分类不能为空'
}
}
},
emergencyPlanTrue: {
validators: {
notEmpty: {
message: '是否响应应急预案不能为空'
}
}
},
}
});
$(function(){
// $("#emergencyPlanTrue").select2("disable",true);
$("#emergencyPlanTrue").select2({ minimumResultsForSearch: 10 }).val("${accident.emergencyPlanTrue}").trigger("change");
$("#happenDate").datetimepicker({
// startDate: date,
language:'zh-CN',
format: 'yyyy-mm-dd',
startView: "month", //初始化视图是‘年’
minView: 2,
maxView: "year",
autoclose: true
// todayBtn: "linked"
});
})
//选择设备根据厂区id和工艺段id选择厂内设备可多选
var showEquipment4SelectsFun = function(formId,hiddenId,textId) {
$.post(ext.contextPath + '/accident/accidentType/showAccidentType4Select4Use.do', { formId: formId, hiddenId: hiddenId, textId: textId }, function (data) {
$("#equ4SelectDiv").html(data);
openModal("equipment4SelectModal");
});
};
</script>
<div class="modal fade" id="subModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">编辑事故管理</h4>
</div>
<div class="modal-body">
<!-- 新增界面formid强制为subForm -->
<form class="form-horizontal" id="subForm">
<!-- 界面提醒div强制id为alertDiv -->
<div id="alertDiv"></div>
<input type="hidden" class="form-control" id="id" name ="id" value ="${accident.id}">
<input type="hidden" class="form-control" id="unitId" name ="unitId" value ="${accident.unitId}">
<div class="form-group">
<label class="col-sm-2 control-label">*日期</label>
<div class="col-sm-4">
<input class="form-control" type="text" id="happenDate" name ="happenDate" value="${accident.happenDate.substring(0,10)}" readonly>
</div>
<label class="col-sm-2 control-label">*地点</label>
<div class="col-sm-4">
<input class="form-control" type="text" id="happenPlace" name ="happenPlace" value="${accident.happenPlace}" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">事故分类</label>
<div class="col-sm-10">
<input class="form-control" id="accidentTypeId" name="accidentTypeId" type="hidden" value="${accident.accidentTypeId}" />
<input class="form-control" id="accidentTypeName" name ="accidentTypeName" value="${accident.accidentType.name}" onclick="showEquipment4SelectsFun('subForm','accidentTypeId','accidentTypeName');" placeholder="选择事故分类" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">是否响应应急预案</label>
<div class="col-sm-4">
<select disabled="disabled" id="emergencyPlanTrue" name="emergencyPlanTrue" class="form-control select2" readonly>
<option value="1">是</option>
<option value="0">否</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">处理结果</label>
<div class="col-sm-10">
<textarea class="form-control" rows="2" id ="handleResult" name ="handleResult" placeholder="处理结果" readonly>${accident.handleResult}</textarea>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<!-- <button type="button" class="btn btn-primary" onclick="doupdate()" id="btn_save">保存</button> -->
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>

View File

@ -0,0 +1,189 @@
<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="com.sipai.entity.accident.AccidentCommString"%>
<%request.setAttribute("START", AccidentCommString.STATUS_RA_START); %>
<%request.setAttribute("AUDIT", AccidentCommString.STATUS_RA_AUDIT); %>
<style type="text/css">
.select2-container .select2-selection--single{
height:34px;
line-height: 34px;
}
.select2-selection__arrow{
margin-top:3px;
}
</style>
<script type="text/javascript">
function dosave() {
$('#subForm').data('bootstrapValidator')
.updateStatus('solvername', 'NOT_VALIDATED',null)
.validateField('happenDate');
$("#subForm").bootstrapValidator('validate');//提交验证
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath + "/accident/reasonableAdvice/dosave.do", $("#subForm").serialize(), function(data) {
if (data.code == 1){
showAlert('s','保存成功');
closeModal('subModal')
$("#table").bootstrapTable('refresh');
}else if(data.code == 0){
showAlert('d','保存失败');
}else{
showAlert('d',data.res);
}
},'json');
}
}
function dosubmit(){
$("#takeFlag").val('${AUDIT}');
$('#subForm').data('bootstrapValidator')
.updateStatus('auditManName', 'NOT_VALIDATED',null)
.validateField('auditManName');
$("#subForm").bootstrapValidator('validate');//提交验证
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath +"/accident/reasonableAdvice/startProcess.do", $("#subForm").serialize(), function(data) {
if (data.res == 1) {
$("#table").bootstrapTable('refresh');
closeModal('subModal');
}else if(data.res == 0){
showAlert('d','保存失败');
}else if(data.res == 2){
showAlert('d','未检测到合理化建议审核流程,请先部署合理化建议审核流程!');
}else{
showAlert('d',data.res);
}
},'json');
}
}
//提交时先验证审核人不能为空,保存时审核人可以为空
function submitFun(){
//新增的输入框添加验证
$("#subForm").data('bootstrapValidator').addField('auditManName',{
validators: {
notEmpty: {
message: '审核人不能为空'
},
}
});
dosubmit();
}
$("#subForm").bootstrapValidator({
live: 'disabled',//验证时机enabled是内容有变化就验证默认disabled和submitted是提交再验证
fields: {
name: {
validators: {
notEmpty: {
message: '名称不能为空'
}
}
},
solvername: {
validators: {
notEmpty: {
message: '建议人不能为空'
}
}
}
}
});
$(function(){
});
var showUser4SelectsFun = function() {
var userIds= $("#userLead").val();
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"subForm",hiddenId:"userLead",textId:"solvername",userIds:userIds} , function(data) {
$("#user4SelectDiv").html(data);
openModal("user4SelectModal");
});
};
var showUser4SelectsFun1 = function() {
var userIds= $("#usersHelp").val();
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"subForm",hiddenId:"usersHelp",textId:"solvername1",userIds:userIds} , function(data) {
$("#user4SelectDiv").html(data);
openModal("user4SelectModal");
});
};
//选择审核人
var showUser4AuditSelectsFun = function() {
var userIds= $("#auditManId").val();
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"subForm",hiddenId:"auditManId",textId:"auditManName",userIds:userIds} , function(data) {
$("#user4SelectDiv").html(data);
openModal("user4SelectModal");
});
};
</script>
<div class="modal fade" id="subModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">新增合理化建议</h4>
</div>
<div class="modal-body">
<!-- 新增界面formid强制为subForm -->
<form class="form-horizontal" id="subForm">
<!-- 界面提醒div强制id为alertDiv -->
<div id="alertDiv"></div>
<input type="hidden" class="form-control" id="id" name ="id" value ="${reasonableAdvice.id}">
<input type="hidden" class="form-control" id="unitId" name ="unitId" value ="${param.unitId}">
<input type="hidden" class="form-control" id="takeFlag" name ="takeFlag" value ="${START}">
<div class="form-group">
<label class="col-sm-2 control-label">*建议名称</label>
<div class="col-sm-10">
<input class="form-control" type="text" id="name" name ="name" placeholder="名称" value="${reasonableAdvice.name}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">建议类型</label>
<div class="col-sm-10">
<input class="form-control" type="text" id="adviceType" name ="adviceType" placeholder="类型" value="${reasonableAdvice.adviceType}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">建议内容</label>
<div class="col-sm-10">
<textarea class="form-control" rows="5" id ="content" name ="content" placeholder="不超过500字">${reasonableAdvice.content}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">*建议人</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="solvername" name ="solvername" placeholder="请选择建议人" onclick="showUser4SelectsFun();" value="${userName}">
<input id="userLead" name="userLead" type="hidden" value="${userId}" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">辅议人</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="solvername1" name ="solvername1" placeholder="请选择辅议人" onclick="showUser4SelectsFun1();">
<input id="usersHelp" name="usersHelp" type="hidden" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">审核人</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="auditManName" name="auditManName" placeholder="点击选择" onclick="showUser4AuditSelectsFun();">
<input id="auditManId" name="auditManId" type="hidden" />
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
<button type="button" class="btn btn-primary" onclick="submitFun()" id="btn_submit">提交</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>

View File

@ -0,0 +1,178 @@
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@page import="com.sipai.entity.accident.AccidentCommString"%>
<%request.setAttribute("AUDIT", AccidentCommString.STATUS_RA_AUDIT); %>
<%request.setAttribute("START", AccidentCommString.STATUS_RA_START); %>
<%request.setAttribute("FINISH", AccidentCommString.STATUS_RA_FINISH); %>
<%request.setAttribute("FAIL", AccidentCommString.STATUS_RA_FAIL); %>
<style type="text/css">
.select2-container .select2-selection--single{
height:34px;
line-height: 34px;
}
.select2-selection__arrow{
margin-top:3px;
}
</style>
<script type="text/javascript">
//流程审核文件上传所需参数
var masterId_process = '${reasonableAdvice.id}';//业务Id
var tbName_process = 'TB_Process_UploadFile'; //数据表
var nameSpace_process ='ProcessUploadFile';//保存文件夹
var status = 'delete';//有删除权限
function doSubmit() {
$('#subForm').data('bootstrapValidator')
.updateStatus('targetUsersName', 'NOT_VALIDATED',null)
.validateField('targetUsersName');
$("#subForm").bootstrapValidator('validate');//提交验证
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码 */
$.post(ext.contextPath + "/accident/reasonableAdvice/AuditReasonableAdvice.do", $("#subForm").serialize(), function(data) {
if (data.res == 1) {
closeModal('subModal')
$("#table").bootstrapTable('refresh');
}else if(data.res == 0){
showAlert('d','操作执行失败,请重试');
}else{
showAlert('d',data.res);
}
},'json');
}
}
var showUser4SelectsFun = function() {
var userIds= $("#targetusers").val();
var jobIds= $("#targetjobs").val();
$.post(ext.contextPath + '/user/userForSelectByCompany.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds,jobIds:jobIds} , function(data) {
$("#user4SelectDiv").html(data);
openModal("user4SelectModal");
});
};
$(function(){
//初始化文件显示
getFileList_process();
//初始化选择框方法在workflow.js里
processSelectNode("${businessUnitAudit.taskid}");
//输入框验证
$("#subForm").bootstrapValidator({
live: 'disabled',//验证时机enabled是内容有变化就验证默认disabled和submitted是提交再验证
fields: {
targetUsersName: {
validators: {
notEmpty: {
message: '提交人员不能为空'
}
}
},
}
});
//显示流程详情
var id = '${reasonableAdvice.id}';
$.post(ext.contextPath + '/accident/reasonableAdvice/showProcessReasonableAdviceView.do', {id:id,inModal:'inModal'} , function(data) {
$("#showView").html(data);
});
})
</script>
<div class="modal fade" id="subModal">
<div class="modal-dialog modal-xlg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">流程处理(${taskName})</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-7 col-xs-12">
<!-- 新增界面formid强制为subForm -->
<form class="form-horizontal" id="subForm" enctype="multipart/form-data" >
<!-- 界面提醒div强制id为alertDiv -->
<div id="alertDiv"></div>
<div class="form-group">
<label class="col-sm-3 control-label">建议名称</label>
<div class="col-sm-3">
<p class="form-control-static" >${reasonableAdvice.name}</p>
</div>
<label class="col-sm-3 control-label">建议类型</label>
<div class="col-sm-3">
<p class="form-control-static" >${reasonableAdvice.adviceType}</p>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">建议内容</label>
<div class="col-sm-9">
<p class="form-control-static" >${reasonableAdvice.content}</p>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">建议人</label>
<div class="col-sm-3">
<p class="form-control-static" >${solvername}</p>
</div>
<label class="col-sm-3 control-label">辅议人</label>
<div class="col-sm-3">
<p class="form-control-static" >${solvername1}</p>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">审核人</label>
<div class="col-sm-9">
${reasonableAdvice.auditManName}
</div>
</div>
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
<div class="form-group">
<label class="col-sm-3 control-label">*审核结果</label>
<div class="col-sm-3">
<select class="form-control select2" id="passstatus" name ="passstatus" style="width: 100%;">
<option value= true>采纳</option>
<option value= false>不采纳</option>
</select>
</div>
<label class="col-sm-2 control-label">*下一节点</label>
<div class="col-sm-4">
<select class="form-control select2" id="routeNum" name ="routeNum" style="width: 100%;">
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">审核意见</label>
<div class="col-sm-6">
<textarea class="form-control" rows="2" id ="auditopinion" name ="auditopinion" placeholder="检验意见">通过</textarea>
</div>
</div>
<div id = "selectUsers" class="form-group">
<label class="col-sm-3 control-label">提交至:</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4SelectsFun();" >
<input id="targetusers" name="targetusers" type="hidden" value=""/>
<input class="form-control" id="targetjobs" name="targetjobs" type="hidden" value=""/>
</div>
</div>
<!-- 文件上传,显示 -->
<div class="form-group" style="margin:8px">
<label class="col-sm-3 control-label"></label>
<button type="button" class="btn btn-default btn-file" onclick="fileinput_process()" id="btn_save"><i class="fa fa-paperclip"></i>上传文件</button>
</div>
<div id="fileArea">
</div>
</form>
</div>
<div class="col-md-5 col-xs-12" id="showView"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" onclick="doSubmit()" id="btn_update">提交</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>

View File

@ -0,0 +1,281 @@
<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="com.sipai.entity.accident.AccidentCommString"%>
<%request.setAttribute("START", AccidentCommString.STATUS_RA_START); %>
<%request.setAttribute("AUDIT", AccidentCommString.STATUS_RA_AUDIT); %>
<style type="text/css">
.select2-container .select2-selection--single{
height:34px;
line-height: 34px;
}
.select2-selection__arrow{
margin-top:3px;
}
</style>
<script type="text/javascript">
var masterId1='${reasonableAdvice.id}';
var tbName1='TB_Process_UploadFile'; //数据表
var nameSpace1='ProcessUploadFile';//保存文件夹
var previews = new Array();
var previewConfigs = new Array();
function doupdate() {
$('#subForm').data('bootstrapValidator')
.updateStatus('solvername', 'NOT_VALIDATED',null)
.validateField('happenDate');
$("#subForm").bootstrapValidator('validate');//提交验证
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath + "/accident/reasonableAdvice/doupdate.do", $("#subForm").serialize(), function(data) {
if (data.code == 1){
showAlert('s','保存成功');
closeModal('subModal')
$("#table").bootstrapTable('refresh');
}else if(data.code == 0){
showAlert('d','保存失败');
}else{
showAlert('d',data.msg);
}
},'json');
}
}
function dosubmit(){
$("#takeFlag").val('${AUDIT}');
$('#subForm').data('bootstrapValidator')
.updateStatus('auditManName', 'NOT_VALIDATED',null)
.validateField('auditManName');
$("#subForm").bootstrapValidator('validate');//提交验证
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath +"/accident/reasonableAdvice/startProcess.do", $("#subForm").serialize(), function(data) {
if (data.res == 1) {
$("#table").bootstrapTable('refresh');
closeModal('subModal');
}else if(data.res == 0){
showAlert('d','保存失败');
}else if(data.res == 2){
showAlert('d','未检测到合理化建议审核流程,请先部署合理化建议审核流程!');
}else{
showAlert('d',data.res);
}
},'json');
}
}
//提交时先验证审核人不能为空,保存时审核人可以为空
function submitFun(){
//新增的输入框添加验证
$("#subForm").data('bootstrapValidator').addField('auditManName',{
validators: {
notEmpty: {
message: '审核人不能为空'
},
}
});
dosubmit();
}
$("#subForm").bootstrapValidator({
live: 'disabled',//验证时机enabled是内容有变化就验证默认disabled和submitted是提交再验证
fields: {
name: {
validators: {
notEmpty: {
message: '名称不能为空'
}
}
},
solvername: {
validators: {
notEmpty: {
message: '建议人不能为空'
}
}
}
}
});
var showUser4SelectsFun = function() {
var userIds= $("#userLead").val();
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"subForm",hiddenId:"userLead",textId:"solvername",userIds:userIds} , function(data) {
$("#user4SelectDiv").html(data);
openModal("user4SelectModal");
});
};
var showUser4SelectsFun1 = function() {
var userIds= $("#usersHelp").val();
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"subForm",hiddenId:"usersHelp",textId:"solvername1",userIds:userIds} , function(data) {
$("#user4SelectDiv").html(data);
openModal("user4SelectModal");
});
};
//以下为上传图片
//名称定义不可修改
var getFileList = function() {
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId:masterId1,tbName:tbName1} , function(data) {
//console.info(data)
if(data.length>0){
previews=new Array();
$('#maintenancefile').show();
for(var i=0;i<data.length;i++){
var previewConfig = new Object();
var path = data[i].abspath;
path=path.substring(path.indexOf('webapps')+7,path.length);
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");;
previews.push(path);
previewConfig['width']= '50px';
previewConfig['caption']= data[i].filename;
console.log(data[i].filename)
previewConfig['key']= data[i].id;
previewConfigs.push(previewConfig);
}
showFileInput("maintenanceDetailFile");
}else{
$('#maintenanceDetailFile').hide();
}
},'json');
};
//初始化fileinput控件第一次初始化
function showFileInput(ctrlName) {
var control = $('#' + ctrlName);
control.fileinput('destroy');
control.fileinput({
language: 'zh', //设置语言
showUpload: false, //是否显示上传按钮
showRemove:false,
showCaption: false,//是否显示标题
showBrowse:false,//选择按钮
showClose:false,//右上角关闭按钮
dropZoneEnabled: false,//是否显示拖拽区域
fileActionSettings:{
showDrag:false
},
browseClass: "btn btn-primary", //按钮样式
maxFileCount: 10, //表示允许同时上传的最大文件个数
enctype: 'multipart/form-data',
validateInitialCount:true,
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
initialPreviewAsData: true,
initialPreview: previews,
initialPreviewConfig:previewConfigs,
layoutTemplates:{
actionUpload:''
},
deleteUrl:ext.contextPath+"/base/deleteInputFile.do",
deleteExtraData:function () { //传参
var data = {
"tbName": tbName1
};
return data;
}
});
$('#kvFileinputModal').on("hidden.bs.modal", function() {
$(this).removeData("bs.modal");
//modal重复打开会导致前面的滚动条失去作用
$('.modal').css("overflow","auto");
});
}
var fileinput1 = function() {
//var url='/maintenance/updateProblemFile.do';//保存数据表方法
$.post(ext.contextPath + '/base/fileinput.do', {masterId:masterId1,tbName:tbName1,nameSpace:nameSpace1} , function(data) {
$("#fileInputDiv").html(data);
openModal('fileInputModal');
});
};
//选择审核人
var showUser4AuditSelectsFun = function() {
var userIds= $("#auditManId").val();
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"subForm",hiddenId:"auditManId",textId:"auditManName",userIds:userIds} , function(data) {
$("#user4SelectDiv").html(data);
openModal("user4SelectModal");
});
};
$(function(){
getFileList();
});
</script>
<div class="modal fade" id="subModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">编辑合理化建议</h4>
</div>
<div class="modal-body">
<!-- 新增界面formid强制为subForm -->
<form class="form-horizontal" id="subForm">
<!-- 界面提醒div强制id为alertDiv -->
<div id="alertDiv"></div>
<input type="hidden" class="form-control" id="id" name ="id" value ="${reasonableAdvice.id}">
<input type="hidden" class="form-control" id="unitId" name ="unitId" value ="${reasonableAdvice.unitId}">
<div class="form-group">
<label class="col-sm-2 control-label">*建议名称</label>
<div class="col-sm-10">
<input class="form-control" type="text" id="name" name ="name" placeholder="名称" value="${reasonableAdvice.name}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">建议类型</label>
<div class="col-sm-10">
<input class="form-control" type="text" id="adviceType" name ="adviceType" placeholder="类型" value="${reasonableAdvice.adviceType}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">建议内容</label>
<div class="col-sm-10">
<textarea class="form-control" rows="5" id ="content" name ="content" placeholder="不超过500字">${reasonableAdvice.content}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">*建议人</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="solvername" name ="solvername" placeholder="请选择建议人" onclick="showUser4SelectsFun();" value="${solvername}">
<input id="userLead" name="userLead" type="hidden" value="${reasonableAdvice.userLead}"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">辅议人</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="solvername1" name ="solvername1" placeholder="请选择辅议人" onclick="showUser4SelectsFun1();" value="${solvername1}">
<input id="usersHelp" name="usersHelp" type="hidden" value="${reasonableAdvice.usersHelp}"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">审核人</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="auditManName" name="auditManName" placeholder="点击选择" value="${reasonableAdvice.auditManName}" onclick="showUser4AuditSelectsFun();">
<input id="auditManId" name="auditManId" type="hidden" value="${reasonableAdvice.auditManId}" />
</div>
</div>
<input type="hidden" class="form-control" id="takeFlag" name ="takeFlag" value ="${reasonableAdvice.takeFlag}">
<div class="form-group" style="margin:8px">
<button type="button" class="btn btn-default btn-file" onclick="fileinput1()" id="btn_save"><i class="fa fa-paperclip"></i>上传图片</button>
</div>
<div class="form-group" style="margin:8px;">
<input type="file" name="maintenanceDetailFile" id="maintenanceDetailFile" multiple class="file-loading" />
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" onclick="doupdate()" id="btn_save">保存</button>
<button type="button" class="btn btn-primary" onclick="submitFun()" id="btn_submit">提交</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>

View File

@ -0,0 +1,239 @@
<%@ page language="java" pageEncoding="UTF-8"%>
<style type="text/css">
.select2-container .select2-selection--single{
height:34px;
line-height: 34px;
}
.select2-selection__arrow{
margin-top:3px;
}
</style>
<script type="text/javascript">
var masterId1='${reasonableAdvice.id}';
var tbName1='tb_reasonable_advice_file'; //数据表
var nameSpace1='ReasonableAdvicePicture';//保存文件夹
var previews = new Array();
var previewConfigs = new Array();
function doupdate(takeFlag) {
$('#takeFlag').val(takeFlag);
$('#subForm').data('bootstrapValidator')
.updateStatus('solvername', 'NOT_VALIDATED',null)
.validateField('happenDate');
$("#subForm").bootstrapValidator('validate');//提交验证
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath + "/accident/reasonableAdvice/doupdate.do", $("#subForm").serialize(), function(data) {
if (data.code == 1){
showAlert('s','保存成功');
closeModal('subModal')
$("#table").bootstrapTable('refresh');
}else if(data.code == 0){
showAlert('d','保存失败');
}else{
showAlert('d',data.msg);
}
},'json');
}
}
$("#subForm").bootstrapValidator({
live: 'disabled',//验证时机enabled是内容有变化就验证默认disabled和submitted是提交再验证
fields: {
name: {
validators: {
notEmpty: {
message: '名称不能为空'
}
}
},
solvername: {
validators: {
notEmpty: {
message: '建议人不能为空'
}
}
}
}
});
var showUser4SelectsFun = function() {
var userIds= $("#userLead").val();
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"subForm",hiddenId:"userLead",textId:"solvername",userIds:userIds} , function(data) {
$("#user4SelectDiv").html(data);
openModal("user4SelectModal");
});
};
var showUser4SelectsFun1 = function() {
var userIds= $("#usersHelp").val();
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"subForm",hiddenId:"usersHelp",textId:"solvername1",userIds:userIds} , function(data) {
$("#user4SelectDiv").html(data);
openModal("user4SelectModal");
});
};
//以下为上传图片
//名称定义不可修改
var getFileList = function() {
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId:masterId1,tbName:tbName1} , function(data) {
//console.info(data)
if(data.length>0){
previews=new Array();
$('#maintenancefile').show();
for(var i=0;i<data.length;i++){
var previewConfig = new Object();
var path = data[i].abspath;
path=path.substring(path.indexOf('webapps')+7,path.length);
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");;
previews.push(path);
previewConfig['width']= '50px';
previewConfig['caption']= data[i].filename;
console.log(data[i].filename)
previewConfig['key']= data[i].id;
previewConfigs.push(previewConfig);
}
showFileInput("maintenanceDetailFile");
}else{
$('#maintenanceDetailFile').hide();
}
},'json');
};
//初始化fileinput控件第一次初始化
function showFileInput(ctrlName) {
var control = $('#' + ctrlName);
control.fileinput('destroy');
control.fileinput({
language: 'zh', //设置语言
showUpload: false, //是否显示上传按钮
showRemove:false,
showCaption: false,//是否显示标题
showBrowse:false,//选择按钮
showClose:false,//右上角关闭按钮
dropZoneEnabled: false,//是否显示拖拽区域
fileActionSettings:{
showDrag:false
},
browseClass: "btn btn-primary", //按钮样式
maxFileCount: 10, //表示允许同时上传的最大文件个数
enctype: 'multipart/form-data',
validateInitialCount:true,
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
initialPreviewAsData: true,
initialPreview: previews,
initialPreviewConfig:previewConfigs,
layoutTemplates:{
actionUpload:''
},
deleteUrl:ext.contextPath+"/base/deleteInputFile.do",
deleteExtraData:function () { //传参
var data = {
"tbName": tbName1
};
return data;
}
});
$('#kvFileinputModal').on("hidden.bs.modal", function() {
$(this).removeData("bs.modal");
//modal重复打开会导致前面的滚动条失去作用
$('.modal').css("overflow","auto");
});
}
var fileinput1 = function() {
//var url='/maintenance/updateProblemFile.do';//保存数据表方法
$.post(ext.contextPath + '/base/fileinput.do', {masterId:masterId1,tbName:tbName1,nameSpace:nameSpace1} , function(data) {
$("#fileInputDiv").html(data);
openModal('fileInputModal');
});
};
$(function(){
getFileList();
});
</script>
<div class="modal fade" id="subModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">编辑合理化建议</h4>
</div>
<div class="modal-body">
<!-- 新增界面formid强制为subForm -->
<form class="form-horizontal" id="subForm">
<!-- 界面提醒div强制id为alertDiv -->
<div id="alertDiv"></div>
<input type="hidden" class="form-control" id="id" name ="id" value ="${reasonableAdvice.id}">
<input type="hidden" class="form-control" id="unitId" name ="unitId" value ="${reasonableAdvice.unitId}">
<div class="form-group">
<label class="col-sm-2 control-label">*建议名称</label>
<div class="col-sm-10">
<input class="form-control" type="text" id="name" name ="name" placeholder="名称" value="${reasonableAdvice.name}" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">建议类型</label>
<div class="col-sm-10">
<input class="form-control" type="text" id="adviceType" name ="adviceType" placeholder="类型" value="${reasonableAdvice.adviceType}" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">建议内容</label>
<div class="col-sm-10">
<textarea class="form-control" rows="5" id ="content" name ="content" placeholder="不超过500字" readonly>${reasonableAdvice.content}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">*建议人</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="solvername" name ="solvername" placeholder="请选择建议人" value="${solvername}" readonly>
<input id="userLead" name="userLead" type="hidden" value="${reasonableAdvice.userLead}"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">辅议人</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="solvername1" name ="solvername1" placeholder="请选择辅议人" value="${solvername1}" readonly>
<input id="usersHelp" name="usersHelp" type="hidden" value="${reasonableAdvice.usersHelp}"/>
</div>
</div>
<input type="hidden" class="form-control" id="takeFlag" name ="takeFlag" value ="${reasonableAdvice.takeFlag}">
<div class="form-group">
<label class="col-sm-2 control-label">审核意见</label>
<div class="col-sm-10">
<textarea class="form-control" rows="5" id ="auditContent" name ="auditContent" placeholder="不超过500字">${reasonableAdvice.auditContent}</textarea>
</div>
</div>
<div class="form-group" style="margin:8px">
<button type="button" class="btn btn-default btn-file" onclick="fileinput1()" id="btn_save"><i class="fa fa-paperclip"></i>上传图片</button>
</div>
<div class="form-group" style="margin:8px;">
<input type="file" name="maintenanceDetailFile" id="maintenanceDetailFile" multiple class="file-loading" />
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" onclick="doupdate('不采纳')" id="btn_save">不采纳</button>
<button type="button" class="btn btn-primary" onclick="doupdate('已采纳')" id="btn_save">采纳</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>

View File

@ -0,0 +1,267 @@
<%@page import="com.sipai.entity.business.BusinessUnit"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%String contextPath = request.getContextPath();%>
<%String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath();%>
<%String serverPath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();%>
<%request.setAttribute("Status_Finish",Maintenance.Status_Finish);%>
<!-- 补录状态 -->
<%request.setAttribute("TYPE_SUPPLEMENT",Maintenance.TYPE_SUPPLEMENT);%>
<!-- 运维主流程状态 -->
<%request.setAttribute("TYPE_MAINTENANCE",Maintenance.TYPE_MAINTENANCE);%>
<%request.setAttribute("UNIT_HANDLE",BusinessUnit.UNIT_HANDLE);%>
<!-- bootstrap-star-rating -->
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/css/star-rating.min.css"/>
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/js/star-rating.min.js" charset="utf-8"></script>
<script type="text/javascript">
//var masterId=$('#maintenanceId').val();
var tbName_problem='tb_maintenance_problem_fille'; //数据表
var tbName_maintenance='tb_maintenance_file'; //数据表
var nameSpace='MaintenanceProblem';//保存文件夹
var previews = new Array();
var previewConfigs = new Array();
/* var student = {
"caption":"lilei",
}
previewConfigs[0]=student; */
//初始化fileinput控件第一次初始化
function showFileInput(ctrlName) {
var control = $('#' + ctrlName);
control.fileinput('destroy');
control.fileinput({
language: 'zh', //设置语言
showUpload: false, //是否显示上传按钮
showRemove:false,
showCaption: false,//是否显示标题
showBrowse:false,//选择按钮
showClose:false,//右上角关闭按钮
dropZoneEnabled: false,//是否显示拖拽区域
resizeImage:true,
fileActionSettings:{
showDrag:false
},
browseClass: "btn btn-primary", //按钮样式
maxFileCount: 10, //表示允许同时上传的最大文件个数
enctype: 'multipart/form-data',
validateInitialCount:true,
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
initialPreviewAsData: true,
initialPreview: previews,
initialPreviewConfig:previewConfigs,
layoutTemplates:{
actionUpload:'',
actionDelete:''
}
});
$('#kvFileinputModal').on("hidden.bs.modal", function() {
$(this).removeData("bs.modal");
//modal重复打开会导致前面的滚动条失去作用
$('.modal').css("overflow","auto");
});
}
var viewHandleDetailFun = function(id) {
$.post(ext.contextPath + '/maintenance/showHandleDetailView.do', {id:id} , function(data) {
$("#handleDetailDiv").html(data);
openModal('handleDetailModal');
});
};
//流程审核文件上传所需参数
var masterId_process = '${param.id}';//业务Id
var tbName_process = 'TB_Process_UploadFile'; //数据表
var nameSpace_process ='ProcessUploadFile';//保存文件夹
var status = 'view';//有查看权限
$(function() {
//初始化文件显示
getFileList_process();
$("#judgemaintainerstaff").rating('refresh',{showClear:false,showCaption:false,readonly:true});
$("#judgeresult").rating('refresh',{showClear:false,showCaption:false,readonly:true});
var result='${businessUnitRecords}';
result=result.replace(new RegExp("\r\n","gm"),"");
var json =JSON.parse(result);
$.each(json, function(index, item) {
if(item.id!=null &&item.id!=""){
previews=new Array();
$('#'+item.id).show();
var data =item.files;
for(var i=0;i<data.length;i++){
var previewConfig = new Object();
var path = data[i].abspath;
path=path.substring(path.indexOf('webapps')+7,path.length);
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");
previews.push(path);
previewConfig['width']= '30px';
previewConfig['caption']= data[i].filename;
previewConfig['key']= data[i].id;
previewConfigs.push(previewConfig);
}
showFileInput(item.id);
}
});
})
//----------------------------------------------------------------------------------------------------------------------------------------------------
var printpage = function (myDiv){
$('.printContent').show();
var printHtml = document.getElementById(myDiv).innerHTML;
var wind = window.open("", "newwin", "width=1550,height=565,top=80,left=80,toolbar=no,scrollbars=yes,menubar=no");
/*
var ss = ".coversheet-pageBoder{"
+" padding: 10px;"
+" margin-top: 10px;"
+" border: 1px solid gray;"
+" page-break-after: always;"
+" border-radius: 5px;"
+" box-shadow: 0 1px 2px 1px rgba(0,0,0,.08), 0 3px 6px rgba(0,0,0,.08);"
+"}"
+".noprint{display: none;}"
+".select2-container .select2-selection--single{ "
+" height:34px; "
+" line-height: 34px; "
+" }"
+" .select2-selection__arrow{"
+" margin-top:3px;"
+" } "
+" .div-row{"
+" margin-left:3px;"
+" margin-right:3px;"
+" }"
+" .div-border{"
+" border-style:solid;"
+" border-width:1px;"
+" text-align:center;"
+" }"
+" .right-border{"
+" border-right:none;"
+" }"
+" .top-right-border{"
+" border-top:none;"
+" border-right:none;"
+" }"
+" .top-border{"
+" border-top:none;"
+" }";
*/
//for Chrome Firefox Opera Safari
//wind.document.body.innerHTML = printHtml;
var link = document.createElement('link');
link.type = 'text/css';
link.rel = 'stylesheet';
link.href = '<%=serverPath%><%=contextPath%>/plugins/bootstrap-ext/dist/bootstrap.min.css';
wind.document.head.appendChild(link);
/*
var style = document.createElement('style');
style.type = 'text/css';
style.rel = 'stylesheet';
style.appendChild(document.createTextNode(ss));
wind.document.head.appendChild(style);
*/
wind.document.body.innerHTML = printHtml;
//console.log(wind.document);
wind.print();
wind.close();
$('.printContent').hide();
};
//----------------------------------------------------------------------------------------------------------------------------------------------------
</script>
<div class="modal fade" id="reasonableAdviceExcuteModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">合理化建议处理详情</h4>
</div>
<div class="modal-body " style="padding-left:0;padding-right:0;">
<div class="row">
<div class="col-md-12">
<!-- The time line -->
<ul class="timeline">
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
<li>
<c:choose>
<c:when test='${finishFlag && status.last}'>
<i class="fa fa-check bg-blue"></i>
</c:when>
<c:otherwise >
<i class="fa fa-clock-o bg-grey"></i>
</c:otherwise>
</c:choose>
<div class="timeline-item">
<span class="time"><i class="fa fa-clock-o"></i> ${item.insdt.substring(0,16)}</span>
<h3 class="timeline-header"><a href="#">${item.taskName}</a> ${item.user.caption}</h3>
<div class="timeline-body" style="padding-left:5px;padding-right:5px;">
<div>
${item.record}
</div>
<c:if test ="${item.id!=''}">
<div style="padding-top:5px;">
<input type="file" id='${item.id}' multiple class="file-loading" />
</div>
</c:if>
</div>
</div>
</li>
</c:forEach>
</ul>
</div>
</div>
<!--
<form class="form-horizontal" id="subForm">
<div class="form-group">
<label class="col-sm-2 control-label">文件附件:</label>
</div>
<div class="file-border" id="fileArea">
</div>
</form>
-->
</div>
<!-- 流程打印布局 开始 -->
<div id="reasonableAdviceExcuteDetail">
<div class="printContent" style="display:none">
<h4 style="text-align:center;">合理化建议处理详情</h4>
</div>
<div class="printContent" style="display:none">
<table style="border-collapse:collapse;margin:0 auto">
<tr >
<td style="border:1px solid black;width:120px;text-align: center;">时间</td>
<td style="border:1px solid black;width:120px;text-align: center;">发起人</td>
<td style="border:1px solid black;width:120px;text-align: center;">任务</td>
<td style="border:1px solid black;width:120px;text-align: center;">流程内容详情</td>
</tr>
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
<tr>
<td style="border:1px solid black;width:150px;text-align: center;">${item.insdt.substring(0,16)}</td>
<td style="border:1px solid black;width:120px;text-align: center;">${item.user.caption}</td>
<td style="border:1px solid black;width:120px;text-align: center;">${item.taskName}</td>
<td style="border:1px solid black;width:300px;">${item.record}</td>
</tr>
</c:forEach>
</table>
</div>
<form class="form-horizontal" id="subForm">
<div class="form-group">
<label class="col-sm-2 control-label">文件附件:</label>
</div>
<!-- 文件上传,显示 -->
<div class="file-border" id="fileArea">
</div>
</form>
</div>
<!-- 流程打印布局 结束-->
<div class="modal-footer">
<button type="button" class="btn btn-default" onclick="printpage('reasonableAdviceExcuteDetail');"><i class="fa fa-print"></i>打印</button>
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>

View File

@ -0,0 +1,191 @@
<%@page import="com.sipai.entity.business.BusinessUnit"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%String contextPath = request.getContextPath();%>
<%String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath();%>
<%String serverPath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();%>
<%request.setAttribute("Status_Finish",Maintenance.Status_Finish);%>
<!-- 补录状态 -->
<%request.setAttribute("TYPE_SUPPLEMENT",Maintenance.TYPE_SUPPLEMENT);%>
<!-- 运维主流程状态 -->
<%request.setAttribute("TYPE_MAINTENANCE",Maintenance.TYPE_MAINTENANCE);%>
<%request.setAttribute("UNIT_HANDLE",BusinessUnit.UNIT_HANDLE);%>
<!-- bootstrap-star-rating -->
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/css/star-rating.min.css"/>
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/js/star-rating.min.js" charset="utf-8"></script>
<script type="text/javascript">
//var masterId=$('#maintenanceId').val();
var tbName_problem='tb_maintenance_problem_fille'; //数据表
var tbName_maintenance='tb_maintenance_file'; //数据表
var nameSpace='MaintenanceProblem';//保存文件夹
var previews = new Array();
var previewConfigs = new Array();
/* var student = {
"caption":"lilei",
}
previewConfigs[0]=student; */
//初始化fileinput控件第一次初始化
function showFileInput(ctrlName) {
var control = $('#' + ctrlName);
control.fileinput('destroy');
control.fileinput({
language: 'zh', //设置语言
showUpload: false, //是否显示上传按钮
showRemove:false,
showCaption: false,//是否显示标题
showBrowse:false,//选择按钮
showClose:false,//右上角关闭按钮
dropZoneEnabled: false,//是否显示拖拽区域
resizeImage:true,
fileActionSettings:{
showDrag:false
},
browseClass: "btn btn-primary", //按钮样式
maxFileCount: 10, //表示允许同时上传的最大文件个数
enctype: 'multipart/form-data',
validateInitialCount:true,
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
initialPreviewAsData: true,
initialPreview: previews,
initialPreviewConfig:previewConfigs,
layoutTemplates:{
actionUpload:'',
actionDelete:''
}
});
$('#kvFileinputModal').on("hidden.bs.modal", function() {
$(this).removeData("bs.modal");
//modal重复打开会导致前面的滚动条失去作用
$('.modal').css("overflow","auto");
});
}
var viewHandleDetailFun = function(id) {
$.post(ext.contextPath + '/maintenance/showHandleDetailView.do', {id:id} , function(data) {
$("#handleDetailDiv").html(data);
openModal('handleDetailModal');
});
};
//流程审核文件上传所需参数
var masterId_process = '${param.id}';//业务Id
var tbName_process = 'TB_Process_UploadFile'; //数据表
var nameSpace_process ='ProcessUploadFile';//保存文件夹
var status = 'view';//有查看权限
$(function() {
//初始化文件显示
getFileList_process();
$("#judgemaintainerstaff").rating('refresh',{showClear:false,showCaption:false,readonly:true});
$("#judgeresult").rating('refresh',{showClear:false,showCaption:false,readonly:true});
var result='${businessUnitRecords}';
result=result.replace(new RegExp("\r\n","gm"),"");
var json =JSON.parse(result);
$.each(json, function(index, item) {
if(item.id!=null &&item.id!=""){
previews=new Array();
$('#'+item.id).show();
var data =item.files;
for(var i=0;i<data.length;i++){
var previewConfig = new Object();
var path = data[i].abspath;
path=path.substring(path.indexOf('webapps')+7,path.length);
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");
previews.push(path);
previewConfig['width']= '30px';
previewConfig['caption']= data[i].filename;
previewConfig['key']= data[i].id;
previewConfigs.push(previewConfig);
}
showFileInput(item.id);
}
});
})
//----------------------------------------------------------------------------------------------------------------------------------------------------
var printpage = function (myDiv){
$('.printContent').show();
var printHtml = document.getElementById(myDiv).innerHTML;
var wind = window.open("", "newwin", "width=1550,height=565,top=80,left=80,toolbar=no,scrollbars=yes,menubar=no");
var link = document.createElement('link');
link.type = 'text/css';
link.rel = 'stylesheet';
link.href = '<%=serverPath%><%=contextPath%>/plugins/bootstrap-ext/dist/bootstrap.min.css';
wind.document.head.appendChild(link);
wind.document.body.innerHTML = printHtml;
wind.print();
wind.close();
$('.printContent').hide();
};
//----------------------------------------------------------------------------------------------------------------------------------------------------
</script>
<div class="row">
<div class="col-md-12">
<!-- The time line -->
<ul class="timeline">
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
<li>
<c:choose>
<c:when test='${finishFlag && status.last}'>
<i class="fa fa-check bg-blue"></i>
</c:when>
<c:otherwise >
<i class="fa fa-clock-o bg-grey"></i>
</c:otherwise>
</c:choose>
<div class="timeline-item">
<span class="time"><i class="fa fa-clock-o"></i> ${item.insdt.substring(0,16)}</span>
<h3 class="timeline-header"><a href="#">${item.taskName}</a> ${item.user.caption}</h3>
<div class="timeline-body" style="padding-left:5px;padding-right:5px;">
<div>
${item.record}
</div>
<c:if test ="${item.id!=''}">
<div style="padding-top:5px;">
<input type="file" id='${item.id}' multiple class="file-loading" />
</div>
</c:if>
</div>
</div>
</li>
</c:forEach>
</ul>
</div>
<!-- /.col -->
</div>
<!-- 流程打印布局 开始 -->
<div id="reasonableAdviceExcuteDetail">
<div class="printContent" style="display:none">
<h4 style="text-align:center;">合理化建议处理详情</h4>
</div>
<div class="printContent" style="display:none;">
<table style="border-collapse:collapse;margin:0 auto">
<tr >
<td style="border:1px solid black;width:120px;text-align: center;">时间</td>
<td style="border:1px solid black;width:120px;text-align: center;">发起人</td>
<td style="border:1px solid black;width:120px;text-align: center;">任务</td>
<td style="border:1px solid black;width:120px;text-align: center;">流程内容详情</td>
</tr>
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
<tr>
<td style="border:1px solid black;width:150px;text-align: center;">${item.insdt.substring(0,16)}</td>
<td style="border:1px solid black;width:120px;text-align: center;">${item.user.caption}</td>
<td style="border:1px solid black;width:120px;text-align: center;">${item.taskName}</td>
<td style="border:1px solid black;width:300px;">${item.record}</td>
</tr>
</c:forEach>
</table>
</div>
<form class="form-horizontal" id="subForm">
<div class="form-group">
<label class="col-sm-4 control-label">文件附件:</label>
</div>
<!-- 文件上传,显示 -->
<div class="file-border" id="fileArea">
</div>
</form>
</div>

View File

@ -0,0 +1,387 @@
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail"%>
<%@ 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"%>
<%String contextPath = request.getContextPath();%>
<%@page import="com.sipai.entity.accident.AccidentCommString"%>
<%request.setAttribute("AUDIT", AccidentCommString.STATUS_RA_AUDIT); %>
<%request.setAttribute("START", AccidentCommString.STATUS_RA_START); %>
<%request.setAttribute("FINISH", AccidentCommString.STATUS_RA_FINISH); %>
<%request.setAttribute("FAIL", AccidentCommString.STATUS_RA_FAIL); %>
<!DOCTYPE html>
<!-- <html lang="zh-CN"> -->
<!-- BEGIN HEAD -->
<head>
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
<!-- 引用页头及CSS页-->
<jsp:include page="/jsp/inc.jsp"></jsp:include>
<style type="text/css">
.select2-container .select2-selection--single{
height:34px;
line-height: 34px;
}
.select2-selection__arrow{
margin-top:3px;
}
.table-hover>tbody>tr:hover {
cursor: pointer;
}
</style>
<script type="text/javascript">
var addFun = function() {
$.post(ext.contextPath + '/accident/reasonableAdvice/doadd.do', {unitId:unitId} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
var editFun = function(id) {
stopBubbleDefaultEvent();
$.post(ext.contextPath + '/accident/reasonableAdvice/doedit.do', {id:id} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
var viewFun = function(id) {
$.post(ext.contextPath + '/accident/reasonableAdvice/view.do', {id:id} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
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 + '/accident/reasonableAdvice/dodelete.do', {id : id}, function(data) {
if(data.code=="1"){
$("#table").bootstrapTable('refresh');
}else{
showAlert('d','删除失败','mainAlertdiv');
}
},'json');
}
});
};
var deletesFun = function() {
var checkedItems = $("#table").bootstrapTable('getSelections');
var datas="";
$.each(checkedItems, function(index, item){
datas+=item.id+",";
});
if(datas==""){
showAlert('d','请先选择记录','mainAlertdiv');
}else{
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 + '/accident/reasonableAdvice/dodeletes.do', {ids:datas} , function(data) {
if(data.code>0){
$("#table").bootstrapTable('refresh');
}else{
showAlert('d','删除失败','mainAlertdiv');
}
},'json');
}
});
}
};
var reasonableAdviceProcessFun = function(id){
stopBubbleDefaultEvent();
$.post(ext.contextPath + '/accident/reasonableAdvice/showProcessReasonableAdviceView.do', {id:id} , function(data) {
$("#subDiv").html(data);
openModal('reasonableAdviceExcuteModal');
});
};
var dosearch = function() {
$("#table").bootstrapTable('refresh');
};
//初始化采集类型选择框
var refreshtypeForSelect = function() {
var select = $("#typeForSelect").select2({
data: null,
placeholder:'请选择',//默认文字提示
allowClear: true,//允许清空
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
language: "zh-CN",
minimumInputLength: 0,
minimumResultsForSearch: 10,//数据超过十个启用搜索框
});
select.val("未提交").trigger("change");
select.on("change", function (e) {
$("#table").bootstrapTable('refresh');
});
};
var companyId = unitId;
$(function() {
companyId = unitId;
refreshtypeForSelect();
initFun();
});
var initFun = function(){
$("#table").bootstrapTable({ // 对应table标签的id
url: ext.contextPath + '/accident/reasonableAdvice/getlist.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,
search_name: $('#search_name').val(),
unitId: unitId,
takeFlag: $("#typeForSelect").val(),
// statusSelect:$("#statusSelect").val(),
}
},
// onClickRow: function (row) {//单击行事件,执行查看功能
// viewFun(row.id);
// },
sortName: 'insdt', // 要排序的字段
sortOrder: 'desc', // 排序规则
columns: [
{
checkbox: true, // 显示一个勾选框
},{
field: 'caption', // 返回json数据中的name
title: '建议人', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
},{
field: 'adviceType', // 返回json数据中的name
title: '建议类型', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
},{
field: 'name', // 返回json数据中的name
title: '建议名称', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
},{
field: 'company.name', // 返回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,10);
}
},{
field: 'takeFlag', // 返回json数据中的name
title: '状态', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle', // 上下居中
formatter: function (value, row, index){
switch (value){
case '${FAIL}' :
return "未采纳";
case '${FINISH}' :
return "已采纳";
case '${START}' :
return "未提交";
case '${AUDIT}' :
return "已提交";
default :
return value;
}
}
},{
title: "操作",
align: 'center',
valign: 'middle',
width: 120, // 定义列的宽度单位为像素px
formatter: function (value, row, index) {
var buts="";
if(row.takeFlag == '${START}'){
buts+= '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
buts+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteFun(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
}else{
buts+= '<button class="btn btn-default btn-sm" title="浏览" onclick="viewFun(\'' + row.id + '\')"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg">浏览</span></button>';
buts+= '<button class="btn btn-default btn-sm" title="流程详情" onclick="reasonableAdviceProcessFun(\'' + row.id + '\')"><i class="fa fa-history"></i><span class="hidden-md hidden-lg">流程详情</span></button>';
}
buts='<div class="btn-group" >'+buts+'</div>';
return buts;
}
}
],
onLoadSuccess: function(){ //加载成功时执行
adjustBootstrapTableView("table");
},
onLoadError: function(){ //加载失败时执行
console.info("加载数据失败");
}
});
}
//导出设备表,要用get请求的方式
function downloadFun() {
var search_name = $("#search_name").val();
var takeFlag = $("#typeForSelect").val();
window.open(ext.contextPath + "/accident/reasonableAdvice/downloadExcel.do?unitId="+unitId
+"&search_name="+search_name
+"&takeFlag="+takeFlag);
}
</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" style="width: 220px;height:10px;"></div>
<div id="subDivAbnorm"></div>
<div id="menu4SelectDiv"></div>
<div id="equ4SelectDiv"></div>
<div id="library4SelectDiv"></div>
<div id="problemTyp4SelectDiv"></div>
<div id="user4SelectDiv"></div>
<div id="fileInputDiv"></div>
<div >
<div class="form-group " style="margin-bottom:10px;">
<input id="search_pid" name="search_pid" type="hidden" />
<span id="companyName" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold"></span>
</div>
<div class="form-group form-inline" style="padding:0;">
<div class="btn-group" style="width: 280px;padding-bottom:10px;">
<!-- <security:authorize buttonUrl="maintenance/abnormity/add.do"> -->
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i class="fa fa-plus"></i> 新增</button>
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button>
<button type="button" class="btn btn-default btn-sm" onclick="downloadFun();"><i class="fa fa-cloud-download"></i> 导出</button>
<!--
<button type="button" class="btn btn-default btn-sm" title="异常中有设备的生成维修,没设备的生成缺陷" onclick="createDefectFun();"><i class="fa fa-send-o"></i>生成缺陷或维修单</button> -->
<!-- </security:authorize> -->
</div>
<!--
<div class="form-group pull-right form-inline" >
<div class="form-group">
<label class="form-label">工艺段:</label>
<select class="form-control select2 " id="processSection" name ="processSection" style="width: 160px;"></select>
<label class="form-label">状态:</label>
<select class="form-control select2 " id="statusSelect" name ="statusSelect" style="width: 160px;">
<option value= "${Wait}">待处理</option>
<option value= "${Start}">处理中</option>
<option value= "${Finish}">已完成</option>
</select>
</div>
<div class="form-group" >
<div class="input-group input-group-sm" style="width: 250px;">
<input type="text" id="search_name" name="search_name" class="form-control pull-right" style="height:34px;" placeholder="名称">
<div class="input-group-btn">
<button class="btn btn-default" style="height:34px;" onclick="dosearch();"><i class="fa fa-search"></i></button>
</div>
</div>
</div>
</div> -->
<div class="form-group pull-right" >
<div class="input-group input-group-sm ">
<label class="form-label">状态</label>
<select type="text" id="typeForSelect" class="form-control pull-right"
name="typeForSelect" style="width: 180px;">
<option value="${START}">未提交</option>
<option value="${AUDIT}">已提交</option>
<option value="${FINISH}">已采纳</option>
<option value="${FAIL}">未采纳</option>
</select>
</div>
<div class="input-group input-group-sm" style="width: 250px;">
<input type="text" id="search_name" name="search_name" class="form-control pull-right" style="height:34px;" placeholder="名称">
<div class="input-group-btn">
<button class="btn btn-default" style="height:34px;" onclick="dosearch();"><i class="fa fa-search"></i></button>
</div>
</div>
</div>
</div>
<table id="table"></table>
</div>
</section>
<!-- /.content -->
</div>
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
</div>
</body>
<!-- bootstrap switch -->
<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>
<!-- 文件上传-->
<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" src="<%=request.getContextPath()%>/JS/commonFileUpload.js" charset="utf-8"></script>
</html>

View File

@ -0,0 +1,318 @@
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail"%>
<%@ 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"%>
<%String contextPath = request.getContextPath();%>
<%request.setAttribute("Finish", MaintenanceDetail.Status_Finish); %>
<%request.setAttribute("Start", MaintenanceDetail.Status_Start); %>
<%request.setAttribute("Wait", MaintenanceDetail.Status_Wait); %>
<!DOCTYPE html>
<!-- <html lang="zh-CN"> -->
<!-- BEGIN HEAD -->
<head>
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
<!-- 引用页头及CSS页-->
<jsp:include page="/jsp/inc.jsp"></jsp:include>
<style type="text/css">
.select2-container .select2-selection--single{
height:34px;
line-height: 34px;
}
.select2-selection__arrow{
margin-top:3px;
}
.table-hover>tbody>tr:hover {
cursor: pointer;
}
</style>
<!-- 文件上传-->
<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">
var addFun = function() {
$.post(ext.contextPath + '/accident/reasonableAdvice/doadd.do', {unitId:unitId} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
var editFun = function(id) {
stopBubbleDefaultEvent();
$.post(ext.contextPath + '/accident/reasonableAdvice/doedittake.do', {id:id} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
var viewFun = function(id) {
$.post(ext.contextPath + '/accident/reasonableAdvice/doview.do', {id:id} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
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 + '/accident/reasonableAdvice/dodelete.do', {id : id}, function(data) {
if(data.code=="1"){
$("#table").bootstrapTable('refresh');
}else{
showAlert('d','删除失败','mainAlertdiv');
}
},'json');
}
});
};
var deletesFun = function() {
var checkedItems = $("#table").bootstrapTable('getSelections');
var datas="";
$.each(checkedItems, function(index, item){
datas+=item.id+",";
});
if(datas==""){
showAlert('d','请先选择记录','mainAlertdiv');
}else{
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 + '/accident/reasonableAdvice/dodeletes.do', {ids:datas} , function(data) {
if(data.code>0){
$("#table").bootstrapTable('refresh');
}else{
showAlert('d','删除失败','mainAlertdiv');
}
},'json');
}
});
}
};
var dosearch = function() {
$("#table").bootstrapTable('refresh');
};
var companyId = unitId;
$(function() {
companyId = unitId;
initFun();
});
var initFun = function(){
$("#table").bootstrapTable({ // 对应table标签的id
url: ext.contextPath + '/accident/reasonableAdvice/getlist.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,
search_name: $('#search_name').val(),
unitId: unitId,
takeFlag: "已提交",
// statusSelect:$("#statusSelect").val(),
}
},
// onClickRow: function (row) {//单击行事件,执行查看功能
// viewFun(row.id);
// },
sortName: 'insdt', // 要排序的字段
sortOrder: 'desc', // 排序规则
columns: [
{
checkbox: true, // 显示一个勾选框
},{
field: 'caption', // 返回json数据中的name
title: '建议人', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
},{
field: 'adviceType', // 返回json数据中的name
title: '建议类型', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
},{
field: 'name', // 返回json数据中的name
title: '建议名称', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
},{
field: 'company.name', // 返回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,10);
}
},{
field: 'takeFlag', // 返回json数据中的name
title: '状态', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
},{
title: "操作",
align: 'center',
valign: 'middle',
width: 120, // 定义列的宽度单位为像素px
formatter: function (value, row, index) {
var buts="";
buts+= '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
buts+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteFun(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
buts='<div class="btn-group" >'+buts+'</div>';
return buts;
}
}
],
onLoadSuccess: function(){ //加载成功时执行
adjustBootstrapTableView("table");
},
onLoadError: function(){ //加载失败时执行
console.info("加载数据失败");
}
});
}
</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" style="width: 220px;height:10px;"></div>
<div id="subDivAbnorm"></div>
<div id="menu4SelectDiv"></div>
<div id="equ4SelectDiv"></div>
<div id="library4SelectDiv"></div>
<div id="problemTyp4SelectDiv"></div>
<div id="user4SelectDiv"></div>
<div id="fileInputDiv"></div>
<div >
<div class="form-group " style="margin-bottom:10px;">
<input id="search_pid" name="search_pid" type="hidden" />
<span id="companyName" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold"></span>
</div>
<div class="form-group form-inline" style="padding:0;">
<div class="btn-group" style="width: 280px;padding-bottom:10px;">
<!-- <security:authorize buttonUrl="maintenance/abnormity/add.do"> -->
<!-- <button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i class="fa fa-plus"></i> 新增</button>
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button> -->
<!--
<button type="button" class="btn btn-default btn-sm" title="异常中有设备的生成维修,没设备的生成缺陷" onclick="createDefectFun();"><i class="fa fa-send-o"></i>生成缺陷或维修单</button> -->
<!-- </security:authorize> -->
</div>
<!--
<div class="form-group pull-right form-inline" >
<div class="form-group">
<label class="form-label">工艺段:</label>
<select class="form-control select2 " id="processSection" name ="processSection" style="width: 160px;"></select>
<label class="form-label">状态:</label>
<select class="form-control select2 " id="statusSelect" name ="statusSelect" style="width: 160px;">
<option value= "${Wait}">待处理</option>
<option value= "${Start}">处理中</option>
<option value= "${Finish}">已完成</option>
</select>
</div>
<div class="form-group" >
<div class="input-group input-group-sm" style="width: 250px;">
<input type="text" id="search_name" name="search_name" class="form-control pull-right" style="height:34px;" placeholder="名称">
<div class="input-group-btn">
<button class="btn btn-default" style="height:34px;" onclick="dosearch();"><i class="fa fa-search"></i></button>
</div>
</div>
</div>
</div> -->
<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" style="height:34px;" placeholder="名称">
<div class="input-group-btn">
<button class="btn btn-default" style="height:34px;" onclick="dosearch();"><i class="fa fa-search"></i></button>
</div>
</div>
</div>
</div>
<table id="table"></table>
</div>
</section>
<!-- /.content -->
</div>
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
</div>
</body>
<!-- bootstrap switch -->
<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>

View File

@ -0,0 +1,121 @@
<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="com.sipai.entity.accident.AccidentCommString"%>
<%request.setAttribute("START", AccidentCommString.STATUS_RA_START); %>
<%request.setAttribute("AUDIT", AccidentCommString.STATUS_RA_AUDIT); %>
<style type="text/css">
.select2-container .select2-selection--single{
height:34px;
line-height: 34px;
}
.select2-selection__arrow{
margin-top:3px;
}
</style>
<script type="text/javascript">
var masterId1='${reasonableAdvice.id}';
var tbName1='TB_Process_UploadFile'; //数据表
var nameSpace1='ProcessUploadFile';//保存文件夹
var previews = new Array();
var previewConfigs = new Array();
//以下为上传图片
//名称定义不可修改
var getFileList = function() {
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId:masterId1,tbName:tbName1} , function(data) {
//console.info(data)
if(data.length>0){
previews=new Array();
$('#maintenancefile').show();
for(var i=0;i<data.length;i++){
var previewConfig = new Object();
var path = data[i].abspath;
path=path.substring(path.indexOf('webapps')+7,path.length);
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");;
previews.push(path);
previewConfig['width']= '50px';
previewConfig['caption']= data[i].filename;
console.log(data[i].filename)
previewConfig['key']= data[i].id;
previewConfigs.push(previewConfig);
}
showFileInput("maintenanceDetailFile");
}else{
$('#maintenanceDetailFile').hide();
}
},'json');
};
$(function(){
getFileList();
});
</script>
<div class="modal fade" id="subModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">查看合理化建议</h4>
</div>
<div class="modal-body">
<!-- 新增界面formid强制为subForm -->
<form class="form-horizontal" id="subForm">
<!-- 界面提醒div强制id为alertDiv -->
<div id="alertDiv"></div>
<input type="hidden" class="form-control" id="id" name ="id" value ="${reasonableAdvice.id}">
<div class="form-group">
<label class="col-sm-2 control-label">建议名称</label>
<div class="col-sm-10">
<p class="form-control-static" >${reasonableAdvice.name}</p>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">建议类型</label>
<div class="col-sm-10">
<p class="form-control-static" >${reasonableAdvice.adviceType}</p>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">建议内容</label>
<div class="col-sm-10">
<p class="form-control-static" >${reasonableAdvice.content}</p>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">建议人</label>
<div class="col-sm-10">
<p class="form-control-static" >${solvername}</p>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">辅议人</label>
<div class="col-sm-10">
<p class="form-control-static" >${solvername1}</p>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">审核人</label>
<div class="col-sm-10">
<p class="form-control-static" >${reasonableAdvice.auditManName}</p>
</div>
</div>
<div class="form-group" style="margin:8px;">
<input type="file" name="maintenanceDetailFile" id="maintenanceDetailFile" multiple class="file-loading" />
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>

View File

@ -0,0 +1,242 @@
<%@ page language="java" pageEncoding="UTF-8" %>
<%@page import="com.sipai.entity.accident.AccidentCommString" %>
<%request.setAttribute("START", AccidentCommString.STATUS_RA_START); %>
<%request.setAttribute("AUDIT", AccidentCommString.STATUS_RA_AUDIT); %>
<style type="text/css">
.select2-container .select2-selection--single {
height: 34px;
line-height: 34px;
}
.select2-selection__arrow {
margin-top: 3px;
}
</style>
<script type="text/javascript">
function dosave() {
$('#subForm').data('bootstrapValidator')
.updateStatus('solvername', 'NOT_VALIDATED', null)
.validateField('happenDate');
$("#subForm").bootstrapValidator('validate');//提交验证
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath + "/accident/roast/dosave.do", $("#subForm").serialize(), function (data) {
if (data.code == 1) {
showAlert('s', '保存成功');
closeModal('subModal')
$("#table").bootstrapTable('refresh');
//刷新app页面
initAPP();
} else if (data.code == 0) {
showAlert('d', '保存失败');
} else {
showAlert('d', data.res);
}
}, 'json');
}
}
function dosubmit() {
$("#takeFlag").val('${AUDIT}');
$('#subForm').data('bootstrapValidator')
.updateStatus('auditManName', 'NOT_VALIDATED', null)
.validateField('auditManName');
$("#subForm").bootstrapValidator('validate');//提交验证
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath + "/accident/roast/startProcess.do", $("#subForm").serialize(), function (data) {
if (data.res == 1) {
$("#table").bootstrapTable('refresh');
closeModal('subModal');
//刷新app页面
initAPP();
} else if (data.res == 0) {
showAlert('d', '保存失败');
} else if (data.res == 2) {
showAlert('d', '未检测到吐槽大会审核流程,请先部署吐槽大会审核流程!');
} else {
showAlert('d', data.res);
}
}, 'json');
}
}
//提交时先验证审核人不能为空,保存时审核人可以为空
function submitFun() {
//新增的输入框添加验证
$("#subForm").data('bootstrapValidator').addField('auditManName', {
validators: {
notEmpty: {
message: '审核人不能为空'
},
}
});
dosubmit();
}
$("#subForm").bootstrapValidator({
live: 'disabled',//验证时机enabled是内容有变化就验证默认disabled和submitted是提交再验证
fields: {
name: {
validators: {
notEmpty: {
message: '名称不能为空'
}
}
},
solvername: {
validators: {
notEmpty: {
message: '吐槽人不能为空'
}
}
}
}
});
$(function () {
});
var showUser4SelectsFun = function () {
var userIds = $("#userLead").val();
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {
formId: "subForm",
hiddenId: "userLead",
textId: "solvername",
userIds: userIds
}, function (data) {
$("#user4SelectDiv").html(data);
openModal("user4SelectModal");
});
};
var showUser4SelectsFun1 = function () {
var userIds = $("#usersHelp").val();
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {
formId: "subForm",
hiddenId: "usersHelp",
textId: "solvername1",
userIds: userIds
}, function (data) {
$("#user4SelectDiv").html(data);
openModal("user4SelectModal");
});
};
//选择审核人
var showUser4AuditSelectsFun = function () {
var userIds = $("#auditManId").val();
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {
formId: "subForm",
hiddenId: "auditManId",
textId: "auditManName",
userIds: userIds
}, function (data) {
$("#user4SelectDiv").html(data);
openModal("user4SelectModal");
});
};
var selelct_type = $("#anonymous").select2({
placeholder: '请选择',
minimumResultsForSearch: 10
});
selelct_type.on('change', function () {
var anonymous = $('#anonymous').val();
if ('0' == anonymous) {//不匿名
$("#userLeadDiv").attr("style", "display:block;");
} else {//匿名
$("#userLeadDiv").attr("style", "display:none;");
$('#solvername').val("");
$('#userLead').val("");
}
})
</script>
<div class="modal fade" id="subModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">新增</h4>
</div>
<div class="modal-body">
<!-- 新增界面formid强制为subForm -->
<form class="form-horizontal" id="subForm">
<!-- 界面提醒div强制id为alertDiv -->
<div id="alertDiv"></div>
<input type="hidden" class="form-control" id="id" name="id" value="${roast.id}">
<input type="hidden" class="form-control" id="unitId" name="unitId" value="${param.unitId}">
<input type="hidden" class="form-control" id="takeFlag" name="takeFlag" value="${START}">
<div class="form-group">
<label class="col-sm-2 control-label">*吐槽名称</label>
<div class="col-sm-10">
<input class="form-control" type="text" id="name" name="name" placeholder="名称"
value="${roast.name}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">吐槽类型</label>
<div class="col-sm-10">
<input class="form-control" type="text" id="adviceType" name="adviceType" placeholder="类型"
value="${roast.adviceType}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">吐槽内容</label>
<div class="col-sm-10">
<textarea class="form-control" rows="5" id="content" name="content"
placeholder="不超过500字">${roast.content}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">是否匿名</label>
<div class="col-sm-4">
<select class="form-control select2" id="anonymous" name="anonymous">
<option value="0">否</option>
<option value="1">是</option>
</select>
</div>
</div>
<div class="form-group" id="userLeadDiv">
<label class="col-sm-2 control-label">*吐槽人</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="solvername" name="solvername"
placeholder="请选择吐槽人" onclick="showUser4SelectsFun();" value="${userName}">
<input id="userLead" name="userLead" type="hidden" value="${userId}"/>
</div>
</div>
<%--<div class="form-group">
<label class="col-sm-2 control-label">辅议人</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="solvername1" name ="solvername1" placeholder="请选择辅议人" onclick="showUser4SelectsFun1();">
<input id="usersHelp" name="usersHelp" type="hidden" />
</div>
</div>--%>
<div class="form-group">
<label class="col-sm-2 control-label">审核人</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="auditManName" name="auditManName"
placeholder="点击选择" onclick="showUser4AuditSelectsFun();">
<input id="auditManId" name="auditManId" type="hidden"/>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
<button type="button" class="btn btn-primary" onclick="submitFun()" id="btn_submit">提交</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>

View File

@ -0,0 +1,212 @@
<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@page import="com.sipai.entity.accident.AccidentCommString" %>
<%request.setAttribute("AUDIT", AccidentCommString.STATUS_RA_AUDIT); %>
<%request.setAttribute("START", AccidentCommString.STATUS_RA_START); %>
<%request.setAttribute("FINISH", AccidentCommString.STATUS_RA_FINISH); %>
<%request.setAttribute("FAIL", AccidentCommString.STATUS_RA_FAIL); %>
<style type="text/css">
.select2-container .select2-selection--single {
height: 34px;
line-height: 34px;
}
.select2-selection__arrow {
margin-top: 3px;
}
</style>
<script type="text/javascript">
//流程审核文件上传所需参数
var masterId_process = '${roast.id}';//业务Id
var tbName_process = 'TB_Process_UploadFile'; //数据表
var nameSpace_process = 'ProcessUploadFile';//保存文件夹
var status = 'delete';//有删除权限
function doSubmit() {
$('#subForm').data('bootstrapValidator')
.updateStatus('targetUsersName', 'NOT_VALIDATED', null)
.validateField('targetUsersName');
$("#subForm").bootstrapValidator('validate');//提交验证
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码 */
$.post(ext.contextPath + "/accident/roast/AuditRoast.do", $("#subForm").serialize(), function (data) {
if (data.res == 1) {
closeModal('subModal')
$("#table").bootstrapTable('refresh');
} else if (data.res == 0) {
showAlert('d', '操作执行失败,请重试');
} else {
showAlert('d', data.res);
}
}, 'json');
}
}
var showUser4SelectsFun = function () {
var userIds = $("#targetusers").val();
var jobIds = $("#targetjobs").val();
$.post(ext.contextPath + '/user/userForSelectByCompany.do', {
formId: "subForm",
hiddenId: "targetusers",
textId: "targetUsersName",
userIds: userIds,
jobIds: jobIds
}, function (data) {
$("#user4SelectDiv").html(data);
openModal("user4SelectModal");
});
};
$(function () {
//初始化文件显示
getFileList_process();
//初始化选择框方法在workflow.js里
processSelectNode("${businessUnitAudit.taskid}");
//输入框验证
$("#subForm").bootstrapValidator({
live: 'disabled',//验证时机enabled是内容有变化就验证默认disabled和submitted是提交再验证
fields: {
targetUsersName: {
validators: {
notEmpty: {
message: '提交人员不能为空'
}
}
},
}
});
//显示流程详情
var id = '${roast.id}';
$.post(ext.contextPath + '/accident/roast/showProcessRoastView.do', {
id: id,
inModal: 'inModal'
}, function (data) {
$("#showView").html(data);
});
})
</script>
<div class="modal fade" id="subModal">
<%-- <div class="modal-dialog modal-xlg">--%>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">流程处理(${taskName})</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-12 col-xs-12">
<!-- 新增界面formid强制为subForm -->
<form class="form-horizontal" id="subForm" enctype="multipart/form-data">
<!-- 界面提醒div强制id为alertDiv -->
<div id="alertDiv"></div>
<div class="form-group">
<label class="col-sm-2 control-label">吐槽名称</label>
<div class="col-sm-4">
<p class="form-control-static">${roast.name}</p>
</div>
<label class="col-sm-2 control-label">吐槽类型</label>
<div class="col-sm-4">
<p class="form-control-static">${roast.adviceType}</p>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">吐槽内容</label>
<div class="col-sm-10">
<p class="form-control-static">${roast.content}</p>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">是否匿名</label>
<div class="col-sm-10">
<c:if test="${roast.anonymous==0}">
<p class="form-control-static">否</p>
</c:if>
<c:if test="${roast.anonymous==1}">
<p class="form-control-static">是</p>
</c:if>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">吐槽人</label>
<div class="col-sm-10">
<c:if test="${roast.userLead!=null && roast.userLead!= ''}">
<p class="form-control-static">${solvername}</p>
</c:if>
<c:if test="${roast.userLead==null || roast.userLead== ''}">
<p class="form-control-static">匿名</p>
</c:if>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">审核人</label>
<div class="col-sm-10">
${roast.auditManName}
</div>
</div>
<input type="hidden" class="form-control" name="id" value="${businessUnitAudit.id}">
<input type="hidden" class="form-control" name="processid"
value="${businessUnitAudit.processid}">
<input type="hidden" class="form-control" name="taskid" value="${businessUnitAudit.taskid}">
<input type="hidden" class="form-control" name="businessid"
value="${businessUnitAudit.businessid}">
<input type="hidden" class="form-control" name=unitId value="${param.unitId}">
<input type="hidden" class="form-control" name="taskdefinitionkey"
value="${businessUnitAudit.taskdefinitionkey}">
<div class="form-group">
<label class="col-sm-2 control-label">*审核结果</label>
<div class="col-sm-10">
<select class="form-control select2" id="passstatus" name="passstatus"
style="width: 320px">
<option value=true>通过</option>
<option value=false>不通过</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">*下一节点</label>
<div class="col-sm-10">
<select class="form-control select2" id="routeNum" name="routeNum"
style="width: 320px">
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">审核意见</label>
<div class="col-sm-10">
<textarea class="form-control" rows="2" id="auditopinion" name="auditopinion"
placeholder="检验意见">通过</textarea>
</div>
</div>
<div id="selectUsers" class="form-group">
<label class="col-sm-2 control-label">提交至:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="targetUsersName" name="targetUsersName"
placeholder="下一级人员" onclick="showUser4SelectsFun();">
<input id="targetusers" name="targetusers" type="hidden" value=""/>
<input class="form-control" id="targetjobs" name="targetjobs" type="hidden"
value=""/>
</div>
</div>
</form>
</div>
<%--<div class="col-md-5 col-xs-12" id="showView"></div>--%>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" onclick="doSubmit()" id="btn_update">审核</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>

View File

@ -0,0 +1,343 @@
<%@ page language="java" pageEncoding="UTF-8" %>
<%@page import="com.sipai.entity.accident.AccidentCommString" %>
<%request.setAttribute("START", AccidentCommString.STATUS_RA_START); %>
<%request.setAttribute("AUDIT", AccidentCommString.STATUS_RA_AUDIT); %>
<style type="text/css">
.select2-container .select2-selection--single {
height: 34px;
line-height: 34px;
}
.select2-selection__arrow {
margin-top: 3px;
}
</style>
<script type="text/javascript">
var masterId1 = '${roast.id}';
var tbName1 = 'TB_Process_UploadFile'; //数据表
var nameSpace1 = 'ProcessUploadFile';//保存文件夹
var previews = new Array();
var previewConfigs = new Array();
function doupdate() {
$('#subForm').data('bootstrapValidator')
.updateStatus('solvername', 'NOT_VALIDATED', null)
.validateField('happenDate');
$("#subForm").bootstrapValidator('validate');//提交验证
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath + "/accident/roast/doupdate.do", $("#subForm").serialize(), function (data) {
if (data.code == 1) {
showAlert('s', '保存成功');
closeModal('subModal')
$("#table").bootstrapTable('refresh');
//刷新app页面
initAPP();
} else if (data.code == 0) {
showAlert('d', '保存失败');
} else {
showAlert('d', data.msg);
}
}, 'json');
}
}
function dosubmit() {
$("#takeFlag").val('${AUDIT}');
$('#subForm').data('bootstrapValidator')
.updateStatus('auditManName', 'NOT_VALIDATED', null)
.validateField('auditManName');
$("#subForm").bootstrapValidator('validate');//提交验证
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath + "/accident/roast/startProcess.do", $("#subForm").serialize(), function (data) {
if (data.res == 1) {
$("#table").bootstrapTable('refresh');
closeModal('subModal');
} else if (data.res == 0) {
showAlert('d', '保存失败');
} else if (data.res == 2) {
showAlert('d', '未检测到吐槽大会审核流程,请先部署吐槽大会审核流程!');
} else {
showAlert('d', data.res);
}
}, 'json');
}
}
//提交时先验证审核人不能为空,保存时审核人可以为空
function submitFun() {
//新增的输入框添加验证
$("#subForm").data('bootstrapValidator').addField('auditManName', {
validators: {
notEmpty: {
message: '审核人不能为空'
},
}
});
dosubmit();
}
$("#subForm").bootstrapValidator({
live: 'disabled',//验证时机enabled是内容有变化就验证默认disabled和submitted是提交再验证
fields: {
name: {
validators: {
notEmpty: {
message: '名称不能为空'
}
}
},
solvername: {
validators: {
notEmpty: {
message: '吐槽人不能为空'
}
}
}
}
});
var showUser4SelectsFun = function () {
var userIds = $("#userLead").val();
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {
formId: "subForm",
hiddenId: "userLead",
textId: "solvername",
userIds: userIds
}, function (data) {
$("#user4SelectDiv").html(data);
openModal("user4SelectModal");
});
};
/*var showUser4SelectsFun1 = function () {
var userIds = $("#usersHelp").val();
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {
formId: "subForm",
hiddenId: "usersHelp",
textId: "solvername1",
userIds: userIds
}, function (data) {
$("#user4SelectDiv").html(data);
openModal("user4SelectModal");
});
};*/
//以下为上传图片
//名称定义不可修改
var getFileList = function () {
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId: masterId1, tbName: tbName1}, function (data) {
//console.info(data)
if (data.length > 0) {
previews = new Array();
$('#maintenancefile').show();
for (var i = 0; i < data.length; i++) {
var previewConfig = new Object();
var path = data[i].abspath;
path = path.substring(path.indexOf('webapps') + 7, path.length);
path = ext.basePath.replace(ext.contextPath, '') + path.replace(/\\/g, "\/");
;
previews.push(path);
previewConfig['width'] = '50px';
previewConfig['caption'] = data[i].filename;
console.log(data[i].filename)
previewConfig['key'] = data[i].id;
previewConfigs.push(previewConfig);
}
showFileInput("maintenanceDetailFile");
} else {
$('#maintenanceDetailFile').hide();
}
}, 'json');
};
//初始化fileinput控件第一次初始化
function showFileInput(ctrlName) {
var control = $('#' + ctrlName);
control.fileinput('destroy');
control.fileinput({
language: 'zh', //设置语言
showUpload: false, //是否显示上传按钮
showRemove: false,
showCaption: false,//是否显示标题
showBrowse: false,//选择按钮
showClose: false,//右上角关闭按钮
dropZoneEnabled: false,//是否显示拖拽区域
fileActionSettings: {
showDrag: false
},
browseClass: "btn btn-primary", //按钮样式
maxFileCount: 10, //表示允许同时上传的最大文件个数
enctype: 'multipart/form-data',
validateInitialCount: true,
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
initialPreviewAsData: true,
initialPreview: previews,
initialPreviewConfig: previewConfigs,
layoutTemplates: {
actionUpload: ''
},
deleteUrl: ext.contextPath + "/base/deleteInputFile.do",
deleteExtraData: function () { //传参
var data = {
"tbName": tbName1
};
return data;
}
});
$('#kvFileinputModal').on("hidden.bs.modal", function () {
$(this).removeData("bs.modal");
//modal重复打开会导致前面的滚动条失去作用
$('.modal').css("overflow", "auto");
});
}
var fileinput1 = function () {
//var url='/maintenance/updateProblemFile.do';//保存数据表方法
$.post(ext.contextPath + '/base/fileinput.do', {
masterId: masterId1,
tbName: tbName1,
nameSpace: nameSpace1
}, function (data) {
$("#fileInputDiv").html(data);
openModal('fileInputModal');
});
};
//选择审核人
var showUser4AuditSelectsFun = function () {
var userIds = $("#auditManId").val();
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {
formId: "subForm",
hiddenId: "auditManId",
textId: "auditManName",
userIds: userIds
}, function (data) {
$("#user4SelectDiv").html(data);
openModal("user4SelectModal");
});
};
var selelct_type = $("#anonymous").select2({
placeholder: '请选择',
minimumResultsForSearch: 10
});
selelct_type.on('change', function () {
var anonymous = $('#anonymous').val();
if ('0' == anonymous) {//不匿名
$("#userLeadDiv").attr("style", "display:block;");
} else {//匿名
$("#userLeadDiv").attr("style", "display:none;");
$('#solvername').val("");
$('#userLead').val("");
}
})
$(function () {
getFileList();
var anonymous = '${roast.anonymous}';
$("#anonymous").val(anonymous).trigger("change");
});
</script>
<div class="modal fade" id="subModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">编辑</h4>
</div>
<div class="modal-body">
<!-- 新增界面formid强制为subForm -->
<form class="form-horizontal" id="subForm">
<!-- 界面提醒div强制id为alertDiv -->
<div id="alertDiv"></div>
<input type="hidden" class="form-control" id="id" name="id" value="${roast.id}">
<input type="hidden" class="form-control" id="unitId" name="unitId" value="${roast.unitId}">
<div class="form-group">
<label class="col-sm-2 control-label">*吐槽名称</label>
<div class="col-sm-10">
<input class="form-control" type="text" id="name" name="name" placeholder="名称"
value="${roast.name}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">吐槽类型</label>
<div class="col-sm-10">
<input class="form-control" type="text" id="adviceType" name="adviceType" placeholder="类型"
value="${roast.adviceType}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">吐槽内容</label>
<div class="col-sm-10">
<textarea class="form-control" rows="5" id="content" name="content"
placeholder="不超过500字">${roast.content}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">是否匿名</label>
<div class="col-sm-4">
<select class="form-control select2" id="anonymous" name="anonymous">
<option value="0">否</option>
<option value="1">是</option>
</select>
</div>
</div>
<div class="form-group" id="userLeadDiv">
<label class="col-sm-2 control-label">*吐槽人</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="solvername" name="solvername"
placeholder="请选择吐槽人" onclick="showUser4SelectsFun();" value="${solvername}">
<input id="userLead" name="userLead" type="hidden" value="${roast.userLead}"/>
</div>
</div>
<%--<div class="form-group">
<label class="col-sm-2 control-label">辅议人</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="solvername1" name ="solvername1" placeholder="请选择辅议人" onclick="showUser4SelectsFun1();" value="${solvername1}">
<input id="usersHelp" name="usersHelp" type="hidden" value="${roast.usersHelp}"/>
</div>
</div>--%>
<div class="form-group">
<label class="col-sm-2 control-label">审核人</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="auditManName" name="auditManName"
placeholder="点击选择" value="${roast.auditManName}"
onclick="showUser4AuditSelectsFun();">
<input id="auditManId" name="auditManId" type="hidden" value="${roast.auditManId}"/>
</div>
</div>
<input type="hidden" class="form-control" id="takeFlag" name="takeFlag" value="${roast.takeFlag}">
<%--<div class="form-group" style="margin:8px">
<button type="button" class="btn btn-default btn-file" onclick="fileinput1()" id="btn_save"><i class="fa fa-paperclip"></i>上传图片</button>
</div>--%>
<div class="form-group" style="margin:8px;">
<input type="file" name="maintenanceDetailFile" id="maintenanceDetailFile" multiple
class="file-loading"/>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" onclick="doupdate()" id="btn_save">保存</button>
<button type="button" class="btn btn-primary" onclick="submitFun()" id="btn_submit">提交</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>

View File

@ -0,0 +1,239 @@
<%@ page language="java" pageEncoding="UTF-8"%>
<style type="text/css">
.select2-container .select2-selection--single{
height:34px;
line-height: 34px;
}
.select2-selection__arrow{
margin-top:3px;
}
</style>
<script type="text/javascript">
var masterId1='${roast.id}';
var tbName1='tb_reasonable_advice_file'; //数据表
var nameSpace1='RoastPicture';//保存文件夹
var previews = new Array();
var previewConfigs = new Array();
function doupdate(takeFlag) {
$('#takeFlag').val(takeFlag);
$('#subForm').data('bootstrapValidator')
.updateStatus('solvername', 'NOT_VALIDATED',null)
.validateField('happenDate');
$("#subForm").bootstrapValidator('validate');//提交验证
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath + "/accident/roast/doupdate.do", $("#subForm").serialize(), function(data) {
if (data.code == 1){
showAlert('s','保存成功');
closeModal('subModal')
$("#table").bootstrapTable('refresh');
}else if(data.code == 0){
showAlert('d','保存失败');
}else{
showAlert('d',data.msg);
}
},'json');
}
}
$("#subForm").bootstrapValidator({
live: 'disabled',//验证时机enabled是内容有变化就验证默认disabled和submitted是提交再验证
fields: {
name: {
validators: {
notEmpty: {
message: '名称不能为空'
}
}
},
solvername: {
validators: {
notEmpty: {
message: '吐槽人不能为空'
}
}
}
}
});
var showUser4SelectsFun = function() {
var userIds= $("#userLead").val();
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"subForm",hiddenId:"userLead",textId:"solvername",userIds:userIds} , function(data) {
$("#user4SelectDiv").html(data);
openModal("user4SelectModal");
});
};
var showUser4SelectsFun1 = function() {
var userIds= $("#usersHelp").val();
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"subForm",hiddenId:"usersHelp",textId:"solvername1",userIds:userIds} , function(data) {
$("#user4SelectDiv").html(data);
openModal("user4SelectModal");
});
};
//以下为上传图片
//名称定义不可修改
var getFileList = function() {
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId:masterId1,tbName:tbName1} , function(data) {
//console.info(data)
if(data.length>0){
previews=new Array();
$('#maintenancefile').show();
for(var i=0;i<data.length;i++){
var previewConfig = new Object();
var path = data[i].abspath;
path=path.substring(path.indexOf('webapps')+7,path.length);
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");;
previews.push(path);
previewConfig['width']= '50px';
previewConfig['caption']= data[i].filename;
console.log(data[i].filename)
previewConfig['key']= data[i].id;
previewConfigs.push(previewConfig);
}
showFileInput("maintenanceDetailFile");
}else{
$('#maintenanceDetailFile').hide();
}
},'json');
};
//初始化fileinput控件第一次初始化
function showFileInput(ctrlName) {
var control = $('#' + ctrlName);
control.fileinput('destroy');
control.fileinput({
language: 'zh', //设置语言
showUpload: false, //是否显示上传按钮
showRemove:false,
showCaption: false,//是否显示标题
showBrowse:false,//选择按钮
showClose:false,//右上角关闭按钮
dropZoneEnabled: false,//是否显示拖拽区域
fileActionSettings:{
showDrag:false
},
browseClass: "btn btn-primary", //按钮样式
maxFileCount: 10, //表示允许同时上传的最大文件个数
enctype: 'multipart/form-data',
validateInitialCount:true,
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
initialPreviewAsData: true,
initialPreview: previews,
initialPreviewConfig:previewConfigs,
layoutTemplates:{
actionUpload:''
},
deleteUrl:ext.contextPath+"/base/deleteInputFile.do",
deleteExtraData:function () { //传参
var data = {
"tbName": tbName1
};
return data;
}
});
$('#kvFileinputModal').on("hidden.bs.modal", function() {
$(this).removeData("bs.modal");
//modal重复打开会导致前面的滚动条失去作用
$('.modal').css("overflow","auto");
});
}
var fileinput1 = function() {
//var url='/maintenance/updateProblemFile.do';//保存数据表方法
$.post(ext.contextPath + '/base/fileinput.do', {masterId:masterId1,tbName:tbName1,nameSpace:nameSpace1} , function(data) {
$("#fileInputDiv").html(data);
openModal('fileInputModal');
});
};
$(function(){
getFileList();
});
</script>
<div class="modal fade" id="subModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">编辑合理化吐槽</h4>
</div>
<div class="modal-body">
<!-- 新增界面formid强制为subForm -->
<form class="form-horizontal" id="subForm">
<!-- 界面提醒div强制id为alertDiv -->
<div id="alertDiv"></div>
<input type="hidden" class="form-control" id="id" name ="id" value ="${roast.id}">
<input type="hidden" class="form-control" id="unitId" name ="unitId" value ="${roast.unitId}">
<div class="form-group">
<label class="col-sm-2 control-label">*吐槽名称</label>
<div class="col-sm-10">
<input class="form-control" type="text" id="name" name ="name" placeholder="名称" value="${roast.name}" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">吐槽类型</label>
<div class="col-sm-10">
<input class="form-control" type="text" id="adviceType" name ="adviceType" placeholder="类型" value="${roast.adviceType}" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">吐槽内容</label>
<div class="col-sm-10">
<textarea class="form-control" rows="5" id ="content" name ="content" placeholder="不超过500字" readonly>${roast.content}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">*吐槽人</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="solvername" name ="solvername" placeholder="请选择吐槽人" value="${solvername}" readonly>
<input id="userLead" name="userLead" type="hidden" value="${roast.userLead}"/>
</div>
</div>
<%--<div class="form-group">
<label class="col-sm-2 control-label">辅议人</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="solvername1" name ="solvername1" placeholder="请选择辅议人" value="${solvername1}" readonly>
<input id="usersHelp" name="usersHelp" type="hidden" value="${roast.usersHelp}"/>
</div>
</div>--%>
<input type="hidden" class="form-control" id="takeFlag" name ="takeFlag" value ="${roast.takeFlag}">
<div class="form-group">
<label class="col-sm-2 control-label">审核意见</label>
<div class="col-sm-10">
<textarea class="form-control" rows="5" id ="auditContent" name ="auditContent" placeholder="不超过500字">${roast.auditContent}</textarea>
</div>
</div>
<div class="form-group" style="margin:8px">
<button type="button" class="btn btn-default btn-file" onclick="fileinput1()" id="btn_save"><i class="fa fa-paperclip"></i>上传图片</button>
</div>
<div class="form-group" style="margin:8px;">
<input type="file" name="maintenanceDetailFile" id="maintenanceDetailFile" multiple class="file-loading" />
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" onclick="doupdate('不通过')" >不通过</button>
<button type="button" class="btn btn-primary" onclick="doupdate('已通过')" >已通过</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>

View File

@ -0,0 +1,267 @@
<%@page import="com.sipai.entity.business.BusinessUnit"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%String contextPath = request.getContextPath();%>
<%String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath();%>
<%String serverPath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();%>
<%request.setAttribute("Status_Finish",Maintenance.Status_Finish);%>
<!-- 补录状态 -->
<%request.setAttribute("TYPE_SUPPLEMENT",Maintenance.TYPE_SUPPLEMENT);%>
<!-- 运维主流程状态 -->
<%request.setAttribute("TYPE_MAINTENANCE",Maintenance.TYPE_MAINTENANCE);%>
<%request.setAttribute("UNIT_HANDLE",BusinessUnit.UNIT_HANDLE);%>
<!-- bootstrap-star-rating -->
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/css/star-rating.min.css"/>
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/js/star-rating.min.js" charset="utf-8"></script>
<script type="text/javascript">
//var masterId=$('#maintenanceId').val();
var tbName_problem='tb_maintenance_problem_fille'; //数据表
var tbName_maintenance='tb_maintenance_file'; //数据表
var nameSpace='MaintenanceProblem';//保存文件夹
var previews = new Array();
var previewConfigs = new Array();
/* var student = {
"caption":"lilei",
}
previewConfigs[0]=student; */
//初始化fileinput控件第一次初始化
function showFileInput(ctrlName) {
var control = $('#' + ctrlName);
control.fileinput('destroy');
control.fileinput({
language: 'zh', //设置语言
showUpload: false, //是否显示上传按钮
showRemove:false,
showCaption: false,//是否显示标题
showBrowse:false,//选择按钮
showClose:false,//右上角关闭按钮
dropZoneEnabled: false,//是否显示拖拽区域
resizeImage:true,
fileActionSettings:{
showDrag:false
},
browseClass: "btn btn-primary", //按钮样式
maxFileCount: 10, //表示允许同时上传的最大文件个数
enctype: 'multipart/form-data',
validateInitialCount:true,
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
initialPreviewAsData: true,
initialPreview: previews,
initialPreviewConfig:previewConfigs,
layoutTemplates:{
actionUpload:'',
actionDelete:''
}
});
$('#kvFileinputModal').on("hidden.bs.modal", function() {
$(this).removeData("bs.modal");
//modal重复打开会导致前面的滚动条失去作用
$('.modal').css("overflow","auto");
});
}
var viewHandleDetailFun = function(id) {
$.post(ext.contextPath + '/maintenance/showHandleDetailView.do', {id:id} , function(data) {
$("#handleDetailDiv").html(data);
openModal('handleDetailModal');
});
};
//流程审核文件上传所需参数
var masterId_process = '${param.id}';//业务Id
var tbName_process = 'TB_Process_UploadFile'; //数据表
var nameSpace_process ='ProcessUploadFile';//保存文件夹
var status = 'view';//有查看权限
$(function() {
//初始化文件显示
getFileList_process();
$("#judgemaintainerstaff").rating('refresh',{showClear:false,showCaption:false,readonly:true});
$("#judgeresult").rating('refresh',{showClear:false,showCaption:false,readonly:true});
var result='${businessUnitRecords}';
result=result.replace(new RegExp("\r\n","gm"),"");
var json =JSON.parse(result);
$.each(json, function(index, item) {
if(item.id!=null &&item.id!=""){
previews=new Array();
$('#'+item.id).show();
var data =item.files;
for(var i=0;i<data.length;i++){
var previewConfig = new Object();
var path = data[i].abspath;
path=path.substring(path.indexOf('webapps')+7,path.length);
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");
previews.push(path);
previewConfig['width']= '30px';
previewConfig['caption']= data[i].filename;
previewConfig['key']= data[i].id;
previewConfigs.push(previewConfig);
}
showFileInput(item.id);
}
});
})
//----------------------------------------------------------------------------------------------------------------------------------------------------
var printpage = function (myDiv){
$('.printContent').show();
var printHtml = document.getElementById(myDiv).innerHTML;
var wind = window.open("", "newwin", "width=1550,height=565,top=80,left=80,toolbar=no,scrollbars=yes,menubar=no");
/*
var ss = ".coversheet-pageBoder{"
+" padding: 10px;"
+" margin-top: 10px;"
+" border: 1px solid gray;"
+" page-break-after: always;"
+" border-radius: 5px;"
+" box-shadow: 0 1px 2px 1px rgba(0,0,0,.08), 0 3px 6px rgba(0,0,0,.08);"
+"}"
+".noprint{display: none;}"
+".select2-container .select2-selection--single{ "
+" height:34px; "
+" line-height: 34px; "
+" }"
+" .select2-selection__arrow{"
+" margin-top:3px;"
+" } "
+" .div-row{"
+" margin-left:3px;"
+" margin-right:3px;"
+" }"
+" .div-border{"
+" border-style:solid;"
+" border-width:1px;"
+" text-align:center;"
+" }"
+" .right-border{"
+" border-right:none;"
+" }"
+" .top-right-border{"
+" border-top:none;"
+" border-right:none;"
+" }"
+" .top-border{"
+" border-top:none;"
+" }";
*/
//for Chrome Firefox Opera Safari
//wind.document.body.innerHTML = printHtml;
var link = document.createElement('link');
link.type = 'text/css';
link.rel = 'stylesheet';
link.href = '<%=serverPath%><%=contextPath%>/plugins/bootstrap-ext/dist/bootstrap.min.css';
wind.document.head.appendChild(link);
/*
var style = document.createElement('style');
style.type = 'text/css';
style.rel = 'stylesheet';
style.appendChild(document.createTextNode(ss));
wind.document.head.appendChild(style);
*/
wind.document.body.innerHTML = printHtml;
//console.log(wind.document);
wind.print();
wind.close();
$('.printContent').hide();
};
//----------------------------------------------------------------------------------------------------------------------------------------------------
</script>
<div class="modal fade" id="roastExcuteModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">吐槽处理详情</h4>
</div>
<div class="modal-body " style="padding-left:0;padding-right:0;">
<div class="row">
<div class="col-md-12">
<!-- The time line -->
<ul class="timeline">
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
<li>
<c:choose>
<c:when test='${finishFlag && status.last}'>
<i class="fa fa-check bg-blue"></i>
</c:when>
<c:otherwise >
<i class="fa fa-clock-o bg-grey"></i>
</c:otherwise>
</c:choose>
<div class="timeline-item">
<span class="time"><i class="fa fa-clock-o"></i> ${item.insdt.substring(0,16)}</span>
<h3 class="timeline-header"><a href="#">${item.taskName}</a> ${item.user.caption}</h3>
<div class="timeline-body" style="padding-left:5px;padding-right:5px;">
<div>
${item.record}
</div>
<c:if test ="${item.id!=''}">
<div style="padding-top:5px;">
<input type="file" id='${item.id}' multiple class="file-loading" />
</div>
</c:if>
</div>
</div>
</li>
</c:forEach>
</ul>
</div>
</div>
<!--
<form class="form-horizontal" id="subForm">
<div class="form-group">
<label class="col-sm-2 control-label">文件附件:</label>
</div>
<div class="file-border" id="fileArea">
</div>
</form>
-->
</div>
<!-- 流程打印布局 开始 -->
<div id="roastExcuteDetail">
<div class="printContent" style="display:none">
<h4 style="text-align:center;">吐槽内容处理详情</h4>
</div>
<div class="printContent" style="display:none">
<table style="border-collapse:collapse;margin:0 auto">
<tr >
<td style="border:1px solid black;width:120px;text-align: center;">时间</td>
<td style="border:1px solid black;width:120px;text-align: center;">发起人</td>
<td style="border:1px solid black;width:120px;text-align: center;">任务</td>
<td style="border:1px solid black;width:120px;text-align: center;">流程内容详情</td>
</tr>
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
<tr>
<td style="border:1px solid black;width:150px;text-align: center;">${item.insdt.substring(0,16)}</td>
<td style="border:1px solid black;width:120px;text-align: center;">${item.user.caption}</td>
<td style="border:1px solid black;width:120px;text-align: center;">${item.taskName}</td>
<td style="border:1px solid black;width:300px;">${item.record}</td>
</tr>
</c:forEach>
</table>
</div>
<form class="form-horizontal" id="subForm">
<div class="form-group">
<label class="col-sm-2 control-label">文件附件:</label>
</div>
<!-- 文件上传,显示 -->
<div class="file-border" id="fileArea">
</div>
</form>
</div>
<!-- 流程打印布局 结束-->
<div class="modal-footer">
<button type="button" class="btn btn-default" onclick="printpage('roastExcuteDetail');"><i class="fa fa-print"></i>打印</button>
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>

View File

@ -0,0 +1,191 @@
<%@page import="com.sipai.entity.business.BusinessUnit"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%String contextPath = request.getContextPath();%>
<%String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath();%>
<%String serverPath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();%>
<%request.setAttribute("Status_Finish",Maintenance.Status_Finish);%>
<!-- 补录状态 -->
<%request.setAttribute("TYPE_SUPPLEMENT",Maintenance.TYPE_SUPPLEMENT);%>
<!-- 运维主流程状态 -->
<%request.setAttribute("TYPE_MAINTENANCE",Maintenance.TYPE_MAINTENANCE);%>
<%request.setAttribute("UNIT_HANDLE",BusinessUnit.UNIT_HANDLE);%>
<!-- bootstrap-star-rating -->
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/css/star-rating.min.css"/>
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/js/star-rating.min.js" charset="utf-8"></script>
<script type="text/javascript">
//var masterId=$('#maintenanceId').val();
var tbName_problem='tb_maintenance_problem_fille'; //数据表
var tbName_maintenance='tb_maintenance_file'; //数据表
var nameSpace='MaintenanceProblem';//保存文件夹
var previews = new Array();
var previewConfigs = new Array();
/* var student = {
"caption":"lilei",
}
previewConfigs[0]=student; */
//初始化fileinput控件第一次初始化
function showFileInput(ctrlName) {
var control = $('#' + ctrlName);
control.fileinput('destroy');
control.fileinput({
language: 'zh', //设置语言
showUpload: false, //是否显示上传按钮
showRemove:false,
showCaption: false,//是否显示标题
showBrowse:false,//选择按钮
showClose:false,//右上角关闭按钮
dropZoneEnabled: false,//是否显示拖拽区域
resizeImage:true,
fileActionSettings:{
showDrag:false
},
browseClass: "btn btn-primary", //按钮样式
maxFileCount: 10, //表示允许同时上传的最大文件个数
enctype: 'multipart/form-data',
validateInitialCount:true,
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
initialPreviewAsData: true,
initialPreview: previews,
initialPreviewConfig:previewConfigs,
layoutTemplates:{
actionUpload:'',
actionDelete:''
}
});
$('#kvFileinputModal').on("hidden.bs.modal", function() {
$(this).removeData("bs.modal");
//modal重复打开会导致前面的滚动条失去作用
$('.modal').css("overflow","auto");
});
}
var viewHandleDetailFun = function(id) {
$.post(ext.contextPath + '/maintenance/showHandleDetailView.do', {id:id} , function(data) {
$("#handleDetailDiv").html(data);
openModal('handleDetailModal');
});
};
//流程审核文件上传所需参数
var masterId_process = '${param.id}';//业务Id
var tbName_process = 'TB_Process_UploadFile'; //数据表
var nameSpace_process ='ProcessUploadFile';//保存文件夹
var status = 'view';//有查看权限
$(function() {
//初始化文件显示
getFileList_process();
$("#judgemaintainerstaff").rating('refresh',{showClear:false,showCaption:false,readonly:true});
$("#judgeresult").rating('refresh',{showClear:false,showCaption:false,readonly:true});
var result='${businessUnitRecords}';
result=result.replace(new RegExp("\r\n","gm"),"");
var json =JSON.parse(result);
$.each(json, function(index, item) {
if(item.id!=null &&item.id!=""){
previews=new Array();
$('#'+item.id).show();
var data =item.files;
for(var i=0;i<data.length;i++){
var previewConfig = new Object();
var path = data[i].abspath;
path=path.substring(path.indexOf('webapps')+7,path.length);
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");
previews.push(path);
previewConfig['width']= '30px';
previewConfig['caption']= data[i].filename;
previewConfig['key']= data[i].id;
previewConfigs.push(previewConfig);
}
showFileInput(item.id);
}
});
})
//----------------------------------------------------------------------------------------------------------------------------------------------------
var printpage = function (myDiv){
$('.printContent').show();
var printHtml = document.getElementById(myDiv).innerHTML;
var wind = window.open("", "newwin", "width=1550,height=565,top=80,left=80,toolbar=no,scrollbars=yes,menubar=no");
var link = document.createElement('link');
link.type = 'text/css';
link.rel = 'stylesheet';
link.href = '<%=serverPath%><%=contextPath%>/plugins/bootstrap-ext/dist/bootstrap.min.css';
wind.document.head.appendChild(link);
wind.document.body.innerHTML = printHtml;
wind.print();
wind.close();
$('.printContent').hide();
};
//----------------------------------------------------------------------------------------------------------------------------------------------------
</script>
<div class="row">
<div class="col-md-12">
<!-- The time line -->
<ul class="timeline">
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
<li>
<c:choose>
<c:when test='${finishFlag && status.last}'>
<i class="fa fa-check bg-blue"></i>
</c:when>
<c:otherwise >
<i class="fa fa-clock-o bg-grey"></i>
</c:otherwise>
</c:choose>
<div class="timeline-item">
<span class="time"><i class="fa fa-clock-o"></i> ${item.insdt.substring(0,16)}</span>
<h3 class="timeline-header"><a href="#">${item.taskName}</a> ${item.user.caption}</h3>
<div class="timeline-body" style="padding-left:5px;padding-right:5px;">
<div>
${item.record}
</div>
<c:if test ="${item.id!=''}">
<div style="padding-top:5px;">
<input type="file" id='${item.id}' multiple class="file-loading" />
</div>
</c:if>
</div>
</div>
</li>
</c:forEach>
</ul>
</div>
<!-- /.col -->
</div>
<!-- 流程打印布局 开始 -->
<div id="roastExcuteDetail">
<div class="printContent" style="display:none">
<h4 style="text-align:center;">吐槽处理详情</h4>
</div>
<div class="printContent" style="display:none;">
<table style="border-collapse:collapse;margin:0 auto">
<tr >
<td style="border:1px solid black;width:120px;text-align: center;">时间</td>
<td style="border:1px solid black;width:120px;text-align: center;">发起人</td>
<td style="border:1px solid black;width:120px;text-align: center;">任务</td>
<td style="border:1px solid black;width:120px;text-align: center;">流程内容详情</td>
</tr>
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
<tr>
<td style="border:1px solid black;width:150px;text-align: center;">${item.insdt.substring(0,16)}</td>
<td style="border:1px solid black;width:120px;text-align: center;">${item.user.caption}</td>
<td style="border:1px solid black;width:120px;text-align: center;">${item.taskName}</td>
<td style="border:1px solid black;width:300px;">${item.record}</td>
</tr>
</c:forEach>
</table>
</div>
<form class="form-horizontal" id="subForm">
<div class="form-group">
<%-- <label class="col-sm-4 control-label">文件附件:</label>--%>
</div>
<!-- 文件上传,显示 -->
<div class="file-border" id="fileArea">
</div>
</form>
</div>

View File

@ -0,0 +1,359 @@
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail" %>
<%@ 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" %>
<%String contextPath = request.getContextPath();%>
<%@page import="com.sipai.entity.accident.AccidentCommString" %>
<%request.setAttribute("AUDIT", AccidentCommString.STATUS_RA_AUDIT); %>
<%request.setAttribute("START", AccidentCommString.STATUS_RA_START); %>
<%request.setAttribute("FINISH", AccidentCommString.STATUS_RA_FINISH); %>
<%request.setAttribute("FAIL", AccidentCommString.STATUS_RA_FAIL); %>
<!DOCTYPE html>
<!-- <html lang="zh-CN"> -->
<!-- BEGIN HEAD -->
<head>
<title><%= ServerObject.atttable.get("TOPTITLE")%>
</title>
<!-- 引用页头及CSS页-->
<jsp:include page="/jsp/inc.jsp"></jsp:include>
<style type="text/css">
.select2-container .select2-selection--single {
height: 34px;
line-height: 34px;
}
.select2-selection__arrow {
margin-top: 3px;
}
.table-hover > tbody > tr:hover {
cursor: pointer;
}
.nav-tabs-custom {
margin-bottom: 0px;
}
#contentAPP .col-xs-3, #contentAPP .col-xs-9, #contentAPP .col-xs-12 {
padding-right: 0px;
padding-left: 10px;
}
#contentAPP .panel {
margin-bottom: 10px;
}
#contentAPP .panel .row {
margin-bottom: 5px;
}
#contentAPP .panel-body {
padding: 10px;
}
</style>
<script type="text/javascript">
var addFun = function () {
$.post(ext.contextPath + '/accident/roast/doadd.do', {unitId: unitId}, function (data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
var editFun = function (id) {
stopBubbleDefaultEvent();
$.post(ext.contextPath + '/accident/roast/doedit.do', {id: id}, function (data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
var viewFun = function (id) {
$.post(ext.contextPath + '/accident/roast/view.do', {id: id}, function (data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
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 + '/accident/roast/dodelete.do', {id: id}, function (data) {
if (data.code == "1") {
$("#table").bootstrapTable('refresh');
} else {
showAlert('d', '删除失败', 'mainAlertdiv');
}
}, 'json');
}
});
};
var deletesFun = function () {
var checkedItems = $("#table").bootstrapTable('getSelections');
var datas = "";
$.each(checkedItems, function (index, item) {
datas += item.id + ",";
});
if (datas == "") {
showAlert('d', '请先选择记录', 'mainAlertdiv');
} else {
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 + '/accident/roast/dodeletes.do', {ids: datas}, function (data) {
if (data.code > 0) {
$("#table").bootstrapTable('refresh');
} else {
showAlert('d', '删除失败', 'mainAlertdiv');
}
}, 'json');
}
});
}
};
var roastProcessFun = function (id) {
stopBubbleDefaultEvent();
$.post(ext.contextPath + '/accident/roast/showProcessRoastView.do', {id: id}, function (data) {
$("#subDiv").html(data);
openModal('roastExcuteModal');
});
};
var dosearch = function () {
$("#table").bootstrapTable('refresh');
};
//初始化采集类型选择框
var refreshtypeForSelect = function () {
var select = $("#typeForSelect").select2({
data: null,
placeholder: '请选择',//默认文字提示
allowClear: true,//允许清空
escapeMarkup: function (markup) {
return markup;
}, // 自定义格式化防止xss注入
language: "zh-CN",
minimumInputLength: 0,
minimumResultsForSearch: 10,//数据超过十个启用搜索框
});
select.val("未提交").trigger("change");
select.on("change", function (e) {
$("#table").bootstrapTable('refresh');
});
};
var companyId = unitId;
$(function () {
companyId = unitId;
// refreshtypeForSelect();
initAPP();
});
//导出设备表,要用get请求的方式
function downloadFun() {
var search_name = $("#search_name").val();
var takeFlag = $("#typeForSelect").val();
window.open(ext.contextPath + "/accident/roast/downloadExcel.do?unitId=" + unitId
+ "&search_name=" + search_name
+ "&takeFlag=" + takeFlag);
}
function initAPP() {
var htmlStr = '<div class="panel panel-default">' +
'<div class="panel-body text-center">正在努力加载的数据中,请稍后......</div>' +
'</div>';
$("#contentAPP").html(htmlStr);
var list = {};
// 存在
$.ajax({
//请求方式
type: "POST",
//请求的媒体类型
contentType: "application/json;charset=UTF-8",
//请求地址
url: ext.contextPath + '/accident/roast/getlistApp.do',
//数据json字符串
data: JSON.stringify(list),
dataType: "json",
//请求成功
success: function (result) {
console.log(result);
htmlStr = '';
if (result.length > 0) {
$.each(result, function (key, value) {
var str = "";
/*if (!value.task.assignee) {
str += '<button class="btn btn-default btn-sm" onclick="claimFun(\'' + value.task.id + '\')" data-toggle="tooltip" title="签收"><i class="fa fa-tag"></i><span class="hidden-md hidden-lg"> 签收</span></button>';
} else {
if (value.type.indexOf('${KPI_MAKE_PLAN}') != -1 || value.type.indexOf('${KPI_MARK}') != -1 || value.type.indexOf('${OVERHAUL}') != -1) {
str += '<button class="btn btn-default btn-sm" onclick="viewDetailFun(\'' + value.processInstance.businessKey + '\',\'' + value.type + '\',\'' + value.task.id + '\',\'' + value.task.status + '\',\'' + value.processInstance.id + '\')" data-toggle="tooltip" title="查看详情"><i class="fa fa-history"></i><span class="hidden-md hidden-lg"> 查看详情</span></button>'
}
if (value.business != null) {
str += '<button class="btn btn-default btn-sm" onclick="gotoTaskFun(\'' + value.type + '\',\'' + value.business.status + '\',\'' + value.processInstance.id + '\',\'' + value.task.id + '\',\'' + value.processInstance.businessKey + '\');" data-toggle="tooltip" title="处理">' +
'<i class="fa fa-play"></i><span class="hidden-md hidden-lg"> 处理 </span></button>';
}
}*/
console.log(value.takeFlag);
if (value.takeFlag == '${START}') {
str += '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + value.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
str += '<button class="btn btn-default btn-sm" title="删除" onclick="deleteFun(\'' + value.id + '\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
} else {
str += '<button class="btn btn-default btn-sm" title="浏览" onclick="viewFun(\'' + value.id + '\')"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg">浏览</span></button>';
}
htmlStr += '<div class="panel panel-default">' +
'<div class="panel-body app-title">' +
'<div class="row">' +
'<div class="col-xs-3">吐槽时间:</div><div class="col-xs-9 app-content">' + value.insdt.substring(0, 10) + '</div>' +
'</div>' +
'<div class="row">' +
'<div class="col-xs-3">吐槽名称:</div><div class="col-xs-9 app-datetime">' + value.name + '</div>' +
'</div>' +
'<div class="row">' +
'<div class="col-xs-3">吐槽内容:</div><div class="col-xs-9 app-content">' + value.content + '</div>' +
'</div>' +
'<div class="row">' +
'<div class="col-xs-3">操作:</div><div class="col-xs-9"><div class="btn-group app-content" >' + str + '</div></div>' +
'</div>' +
'</div>' +
'</div>';
})
} else {
htmlStr = '<div class="panel panel-default">' +
'<div class="panel-body text-center">没有找到匹配的记录</div>' +
'</div>';
}
$("#contentAPP").html(htmlStr);
},
//请求失败,包含具体的错误信息
error: function (e) {
console.log(e.status);
console.log(e.responseText);
}
});
}
</script>
</head>
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
<div class="wrapper">
<div class="content-wrapper">
<section class="content container-fluid">
<div id="mainAlertdiv"></div>
<div id="subDiv"></div>
<div id="subDivAbnorm"></div>
<div id="menu4SelectDiv"></div>
<div id="equ4SelectDiv"></div>
<div id="library4SelectDiv"></div>
<div id="problemTyp4SelectDiv"></div>
<div id="user4SelectDiv"></div>
<div id="fileInputDiv"></div>
<div class="form-group form-inline" style="padding:0;">
<div class="btn-group" style="width: 280px;">
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i
class="fa fa-plus"></i> 新增
</button>
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i
class="fa fa-trash-o"></i> 删除
</button>
</div>
<div class="form-group pull-right form-inline hidden-xs">
<div class="input-group input-group-sm ">
<label class="form-label">状态:</label>
<select type="text" id="typeForSelect" class="form-control pull-right"
name="typeForSelect" style="width: 120px;">
<option value="${START}">未提交</option>
<option value="${AUDIT}">已提交</option>
<option value="${FINISH}">已通过</option>
<option value="${FAIL}">未通过</option>
</select>
</div>
<div class="input-group input-group-sm" style="width: 250px;">
<input type="text" id="search_name" name="search_name" class="form-control pull-right"
style="height:34px;" placeholder="名称">
<div class="input-group-btn">
<button class="btn btn-default" style="height:34px;" onclick="dosearch();"><i
class="fa fa-search"></i></button>
</div>
</div>
</div>
</div>
<div id="contentAPP">
<div class="panel panel-default">
<div class="panel-body text-center">正在努力加载的数据中,请稍后......</div>
</div>
</div>
</section>
<!-- /.content -->
</div>
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
</div>
</body>
<!-- bootstrap switch -->
<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>
<!-- 文件上传-->
<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" src="<%=request.getContextPath()%>/JS/commonFileUpload.js" charset="utf-8"></script>
</html>

View File

@ -0,0 +1,375 @@
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail" %>
<%@ 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" %>
<%String contextPath = request.getContextPath();%>
<%@page import="com.sipai.entity.accident.AccidentCommString" %>
<%request.setAttribute("AUDIT", AccidentCommString.STATUS_RA_AUDIT); %>
<%request.setAttribute("START", AccidentCommString.STATUS_RA_START); %>
<%request.setAttribute("FINISH", AccidentCommString.STATUS_RA_FINISH); %>
<%request.setAttribute("FAIL", AccidentCommString.STATUS_RA_FAIL); %>
<!DOCTYPE html>
<!-- <html lang="zh-CN"> -->
<!-- BEGIN HEAD -->
<head>
<title><%= ServerObject.atttable.get("TOPTITLE")%>
</title>
<!-- 引用页头及CSS页-->
<jsp:include page="/jsp/inc.jsp"></jsp:include>
<style type="text/css">
.select2-container .select2-selection--single {
height: 34px;
line-height: 34px;
}
.select2-selection__arrow {
margin-top: 3px;
}
.table-hover > tbody > tr:hover {
cursor: pointer;
}
</style>
<script type="text/javascript">
var addFun = function () {
$.post(ext.contextPath + '/accident/roast/doadd.do', {unitId: unitId}, function (data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
var editFun = function (id) {
stopBubbleDefaultEvent();
$.post(ext.contextPath + '/accident/roast/doedit.do', {id: id}, function (data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
var viewFun = function (id) {
$.post(ext.contextPath + '/accident/roast/view.do', {id: id}, function (data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
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 + '/accident/roast/dodelete.do', {id: id}, function (data) {
if (data.code == "1") {
$("#table").bootstrapTable('refresh');
} else {
showAlert('d', '删除失败', 'mainAlertdiv');
}
}, 'json');
}
});
};
var deletesFun = function () {
var checkedItems = $("#table").bootstrapTable('getSelections');
var datas = "";
$.each(checkedItems, function (index, item) {
datas += item.id + ",";
});
if (datas == "") {
showAlert('d', '请先选择记录', 'mainAlertdiv');
} else {
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 + '/accident/roast/dodeletes.do', {ids: datas}, function (data) {
if (data.code > 0) {
$("#table").bootstrapTable('refresh');
} else {
showAlert('d', '删除失败', 'mainAlertdiv');
}
}, 'json');
}
});
}
};
var roastProcessFun = function (id) {
stopBubbleDefaultEvent();
$.post(ext.contextPath + '/accident/roast/showProcessRoastView.do', {id: id}, function (data) {
$("#subDiv").html(data);
openModal('roastExcuteModal');
});
};
var dosearch = function () {
$("#table").bootstrapTable('refresh');
};
//初始化采集类型选择框
var refreshtypeForSelect = function () {
var select = $("#typeForSelect").select2({
data: null,
placeholder: '请选择',//默认文字提示
allowClear: true,//允许清空
escapeMarkup: function (markup) {
return markup;
}, // 自定义格式化防止xss注入
language: "zh-CN",
minimumInputLength: 0,
minimumResultsForSearch: 10,//数据超过十个启用搜索框
});
select.val("未提交").trigger("change");
select.on("change", function (e) {
$("#table").bootstrapTable('refresh');
});
};
var companyId = unitId;
$(function () {
companyId = unitId;
refreshtypeForSelect();
initFun();
});
var initFun = function () {
$("#table").bootstrapTable({ // 对应table标签的id
url: ext.contextPath + '/accident/roast/getlist.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,
search_name: $('#search_name').val(),
unitId: unitId,
takeFlag: $("#typeForSelect").val(),
// statusSelect:$("#statusSelect").val(),
}
},
// onClickRow: function (row) {//单击行事件,执行查看功能
// viewFun(row.id);
// },
sortName: 'insdt', // 要排序的字段
sortOrder: 'desc', // 排序规则
columns: [
{
checkbox: true, // 显示一个勾选框
}, {
field: 'caption', // 返回json数据中的name
title: '吐槽人', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle',
formatter: function (value, row, index) {
if(value!=null && value!=''){
return value;
}else{
return '匿名';
}
}
}, {
field: 'adviceType', // 返回json数据中的name
title: '吐槽类型', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
}, {
field: 'name', // 返回json数据中的name
title: '吐槽名称', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
}, {
field: 'content', // 返回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, 10);
}
}, {
field: 'takeFlag', // 返回json数据中的name
title: '状态', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle', // 上下居中
formatter: function (value, row, index) {
switch (value) {
case '${FAIL}' :
return "未通过";
case '${FINISH}' :
return "已通过";
case '${START}' :
return "未提交";
case '${AUDIT}' :
return "已提交";
default :
return value;
}
}
}, {
title: "操作",
align: 'center',
valign: 'middle',
width: 120, // 定义列的宽度单位为像素px
formatter: function (value, row, index) {
var buts = "";
if (row.takeFlag == '${START}') {
buts += '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
buts += '<button class="btn btn-default btn-sm" title="删除" onclick="deleteFun(\'' + row.id + '\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
} else {
buts += '<button class="btn btn-default btn-sm" title="浏览" onclick="viewFun(\'' + row.id + '\')"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg">浏览</span></button>';
// buts += '<button class="btn btn-default btn-sm" title="流程详情" onclick="roastProcessFun(\'' + row.id + '\')"><i class="fa fa-history"></i><span class="hidden-md hidden-lg">流程详情</span></button>';
}
buts = '<div class="btn-group" >' + buts + '</div>';
return buts;
}
}
],
onLoadSuccess: function () { //加载成功时执行
adjustBootstrapTableView("table");
},
onLoadError: function () { //加载失败时执行
console.info("加载数据失败");
}
});
}
//导出设备表,要用get请求的方式
function downloadFun() {
var search_name = $("#search_name").val();
var takeFlag = $("#typeForSelect").val();
window.open(ext.contextPath + "/accident/roast/downloadExcel.do?unitId=" + unitId
+ "&search_name=" + search_name
+ "&takeFlag=" + takeFlag);
}
</script>
</head>
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
<div class="wrapper">
<div class="content-wrapper">
<section class="content container-fluid">
<div id="mainAlertdiv"></div>
<div id="subDiv" style="width: 220px;"></div>
<div id="subDivAbnorm"></div>
<div id="menu4SelectDiv"></div>
<div id="equ4SelectDiv"></div>
<div id="library4SelectDiv"></div>
<div id="problemTyp4SelectDiv"></div>
<div id="user4SelectDiv"></div>
<div id="fileInputDiv"></div>
<div>
<%--<div class="form-group">
<input id="search_pid" name="search_pid" type="hidden"/>
<span id="companyName"
style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold"></span>
</div>--%>
<div class="form-group form-inline" style="padding:0;">
<div class="btn-group" style="width: 280px;">
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i
class="fa fa-plus"></i> 新增
</button>
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i
class="fa fa-trash-o"></i> 删除
</button>
<%--<button type="button" class="btn btn-default btn-sm" onclick="downloadFun();"><i
class="fa fa-cloud-download"></i> 导出
</button>--%>
</div>
<div class="form-group pull-right form-inline hidden-xs">
<div class="input-group input-group-sm ">
<label class="form-label">状态:</label>
<select type="text" id="typeForSelect" class="form-control pull-right"
name="typeForSelect" style="width: 120px;">
<option value="${START}">未提交</option>
<option value="${AUDIT}">已提交</option>
<option value="${FINISH}">已通过</option>
<option value="${FAIL}">未通过</option>
</select>
</div>
<div class="input-group input-group-sm" style="width: 250px;">
<input type="text" id="search_name" name="search_name" class="form-control pull-right"
style="height:34px;" placeholder="名称">
<div class="input-group-btn">
<button class="btn btn-default" style="height:34px;" onclick="dosearch();"><i
class="fa fa-search"></i></button>
</div>
</div>
</div>
</div>
<table id="table"></table>
</div>
</section>
<!-- /.content -->
</div>
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
</div>
</body>
<!-- bootstrap switch -->
<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>
<!-- 文件上传-->
<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" src="<%=request.getContextPath()%>/JS/commonFileUpload.js" charset="utf-8"></script>
</html>

View File

@ -0,0 +1,318 @@
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail"%>
<%@ 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"%>
<%String contextPath = request.getContextPath();%>
<%request.setAttribute("Finish", MaintenanceDetail.Status_Finish); %>
<%request.setAttribute("Start", MaintenanceDetail.Status_Start); %>
<%request.setAttribute("Wait", MaintenanceDetail.Status_Wait); %>
<!DOCTYPE html>
<!-- <html lang="zh-CN"> -->
<!-- BEGIN HEAD -->
<head>
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
<!-- 引用页头及CSS页-->
<jsp:include page="/jsp/inc.jsp"></jsp:include>
<style type="text/css">
.select2-container .select2-selection--single{
height:34px;
line-height: 34px;
}
.select2-selection__arrow{
margin-top:3px;
}
.table-hover>tbody>tr:hover {
cursor: pointer;
}
</style>
<!-- 文件上传-->
<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">
var addFun = function() {
$.post(ext.contextPath + '/accident/roast/doadd.do', {unitId:unitId} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
var editFun = function(id) {
stopBubbleDefaultEvent();
$.post(ext.contextPath + '/accident/roast/doedittake.do', {id:id} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
var viewFun = function(id) {
$.post(ext.contextPath + '/accident/roast/doview.do', {id:id} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
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 + '/accident/roast/dodelete.do', {id : id}, function(data) {
if(data.code=="1"){
$("#table").bootstrapTable('refresh');
}else{
showAlert('d','删除失败','mainAlertdiv');
}
},'json');
}
});
};
var deletesFun = function() {
var checkedItems = $("#table").bootstrapTable('getSelections');
var datas="";
$.each(checkedItems, function(index, item){
datas+=item.id+",";
});
if(datas==""){
showAlert('d','请先选择记录','mainAlertdiv');
}else{
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 + '/accident/roast/dodeletes.do', {ids:datas} , function(data) {
if(data.code>0){
$("#table").bootstrapTable('refresh');
}else{
showAlert('d','删除失败','mainAlertdiv');
}
},'json');
}
});
}
};
var dosearch = function() {
$("#table").bootstrapTable('refresh');
};
var companyId = unitId;
$(function() {
companyId = unitId;
initFun();
});
var initFun = function(){
$("#table").bootstrapTable({ // 对应table标签的id
url: ext.contextPath + '/accident/roast/getlist.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,
search_name: $('#search_name').val(),
unitId: unitId,
takeFlag: "已提交",
// statusSelect:$("#statusSelect").val(),
}
},
// onClickRow: function (row) {//单击行事件,执行查看功能
// viewFun(row.id);
// },
sortName: 'insdt', // 要排序的字段
sortOrder: 'desc', // 排序规则
columns: [
{
checkbox: true, // 显示一个勾选框
},{
field: 'caption', // 返回json数据中的name
title: '吐槽人', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
},{
field: 'adviceType', // 返回json数据中的name
title: '吐槽类型', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
},{
field: 'name', // 返回json数据中的name
title: '吐槽名称', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
},{
field: 'company.name', // 返回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,10);
}
},{
field: 'takeFlag', // 返回json数据中的name
title: '状态', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
},{
title: "操作",
align: 'center',
valign: 'middle',
width: 120, // 定义列的宽度单位为像素px
formatter: function (value, row, index) {
var buts="";
buts+= '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
buts+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteFun(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
buts='<div class="btn-group" >'+buts+'</div>';
return buts;
}
}
],
onLoadSuccess: function(){ //加载成功时执行
adjustBootstrapTableView("table");
},
onLoadError: function(){ //加载失败时执行
console.info("加载数据失败");
}
});
}
</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" style="width: 220px;height:10px;"></div>
<div id="subDivAbnorm"></div>
<div id="menu4SelectDiv"></div>
<div id="equ4SelectDiv"></div>
<div id="library4SelectDiv"></div>
<div id="problemTyp4SelectDiv"></div>
<div id="user4SelectDiv"></div>
<div id="fileInputDiv"></div>
<div >
<div class="form-group " style="margin-bottom:10px;">
<input id="search_pid" name="search_pid" type="hidden" />
<span id="companyName" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold"></span>
</div>
<div class="form-group form-inline" style="padding:0;">
<div class="btn-group" style="width: 280px;padding-bottom:10px;">
<!-- <security:authorize buttonUrl="maintenance/abnormity/add.do"> -->
<!-- <button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i class="fa fa-plus"></i> 新增</button>
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button> -->
<!--
<button type="button" class="btn btn-default btn-sm" title="异常中有设备的生成维修,没设备的生成缺陷" onclick="createDefectFun();"><i class="fa fa-send-o"></i>生成缺陷或维修单</button> -->
<!-- </security:authorize> -->
</div>
<!--
<div class="form-group pull-right form-inline" >
<div class="form-group">
<label class="form-label">工艺段:</label>
<select class="form-control select2 " id="processSection" name ="processSection" style="width: 160px;"></select>
<label class="form-label">状态:</label>
<select class="form-control select2 " id="statusSelect" name ="statusSelect" style="width: 160px;">
<option value= "${Wait}">待处理</option>
<option value= "${Start}">处理中</option>
<option value= "${Finish}">已完成</option>
</select>
</div>
<div class="form-group" >
<div class="input-group input-group-sm" style="width: 250px;">
<input type="text" id="search_name" name="search_name" class="form-control pull-right" style="height:34px;" placeholder="名称">
<div class="input-group-btn">
<button class="btn btn-default" style="height:34px;" onclick="dosearch();"><i class="fa fa-search"></i></button>
</div>
</div>
</div>
</div> -->
<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" style="height:34px;" placeholder="名称">
<div class="input-group-btn">
<button class="btn btn-default" style="height:34px;" onclick="dosearch();"><i class="fa fa-search"></i></button>
</div>
</div>
</div>
</div>
<table id="table"></table>
</div>
</section>
<!-- /.content -->
</div>
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
</div>
</body>
<!-- bootstrap switch -->
<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>

View File

@ -0,0 +1,161 @@
<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@page import="com.sipai.entity.accident.AccidentCommString" %>
<%request.setAttribute("START", AccidentCommString.STATUS_RA_START); %>
<%request.setAttribute("AUDIT", AccidentCommString.STATUS_RA_AUDIT); %>
<style type="text/css">
.select2-container .select2-selection--single {
height: 34px;
line-height: 34px;
}
.select2-selection__arrow {
margin-top: 3px;
}
</style>
<script type="text/javascript">
var masterId1 = '${roast.id}';
var tbName1 = 'TB_Process_UploadFile'; //数据表
var nameSpace1 = 'ProcessUploadFile';//保存文件夹
var previews = new Array();
var previewConfigs = new Array();
//以下为上传图片
//名称定义不可修改
var getFileList = function () {
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId: masterId1, tbName: tbName1}, function (data) {
//console.info(data)
if (data.length > 0) {
previews = new Array();
$('#maintenancefile').show();
for (var i = 0; i < data.length; i++) {
var previewConfig = new Object();
var path = data[i].abspath;
path = path.substring(path.indexOf('webapps') + 7, path.length);
path = ext.basePath.replace(ext.contextPath, '') + path.replace(/\\/g, "\/");
;
previews.push(path);
previewConfig['width'] = '50px';
previewConfig['caption'] = data[i].filename;
console.log(data[i].filename)
previewConfig['key'] = data[i].id;
previewConfigs.push(previewConfig);
}
showFileInput("maintenanceDetailFile");
} else {
$('#maintenanceDetailFile').hide();
}
}, 'json');
};
var getProcessList = function () {
//加载维修流程
$.post(ext.contextPath + '/accident/roast/showProcessRoastView.do', {
id: masterId1,
inModal: 'inModal'
}, function (data) {
$("#showView").html(data);
});
}
$(function () {
getFileList();
getProcessList();
});
</script>
<div class="modal fade" id="subModal">
<%-- <div class="modal-dialog modal-xlg">--%>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">查看</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-12 col-xs-12">
<!-- 新增界面formid强制为subForm -->
<form class="form-horizontal" id="subForm">
<!-- 界面提醒div强制id为alertDiv -->
<div id="alertDiv"></div>
<input type="hidden" class="form-control" id="id" name="id" value="${roast.id}">
<div class="form-group">
<label class="col-sm-2 control-label">吐槽名称</label>
<div class="col-sm-10">
<p class="form-control-static">${roast.name}</p>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">吐槽类型</label>
<div class="col-sm-10">
<p class="form-control-static">${roast.adviceType}</p>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">吐槽内容</label>
<div class="col-sm-10">
<p class="form-control-static">${roast.content}</p>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">是否匿名</label>
<div class="col-sm-10">
<c:if test="${roast.anonymous==0}">
<p class="form-control-static">否</p>
</c:if>
<c:if test="${roast.anonymous==1}">
<p class="form-control-static">是</p>
</c:if>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">吐槽人</label>
<div class="col-sm-10">
<c:if test="${roast.userLead!=null && roast.userLead!= ''}">
<p class="form-control-static">${solvername}</p>
</c:if>
<c:if test="${roast.userLead==null || roast.userLead== ''}">
<p class="form-control-static">匿名</p>
</c:if>
</div>
</div>
<%--<div class="form-group">
<label class="col-sm-2 control-label">辅议人</label>
<div class="col-sm-10">
<p class="form-control-static">${solvername1}</p>
</div>
</div>--%>
<div class="form-group">
<label class="col-sm-2 control-label">审核人</label>
<div class="col-sm-10">
<p class="form-control-static">${roast.auditManName}</p>
</div>
</div>
<div class="form-group" style="margin:8px;">
<input type="file" name="maintenanceDetailFile" id="maintenanceDetailFile" multiple
class="file-loading"/>
</div>
</form>
</div>
<%--<div class="col-md-5 col-xs-12" id="showView"></div>--%>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
</div>
</div>
</div>
</div>