288 lines
14 KiB
Plaintext
288 lines
14 KiB
Plaintext
|
|
<%@ page language="java" pageEncoding="UTF-8"%>
|
|||
|
|
<%@page import="com.sipai.tools.CommString"%>
|
|||
|
|
<%@page import="com.sipai.entity.maintenance.MaintenanceCommString"%>
|
|||
|
|
<%@page import="com.sipai.entity.maintenance.MaintainCommStr"%>
|
|||
|
|
<%request.setAttribute("Active_False", CommString.Active_False); %>
|
|||
|
|
<%request.setAttribute("Active_True", CommString.Active_True); %>
|
|||
|
|
<%request.setAttribute("MAINTAIN",MaintenanceCommString.MAINTENANCE_TYPE_MAINTAIN); %>
|
|||
|
|
<%request.setAttribute("INTER_MAINTENANCE",MaintenanceCommString.INTER_MAINTENANCE); %>
|
|||
|
|
<%request.setAttribute("EXTERANL_MAINTENANCE",MaintenanceCommString.EXTERANL_MAINTENANCE); %>
|
|||
|
|
<%request.setAttribute("COMMON_MAINTENANCE",MaintenanceCommString.COMMON_MAINTENANCE); %>
|
|||
|
|
<%request.setAttribute("Maintain_Month",MaintainCommStr.Maintain_Month); %>
|
|||
|
|
<%request.setAttribute("Maintain_Quarter",MaintainCommStr.Maintain_Quarter); %>
|
|||
|
|
<%request.setAttribute("Maintain_HalfYear",MaintainCommStr.Maintain_HalfYear); %>
|
|||
|
|
<%request.setAttribute("Maintain_Year",MaintainCommStr.Maintain_Year); %>
|
|||
|
|
<%request.setAttribute("START",MaintenanceCommString.PLAN_START); %>
|
|||
|
|
<%request.setAttribute("SUBMIT",MaintenanceCommString.PLAN_SUBMIT); %>
|
|||
|
|
<style type="text/css">
|
|||
|
|
|
|||
|
|
</style>
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
//流程审核文件上传所需参数
|
|||
|
|
var masterId_process = '${id}';//业务Id
|
|||
|
|
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
|||
|
|
var nameSpace_process ='ProcessUploadFile';//保存文件夹
|
|||
|
|
var status = 'delete';//有删除权限
|
|||
|
|
|
|||
|
|
function dosaveEqu() {
|
|||
|
|
$("#subFormEqu").bootstrapValidator('validate');//提交验证
|
|||
|
|
if ($("#subFormEqu").data('bootstrapValidator').isValid()) {
|
|||
|
|
//获取验证结果,如果成功,执行下面代码
|
|||
|
|
$.post(ext.contextPath + "/maintenance/equipmentPlanEqu/doupdate.do", $("#subFormEqu").serialize(), function(data) {
|
|||
|
|
if (data.res == 1){
|
|||
|
|
$("#table_equipmentCard").bootstrapTable('refresh');
|
|||
|
|
closeModal("subModalEqu");
|
|||
|
|
}else if(data.res == 0){
|
|||
|
|
showAlert('d','保存失败');
|
|||
|
|
}else{
|
|||
|
|
showAlert('d',data.res);
|
|||
|
|
}
|
|||
|
|
},'json');
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
$("#subFormEqu").bootstrapValidator({
|
|||
|
|
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
|||
|
|
fields: {
|
|||
|
|
planMoney: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '预算不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
contents: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '计划内容不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
$("#table_Type_Wx").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, 50], // 设置页面可以显示的数据条数
|
|||
|
|
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: '32%',
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
return row.equipmentCard.equipmentcardid;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}, {
|
|||
|
|
field: 'equipmentname', // 返回json数据中的name
|
|||
|
|
title: '项目名称', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle',
|
|||
|
|
width: '30%',
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
return row.equipmentCard.equipmentname;
|
|||
|
|
}
|
|||
|
|
}, {
|
|||
|
|
field: 'ys', // 返回json数据中的name
|
|||
|
|
title: '维修内容', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle',
|
|||
|
|
width: '20%',
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
return row.planMoney;
|
|||
|
|
}
|
|||
|
|
},{
|
|||
|
|
title: "操作",
|
|||
|
|
align: 'center',
|
|||
|
|
valign: 'middle',
|
|||
|
|
width: '18%', // 定义列的宽度,单位为像素px
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
var buts='';
|
|||
|
|
if(row.status == '${START}'){
|
|||
|
|
buts+= '<security:authorize buttonUrl="maintenance/equipmentPlan/edit.do">';
|
|||
|
|
buts+= '<button class="btn btn-default btn-sm" title="编辑" onclick="editEquFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
|||
|
|
buts+= '</security:authorize>';
|
|||
|
|
buts+= '<security:authorize buttonUrl="maintenance/equipmentPlan/delete.do">';
|
|||
|
|
buts+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteEquFun(\'' + row.id + '\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
|||
|
|
buts+= '</security:authorize>';
|
|||
|
|
}else{
|
|||
|
|
buts+= '<button class="btn btn-default btn-sm" onclick="processDetailViewFun(\''+row.id+'\')" data-toggle="tooltip" title="查看详情"><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_Type_Wx");
|
|||
|
|
},
|
|||
|
|
onLoadError: function () { //加载失败时执行
|
|||
|
|
console.info("加载数据失败");
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
</script>
|
|||
|
|
<div class="modal fade" id="subModalEqu">
|
|||
|
|
<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">编辑</h4>
|
|||
|
|
</div>
|
|||
|
|
<div class="modal-body">
|
|||
|
|
<!-- 新增界面formid强制为subFormEqu -->
|
|||
|
|
<form class="form-horizontal" id="subFormEqu">
|
|||
|
|
<!-- 界面提醒div强制id为alertDiv -->
|
|||
|
|
<div id="alertDiv"></div>
|
|||
|
|
<input name="status" id="status" type="hidden" value="${START}"/>
|
|||
|
|
<input name="id" id="id" type="hidden" value="${equipmentPlanEqu.id}"/>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">设备编号</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<p class="form-control-static" >${equipmentcardid}</p>
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">设备名称</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<p class="form-control-static" >${equipmentname}</p>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">*预算 (元)</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="number" class="form-control" id="planMoney" name ="planMoney" placeholder="计划费用" min="0" step="50.01" value="${equipmentPlanEqu.planMoney}">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">*计划内容</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<textarea class="form-control " id="contents" name="contents" rows="2" >${equipmentPlanEqu.contents}</textarea>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
</form>
|
|||
|
|
|
|||
|
|
<!-- <div class="box box-primary" >
|
|||
|
|
<div class="box-header with-border">
|
|||
|
|
<h3 class="box-title">关联维修库</h3>
|
|||
|
|
<div class="box-tools pull-right">
|
|||
|
|
<a onclick="addfun()" class="btn btn-box-tool" data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
|||
|
|
<a onclick="editfun()" class="btn btn-box-tool" data-toggle="tooltip" title="编辑"><i class="glyphicon glyphicon-edit"></i></a>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="box-body ">
|
|||
|
|
<table id="table_Type_Wx"></table>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="box box-primary" >
|
|||
|
|
<div class="box-header with-border">
|
|||
|
|
<h3 class="box-title">关联保养库</h3>
|
|||
|
|
<div class="box-tools pull-right">
|
|||
|
|
<a onclick="addfun()" class="btn btn-box-tool" data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
|||
|
|
<a onclick="editfun()" class="btn btn-box-tool" data-toggle="tooltip" title="编辑"><i class="glyphicon glyphicon-edit"></i></a>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="box-body ">
|
|||
|
|
<table id="table_Type_Ty"></table>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="box box-primary" >
|
|||
|
|
<div class="box-header with-border">
|
|||
|
|
<h3 class="box-title">关联润滑库</h3>
|
|||
|
|
<div class="box-tools pull-right">
|
|||
|
|
<a onclick="addfun()" class="btn btn-box-tool" data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
|||
|
|
<a onclick="editfun()" class="btn btn-box-tool" data-toggle="tooltip" title="编辑"><i class="glyphicon glyphicon-edit"></i></a>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="box-body ">
|
|||
|
|
<table id="table_Type_Rh"></table>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="box box-primary" >
|
|||
|
|
<div class="box-header with-border">
|
|||
|
|
<h3 class="box-title">关联防腐库</h3>
|
|||
|
|
<div class="box-tools pull-right">
|
|||
|
|
<a onclick="addfun()" class="btn btn-box-tool" data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
|||
|
|
<a onclick="editfun()" class="btn btn-box-tool" data-toggle="tooltip" title="编辑"><i class="glyphicon glyphicon-edit"></i></a>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="box-body ">
|
|||
|
|
<table id="table_Type_Ff"></table>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="box box-primary" >
|
|||
|
|
<div class="box-header with-border">
|
|||
|
|
<h3 class="box-title">关联仪表库</h3>
|
|||
|
|
<div class="box-tools pull-right">
|
|||
|
|
<a onclick="addfun()" class="btn btn-box-tool" data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
|||
|
|
<a onclick="editfun()" class="btn btn-box-tool" data-toggle="tooltip" title="编辑"><i class="glyphicon glyphicon-edit"></i></a>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="box-body ">
|
|||
|
|
<table id="table_Type_Yb"></table>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="box box-primary" >
|
|||
|
|
<div class="box-header with-border">
|
|||
|
|
<h3 class="box-title">关联大修库</h3>
|
|||
|
|
<div class="box-tools pull-right">
|
|||
|
|
<a onclick="addfun()" class="btn btn-box-tool" data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
|||
|
|
<a onclick="editfun()" class="btn btn-box-tool" data-toggle="tooltip" title="编辑"><i class="glyphicon glyphicon-edit"></i></a>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="box-body ">
|
|||
|
|
<table id="table_Type_Dx"></table>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="box box-primary" >
|
|||
|
|
<div class="box-header with-border">
|
|||
|
|
<h3 class="box-title">关联重置库</h3>
|
|||
|
|
<div class="box-tools pull-right">
|
|||
|
|
<a onclick="addfun()" class="btn btn-box-tool" data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
|||
|
|
<a onclick="editfun()" class="btn btn-box-tool" data-toggle="tooltip" title="编辑"><i class="glyphicon glyphicon-edit"></i></a>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="box-body ">
|
|||
|
|
<table id="table_Type_Xz"></table>
|
|||
|
|
</div>
|
|||
|
|
</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="dosaveEqu()" id="btn_save">保存</button>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-content -->
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-dialog -->
|
|||
|
|
</div>
|