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
d0467236
Commit
d0467236
authored
Jan 07, 2019
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户详情优化
parent
6a0a8663
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
198 additions
and
3 deletions
+198
-3
users_list.html
application/index/view/member/users_list.html
+78
-2
user.js
public/resource/js/user.js
+120
-1
No files found.
application/index/view/member/users_list.html
View file @
d0467236
{layout name="global/frame_tpl" /}
{layout name="global/frame_tpl" /}
<input
type=
"hidden"
class=
"page-load"
id=
"user"
/>
<input
type=
"hidden"
class=
"page-load"
id=
"user"
/>
<style>
<style>
/*关联客户相关*/
.user-detail-relational
>
div
{
float
:
left
;
margin-right
:
15px
;
}
.user-detail-relational
>
div
>
span
{
margin-left
:
10px
;
cursor
:
pointer
;
}
.user-ul-liu
{
height
:
auto
;
float
:
left
;
position
:
relative
;
left
:
-40px
;
}
.user-ul-liu
li
{
list-style
:
none
;
line-height
:
30px
;
}
.left-phone-liu
{
float
:
left
;
margin-top
:
15px
;
margin-left
:
10px
;
}
/*下拉式*/
.follow-up-modal-list-area
{
.follow-up-modal-list-area
{
height
:
258px
;
height
:
258px
;
overflow-y
:
scroll
;
overflow-y
:
scroll
;
...
@@ -749,7 +774,7 @@
...
@@ -749,7 +774,7 @@
<span
id=
"user_up"
class=
"ld-Marheight text-primary ld-Marheight"
>
上一条客户
</span>
<span
id=
"user_up"
class=
"ld-Marheight text-primary ld-Marheight"
>
上一条客户
</span>
<span
id=
"user_down"
class=
"ld-Marheight text-primary ld-Marheight"
>
下一条客户
</span>
<span
id=
"user_down"
class=
"ld-Marheight text-primary ld-Marheight"
>
下一条客户
</span>
<span
id=
'user_is_collect'
class=
'ld-Marheight text-primary'
>
收藏
</span>
<span
id=
'user_is_collect'
class=
'ld-Marheight text-primary'
>
收藏
</span>
<a
id=
'user_add_relational'
class=
'ld-Marheight text-primary'
style=
"margin-left: 32px;cursor: pointer;"
href=
"#modal-addRelational"
data-toggle=
"modal"
>
添加关联客户
</a>
</div>
</div>
</div>
</div>
<div
class=
"modal-body modal-body1"
>
<div
class=
"modal-body modal-body1"
>
...
@@ -887,9 +912,18 @@
...
@@ -887,9 +912,18 @@
</thead>
</thead>
</table>
</table>
<!--关联客户-->
<div>
<div
class=
"text-info"
>
关联客户
</div>
<div
class=
"user-detail-relational"
style=
"overflow: hidden;"
>
</div>
</div>
<!--客户详情 最近一条带看动态-->
<div>
<div>
<div
class=
"text-info"
style=
"margin: 2px;font-size: 16px;"
>
最近一条带看动态
</div>
<div
class=
"text-info"
style=
"margin: 2px;font-size: 16px;"
>
最近一条带看动态
</div>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
style=
"margin-bottom: 0;"
>
<tbody
class=
"text-center user-log-detail"
>
<tbody
class=
"text-center user-log-detail"
>
</tbody>
</tbody>
</table>
</table>
...
@@ -1437,6 +1471,48 @@
...
@@ -1437,6 +1471,48 @@
</div>
</div>
<!-- /.modal -->
<!-- /.modal -->
</div>
</div>
<!--关联客户弹窗-->
<div
class=
"modal fade"
id=
"modal-addRelational"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
添加关联客户
</h4>
</div>
<div
class=
"modal-body"
style=
"padding: 25px;"
>
<div
class=
"left-phone-liu"
>
<input
class=
"form-control"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"partical_name"
placeholder=
"请输入客户编号"
type=
"text"
value=
""
>
<ul
class=
"user-ul-liu"
></ul>
</div>
<br
/>
<br
/>
<br
/>
<br
/>
<br
/>
<br
/>
<br
/>
<br
/>
<br
/>
<br
/>
<br
/>
<br
/>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-info save-relational"
data-dismiss=
"modal"
>
保存
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--加载图标-->
<!--加载图标-->
<div
id=
"main_loading_pic"
>
<div
id=
"main_loading_pic"
>
<img
src=
"/resource/image/jz2.gif"
>
<img
src=
"/resource/image/jz2.gif"
>
...
...
public/resource/js/user.js
View file @
d0467236
...
@@ -53,7 +53,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -53,7 +53,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
agent_id_call_vip
:
""
,
agent_id_call_vip
:
""
,
pageNoUser
:
1
,
//客户详情 客户动态初始化分页
pageNoUser
:
1
,
//客户详情 客户动态初始化分页
moreUser
:
0
,
//标识点击加载更多 还有没有数据
moreUser
:
0
,
//标识点击加载更多 还有没有数据
agent_id_phone
:
''
,
init
:
function
()
{
init
:
function
()
{
//初始化dot
//初始化dot
$
(
"body"
).
append
(
template
);
$
(
"body"
).
append
(
template
);
...
@@ -177,6 +177,28 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -177,6 +177,28 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
e
.
stopPropagation
();
e
.
stopPropagation
();
$
(
this
).
parent
().
remove
();
$
(
this
).
parent
().
remove
();
});
});
//客户详情 关联客户
_doc
.
on
(
'click'
,
'.save-relational'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
user
.
addRelational
()
});
//客户详情 解除关联客户
_doc
.
on
(
'click'
,
'.del-relational'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
var
id_
=
$
(
this
).
attr
(
"data-id"
);
user
.
delRelational
(
id_
);
});
//点击客户详情 添加关联客户
_doc
.
on
(
'click'
,
'#user_add_relational'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
$
(
'#partical_name'
).
val
(
''
);
user
.
agent_id_phone
=
''
;
});
//客户动态 加载更多
//客户动态 加载更多
_doc
.
on
(
'click'
,
'.user-log-more'
,
function
(
e
)
{
_doc
.
on
(
'click'
,
'.user-log-more'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
...
@@ -635,6 +657,19 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -635,6 +657,19 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
user
.
search_phone2
();
user
.
search_phone2
();
}
}
});
});
//跟进姓名 下拉式搜索
$
(
document
).
on
(
"input"
,
"#partical_name"
,
function
()
{
//手机号新增搜索客方
if
(
$
(
"#partical_name"
).
val
()
==
''
)
{
user
.
agent_id_phone
=
''
;
$
(
".user-ul-liu"
).
html
(
''
);
}
else
{
user
.
search_phone_liu
();
}
});
//点击li 列表消失
$
(
document
).
delegate
(
".addphoneliu"
,
"click"
,
function
()
{
//list消失新增客户 点击li事件 获取id ul消失
user
.
addphoneliu
(
this
);
});
$
(
document
).
delegate
(
".addphone"
,
"click"
,
function
()
{
//list消失新增客户 点击li事件 获取id ul消失
$
(
document
).
delegate
(
".addphone"
,
"click"
,
function
()
{
//list消失新增客户 点击li事件 获取id ul消失
user
.
addphone
(
this
);
user
.
addphone
(
this
);
});
});
...
@@ -1746,6 +1781,13 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -1746,6 +1781,13 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
//拨打电话
//拨打电话
user
.
customerInfo
=
data
.
data
.
user_info
;
user
.
customerInfo
=
data
.
data
.
user_info
;
is_outpace_call_num
=
data
.
data
.
is_outpace_call_num
;
is_outpace_call_num
=
data
.
data
.
is_outpace_call_num
;
//关联客户显示 解除关联
var
user_bind_list
=
""
;
$
.
each
(
data
[
'data'
][
'user_bind_list'
],
function
(
i
,
item
)
{
user_bind_list
+=
'<div>'
+
item
.
user_name
+
',ID:'
+
item
.
user_id
+
','
+
item
.
user_phone
+
'<span class="text-info del-relational" data-id="'
+
item
.
user_id
+
'">解除关联</span></div>'
;
});
$
(
".user-detail-relational"
).
html
(
user_bind_list
);
}
}
}
else
{
}
else
{
...
@@ -1992,6 +2034,49 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -1992,6 +2034,49 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
}
}
}
}
});
});
},
//新增关联客户
addRelational
:
function
()
{
$
.
ajax
({
url
:
'/index/addUserBind'
,
type
:
'GET'
,
async
:
true
,
data
:
{
'bind_id'
:
user
.
agent_id_phone
,
"user_id"
:
user
.
user_id
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
alert
(
data
.
msg
);
user
.
Caozuo
();
//更新关联客户
}
else
{
alert
(
data
.
msg
);
}
}
});
},
//解除关联客户
delRelational
:
function
(
id
)
{
$
.
ajax
({
url
:
'/index/removeUserBind'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"user_id"
:
id
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
alert
(
data
.
msg
);
user
.
Caozuo
();
//更新关联客户
}
else
{
alert
(
data
.
msg
);
}
}
});
},
},
add_user
:
function
()
{
add_user
:
function
()
{
var
params
=
{};
var
params
=
{};
...
@@ -2464,6 +2549,40 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -2464,6 +2549,40 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
}
}
});
});
},
},
//跟进人 姓名搜索
search_phone_liu
:
function
()
{
//手机号新增客户
$
.
ajax
({
url
:
'/broker/searchUser'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"AuthToken"
:
user_info_obj
.
AuthToken
,
'id'
:
$
(
"#partical_name"
).
val
()
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
var
user_ul
=
""
;
$
.
each
(
data
.
data
.
user_date
,
function
(
i
,
item
)
{
user_ul
+=
'<li class="addphoneliu" data-id="'
+
item
.
user_id
+
'">'
+
item
.
user_name
+
'-'
+
item
.
user_id
+
'-'
+
item
.
user_phone
+
'</li>'
;
});
$
(
".user-ul-liu"
).
html
(
user_ul
);
}
else
{
alert
(
data
.
msg
);
}
}
});
},
//将li里的值 赋给input(分佣方姓名)
addphoneliu
:
function
(
obj
)
{
//新增客户 input赋值
var
user_ht
=
$
(
obj
).
html
()
+
''
;
var
user_ht_str
=
user_ht
.
substring
(
0
,
user_ht
.
length
-
3
);
$
(
"#partical_name"
).
val
(
user_ht_str
);
$
(
".user-ul-liu"
).
html
(
''
);
user
.
agent_id_phone
=
$
(
obj
).
attr
(
"data-id"
);
},
};
};
return
user
;
return
user
;
...
...
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