xuhy
2025-08-29 e59d2141bc8f9bee8b569deaa54158b3759c431e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/**
 * 司机收益管理初始化
 */
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();
});