刘帅
2026-09-21 3f45e8fdfa31d7b764d60a7c0cb5dd11944ed418
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
/**
 * 管理初始化
 */
var DriverApplyRefund = {
    id: "DriverApplyRefundTable",    //表格id
    seItem: null,        //选中的条目
    table: null,
    layerIndex: -1
};
 
/**
 * 初始化表格的列
 */
DriverApplyRefund.initColumn = function () {
    return [
        {field: 'selectItem', checkbox: true},
        {title: '', field: 'id', visible: false, align: 'center', valign: 'middle'},
        {title: '用户编号', field: 'userId', visible: true, align: 'center', valign: 'middle'},
        {title: '联系电话', field: 'phone', visible: true, align: 'center', valign: 'middle'},
        {title: '审核字段', field: 'type', visible: true, align: 'center', valign: 'middle',
            formatter: function (value, row) {
                switch (value) {
                    case 1:
                        return "昵称";
                    case 2:
                        return "头像";
 
                }
            }
        },
        {title: '头像', field: 'headImg', visible: true, align: 'center', valign: 'middle',
            formatter: function (value, row) {
                if (row.headImg == null || row.headImg == '') {
                    return '<button/></button>';
                } else {
                    var temp = row.headImg
                    return '<button onclick="lookBigImg(\'' + temp + '\')"><img style="width: 90px;height:50px;"  src="' + row.headImg + '" /></button>';
                }
            },
            events: 'operateEvents'},
        {title: '昵称', field: 'name', visible: true, align: 'center', valign: 'middle'},
        {title: '审核状态', field: 'state', visible: true, align: 'center', valign: 'middle',
            formatter: function (value, row) {
                switch (value) {
                    case 1:
                        return "待审核";
                    case 2:
                        return "已通过";
                    case 3:
                        return "已驳回";
                }
            }
        },
        {title: '提交时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle'},
        {title: '审核时间', field: 'auditTime', visible: true, align: 'center', valign: 'middle'},
        {title: '操作', field: 'state', visible: true, align: 'center', valign: 'middle',
            formatter: function (data,row) {
                var btn = "";
                if(data==1) {
                    var str = '<button class="btn btn-outline btn-primary" onclick="DriverApplyRefund.audit('+row.id+')" >审核</button>'
                    btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="" onfocus="TUser.tooltip()">' + str + '</p>']
                }else {
                    var str = '<button class="btn btn-outline btn-primary" onclick="DriverApplyRefund.info(' + row.id + ')" >查看</button>'
                    btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="" onfocus="TUser.tooltip()">' + str + '</p>']
                }
                return btn;
            }
        },
    ];
};
 
DriverApplyRefund.audit = function (e) {
    var index = layer.open({
        type: 2,
        title: '审核',
        area: ['100%', '100%'], //宽高
        fix: false, //不固定
        maxmin: true,
        content: Feng.ctxPath + '/userAudit/auditHtml/'+e
    });
    this.layerIndex = index;
};
 
DriverApplyRefund.info = function (e) {
    var index = layer.open({
        type: 2,
        title: '详情',
        area: ['100%', '100%'], //宽高
        fix: false, //不固定
        maxmin: true,
        content: Feng.ctxPath + '/userAudit/auditInfo/'+e
    });
    this.layerIndex = index;
};
/**
 * 检查是否选中
 */
DriverApplyRefund.check = function () {
    var selected = $('#' + this.id).bootstrapTable('getSelections');
    if(selected.length == 0){
        Feng.info("请先选中表格中的某一记录!");
        return false;
    }
    DriverApplyRefund.seItem = selected[0];
    return true;
};
 
DriverApplyRefund.viewSensitiveData = function () {
    if (this.check()) SensitiveInfo.view('/system/sensitive/app-user/' + this.seItem.userId);
};
 
 
/**
 * 打开编辑
 */
/**
 * 查询列表
 */
DriverApplyRefund.search = function () {
    var queryData = {};
    queryData['phone'] = $("#phone").val();
    queryData['state'] = $("#status").val();
    DriverApplyRefund.table.refresh({query: queryData});
};
DriverApplyRefund.resetSearch = function () {
    $("#phone").val("");
    $("#state").val("");
    DriverApplyRefund.search();
};
$(function () {
    var defaultColunms = DriverApplyRefund.initColumn();
    var table = new BSTable(DriverApplyRefund.id, "/userAudit/list", defaultColunms);
    table.setPaginationType("client");
    DriverApplyRefund.table = table.init();
});