first commit
This commit is contained in:
277
WebRoot/jsp/sparepart/outStockRecordView.jsp
Normal file
277
WebRoot/jsp/sparepart/outStockRecordView.jsp
Normal file
@ -0,0 +1,277 @@
|
||||
<%@page import="com.sipai.entity.sparepart.SparePartCommString"%>
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%request.setAttribute("AUDIT", SparePartCommString.STATUS_STOCK_AUDIT); %>
|
||||
<%request.setAttribute("START", SparePartCommString.STATUS_STOCK_START); %>
|
||||
<%request.setAttribute("FINISH", SparePartCommString.STATUS_STOCK_FINISH); %>
|
||||
<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 = '${outStockRecord.id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process ='ProcessUploadFile';//保存文件夹
|
||||
var status = 'view';//有查看权限
|
||||
|
||||
|
||||
var viewDetailFun = function(id){
|
||||
$.post(ext.contextPath + '/sparepart/outStockRecord/viewDetail.do', {id:id} , function(data) {
|
||||
$("#subViewDiv").html(data);
|
||||
openModal('subViewModal');
|
||||
});
|
||||
};
|
||||
|
||||
$(function(){
|
||||
//初始化文件显示
|
||||
getFileList_process();
|
||||
$.post(ext.contextPath + '/sparepart/outStockRecord/showProcessOutStockView.do', {id: '${outStockRecord.id}',inModal:'inModal'} , function(data) {
|
||||
$("#showView").html(data);
|
||||
});
|
||||
$('#table_outStockDetail').bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/sparepart/outStockRecord/getOutStockDetailList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
detailView: true,//父子表
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
pid:'${outStockRecord.id}',
|
||||
}
|
||||
},
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewDetailFun(row.id);
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
/* {
|
||||
checkbox: true, // 显示一个勾选框
|
||||
}, */{
|
||||
field: 'goods.name', // 返回json数据中的name
|
||||
title: '物品名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
},{
|
||||
field: 'goods.model', // 返回json数据中的name
|
||||
title: '规格型号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
},{
|
||||
field: 'goods.brand', // 返回json数据中的name
|
||||
title: '品牌', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'goods.unit', // 返回json数据中的name
|
||||
title: '单位', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},/* {
|
||||
field: 'dept.name', // 返回json数据中的name
|
||||
title: '领用部门', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, */{
|
||||
field: 'outNumber', // 返回json数据中的name
|
||||
title: '领用数量', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'includedTaxCostPrice', // 返回json数据中的name
|
||||
title: '含税单价/元', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
},{
|
||||
field: 'includedTaxTotalMoney', // 返回json数据中的name
|
||||
title: '含税合计/元', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
],
|
||||
//注册加载子表的事件。index:父表当前行的行索引,row:父表当前行的Json数据对象,$detail:当前行下面创建的新行里面的td对象。
|
||||
onExpandRow: function (index, row, $detail) {
|
||||
initDetailTable(index, row, $detail);
|
||||
//存入sessionStorage
|
||||
sessionStorage.setItem("index", index);
|
||||
},
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table_outStockDetail");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
var initDetailTable = function (index, row, $detail) {
|
||||
var pid = row.id;
|
||||
var detailTable = $detail.html('<table></table>').find('table');
|
||||
$(detailTable).bootstrapTable({
|
||||
url: ext.contextPath + '/sparepart/outStockRecord/getInOutDetailList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
// showFooter:true,//添加页脚
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
id: row.id,
|
||||
type: '${outStockRecord.warehouse.outboundType}'
|
||||
}
|
||||
},
|
||||
sortName: 'morder,name', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
columns: [
|
||||
/* {
|
||||
checkbox: true, // 显示一个勾选框
|
||||
}, */{
|
||||
field: 'num', // 返回json数据中的name
|
||||
title: '数量', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
},{
|
||||
field: 'inStockRecordDetail.price', // 返回json数据中的name
|
||||
title: '不含税单价/元', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
// footerFormatter:"不含税总计/元",
|
||||
},{
|
||||
field: 'inStockRecordDetail.totalMoney', // 返回json数据中的name
|
||||
title: '不含税合计/元', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
// footerFormatter:function(value){
|
||||
// if(value==""){
|
||||
// return"";
|
||||
// }else{
|
||||
// var count = 0;
|
||||
// for(var i in value){
|
||||
// count += value[i].inStockRecordDetail.totalMoney;
|
||||
// }
|
||||
// return count.toFixed(4);
|
||||
// }
|
||||
// },
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("detailTable");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
</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 id="status" name="status" type="hidden" value="${outStockRecord.status}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">所属厂区</label>
|
||||
<div class="col-sm-6">
|
||||
<p class="form-control-static" >${outStockRecord.company.name}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">领用单号</label>
|
||||
<div class="col-sm-6" >
|
||||
<p class="form-control-static" >${outStockRecord.id}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">领用日期</label>
|
||||
<div class="col-sm-6" >
|
||||
<p class="form-control-static" >${outStockRecord.outDate.substring(0,10)}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">所属仓库</label>
|
||||
<div class="col-sm-6">
|
||||
<p class="form-control-static" >${outStockRecord.warehouse.name}</p>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">领用部门</label>
|
||||
<div class="col-sm-6" style="margin-top:8px; text-align:center">
|
||||
${outStockRecord.dept.name}
|
||||
</div>
|
||||
</div> --%>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">领用人</label>
|
||||
<div class="col-sm-6">
|
||||
<p class="form-control-static" >${outStockRecord.userName}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">审核人</label>
|
||||
<div class="col-sm-6">
|
||||
<p class="form-control-static" >${outStockRecord.auditManName}</p>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">备注</label>
|
||||
<div class="col-sm-6" style="margin-top:8px; text-align:center">
|
||||
${outStockRecord.remark}
|
||||
</div>
|
||||
</div> --%>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">文件附件:</label>
|
||||
</div>
|
||||
<!-- 文件上传,显示 -->
|
||||
<div class="file-border" id="fileArea">
|
||||
</div>
|
||||
</form>
|
||||
<div class="box box-primary" >
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">领用明细</h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body ">
|
||||
<table id="table_outStockDetail"></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>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
Reference in New Issue
Block a user