xuhy
2025-01-09 712f70b2936079a131ecb1e63c6d337171618cad
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
/**
 * 提现列表管理初始化
 */
var ComplaintDeductmoney = {
    id: "ComplaintDeductmoneyTable",    //表格id
    seItem: null,        //选中的条目
    table: null,
    layerIndex: -1
};
 
/**
 * 初始化表格的列
 */
ComplaintDeductmoney.initColumn = function () {
    return [
        {field: 'selectItem',visible: false, radio: true},
        {title: '主键id', field: 'id', visible: true, align: 'center', valign: 'middle'},
        {title: '司机名称', field: 'userName', visible: true, align: 'center', valign: 'middle',
            formatter: function (value, row) {
                var btn = "";
                if(row.name != '' && row.name != null) {
                    btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.name + '" onfocus="TUser.tooltip()">' + row.name + '</p>']
                }
                return btn;
            }
        },
        {title: '处罚时间', field: 'createTime', visible: true, align: 'center', valign: 'middle',width:'10%',
            formatter: function (value, row) {
                var btn = "";
                if(row.createTime != '' && row.createTime != null) {
                    var time = row.createTime.replace(" ",'<br>');
                    btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.createTime + '" onfocus="TUser.tooltip()">' + time + '</p>']
                }
                return btn;
            }
        },
 
        {title: '司机电话', field: 'phone', visible: true, align: 'center', valign: 'middle'},
        {title: '投诉扣款', field: 'money', visible: true, align: 'center', valign: 'middle',
            formatter: function (value,row) {
                return row.money;
            }
        }
    ];
};
 
 
/**
 * 查询提现列表列表
 */
ComplaintDeductmoney.search = function () {
    var queryData = {};
    queryData['insertTime'] = $("#insertTime").val();
    queryData['ids'] = $("#userId").val();
    ComplaintDeductmoney.table.refresh({query: queryData});
};
 
ComplaintDeductmoney.resetSearch = function () {
    $("#insertTime").val("");
    $("#userName").val("");
    $("#userId").val("");
    ComplaintDeductmoney.search();
};
 
ComplaintDeductmoney.toSelectOpt = function () {
    var index = layer.open({
        type: 2,
        title: '选择司机',
        area: ['90%', '80%'], //宽高
        fix: false, //不固定
        maxmin: true,
        content: Feng.ctxPath + '/report/driver'
    });
    this.layerIndex = index;
}
 
function selectOpt(ids,names){
    $("#userName").val(names);
    $("#userId").val(ids);
}
///  导出
ComplaintDeductmoney.excel = function(){
    var arr = $("#insertTime").val();
    window.location.href = Feng.ctxPath + "/report/exportComplaintDeductmoney?ids=" + $("#userId").val() + "&insertTime=" + arr;
};
$(function () {
    var defaultColunms = ComplaintDeductmoney.initColumn();
    var table = new BSTable(ComplaintDeductmoney.id, "/report/complaintDeductmoneyList", defaultColunms);
    table.setPaginationType("server");
    ComplaintDeductmoney.table = table.init();
});