Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
8b8b82c0
Commit
8b8b82c0
authored
Jan 02, 2019
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
95169379
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
144 additions
and
24 deletions
+144
-24
users_list.html
application/index/view/member/users_list.html
+32
-3
user.js
public/resource/js/user.js
+112
-21
No files found.
application/index/view/member/users_list.html
View file @
8b8b82c0
{layout name="global/frame_tpl" /}
<input
type=
"hidden"
class=
"page-load"
id=
"user"
/>
<style>
.follow-up-modal-list-area
{
height
:
258px
;
overflow-y
:
scroll
;
}
.modal-body1
{
height
:
716px
;
overflow-y
:
auto
;
...
...
@@ -255,6 +259,11 @@
height
:
36px
;
line-height
:
36px
;
border-top
:
3px
solid
#ccc
;
font-weight
:
600
;
}
.modal-title-genjing
>
span
{
cursor
:
pointer
;
margin-right
:
20px
;
}
.center-btn
{
...
...
@@ -867,15 +876,35 @@
</thead>
</table>
<h4
class=
"modal-title-genjing clear text-info"
>
客户跟进
<div>
最近一条带看动态
<br
/>
<div
class=
"user-log-detail"
>
</div>
</div>
<h4
class=
"clear modal-title-genjing"
>
<span
class=
"modal-title-genjing-con"
>
<span
class=
"text-info"
>
客户动态
</span>
<span>
带看动态
</span>
</span>
<span
class=
"user-log-more text-info"
style=
"float: right;"
>
加载更多
</span>
</h4>
<div
id=
"gen_jing_user"
>
<div
class=
"followup-modal-list-area"
>
<div>
<div
class=
"follow-up-modal-list-area"
style=
"height: 258px"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<tbody
class=
"text-center"
id=
"caozuo_table2"
>
</tbody>
</table>
</div>
<div
class=
"follow-up-modal-list-area"
style=
"height: 258px"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<tbody
class=
"text-center"
id=
"caozuo_table_log"
>
<td>
555
</td>
</tbody>
</table>
</div>
</div>
<div
class=
"clear margin-top-ld"
>
</div>
...
...
public/resource/js/user.js
View file @
8b8b82c0
...
...
@@ -30,6 +30,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
/*每页显示多少条*/
user_id
:
0
,
user_id_var
:
''
,
detailTabIndexFollow
:
''
,
user_type
:
''
,
user_phone
:
''
,
urls
:
''
,
...
...
@@ -50,6 +51,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
agent_id_call
:
""
,
//拨打电话 相关
agent_id_call_current
:
""
,
agent_id_call_vip
:
""
,
pageNoUser
:
1
,
//客户详情 客户动态初始化分页
init
:
function
()
{
//初始化dot
$
(
"body"
).
append
(
template
);
...
...
@@ -173,6 +175,13 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
e
.
stopPropagation
();
$
(
this
).
parent
().
remove
();
});
//客户动态 加载更多
_doc
.
on
(
'click'
,
'.user-log-more'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
user
.
getGenjincon
(
user
.
pageNoUser
++
)
});
//点击 无效
_doc
.
on
(
'click'
,
'.is_invalid'
,
function
(
e
)
{
e
.
preventDefault
();
...
...
@@ -441,10 +450,11 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
// 客户编辑 修改记录
$
(
document
).
delegate
(
".cao-zuo-record"
,
"click"
,
function
()
{
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
Caozuorecord
();
//
user.Caozuorecord();
});
$
(
document
).
delegate
(
".caozuo-yue"
,
"click"
,
function
()
{
//约带看初始化
console
.
log
(
667
);
$
(
'#look_shop_date'
).
val
(
''
);
$
(
'#note_look'
).
val
(
''
);
$
(
'.look-shop'
).
val
(
''
);
...
...
@@ -474,10 +484,17 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
$
(
'.look-shop'
).
removeAttr
(
'data-id'
);
$
(
'.detail-modal-header-tab>a:nth-of-type(1)'
).
removeClass
(
'btn-default'
).
addClass
(
'btn-info'
).
siblings
().
removeClass
(
'btn-info'
).
addClass
(
'btn-default'
);
//点击客户详情 初始化客户动态 带看动态
$
(
'.modal-title-genjing-con>span:nth-of-type(1)'
).
addClass
(
'text-info'
).
siblings
().
removeClass
(
'text-info'
);
user
.
detailTabIndex
=
0
;
$
(
'.detail-modal-body-sec:nth-of-type(1)'
).
show
().
siblings
().
hide
();
//初始化客户动态 带看动态两个表格切换
$
(
'.follow-up-modal-list-area:nth-of-type(1)'
).
show
().
siblings
().
hide
();
$
(
'.followup-modal-comment-area>textarea'
).
val
(
''
);
//清空跟进框内容
user
.
getSiteTagsEdit
();
user
.
getUserLog
(
1
);
//客户详情获取最近一条带看动态
$
(
'.user-log-more'
).
show
();
//显示加载更多
});
...
...
@@ -566,6 +583,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
});
//查看弹出框里的tab点击事件,查看客户详情,客户约带看
_doc
.
on
(
'click'
,
'.detail-modal-header-tab>a'
,
function
(
e
){
console
.
log
(
668
)
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
...
...
@@ -575,9 +593,30 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
if
(
user
.
detailTabIndex
==
1
){
}
else
if
(
user
.
detailTabIndex
==
0
){
user
.
Caozuo
();
user
.
pageNoUser
=
1
;
$
(
'#caozuo_table2'
).
html
(
''
);
user
.
getGenjincon
();
}
});
//查看弹出框里的tab点击事件,客户动态 带看动态
_doc
.
on
(
'click'
,
'.modal-title-genjing-con>span'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
_this
.
addClass
(
'text-info'
).
siblings
().
removeClass
(
'text-info'
);
user
.
detailTabIndexFollow
=
_this
.
index
();
$
(
'.follow-up-modal-list-area:nth-of-type('
+
(
user
.
detailTabIndexFollow
+
1
)
+
')'
).
show
().
siblings
().
hide
();
if
(
user
.
detailTabIndexFollow
){
$
(
'.user-log-more'
).
hide
();
user
.
getUserLog
(
2
)
//获取带看记录
}
else
{
$
(
'.user-log-more'
).
show
();
user
.
pageNoUser
=
1
;
$
(
'#caozuo_table2'
).
html
(
''
);
user
.
getGenjincon
()
//获取客户动态
}
});
$
(
document
).
on
(
"input"
,
".cus_fang"
,
function
()
{
//手机号搜索客方2 编辑
if
(
$
(
".cus_fang"
).
val
()
==
''
)
{
user
.
agent_id2
=
''
;
...
...
@@ -1509,6 +1548,8 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
'修改成功'
);
user
.
pageNoUser
=
1
;
$
(
'#caozuo_table2'
).
html
(
''
);
user
.
getGenjincon
();
$
(
'#genj_text'
).
val
(
''
);
}
else
{
...
...
@@ -1571,8 +1612,9 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
// checkLogin();
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/user
action_search
'
,
'url'
:
'/index/user
Detail
'
,
data
:
{
"AuthToken"
:
user_info_obj
.
AuthToken
,
"user_id"
:
user
.
user_id
,
'agent_id'
:
user_info_obj
.
id
},
...
...
@@ -1592,8 +1634,8 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
$
(
".cus_phone"
).
html
(
hideTel
(
data
.
data
.
user_info
.
user_phone
));
//电话
$
(
".cus_date"
).
html
(
data
.
data
.
user_info
.
create_time
);
//创建时间
$
(
".referrer_user"
).
html
(
data
.
data
.
user_info
.
referrer_user
);
//上传时间
$
(
".cus_fang_edit"
).
val
(
data
.
data
.
user_info
.
agentinfo
);
//客方详情
$
(
".cus_fang"
).
val
(
data
.
data
.
user_info
.
agentinfo
);
//客方编辑
$
(
".cus_fang_edit"
).
val
(
data
.
data
.
user_info
.
agent
_
info
);
//客方详情
$
(
".cus_fang"
).
val
(
data
.
data
.
user_info
.
agent
_
info
);
//客方编辑
$
(
"select[name=industry_type_two]"
).
val
(
data
.
data
.
user_info
.
industry_type
);
$
(
"input[name=price_demand]"
).
val
(
data
.
data
.
user_info
.
price_demand
*
1
);
$
(
"input[name=area_demand]"
).
val
(
data
.
data
.
user_info
.
area_demand
*
1
);
...
...
@@ -1667,6 +1709,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
}
else
{
$
(
".user-details-introduce"
).
html
(
'否'
);
//转介绍详情
}
//客方修改记录
var
caozuo_table
=
""
;
$
.
each
(
data
[
'data'
][
'user_history'
],
function
(
i
,
item
)
{
caozuo_table
+=
'<tr><td>'
+
item
.
remark
+
'</td><td>'
+
item
.
name
+
'</td><td>'
+
item
.
create_time
+
'</td></tr>'
;
...
...
@@ -1676,20 +1719,31 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
}
else
{
$
(
"#caozuo_table_edit"
).
html
(
'暂无数据(*^_^*)'
);
};
//邀请人修改记录
var
caozuo_table_introduce
=
""
;
$
.
each
(
data
[
'data'
][
'user_invite_history'
],
function
(
i
,
item
)
{
caozuo_table_introduce
+=
'<tr><td>'
+
item
.
remark
+
'</td><td>'
+
item
.
name
+
'</td><td>'
+
item
.
create_time
+
'</td></tr>'
;
});
if
(
caozuo_table_introduce
){
$
(
"#caozuo_table_edit_introduce"
).
html
(
caozuo_table_introduce
);
}
else
{
$
(
"#caozuo_table_edit_introduce"
).
html
(
'暂无数据(*^_^*)'
);
}
}
}
else
{
alert
(
'获取失败!'
);
alert
(
data
.
msg
);
}
}
});
},
//客户编辑 修改记录
//客户编辑 修改记录
(废弃)
Caozuorecord
:
function
()
{
//获取客户动态
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
// checkLogin();
$
.
ajax
({
url
:
'/
broker/useraction_search
'
,
url
:
'/
index/userDetail
'
,
type
:
'POST'
,
async
:
true
,
data
:
{
...
...
@@ -1856,6 +1910,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
},
//获取站点 标签 (编辑)
getSiteTagsEdit
:
function
()
{
console
.
log
(
669
);
$
(
'.shangpu_tags_area_edit '
).
html
(
''
);
$
(
'.shangpu_tags_area_detail'
).
html
(
''
);
$
.
ajax
({
...
...
@@ -2152,7 +2207,10 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
$
(
'.call-user-five'
).
html
(
data
.
msg
);
$
(
'.detail-modal-body-sec-2'
).
hide
();
}
console
.
log
(
670
)
user
.
Caozuo
();
user
.
pageNoUser
=
1
;
$
(
'#caozuo_table2'
).
html
(
''
);
user
.
getGenjincon
();
if
(
data
.
data
.
user_id
==
data
.
data
.
max_user_id
){
user
.
user_id
=
data
.
data
.
max_user_id
-
1
;
...
...
@@ -2183,22 +2241,27 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
// $("input[type='radio'][name='user_status'][value=" + data.data + "]").prop("checked", "checked");
user
.
getGenjincon
();
$
(
'#caozuo_table2'
).
html
(
''
);
user
.
pageNoUser
=
1
;
user
.
getGenjincon
();
//以前获取客户动态
}
}
});
},
getGenjincon
:
function
()
{
//获取客户动态
getGenjincon
:
function
()
{
//获取客户动态
(客户详情)
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
// checkLogin();
$
.
ajax
({
url
:
'/
broker/useraction_search
'
,
type
:
'
POS
T'
,
url
:
'/
index/followUpLog
'
,
type
:
'
GE
T'
,
async
:
true
,
data
:
{
"AuthToken"
:
user_info_obj
.
AuthToken
,
"user_id"
:
user
.
user_id
,
"agent_id"
:
user_info_obj
.
id
"page_no"
:
user
.
pageNoUser
,
"page_size"
:
8
,
},
dataType
:
'json'
,
...
...
@@ -2208,27 +2271,55 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
is_outpace_call_num
=
data
.
data
.
is_outpace_call_num
;
//客户动态 即跟进
var
caozuo_table
=
""
;
$
.
each
(
data
[
'data'
][
'user_date'
],
function
(
i
,
item
)
{
if
(
item
.
step_name
==
'report'
){
caozuo_table
+=
'<tr><td class="text-left follow-up-home" width="70%">'
+
dealPunctuation
(
item
.
step
)
+
'到场时间:'
+
item
.
predict_see_time
+
'备注:'
+
item
.
intro
+
'</td><td>'
+
item
.
name
+
'</td><td>'
+
item
.
create_time
+
'</td></tr>'
;
}
else
{
caozuo_table
+=
'<tr><td class="text-left follow-up-home" width="70%">'
+
dealPunctuation
(
item
.
step
)
+
'</td><td>'
+
item
.
name
+
'</td><td>'
+
item
.
create_time
+
'</td></tr>'
;
}
$
.
each
(
data
[
'data'
],
function
(
i
,
item
)
{
caozuo_table
+=
'<tr><td class="text-left follow-up-home" width="70%">'
+
item
.
content
+
'</td><td>'
+
item
.
name
+
'</td><td>'
+
item
.
create_time
+
'</td></tr>'
;
});
if
(
caozuo_table
){
$
(
"#caozuo_table2"
).
html
(
caozuo_table
);
$
(
"#caozuo_table2"
).
append
(
caozuo_table
);
}
else
{
$
(
"#caozuo_table2"
).
html
(
'暂无跟进信息'
);
}
//滚动条 回到顶部
$
(
'.followup-modal-list-area'
).
scrollTop
(
0
);
$
(
'.follow-up-modal-list-area'
).
scrollTop
(
0
);
/*分页代码*/
}
else
{
alert
(
'暂无数据!!!'
);
}
}
});
},
//调用带看记录
getUserLog
:
function
(
type
)
{
$
.
ajax
({
url
:
'/index/userLog'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"user_id"
:
user
.
user_id
,
"type"
:
type
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
// if(item.step_name=='report'){
// caozuo_table += '<tr><td class="text-left follow-up-home" width="70%">' + dealPunctuation(item.step)+'到场时间:'+ item.predict_see_time +'备注:'+item.intro+ '</td><td>' + item.name + '</td><td>' + item.create_time + '</td></tr>';
// }else{
// caozuo_table += '<tr><td class="text-left follow-up-home" width="70%">' + dealPunctuation(item.step)+ '</td><td>' + item.name + '</td><td>' + item.create_time + '</td></tr>';
// }
// if(caozuo_table){
// $("#caozuo_table_log").html(caozuo_table);
// }else{
// $("#caozuo_table_log").html('暂无跟进信息');
// }
// //滚动条 回到顶部
// $('.follow-up-modal-list-area').scrollTop(0);
}
}
});
},
//调用部门 和 门店的接口
getDistrict
:
function
(
fn
)
{
$
.
ajax
({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment