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
5ac4abc1
Commit
5ac4abc1
authored
Jan 11, 2019
by
xishifeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
3
parent
edd8c69a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
137 additions
and
16 deletions
+137
-16
callPhoneIndex.js
public/resource/js/callPhoneIndex.js
+5
-5
myCollectionUserList.js
public/resource/js/myCollectionUserList.js
+5
-5
user.js
public/resource/js/user.js
+127
-6
No files found.
public/resource/js/callPhoneIndex.js
View file @
5ac4abc1
...
@@ -246,10 +246,10 @@ define(['doT', 'text!temp/callPhone_template_tpl.html', 'css!style/home.css', 'c
...
@@ -246,10 +246,10 @@ define(['doT', 'text!temp/callPhone_template_tpl.html', 'css!style/home.css', 'c
user
.
delete_user
(
params
);
user
.
delete_user
(
params
);
});
});
$
(
document
).
delegate
(
".genj_ure"
,
"click"
,
function
()
{
$
(
document
).
delegate
(
".genj_ure"
,
"click"
,
function
()
{
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
//
user.user_id = $(this).attr("data-id");
// $("#genj_text").val(''
);
// user.getGenjinLabel(
);
// $("input[name = 'user_status']:checked").removeAttr("checked"
);
var
_$this
=
$
(
this
);
user
.
getGenjinLabel
();
$
(
'#modal-record iframe'
).
attr
(
'src'
,
'/index/userModalList?data='
+
_$this
.
attr
(
'data-item'
)
+
'&id='
+
_$this
.
attr
(
'data-id'
)).
show
();
});
});
$
(
document
).
delegate
(
".add_alert"
,
"click"
,
function
()
{
//重置搜索
$
(
document
).
delegate
(
".add_alert"
,
"click"
,
function
()
{
//重置搜索
...
@@ -286,7 +286,7 @@ define(['doT', 'text!temp/callPhone_template_tpl.html', 'css!style/home.css', 'c
...
@@ -286,7 +286,7 @@ define(['doT', 'text!temp/callPhone_template_tpl.html', 'css!style/home.css', 'c
});
});
//客户列表操作
//客户列表操作
$
(
document
).
delegate
(
".cao
zuo
"
,
"click"
,
function
()
{
//点击操作跟进详情
$
(
document
).
delegate
(
".cao
-zuo-record
"
,
"click"
,
function
()
{
//点击操作跟进详情
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
console
.
log
(
user
.
user_id
);
console
.
log
(
user
.
user_id
);
if
(
user
.
user_id
==
'null'
){
if
(
user
.
user_id
==
'null'
){
...
...
public/resource/js/myCollectionUserList.js
View file @
5ac4abc1
...
@@ -240,10 +240,10 @@ define(['doT', 'text!temp/my_collection_user_template_tpl.html', 'css!style/home
...
@@ -240,10 +240,10 @@ define(['doT', 'text!temp/my_collection_user_template_tpl.html', 'css!style/home
user
.
delete_user
(
params
);
user
.
delete_user
(
params
);
});
});
$
(
document
).
delegate
(
".genj_ure"
,
"click"
,
function
()
{
$
(
document
).
delegate
(
".genj_ure"
,
"click"
,
function
()
{
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
//
user.user_id = $(this).attr("data-id");
// $("#genj_text").val(''
);
// user.getGenjinLabel(
);
// $("input[name = 'user_status']:checked").removeAttr("checked"
);
var
_$this
=
$
(
this
);
user
.
getGenjinLabel
();
$
(
'#modal-record iframe'
).
attr
(
'src'
,
'/index/userModalList?data='
+
_$this
.
attr
(
'data-item'
)
+
'&id='
+
_$this
.
attr
(
'data-id'
)).
show
();
});
});
$
(
document
).
delegate
(
".add_alert"
,
"click"
,
function
()
{
//重置搜索
$
(
document
).
delegate
(
".add_alert"
,
"click"
,
function
()
{
//重置搜索
...
@@ -285,7 +285,7 @@ define(['doT', 'text!temp/my_collection_user_template_tpl.html', 'css!style/home
...
@@ -285,7 +285,7 @@ define(['doT', 'text!temp/my_collection_user_template_tpl.html', 'css!style/home
});
});
//客户列表操作
//客户列表操作
$
(
document
).
delegate
(
".cao
zuo
"
,
"click"
,
function
()
{
//点击操作跟进详情
$
(
document
).
delegate
(
".cao
-zuo-record
"
,
"click"
,
function
()
{
//点击操作跟进详情
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
user_phone
=
$
(
this
).
attr
(
"data-phone"
);
user
.
user_phone
=
$
(
this
).
attr
(
"data-phone"
);
user
.
agent_id_infor
=
$
(
this
).
attr
(
"data-agentId"
);
user
.
agent_id_infor
=
$
(
this
).
attr
(
"data-agentId"
);
...
...
public/resource/js/user.js
View file @
5ac4abc1
...
@@ -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
();
...
@@ -427,8 +449,10 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -427,8 +449,10 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
user
.
delete_user
(
params
);
user
.
delete_user
(
params
);
});
});
$
(
document
).
delegate
(
".genj_ure"
,
"click"
,
function
()
{
$
(
document
).
delegate
(
".genj_ure"
,
"click"
,
function
()
{
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
// user.user_id = $(this).attr("data-id");
user
.
getGenjinLabel
();
// user.getGenjinLabel();
var
_$this
=
$
(
this
);
$
(
'#modal-record iframe'
).
attr
(
'src'
,
'/index/userModalList?data='
+
_$this
.
attr
(
'data-item'
)
+
'&id='
+
_$this
.
attr
(
'data-id'
)).
show
();
});
});
$
(
document
).
delegate
(
".add_alert"
,
"click"
,
function
()
{
//重置搜索
$
(
document
).
delegate
(
".add_alert"
,
"click"
,
function
()
{
//重置搜索
...
@@ -474,7 +498,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -474,7 +498,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
});
});
//客户列表操作
//客户列表操作
$
(
document
).
delegate
(
".cao
zuo
"
,
"click"
,
function
()
{
//点击操作跟进详情
$
(
document
).
delegate
(
".cao
-zuo-record
"
,
"click"
,
function
()
{
//点击操作跟进详情
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
user_phone
=
$
(
this
).
attr
(
"data-phone"
);
user
.
user_phone
=
$
(
this
).
attr
(
"data-phone"
);
user
.
agent_id_infor
=
$
(
this
).
attr
(
"data-agentId"
);
user
.
agent_id_infor
=
$
(
this
).
attr
(
"data-agentId"
);
...
@@ -635,6 +659,19 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -635,6 +659,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
);
});
});
...
@@ -1658,14 +1695,14 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -1658,14 +1695,14 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
$
(
"#take_look_phone"
).
html
(
data
.
data
.
user_info
.
user_phone
);
//约带看手机号
$
(
"#take_look_phone"
).
html
(
data
.
data
.
user_info
.
user_phone
);
//约带看手机号
$
(
"#take_look_id"
).
html
(
data
.
data
.
user_info
.
user_id
);
//约带看id
$
(
"#take_look_id"
).
html
(
data
.
data
.
user_info
.
user_id
);
//约带看id
//收藏客户 取消收藏
//收藏客户 取消收藏
if
(
data
.
data
.
user_info
.
is_collect
==
2
){
if
(
data
.
data
.
is_collect
==
2
){
$
(
'#user_is_collect'
).
html
(
'收藏'
);
$
(
'#user_is_collect'
).
html
(
'收藏'
);
}
else
{
}
else
{
$
(
'#user_is_collect'
).
html
(
'取消收藏'
);
$
(
'#user_is_collect'
).
html
(
'取消收藏'
);
};
};
//vip客户 查看权限
//vip客户 查看权限
if
(
user
.
agent_id_call_vip
*
1
==
1
){
if
(
user
.
agent_id_call_vip
*
1
==
1
){
if
(
check_auth
(
'auth_vip'
)
||
(
user
.
agent_id_call
*
1
==
user
.
agent_id_call_current
*
1
)
||
(
data
.
data
.
user_info
.
is_can_look
==
0
)){
if
(
check_auth
(
'auth_vip'
)
||
(
user
.
agent_id_call
*
1
==
user
.
agent_id_call_current
*
1
)
||
(
data
.
data
.
is_can_look
==
0
)){
$
(
'.user_call'
).
show
();
$
(
'.user_call'
).
show
();
}
else
{
}
else
{
$
(
'.user_call'
).
hide
();
$
(
'.user_call'
).
hide
();
...
@@ -1746,6 +1783,13 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -1746,6 +1783,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 +2036,49 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -1992,6 +2036,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 +2551,40 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -2464,6 +2551,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