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
/**
 * 通知管理初始化
 */
var CompanyIncome = {
    id: "CompanyIncomeTable",    //表格id
    seItem: null,        //选中的条目
    table: null,
    layerIndex: -1
};
 
/**
 * 初始化表格的列
 */
CompanyIncome.initColumn = function () {
    return [
        {field: 'selectItem',visible: false, radio: true},
        {title: 'id', field: 'id', visible: true, align: 'center', valign: 'middle'},
        {title: '公司名称', field: 'name', align: 'center', valign: 'middle'},
        {title: '收益金额', field: 'money', align: 'center', valign: 'middle'},
    ];
};
 
 
 
///  导出
CompanyIncome.excel = function(){
    var arr = $("#insertTime").val();
    window.location.href = Feng.ctxPath + "/report/exportCompanyIncome?ids=" + $("#userId").val() + "&insertTime=" + arr;
};
 
 
 
/**
 * 查询通知列表
 */
CompanyIncome.search = function () {
    var queryData = {};
    queryData['ids'] = $("#userId").val();
    var arr = $("#insertTime").val();
    queryData['insertTime'] = arr;
    CompanyIncome.table.refresh({query: queryData});
};
 
 
CompanyIncome.toSelectOpt = function () {
    var index = layer.open({
        type: 2,
        title: '选择分公司',
        area: ['90%', '80%'], //宽高
        fix: false, //不固定
        maxmin: true,
        content: Feng.ctxPath + '/report/company'
    });
    this.layerIndex = index;
}
 
function selectOpt(ids,names){
    $("#userName").val(names);
    $("#userId").val(ids);
}
 
 
CompanyIncome.resetSearch = function () {
    $("#insertTime").val("");
    $("#userId").val("");
    $("#userName").val("");
    CompanyIncome.search();
};
$(function () {
    var defaultColunms = CompanyIncome.initColumn();
    var table = new BSTable(CompanyIncome.id, "/report/companyIncomeList", defaultColunms);
    table.setPaginationType("server");
    CompanyIncome.table = table.init();
});