508 lines
26 KiB
Plaintext
508 lines
26 KiB
Plaintext
<%@page import="com.sipai.entity.sparepart.SparePartCommString"%>
|
||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||
<%request.setAttribute("DEPARTMENT", SparePartCommString.PURCHASE_DEPARTMENT); %>
|
||
<%-- <%request.setAttribute("PASS", SparePartCommString.STATUS_PASS); %>
|
||
<%request.setAttribute("REJECT", SparePartCommString.STATUS_REJECT); %>
|
||
<%request.setAttribute("SUBMIT", SparePartCommString.STATUS_SUBMIT); %> --%>
|
||
<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 = '${contract.id}';//业务Id
|
||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||
var nameSpace_process ='ProcessUploadFile';//保存文件夹
|
||
var status = 'view';//有删除权限
|
||
|
||
$(function(){
|
||
//初始化文件显示
|
||
getFileList_process();
|
||
$('#table_SubscribeDetail').bootstrapTable({ // 对应table标签的id
|
||
url: ext.contextPath + '/sparepart/subscribe/getSubscribeDetailList.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,
|
||
pids:'${contract.purchaseid}',
|
||
contractid:'${contract.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.unit', // 返回json数据中的name
|
||
title: '单位', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'brand', // 返回json数据中的name
|
||
title: '品牌', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
editable: { //编辑列元素
|
||
type: 'text',
|
||
title: '品牌',
|
||
}
|
||
},{
|
||
field: 'design', // 返回json数据中的name
|
||
title: '设计规格', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
editable: { //编辑列元素
|
||
type: 'text',
|
||
title: '设计规格',
|
||
}
|
||
},{
|
||
field: 'manufacturer', // 返回json数据中的name
|
||
title: '生产厂家', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
editable: { //编辑列元素
|
||
type: 'text',
|
||
title: '品牌',
|
||
}
|
||
},{
|
||
field: 'number', // 返回json数据中的name
|
||
title: '数量', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
editable: { //编辑列元素
|
||
type: 'text',
|
||
title: '数量',
|
||
validate: function (v) {
|
||
if (!v) return '数量不能为空';
|
||
|
||
}
|
||
}
|
||
},{
|
||
field: 'price', // 返回json数据中的name
|
||
title: '单价/元', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
editable: { //编辑列元素
|
||
type: 'text',
|
||
title: '单价',
|
||
validate: function (v) {
|
||
if (!v) return '单价不能为空';
|
||
|
||
}
|
||
}
|
||
},{
|
||
field: 'totalMoney', // 返回json数据中的name
|
||
title: '合计/元', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'install', // 返回json数据中的name
|
||
title: '是否安装', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
},{
|
||
field: 'channelsName', // 返回json数据中的name
|
||
title: '子项工程', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'purpose', // 返回json数据中的name
|
||
title: '用途', // 表格表头显示文字
|
||
width: '20%',
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
}
|
||
],
|
||
//保存列修改后的数据
|
||
onEditableSave: function (field, row, oldValue, $el) {
|
||
$.post(ext.contextPath + "/sparepart/subscribe/updateSubscribeDetail.do", {id:row.id,price:row.price,number:row.number,purpose:row.purpose}, function(data) {
|
||
if (data.res == 1){
|
||
$("#table_SubscribeDetail").bootstrapTable('refresh');
|
||
}else if(data.res == 0){
|
||
showAlert('d','编辑失败');
|
||
}else{
|
||
showAlert('d',data.res);
|
||
}
|
||
},'json');
|
||
},
|
||
onLoadSuccess: function(){ //加载成功时执行
|
||
adjustBootstrapTableView("table_SubscribeDetail");
|
||
},
|
||
onLoadError: function(){ //加载失败时执行
|
||
console.info("加载数据失败");
|
||
}
|
||
})
|
||
//付款记录
|
||
$("#table_Payment").bootstrapTable({ // 对应table标签的id
|
||
url: ext.contextPath + '/sparepart/contractDetailPayment/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,
|
||
contractId:'${contract.id}',
|
||
}
|
||
},
|
||
sortName: 'id', // 要排序的字段
|
||
sortOrder: 'desc', // 排序规则
|
||
columns: [
|
||
{
|
||
field: 'paymentdate', // 返回json数据中的name
|
||
title: '付款时间', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
formatter:function(value,row,index){
|
||
return value.substring(0,10);
|
||
}
|
||
},{
|
||
field: 'amountpaid', // 返回json数据中的name
|
||
title: '已付金额', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle',
|
||
},{
|
||
field: 'amountoutstanding', // 返回json数据中的name
|
||
title: '未付金额', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
},{
|
||
title: "操作",
|
||
align: 'center',
|
||
valign: 'middle',
|
||
width: 120, // 定义列的宽度,单位为像素px
|
||
formatter: function (value, row, index) {
|
||
var buts= '';
|
||
if('${contract.status}' != '${STATUS_CONTRACT_FINISH}'){
|
||
buts+= '<security:authorize buttonUrl="sparepart/contract/edit.do">';
|
||
buts+= '<button class="btn btn-default btn-sm" title="编辑" onclick="editFunPayment(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||
buts+= '</security:authorize>';
|
||
buts+= '<security:authorize buttonUrl="sparepart/contract/delete.do">';
|
||
buts+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteFunPayment(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||
buts+= '</security:authorize>';
|
||
buts='<div class="btn-group" >'+buts+'</div>';
|
||
}
|
||
return buts;
|
||
}
|
||
}
|
||
],
|
||
onLoadSuccess: function(){ //加载成功时执行
|
||
adjustBootstrapTableView("table_Payment");
|
||
console.info("加载数据成功");
|
||
},
|
||
onLoadError: function(){ //加载失败时执行
|
||
console.info("加载数据失败");
|
||
}
|
||
|
||
})
|
||
//开票记录
|
||
$("#table_Invoice").bootstrapTable({ // 对应table标签的id
|
||
url: ext.contextPath + '/sparepart/contractDetailInvoice/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,
|
||
contractId:'${contract.id}',
|
||
}
|
||
},
|
||
sortName: 'id', // 要排序的字段
|
||
sortOrder: 'desc', // 排序规则
|
||
columns: [
|
||
{
|
||
field: 'invoicedate', // 返回json数据中的name
|
||
title: '开票时间', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
formatter:function(value,row,index){
|
||
return value.substring(0,10);
|
||
}
|
||
},{
|
||
field: 'amountinvoice', // 返回json数据中的name
|
||
title: '开票金额', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle',
|
||
},{
|
||
title: "操作",
|
||
align: 'center',
|
||
valign: 'middle',
|
||
width: 120, // 定义列的宽度,单位为像素px
|
||
formatter: function (value, row, index) {
|
||
var buts= '';
|
||
if('${contract.status}' != '${STATUS_CONTRACT_FINISH}'){
|
||
buts+= '<security:authorize buttonUrl="sparepart/contract/edit.do">';
|
||
buts+= '<button class="btn btn-default btn-sm" title="编辑" onclick="editFunInvoice(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||
buts+= '</security:authorize>';
|
||
buts+= '<security:authorize buttonUrl="sparepart/contract/delete.do">';
|
||
buts+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteFunInvoice(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||
buts+= '</security:authorize>';
|
||
buts='<div class="btn-group" >'+buts+'</div>';
|
||
}
|
||
return buts;
|
||
}
|
||
}
|
||
],
|
||
onLoadSuccess: function(){ //加载成功时执行
|
||
adjustBootstrapTableView("table_Payment");
|
||
console.info("加载数据成功");
|
||
},
|
||
onLoadError: function(){ //加载失败时执行
|
||
console.info("加载数据失败");
|
||
}
|
||
});
|
||
})
|
||
|
||
</script>
|
||
<div class="modal fade" id="subModal">
|
||
<div class="modal-dialog modal-lg">
|
||
<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强制为subForm -->
|
||
<form class="form-horizontal" id="subForm" enctype="multipart/form-data" >
|
||
<!-- 界面提醒div强制id为alertDiv -->
|
||
<div id="alertDiv"></div>
|
||
<div class="form-group">
|
||
<label class="col-md-2 col-sm-2 control-label">所属厂区</label>
|
||
<div class="col-md-4 col-sm-10">
|
||
<input id="bizId" name="bizId" type="hidden" value="${contract.company.id}"/>
|
||
<p class="form-control-static" >${contract.company.name}</p>
|
||
</div>
|
||
<label class="col-md-2 col-sm-2 control-label hidden">合同甲方</label>
|
||
<div class="col-md-4 col-sm-10 hidden">
|
||
<p class="form-control-static">${contract.firstparty}</p>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-md-2 col-sm-2 control-label">合同名称</label>
|
||
<div class="col-md-4 col-sm-10">
|
||
<p class="form-control-static">${contract.contractname}</p>
|
||
</div>
|
||
<label class="col-md-2 col-sm-2 control-label">合同类型</label>
|
||
<div class="col-md-4 col-sm-10">
|
||
<p class="form-control-static">${contract.contractclassName}</p>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-md-2 col-sm-2 control-label">经办部门</label>
|
||
<div class="col-md-4 col-sm-10">
|
||
<c:choose>
|
||
<c:when test="${!empty contract.dept.name}">
|
||
<p class="form-control-static">${contract.dept.name}</p>
|
||
</c:when>
|
||
<c:otherwise>
|
||
<p class="form-control-static">${contract.company.name}</p>
|
||
</c:otherwise>
|
||
</c:choose>
|
||
</div>
|
||
<label class="col-md-2 col-sm-2 control-label">经办人</label>
|
||
<div class="col-md-4 col-sm-10">
|
||
<p class="form-control-static">${contract.agentName}</p>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-md-2 col-sm-2 control-label">合同编号</label>
|
||
<div class="col-md-4 col-sm-10">
|
||
<p class="form-control-static">${contract.contractnumber}</p>
|
||
</div>
|
||
<label class="col-md-2 col-sm-2 control-label">供应商</label>
|
||
<div class="col-md-4 col-sm-10">
|
||
<p class="form-control-static">${contract.supplierName}</p>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-md-2 col-sm-2 control-label">采购形式</label>
|
||
<div class="col-md-4 col-sm-10">
|
||
<p class="form-control-static">${contract.purchasemethodsName}</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">${contract.purchaseName}</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">${contract.channelsName}</p>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-md-2 col-sm-2 control-label">开始日期</label>
|
||
<div class="col-md-4 col-sm-10">
|
||
<p class="form-control-static">${contract.contractstartdate.substring(0,10)}</p>
|
||
</div>
|
||
<label class="col-md-2 col-sm-2 control-label">结束日期</label>
|
||
<div class="col-md-4 col-sm-10">
|
||
<p class="form-control-static">${contract.contractenddate.substring(0,10)}</p>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-md-2 col-sm-2 control-label">合同金额(元)</label>
|
||
<div class="col-md-4 col-sm-10">
|
||
<p class="form-control-static">${contract.contractamount}</p>
|
||
</div>
|
||
<label class="col-md-2 col-sm-2 control-label">合同税率(%)</label>
|
||
<div class="col-md-4 col-sm-10">
|
||
<p class="form-control-static">${contract.contracttaxrateName}</p>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-md-2 col-sm-2 control-label">履约保证金</label>
|
||
<div class="col-md-4 col-sm-10">
|
||
<p class="form-control-static">${contract.performancebond}</p>
|
||
</div>
|
||
<label class="col-md-2 col-sm-2 control-label">质保金(%)</label>
|
||
<div class="col-md-4 col-sm-10">
|
||
<p class="form-control-static">${contract.warrantydeposit}</p>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-md-2 col-sm-2 control-label">质保金(元)</label>
|
||
<div class="col-md-4 col-sm-10">
|
||
<p class="form-control-static">${contract.qualitydeposit}</p>
|
||
</div>
|
||
<label class="col-md-2 col-sm-2 control-label">质保期(年)</label>
|
||
<div class="col-md-4 col-sm-10">
|
||
<p class="form-control-static">${contract.warrantyperiod}</p>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-md-2 col-sm-2 control-label">供货计划开始日期</label>
|
||
<div class="col-md-4 col-sm-10">
|
||
<p class="form-control-static">${contract.supplyplanstartdate.substring(0,10)}</p>
|
||
</div>
|
||
<label class="col-md-2 col-sm-2 control-label">供货计划结束日期</label>
|
||
<div class="col-md-4 col-sm-10">
|
||
<p class="form-control-static">${contract.supplyplanenddate.substring(0,10)}</p>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-md-2 col-sm-2 control-label">供货实际开始日期</label>
|
||
<div class="col-md-4 col-sm-10">
|
||
<p class="form-control-static">${contract.supplyactualstartdate.substring(0,10)}</p>
|
||
</div>
|
||
<label class="col-md-2 col-sm-2 control-label">供货实际结束日期</label>
|
||
<div class="col-md-4 col-sm-10">
|
||
<p class="form-control-static">${contract.supplyactualenddate.substring(0,10)}</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">${contract.remark}</p>
|
||
</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="nav-tabs-custom">
|
||
<ul class="nav nav-tabs" id="">
|
||
<li class="active"><a href="#tab1" data-toggle="tab" index="0" aria-expanded="true">合同明细</a></li>
|
||
<li class=""><a href="#tab2" data-toggle="tab" index="0" aria-expanded="true">付款记录</a></li>
|
||
<li class=""><a href="#tab3" data-toggle="tab" index="1" aria-expanded="false">开票记录</a></li>
|
||
<!-- <li class=""><a href="#tab3" data-toggle="tab" index="4" aria-expanded="false">验收记录</a></li>
|
||
<li class=""><a href="#tab4" data-toggle="tab" index="3" aria-expanded="false">入库记录</a></li>
|
||
<li class=""><a href="#tab5" data-toggle="tab" index="4" aria-expanded="false">出库记录</a></li>
|
||
<li class=""><a href="#tab6" data-toggle="tab" index="5" aria-expanded="false">合同变更历史</a></li> -->
|
||
</ul>
|
||
</div><div class="tab-content" >
|
||
<div class=" tab-pane active" id="tab1">
|
||
<div class="box box-primary" >
|
||
<div class="box-header with-border">
|
||
<div class="box-tools pull-right">
|
||
</div>
|
||
</div>
|
||
<!-- /.box-header -->
|
||
<div class="box-body ">
|
||
<input id="subscribeDetail_channelsId" type="hidden" value="" />
|
||
<table id="table_SubscribeDetail"></table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class=" tab-pane " id="tab2">
|
||
<div class="box box-primary" >
|
||
<c:if test="${contract.status==STATUS_CONTRACT_EXECUTE}">
|
||
<div class="box-header with-border">
|
||
<div class="box-tools pull-right">
|
||
<a onclick="paymentAddFun()" class="btn btn-box-tool" data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||
</div>
|
||
</div>
|
||
</c:if>
|
||
<div class="box-body ">
|
||
<table id="table_Payment"></table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class=" tab-pane " id="tab3">
|
||
<div class="box box-primary" >
|
||
<c:if test="${contract.status==STATUS_CONTRACT_EXECUTE}">
|
||
<div class="box-header with-border">
|
||
<div class="box-tools pull-right">
|
||
<a onclick="invoiceAddFun()" class="btn btn-box-tool" data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||
</div>
|
||
</div>
|
||
</c:if>
|
||
<div class="box-body ">
|
||
<table id="table_Invoice"></table>
|
||
</div>
|
||
</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> |