-
Notifications
You must be signed in to change notification settings - Fork 0
/
vip-customer.html
271 lines (268 loc) · 8.34 KB
/
vip-customer.html
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title>客户信息-会员中心</title>
<link href="css/app.css" rel="stylesheet"/>
<script src="js/mui.min.js"></script>
<style type="text/css">
.ui-page,html,body,.vip-application{
height: 100%;
padding-top:0px;
}
body,.ui-page{
background:#eee;
}
.ui-page{
padding-top:44px;
}
.vip-application{
position:relative;
}
.vip-application .mui-table-view{
margin:10px 10px 10px
}
.mui-table-view{
background:none;
}
.mui-table-view .mui-table-view-cell{
margin-bottom:10px;
}
.mui-table-view .mui-table-view-cell a{
padding:10px 19px;
border-radius:4px;
position:relative;
-webkit-border-radius:4px;
display:block;
background:#fff;
}
.mui-table-view .mui-table-view-cell .info{
padding-right:100px;
}
.mui-table-view .mui-table-view-cell .info span{
display:block;
line-height:24px;
font-size:13px;
color:#333;
}
.mui-page-content{
height:100%;
position:relative;
}
.mui-page{
position: absolute;
left: 0;
right: 0;
top: 44px;
bottom: 0;
width: 100%;
height: 100%;
}
li.mui-table-view-cell .mui-active{
background:#e5e3e3;
}
.menuSlide{
top:44px;
}
.mui-slide.mui-slide-right{
width:100%;
}
#menuContent{
background: #F5F5F5;
}
#menuContent .mui-loading{margin-top:15px;}
#menuContent ul{
padding-bottom:14px;
overflow:hidden;
}
#menuContent li{
overflow:hidden;
color:#666;
padding:0 12px;
background:#fff;
border-bottom:.05em solid #ddd;
position:relative;
}
#menuContent li span{
font-size:14px;
line-height:40px;
}
#menuContent li span.p{
display:block;
margin-top:5px;
line-height:25px;
color:#333;
}
#menuContent li p{
width:100%;
font-size:14px;
line-height:25px;
padding-bottom:10px;
}
#menuContent li .f-l{
float:left;
}
#menuContent li .f-r{
float:right;
}
#menuContent li.t{
margin:10px 0 0 0;
}
#menuContent li:last-child{
border-bottom:none;
}
</style>
</head>
<body>
<div class="ui-page" id="ui-page">
<header class="ui-bar jy-bar" id="header">
<a href="javascript:;" class="icon-back icon" id="back"></a>
<div class="ui-title">客户信息</div>
<a href="javascript:;" class="icon-categorys icon" id="categorys"></a>
</header>
<section class="vip-application">
<div class="mui-scroll-wrapper" id="pullrefresh">
<div class="mui-scroll">
<ul class="mui-table-view">
</ul>
</div>
</div>
</section>
<!--菜单滑动公用区域-->
<div class="menuSlide" id="menuSlide" style="display:none;">
<div class="mui-backdrop"></div>
<div class="mui-slide mui-slide-right">
<div class="mui-scroll-wrapper">
<div class="mui-scroll" id="menuContent">
<div class="mui-loading">
<div class="mui-spinner">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="js/config.js"></script>
<script src="js/app.js"></script>
<script type="text/javascript">
(function($, doc) {
$.plusReady(function() {
var count = 1;
stateDate=app.getStateDate(),
userid=stateDate['id'];
var menuContent=doc.getElementById("menuContent");
var menuSlide=doc.getElementById("menuSlide");
var sildeMenu= new J.toggleSlideMenu(menuSlide);
var pullrefresh=doc.getElementById("pullrefresh");
var back=doc.getElementById("back")
var pullUpRefresh=function(){
var dataArr={
wait:true,
user_id:userid,
curPage:count
}
J.dataAjax(CONFING.httpUrl+'/jy/khInfoList.do',dataArr,function(data){
if(data.type==2 || !data){
$('#pullrefresh').pullRefresh().endPullupToRefresh(true);
}else{
var page=1,
infoArr=data.khInfoList;
setTimeout(function() {
var isPage=infoArr?++count>(page+1):true;
$('#pullrefresh').pullRefresh().endPullupToRefresh((isPage));
var table = doc.body.querySelector('.mui-table-view');
for (var i = 0; i <infoArr.length; i++) {
var htmlList='<a href="javascript:;" class="listShow">'
+'<div class="info">'
+'<span>客户姓名:'+infoArr[i].customer_name+'</span>'
+'<span>客户电话:'+infoArr[i].customer_phone+'</span>'
+'</div>'
+ '</a>';
var li = doc.createElement('li');
li.className = 'mui-table-view-cell';
li.innerHTML =htmlList;
table.appendChild(li);
}
pullrefresh.style.opacity=1;
}, 500);
$(".mui-table-view").on("tap",'.listShow',function(){
var id=this.getAttribute("data-id");
sildeMenu.open(function(){
for (var i = 0; i <infoArr.length; i++) {
var status=infoArr['status'];
var statusText;
switch(status){
case 1:
statusText='报备';
break;
case 2:
statusText='带看';
break;
case 3:
statusText='认筹';
break;
case 4:
statusText='成交';
break;
case 5:
statusText='结佣中';
break;
default:
statusText='已结佣';
}
var html='<li><span class="f-l">申请姓名</span><span class="f-r">'+infoArr[i]['customer_name']+'</span></li>';
html+='<li><span class="f-l">客户电话</span><span class="f-r">'+infoArr[i]['customer_phone']+'</span></li>';
html+='<li class="t"><span class="f-l">资金估算</span><span class="f-r">'+infoArr[i]['price_math']+'</span></li>';
html+='<li><span class="f-l">可做用途</span><span class="f-r">'+infoArr[i]['application']+'</span></li>';
html+='<li><span class="f-l">备注</span><span class="f-r">'+infoArr[i]['remarks']+'</span></li>';
html+='<li><span class="f-l">状态</span><span class="f-r">'+statusText+'</span></li>';
html+='<li class="t"><span class="f-l">跟进人</span><span class="f-r">'+(infoArr[i]['responsible_name'] || '')+'</span></li>';
html+='<li><span class="f-l">跟进人号码</span><span class="f-r">'+(infoArr[i]['responsible_phone'] || '')+'</span></li>';
html+='<li><span class="f-l">增加时间</span><span class="f-r">'+infoArr[i]['add_time']+'</span></li>';
}
menuContent.innerHTML=html;
back.classList.add("action-back");
back.classList.remove("icon-back");
});
});
}
})
}
$.ready(function() {
//初始化单页的区域滚动
var scroll=$('.mui-scroll-wrapper').scroll();
plus.navigator.setStatusBarStyle('UIStatusBarStyleBlackTranslucent');
if ($.os.plus) {
setTimeout(function() {
$('#pullrefresh').pullRefresh().pullupLoading();
}, 100);
} else {
$('#pullrefresh').pullRefresh().pullupLoading();
}
$.init({
statusBarBackground:'#393767',
pullRefresh: {
container: '#pullrefresh',
up: {
contentrefresh: '正在加载...',
callback: pullUpRefresh
}
}
});
$("#header").on("tap",'.action-back',function(){
var _this=this;
sildeMenu.close(function(){
var loading='<div class="mui-loading"><div class="mui-spinner"></div></div>';
menuContent.innerHTML=loading;
_this.classList.add("icon-back");
_this.classList.remove("action-back");
});
})
})
});
}(mui, document));
</script>
</body>
</html>