116 lines
4.8 KiB
Plaintext
116 lines
4.8 KiB
Plaintext
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail"%>
|
||
<%@page import="com.sipai.entity.maintenance.MaintenanceCommString"%>
|
||
<%@ 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"%>
|
||
<%request.setAttribute("Status_Finish",MaintenanceDetail.Status_Finish);%>
|
||
<%request.setAttribute("MAINTENANCE_TYPE_REPAIR",MaintenanceCommString.MAINTENANCE_TYPE_REPAIR);%>
|
||
<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 viewDetailFun = function(id) {
|
||
$.post(ext.contextPath + '/maintenance/showMaintenanceDetailView.do', {id:id} , function(data) {
|
||
$("#maintainDiv").html(data);
|
||
openModal('maintenanceDetailModal');
|
||
});
|
||
}; */
|
||
//计算设备总的维护费用
|
||
/* var getTotalMoney = function(){
|
||
var checkedItems = $("#maintainTable").bootstrapTable('getData');
|
||
var totalMoney = 0;
|
||
$.each(checkedItems, function(index, item){
|
||
totalMoney=totalMoney+item.actualMoney;
|
||
});
|
||
$("#maintainMoney").val(totalMoney);
|
||
} */
|
||
$(function() {
|
||
$("#repairTable").bootstrapTable({ // 对应table标签的id
|
||
url: ext.contextPath + '/maintenance/getMaintenanceDetailList.do', // 获取表格数据的url
|
||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||
striped: true, //表格显示条纹,默认为false
|
||
pagination: true, // 在表格底部显示分页组件,默认false
|
||
//pageList: [3,20,50], // 设置页面可以显示的数据条数
|
||
pageSize: 3, // 页面数据条数
|
||
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_code: '${param.companyId}',
|
||
equipmentId:'${param.equipmentId}',
|
||
type:'${MAINTENANCE_TYPE_REPAIR}',
|
||
status:'${Status_Finish}'
|
||
}
|
||
},
|
||
sortName: 'id', // 要排序的字段
|
||
sortOrder: 'desc', // 排序规则
|
||
/* onClickRow:function(row){
|
||
viewDetailFun(row.id);
|
||
}, */
|
||
columns: [
|
||
{
|
||
title: '序号',//标题 可不加
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
formatter: function (value, row, index) {
|
||
return index+1;
|
||
}
|
||
},{
|
||
field: 'problemcontent', // 返回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: 'actualMoney', // 返回json数据中的name
|
||
title: '费用', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle',
|
||
}
|
||
],
|
||
onLoadSuccess: function(){ //加载成功时执行
|
||
adjustBootstrapTableView("repairTable");
|
||
console.info("加载数据成功");
|
||
},
|
||
onLoadError: function(){ //加载失败时执行
|
||
console.info("加载数据失败");
|
||
}
|
||
})
|
||
});
|
||
</script>
|
||
<div class="box box-primary" >
|
||
<div class="box-header with-border">
|
||
<h3 class="box-title">维修履历</h3>
|
||
<div class="pull-right form-inline">
|
||
<span>维修费用累计</span>
|
||
<input type="text" class="form-control" style="width:100px" id="maintainMoney" name="" value="${repairMoney}" readonly>
|
||
<span>元</span>
|
||
</div>
|
||
</div>
|
||
<!-- /.box-header -->
|
||
<div class="box-body ">
|
||
<table id="repairTable"></table>
|
||
</div>
|
||
</div>
|