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
6b96c979
Commit
6b96c979
authored
Jan 03, 2019
by
zw
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bug0102' into test
parents
937ef664
d7911aaa
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1268 additions
and
113 deletions
+1268
-113
OrderLogService.php
application/api_broker/service/OrderLogService.php
+119
-0
customerinfo_details_new.html
...ation/app_broker/view/index/customerinfo_details_new.html
+4
-0
UserLog.php
application/index/controller/UserLog.php
+116
-0
UserLogService.php
application/index/service/UserLogService.php
+212
-0
users_list.html
application/index/view/member/users_list.html
+39
-6
remark_follow_index.html
application/index/view/remark/remark_follow_index.html
+39
-6
OReportModel.php
application/model/OReportModel.php
+24
-0
UPhoneFollowPp.php
application/model/UPhoneFollowPp.php
+21
-0
route.php
application/route.php
+4
-0
customerinfo_details_new.css
public/app/css/customerinfo_details_new.css
+12
-6
customerinfo_details_new_0103.js
public/app/js/customerinfo_details_new_0103.js
+328
-50
RemarkFollowIndex.js
public/resource/js/RemarkFollowIndex.js
+171
-22
user.js
public/resource/js/user.js
+179
-23
No files found.
application/api_broker/service/OrderLogService.php
View file @
6b96c979
...
@@ -884,6 +884,125 @@ class OrderLogService
...
@@ -884,6 +884,125 @@ class OrderLogService
return
$this
->
sortByTime
(
$result
);
return
$this
->
sortByTime
(
$result
);
}
}
/**
* 最新 客户动态时间轴
* @param $user_id
* @param string $search
* @param $site_id
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
selectListByUserIdAndSiteId
(
$user_id
,
$search
=
""
,
$site_id
)
{
$result
=
[];
$sort
=
0
;
//todo 1.验证订单是否存在
$oReportModel
=
new
OReportModel
();
$oMarchInModel
=
new
OMarchInModel
();
$followUpLogModel
=
new
FollowUpLogModel
();
$oPayLogModel
=
new
OPayLogModel
();
$oRefundModel
=
new
ORefundModel
();
$oBargainModel
=
new
OBargainModel
();
$field_report
=
"a.id,a.create_time,a.predict_see_time,a.intro,b.id as order_id,b.house_id,b.house_title,c.id as agent_id,c.name,c.img,d.store_name"
;
$reportData
=
$oReportModel
->
selectReportByUserId
(
$field_report
,
[
"user_id"
=>
$user_id
]);
if
(
count
(
$result
)
<=
0
&&
count
(
$reportData
)
<=
0
)
{
return
[];
}
$order_ids
=
$report_ids
=
""
;
//报备
foreach
(
$reportData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"report"
;
$house_title
=
mb_substr
(
$v
[
'house_title'
],
0
,
3
,
'utf-8'
)
.
"***"
;
$v
[
"step"
]
=
"报备【id:"
.
$v
[
'house_id'
]
.
" "
.
$house_title
.
"】"
;
$result
[
$sort
++
]
=
$v
;
$order_ids
.=
$v
[
"order_id"
]
.
","
;
$report_ids
.=
$v
[
"id"
]
.
","
;
}
$order_ids
=
rtrim
(
$order_ids
,
","
);
$report_ids
=
rtrim
(
$report_ids
,
","
);
$orderParams
[
"order_id"
]
=
array
(
"in"
,
$order_ids
);
$orderParams
[
"house_title"
]
=
array
(
"like"
,
"%"
.
trim
(
$search
)
.
"%"
);
$reportParams
[
"report_id"
]
=
array
(
"in"
,
$report_ids
);
//进场 march in
$field_march_in
=
"a.id,a.reception_id,a.create_time,b.id as order_id,b.house_id,b.house_title,c.id as agent_id,c.name,c.img,d.store_name"
;
$marchInData
=
$oMarchInModel
->
getMarchInListByOrderId
(
$field_march_in
,
$orderParams
);
if
(
count
(
$marchInData
)
>
0
)
{
foreach
(
$marchInData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"march_in"
;
$house_title
=
mb_substr
(
$v
[
'house_title'
],
0
,
3
,
'utf-8'
)
.
"***"
;
$v
[
"step"
]
=
"进场【id:"
.
$v
[
'house_id'
]
.
" "
.
$house_title
.
"】"
;
$result
[
$sort
++
]
=
$v
;
}
}
//跟进
$field_follow_up
=
"a.id,a.agent_id,a.agent_name,a.user_type,a.decision_maker,a.industry_type,a.area_requirement,a.price_requirement,a.province,a.city,
a.district,a.business_area,a.explain,a.explain_img,a.create_time,b.name,b.img,c.store_name"
;
$followUpLogData
=
$followUpLogModel
->
getFollowUpByOrderId
(
$field_follow_up
,
$reportParams
);
if
(
count
(
$followUpLogData
)
>
0
)
{
foreach
(
$followUpLogData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"follow_up_log"
;
$v
[
"step"
]
=
"跟进"
;
$v
=
$this
->
convertFollowUp
(
$v
);
$v
[
"img_path"
]
=
CHAT_IMG_URL
;
$v
[
"explain_img"
]
=
$v
[
"explain_img"
];
$result
[
$sort
++
]
=
$v
;
}
}
//收款
$field_pay_log
=
"a.id,a.create_time,b.id as order_id,b.house_id,b.house_title,c.id as agent_id,c.name,c.img,d.store_name"
;
$payLogData
=
$oPayLogModel
->
getPayLogByOrderId
(
$field_pay_log
,
$orderParams
);
if
(
count
(
$payLogData
)
>
0
)
{
foreach
(
$payLogData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"pay_log"
;
$house_title
=
mb_substr
(
$v
[
'house_title'
],
0
,
3
,
'utf-8'
)
.
"***"
;
$v
[
"step"
]
=
"收款【id:"
.
$v
[
'house_id'
]
.
" "
.
$house_title
.
"】"
;
$result
[
$sort
++
]
=
$v
;
}
}
//退款
$field_refund
=
"a.id,a.create_time,b.id as order_id,b.house_id,b.house_title,c.id as agent_id,c.name,c.img,d.store_name"
;
$refundData
=
$oRefundModel
->
getRefundByOrderId
(
$field_refund
,
$orderParams
);
if
(
count
(
$refundData
)
>
0
)
{
foreach
(
$refundData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"refund"
;
$house_title
=
mb_substr
(
$v
[
'house_title'
],
0
,
3
,
'utf-8'
)
.
"***"
;
$v
[
"step"
]
=
"退款【id:"
.
$v
[
'house_id'
]
.
" "
.
$house_title
.
"】"
;
$result
[
$sort
++
]
=
$v
;
}
}
//成交报告
$field_bargain
=
"a.id,a.create_time,a.house_number,a.is_open,b.id as order_id,b.house_id,b.house_title,c.id as agent_id,c.name,c.img,d.store_name"
;
$bargainData
=
$oBargainModel
->
getBargainByOrderId
(
$field_bargain
,
$orderParams
);
if
(
count
(
$bargainData
)
>
0
)
{
foreach
(
$bargainData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"bargain"
;
$house_title
=
mb_substr
(
$v
[
'house_title'
],
0
,
3
,
'utf-8'
)
.
"***"
;
$v
[
"step"
]
=
"成交报告【id:"
.
$v
[
'house_id'
]
.
" "
.
$house_title
.
"】"
;
$result
[
$sort
++
]
=
$v
;
}
}
return
$this
->
sortByTime
(
$result
);
}
/**
/**
* 查询流程 商铺动态
* 查询流程 商铺动态
...
...
application/app_broker/view/index/customerinfo_details_new.html
View file @
6b96c979
...
@@ -77,6 +77,10 @@
...
@@ -77,6 +77,10 @@
</div>
</div>
</div>
</div>
<div
id=
"last_dy_div"
>
<ul></ul>
</div>
<div
class=
"tab-area"
>
<div
class=
"tab-area"
>
<div
class=
"tab-active"
>
客源动态
</div>
<div
class=
"tab-active"
>
客源动态
</div>
<div>
基本信息
</div>
<div>
基本信息
</div>
...
...
application/index/controller/UserLog.php
0 → 100644
View file @
6b96c979
<?php
namespace
app\index\controller
;
use
app\index\extend\Basic
;
use
app\index\service\UserLogService
;
use
think\Request
;
/**
* Created by PhpStorm.
* User : zw
* Date : 2019/1/2
* Time : 2:23 PM
* Intro:
*/
class
UserLog
extends
Basic
{
private
$service_
;
public
function
__construct
(
Request
$request
=
null
)
{
parent
::
__construct
(
$request
);
$this
->
service_
=
new
UserLogService
();
}
/**
* 获取用户主要信息
* @return \think\Response
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
userDetail
()
{
$params
=
$this
->
params
;
/* $params = array(
"user_id" => 828,
"agent_id" => 1,
);*/
if
(
!
isset
(
$params
[
'user_id'
])
||
!
isset
(
$params
[
'agent_id'
]))
{
return
$this
->
response
(
"101"
,
"参数不全"
);
}
$user_id
=
$params
[
'user_id'
];
$agent_id
=
$params
[
'agent_id'
];
$result
=
$this
->
service_
->
userDetail
(
$user_id
,
$agent_id
);
if
(
$result
[
"code"
]
==
200
){
return
$this
->
response
(
"200"
,
"success!"
,
$result
[
"data"
]);
}
else
{
return
$this
->
response
(
"101"
,
$result
[
"msg"
]);
}
}
/**
* 订单动态
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
userLog
(){
$params
=
$this
->
params
;
/* $params = array(
"user_id" => 828,
"type" => 1,
);*/
if
(
!
isset
(
$params
[
'user_id'
])
||
!
isset
(
$params
[
'type'
]))
{
return
$this
->
response
(
"101"
,
"参数不全"
);
}
$user_id
=
$params
[
'user_id'
];
$type
=
$params
[
'type'
];
$result
=
$this
->
service_
->
userLog
(
$user_id
,
$this
->
siteId
,
$type
);
if
(
count
(
$result
)
>
0
){
return
$this
->
response
(
"200"
,
"success!"
,
$result
);
}
else
{
return
$this
->
response
(
"101"
,
"请求数据为空"
);
}
}
/**
* 电话跟进
* @return \think\Response
*/
public
function
followUpLog
(){
$params
=
$this
->
params
;
/* $params = array(
"user_id" => 828,
"page_no" => 1,
"page_size" => 15
);*/
if
(
!
isset
(
$params
[
'user_id'
]))
{
return
$this
->
response
(
"101"
,
"参数不全"
);
}
$user_id
=
$params
[
'user_id'
];
$pageNo
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$pageSize
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$result
=
$this
->
service_
->
phoneFollowUp
(
$user_id
,
$this
->
siteId
,
$pageNo
,
$pageSize
);
if
(
count
(
$result
)
>
0
){
return
$this
->
response
(
"200"
,
"success!"
,
$result
);
}
else
{
return
$this
->
response
(
"101"
,
"请求数据为空"
);
}
}
}
\ No newline at end of file
application/index/service/UserLogService.php
0 → 100644
View file @
6b96c979
<?php
namespace
app\index\service
;
use
app\api_broker\service\CallPhoneService
;
use
app\api_broker\service\ClientService
;
use
app\api_broker\service\OrderLogService
;
use
app\api_broker\service\VipService
;
use
app\model\AAgents
;
use
app\model\ACollectUser
;
use
app\model\ASite
;
use
app\model\GOperatingRecords
;
use
app\model\OReportModel
;
use
app\model\UPhoneFollowPp
;
use
app\model\Users
;
/**
* Created by PhpStorm.
* User : zw
* Date : 2019/1/2
* Time : 2:29 PM
* Intro:
*/
class
UserLogService
{
private
$agentModel
;
private
$userModel
;
private
$orderService
;
public
function
__construct
()
{
$this
->
agentModel
=
new
AAgents
();
$this
->
userModel
=
new
Users
();
$this
->
orderService
=
new
OrderLogService
();
}
/**
* 客户详情
* @param $user_id
* @param $agent_id
* @return mixed
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
userDetail
(
$user_id
,
$agent_id
)
{
//查询客户详情
$user_arr
=
$this
->
userModel
->
useraction_search_user_res
(
$user_id
,
1
);
if
(
count
(
$user_arr
)
<=
0
)
{
return
[
"code"
=>
101
,
"msg"
=>
"没找到此条用户信息"
];
}
$user_arr
[
'user_pic'
]
=
HEADERIMGURL
.
$user_arr
[
'user_pic'
];
$agents_arr
=
$this
->
agentModel
->
verifyUser
(
'name,phone'
,
''
,
[
'id'
=>
$user_arr
[
'agent_id'
]]);
$user_arr
[
'agent_info'
]
=
$agents_arr
?
$agents_arr
[
'name'
]
.
'-'
.
$agents_arr
[
'phone'
]
:
'未知'
;
$data
[
'agent_path'
]
=
AGENTHEADERIMGURL
;
/*查询站点名*/
$site_model
=
new
ASite
();
foreach
(
explode
(
','
,
$user_arr
[
'site_ids'
])
as
$site_k
=>
$site_v
)
{
$site_field
=
'city'
;
$site_params
[
'id'
]
=
$site_v
;
$site_model
=
$site_model
->
findByOne
(
$site_field
,
$site_params
);
$user_arr
[
'site_name'
][]
=
$site_model
[
"city"
];
}
/*查询站点名*/
/*修改记录部分 start*/
$records
=
new
GOperatingRecords
();
$param_
[
'user_id'
]
=
$user_id
;
$param_
[
'type'
]
=
3
;
$records_result
=
$records
->
user_history
(
$param_
);
$data
[
'user_info'
]
=
$user_arr
;
$data
[
'user_history'
]
=
$records_result
;
$param_
[
'type'
]
=
5
;
$records_invite_result
=
$records
->
user_history
(
$param_
);
$data
[
'user_invite_history'
]
=
$records_invite_result
;
/*修改记录部分 end*/
/*是否被收藏 start*/
$data
[
"is_collect"
]
=
2
;
//先判断是否已经存在数据
$field
=
'id,status'
;
$get_params
[
'agents_id'
]
=
$agent_id
;
$get_params
[
'user_id'
]
=
$user_id
;
$collect_house
=
new
ACollectUser
();
$res
=
$collect_house
->
getCollectUser
(
$field
,
$get_params
);
if
(
$res
&&
(
$res
[
0
][
'status'
]
==
1
))
{
//如果存在
$data
[
"is_collect"
]
=
1
;
}
/*是否被收藏 end*/
/*判断客户是否超过24小时保护期间 0:保护器内 1:超过保护期 start*/
//查询客户是否在保护期内
$user_service
=
new
UserService
();
$is_outstrip_twenty_four_hours
=
$user_service
->
isUserProtect
(
$user_id
);
$data
[
'is_outstrip_twenty_four_hours'
]
=
$is_outstrip_twenty_four_hours
;
/*判断客户是否超过24小时保护期间 0:保护器内 1:超过保护期 end*/
/*查询客户邀请人 start*/
/*引荐人来源 10:会员 20:b端经纪人*/
if
(
$user_arr
[
'referrer_source'
]
==
0
)
{
$user_invite_info
=
[];
}
elseif
(
$user_arr
[
'referrer_source'
]
==
10
)
{
$userArr
=
$this
->
userModel
->
selectUser
(
$user_arr
[
'referrer_id'
],
"id,user_phone"
);
if
(
!
$userArr
)
{
$user_invite_info
=
[];
}
else
{
$user_invite_info
[
'referrer_source'
]
=
$user_arr
[
'referrer_source'
];
$user_invite_info
[
'user_phone'
]
=
$userArr
[
'user_phone'
]
?
preg_replace
(
'/(\d{3})\d{4}(\d{4})/'
,
'$1****$2'
,
$userArr
[
'user_phone'
])
:
''
;
$user_invite_info
[
'id'
]
=
$userArr
[
'id'
];
}
}
else
{
$model
=
new
AAgents
();
$result
=
$model
->
searchAgentsByKeyword
(
"id,name,phone"
,
[
"id"
=>
$user_arr
[
'referrer_id'
]]);
if
(
!
$result
)
{
$user_invite_info
=
[];
}
else
{
$user_invite_info
[
'referrer_source'
]
=
$user_arr
[
'referrer_source'
];
$user_invite_info
[
'name'
]
=
$result
[
0
][
'name'
];
$user_invite_info
[
'phone'
]
=
$result
[
0
][
'phone'
];
}
}
$data
[
'user_invite_info'
]
=
$user_invite_info
;
/*查询客户邀请人 end*/
// 判断当天被拨打是否超过5次,同时判断是否当前经纪人跟当前客户是否有电话绑定
//0允许拨打 1不允许拨打
$data
[
'is_outpace_call_num'
]
=
0
;
$clientService
=
new
ClientService
();
if
(
!
$clientService
->
dialTotal
(
$user_id
))
{
$data
[
'is_outpace_call_num'
]
=
1
;
}
$model
=
new
AAgents
();
$result
=
$model
->
searchAgentsByKeyword
(
"id,name,phone"
,
[
"id"
=>
$agent_id
]);
$call
=
new
CallPhoneService
();
$result
=
$call
->
getBindNum
(
$user_arr
[
'user_phone'
],
$result
[
0
][
'phone'
]);
if
(
$result
!=
0
)
{
$data
[
'is_outpace_call_num'
]
=
0
;
}
//查询当前经纪人是否是某个客方的总监 0:可查看 1:不可查看
$data
[
'is_can_look'
]
=
$user_service
->
isUserAgentDirector
(
$user_arr
[
"agent_id"
],
$agent_id
);
$vip_services
=
new
VipService
();
//是否可以查看vip客户 0:可查看 1:不可查看
$data
[
'examine_vip'
]
=
$vip_services
->
vip
(
$agent_id
);
return
[
"code"
=>
200
,
"data"
=>
$data
];
}
/**
* 客户动态
* @param $user_id
* @param $site_id
* @param $type 1表示查最近的一条跟进,2查所有的订单更近
* @return false|mixed|null|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
userLog
(
$user_id
,
$site_id
,
$type
)
{
$result
=
$this
->
orderService
->
selectListByUserIdAndSiteId
(
$user_id
,
''
,
$site_id
);
switch
(
$type
){
case
1
:
if
(
count
(
$result
)
>
0
){
return
$result
[
0
];
}
else
{
return
null
;
}
case
2
:
return
$result
;
default
:
return
null
;
break
;
}
}
/**
* 电话跟进
* @param $user_id
* @param $site_id
* @param $page_no
* @param $page_size
*/
public
function
phoneFollowUp
(
$user_id
,
$site_id
,
$page_no
,
$page_size
)
{
// $userParams["type"] = 0; //电话跟进 $userParams["type"] = 1; //普通跟进
$uPhoneFollowModel
=
new
UPhoneFollowPp
(
$site_id
);
//电话跟进
$userParams
[
"user_id"
]
=
$user_id
;
$field_user_follow
=
"a.id,a.content,a.user_id,a.agent_id,a.type,a.create_time,a.user_status,b.name,b.phone,b.img"
;
$bargainData
=
$uPhoneFollowModel
->
getFollowUpList
(
$field_user_follow
,
$userParams
,
$page_no
,
$page_size
);
return
$bargainData
;
}
}
\ No newline at end of file
application/index/view/member/users_list.html
View file @
6b96c979
{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>
.follow-up-modal-list-area
{
height
:
258px
;
overflow-y
:
scroll
;
}
.modal-body1
{
.modal-body1
{
height
:
716px
;
height
:
716px
;
overflow-y
:
auto
;
overflow-y
:
auto
;
...
@@ -254,7 +258,12 @@
...
@@ -254,7 +258,12 @@
.modal-title-genjing
{
.modal-title-genjing
{
height
:
36px
;
height
:
36px
;
line-height
:
36px
;
line-height
:
36px
;
border-top
:
3px
solid
#ccc
;
font-weight
:
600
;
font-size
:
16px
;
}
.modal-title-genjing
span
{
cursor
:
pointer
;
margin-right
:
20px
;
}
}
.center-btn
{
.center-btn
{
...
@@ -867,21 +876,45 @@
...
@@ -867,21 +876,45 @@
</thead>
</thead>
</table>
</table>
<h4
class=
"modal-title-genjing clear text-info"
>
<div>
客户跟进
<div
class=
"text-info"
style=
"margin: 2px;font-size: 16px;"
>
最近一条带看动态
</div>
</h4>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<tbody
class=
"text-center user-log-detail"
>
</tbody>
</table>
</div>
<div
class=
"clear modal-title-genjing"
>
<span
class=
"modal-title-genjing-con"
>
<span
class=
"text-info"
>
客户动态
</span>
<span>
带看动态
</span>
</span>
</div>
<div
id=
"gen_jing_user"
>
<div
id=
"gen_jing_user"
>
<div
class=
"followup-modal-list-area"
>
<div>
<div
class=
"follow-up-modal-list-area"
style=
"height: 212px"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<tbody
class=
"text-center"
id=
"caozuo_table2"
>
<tbody
class=
"text-center"
id=
"caozuo_table2"
>
</tbody>
</tbody>
<tr
class=
"text-center is-show-more-followlog"
>
<td
colspan=
"3"
>
<span
class=
"user-log-more text-info"
style=
"cursor: pointer;"
>
加载更多
</span>
</td>
</tr>
</table>
</table>
</div>
</div>
<div
class=
"follow-up-modal-list-area"
style=
"height: 212px"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<tbody
class=
"text-center"
id=
"caozuo_table_log"
>
</tbody>
</table>
</div>
</div>
<div
class=
"clear margin-top-ld"
>
<div
class=
"clear margin-top-ld"
>
</div>
</div>
<label
class=
"col-sm-3 control-label"
>
跟进
<span
class=
"text-danger"
>
(必填)
</span>
:
</label>
<label
class=
"col-sm-3 control-label"
>
跟进
<span
class=
"text-danger"
>
(必填)
</span>
:
</label>
<div
class=
"col-sm-9"
>
<div
class=
"col-sm-9"
>
<textarea
class=
"form-control"
rows=
"
3
"
id=
"genj_text"
></textarea>
<textarea
class=
"form-control"
rows=
"
2
"
id=
"genj_text"
></textarea>
</div>
</div>
...
...
application/index/view/remark/remark_follow_index.html
View file @
6b96c979
{layout name="global/frame_tpl" /}
{layout name="global/frame_tpl" /}
<input
type=
"hidden"
class=
"page-load"
id=
"RemarkFollowIndex"
/>
<input
type=
"hidden"
class=
"page-load"
id=
"RemarkFollowIndex"
/>
<style>
<style>
.follow-up-modal-list-area
{
height
:
258px
;
overflow-y
:
scroll
;
}
.modal-body1
{
.modal-body1
{
height
:
716px
;
height
:
716px
;
overflow-y
:
auto
;
overflow-y
:
auto
;
...
@@ -246,7 +250,12 @@
...
@@ -246,7 +250,12 @@
.modal-title-genjing
{
.modal-title-genjing
{
height
:
36px
;
height
:
36px
;
line-height
:
36px
;
line-height
:
36px
;
border-top
:
3px
solid
#ccc
;
font-weight
:
600
;
font-size
:
16px
;
}
.modal-title-genjing
span
{
cursor
:
pointer
;
margin-right
:
20px
;
}
}
.center-btn
{
.center-btn
{
...
@@ -586,21 +595,45 @@
...
@@ -586,21 +595,45 @@
</thead>
</thead>
</table>
</table>
<h4
class=
"modal-title-genjing clear text-info"
>
<div>
客户跟进
<div
class=
"text-info"
style=
"margin: 2px;font-size: 16px;"
>
最近一条带看动态
</div>
</h4>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<tbody
class=
"text-center user-log-detail"
>
</tbody>
</table>
</div>
<div
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>-->
</div>
<div
id=
"gen_jing_user"
>
<div
id=
"gen_jing_user"
>
<div
class=
"followup-modal-list-area"
>
<div>
<div
class=
"follow-up-modal-list-area"
style=
"height: 212px"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<tbody
class=
"text-center"
id=
"caozuo_table2"
>
<tbody
class=
"text-center"
id=
"caozuo_table2"
>
</tbody>
</tbody>
<tr
class=
"text-center"
>
<td
colspan=
"3"
>
<span
class=
"user-log-more text-info"
style=
"cursor: pointer;"
>
加载更多
</span>
</td>
</tr>
</table>
</table>
</div>
</div>
<div
class=
"follow-up-modal-list-area"
style=
"height: 212px"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<tbody
class=
"text-center"
id=
"caozuo_table_log"
>
</tbody>
</table>
</div>
</div>
<div
class=
"clear margin-top-ld"
>
<div
class=
"clear margin-top-ld"
>
</div>
</div>
<label
class=
"col-sm-3 control-label"
>
跟进
<span
class=
"text-danger"
>
(必填)
</span>
:
</label>
<label
class=
"col-sm-3 control-label"
>
跟进
<span
class=
"text-danger"
>
(必填)
</span>
:
</label>
<div
class=
"col-sm-9"
>
<div
class=
"col-sm-9"
>
<textarea
class=
"form-control"
rows=
"
3
"
id=
"genj_text"
></textarea>
<textarea
class=
"form-control"
rows=
"
2
"
id=
"genj_text"
></textarea>
</div>
</div>
<label
class=
"col-sm-3 control-label"
>
状态标签
<span
class=
"text-danger"
>
(必填)
</span>
:
</label>
<label
class=
"col-sm-3 control-label"
>
状态标签
<span
class=
"text-danger"
>
(必填)
</span>
:
</label>
...
...
application/model/OReportModel.php
View file @
6b96c979
...
@@ -162,6 +162,30 @@ class OReportModel extends Model
...
@@ -162,6 +162,30 @@ class OReportModel extends Model
->
select
();
->
select
();
}
}
/**
* 获取最近一条报备记录
* @param string $filed
* @param $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getReport
(
$filed
=
"id"
,
$params
){
$where_
=
[];
if
(
isset
(
$params
[
"user_id"
]))
{
$where_
[
"a.user_id"
]
=
$params
[
"user_id"
];
}
return
$this
->
db
->
field
(
$filed
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id = b.f_id"
,
"left"
)
->
join
(
"a_agents c"
,
"a.report_agent_id = c.id"
,
"left"
)
->
where
(
$where_
)
->
order
(
"a.create_time desc"
)
->
limit
(
1
)
->
select
();
}
/**
/**
* @param string $filed
* @param string $filed
* @param $params
* @param $params
...
...
application/model/UPhoneFollowPp.php
View file @
6b96c979
...
@@ -122,6 +122,7 @@ class UPhoneFollowPp extends BaseModel
...
@@ -122,6 +122,7 @@ class UPhoneFollowPp extends BaseModel
}
}
/*zw start**/
/*zw start**/
public
function
getFollowUpListByUserId
(
$field
,
$params
)
public
function
getFollowUpListByUserId
(
$field
,
$params
)
{
{
$where_
=
[];
$where_
=
[];
...
@@ -144,6 +145,26 @@ class UPhoneFollowPp extends BaseModel
...
@@ -144,6 +145,26 @@ class UPhoneFollowPp extends BaseModel
}
}
public
function
getFollowUpList
(
$field
,
$params
,
$page_no
,
$page_size
)
{
$where_
=
[];
if
(
isset
(
$params
[
"user_id"
]))
{
$where_
[
"a.user_id"
]
=
$params
[
"user_id"
];
}
$result
=
$this
->
UPhoneFollowPp
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"a_agents b"
,
"a.agent_id = b.id"
,
"left"
)
->
where
(
$where_
)
->
order
(
"a.create_time desc"
)
->
page
(
$page_no
)
->
limit
(
$page_size
)
->
select
();
return
$result
;
}
/*zw end**/
/*zw end**/
public
function
phone_up_list
(
$pagesize
,
$pagenum
)
public
function
phone_up_list
(
$pagesize
,
$pagenum
)
...
...
application/route.php
View file @
6b96c979
...
@@ -393,6 +393,10 @@ Route::group('index', [
...
@@ -393,6 +393,10 @@ Route::group('index', [
'getBlackListInfo'
=>
[
'index/broker/getBlackListInfo'
,
[
'method'
=>
'GET|POST'
]
],
//黑名单详情
'getBlackListInfo'
=>
[
'index/broker/getBlackListInfo'
,
[
'method'
=>
'GET|POST'
]
],
//黑名单详情
'delAgentsBlackListImg'
=>
[
'index/broker/delAgentsBlackListImg'
,
[
'method'
=>
'GET|POST'
]
],
//黑名单删除图片
'delAgentsBlackListImg'
=>
[
'index/broker/delAgentsBlackListImg'
,
[
'method'
=>
'GET|POST'
]
],
//黑名单删除图片
'userDetail'
=>
[
'index/UserLog/userDetail'
,
[
'method'
=>
'get|post'
]],
'userLog'
=>
[
'index/UserLog/userLog'
,
[
'method'
=>
'get|post'
]],
'followUpLog'
=>
[
'index/UserLog/followUpLog'
,
[
'method'
=>
'get|post'
]],
'dailyDetail'
=>
[
'index/DailyPaper/dailyDetail'
,
[
'method'
=>
'get|post'
]],
'dailyDetail'
=>
[
'index/DailyPaper/dailyDetail'
,
[
'method'
=>
'get|post'
]],
'addDaily'
=>
[
'index/DailyPaper/addDaily'
,
[
'method'
=>
'get|post'
]],
'addDaily'
=>
[
'index/DailyPaper/addDaily'
,
[
'method'
=>
'get|post'
]],
'commitCheck'
=>
[
'index/DailyPaper/commitCheck'
,
[
'method'
=>
'get|post'
]],
'commitCheck'
=>
[
'index/DailyPaper/commitCheck'
,
[
'method'
=>
'get|post'
]],
...
...
public/app/css/customerinfo_details_new.css
View file @
6b96c979
...
@@ -159,7 +159,8 @@ header .icon-link{
...
@@ -159,7 +159,8 @@ header .icon-link{
padding-bottom
:
1.7rem
;
padding-bottom
:
1.7rem
;
}
}
.sec-dynamic
{}
.sec-dynamic
{}
.sec-dynamic
>
ul
>
li
{
.sec-dynamic
>
ul
>
li
,
#last_dy_div
>
ul
>
li
{
overflow
:
hidden
;
overflow
:
hidden
;
font-size
:
.3rem
;
font-size
:
.3rem
;
padding
:
.35rem
.3rem
;
padding
:
.35rem
.3rem
;
...
@@ -168,10 +169,12 @@ header .icon-link{
...
@@ -168,10 +169,12 @@ header .icon-link{
.sec-dynamic
>
ul
>
li
+
li
{
.sec-dynamic
>
ul
>
li
+
li
{
margin-top
:
.2rem
;
margin-top
:
.2rem
;
}
}
.sec-dynamic
>
ul
>
li
.li-sp-active
{
.sec-dynamic
>
ul
>
li
.li-sp-active
,
#last_dy_div
>
ul
>
li
.li-sp-active
{
background-color
:
#fcba38
;
background-color
:
#fcba38
;
}
}
.sec-dynamic
>
ul
>
li
.li-sp-active-top
{
.sec-dynamic
>
ul
>
li
.li-sp-active-top
,
#last_dy_div
>
ul
>
li
.li-sp-active-top
{
background-color
:
#fcba38
;
background-color
:
#fcba38
;
}
}
...
@@ -183,16 +186,19 @@ header .icon-link{
...
@@ -183,16 +186,19 @@ header .icon-link{
height
:
.37rem
;
height
:
.37rem
;
background
:
url(/app/images/icon_dynamic@2x.png)
no-repeat
center
center
/
1.31rem
.37rem
;
background
:
url(/app/images/icon_dynamic@2x.png)
no-repeat
center
center
/
1.31rem
.37rem
;
}
}
.sec-dynamic
>
ul
>
li
{
.sec-dynamic
>
ul
>
li
,
#last_dy_div
>
ul
>
li
{
position
:
relative
;
position
:
relative
;
}
}
.li-top
{
.li-top
{
overflow
:
hidden
;
overflow
:
hidden
;
}
}
.sec-dynamic
>
ul
>
li
>
.li-top
>
div
{
.sec-dynamic
>
ul
>
li
>
.li-top
>
div
,
#last_dy_div
>
ul
>
li
>
.li-top
>
div
{
float
:
left
;
float
:
left
;
}
}
.sec-dynamic
>
ul
>
li
>
.li-top
>
div
.li-top-right
{
.sec-dynamic
>
ul
>
li
>
.li-top
>
div
.li-top-right
,
#last_dy_div
>
ul
>
li
>
.li-top
>
div
.li-top-right
{
/*width: 6.05rem;*/
/*width: 6.05rem;*/
width
:
5.7rem
;
width
:
5.7rem
;
}
}
...
...
public/app/js/customerinfo_details_new_
old
.js
→
public/app/js/customerinfo_details_new_
0103
.js
View file @
6b96c979
...
@@ -3,6 +3,17 @@ var _doc = $(document),
...
@@ -3,6 +3,17 @@ var _doc = $(document),
_customerId
=
getUrlParam
(
'customerId'
);
_customerId
=
getUrlParam
(
'customerId'
);
/******
*
report 报备
march_in 进场
follow_up_log 跟进
pay_log 收款
refund 退款
bargain 成交报告
*
*****/
$
(
function
(){
$
(
function
(){
$
(
document
.
body
).
show
();
$
(
document
.
body
).
show
();
...
@@ -56,7 +67,13 @@ function loadMain(){
...
@@ -56,7 +67,13 @@ function loadMain(){
_userPhone
=
localStorage
.
getItem
(
'userphone'
),
//当前用户的手机号
_userPhone
=
localStorage
.
getItem
(
'userphone'
),
//当前用户的手机号
_selectPhone
=
''
,
//拨号列表里选择的号码,也是当前用户对应的手机号,可能和_userPhone是一样的
_selectPhone
=
''
,
//拨号列表里选择的号码,也是当前用户对应的手机号,可能和_userPhone是一样的
_customerPhone
=
''
,
//当前客户的手机号
_customerPhone
=
''
,
//当前客户的手机号
_backPhone
=
''
;
//绑定之后返回的号码
_backPhone
=
''
,
//绑定之后返回的号码
_temp_follow_id
=
''
,
//临时的跟进id,在绑定手机号的同时,会产生出来
_user_status
=
''
,
//状态标签上次的值
is_outpace_call_num
=
1
,
//拨打电话0:未超过限制 1:超过限制
_pageSize
=
10
,
_followUpPage
=
1
,
//跟进分页页数
_daikanPage
=
1
;
//带看分页页数
if
(
_userId
){
if
(
_userId
){
...
@@ -67,7 +84,7 @@ function loadMain(){
...
@@ -67,7 +84,7 @@ function loadMain(){
//获取客户基本信息
//获取客户基本信息
_userId
&&
$
.
ajax
({
_userId
&&
$
.
ajax
({
type
:
'POST'
,
type
:
'POST'
,
url
:
'/
broker/useraction_search
'
,
url
:
'/
index/userDetail
'
,
data
:
{
data
:
{
'AuthToken'
:
_token
,
'AuthToken'
:
_token
,
'user_id'
:
Number
(
_customerId
),
//客户id
'user_id'
:
Number
(
_customerId
),
//客户id
...
@@ -77,7 +94,6 @@ function loadMain(){
...
@@ -77,7 +94,6 @@ function loadMain(){
dataType
:
'json'
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
success
:
function
(
data
)
{
console
.
log
(
data
);
if
(
typeof
data
===
'object'
)
{
if
(
typeof
data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
.
is_collect
==
'1'
){
if
(
data
.
data
.
is_collect
==
'1'
){
...
@@ -100,20 +116,27 @@ function loadMain(){
...
@@ -100,20 +116,27 @@ function loadMain(){
$
(
'#price_demand'
).
html
(
data
[
'data'
][
'user_info'
][
'price_demand'
]
+
'元/月'
);
$
(
'#price_demand'
).
html
(
data
[
'data'
][
'user_info'
][
'price_demand'
]
+
'元/月'
);
$
(
'#area_demand'
).
html
(
data
[
'data'
][
'user_info'
][
'area_demand'
]
+
'㎡'
);
$
(
'#area_demand'
).
html
(
data
[
'data'
][
'user_info'
][
'area_demand'
]
+
'㎡'
);
is_outpace_call_num
=
data
[
'data'
][
'is_outpace_call_num'
];
//拨打电话,0:未超过限制 1:超过限制
$
(
'#kefang'
).
html
(
data
[
'data'
][
'user_info'
][
'agentinfo'
]);
$
(
'#kefang'
).
html
(
data
[
'data'
][
'user_info'
][
'agent
_
info'
]);
var
_kefang_tel
=
data
[
'data'
][
'user_info'
][
'agentinfo'
].
split
(
'-'
)[
1
];
var
_kefang_tel
=
data
[
'data'
][
'user_info'
][
'agent
_
info'
].
split
(
'-'
)[
1
];
if
(
is_mobile
(
_kefang_tel
)
==
1
){
if
(
is_mobile
(
_kefang_tel
)
==
1
){
$
(
'#kefang'
).
attr
(
'data-tel'
,
_kefang_tel
).
next
().
css
(
'display'
,
'inline-block'
);
$
(
'#kefang'
).
attr
(
'data-tel'
,
_kefang_tel
).
next
().
css
(
'display'
,
'inline-block'
);
};
};
if
(
data
[
'data'
][
'user_info'
][
'referrer_source'
]
==
10
){
$
(
'#zhuanjieshao'
).
html
(
'是'
);
$
(
'#yaoqingren'
).
html
(
hideTel
(
data
[
'data'
][
'user_info'
][
'referrer_user'
].
split
(
'-'
)[
1
])
+
',客户ID:'
+
data
[
'data'
][
'user_info'
][
'referrer_id'
]).
attr
(
'data-tel'
,
data
[
'data'
][
'user_info'
][
'referrer_user'
].
split
(
'-'
)[
1
]);
//邀请人
}
else
{
$
(
'#zhuanjieshao'
).
html
(
'否'
);
$
(
'#yaoqingren'
).
html
(
data
[
'data'
][
'user_info'
][
'referrer_user'
]).
attr
(
'data-tel'
,
data
[
'data'
][
'user_info'
][
'referrer_user'
].
split
(
'-'
)[
1
]);
//邀请人
$
(
'#yaoqingren'
).
html
(
data
[
'data'
][
'user_info'
][
'referrer_user'
]).
attr
(
'data-tel'
,
data
[
'data'
][
'user_info'
][
'referrer_user'
].
split
(
'-'
)[
1
]);
//邀请人
}
var
_yaoqingren_tel
=
data
[
'data'
][
'user_info'
][
'referrer_user'
].
split
(
'-'
)[
1
];
var
_yaoqingren_tel
=
data
[
'data'
][
'user_info'
][
'referrer_user'
].
split
(
'-'
)[
1
];
if
(
is_mobile
(
_yaoqingren_tel
)
==
1
){
if
(
is_mobile
(
_yaoqingren_tel
)
==
1
){
$
(
'#yaoqingren'
).
attr
(
'data-tel'
,
_yaoqingren_tel
).
next
().
css
(
'display'
,
'inline-block'
);
$
(
'#yaoqingren'
).
attr
(
'data-tel'
,
_yaoqingren_tel
).
next
().
css
(
'display'
,
'inline-block'
);
};
};
$
(
'#isvip'
).
html
(
data
[
'data'
][
'user_info'
][
'vip'
]
?
'是'
:
'否'
);
//是否是vip
$
(
'#isvip'
).
html
(
Number
(
data
[
'data'
][
'user_info'
][
'vip'
])
?
'是'
:
'否'
);
//是否是vip
if
(
data
[
'data'
][
'user_info'
][
'source'
]
==
10
){
if
(
data
[
'data'
][
'user_info'
][
'source'
]
==
10
){
$
(
'#create_type'
).
html
(
'APP注册'
);
//产生类型
$
(
'#create_type'
).
html
(
'APP注册'
);
//产生类型
}
else
if
(
data
[
'data'
][
'user_info'
][
'source'
]
==
20
){
}
else
if
(
data
[
'data'
][
'user_info'
][
'source'
]
==
20
){
...
@@ -121,13 +144,79 @@ function loadMain(){
...
@@ -121,13 +144,79 @@ function loadMain(){
};
};
$
(
'#register_time'
).
html
(
data
[
'data'
][
'user_info'
][
'registration_time'
]);
//注册时间
$
(
'#register_time'
).
html
(
data
[
'data'
][
'user_info'
][
'registration_time'
]);
//注册时间
$
(
'#login_time'
).
html
(
data
[
'data'
][
'user_info'
][
'first_login_time'
]);
//下载登录时间
$
(
'#login_time'
).
html
(
data
[
'data'
][
'user_info'
][
'first_login_time'
]);
//下载登录时间
if
(
data
[
'data'
][
'user_info'
][
'source_intro'
]){
if
(
data
[
'data'
][
'user_info'
][
'source_intro'
]
==
'0'
){
$
(
'#source_intro'
).
parent
().
hide
();
}
else
{
$
(
'#source_intro'
).
html
(
sourceIntro
(
data
[
'data'
][
'user_info'
][
'source_intro'
]));
//客户来源
}
}
else
{
$
(
'#source_intro'
).
parent
().
hide
();
};
$
(
'#add_time'
).
html
(
data
[
'data'
][
'user_info'
][
'create_time'
]);
//创建时间
$
(
'#add_time'
).
html
(
data
[
'data'
][
'user_info'
][
'create_time'
]);
//创建时间
$
(
'#customer_pic'
).
attr
(
'src'
,
data
[
'data'
][
'user_info'
][
'user_pic'
]);
$
(
'#customer_pic'
).
attr
(
'src'
,
data
[
'data'
][
'user_info'
][
'user_pic'
]);
_customerPhone
=
data
[
'data'
][
'user_info'
][
'user_phone'
];
//当前客户手机号
_customerPhone
=
data
[
'data'
][
'user_info'
][
'user_phone'
];
//当前客户手机号
$
(
'#customer_id'
).
html
(
'客户ID:'
+
_customerId
+
','
);
$
(
'#customer_id'
).
html
(
'客户ID:'
+
_customerId
+
','
);
$
(
'#customer_phone'
).
html
(
hideTel
(
data
[
'data'
][
'user_info'
][
'user_phone'
]));
$
(
'#customer_phone'
).
html
(
hideTel
(
data
[
'data'
][
'user_info'
][
'user_phone'
]));
if
(
data
[
'data'
][
'is_outstrip_twenty_four_hours'
]
==
0
){
//在保护期内
$
(
'#baohuqi_span'
).
show
();
};
//保护期内和是否能拨打没有关系
if
(
data
[
'data'
][
'user_info'
][
'vip'
]
==
1
){
if
(
data
[
'data'
][
'examine_vip'
]
==
0
){
//或者examine_vip为0时,是否可以查看vip客户 0:可查看 1:不可查看
$
(
'.call-btn-main'
).
show
();
}
else
{
if
((
data
[
'data'
][
'user_info'
][
'agent_id'
]
==
_userId
)
||
(
data
[
'data'
][
'is_can_look'
]
==
0
)){
//客方与当前用户一致时
//或者is_can_look为0时,总监,总监是客方的总监
$
(
'.call-btn-main'
).
show
();
}
else
{}
};
}
else
{
//如果不是vip,则按照以前的逻辑走
if
(
data
[
'data'
][
'is_outstrip_twenty_four_hours'
]
==
0
){
//在保护期内
$
(
'#baohuqi_span'
).
show
();
if
(
data
[
'data'
][
'user_info'
][
'agent_id'
]
==
_userId
){
//客方与当前用户一致时
//或者is_can_look为0时,总监,总监是客方的总监
$
(
'.call-btn-main'
).
show
();
}
else
{}
}
else
{
//超过保护期
$
(
'.call-btn-main'
).
show
();
}
}
$
(
'#call_modal_phone_self'
).
val
(
_userPhone
);
$
(
'#call_modal_phone_self'
).
val
(
_userPhone
);
//客户来源类型判断
function
sourceIntro
(
m
)
{
var
_m
=
Number
(
m
);
//来源简述 1网络 2客户介绍 3 朋友介绍 4上门挂牌 5打跟进 6驻守 7 其他
if
(
_m
===
1
){
return
'网络'
;
}
else
if
(
_m
===
2
){
return
'客户介绍'
;
}
else
if
(
_m
===
3
){
return
'朋友介绍'
;
}
else
if
(
_m
===
4
){
return
'上门挂牌'
;
}
else
if
(
_m
===
5
){
return
'打跟进'
;
}
else
if
(
_m
===
6
){
return
'驻守'
;
}
else
if
(
_m
===
7
){
return
'其他'
;
}
else
{
return
'other'
;
}
};
function
landlordType
(
m
)
{
function
landlordType
(
m
)
{
var
_m
=
Number
(
m
);
var
_m
=
Number
(
m
);
if
(
_m
===
0
){
if
(
_m
===
0
){
...
@@ -141,11 +230,25 @@ function loadMain(){
...
@@ -141,11 +230,25 @@ function loadMain(){
}
}
};
};
$
(
'#add_city_type_area'
).
html
(
'<span class="flex-center">{0}</span><span class="flex-center">{1}</span>'
.
stringFormatObj
({
$
(
'#add_city_type_area'
).
html
(
'<span class="flex-center site-span">{0}</span><span class="flex-center">{1}</span>{2}'
.
stringFormatObj
({
'0'
:
data
[
'data'
][
'user_info'
][
'city'
]
+
data
[
'data'
][
'user_info'
][
'disc'
],
'0'
:
dealSiteName
(
data
[
'data'
][
'user_info'
][
'site_name'
]),
'1'
:
landlordType
(
data
[
'data'
][
'user_info'
][
'user_label'
])
'1'
:
landlordType
(
data
[
'data'
][
'user_info'
][
'user_label'
]),
'2'
:
(
data
[
'data'
][
'user_info'
][
'vip'
]
==
1
)?
'<span class="flex-center site-span">VIP</span>'
:
''
}));
}));
//处理返回的站点名字
function
dealSiteName
(
arr
){
if
(
arr
){
if
(
Array
.
isArray
(
arr
)){
return
arr
.
join
(
','
);
}
else
{
return
arr
;
}
}
else
{
return
''
;
}
};
if
(
data
[
'data'
][
'user_info'
][
'agent_id'
]
==
_userId
||
localStorage
.
getItem
(
'userlevel'
)
!=
'10'
){
if
(
data
[
'data'
][
'user_info'
][
'agent_id'
]
==
_userId
||
localStorage
.
getItem
(
'userlevel'
)
!=
'10'
){
...
@@ -170,9 +273,35 @@ function loadMain(){
...
@@ -170,9 +273,35 @@ function loadMain(){
});
});
};
};
//发送消息没有权限控制
$
(
'#return_btn'
).
show
().
click
(
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
var
user_id
=
_customerId
;
var
user_name
=
data
[
'data'
][
'user_info'
][
'user_name'
];
var
user_phone
=
data
[
'data'
][
'user_info'
][
'user_phone'
];
var
user_nick
=
data
[
'data'
][
'user_info'
][
'user_nick'
];
var
user_img
=
data
[
'data'
][
'user_info'
][
'user_pic'
];
Compatible
({
paraIos
:
{
'route'
:
'onSendClick'
,
'userId'
:
Number
(
user_id
),
'userName'
:
String
(
user_name
),
'userPhone'
:
String
(
user_phone
),
'userImg'
:
String
(
user_img
)
},
fnAndroid
:
function
()
{
//window.android.onClientEdit(String(_customerId));
window
.
android
.
onSendClick
(
String
(
user_id
),
String
(
user_name
),
String
(
user_phone
),
String
(
user_img
))
},
fn
:
function
()
{
console
.
warn
(
'error'
);
}
});
});
//动态详情列表
//动态详情列表
function
dealSp
(
obj
){
function
dealSp
(
obj
){
console
.
log
(
obj
[
'img_path'
]
+
obj
[
'explain_img'
]);
return
'<p>属于哪类客户:{0}</p><p>第一决策人:{1}</p><p>租商铺做什么:{2}</p><p>对面积的要求:{3}</p><p>对价格的要求:{4}</p><p>所在区域:{5}</p><p>补充说明:{6}</p>{7}'
.
stringFormatObj
({
return
'<p>属于哪类客户:{0}</p><p>第一决策人:{1}</p><p>租商铺做什么:{2}</p><p>对面积的要求:{3}</p><p>对价格的要求:{4}</p><p>所在区域:{5}</p><p>补充说明:{6}</p>{7}'
.
stringFormatObj
({
'0'
:
obj
[
'user_type'
],
'0'
:
obj
[
'user_type'
],
'1'
:
obj
[
'decision_maker'
],
'1'
:
obj
[
'decision_maker'
],
...
@@ -191,9 +320,40 @@ function loadMain(){
...
@@ -191,9 +320,40 @@ function loadMain(){
'1'
:
obj
[
'intro'
]
'1'
:
obj
[
'intro'
]
});
});
};
};
function
getFollowUp
(){
//获取跟进信息
_userId
&&
$
.
ajax
({
type
:
'get'
,
url
:
'/index/followUpLog'
,
data
:
{
'AuthToken'
:
_token
,
"user_id"
:
_customerId
,
"page_no"
:
_followUpPage
,
"page_size"
:
_pageSize
},
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
data2
)
{
if
(
typeof
data2
===
'object'
)
{
if
(
data2
.
code
==
200
)
{
var
_htmlTemp
=
''
;
var
_htmlTemp
=
''
;
if
(
data
[
'data'
][
'user_date'
]
&&
data
[
'data'
][
'user_date'
].
length
>
0
){
$
.
each
(
data
[
'data'
][
'user_date'
],
function
(
i
,
item
)
{
if
(
data2
[
'data'
]
&&
data2
[
'data'
].
length
>
0
){
/**********
*
report 报备
march_in 进场
follow_up_log 跟进
pay_log 收款
refund 退款
bargain 成交报告
*
* **********/
$
.
each
(
data
[
'data'
],
function
(
i
,
item
)
{
_htmlTemp
+=
'<li class="{7}"><div class="li-top"><div class="li-top-left"><img src="{0}" onerror="javascript:this.src=
\'
/app/images/ic_default_headpic.png
\'
" /></div><div class="li-top-right"><div class="li-top-right-header"><div>{1}</div><div>{3}</div></div><p>{2}{5}</p>{6}</div></div></li>'
.
stringFormatObj
({
_htmlTemp
+=
'<li class="{7}"><div class="li-top"><div class="li-top-left"><img src="{0}" onerror="javascript:this.src=
\'
/app/images/ic_default_headpic.png
\'
" /></div><div class="li-top-right"><div class="li-top-right-header"><div>{1}</div><div>{3}</div></div><p>{2}{5}</p>{6}</div></div></li>'
.
stringFormatObj
({
'0'
:
data
[
'data'
][
'agent_path'
]
+
item
[
'img'
],
'0'
:
data
[
'data'
][
'agent_path'
]
+
item
[
'img'
],
'1'
:
item
[
'name'
],
'1'
:
item
[
'name'
],
...
@@ -209,6 +369,28 @@ function loadMain(){
...
@@ -209,6 +369,28 @@ function loadMain(){
$
(
'.sec-dynamic>ul'
).
html
(
'<div id="zanwu_data" class="zanwu_data" style="display: block;">暂无数据...</div>'
);
$
(
'.sec-dynamic>ul'
).
html
(
'<div id="zanwu_data" class="zanwu_data" style="display: block;">暂无数据...</div>'
);
};
};
}
else
{
layerTipsX
(
data2
[
'msg'
]);
};
}
else
{
layerTipsX
(
'数据错误'
);
};
},
error
:
function
()
{
layerTipsX
(
'error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
){
layerTipsX
(
'请求超时'
);
};
}
});
}
getFollowUp
();
//客方修改日志
//客方修改日志
var
_htmlTemp2
=
''
;
var
_htmlTemp2
=
''
;
...
@@ -220,9 +402,26 @@ function loadMain(){
...
@@ -220,9 +402,26 @@ function loadMain(){
'2'
:
item
[
'name'
]
'2'
:
item
[
'name'
]
});
});
});
});
$
(
'.record-main>ul'
).
html
(
_htmlTemp2
);
$
(
'#modify_kefang_ul'
).
html
(
_htmlTemp2
);
}
else
{
$
(
'#modify_kefang_ul'
).
html
(
'<div id="zanwu_data" class="zanwu_data" style="display: block;">暂无数据...</div>'
);
}
//客方邀请人(介绍人)日志
var
_htmlTemp3
=
''
;
if
(
data
[
'data'
][
'user_invite_history'
].
length
>
0
){
$
.
each
(
data
[
'data'
][
'user_invite_history'
],
function
(
i
,
item
)
{
_htmlTemp3
+=
'<li><div><p>操作时间</p><p>{0}</p></div><div><span class="dot-block"><mark></mark></span><p>{1}</p><p>操作人:{2}{3}</p></div></li>'
.
stringFormatObj
({
'0'
:
item
[
'create_time'
]?
item
[
'create_time'
].
split
(
' '
)[
0
]:
item
[
'create_time'
],
'1'
:
item
[
'remark'
],
'2'
:
item
[
'name'
],
//'3': (item['referrer_source'] == 10)?('<span>客户ID:'+item['referrer_id']+'</span>'):''
'3'
:
''
});
});
$
(
'#modify_jieshaoren_ul'
).
html
(
_htmlTemp3
);
}
else
{
}
else
{
$
(
'
.record-main>
ul'
).
html
(
'<div id="zanwu_data" class="zanwu_data" style="display: block;">暂无数据...</div>'
);
$
(
'
#modify_jieshaoren_
ul'
).
html
(
'<div id="zanwu_data" class="zanwu_data" style="display: block;">暂无数据...</div>'
);
}
}
//点击收藏按钮触发的事件
//点击收藏按钮触发的事件
...
@@ -296,11 +495,12 @@ function loadMain(){
...
@@ -296,11 +495,12 @@ function loadMain(){
});
});
//标签没有默认状态了
//标签没有默认状态了
// if(data['data']['user_info']['user_status'] == 0 || data['data']['user_info']['user_status'] == 1 || data['data']['user_info']['user_status'] == -1 ){
var
_data_user_status
=
data
[
'data'
][
'user_info'
][
'user_status'
];
// _markAreaObj.find('a[data-markid="'+data['data']['user_info']['user_status']+'"]').addClass('genjin-mark-active').siblings().removeClass('genjin-mark-active');
if
(
_data_user_status
==
0
||
_data_user_status
==
1
||
_data_user_status
==
-
1
){
// }else{
_user_status
=
_data_user_status
;
// layerTipsX('状态标签返回有误');
}
else
{
// }
layerTipsX
(
'状态标签返回有误'
);
}
}
else
{
}
else
{
layerTipsX
(
data
[
'msg'
]);
layerTipsX
(
data
[
'msg'
]);
...
@@ -310,7 +510,6 @@ function loadMain(){
...
@@ -310,7 +510,6 @@ function loadMain(){
};
};
},
},
error
:
function
()
{
error
:
function
()
{
console
.
log
(
'aa'
);
layerTipsX
(
'error'
);
layerTipsX
(
'error'
);
},
},
complete
:
function
(
xhr
,
textStatus
){
complete
:
function
(
xhr
,
textStatus
){
...
@@ -320,6 +519,10 @@ function loadMain(){
...
@@ -320,6 +519,10 @@ function loadMain(){
}
}
});
});
//获取跟进标签列表信息
//获取跟进标签列表信息
_userId
&&
$
.
ajax
({
_userId
&&
$
.
ajax
({
type
:
'GET'
,
type
:
'GET'
,
...
@@ -391,24 +594,27 @@ function loadMain(){
...
@@ -391,24 +594,27 @@ function loadMain(){
e
.
preventDefault
();
e
.
preventDefault
();
e
.
stopPropagation
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
var
_this
=
$
(
this
);
// if((_this.attr('data-markid') == '1') || (_this.attr('data-markid') == '4')){
// //如果选择了未打通,或取消拨打,则直接关闭
// if(_this.parent().parent().index() === 0){
// //只有在.genjin-mark-area-putong,电话跟进特有,下的标签才会隐藏
// _genjinModal.hide();//跟进模态框关闭
// return false;
// }
// };
if
(
!
_this
.
hasClass
(
'genjin-mark-active'
)){
if
(
!
_this
.
hasClass
(
'genjin-mark-active'
)){
_this
.
addClass
(
'genjin-mark-active'
).
siblings
().
removeClass
(
'genjin-mark-active'
);
_this
.
addClass
(
'genjin-mark-active'
).
siblings
().
removeClass
(
'genjin-mark-active'
);
};
};
if
(
_this
.
attr
(
'data-markid'
)
==
'1'
){
//如果选择了未打通,则直接关闭
if
(
_this
.
parent
().
parent
().
index
()
===
0
){
//只有在.genjin-mark-area-putong,电话跟进特有,下的标签才会隐藏
genjinSave
(
'sp1'
);
return
false
;
}
};
});
});
//跟进的提交按钮点击事件
//跟进的提交按钮点击事件
_btnSave
.
click
(
function
(
e
){
_btnSave
.
click
(
function
(
e
){
e
.
preventDefault
();
e
.
preventDefault
();
e
.
stopPropagation
();
e
.
stopPropagation
();
genjinSave
();
});
function
genjinSave
(
type
){
var
_genjinMarkOBj
=
$
(
'.genjin-mark-area-zhuangtai .genjin-mark-active'
),
var
_genjinMarkOBj
=
$
(
'.genjin-mark-area-zhuangtai .genjin-mark-active'
),
_genjinMarkOBj2
=
$
(
'.genjin-mark-area-putong .genjin-mark-active'
),
_genjinMarkOBj2
=
$
(
'.genjin-mark-area-putong .genjin-mark-active'
),
_beizhuObjVal
=
$
.
trim
(
_beizhuObj
.
val
()),
_beizhuObjVal
=
$
.
trim
(
_beizhuObj
.
val
()),
...
@@ -424,20 +630,14 @@ function loadMain(){
...
@@ -424,20 +630,14 @@ function loadMain(){
// return false;
// return false;
// };
// };
// if((_genjinMarkOBj2.attr('data-markid') == '1') || (_genjinMarkOBj2.attr('data-markid') == '4')){
if
((
_genjinMarkOBj2
.
attr
(
'data-markid'
)
==
'1'
)
||
(
_genjinMarkOBj2
.
attr
(
'data-markid'
)
==
'4'
)){
//
// }else{
// if(_genjinMarkOBj.length == 0){
// layerTipsX('请选择状态跟进标签');
// return false;
// };
// };
}
else
{
if
(
_genjinMarkOBj
.
length
==
0
){
if
(
_genjinMarkOBj
.
length
==
0
){
layerTipsX
(
'请选择状态跟进标签'
);
layerTipsX
(
'请选择状态跟进标签'
);
return
false
;
return
false
;
};
};
};
var
_data
=
{
var
_data
=
{
'AuthToken'
:
_token
,
'AuthToken'
:
_token
,
'content'
:
_beizhuObjVal
,
'content'
:
_beizhuObjVal
,
...
@@ -445,6 +645,17 @@ function loadMain(){
...
@@ -445,6 +645,17 @@ function loadMain(){
'agent_id'
:
_userId
,
'agent_id'
:
_userId
,
'user_status'
:
_genjinMarkOBj
.
attr
(
'data-markid'
)
'user_status'
:
_genjinMarkOBj
.
attr
(
'data-markid'
)
};
};
if
(
type
===
'sp1'
){
if
(
_beizhuObjVal
){
}
else
{
_data
[
'content'
]
=
'未打通'
;
};
if
(
_genjinMarkOBj
.
length
==
0
){
_data
[
'user_status'
]
=
_user_status
;
};
};
if
(
isCallFlag
){
if
(
isCallFlag
){
//电话跟进
//电话跟进
if
(
_genjinMarkOBj2
.
length
==
0
){
if
(
_genjinMarkOBj2
.
length
==
0
){
...
@@ -453,6 +664,7 @@ function loadMain(){
...
@@ -453,6 +664,7 @@ function loadMain(){
}
else
{
}
else
{
_data
[
'labels_id'
]
=
_genjinMarkOBj2
.
attr
(
'data-markid'
);
_data
[
'labels_id'
]
=
_genjinMarkOBj2
.
attr
(
'data-markid'
);
_data
[
'type'
]
=
0
;
_data
[
'type'
]
=
0
;
_data
[
'follow_id'
]
=
_temp_follow_id
;
//跟进id
(
_genjinMarkOBj2
.
attr
(
'data-free'
)
==
0
)
&&
(
_isFreeFlag
=
false
);
(
_genjinMarkOBj2
.
attr
(
'data-free'
)
==
0
)
&&
(
_isFreeFlag
=
false
);
}
}
}
else
{
}
else
{
...
@@ -485,6 +697,7 @@ function loadMain(){
...
@@ -485,6 +697,7 @@ function loadMain(){
layer
.
open
({
layer
.
open
({
content
:
'提交成功'
,
content
:
'提交成功'
,
btn
:
[
'确定'
],
btn
:
[
'确定'
],
shadeClose
:
false
,
yes
:
function
(
_index
){
yes
:
function
(
_index
){
location
.
reload
();
location
.
reload
();
...
@@ -493,25 +706,36 @@ function loadMain(){
...
@@ -493,25 +706,36 @@ function loadMain(){
});
});
};
};
}
else
{
}
else
{
_btnSaveTemp
.
hide
();
_btnSave
.
css
(
'display'
,
'block'
);
layerTipsX
(
data
[
'msg'
]);
layerTipsX
(
data
[
'msg'
]);
_btnSaveTemp
.
hide
();
_btnSave
.
css
(
'display'
,
'block'
);
};
};
}
else
{
}
else
{
_btnSaveTemp
.
hide
();
_btnSave
.
css
(
'display'
,
'block'
);
layerTipsX
(
'数据错误'
);
layerTipsX
(
'数据错误'
);
_btnSaveTemp
.
hide
();
_btnSave
.
css
(
'display'
,
'block'
);
};
};
},
},
error
:
function
()
{
error
:
function
()
{
_btnSaveTemp
.
hide
();
_btnSave
.
css
(
'display'
,
'block'
);
//不能卸载complete里,因为还有解绑事件,要在解绑完成时再做处理
layerTipsX
(
'error'
);
layerTipsX
(
'error'
);
},
complete
:
function
(
xhr
,
textStatus
){
_btnSaveTemp
.
hide
();
_btnSaveTemp
.
hide
();
_btnSave
.
css
(
'display'
,
'block'
);
_btnSave
.
css
(
'display'
,
'block'
);
//不能卸载complete里,因为还有解绑事件,要在解绑完成时再做处理
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
){
if
(
textStatus
===
'timeout'
){
layerTipsX
(
'请求超时'
);
layerTipsX
(
'请求超时'
);
};
};
}
}
});
});
}
});
function
freePhone
(
obj
){
function
freePhone
(
obj
){
$
.
ajax
({
$
.
ajax
({
...
@@ -521,7 +745,8 @@ function loadMain(){
...
@@ -521,7 +745,8 @@ function loadMain(){
'AuthToken'
:
_token
,
'AuthToken'
:
_token
,
'phone_x'
:
_backPhone
,
'phone_x'
:
_backPhone
,
'phone_a'
:
_selectPhone
,
'phone_a'
:
_selectPhone
,
'phone_b'
:
_customerPhone
'user_id'
:
_customerId
//'phone_b': _customerPhone
},
},
timeout
:
30000
,
timeout
:
30000
,
dataType
:
'json'
,
dataType
:
'json'
,
...
@@ -532,6 +757,7 @@ function loadMain(){
...
@@ -532,6 +757,7 @@ function loadMain(){
console
.
log
(
'释放成功'
);
console
.
log
(
'释放成功'
);
layer
.
open
({
layer
.
open
({
content
:
'提交成功'
,
content
:
'提交成功'
,
shadeClose
:
false
,
btn
:
[
'确定'
],
btn
:
[
'确定'
],
yes
:
function
(
_index
){
yes
:
function
(
_index
){
...
@@ -550,6 +776,8 @@ function loadMain(){
...
@@ -550,6 +776,8 @@ function loadMain(){
layerTipsX
(
'error'
);
layerTipsX
(
'error'
);
},
},
complete
:
function
(
xhr
,
textStatus
){
complete
:
function
(
xhr
,
textStatus
){
_btnSaveTemp
.
hide
();
_btnSave
.
css
(
'display'
,
'block'
);
if
(
textStatus
===
'timeout'
){
if
(
textStatus
===
'timeout'
){
layerTipsX
(
'请求超时'
);
layerTipsX
(
'请求超时'
);
};
};
...
@@ -573,7 +801,7 @@ function loadMain(){
...
@@ -573,7 +801,7 @@ function loadMain(){
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
200
)
{
var
_htmlTemp
=
''
;
var
_htmlTemp
=
''
;
$
.
each
(
data
[
'data'
],
function
(
i
,
item
)
{
$
.
each
(
data
[
'data'
],
function
(
i
,
item
)
{
_htmlTemp
+=
'<li class="{0}"><input placeholder="请输入本机手机号" maxlength="11" type="tel" value="{1}" {2} /><div class="call-edit-icon">完成</div><div class="call-submit-ing-icon">提交中ing</div><div class="call-select-icon"><img src="/app/images/ic_duigou_gre.png" /></div></li>'
.
stringFormatObj
({
_htmlTemp
+=
'<li class="{0}"><input placeholder="请输入本机手机号" maxlength="11" type="tel" value="{1}" {2} /><div class="call-edit-icon">完成</div><div class="call-submit-ing-icon">提交中ing</div><div class="call-select-icon"><img src="/app/images/ic_duigou_gre.png" /></div><
div class="call-delete-icon"><img src="/app/images/search_gb.png" /></div><
/li>'
.
stringFormatObj
({
'0'
:
''
,
'0'
:
''
,
'1'
:
item
[
'phone'
],
'1'
:
item
[
'phone'
],
'2'
:
'readonly'
,
'2'
:
'readonly'
,
...
@@ -608,10 +836,14 @@ function loadMain(){
...
@@ -608,10 +836,14 @@ function loadMain(){
});
});
//点击头部区域拨打电话出现弹窗部分
//点击头部区域拨打电话出现弹窗部分
$
(
'#call_list_open_btn'
).
click
(
function
(
e
){
$
(
'#call_list_open_btn
>.call-btn-main
'
).
click
(
function
(
e
){
e
.
preventDefault
();
e
.
preventDefault
();
e
.
stopPropagation
();
e
.
stopPropagation
();
if
(
is_outpace_call_num
==
'0'
){
_callModal
.
show
();
_callModal
.
show
();
}
else
{
layerTipsX
(
'该客户今日已达拨打上限,请明日再来'
);
};
});
});
$
(
'.call-btn-other'
).
click
(
function
(
e
){
$
(
'.call-btn-other'
).
click
(
function
(
e
){
...
@@ -619,7 +851,6 @@ function loadMain(){
...
@@ -619,7 +851,6 @@ function loadMain(){
e
.
stopPropagation
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
var
_this
=
$
(
this
);
var
_tel
=
_this
.
prev
().
attr
(
'data-tel'
);
var
_tel
=
_this
.
prev
().
attr
(
'data-tel'
);
console
.
log
(
_tel
);
if
(
is_mobile
(
_tel
)
==
1
){
if
(
is_mobile
(
_tel
)
==
1
){
Compatible
({
Compatible
({
paraIos
:
{
paraIos
:
{
...
@@ -641,6 +872,7 @@ function loadMain(){
...
@@ -641,6 +872,7 @@ function loadMain(){
});
});
};
};
});
});
//拨打电话,选中手机号事件
_doc
.
on
(
'click'
,
'#call_modal_phone_list>li'
,
function
(
e
){
_doc
.
on
(
'click'
,
'#call_modal_phone_list>li'
,
function
(
e
){
e
.
preventDefault
();
e
.
preventDefault
();
e
.
stopPropagation
();
e
.
stopPropagation
();
...
@@ -651,6 +883,49 @@ function loadMain(){
...
@@ -651,6 +883,49 @@ function loadMain(){
};
};
};
};
});
});
//删除手机号按钮,点击事件
_doc
.
on
(
'click'
,
'.call-delete-icon'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
layer
.
open
({
content
:
'确认删除此号码吗?'
,
btn
:
[
'确定'
,
'取消'
],
yes
:
function
(
_index
){
var
_phoneTemp
=
_this
.
parent
().
find
(
'input'
).
val
();
_this
.
parent
().
remove
();
console
.
log
(
_phoneTemp
);
$
.
ajax
({
type
:
'POST'
,
url
:
ServerHostTempC
+
'/broker/agentsPhone'
,
data
:
{
'AuthToken'
:
_token
,
'agents_id'
:
_userId
,
'phone'
:
_phoneTemp
,
'type'
:
'delete'
},
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
},
error
:
function
()
{
layerTipsX
(
'error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
){
layerTipsX
(
'请求超时'
);
};
}
});
layer
.
close
(
_index
);
}
});
});
//添加手机号,出现输入框事件
_addPhoneBtn
.
click
(
function
(
e
){
_addPhoneBtn
.
click
(
function
(
e
){
e
.
preventDefault
();
e
.
preventDefault
();
e
.
stopPropagation
();
e
.
stopPropagation
();
...
@@ -659,10 +934,11 @@ function loadMain(){
...
@@ -659,10 +934,11 @@ function loadMain(){
return
false
;
return
false
;
}
else
{
}
else
{
_addPhoneBtn
.
hide
();
_addPhoneBtn
.
hide
();
_addPhoneListObj
.
append
(
'<li class="call-add"><input placeholder="请输入本机手机号" maxlength="11" type="tel" /><div class="call-edit-icon">完成</div><div class="call-submit-ing-icon">提交中ing</div><div class="call-select-icon"><img src="/app/images/ic_duigou_gre.png" /></div></li>'
).
find
(
'.call-add>input'
).
focus
();
_addPhoneListObj
.
append
(
'<li class="call-add"><input placeholder="请输入本机手机号" maxlength="11" type="tel" /><div class="call-edit-icon">完成</div><div class="call-submit-ing-icon">提交中ing</div><div class="call-select-icon"><img src="/app/images/ic_duigou_gre.png" /></div><
div class="call-delete-icon"><img src="/app/images/search_gb.png" /></div><
/li>'
).
find
(
'.call-add>input'
).
focus
();
};
};
});
});
//添加手机号调用接口事件
_doc
.
on
(
'click'
,
'#call_modal_phone_list>li>.call-edit-icon'
,
function
(
e
){
_doc
.
on
(
'click'
,
'#call_modal_phone_list>li>.call-edit-icon'
,
function
(
e
){
e
.
preventDefault
();
e
.
preventDefault
();
e
.
stopPropagation
();
e
.
stopPropagation
();
...
@@ -732,7 +1008,8 @@ function loadMain(){
...
@@ -732,7 +1008,8 @@ function loadMain(){
data
:
{
data
:
{
'AuthToken'
:
_token
,
'AuthToken'
:
_token
,
'phone_a'
:
_selectPhone
,
'phone_a'
:
_selectPhone
,
'phone_b'
:
_customerPhone
'user_id'
:
_customerId
//'phone_b': _customerPhone
},
},
timeout
:
30000
,
timeout
:
30000
,
dataType
:
'json'
,
dataType
:
'json'
,
...
@@ -745,14 +1022,15 @@ function loadMain(){
...
@@ -745,14 +1022,15 @@ function loadMain(){
if
(
typeof
data
===
'object'
)
{
if
(
typeof
data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
200
)
{
_backPhone
=
data
[
'data'
][
'phone'
];
_backPhone
=
data
[
'data'
][
'phone'
];
console
.
log
(
_backPhone
);
_temp_follow_id
=
data
[
'data'
][
'follow_id'
];
//临时的跟进id
Compatible
({
Compatible
({
paraIos
:
{
paraIos
:
{
'route'
:
'call'
,
'route'
:
'call'
,
'phone'
:
_backPhone
'phone'
:
_backPhone
,
'userId'
:
Number
(
_customerId
)
},
},
fnAndroid
:
function
()
{
fnAndroid
:
function
()
{
window
.
android
.
onPhoneCall
(
_backPhone
);
window
.
android
.
onPhoneCall
(
_backPhone
,
Number
(
_customerId
)
);
},
},
fn
:
function
()
{
fn
:
function
()
{
console
.
warn
(
'error'
);
console
.
warn
(
'error'
);
...
...
public/resource/js/RemarkFollowIndex.js
View file @
6b96c979
...
@@ -45,6 +45,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
...
@@ -45,6 +45,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
agent_id_call
:
""
,
//拨打电话 相关
agent_id_call
:
""
,
//拨打电话 相关
agent_id_call_vip
:
""
,
agent_id_call_vip
:
""
,
agent_id_phone
:
''
,
agent_id_phone
:
''
,
pageNoUser
:
1
,
//客户详情 客户动态初始化分页
moreUser
:
0
,
//标识点击加载更多 还有没有数据
init
:
function
()
{
init
:
function
()
{
//初始化dot
//初始化dot
$
(
"body"
).
append
(
template
);
$
(
"body"
).
append
(
template
);
...
@@ -201,13 +203,19 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
...
@@ -201,13 +203,19 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
//上一页 获取客户详情
//上一页 获取客户详情
_doc
.
on
(
'click'
,
'#user_up'
,
function
()
{
_doc
.
on
(
'click'
,
'#user_up'
,
function
()
{
user_type
=
'last'
;
user_type
=
'last'
;
// checkLogin();
//点击客户详情 初始化客户动态 带看动态
$
(
'.modal-title-genjing-con>span:nth-of-type(1)'
).
addClass
(
'text-info'
).
siblings
().
removeClass
(
'text-info'
);
//初始化客户动态 带看动态两个表格切换
$
(
'.follow-up-modal-list-area:nth-of-type(1)'
).
show
().
siblings
().
hide
();
user
.
getInfor
();
user
.
getInfor
();
});
});
//下一页 获取客户详情
//下一页 获取客户详情
_doc
.
on
(
'click'
,
'#user_down'
,
function
()
{
_doc
.
on
(
'click'
,
'#user_down'
,
function
()
{
user_type
=
'next'
;
user_type
=
'next'
;
checkLogin
();
//点击客户详情 初始化客户动态 带看动态
$
(
'.modal-title-genjing-con>span:nth-of-type(1)'
).
addClass
(
'text-info'
).
siblings
().
removeClass
(
'text-info'
);
//初始化客户动态 带看动态两个表格切换
$
(
'.follow-up-modal-list-area:nth-of-type(1)'
).
show
().
siblings
().
hide
();
user
.
getInfor
();
user
.
getInfor
();
});
});
//客户列表 收藏夹
//客户列表 收藏夹
...
@@ -292,7 +300,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
...
@@ -292,7 +300,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
// 客户编辑 修改记录
// 客户编辑 修改记录
$
(
document
).
delegate
(
".cao-zuo-record"
,
"click"
,
function
()
{
$
(
document
).
delegate
(
".cao-zuo-record"
,
"click"
,
function
()
{
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
Caozuorecord
();
//
user.Caozuorecord();
});
});
$
(
document
).
delegate
(
".caozuo-yue"
,
"click"
,
function
()
{
$
(
document
).
delegate
(
".caozuo-yue"
,
"click"
,
function
()
{
//约带看初始化
//约带看初始化
...
@@ -323,16 +331,46 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
...
@@ -323,16 +331,46 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
$
(
'#note_look'
).
val
(
''
);
$
(
'#note_look'
).
val
(
''
);
$
(
'.look-shop'
).
val
(
''
);
$
(
'.look-shop'
).
val
(
''
);
$
(
'.look-shop'
).
removeAttr
(
'data-id'
);
$
(
'.look-shop'
).
removeAttr
(
'data-id'
);
//点击客户详情 初始化客户动态 带看动态
$
(
'.modal-title-genjing-con>span:nth-of-type(1)'
).
addClass
(
'text-info'
).
siblings
().
removeClass
(
'text-info'
);
//初始化客户动态 带看动态两个表格切换
$
(
'.follow-up-modal-list-area:nth-of-type(1)'
).
show
().
siblings
().
hide
();
$
(
'.detail-modal-header-tab>a:nth-of-type(1)'
).
removeClass
(
'btn-default'
).
addClass
(
'btn-info'
).
siblings
().
removeClass
(
'btn-info'
).
addClass
(
'btn-default'
);
$
(
'.detail-modal-header-tab>a:nth-of-type(1)'
).
removeClass
(
'btn-default'
).
addClass
(
'btn-info'
).
siblings
().
removeClass
(
'btn-info'
).
addClass
(
'btn-default'
);
user
.
detailTabIndex
=
0
;
user
.
detailTabIndex
=
0
;
$
(
'.detail-modal-body-sec:nth-of-type(1)'
).
show
().
siblings
().
hide
();
$
(
'.detail-modal-body-sec:nth-of-type(1)'
).
show
().
siblings
().
hide
();
$
(
'.followup-modal-comment-area>textarea'
).
val
(
''
);
//清空跟进框内容
$
(
'.followup-modal-comment-area>textarea'
).
val
(
''
);
//清空跟进框内容
// checkLogin();
// checkLogin();
user
.
getSiteTagsEdit
();
user
.
getSiteTagsEdit
();
user
.
getUserLogNew
();
//客户详情获取最近一条带看动态
$
(
'.user-log-more'
).
show
();
//显示加载更多
});
});
// 点击缓存
//查看弹出框里的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
()
//获取客户动态
}
});
//客户动态 加载更多
_doc
.
on
(
'click'
,
'.user-log-more'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
user
.
moreUser
=
1
;
user
.
getGenjincon
(
user
.
pageNoUser
++
)
});
//点击缓存
$
(
document
).
delegate
(
".caozuo-add-color"
,
"click"
,
function
()
{
//点击操作跟进详情
$
(
document
).
delegate
(
".caozuo-add-color"
,
"click"
,
function
()
{
//点击操作跟进详情
user
.
remark_id
=
$
(
this
).
attr
(
"data-remark"
);
user
.
remark_id
=
$
(
this
).
attr
(
"data-remark"
);
$
(
this
).
removeClass
(
'btn-success'
);
$
(
this
).
removeClass
(
'btn-success'
);
...
@@ -419,6 +457,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
...
@@ -419,6 +457,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
if
(
user
.
detailTabIndex
==
1
){
if
(
user
.
detailTabIndex
==
1
){
}
else
if
(
user
.
detailTabIndex
==
0
){
}
else
if
(
user
.
detailTabIndex
==
0
){
user
.
Caozuo
();
user
.
Caozuo
();
user
.
pageNoUser
=
1
;
$
(
'#caozuo_table2'
).
html
(
''
);
user
.
getGenjincon
();
user
.
getGenjincon
();
}
}
});
});
...
@@ -636,6 +676,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
...
@@ -636,6 +676,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
_genjinModal
.
hide
();
_genjinModal
.
hide
();
_btnSaveTemp
.
hide
();
_btnSaveTemp
.
hide
();
_btnSave
.
css
(
'display'
,
'block'
);
_btnSave
.
css
(
'display'
,
'block'
);
user
.
pageNoUser
=
1
;
$
(
'#caozuo_table2'
).
html
(
''
);
user
.
getGenjincon
();
user
.
getGenjincon
();
};
};
}
else
{
}
else
{
...
@@ -681,6 +723,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
...
@@ -681,6 +723,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
console
.
log
(
'释放成功'
);
console
.
log
(
'释放成功'
);
alert
(
'提交成功'
);
alert
(
'提交成功'
);
_genjinModal
.
hide
();
_genjinModal
.
hide
();
user
.
pageNoUser
=
1
;
$
(
'#caozuo_table2'
).
html
(
''
);
user
.
getGenjincon
();
user
.
getGenjincon
();
}
else
{
}
else
{
layerTipsX
(
data
[
'msg'
]);
layerTipsX
(
data
[
'msg'
]);
...
@@ -1237,7 +1281,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
...
@@ -1237,7 +1281,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
params
.
source_intro
=
$
(
"#user_source_edit"
).
val
();
params
.
source_intro
=
$
(
"#user_source_edit"
).
val
();
params
.
referrer_id
=
user
.
user_id_edit_introduce
?
user
.
user_id_edit_introduce
:
0
;
params
.
referrer_id
=
user
.
user_id_edit_introduce
?
user
.
user_id_edit_introduce
:
0
;
params
.
referrer_source
=
10
;
params
.
referrer_source
=
10
;
params
.
source
=
$
(
"#user_label_edit"
).
val
();
// params.source = $("#user_label_edit").val();
params
.
user_label
=
$
(
"#user_label_edit"
).
val
();
$
.
ajax
({
$
.
ajax
({
...
@@ -1287,6 +1332,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
...
@@ -1287,6 +1332,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
200
)
{
alert
(
'修改成功'
);
alert
(
'修改成功'
);
user
.
pageNoUser
=
1
;
$
(
'#caozuo_table2'
).
html
(
''
);
user
.
getGenjincon
();
user
.
getGenjincon
();
$
(
'#genj_text'
).
val
(
''
);
$
(
'#genj_text'
).
val
(
''
);
// $("#modal-record").modal('hide');
// $("#modal-record").modal('hide');
...
@@ -1343,7 +1390,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
...
@@ -1343,7 +1390,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
}
}
});
});
},
},
//
新增客户页面
//
客户详情页面 编辑和客户详情共用
Caozuo
:
function
()
{
//获取跟进详情的数据
Caozuo
:
function
()
{
//获取跟进详情的数据
//隐藏拨打电话 如果客户在保护期 并且客户不是我的
//隐藏拨打电话 如果客户在保护期 并且客户不是我的
if
((
user_info_obj
.
id
*
1
==
user
.
agent_id_infor
*
1
)
||
user
.
baohu
*
1
){
if
((
user_info_obj
.
id
*
1
==
user
.
agent_id_infor
*
1
)
||
user
.
baohu
*
1
){
...
@@ -1354,8 +1401,9 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
...
@@ -1354,8 +1401,9 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
$
.
ajax
({
$
.
ajax
({
'type'
:
'GET'
,
'type'
:
'GET'
,
'url'
:
'/index/user
action_search
'
,
'url'
:
'/index/user
Detail
'
,
data
:
{
data
:
{
"AuthToken"
:
user_info_obj
.
AuthToken
,
"user_id"
:
user
.
user_id
,
"user_id"
:
user
.
user_id
,
'agent_id'
:
user_info_obj
.
id
'agent_id'
:
user_info_obj
.
id
},
},
...
@@ -1374,8 +1422,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
...
@@ -1374,8 +1422,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
$
(
".user_vip2"
).
val
(
data
.
data
.
user_info
.
vip
);
//是否vip
$
(
".user_vip2"
).
val
(
data
.
data
.
user_info
.
vip
);
//是否vip
$
(
".cus_phone"
).
html
(
hideTel
(
data
.
data
.
user_info
.
user_phone
));
//电话
$
(
".cus_phone"
).
html
(
hideTel
(
data
.
data
.
user_info
.
user_phone
));
//电话
$
(
".cus_date"
).
html
(
data
.
data
.
user_info
.
create_time
);
//创建时间
$
(
".cus_date"
).
html
(
data
.
data
.
user_info
.
create_time
);
//创建时间
$
(
".cus_fang_edit"
).
val
(
data
.
data
.
user_info
.
agentinfo
);
//客方详情
$
(
".cus_fang_edit"
).
val
(
data
.
data
.
user_info
.
agent
_
info
);
//客方详情
$
(
".cus_fang"
).
val
(
data
.
data
.
user_info
.
agentinfo
);
//客方编辑
$
(
".cus_fang"
).
val
(
data
.
data
.
user_info
.
agent
_
info
);
//客方编辑
$
(
"select[name=industry_type_two]"
).
val
(
data
.
data
.
user_info
.
industry_type
);
$
(
"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=price_demand]"
).
val
(
data
.
data
.
user_info
.
price_demand
*
1
);
$
(
"input[name=area_demand]"
).
val
(
data
.
data
.
user_info
.
area_demand
*
1
);
$
(
"input[name=area_demand]"
).
val
(
data
.
data
.
user_info
.
area_demand
*
1
);
...
@@ -1449,6 +1497,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
...
@@ -1449,6 +1497,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
}
else
{
}
else
{
$
(
".user-details-introduce"
).
html
(
'否'
);
//转介绍详情
$
(
".user-details-introduce"
).
html
(
'否'
);
//转介绍详情
}
}
//客方修改记录
var
caozuo_table
=
""
;
var
caozuo_table
=
""
;
$
.
each
(
data
[
'data'
][
'user_history'
],
function
(
i
,
item
)
{
$
.
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>'
;
caozuo_table
+=
'<tr><td>'
+
item
.
remark
+
'</td><td>'
+
item
.
name
+
'</td><td>'
+
item
.
create_time
+
'</td></tr>'
;
...
@@ -1458,6 +1507,19 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
...
@@ -1458,6 +1507,19 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
}
else
{
}
else
{
$
(
"#caozuo_table_edit"
).
html
(
'暂无数据(*^_^*)'
);
$
(
"#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
(
'暂无数据(*^_^*)'
);
}
//拨打电话
user
.
customerInfo
=
data
.
data
.
user_info
;
is_outpace_call_num
=
data
.
data
.
is_outpace_call_num
;
}
}
}
else
{
}
else
{
...
@@ -1789,6 +1851,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
...
@@ -1789,6 +1851,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
if
(
data
.
code
==
200
&&
data
.
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
)
{
user
.
user_id
=
data
.
data
.
user_id
;
user
.
user_id
=
data
.
data
.
user_id
;
user
.
Caozuo
();
user
.
Caozuo
();
user
.
pageNoUser
=
1
;
$
(
'#caozuo_table2'
).
html
(
''
);
user
.
getGenjincon
();
user
.
getGenjincon
();
}
else
{
}
else
{
alert
(
data
.
msg
)
alert
(
data
.
msg
)
...
@@ -1882,6 +1946,9 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
...
@@ -1882,6 +1946,9 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
$
(
'.call-user-five'
).
html
(
''
);
$
(
'.call-user-five'
).
html
(
''
);
$
(
'.detail-modal-body-sec-2'
).
show
();
$
(
'.detail-modal-body-sec-2'
).
show
();
user
.
Caozuo
();
user
.
Caozuo
();
user
.
getUserLogNew
();
//点击上一条 下一条初始化页面
user
.
pageNoUser
=
1
;
$
(
'#caozuo_table2'
).
html
(
''
);
user
.
getGenjincon
();
user
.
getGenjincon
();
}
else
{
}
else
{
$
(
'.call-user-five'
).
html
(
data
.
msg
);
$
(
'.call-user-five'
).
html
(
data
.
msg
);
...
@@ -1914,6 +1981,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
...
@@ -1914,6 +1981,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
200
)
{
// $("input[type='radio'][name='user_status'][value=" + data.data + "]").prop("checked", "checked");
// $("input[type='radio'][name='user_status'][value=" + data.data + "]").prop("checked", "checked");
$
(
'#caozuo_table2'
).
html
(
''
);
user
.
pageNoUser
=
1
;
user
.
getGenjincon
();
user
.
getGenjincon
();
}
}
}
}
...
@@ -1922,42 +1991,122 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
...
@@ -1922,42 +1991,122 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
getGenjincon
:
function
()
{
//获取客户动态
getGenjincon
:
function
()
{
//获取客户动态
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
$
.
ajax
({
$
.
ajax
({
url
:
'/
broker/useraction_search
'
,
url
:
'/
index/followUpLog
'
,
type
:
'POST'
,
type
:
'POST'
,
async
:
true
,
async
:
true
,
data
:
{
data
:
{
"AuthToken"
:
user_info_obj
.
AuthToken
,
"AuthToken"
:
user_info_obj
.
AuthToken
,
"user_id"
:
user
.
user_id
,
"user_id"
:
user
.
user_id
,
"agent_id"
:
user_info_obj
.
id
"page_no"
:
user
.
pageNoUser
,
"page_size"
:
8
,
},
},
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
user
.
customerInfo
=
data
.
data
.
user_info
;
$
(
'.is-show-more-followlog'
).
show
()
;
is_outpace_call_num
=
data
.
data
.
is_outpace_call_num
;
//客户动态 即跟进
//客户动态 即跟进
var
caozuo_table
=
""
;
var
caozuo_table
=
""
;
$
.
each
(
data
[
'data'
][
'user_date
'
],
function
(
i
,
item
)
{
$
.
each
(
data
[
'data
'
],
function
(
i
,
item
)
{
if
(
item
.
step_name
==
'report'
){
if
(
item
.
user_status
*
1
){
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>'
;
var
user_status
=
'【已租】'
}
else
{
}
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>'
;
var
user_status
=
'【求租】'
}
};
if
(
item
.
type
*
1
){
var
follow_status
=
'跟进:'
}
else
{
var
follow_status
=
'电话跟进:'
};
caozuo_table
+=
'<tr><td class="text-left follow-up-home" width="70%">'
+
follow_status
+
item
.
content
+
user_status
+
'</td><td>'
+
item
.
name
+
'</td><td>'
+
item
.
create_time
+
'</td></tr>'
;
});
});
if
(
caozuo_table
){
if
(
caozuo_table
){
$
(
"#caozuo_table2"
).
html
(
caozuo_table
);
$
(
"#caozuo_table2"
).
append
(
caozuo_table
);
}
else
{
}
else
{
$
(
"#caozuo_table2"
).
html
(
'暂无跟进信息'
);
$
(
"#caozuo_table2"
).
html
(
'暂无跟进信息'
);
}
}
//滚动条 回到顶部
//滚动条 回到顶部
$
(
'.follow
up-modal-list-area'
).
scrollTop
(
0
);
// $('.follow-
up-modal-list-area').scrollTop(0);
}
else
{
if
(
user
.
pageNoUser
==
1
){
$
(
"#caozuo_table2"
).
html
(
'暂无跟进信息'
);
$
(
'.is-show-more-followlog'
).
hide
();
};
if
(
user
.
moreUser
){
alert
(
'暂无跟进信息!!!'
);
user
.
moreUser
=
0
;
};
}
},
});
},
//调用带看记录
getUserLog
:
function
(
type
)
{
$
.
ajax
({
url
:
'/index/userLog'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"user_id"
:
user
.
user_id
,
"type"
:
type
},
dataType
:
'json'
,
success
:
function
(
data
)
{
var
caozuo_table
=
''
;
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
//带看动态
var
caozuo_table
=
""
;
$
.
each
(
data
[
'data'
],
function
(
i
,
item
)
{
if
(
item
.
step_name
==
'report'
){
caozuo_table
+=
'<tr><td class="text-left follow-up-home" width="70%">'
+
item
.
step
+
'到场时间:'
+
item
.
predict_see_time
+
'备注:'
+
item
.
intro
+
'</td><td>'
+
item
.
name
+
'</td><td>'
+
item
.
create_time
+
'</td></tr>'
;
}
else
if
(
item
.
step_name
==
'follow_up_log'
){
caozuo_table
+=
'<tr><td class="text-left follow-up-home" width="70%">报备'
+
item
.
step
+
';属于哪类客户:'
+
item
.
user_type
+
'</td><td>'
+
item
.
name
+
'</td><td>'
+
item
.
create_time
+
'</td></tr>'
;
}
else
{
caozuo_table
+=
'<tr><td class="text-left follow-up-home" width="70%">'
+
item
.
step
+
'</td><td>'
+
item
.
name
+
'</td><td>'
+
item
.
create_time
+
'</td></tr>'
;
}
});
$
(
"#caozuo_table_log"
).
html
(
caozuo_table
);
//滚动条 回到顶部
$
(
'.follow-up-modal-list-area'
).
scrollTop
(
0
);
}
else
{
$
(
"#caozuo_table_log"
).
html
(
'暂无带看信息'
);
}
}
});
},
getUserLogNew
:
function
(
type
)
{
$
.
ajax
({
url
:
'/index/userLog'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"user_id"
:
user
.
user_id
,
"type"
:
1
},
dataType
:
'json'
,
success
:
function
(
data
)
{
var
caozuo_table
=
''
;
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
//带看动态
var
caozuo_table
=
""
;
if
(
data
.
data
.
step_name
==
'report'
){
caozuo_table
+=
'<tr><td class="text-left follow-up-home" width="70%">'
+
data
.
data
.
step
+
'到场时间:'
+
data
.
data
.
predict_see_time
+
'备注:'
+
data
.
data
.
intro
+
'</td><td>'
+
data
.
data
.
name
+
'</td><td>'
+
data
.
data
.
create_time
+
'</td></tr>'
;
}
else
{
caozuo_table
+=
'<tr><td class="text-left follow-up-home" width="70%">'
+
data
.
data
.
step
+
'</td><td>'
+
data
.
data
.
name
+
'</td><td>'
+
data
.
data
.
create_time
+
'</td></tr>'
;
}
$
(
".user-log-detail"
).
html
(
caozuo_table
);
}
else
{
$
(
".user-log-detail"
).
html
(
'暂无带看信息'
);
}
}
}
}
});
});
},
},
//调用部门 和 门店的接口
//调用部门 和 门店的接口
getDistrict
:
function
(
fn
)
{
getDistrict
:
function
(
fn
)
{
$
.
ajax
({
$
.
ajax
({
...
...
public/resource/js/user.js
View file @
6b96c979
...
@@ -30,6 +30,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -30,6 +30,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
/*每页显示多少条*/
/*每页显示多少条*/
user_id
:
0
,
user_id
:
0
,
user_id_var
:
''
,
user_id_var
:
''
,
detailTabIndexFollow
:
''
,
user_type
:
''
,
user_type
:
''
,
user_phone
:
''
,
user_phone
:
''
,
urls
:
''
,
urls
:
''
,
...
@@ -50,6 +51,9 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -50,6 +51,9 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
agent_id_call
:
""
,
//拨打电话 相关
agent_id_call
:
""
,
//拨打电话 相关
agent_id_call_current
:
""
,
agent_id_call_current
:
""
,
agent_id_call_vip
:
""
,
agent_id_call_vip
:
""
,
pageNoUser
:
1
,
//客户详情 客户动态初始化分页
moreUser
:
0
,
//标识点击加载更多 还有没有数据
init
:
function
()
{
init
:
function
()
{
//初始化dot
//初始化dot
$
(
"body"
).
append
(
template
);
$
(
"body"
).
append
(
template
);
...
@@ -173,6 +177,14 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -173,6 +177,14 @@ 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'
,
'.user-log-more'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
user
.
moreUser
=
1
;
user
.
getGenjincon
(
user
.
pageNoUser
++
)
});
//点击 无效
//点击 无效
_doc
.
on
(
'click'
,
'.is_invalid'
,
function
(
e
)
{
_doc
.
on
(
'click'
,
'.is_invalid'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
...
@@ -321,11 +333,19 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -321,11 +333,19 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
//上一页 获取客户详情
//上一页 获取客户详情
_doc
.
on
(
'click'
,
'#user_up'
,
function
()
{
_doc
.
on
(
'click'
,
'#user_up'
,
function
()
{
user_type
=
'last'
;
user_type
=
'last'
;
//点击客户详情 初始化客户动态 带看动态
$
(
'.modal-title-genjing-con>span:nth-of-type(1)'
).
addClass
(
'text-info'
).
siblings
().
removeClass
(
'text-info'
);
//初始化客户动态 带看动态两个表格切换
$
(
'.follow-up-modal-list-area:nth-of-type(1)'
).
show
().
siblings
().
hide
();
user
.
getInfor
();
user
.
getInfor
();
});
});
//下一页 获取客户详情
//下一页 获取客户详情
_doc
.
on
(
'click'
,
'#user_down'
,
function
()
{
_doc
.
on
(
'click'
,
'#user_down'
,
function
()
{
user_type
=
'next'
;
user_type
=
'next'
;
//点击客户详情 初始化客户动态 带看动态
$
(
'.modal-title-genjing-con>span:nth-of-type(1)'
).
addClass
(
'text-info'
).
siblings
().
removeClass
(
'text-info'
);
//初始化客户动态 带看动态两个表格切换
$
(
'.follow-up-modal-list-area:nth-of-type(1)'
).
show
().
siblings
().
hide
();
user
.
getInfor
();
user
.
getInfor
();
});
});
//二级联动
//二级联动
...
@@ -441,10 +461,11 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -441,10 +461,11 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
// 客户编辑 修改记录
// 客户编辑 修改记录
$
(
document
).
delegate
(
".cao-zuo-record"
,
"click"
,
function
()
{
$
(
document
).
delegate
(
".cao-zuo-record"
,
"click"
,
function
()
{
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
Caozuorecord
();
//
user.Caozuorecord();
});
});
$
(
document
).
delegate
(
".caozuo-yue"
,
"click"
,
function
()
{
$
(
document
).
delegate
(
".caozuo-yue"
,
"click"
,
function
()
{
//约带看初始化
//约带看初始化
console
.
log
(
667
);
$
(
'#look_shop_date'
).
val
(
''
);
$
(
'#look_shop_date'
).
val
(
''
);
$
(
'#note_look'
).
val
(
''
);
$
(
'#note_look'
).
val
(
''
);
$
(
'.look-shop'
).
val
(
''
);
$
(
'.look-shop'
).
val
(
''
);
...
@@ -474,10 +495,17 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -474,10 +495,17 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
$
(
'.look-shop'
).
removeAttr
(
'data-id'
);
$
(
'.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'
);
$
(
'.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
;
user
.
detailTabIndex
=
0
;
$
(
'.detail-modal-body-sec:nth-of-type(1)'
).
show
().
siblings
().
hide
();
$
(
'.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
(
''
);
//清空跟进框内容
$
(
'.followup-modal-comment-area>textarea'
).
val
(
''
);
//清空跟进框内容
user
.
getSiteTagsEdit
();
user
.
getSiteTagsEdit
();
user
.
getUserLogNew
();
//客户详情获取最近一条带看动态
$
(
'.user-log-more'
).
show
();
//显示加载更多
});
});
...
@@ -575,9 +603,30 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -575,9 +603,30 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
if
(
user
.
detailTabIndex
==
1
){
if
(
user
.
detailTabIndex
==
1
){
}
else
if
(
user
.
detailTabIndex
==
0
){
}
else
if
(
user
.
detailTabIndex
==
0
){
user
.
Caozuo
();
user
.
Caozuo
();
user
.
pageNoUser
=
1
;
$
(
'#caozuo_table2'
).
html
(
''
);
user
.
getGenjincon
();
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 编辑
$
(
document
).
on
(
"input"
,
".cus_fang"
,
function
()
{
//手机号搜索客方2 编辑
if
(
$
(
".cus_fang"
).
val
()
==
''
)
{
if
(
$
(
".cus_fang"
).
val
()
==
''
)
{
user
.
agent_id2
=
''
;
user
.
agent_id2
=
''
;
...
@@ -781,6 +830,8 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -781,6 +830,8 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
_genjinModal
.
hide
();
_genjinModal
.
hide
();
_btnSaveTemp
.
hide
();
_btnSaveTemp
.
hide
();
_btnSave
.
css
(
'display'
,
'block'
);
_btnSave
.
css
(
'display'
,
'block'
);
user
.
pageNoUser
=
1
;
$
(
'#caozuo_table2'
).
html
(
''
);
user
.
getGenjincon
();
user
.
getGenjincon
();
};
};
}
else
{
}
else
{
...
@@ -827,6 +878,8 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -827,6 +878,8 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
console
.
log
(
'释放成功'
);
console
.
log
(
'释放成功'
);
alert
(
'提交成功'
);
alert
(
'提交成功'
);
_genjinModal
.
hide
();
_genjinModal
.
hide
();
user
.
pageNoUser
=
1
;
$
(
'#caozuo_table2'
).
html
(
''
);
user
.
getGenjincon
();
user
.
getGenjincon
();
}
else
{
}
else
{
layerTipsX
(
data
[
'msg'
]);
layerTipsX
(
data
[
'msg'
]);
...
@@ -1509,6 +1562,8 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -1509,6 +1562,8 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
200
)
{
alert
(
'修改成功'
);
alert
(
'修改成功'
);
user
.
pageNoUser
=
1
;
$
(
'#caozuo_table2'
).
html
(
''
);
user
.
getGenjincon
();
user
.
getGenjincon
();
$
(
'#genj_text'
).
val
(
''
);
$
(
'#genj_text'
).
val
(
''
);
}
else
{
}
else
{
...
@@ -1560,7 +1615,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -1560,7 +1615,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
}
}
});
});
},
},
//
新增客户页面
//
客户详情页面 编辑和客户详情共用
Caozuo
:
function
()
{
//获取跟进详情的数据
Caozuo
:
function
()
{
//获取跟进详情的数据
//隐藏拨打电话 如果客户在保护期 并且客户不是我的
//隐藏拨打电话 如果客户在保护期 并且客户不是我的
if
((
user_info_obj
.
id
*
1
==
user
.
agentbaohu
*
1
)
||
user
.
baohu
*
1
){
if
((
user_info_obj
.
id
*
1
==
user
.
agentbaohu
*
1
)
||
user
.
baohu
*
1
){
...
@@ -1571,8 +1626,9 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -1571,8 +1626,9 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
// checkLogin();
// checkLogin();
$
.
ajax
({
$
.
ajax
({
'type'
:
'GET'
,
'type'
:
'GET'
,
'url'
:
'/index/user
action_search
'
,
'url'
:
'/index/user
Detail
'
,
data
:
{
data
:
{
"AuthToken"
:
user_info_obj
.
AuthToken
,
"user_id"
:
user
.
user_id
,
"user_id"
:
user
.
user_id
,
'agent_id'
:
user_info_obj
.
id
'agent_id'
:
user_info_obj
.
id
},
},
...
@@ -1592,8 +1648,8 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -1592,8 +1648,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_phone"
).
html
(
hideTel
(
data
.
data
.
user_info
.
user_phone
));
//电话
$
(
".cus_date"
).
html
(
data
.
data
.
user_info
.
create_time
);
//创建时间
$
(
".cus_date"
).
html
(
data
.
data
.
user_info
.
create_time
);
//创建时间
$
(
".referrer_user"
).
html
(
data
.
data
.
user_info
.
referrer_user
);
//上传时间
$
(
".referrer_user"
).
html
(
data
.
data
.
user_info
.
referrer_user
);
//上传时间
$
(
".cus_fang_edit"
).
val
(
data
.
data
.
user_info
.
agentinfo
);
//客方详情
$
(
".cus_fang_edit"
).
val
(
data
.
data
.
user_info
.
agent
_
info
);
//客方详情
$
(
".cus_fang"
).
val
(
data
.
data
.
user_info
.
agentinfo
);
//客方编辑
$
(
".cus_fang"
).
val
(
data
.
data
.
user_info
.
agent
_
info
);
//客方编辑
$
(
"select[name=industry_type_two]"
).
val
(
data
.
data
.
user_info
.
industry_type
);
$
(
"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=price_demand]"
).
val
(
data
.
data
.
user_info
.
price_demand
*
1
);
$
(
"input[name=area_demand]"
).
val
(
data
.
data
.
user_info
.
area_demand
*
1
);
$
(
"input[name=area_demand]"
).
val
(
data
.
data
.
user_info
.
area_demand
*
1
);
...
@@ -1667,6 +1723,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -1667,6 +1723,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
}
else
{
}
else
{
$
(
".user-details-introduce"
).
html
(
'否'
);
//转介绍详情
$
(
".user-details-introduce"
).
html
(
'否'
);
//转介绍详情
}
}
//客方修改记录
var
caozuo_table
=
""
;
var
caozuo_table
=
""
;
$
.
each
(
data
[
'data'
][
'user_history'
],
function
(
i
,
item
)
{
$
.
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>'
;
caozuo_table
+=
'<tr><td>'
+
item
.
remark
+
'</td><td>'
+
item
.
name
+
'</td><td>'
+
item
.
create_time
+
'</td></tr>'
;
...
@@ -1676,20 +1733,33 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -1676,20 +1733,33 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
}
else
{
}
else
{
$
(
"#caozuo_table_edit"
).
html
(
'暂无数据(*^_^*)'
);
$
(
"#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
(
'暂无数据(*^_^*)'
);
}
//拨打电话
user
.
customerInfo
=
data
.
data
.
user_info
;
is_outpace_call_num
=
data
.
data
.
is_outpace_call_num
;
}
}
}
else
{
}
else
{
alert
(
'获取失败!'
);
alert
(
data
.
msg
);
}
}
}
}
});
});
},
},
//客户编辑 修改记录
//客户编辑 修改记录
(废弃)
Caozuorecord
:
function
()
{
//获取客户动态
Caozuorecord
:
function
()
{
//获取客户动态
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
// checkLogin();
// checkLogin();
$
.
ajax
({
$
.
ajax
({
url
:
'/
broker/useraction_search
'
,
url
:
'/
index/userDetail
'
,
type
:
'POST'
,
type
:
'POST'
,
async
:
true
,
async
:
true
,
data
:
{
data
:
{
...
@@ -1856,6 +1926,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -1856,6 +1926,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
},
},
//获取站点 标签 (编辑)
//获取站点 标签 (编辑)
getSiteTagsEdit
:
function
()
{
getSiteTagsEdit
:
function
()
{
console
.
log
(
669
);
$
(
'.shangpu_tags_area_edit '
).
html
(
''
);
$
(
'.shangpu_tags_area_edit '
).
html
(
''
);
$
(
'.shangpu_tags_area_detail'
).
html
(
''
);
$
(
'.shangpu_tags_area_detail'
).
html
(
''
);
$
.
ajax
({
$
.
ajax
({
...
@@ -2152,7 +2223,11 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -2152,7 +2223,11 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
$
(
'.call-user-five'
).
html
(
data
.
msg
);
$
(
'.call-user-five'
).
html
(
data
.
msg
);
$
(
'.detail-modal-body-sec-2'
).
hide
();
$
(
'.detail-modal-body-sec-2'
).
hide
();
}
}
console
.
log
(
670
)
user
.
Caozuo
();
user
.
Caozuo
();
user
.
getUserLogNew
();
user
.
pageNoUser
=
1
;
$
(
'#caozuo_table2'
).
html
(
''
);
user
.
getGenjincon
();
user
.
getGenjincon
();
if
(
data
.
data
.
user_id
==
data
.
data
.
max_user_id
){
if
(
data
.
data
.
user_id
==
data
.
data
.
max_user_id
){
user
.
user_id
=
data
.
data
.
max_user_id
-
1
;
user
.
user_id
=
data
.
data
.
max_user_id
-
1
;
...
@@ -2183,52 +2258,133 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -2183,52 +2258,133 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
200
)
{
// $("input[type='radio'][name='user_status'][value=" + data.data + "]").prop("checked", "checked");
// $("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'
)));
//读取缓存
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
// checkLogin();
// checkLogin();
$
.
ajax
({
$
.
ajax
({
url
:
'/
broker/useraction_search
'
,
url
:
'/
index/followUpLog
'
,
type
:
'
POS
T'
,
type
:
'
GE
T'
,
async
:
true
,
async
:
true
,
data
:
{
data
:
{
"AuthToken"
:
user_info_obj
.
AuthToken
,
"AuthToken"
:
user_info_obj
.
AuthToken
,
"user_id"
:
user
.
user_id
,
"user_id"
:
user
.
user_id
,
"agent_id"
:
user_info_obj
.
id
"page_no"
:
user
.
pageNoUser
,
"page_size"
:
8
,
},
},
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
user
.
customerInfo
=
data
.
data
.
user_info
;
$
(
'.is-show-more-followlog'
).
show
();
is_outpace_call_num
=
data
.
data
.
is_outpace_call_num
;
//客户动态 即跟进
//客户动态 即跟进
var
caozuo_table
=
""
;
var
caozuo_table
=
""
;
$
.
each
(
data
[
'data'
]
[
'user_date'
]
,
function
(
i
,
item
)
{
$
.
each
(
data
[
'data'
],
function
(
i
,
item
)
{
if
(
item
.
step_name
==
'report'
){
if
(
item
.
user_status
*
1
){
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>'
;
var
user_status
=
'【已租】'
}
else
{
}
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>'
;
var
user_status
=
'【求租】'
}
};
if
(
item
.
type
*
1
){
var
follow_status
=
'跟进:'
}
else
{
var
follow_status
=
'电话跟进:'
};
caozuo_table
+=
'<tr><td class="text-left follow-up-home" width="70%">'
+
follow_status
+
item
.
content
+
user_status
+
'</td><td>'
+
item
.
name
+
'</td><td>'
+
item
.
create_time
+
'</td></tr>'
;
});
});
if
(
caozuo_table
){
if
(
caozuo_table
){
$
(
"#caozuo_table2"
).
html
(
caozuo_table
);
$
(
"#caozuo_table2"
).
append
(
caozuo_table
);
}
else
{
}
else
{
$
(
"#caozuo_table2"
).
html
(
'暂无跟进信息'
);
$
(
"#caozuo_table2"
).
html
(
'暂无跟进信息'
);
}
}
//滚动条 回到顶部
//滚动条 回到顶部
$
(
'.followup-modal-list-area'
).
scrollTop
(
0
);
// $('.follow-up-modal-list-area').scrollTop(0);
}
else
{
if
(
user
.
pageNoUser
==
1
){
$
(
"#caozuo_table2"
).
html
(
'暂无跟进信息'
);
$
(
'.is-show-more-followlog'
).
hide
();
}
if
(
user
.
moreUser
){
alert
(
'暂无跟进信息!!!'
);
user
.
moreUser
=
0
;
};
}
}
}
}
});
});
},
},
//调用带看记录
getUserLog
:
function
(
type
)
{
$
.
ajax
({
url
:
'/index/userLog'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"user_id"
:
user
.
user_id
,
"type"
:
type
},
dataType
:
'json'
,
success
:
function
(
data
)
{
var
caozuo_table
=
''
;
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
//带看动态
var
caozuo_table
=
""
;
$
.
each
(
data
[
'data'
],
function
(
i
,
item
)
{
if
(
item
.
step_name
==
'report'
){
caozuo_table
+=
'<tr><td class="text-left follow-up-home" width="70%">'
+
item
.
step
+
'到场时间:'
+
item
.
predict_see_time
+
'备注:'
+
item
.
intro
+
'</td><td>'
+
item
.
name
+
'</td><td>'
+
item
.
create_time
+
'</td></tr>'
;
}
else
if
(
item
.
step_name
==
'follow_up_log'
){
caozuo_table
+=
'<tr><td class="text-left follow-up-home" width="70%">报备'
+
item
.
step
+
';属于哪类客户:'
+
item
.
user_type
+
'</td><td>'
+
item
.
name
+
'</td><td>'
+
item
.
create_time
+
'</td></tr>'
;
}
else
{
caozuo_table
+=
'<tr><td class="text-left follow-up-home" width="70%">'
+
item
.
step
+
'</td><td>'
+
item
.
name
+
'</td><td>'
+
item
.
create_time
+
'</td></tr>'
;
}
});
$
(
"#caozuo_table_log"
).
html
(
caozuo_table
);
//滚动条 回到顶部
$
(
'.followup-modal-list-area'
).
scrollTop
(
0
);
}
else
{
$
(
"#caozuo_table_log"
).
html
(
'暂无带看信息'
);
}
}
});
},
getUserLogNew
:
function
(
type
)
{
$
.
ajax
({
url
:
'/index/userLog'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"user_id"
:
user
.
user_id
,
"type"
:
1
},
dataType
:
'json'
,
success
:
function
(
data
)
{
var
caozuo_table
=
''
;
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
//带看动态
var
caozuo_table
=
""
;
if
(
data
.
data
.
step_name
==
'report'
){
caozuo_table
+=
'<tr><td class="text-left follow-up-home" width="70%">'
+
data
.
data
.
step
+
'到场时间:'
+
data
.
data
.
predict_see_time
+
'备注:'
+
data
.
data
.
intro
+
'</td><td>'
+
data
.
data
.
name
+
'</td><td>'
+
data
.
data
.
create_time
+
'</td></tr>'
;
}
else
{
caozuo_table
+=
'<tr><td class="text-left follow-up-home" width="70%">'
+
data
.
data
.
step
+
'</td><td>'
+
data
.
data
.
name
+
'</td><td>'
+
data
.
data
.
create_time
+
'</td></tr>'
;
}
$
(
".user-log-detail"
).
html
(
caozuo_table
);
}
else
{
$
(
".user-log-detail"
).
html
(
'暂无带看信息'
);
}
}
});
},
//调用部门 和 门店的接口
//调用部门 和 门店的接口
getDistrict
:
function
(
fn
)
{
getDistrict
:
function
(
fn
)
{
$
.
ajax
({
$
.
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