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
91
92
93
94
95
/**
 * 通知管理初始化
 */
var HasCollectOrderDetail = {
    id: "HasCollectOrderDetailTable",    //表格id
    seItem: null,        //选中的条目
    table: null,
    layerIndex: -1
};
 
/**
 * 初始化表格的列
 */
HasCollectOrderDetail.initColumn = function () {
    return [
        {field: 'selectItem', radio: false, visible: false},
        {title: '序号', field: 'id', align: 'center', valign: 'middle'},
        {title: '时间', field: 'endServiceTime', align: 'center', valign: 'middle'},
        {title: '订单类型', field: 'orderType', align: 'center', valign: 'middle'},
        {title: '订单ID', field: 'orderNum', align: 'center', valign: 'middle'},
        {title: '订单金额', field: 'orderMoney', align: 'center', valign: 'middle'},
        {title: '收益金额', field: 'driverOrderEarningMoney', align: 'center', valign: 'middle'}
    ];
};
 
 
/**
 * 检查是否选中
 */
HasCollectOrderDetail.check = function () {
    var selected = $('#' + this.id).bootstrapTable('getSelections');
    if (selected.length == 0) {
        Feng.info("请先选中表格中的某一记录!");
        return false;
    } else {
        HasCollectOrderDetail.seItem = selected[0];
        return true;
    }
};
 
 
 
/**
 * 导出
 */
HasCollectOrderDetail.excel = function(){
    if (this.check()){
 
        ///    批量选中
        var ids = Feng.checkBoxIds("#"+this.id);  //(产生以逗号隔开的id字符串集)
 
        window.location.href=Feng.ctxPath + "/spendingDetailPlatform/exportRecordxxx?driverId=" + $("#driverId").val() + "&ids=" + ids;
    }
};
 
 
/**
 * 全部导出
 */
HasCollectOrderDetail.excelAll = function(){
    window.location.href=Feng.ctxPath + "/spendingDetailPlatform/exportRecordxxx?driverId=" + $("#driverId").val() + "&ids=All";
};
 
 
 
 
/**
 * 查询通知列表
 */
HasCollectOrderDetail.search = function () {
    var queryData = {};
    queryData['orderNum'] = $("#orderNum").val();
    queryData['endServiceTime'] = $("#endServiceTime").val();
    queryData['orderType'] = $("#orderType").val();
    HasCollectOrderDetail.table.refresh({query: queryData});
};
 
HasCollectOrderDetail.resetSearch = function () {
    $("#orderNum").val("");
    $("#endServiceTime").val("");
    $("#orderType").val("");
    HasCollectOrderDetail.search();
};
 
$(function () {
    var defaultColunms = HasCollectOrderDetail.initColumn();
    var table = new BSTable(HasCollectOrderDetail.id, "/spendingDetailPlatform/HasCollectOrderDetailList", defaultColunms);
    // table.setPaginationType("server");
    table.setPaginationType("client");
 
    var queryData = {};
    queryData['driverId'] = $("#driverId").val();
    table.setQueryParams(queryData);
    HasCollectOrderDetail.table = table.init();
});