yanghb
2023-04-10 b2f678ad387ca24e05a11100ea4583f0f2f730f0
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
/**
 * 通知管理初始化
 */
var TimeOut = {
    id: "TimeOutTable",    //表格id
    seItem: null,        //选中的条目
    table: null,
    layerIndex: -1
};
 
/**
 * 初始化表格的列
 */
TimeOut.initColumn = function () {
    return [
        {field: 'selectItem',visible: false, radio: true},
        {title: '扣款时间', field: 'endServiceTime', align: 'center', valign: 'middle'},
        {title: '退款时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'},
        {title: '订单ID', field: 'id', visible: true, align: 'center', valign: 'middle'},
        {title: '订单类型', field: 'type', align: 'center', valign: 'middle',
            formatter: function (value, row) {
                if(value==4){
                    return "同城物流";
                }else if(value==5){
                    return "跨城物流";
                }
            }
        },
        {title: '司机名称', field: 'name', align: 'center', valign: 'middle'},
        {title: '司机手机号', field: 'phone', align: 'center', valign: 'middle'},
        {title: '平台收益金额', field: 'companyMoney', align: 'center', valign: 'middle'},
        {title: '扣款金额', field: 'timeOutMoney', align: 'center', valign: 'middle'},
        {title: '退款金额', field: 'returnMoney', align: 'center', valign: 'middle'},
        {title: '状态', field: 'returnMoney', align: 'center', valign: 'middle',
            formatter: function (value, row) {
                if(row.id!="合计"){
                    if(value==null){
                        return "已扣款";
                    }else{
                        return "已退款";
                    }
                }
            }
        }
    ];
};
 
 
 
///  导出
TimeOut.excel = function(){
    window.location.href = Feng.ctxPath + "/incomeDetail/exportTimeOut?id=" + $("#id").val() + "&insertTime=" + $("#insertTime").val()
        + "&name=" + $("#name").val()
        + "&phone=" + $("#phone").val()
        + "&orderType=" + $('#orderType').val()
    ;
};
 
 
 
/**
 * 查询通知列表
 */
TimeOut.search = function () {
    var queryData = {};
    queryData['id'] = $("#id").val();
    queryData['name'] = $("#name").val();
    queryData['phone'] = $("#phone").val();
    queryData['orderType'] = $('#orderType').val();
    var arr = $("#insertTime").val();
    queryData['insertTime'] = arr;
    TimeOut.table.refresh({query: queryData});
};
 
 
 
TimeOut.resetSearch = function () {
    $("#insertTime").val("");
    $("#id").val("");
    $("#name").val("");
    $("#phone").val("");
    $('#orderType').val('');
    TimeOut.search();
};
$(function () {
    var defaultColunms = TimeOut.initColumn();
    var table = new BSTable(TimeOut.id, "/incomeDetail/timeOutList", defaultColunms);
    table.setPaginationType("server");
    TimeOut.table = table.init();
});