1017 lines
44 KiB
Plaintext
1017 lines
44 KiB
Plaintext
<%@ 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"%>
|
||
<%@page import="com.sipai.entity.sparepart.SparePartCommString"%>
|
||
<%request.setAttribute("START", SparePartCommString.STATUS_START); %>
|
||
<%request.setAttribute("DEPT_AUDIT", SparePartCommString.STATUS_DEPT_AUDIT); %>
|
||
<%request.setAttribute("DEPT_REJECT", SparePartCommString.STATUS_DEPT_REJECT); %>
|
||
<%request.setAttribute("FINISH", SparePartCommString.STATUS_FINISH); %>
|
||
<%request.setAttribute("INQUIRY_AUDIT", SparePartCommString.STATUS_INQUIRY_AUDIT); %>
|
||
<%request.setAttribute("INQUIRY_REJECT", SparePartCommString.STATUS_INQUIRY_REJECT); %>
|
||
<%request.setAttribute("PURCHASE_INQUIRY", SparePartCommString.STATUS_PURCHASE_INQUIRY); %>
|
||
<%request.setAttribute("STATUS_CONTRACT_START", SparePartCommString.STATUS_CONTRACT_START); %>
|
||
<%request.setAttribute("STATUS_CONTRACT_DEPT_AUDIT", SparePartCommString.STATUS_CONTRACT_DEPT_AUDIT); %>
|
||
<%request.setAttribute("STATUS_CONTRACT_DEPT_REJECT", SparePartCommString.STATUS_CONTRACT_DEPT_REJECT); %>
|
||
<%request.setAttribute("STATUS_CONTRACT_AUDIT", SparePartCommString.STATUS_CONTRACT_AUDIT); %>
|
||
<%request.setAttribute("STATUS_CONTRACT_REJECT", SparePartCommString.STATUS_CONTRACT_REJECT); %>
|
||
<%request.setAttribute("STATUS_CONTRACT_EXECUTE", SparePartCommString.STATUS_CONTRACT_EXECUTE); %>
|
||
<%request.setAttribute("STATUS_CONTRACT_FINISH", SparePartCommString.STATUS_CONTRACT_FINISH); %>
|
||
<!DOCTYPE html>
|
||
<!-- <html lang="zh-CN"> -->
|
||
<!-- BEGIN HEAD -->
|
||
<head>
|
||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||
<!-- 引用页头及CSS页-->
|
||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||
<!-- bootstrap switch -->
|
||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js" charset="utf-8"></script>
|
||
<!--bootstrap-table 导出 -->
|
||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-table/extensions/export/bootstrap-table-export.js"></script>
|
||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-table/tableExport/libs/FileSaver/FileSaver.min.js"></script>
|
||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-table/tableExport/libs/js-xlsx/xlsx.core.min.js"></script>
|
||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-table/tableExport/libs/jsPDF/jspdf.min.js"></script>
|
||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-table/tableExport/libs/jsPDF-AutoTable/jspdf.plugin.autotable.js"></script>
|
||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-table/tableExport/libs/es6-promise/es6-promise.auto.min.js"></script>
|
||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-table/tableExport/libs/html2canvas/html2canvas.min.js"></script>
|
||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-table/tableExport/tableExport.min.js"></script>
|
||
<style type="text/css">
|
||
.select2-container .select2-selection--single{
|
||
height:30px;
|
||
line-height: 30px;
|
||
}
|
||
.select2-selection__arrow{
|
||
margin-top:3px;
|
||
}
|
||
.table-hover>tbody>tr:hover {
|
||
cursor: pointer;
|
||
}
|
||
.fixed-table-toolbar .bs-bars,.fixed-table-toolbar .columns{
|
||
margin-top: 0px;
|
||
margin-bottom: 0px;
|
||
line-height: 20px;
|
||
}
|
||
</style>
|
||
<script type="text/javascript">
|
||
var beginTimeStore2 = '';
|
||
var endTimeStore2 = '';
|
||
var companyId = unitId;
|
||
//表格查询参数
|
||
function queryParamsFun (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||
return {
|
||
rows: params.limit, // 每页要显示的数据条数
|
||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||
sort: params.sort, // 要排序的字段
|
||
order: params.order,
|
||
search_name: $('#search_name').val(),
|
||
search_code: companyId,
|
||
deptId: $('#dept_id').val(),
|
||
edt : endTimeStore2,
|
||
sdt : beginTimeStore2,
|
||
contractstartdate: $('#contractstartdate').val(),
|
||
contractclassid: $('#contractclassid').val(),
|
||
channelsid: $('#channelsId').val(),
|
||
agentid: $('#agentid').val(),
|
||
contractstatus:$('#status4list1').val(),
|
||
supplierid:$('#supplierid').val(),
|
||
|
||
|
||
};
|
||
}
|
||
//简易公司combotree
|
||
var showFun = function() {
|
||
var search_name = $('#search_name').val();
|
||
|
||
var deptId = $('#dept_id').val();
|
||
var contractstartdate = $('#contractstartdate').val();
|
||
var contractclassid = $('#contractclassid').val();
|
||
var channelsid = $('#channelsId').val();
|
||
var agentid = $('#agentid').val();
|
||
var contractstatus = $('#status4list1').val();
|
||
var supplierid = $('#supplierid').val();
|
||
$.post(ext.contextPath + "/sparepart/contract/getSummary.do", {edt : endTimeStore2,sdt : beginTimeStore2,search_name:search_name,search_code:companyId,deptId:deptId,contractstartdate:contractstartdate,contractclassid:contractclassid,channelsid:channelsid,agentid:agentid,contractstatus:contractstatus}, function (data) {
|
||
var values = JSON.parse(data);
|
||
var contractClass = values.contractClass;
|
||
var classSource = new Array();
|
||
classSource[0] = ['product', '合同总金额', '已付总金额', '未付总金额'];
|
||
if(contractClass!=null && contractClass.length>0){
|
||
for(var i=0;i<contractClass.length;i++){
|
||
var contract=0;
|
||
var contractamount=0;
|
||
var amountpaid=0;
|
||
var contractList = contractClass[i].contractList;
|
||
if(contractList!=null && contractList.length>0){
|
||
contract = contractList.length;
|
||
for(var a=0;a<contractList.length;a++){
|
||
if(contractList[a].contractamount!=null ){
|
||
contractamount += contractList[a].contractamount;
|
||
}
|
||
var paymentList=contractList[a].paymentList;
|
||
if(paymentList!=null && paymentList.length>0){
|
||
for(var p=0;p<paymentList.length;p++){
|
||
amountpaid += paymentList[p].amountpaid
|
||
}
|
||
}
|
||
}
|
||
}
|
||
classSource[i+1] = [contractClass[i].name, contractamount, amountpaid, (contractamount-amountpaid)];
|
||
}
|
||
}
|
||
|
||
var chartbarClass = echarts.init(document.getElementById('class'));
|
||
var optionClass = {
|
||
legend: {},
|
||
tooltip: {},
|
||
dataset: {
|
||
source: classSource
|
||
},
|
||
xAxis: {type: 'category'},
|
||
yAxis: [
|
||
|
||
{
|
||
type: 'value',
|
||
name:'金额',
|
||
axisLabel:{
|
||
margin:-40,
|
||
},
|
||
splitLine: {
|
||
show: false
|
||
}
|
||
},
|
||
|
||
|
||
],
|
||
// Declare several bar series, each will be mapped
|
||
// to a column of dataset.source by default.
|
||
series: [
|
||
{type: 'bar',
|
||
yAxisIndex: 0,
|
||
label: {
|
||
show: false,
|
||
position: 'top'
|
||
},},
|
||
{type: 'bar',
|
||
yAxisIndex: 0,
|
||
label: {
|
||
show: false,
|
||
position: 'top'
|
||
},},
|
||
{type: 'bar',
|
||
yAxisIndex: 0,
|
||
label: {
|
||
show: false,
|
||
position: 'top'
|
||
},}
|
||
]
|
||
};
|
||
chartbarClass.setOption(optionClass);
|
||
|
||
var classSource1 = new Array();
|
||
classSource1[0] = ['product', '合同总数量'];
|
||
if(contractClass!=null && contractClass.length>0){
|
||
for(var i=0;i<contractClass.length;i++){
|
||
var contract=0;
|
||
var contractamount=0;
|
||
var amountpaid=0;
|
||
var contractList = contractClass[i].contractList;
|
||
if(contractList!=null && contractList.length>0){
|
||
contract = contractList.length;
|
||
}
|
||
classSource1[i+1] = [contractClass[i].name, contract];
|
||
}
|
||
}
|
||
console.log(classSource);
|
||
var chartbarClass1 = echarts.init(document.getElementById('class1'));
|
||
var optionClass1 = {
|
||
legend: {},
|
||
tooltip: {},
|
||
dataset: {
|
||
source: classSource1
|
||
},
|
||
xAxis: {type: 'category'},
|
||
yAxis: [
|
||
{
|
||
type: 'value',
|
||
name:'数量',
|
||
splitLine: {
|
||
show: true
|
||
}
|
||
}
|
||
],
|
||
// Declare several bar series, each will be mapped
|
||
// to a column of dataset.source by default.
|
||
series: [
|
||
{type: 'bar',
|
||
label: {
|
||
show: false,
|
||
position: 'top'
|
||
},}
|
||
]
|
||
};
|
||
chartbarClass1.setOption(optionClass1);
|
||
|
||
|
||
|
||
|
||
var channels = values.channels;
|
||
var channelsSource = new Array();
|
||
channelsSource[0] = ['product', '合同总金额', '已付总金额', '未付总金额'];
|
||
if(channels!=null && channels.length>0){
|
||
for(var i=0;i<channels.length;i++){
|
||
var contract=0;
|
||
var contractamount=0;
|
||
var amountpaid=0;
|
||
var contractList = channels[i].contractList;
|
||
if(contractList!=null && contractList.length>0){
|
||
contract = contractList.length;
|
||
for(var a=0;a<contractList.length;a++){
|
||
if(contractList[a].contractamount!=null ){
|
||
contractamount += contractList[a].contractamount;
|
||
}
|
||
var paymentList=contractList[a].paymentList;
|
||
if(paymentList!=null && paymentList.length>0){
|
||
for(var p=0;p<paymentList.length;p++){
|
||
amountpaid += paymentList[p].amountpaid
|
||
}
|
||
}
|
||
}
|
||
}
|
||
channelsSource[i+1] = [channels[i].name, contractamount, amountpaid, (contractamount-amountpaid)];
|
||
}
|
||
}
|
||
var chartbarChannels = echarts.init(document.getElementById('channels'));
|
||
var optionChannels = {
|
||
legend: {},
|
||
tooltip: {},
|
||
dataset: {
|
||
source: channelsSource
|
||
},
|
||
xAxis: {type: 'category'},
|
||
yAxis: [
|
||
|
||
{
|
||
type: 'value',
|
||
name:'金额',
|
||
axisLabel:{
|
||
margin:-40,
|
||
},
|
||
splitLine: {
|
||
show: false
|
||
}
|
||
}
|
||
],
|
||
// Declare several bar series, each will be mapped
|
||
// to a column of dataset.source by default.
|
||
series: [
|
||
|
||
{type: 'bar',
|
||
yAxisIndex: 0,
|
||
label: {
|
||
show: false,
|
||
position: 'top'
|
||
},},
|
||
{type: 'bar',
|
||
yAxisIndex: 0,
|
||
label: {
|
||
show: false,
|
||
position: 'top'
|
||
},},
|
||
{type: 'bar',
|
||
yAxisIndex: 0,
|
||
label: {
|
||
show: false,
|
||
position: 'top'
|
||
},}
|
||
]
|
||
};
|
||
chartbarChannels.setOption(optionChannels);
|
||
|
||
|
||
var channelsSource1 = new Array();
|
||
channelsSource1[0] = ['product', '合同总数量'];
|
||
if(channels!=null && channels.length>0){
|
||
for(var i=0;i<channels.length;i++){
|
||
var contract=0;
|
||
var contractamount=0;
|
||
var amountpaid=0;
|
||
var contractList = channels[i].contractList;
|
||
if(contractList!=null && contractList.length>0){
|
||
contract = contractList.length;
|
||
|
||
}
|
||
channelsSource1[i+1] = [channels[i].name, contract];
|
||
}
|
||
}
|
||
var chartbarChannels1 = echarts.init(document.getElementById('channels1'));
|
||
var optionChannels1 = {
|
||
legend: {},
|
||
tooltip: {},
|
||
dataset: {
|
||
source: channelsSource1
|
||
},
|
||
xAxis: {type: 'category'},
|
||
yAxis: [
|
||
{
|
||
type: 'value',
|
||
name:'数量',
|
||
splitLine: {
|
||
show: false
|
||
}
|
||
}
|
||
],
|
||
// Declare several bar series, each will be mapped
|
||
// to a column of dataset.source by default.
|
||
series: [
|
||
{type: 'bar',
|
||
label: {
|
||
show: false,
|
||
position: 'top'
|
||
},}
|
||
]
|
||
};
|
||
chartbarChannels1.setOption(optionChannels1);
|
||
});
|
||
|
||
}
|
||
$(function() {
|
||
$("#reservationtime2").change(function(){
|
||
console.log("123");
|
||
dosearch();
|
||
});
|
||
//简易公司combotree
|
||
initDate2();
|
||
$.post(ext.contextPath + "/user/showCompanySelectTree.do", {}, function (data) {
|
||
$('#companySelectTree').html(data);
|
||
});
|
||
|
||
var height = $(window).height();
|
||
$("#class").css("height",(height*0.3)+'px');
|
||
$("#class1").css("height",(height*0.3)+'px');
|
||
$("#channels").css("height",(height*0.3)+'px');
|
||
$("#channels1").css("height",(height*0.3)+'px');
|
||
//状态
|
||
// $.post(ext.contextPath + "/sparepart/contract/getContractCheckForSelect.do", {}, function(data) {
|
||
|
||
|
||
var typeStatusArr = [
|
||
{"id":"1","text":"已完成"},
|
||
{"id":"0","text":"未完成"},
|
||
|
||
];
|
||
var selelct123 =$("#status4list1").select2({
|
||
data: typeStatusArr,
|
||
placeholder:'请选择',//默认文字提示
|
||
allowClear: true,//允许清空
|
||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||
language: "zh-CN",
|
||
minimumInputLength: 0,
|
||
minimumResultsForSearch: 10,//数据大于10个启用搜索框
|
||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||
});
|
||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
|
||
selelct123.val('').trigger("change");
|
||
selelct123.on("change",function(e){
|
||
$("#table").bootstrapTable('refresh');
|
||
$("#tableall").bootstrapTable('refresh');
|
||
showFun();
|
||
});
|
||
|
||
// },'json');
|
||
//供应商
|
||
$.post(ext.contextPath + "/sparepart/supplier/getSupplier4Select.do", {}, function(data) {
|
||
|
||
var selelct1supplierid =$("#supplierid").select2({
|
||
data: data,
|
||
placeholder:'请选择',//默认文字提示
|
||
allowClear: true,//允许清空
|
||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||
language: "zh-CN",
|
||
minimumInputLength: 0,
|
||
minimumResultsForSearch: 10,//数据大于10个启用搜索框
|
||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||
});
|
||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
|
||
selelct1supplierid.val('').trigger("change");
|
||
selelct1supplierid.on("change",function(e){
|
||
$("#table").bootstrapTable('refresh');
|
||
$("#tableall").bootstrapTable('refresh');
|
||
showFun();
|
||
});
|
||
},'json');
|
||
|
||
|
||
|
||
$("#contractstartdate").datepicker({
|
||
language: 'zh-CN',
|
||
autoclose: true,
|
||
todayHighlight: true,
|
||
format:'yyyy-mm',
|
||
startView: 'months',
|
||
maxViewMode:'years',
|
||
minViewMode:'months'
|
||
}).on('changeDate',function(e){
|
||
dosearch();
|
||
showFun();
|
||
});
|
||
|
||
//选择合同类型
|
||
$.post(ext.contextPath + "/sparepart/contractClass/getContractClass4Select.do", function(data) {
|
||
var selelct222 = $("#contractclassid").select2({
|
||
data: data,
|
||
placeholder:'请选择',//默认文字提示
|
||
allowClear: true,//允许清空
|
||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||
language: "zh-CN",
|
||
minimumInputLength: 0,
|
||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||
});
|
||
selelct222.val('').trigger("change");
|
||
selelct222.on("change",function(e){
|
||
$("#table").bootstrapTable('refresh');
|
||
$("#tableall").bootstrapTable('refresh');
|
||
showFun();
|
||
});
|
||
},'json');
|
||
|
||
//选择列资渠道
|
||
$.post(ext.contextPath + "/sparepart/channels/getChannels4Select.do", function(data) {
|
||
var selelct = $("#channelsId").select2({
|
||
data: data,
|
||
placeholder:'请选择',//默认文字提示
|
||
allowClear: true,//允许清空
|
||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||
language: "zh-CN",
|
||
minimumInputLength: 0,
|
||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||
});
|
||
selelct.val('').trigger("change");
|
||
selelct.on("change",function(e){
|
||
$("#table").bootstrapTable('refresh');
|
||
$("#tableall").bootstrapTable('refresh');
|
||
showFun();
|
||
});
|
||
},'json');
|
||
});
|
||
var initFun = function(){
|
||
|
||
$("#table").bootstrapTable({ // 对应table标签的id
|
||
url: ext.contextPath + '/sparepart/contract/getSummaryList.do', // 获取表格数据的url
|
||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||
sidePagination: 'client', // 设置为服务器端分页
|
||
queryParams: queryParamsFun,
|
||
sortName: 'id', // 要排序的字段
|
||
sortOrder: 'desc', // 排序规则
|
||
toolbar: '#action', //工具按钮用哪个容器
|
||
//导出配置,使用需要单独引用js
|
||
//是否显示导出按钮
|
||
showExport: true,
|
||
//导出表格方式(默认basic:只导出当前页的表格数据;all:导出所有数据;selected:导出选中的数据)
|
||
exportDataType: "all",
|
||
//导出文件类型
|
||
exportTypes: ['excel'],
|
||
exportOptions:{
|
||
worksheetName: '合同信息', //表格工作区名称
|
||
fileName: '导出合同信息'
|
||
},
|
||
//end
|
||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||
viewFun(row.id);
|
||
},
|
||
columns: [
|
||
{
|
||
field: 'contractcount', // 返回json数据中的name
|
||
title: '合同数量', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'sign', // 返回json数据中的name
|
||
title: '在签合同数量', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'implement', // 返回json数据中的name
|
||
title: '在执行合同数量', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'completionrate', // 返回json数据中的name
|
||
title: '合同完成率', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'paymentrate', // 返回json数据中的name
|
||
title: '合同支付率', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'contractamounttotle', // 返回json数据中的name
|
||
title: '合同总金额', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'paymentamounttotle', // 返回json数据中的name
|
||
title: '已付总金额', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
title: '未付总金额', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
formatter:function (value, row, index){
|
||
return (row.contractamounttotle-row.paymentamounttotle);
|
||
}
|
||
}
|
||
],
|
||
onLoadSuccess: function(){ //加载成功时执行
|
||
adjustBootstrapTableView("table");
|
||
},
|
||
onLoadError: function(){ //加载失败时执行
|
||
console.info("加载数据失败");
|
||
}
|
||
});
|
||
|
||
|
||
$("#tableall").bootstrapTable({ // 对应table标签的id
|
||
url: ext.contextPath + '/sparepart/contract/getList.do', // 获取表格数据的url
|
||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||
striped: true, //表格显示条纹,默认为false
|
||
pagination: true, // 在表格底部显示分页组件,默认false
|
||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||
pageSize: 10, // 页面数据条数
|
||
pageNumber: 1, // 首页页码
|
||
sidePagination: 'server', // 设置为服务器端分页
|
||
showColumns:true,
|
||
queryParams: queryParamsFun,
|
||
//导出配置,使用需要单独引用js
|
||
//是否显示导出按钮
|
||
showExport: true,
|
||
//导出表格方式(默认basic:只导出当前页的表格数据;all:导出所有数据;selected:导出选中的数据)
|
||
exportDataType: "all",
|
||
//导出文件类型
|
||
exportTypes: ['excel'],
|
||
exportOptions:{
|
||
worksheetName: '合同信息', //表格工作区名称
|
||
fileName: '导出合同信息'
|
||
},
|
||
sortName: 'id', // 要排序的字段
|
||
sortOrder: 'desc', // 排序规则
|
||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||
viewFun(row.id);
|
||
},
|
||
columns: [
|
||
{
|
||
field: 'contractnumber', // 返回json数据中的name
|
||
title: '合同编号', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
width:'150px',
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'contractname', // 返回json数据中的name
|
||
title: '合同名称', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
width:'100px',
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'contractclassName', // 返回json数据中的name
|
||
title: '合同类型', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
width:'100px',
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'agentName', // 返回json数据中的name
|
||
title: '经办人', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
width:'100px',
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'contractamount', // 返回json数据中的name
|
||
title: '合同金额', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
width:'100px',
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'contractstartdate', // 返回json数据中的name
|
||
title: '开始日期', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
width:'100px',
|
||
formatter:function (value, row, index){
|
||
return value.substring(0,10);
|
||
}
|
||
},{
|
||
field: 'contractenddate', // 返回json数据中的name
|
||
title: '结束日期', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
width:'100px',
|
||
formatter:function (value, row, index){
|
||
return value.substring(0,10);
|
||
}
|
||
},{
|
||
field: 'contracttaxrateName', // 返回json数据中的name
|
||
title: '合同税率', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
width:'100px',
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'supplierName', // 返回json数据中的name
|
||
title: '供应商', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
width:'250px',
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'purchasemethodsName', // 返回json数据中的name
|
||
title: '采购形式', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
width:'100px',
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'purchaseName', // 返回json数据中的name
|
||
title: '采购申请单', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
width:'100px',
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'contractamount', // 返回json数据中的name
|
||
title: '合同金额(元)', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
width:'100px',
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: '_totalinvoice', // 返回json数据中的name
|
||
title: '开票金额', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
width:'100px',
|
||
valign: 'middle',
|
||
},{
|
||
field: '_totalpayment', // 返回json数据中的name
|
||
title: '付款金额', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
width:'100px',
|
||
valign: 'middle',
|
||
},{
|
||
field: '_nototalpayment', // 返回json数据中的name
|
||
title: '未付数', // 表格表头显示文字
|
||
width:'100px',
|
||
align: 'center', // 左右居中
|
||
valign: 'middle',
|
||
},{
|
||
field: 'performancebond', // 返回json数据中的name
|
||
title: '履约保证金', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
width:'100px',
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'warrantydeposit', // 返回json数据中的name
|
||
title: '质保金(%)', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
width:'100px',
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'qualitydeposit', // 返回json数据中的name
|
||
title: '质保金(元)', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
width:'100px',
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'warrantyperiod', // 返回json数据中的name
|
||
title: '质保期(年)', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
width:'100px',
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'supplyplanstartdate', // 返回json数据中的name
|
||
title: '供货计划开始日期', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
width:'100px',
|
||
valign: 'middle', // 上下居中
|
||
formatter:function (value, row, index){
|
||
return value.substring(0,10);
|
||
}
|
||
},{
|
||
field: 'supplyplanenddate', // 返回json数据中的name
|
||
title: '供货计划结束日期', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
width:'100px',
|
||
formatter:function (value, row, index){
|
||
return value.substring(0,10);
|
||
}
|
||
},{
|
||
field: 'supplyactualstartdate', // 返回json数据中的name
|
||
title: '供货实际开始日期', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
width:'100px',
|
||
valign: 'middle', // 上下居中
|
||
formatter:function (value, row, index){
|
||
return value.substring(0,10);
|
||
}
|
||
},{
|
||
field: 'supplyactualenddate', // 返回json数据中的name
|
||
title: '供货实际结束日期', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
width:'100px',
|
||
valign: 'middle', // 上下居中
|
||
formatter:function (value, row, index){
|
||
return value.substring(0,10);
|
||
}
|
||
},{
|
||
field: 'remark', // 返回json数据中的name
|
||
title: '备注', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
width:'100px',
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'status', // 返回json数据中的name
|
||
title: '状态', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
width:'100px',
|
||
valign: 'middle', // 上下居中
|
||
formatter: function (value, row, index){
|
||
switch (value){
|
||
case '${STATUS_CONTRACT_START}' :
|
||
return "发起合同";
|
||
case '${STATUS_CONTRACT_DEPT_AUDIT}' :
|
||
return "部门审核";
|
||
case '${STATUS_CONTRACT_DEPT_REJECT}' :
|
||
return "部门审核驳回";
|
||
case '${STATUS_CONTRACT_AUDIT}' :
|
||
return "领导审核";
|
||
case '${STATUS_CONTRACT_REJECT}' :
|
||
return "领导审核驳回";
|
||
case '${STATUS_CONTRACT_EXECUTE}' :
|
||
return "合同执行";
|
||
case '${STATUS_CONTRACT_FINISH}' :
|
||
return "合同完成";
|
||
default :
|
||
return value;
|
||
}
|
||
}
|
||
}
|
||
],
|
||
onLoadSuccess: function(){ //加载成功时执行
|
||
adjustBootstrapTableView("tableall");
|
||
|
||
},
|
||
onLoadError: function(){ //加载失败时执行
|
||
console.info("加载数据失败");
|
||
}
|
||
});
|
||
$('#tableall').bootstrapTable('hideColumn', 'supplyplanstartdate');
|
||
$('#tableall').bootstrapTable('hideColumn', 'remark');
|
||
$('#tableall').bootstrapTable('hideColumn', 'supplyactualenddate');
|
||
$('#tableall').bootstrapTable('hideColumn', 'supplyactualstartdate');
|
||
$('#tableall').bootstrapTable('hideColumn', 'supplyplanenddate');
|
||
$('#tableall').bootstrapTable('hideColumn', 'warrantyperiod');
|
||
$('#tableall').bootstrapTable('hideColumn', 'qualitydeposit');
|
||
$('#tableall').bootstrapTable('hideColumn', 'warrantydeposit');
|
||
$('#tableall').bootstrapTable('hideColumn', 'performancebond');
|
||
$('#tableall').bootstrapTable('hideColumn', 'contractamount');
|
||
$('#tableall').bootstrapTable('hideColumn', 'purchaseName');
|
||
$('#tableall').bootstrapTable('hideColumn', 'purchasemethodsName');
|
||
$('#tableall').bootstrapTable('hideColumn', '_totalinvoice');
|
||
$('#tableall').bootstrapTable('hideColumn', '_totalpayment');
|
||
$('#tableall').bootstrapTable('hideColumn', '_nototalpayment');
|
||
}
|
||
|
||
var showUser4SelectsFun = function() {
|
||
var userIds= $("#agentid").val();
|
||
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"searchSummaryForm",hiddenId:"agentid",textId:"agentname",userIds:userIds} , function(data) {
|
||
$("#user4SelectDiv").html(data);
|
||
openModal("user4SelectModal");
|
||
});
|
||
};
|
||
|
||
function initDate2() {
|
||
//定义locale汉化插件
|
||
beginTimeStore2 = moment().subtract(6, 'days').format('YYYY-MM-DD');
|
||
endTimeStore2 = moment().subtract(-1, 'days').format('YYYY-MM-DD');
|
||
var locale = {
|
||
"format" : 'YYYY-MM-DD',
|
||
"separator" : " ~ ",
|
||
"applyLabel" : "确定",
|
||
"cancelLabel" : "取消",
|
||
"fromLabel" : "起始时间",
|
||
"toLabel" : "结束时间'",
|
||
"customRangeLabel" : "自定义",
|
||
"weekLabel" : "W",
|
||
"daysOfWeek" : [ "日", "一", "二", "三", "四", "五", "六" ],
|
||
"monthNames" : [ "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月",
|
||
"九月", "十月", "十一月", "十二月" ],
|
||
"firstDay" : 1
|
||
};
|
||
$('#reservationtime2').daterangepicker(
|
||
{
|
||
"timePicker" : false,
|
||
"timePicker24Hour" : false,
|
||
"linkedCalendars" : false,
|
||
"autoUpdateInput" : false,
|
||
"timePickerIncrement" : 10,
|
||
"locale" : locale,
|
||
//汉化按钮部分
|
||
ranges : {
|
||
'今日' : [ moment(), moment().subtract(-1, 'days') ],
|
||
'昨日' : [ moment().subtract(1, 'days'), moment() ],
|
||
'最近7日' : [ moment().subtract(6, 'days'),
|
||
moment().subtract(-1, 'days') ],
|
||
'本月' : [ moment().startOf('month'),
|
||
moment().endOf('month').subtract(-1, 'days') ],
|
||
'上月' : [
|
||
moment().subtract(1, 'month').startOf('month'),
|
||
moment().subtract(1, 'month').endOf('month')
|
||
.subtract(-1, 'days') ]
|
||
},
|
||
startDate : beginTimeStore2,
|
||
endDate : endTimeStore2
|
||
},
|
||
function(start, end, label) {
|
||
beginTimeStore2 = start.format(this.locale.format);
|
||
endTimeStore2 = end.format(this.locale.format);
|
||
if (!this.startDate) {
|
||
this.element.val('');
|
||
|
||
} else {
|
||
this.element.val(this.startDate
|
||
.format(this.locale.format)
|
||
+ this.locale.separator
|
||
+ this.endDate.format(this.locale.format));
|
||
}
|
||
});
|
||
$('#reservationtime2').val(
|
||
beginTimeStore2 + locale.separator + endTimeStore2);
|
||
|
||
//$('#reservationtime2').daterangepicker({autoUpdateInput:false})
|
||
};
|
||
var viewFun = function(id){
|
||
$.post(ext.contextPath + '/sparepart/contract/view.do', {id:id} , function(data) {
|
||
$("#subDiv").html(data);
|
||
openModal('subModal');
|
||
});
|
||
};
|
||
//查询方法,选择厂区后自动加载
|
||
var dosearch = function() {
|
||
$("#table").bootstrapTable('refresh');
|
||
$("#tableall").bootstrapTable('refresh');
|
||
showFun();
|
||
};
|
||
|
||
</script>
|
||
</head>
|
||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||
<div class="wrapper">
|
||
<!-- 引用top -->
|
||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||
<!-- 菜单栏 -->
|
||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||
<div class="content-wrapper">
|
||
<!-- Content Header (Page header) -->
|
||
<section class="content-header">
|
||
<h1 id ="head_title"></h1>
|
||
<ol class="breadcrumb">
|
||
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||
<!-- <li class="active">Here</li> -->
|
||
</ol>
|
||
</section>
|
||
<!-- Main content -->
|
||
<section class="content container-fluid">
|
||
<div id="mainAlertdiv"></div>
|
||
<div id="subDiv"></div>
|
||
<div id="subDetailDiv"></div>
|
||
<div id="Goods4SelectDiv"></div>
|
||
<div id="Goods4SelectsDiv"></div>
|
||
<div id="user4SelectDiv"></div>
|
||
<div id="fileInputDiv"></div>
|
||
<div id="goodsAddDiv"></div>
|
||
<div id="equ4SelectDiv"></div>
|
||
<div id="fault4SelectDiv"></div>
|
||
<div class="row">
|
||
<div class="col-xs-6">
|
||
<div class="box box-primary" >
|
||
<div class="box-header with-border">
|
||
<h4 class="box-title">合同类型</h4>
|
||
<div class="box-tools pull-right">
|
||
</div>
|
||
</div>
|
||
<div class="box-body " id="class">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-xs-6">
|
||
<div class="box box-primary" >
|
||
<div class="box-header with-border">
|
||
<h4 class="box-title">列资渠道</h4>
|
||
<div class="box-tools pull-right">
|
||
</div>
|
||
</div>
|
||
<div class="box-body " id="channels">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="row">
|
||
<div class="col-xs-6">
|
||
<div class="box box-primary" >
|
||
<div class="box-header with-border">
|
||
<h4 class="box-title">合同类型</h4>
|
||
<div class="box-tools pull-right">
|
||
</div>
|
||
</div>
|
||
<div class="box-body " id="class1">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-xs-6">
|
||
<div class="box box-primary" >
|
||
<div class="box-header with-border">
|
||
<h4 class="box-title">列资渠道</h4>
|
||
<div class="box-tools pull-right">
|
||
</div>
|
||
</div>
|
||
<div class="box-body " id="channels1">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="row">
|
||
<div class="col-xs-12">
|
||
<form id="searchSummaryForm">
|
||
<div >
|
||
<div id="companySelectTree" style="float:left;"></div>
|
||
<div class="form-group pull-right form-inline" style="margin-bottom: 0px;" id="action">
|
||
<!-- <div class="input-group input-group-sm" style="line-height: 30px">
|
||
<label class="form-label" style="margin-bottom:0;">时间:</label>
|
||
<input type="text" class="form-control pull-right" id="contractstartdate" name ="contractstartdate" style="width: 120px;" >
|
||
</div>-->
|
||
<div class="box-tools pull-right">
|
||
<div class="input-group pull-left input-group-sm">
|
||
<label style="padding-top:4px">时间范围:</label> <input type="text"
|
||
class="form-control pull-right" id="reservationtime2"
|
||
style="width:160px">
|
||
<div class="input-group-btn" style="line-height: 30px">
|
||
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="input-group input-group-sm" style="line-height: 30px">
|
||
<label class="form-label" style="margin-bottom:0;">合同类型:</label>
|
||
<select class="form-control select2 pull-right" id="contractclassid" name ="contractclassid" style="width: 160px;"></select>
|
||
</div>
|
||
<div class="input-group input-group-sm" style="line-height: 30px">
|
||
<label class="form-label" style="margin-bottom:0;">供应商:</label>
|
||
<select class="form-control select2 pull-right" id="supplierid" name ="supplierid" style="width: 160px;"></select>
|
||
</div>
|
||
<div class="input-group input-group-sm" style="line-height: 30px">
|
||
<label class="form-label" style="margin-bottom:0;">列资渠道:</label>
|
||
<select class="form-control select2 pull-right" id="channelsId" name ="channelsid" style="width: 160px;"></select>
|
||
</div>
|
||
<div class="input-group input-group-sm">
|
||
<label class="form-label">合同状态:</label>
|
||
<select class="form-control select2 " id="status4list1" name ="status4list1" style="width: 160px;"></select>
|
||
</div>
|
||
<!-- <div class="input-group input-group-sm" style="line-height: 30px">
|
||
<label class="form-label" style="margin-bottom:0;">经办人:</label>
|
||
<input type="text" class="form-control pull-right" id="agentname" name ="agentname"
|
||
placeholder="点击选择" style="width: 160px;" onclick="showUser4SelectsFun();" value="">
|
||
<input id="agentid" name="agentid" type="hidden" value="" />
|
||
</div> -->
|
||
<div class="input-group input-group-sm" style="width: 250px;">
|
||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" placeholder="合同编号/名称/经办人">
|
||
<div class="input-group-btn" style="line-height: 30px">
|
||
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
<table id="table"></table>
|
||
<br>
|
||
<table id="tableall"></table>
|
||
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<!-- /.content -->
|
||
</div>
|
||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||
</div>
|
||
</body>
|
||
<!-- 引入daterangepicker-->
|
||
<link rel="stylesheet"
|
||
href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css" />
|
||
<script type="text/javascript"
|
||
src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||
charset="utf-8"></script>
|
||
<script type="text/javascript"
|
||
src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||
charset="utf-8"></script>
|
||
</html> |