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