355 lines
17 KiB
Plaintext
355 lines
17 KiB
Plaintext
|
|
<%@page import="com.sipai.tools.CommString"%>
|
|||
|
|
<%@ page language="java" pageEncoding="UTF-8"%>
|
|||
|
|
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
|||
|
|
<%@page import="com.sipai.entity.business.BusinessUnit"%>
|
|||
|
|
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
|||
|
|
<%request.setAttribute("Status_Launch",Maintenance.Status_Launch);%>
|
|||
|
|
<%request.setAttribute("Status_Edit",Maintenance.Status_Edit);%>
|
|||
|
|
|
|||
|
|
<% request.setAttribute("UNIT_AUDIT", BusinessUnit.UNIT_AUDIT);%>
|
|||
|
|
<% request.setAttribute("UNIT_BASE_AUDIT", BusinessUnit.UNIT_BASE_AUDIT);%>
|
|||
|
|
<% request.setAttribute("UNIT_PRODUCT_AUDIT", BusinessUnit.UNIT_PRODUCT_AUDIT);%>
|
|||
|
|
<% request.setAttribute("UNIT_MIDDLE_AUDIT", BusinessUnit.UNIT_MIDDLE_AUDIT);%>
|
|||
|
|
<% request.setAttribute("PASS", CommString.ACTI_Condition_PASS);%>
|
|||
|
|
<% request.setAttribute("FATL", CommString.ACTI_Condition_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 showUser4SelectsFun = function() {
|
|||
|
|
var userIds= $("#targetusers").val();
|
|||
|
|
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds} , function(data) {
|
|||
|
|
$("#user4SelectDiv").html(data);
|
|||
|
|
openModal("user4SelectModal");
|
|||
|
|
});
|
|||
|
|
};
|
|||
|
|
var fileinput = function() {
|
|||
|
|
//var url='/maintenance/updateProblemFile.do';//保存数据表方法
|
|||
|
|
$.post(ext.contextPath + '/base/fileinput.do', {masterId:masterId,tbName:tbName,nameSpace:nameSpace} , function(data) {
|
|||
|
|
$("#fileInputDiv").html(data);
|
|||
|
|
openModal('fileInputModal');
|
|||
|
|
});
|
|||
|
|
};
|
|||
|
|
function doPass(routeNum) {
|
|||
|
|
$('#subForm').data('bootstrapValidator')
|
|||
|
|
.updateStatus('targetUsersName', 'NOT_VALIDATED',null)
|
|||
|
|
.validateField('targetUsersName');
|
|||
|
|
$("#subForm").bootstrapValidator('validate');//提交验证
|
|||
|
|
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码 */
|
|||
|
|
$.post(ext.contextPath + "/maintenance/updateDetail.do", $("#detailForm").serialize(), function(data) {
|
|||
|
|
if (data.res == 1){
|
|||
|
|
$("#passstatus").val(true);
|
|||
|
|
$.post(ext.contextPath + "/maintenance/doAuditDetail.do", $("#subForm").serialize()+"&routeNum="+routeNum, function(data) {
|
|||
|
|
if (data.res == 1) {
|
|||
|
|
closeModal('subModal')
|
|||
|
|
$("#table").bootstrapTable('refresh');
|
|||
|
|
}else if(data.res == 0){
|
|||
|
|
showAlert('d','操作执行失败,请重试');
|
|||
|
|
}else{
|
|||
|
|
showAlert('d',data.res);
|
|||
|
|
}
|
|||
|
|
},'json');
|
|||
|
|
}else if(data.res == 0){
|
|||
|
|
showAlert('d','保存失败');
|
|||
|
|
}else{
|
|||
|
|
showAlert('d',data.res);
|
|||
|
|
}
|
|||
|
|
},'json');
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
function doBack(routeNum) {
|
|||
|
|
swal({
|
|||
|
|
title: "退回!",
|
|||
|
|
text: "请输入审核不通过理由:",
|
|||
|
|
buttons: {
|
|||
|
|
cancel: {
|
|||
|
|
text: "取消",
|
|||
|
|
value: null,
|
|||
|
|
visible: true,
|
|||
|
|
className: "btn btn-default btn-sm",
|
|||
|
|
closeModal: true,
|
|||
|
|
},
|
|||
|
|
confirm: {
|
|||
|
|
text: "确定",
|
|||
|
|
value: true,
|
|||
|
|
visible: true,
|
|||
|
|
className: "btn btn-danger btn-sm",
|
|||
|
|
closeModal: true
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
content: {
|
|||
|
|
element: "input",
|
|||
|
|
attributes: {
|
|||
|
|
placeholder: "审核不通过理由...",
|
|||
|
|
},
|
|||
|
|
},
|
|||
|
|
})
|
|||
|
|
.then(function(value){
|
|||
|
|
if(value){
|
|||
|
|
$("#auditopinion").val(value);
|
|||
|
|
$("#passstatus").val(false);
|
|||
|
|
$.post(ext.contextPath + "/maintenance/doAuditDetail.do", $("#subForm").serialize()+"&routeNum="+routeNum, 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 masterId='${businessUnitHandle.businessid}';
|
|||
|
|
var tbName='tb_maintenance_file'; //数据表
|
|||
|
|
var nameSpace='MaintenanceFile';//保存文件夹
|
|||
|
|
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,//是否显示拖拽区域
|
|||
|
|
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": tbName
|
|||
|
|
};
|
|||
|
|
return data;
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
$('#kvFileinputModal').on("hidden.bs.modal", function() {
|
|||
|
|
$(this).removeData("bs.modal");
|
|||
|
|
//modal重复打开会导致前面的滚动条失去作用
|
|||
|
|
$('.modal').css("overflow","auto");
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
//名称定义不可修改
|
|||
|
|
var getFileList = function() {
|
|||
|
|
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId:masterId,tbName:tbName} , 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;
|
|||
|
|
previewConfig['key']= data[i].id;
|
|||
|
|
previewConfigs.push(previewConfig);
|
|||
|
|
}
|
|||
|
|
showFileInput("maintenancefile");
|
|||
|
|
}else{
|
|||
|
|
$('#maintenancefile').hide();
|
|||
|
|
}
|
|||
|
|
},'json');
|
|||
|
|
|
|||
|
|
};
|
|||
|
|
$(function() {
|
|||
|
|
//计划费用保留两位小数
|
|||
|
|
$("#planMoney").html(parseFloat('${maintenanceDetail.planMoney}').toFixed(2)+"元")
|
|||
|
|
$("#subForm").bootstrapValidator({
|
|||
|
|
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
|||
|
|
fields: {
|
|||
|
|
targetUsersName: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '下一级人员不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
|
|||
|
|
})
|
|||
|
|
</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">×</span></button>
|
|||
|
|
<h4 class="modal-title">${taskName }</h4>
|
|||
|
|
</div>
|
|||
|
|
<div class="modal-body">
|
|||
|
|
<div class="nav-tabs-custom">
|
|||
|
|
<ul class="nav nav-tabs">
|
|||
|
|
<li class="active"><a href="#Tab1" data-toggle="tab" index="0">任务详情</a></li>
|
|||
|
|
<li><a href="#Tab2" data-toggle="tab" index="1">处理详情</a></li>
|
|||
|
|
</ul>
|
|||
|
|
<div class="tab-content">
|
|||
|
|
<div class="tab-pane active" id="Tab1">
|
|||
|
|
<form class="form-horizontal" id="detailForm" enctype="multipart/form-data" >
|
|||
|
|
<input type="hidden" class="form-control" name ="id" value="${maintenanceDetail.id}">
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">所属厂区:</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<p class="form-control-static" >${maintenanceDetail.company.name}</p>
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">任务编号:</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<p class="form-control-static" >${maintenanceDetail.detailNumber}</p>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">设备名称:</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<p class="form-control-static" >${maintenanceDetail.equipmentNames}</p>
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">计划费用:</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<p id = "planMoney" class="form-control-static" ></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" >${maintenanceDetail.problemcontent}</p>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<c:if test="${UNIT_AUDIT == businessUnitAudit.unitid }">
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">设备专责意见:</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<textarea class="form-control " id="equipmentOpinion" name="equipmentOpinion" rows="2" >${maintenanceDetail.equipmentOpinion}</textarea>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</c:if>
|
|||
|
|
<c:if test="${UNIT_BASE_AUDIT == businessUnitAudit.unitid }">
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">基层领导意见</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<textarea class="form-control " id="baseOpinion" name="baseOpinion" rows="2" >${maintenanceDetail.baseOpinion}</textarea>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</c:if>
|
|||
|
|
<c:if test="${UNIT_PRODUCT_AUDIT == businessUnitAudit.unitid }">
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">生产运营中心意见</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<textarea class="form-control " id="productOpinion" name="productOpinion" rows="2" >${maintenanceDetail.productOpinion}</textarea>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</c:if>
|
|||
|
|
<c:if test="${UNIT_MIDDLE_AUDIT == businessUnitAudit.unitid }">
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">中层领导意见</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<textarea class="form-control " id="middleOpinion" name="middleOpinion" rows="2" >${maintenanceDetail.middleOpinion}</textarea>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</c:if>
|
|||
|
|
</form>
|
|||
|
|
<!-- 新增界面formid强制为subForm -->
|
|||
|
|
<form class="form-horizontal" id="subForm" enctype="multipart/form-data" >
|
|||
|
|
<!-- 界面提醒div强制id为alertDiv -->
|
|||
|
|
<div id="alertDiv"></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="${businessUnitAudit.unitid}">
|
|||
|
|
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
|||
|
|
<input type="hidden" class="form-control" id ="passstatus" name ="passstatus" value=true>
|
|||
|
|
<input type="hidden" class="form-control" id ="auditopinion" name ="auditopinion" >
|
|||
|
|
<c:if test='${showTargetUsersFlag }'>
|
|||
|
|
<div 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=""/>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</c:if>
|
|||
|
|
</form>
|
|||
|
|
</div>
|
|||
|
|
<div class="tab-pane" id="Tab2" >
|
|||
|
|
<div class="chart" id="tab_detail" style="position: relative;">
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-md-12">
|
|||
|
|
<!-- The time line -->
|
|||
|
|
<ul class="timeline">
|
|||
|
|
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
|||
|
|
<li>
|
|||
|
|
<i class="fa fa-clock-o bg-grey"></i>
|
|||
|
|
<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">
|
|||
|
|
${item.record}
|
|||
|
|
<c:forEach items="${item.files}" var="file" >
|
|||
|
|
<img src="${localIp}${file.abspath.substring(file.abspath.indexOf('webapps')+7,file.abspath.length())}" height="200" width="200" class="margin">
|
|||
|
|
</c:forEach>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</li>
|
|||
|
|
</c:forEach>
|
|||
|
|
<!-- timeline time label -->
|
|||
|
|
<!-- <li class="time-label">
|
|||
|
|
<span class="bg-red">
|
|||
|
|
10 Feb. 2014
|
|||
|
|
</span>
|
|||
|
|
</li> -->
|
|||
|
|
<!-- /.timeline-label -->
|
|||
|
|
<!-- timeline item -->
|
|||
|
|
|
|||
|
|
</ul>
|
|||
|
|
</div>
|
|||
|
|
<!-- /.col -->
|
|||
|
|
</div>
|
|||
|
|
<!-- END timeline item -->
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="modal-footer">
|
|||
|
|
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
|||
|
|
<button type="button" class="btn btn-danger" onclick="processExecute(doBack,${businessUnitAudit.taskid},false)" >驳回</button>
|
|||
|
|
<button type="button" class="btn btn-primary" onclick="processExecute(doPass,${businessUnitAudit.taskid},true)" >通过</button>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-content -->
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-dialog -->
|
|||
|
|
</div>
|