Pu Zhibing
7 天以前 4c99ee7028c3fe58a2cd4b8273b22c75c45574fc
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
/**
 * 司机收益管理初始化
 */
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: 'privateCarNotPayNum', visible: true,sortable : true, align: 'center', valign: 'middle',width:'100px'},
        {title: '取消订单数', field: 'privateCarcancelNum', 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: 'privateCarNotPayMoney', visible: true,sortable : true, align: 'center', valign: 'middle',width:'100px'},
        {title: '运营状态', field: 'driverState', visible: true, align: 'center', valign: 'middle',width:'100px',formatter: function (value,row) {
                if(row.driverState=='3'){
                    return '<span class="label label-primary">服务中</span>';
                }else if(row.driverState=='2'){
                    return '<span class="label label-warning">听单中</span>';
                }else if(row.driverState=='1'){
                    return '<span class="label label-error">离线</span>';
                }else{
                    return ''
                }
            }},
 
    ]
};
 
 
/**
 * 查询车辆品牌管理列表
 */
DriverIncomelData.search = function () {
    var queryData = {};
    queryData['type'] = $("#type").val();
    queryData['time'] = $("#time").val();
    queryData['companyId'] = $("#company").val();
    DriverIncomelData.table.refresh({query: queryData});
};
 
DriverIncomelData.resetSearch = function () {
    $("#type").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: $('#type').val(),
        time: rangeDate
    })
    DriverIncomelData.table = table.init();
});