nickchange
2023-12-05 9f66f1772e9a2499c030d89479242457b5f9aafd
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
/**
 * 角色管理的单例
 */
var SubscribeMessage = {
    id: "subscribeMessageTable",    //表格id
    seItem: null,        //选中的条目
    table: null,
    layerIndex: -1
};
 
/**
 * 初始化表格的列
 */
SubscribeMessage.initColumn = function () {
    var columns = [
        {field: 'select_item', radio: true},
        {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'},
        {title: '会员ID', field: 'code', align: 'center', valign: 'middle', width: '150px'},
        {title: '用户手机号', field: 'phone', align: 'center', valign: 'middle', width: '150px',
            formatter: function (value, row) {
                return '<span title="' + value + '">' + value + '</span>'
            }
        },
        {title: '微信昵称', field: 'nickname', align: 'center', valign: 'middle', width: '200px'},
        {title: '模板ID', field: 'priTmplId', align: 'center', valign: 'middle', width: '300px',
            formatter: function (value, row) {
                value = value.replaceAll("\n", '<br/>')
                return '<span title="' + value + '">' + value + '</span>'
            }
        },
        {title: '模板标题', field: 'title', align: 'center', valign: 'middle', width: '150px'},
        {title: '有效授权次数', field: 'totalNumber', align: 'center', valign: 'middle', width: '100px'},
        {title: '剩余可用次数', field: 'laveNumber', align: 'center', valign: 'middle', width: '100px'}
    ]
    return columns;
};
 
 
/**
 * 检查是否选中
 */
SubscribeMessage.check = function () {
    var selected = $('#' + this.id).bootstrapTable('getSelections');
    if (selected.length == 0) {
        Feng.info("请先选中表格中的某一记录!");
        return false;
    } else {
        SubscribeMessage.seItem = selected[0];
        return true;
    }
};
 
 
 
SubscribeMessage.deriveSubscribeMessageUser = function(){
    let memberid = $("#memberid").val();
    let phone = $("#phone").val();
    let title = $("#title").val();
    let priTmplId = $("#priTmplId").val();
    window.location.href = Feng.ctxPath + "/subscribeMessage/deriveSubscribeMessageUser?memberid=" + memberid + "&phone=" + phone + "&title=" + title + "&priTmplId=" + priTmplId;
}
 
 
 
 
 
 
/**
 * 搜索角色
 */
SubscribeMessage.search = function () {
    var queryData = {};
    queryData['memberid'] = $("#memberid").val();
    queryData['phone'] = $("#phone").val();
    queryData['title'] = $("#title").val();
    queryData['priTmplId'] = $("#priTmplId").val();
    SubscribeMessage.table.refresh({query: queryData});
}
 
SubscribeMessage.resetSearch = function(){
    $("#memberid").val('');
    $("#phone").val('');
    $("#title").val('');
    $("#priTmplId").val('');
    SubscribeMessage.search();
}
 
$(function () {
    var defaultColunms = SubscribeMessage.initColumn();
    var table = new BSTable(SubscribeMessage.id, "/subscribeMessage/querySubscribeMessageUserList", defaultColunms);
    table.setPaginationType("server");
    table.init();
    SubscribeMessage.table = table;
});