/**
|
* 司机收益管理初始化
|
*/
|
var DriverIncomelData = {
|
id: "TDriverIncomeTable", //表格id
|
seItem: null, //选中的条目
|
table: null,
|
layerIndex: -1
|
};
|
/**
|
* 初始化表格的列
|
*/
|
DriverIncomelData.initColumn = function () {
|
return [
|
{field: 'selectItem', radio: true},
|
{title: '主键id', field: 'id', visible: false, align: 'center', valign: 'middle'},
|
{title: '姓名', field: 'driverName', visible: true, align: 'center', valign: 'middle',width:'100px'},
|
{title: '账号/手机号', field: 'driverPhone', visible: true, align: 'center', valign: 'middle',width:'100px'},
|
{title: '所属分公司', field: 'companyName', visible: true, align: 'center', valign: 'middle',width:'100px'},
|
{title: '已完成订单数', field: 'privateCarTotalNum', visible: true,sortable : true, align: 'center', valign: 'middle',width:'100px'},
|
{title: '订单总金额', field: 'privateCarTotalMoney', visible: true,sortable : true, align: 'center', valign: 'middle',width:'100px'},
|
{title: '实付金额', field: 'payMoney', visible: true,sortable : true, align: 'center', valign: 'middle',width:'100px'},
|
{title: '司机收入', field: 'driverMoney', visible: true,sortable : true, align: 'center', valign: 'middle',width:'100px'},
|
{title: '平台手续费', field: 'platformMoney', visible: true,sortable : true, align: 'center', valign: 'middle',width:'100px'},
|
|
]
|
};
|
|
|
/**
|
* 查询车辆品牌管理列表
|
*/
|
DriverIncomelData.search = function () {
|
// 统计
|
var ajax = new $ax(Feng.ctxPath + "/report/queryDriverIncomeDataSum", function (data) {
|
// 将金额设置进label文本
|
$("#totalOrderCount").text(data.totalOrderCount);
|
$("#totalPayMoney").text(data.totalPayMoney);
|
$("#totalIncome").text(data.totalIncome);
|
$("#totalPlatformMoney").text(data.totalPlatformMoney);
|
}, function (data) {
|
});
|
ajax.set("driverName",$("#driverName").val());
|
ajax.set("time",$("#time").val());
|
ajax.set("companyId",$("#company").val());
|
ajax.start();
|
var queryData = {};
|
queryData['driverName'] = $("#driverName").val();
|
queryData['time'] = $("#time").val();
|
queryData['companyId'] = $("#company").val();
|
DriverIncomelData.table.refresh({query: queryData});
|
};
|
|
DriverIncomelData.resetSearch = function () {
|
$("#driverName").val("");
|
$("#time").val("");
|
$("#company").val("");
|
DriverIncomelData.search();
|
};
|
|
DriverIncomelData.downloadExcel=function(){
|
var operation = function() {
|
window.location.href = Feng.ctxPath + "/report/downloadDriverIncomeData?type=" + $('#type').val() + "&time=" + $("#time").val() + "&companyId=" + $("#company").val();
|
};
|
Feng.confirm("是否确认导出收益信息?", operation);
|
}
|
|
$(function () {
|
|
var defaultColunms = DriverIncomelData.initColumn();
|
var table = new BSTable(DriverIncomelData.id, "/report/queryDriverIncomeData", defaultColunms);
|
table.setPaginationType("server");
|
table.setQueryParams({
|
type: 1,
|
time: rangeDate
|
})
|
console.log("统计统计统计统计统计统计统计")
|
// 统计
|
var ajax = new $ax(Feng.ctxPath + "/report/queryDriverIncomeDataSum", function (data) {
|
// 将金额设置进label文本
|
$("#totalOrderCount").text(data.totalOrderCount);
|
$("#totalPayMoney").text(data.totalPayMoney);
|
$("#totalIncome").text(data.totalIncome);
|
$("#totalPlatformMoney").text(data.totalPlatformMoney);
|
}, function (data) {
|
});
|
ajax.set("driverName",$("#driverName").val());
|
ajax.set("time",$("#time").val());
|
ajax.set("companyId",$("#company").val());
|
ajax.start();
|
DriverIncomelData.table = table.init();
|
});
|