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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
| layui.define([ 'form', 'laydate', 'table' ], function(exports) {
| var form = layui.form;
| var laydate = layui.laydate;
| var table = layui.table;
| var itemTable = null;
| laydate.render({
| elem: '#date',
| format: 'yyyy-MM-dd HH:mm:ss'
| });
| laydate.render({
| elem: '#date1',
| format: 'yyyy-MM-dd HH:mm:ss'
| });
| var data = {};
| var view ={
|
| init:function(e){
| data = e;
| this.initTable();
| },
| initTable:function(){
| itemTable = table.render({
| elem : '#userStatisTable',
| method : 'post',
| url : Common.ctxPath+ '/admin/targetUser/tuser/queryList.json' //数据接口
| ,page : true //开启分页
| ,limit : 20,
| where: data,
| parseData :function(res){ //res 即为原始返回的数据
| if(res.data.length == 0){
| Common.info('并没有数据');
| }
| return res;
| },
| cols : [ [ //表头
| {
| field : 'nickName',
| title : '昵称',
| width : 100,
| templet:function (d) {
| if(d.nickName === null){
| return '/';
| }else {
| return $.base64.atob(d.nickName, true);
| }
| }
| }, {
| field : 'mobile',
| title : '手机号',
| width : 120
| }, {
| field : 'userName',
| title : '姓名',
| width : 100,
| templet: function (d) {
| if(d.userName === null){
| return "--";
| }else{
| return d.userName;
| }
| }
| }, {
| field : 'regsterType',
| title : '状态',
| width : 130,
| templet : function (d) {
| if(d.regsterType == 1){
| return '未注册';
| }else if(d.regsterType == 2){
| return '已注册';
| }else if(d.regsterType == 3){
| return '已注册(已成交)';
| }else{
| return '未知状态';
| }
| }
| }, {
| field : 'promoterName',
| title : '邀请人',
| width : 100,
| templet: function (d) {
| if(d.promoterName === null){
| return '/';
| }else{
| return '<a href="'+Common.ctxPath+'/admin/cuser/query/queryPromoterDetailIndex.do?userId='+d.realUserId+'&userType=6">'+$.base64.atob(d.promoterName, true)+'</a>';
| }
| }
| }, {
| field : 'promoter',
| title : '推广人',
| width : 100,
| templet: function (d) {
| if(d.promoter === null){
| return '/';
| }else{
| return $.base64.atob(d.promoter, true);
| }
| }
| },{
| field : 'createTime',
| title : '创建时间',
| width : 180,
| templet: function (d) {
| if(d.createTime === null){
| return '/';
| }else{
| return d.createTime;
| }
| },
| sort : true
| },{
| field : 'registTime',
| title : '注册时间',
| width : 180,
| templet: function (d) {
| if(d.registTime === null){
| return '/';
| }else{
| return d.registTime;
| }
| },
| sort : true
| },{
| field : 'detailAddress',
| title : '地址',
| width : 180
|
| },{
| field : 'addressRemark',
| title : '地址备注',
| width : 180
| },{
| field : 'disc',
| title : '其他描述',
| templet: function (d) {
| if(d.disc === null){
| return '/';
| }else{
| return d.disc;
| }
| },
| width : 180
| },{
| field: '',
| title: '操作',
| templet: function (d) {
| if(d.regsterType == 2 || d.regsterType == 3){
| return '<a href="'+Common.ctxPath+'/admin/cuser/query/queryCuserDetailIndex.do?phone='+d.mobile+'">更多</a>';
| }else{
| return '';
| }
| }
| }
| ] ]
|
| });
| }
|
| }
|
| exports('userStatis',view);
|
| });
|
|