238 lines
11 KiB
Plaintext
238 lines
11 KiB
Plaintext
|
|
<%@ taglib prefix="c" uri="/jodd" %>
|
|||
|
|
<%@ page language="java" pageEncoding="UTF-8" %>
|
|||
|
|
|
|||
|
|
<%@page import="com.sipai.tools.CommString" %>
|
|||
|
|
<%request.setAttribute("Active_False", CommString.Active_False); %>
|
|||
|
|
<%request.setAttribute("Active_True", CommString.Active_True); %>
|
|||
|
|
|
|||
|
|
<%@ page import="com.sipai.entity.maintenance.EquipmentPlan" %>
|
|||
|
|
<%request.setAttribute("Status_NoStart", EquipmentPlan.Status_NoStart); %>
|
|||
|
|
<%request.setAttribute("Status_Start", EquipmentPlan.Status_Start); %>
|
|||
|
|
<%request.setAttribute("Status_Finish", EquipmentPlan.Status_Finish); %>
|
|||
|
|
|
|||
|
|
<%@page import="com.sipai.entity.maintenance.EquipmentPlanType" %>
|
|||
|
|
<%request.setAttribute("Code_Type_Wx", EquipmentPlanType.Code_Type_Wx); %>
|
|||
|
|
<%request.setAttribute("Code_Type_By", EquipmentPlanType.Code_Type_By); %>
|
|||
|
|
<%request.setAttribute("Code_Type_Dx", EquipmentPlanType.Code_Type_Dx); %>
|
|||
|
|
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
//流程审核文件上传所需参数
|
|||
|
|
var masterId_process = '${id}';//业务Id
|
|||
|
|
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
|||
|
|
var nameSpace_process = 'ProcessUploadFile';//保存文件夹
|
|||
|
|
var status = 'delete';//有删除权限
|
|||
|
|
|
|||
|
|
//厂区ID
|
|||
|
|
var companyId = "${company.id}";
|
|||
|
|
|
|||
|
|
$(function () {
|
|||
|
|
//初始化文件显示
|
|||
|
|
getFileList_process();
|
|||
|
|
//下发日期选择
|
|||
|
|
$('#planDate').datepicker({
|
|||
|
|
language: 'zh-CN',
|
|||
|
|
autoclose: true,
|
|||
|
|
todayHighlight: true,
|
|||
|
|
format: 'yyyy-mm',
|
|||
|
|
}).on('hide', function (e) {
|
|||
|
|
//当日期选择框关闭时,执行刷新校验
|
|||
|
|
$('#subForm').data('bootstrapValidator')
|
|||
|
|
.updateStatus('planDate', 'NOT_VALIDATED', null)
|
|||
|
|
.validateField('planDate');
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
//加载维修流程
|
|||
|
|
$.post(ext.contextPath + '/maintenance/equipmentPlan/showProcessView.do', {
|
|||
|
|
id: '${equipmentPlan.id}',
|
|||
|
|
inModal: 'inModal'
|
|||
|
|
}, function (data) {
|
|||
|
|
$("#showView").html(data);
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
|
|||
|
|
$("#table_equipmentCard").bootstrapTable({ // 对应table标签的id
|
|||
|
|
url: ext.contextPath + '/maintenance/equipmentPlanEqu/getList.do', // 获取表格数据的url
|
|||
|
|
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
|||
|
|
striped: true, //表格显示条纹,默认为false
|
|||
|
|
pagination: true, // 在表格底部显示分页组件,默认false
|
|||
|
|
pageList: [10, 20, 100, 500], // 设置页面可以显示的数据条数
|
|||
|
|
pageSize: 10, // 页面数据条数
|
|||
|
|
pageNumber: 1, // 首页页码
|
|||
|
|
sidePagination: 'server', // 设置为服务器端分页
|
|||
|
|
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
|||
|
|
return {
|
|||
|
|
rows: params.limit, // 每页要显示的数据条数
|
|||
|
|
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
|||
|
|
sort: params.sort, // 要排序的字段
|
|||
|
|
order: params.order,
|
|||
|
|
pid: '${equipmentPlan.id}'
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
sortName: 'id', // 要排序的字段
|
|||
|
|
sortOrder: 'desc', // 排序规则
|
|||
|
|
columns: [
|
|||
|
|
{
|
|||
|
|
field: 'equipmentcardid', // 返回json数据中的name
|
|||
|
|
title: '设备编号', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle',
|
|||
|
|
width: '35%',
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
if (row.equipmentCard != null && row.equipmentCard != '') {
|
|||
|
|
// return row.equipmentCard.equipmentcardid;
|
|||
|
|
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + row.equipmentCard.equipmentcardid + "'>" + row.equipmentCard.equipmentcardid + "</span>";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}, {
|
|||
|
|
field: 'equipmentname', // 返回json数据中的name
|
|||
|
|
title: '设备名称', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle',
|
|||
|
|
width: '35%',
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
if (row.equipmentCard != null && row.equipmentCard != '') {
|
|||
|
|
// return row.equipmentCard.equipmentname;
|
|||
|
|
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + row.equipmentCard.equipmentname + "'>" + row.equipmentCard.equipmentname + "</span>";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
/*{
|
|||
|
|
field: 'nr', // 返回json数据中的name
|
|||
|
|
title: '内容', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle',
|
|||
|
|
width: '25%',
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + row.contents + "'>" + row.contents + "</span>";
|
|||
|
|
}
|
|||
|
|
}, */
|
|||
|
|
{
|
|||
|
|
field: 'ys', // 返回json数据中的name
|
|||
|
|
title: '预算(元)', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle',
|
|||
|
|
width: '15%',
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
return row.planMoney;
|
|||
|
|
}
|
|||
|
|
}, {
|
|||
|
|
title: "操作",
|
|||
|
|
align: 'center',
|
|||
|
|
valign: 'middle',
|
|||
|
|
width: '15%', // 定义列的宽度,单位为像素px
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
var buts = '';
|
|||
|
|
buts += '<button class="btn btn-default btn-sm" onclick="viewEquFun(\'' + row.id + '\')" data-toggle="tooltip" title="查看详情"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg"> 查看详情</span></button>'
|
|||
|
|
buts = '<div class="btn-group" >' + buts + '</div>';
|
|||
|
|
return buts;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
onLoadSuccess: function () { //加载成功时执行
|
|||
|
|
adjustBootstrapTableView("table_equipmentCard");
|
|||
|
|
},
|
|||
|
|
onLoadError: function () { //加载失败时执行
|
|||
|
|
console.info("加载数据失败");
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
var selectType = $("#planTypeBigName").select2({
|
|||
|
|
minimumResultsForSearch: 10
|
|||
|
|
})
|
|||
|
|
var selectType = $("#planTypeSmallName").select2({
|
|||
|
|
minimumResultsForSearch: 10
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
$("#cycle").select2({minimumResultsForSearch: 10}).val("${equipmentPlan.cycle}").trigger("change");
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
var viewEquFun = function (id) {
|
|||
|
|
$.post(ext.contextPath + '/maintenance/equipmentPlanEqu/doview.do', {id: id}, function (data) {
|
|||
|
|
$("#subDivEqu").html(data);
|
|||
|
|
openModal('subModalEqu');
|
|||
|
|
});
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
|
|||
|
|
</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">×</span></button>
|
|||
|
|
<h4 class="modal-title">查看计划</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">
|
|||
|
|
<!-- 界面提醒div强制id为alertDiv -->
|
|||
|
|
<div id="alertDiv"></div>
|
|||
|
|
<input name="status" id="status" type="hidden" value="${Status_NoStart}"/>
|
|||
|
|
<input name="id" id="id" type="hidden" value="${equipmentPlan.id}"/>
|
|||
|
|
<input name="planTypeBig" id="planTypeBig" type="hidden"
|
|||
|
|
value="${equipmentPlan.planTypeBig}"/>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">所属厂区</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<p class="form-control-static">${companyName}</p>
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">计划编号</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<p class="form-control-static">${equipmentPlan.planNumber}</p>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<c:if test="${param.type == Code_Type_By}">
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">类别</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<p class="form-control-static">${planTypeSmallName}</p>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</c:if>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">预算 (元)</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<p class="form-control-static">${equipmentPlan.planMoney}</p>
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">计划日期</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<div class="input-group date">
|
|||
|
|
<p class="form-control-static">${equipmentPlan.planDate.substring(0,7)}</p>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">计划内容</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<p class="form-control-static">${equipmentPlan.planContents}</p>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</form>
|
|||
|
|
|
|||
|
|
<div class="box box-primary">
|
|||
|
|
<div class="box-header with-border">
|
|||
|
|
<h3 class="box-title">关联设备</h3>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="box-body ">
|
|||
|
|
<table id="table_equipmentCard" style="table-layout:fixed;"></table>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</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>
|