60 lines
1.8 KiB
JavaScript
60 lines
1.8 KiB
JavaScript
let form, table, element, util;
|
|
let tableIns;
|
|
let pageNum = 1; // 定义分页
|
|
let currentTabId = '2'
|
|
layui.use(["form", "table", "element", "laydate", "util"], function () {
|
|
form = layui.form;
|
|
table = layui.table;
|
|
element = layui.element;
|
|
laydate = layui.laydate;
|
|
util = layui.util;
|
|
// tab 切换事件
|
|
element.on('tab(demo-filter-tab)', function (data) {
|
|
let value = $(this).attr('value');
|
|
currentTabId = value;
|
|
getDataPreviewData();
|
|
});
|
|
$('#refreshTime').html(getNowDate());
|
|
initData();
|
|
});
|
|
|
|
function initData() {
|
|
getDataPreviewData();
|
|
getVehiclesUsedNum();
|
|
getProRanking();
|
|
getSupStatistics();
|
|
getLeaseMoneyByCar();
|
|
getLeaseMoneyByCrane();
|
|
}
|
|
|
|
// 刷新数据
|
|
function refreshData() {
|
|
myChart.dispose();
|
|
myChart = echarts.init(document.getElementById('echarts-one'));
|
|
myChart2.dispose();
|
|
myChart2 = echarts.init(document.getElementById('echarts-two'));
|
|
myChart3.dispose();
|
|
myChart3 = echarts.init(document.getElementById('echarts-three'));
|
|
$('#refreshTime').html(getNowDate());
|
|
initData();
|
|
}
|
|
|
|
// 详情
|
|
function branchSettlementDetail(obj) {
|
|
openIframeByParamObj("branchSettlementDetail", "分公司详情", "./child/branch_settlement_detail.html", "92%", "95%", obj);
|
|
}
|
|
|
|
// 数据概览详情
|
|
function openDetail(type,notUse) {
|
|
let obj = { type: type };
|
|
obj.currentTabId = currentTabId;
|
|
obj.notUse = notUse;
|
|
if(notUse){
|
|
// 用车数量、供应商统计、工程统计、租赁金额(运输车辆)、租赁金额(吊车)忽略年度查询
|
|
obj.currentTabId = ''
|
|
}
|
|
let titleArr = ['工程详情', '需求计划详情', '派车详情', '派车详情', '派车详情', '派车详情'];
|
|
openIframeByParamObj("dataDetail", titleArr[type - 1], "../welcome/data_detail_list.html", "92%", "95%", obj);
|
|
}
|
|
|