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
19cca98b
Commit
19cca98b
authored
Jul 13, 2018
by
clone
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '0709-v.2.3.1' into test
# Conflicts: # application/index/controller/Member.php
parents
a944768f
997439f5
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
421 additions
and
115 deletions
+421
-115
Client.php
application/api_broker/controller/Client.php
+3
-3
Report.php
application/api_broker/controller/Report.php
+36
-0
User.php
application/api_broker/controller/User.php
+1
-1
ReportService.php
application/api_broker/service/ReportService.php
+60
-2
VipService.php
application/api_broker/service/VipService.php
+3
-1
shop_detail_pc.html
application/app_broker/view/index/shop_detail_pc.html
+4
-3
Houses.php
application/index/controller/Houses.php
+3
-4
Member.php
application/index/controller/Member.php
+1
-0
Remark.php
application/index/controller/Remark.php
+2
-1
Basic.php
application/index/extend/Basic.php
+18
-7
HouseFollowUp.html
application/index/view/houses/HouseFollowUp.html
+1
-1
users_list.html
application/index/view/member/users_list.html
+21
-17
AAgents.php
application/model/AAgents.php
+2
-1
AuthGroup.php
application/model/AuthGroup.php
+2
-1
AuthRule.php
application/model/AuthRule.php
+4
-1
OReportModel.php
application/model/OReportModel.php
+151
-0
UPhoneFollowPp.php
application/model/UPhoneFollowPp.php
+3
-0
Users.php
application/model/Users.php
+1
-1
route.php
application/route.php
+1
-0
shop_detail_pc.js
public/app/js/shop_detail_pc.js
+5
-17
houseFollowUp.js
public/resource/js/houseFollowUp.js
+1
-1
inspectionRecord.js
public/resource/js/inspectionRecord.js
+7
-6
login.js
public/resource/js/login.js
+1
-1
user.js
public/resource/js/user.js
+86
-45
user_template_tpl.html
public/resource/template/user_template_tpl.html
+4
-1
No files found.
application/api_broker/controller/Client.php
View file @
19cca98b
...
@@ -154,8 +154,8 @@ class Client extends Basic
...
@@ -154,8 +154,8 @@ class Client extends Basic
$time
=
date
(
"Y-m-d H:i:s"
,
time
());
//当前时间
$time
=
date
(
"Y-m-d H:i:s"
,
time
());
//当前时间
$params
=
$this
->
request
->
param
();
$params
=
$this
->
request
->
param
();
$params
[
'type'
]
=
0
;
/*
$params['type'] = 0;
$params
[
'agent_id'
]
=
'57
75'
;
$params['agent_id'] = '57
41';*/
if
(
empty
(
$params
[
'agent_id'
])){
if
(
empty
(
$params
[
'agent_id'
])){
...
@@ -365,7 +365,7 @@ class Client extends Basic
...
@@ -365,7 +365,7 @@ class Client extends Basic
$data
[
'search_type'
]
=
$search_type
;
$data
[
'search_type'
]
=
$search_type
;
$vip_services
=
new
VipService
();
$vip_services
=
new
VipService
();
$data
[
'examine_vip'
]
=
$vip_services
->
vip
(
$params
[
'
agent
_id'
]);
$data
[
'examine_vip'
]
=
$vip_services
->
vip
(
$params
[
'
user
_id'
]);
return
$this
->
response
(
"200"
,
"success!"
,
$data
);
return
$this
->
response
(
"200"
,
"success!"
,
$data
);
}
}
...
...
application/api_broker/controller/Report.php
View file @
19cca98b
...
@@ -115,6 +115,42 @@ class Report extends Basic
...
@@ -115,6 +115,42 @@ class Report extends Basic
}
}
}
/**
* 获取报备列表 pc
*
* @return \think\Response
*/
public
function
reportListForPc
()
{
/* $params = array(
"agent_id" =>10013,
"type" => 1,//1表示全部 2表示进场 3 表示收款 4成交报告
"page_no"=>1,
"page_size"=>15
);*/
$params
=
$this
->
params
;
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"type"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$pageNo
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$pageSize
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$field
=
"a.id,a.user_id,a.user_phone,a.user_name,a.predict_see_time,a.create_time,b.id as order_id,b.order_no,b.house_id,b.house_title"
;
$params
[
"report_agent_id"
]
=
$params
[
"agent_id"
];
$result
=
$this
->
service_
->
orderListForPc
(
$field
,
$params
,
$pageNo
,
$pageSize
);
if
(
count
(
$result
)
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
else
{
return
$this
->
response
(
"200"
,
"request null"
);
}
}
}
/**
/**
...
...
application/api_broker/controller/User.php
View file @
19cca98b
...
@@ -123,7 +123,7 @@ class User extends Basic
...
@@ -123,7 +123,7 @@ class User extends Basic
return
$this
->
response
(
"200"
,
"此条件没有找到数据"
);
return
$this
->
response
(
"200"
,
"此条件没有找到数据"
);
}
}
$vip_services
=
new
VipService
();
$vip_services
=
new
VipService
();
$data
[
'examine_vip'
]
=
$vip_services
->
vip
(
$params
[
'
agent
_id'
]);
$data
[
'examine_vip'
]
=
$vip_services
->
vip
(
$params
[
'
user
_id'
]);
$data
[
'user_date'
]
=
$userList
;
$data
[
'user_date'
]
=
$userList
;
return
$this
->
response
(
"200"
,
'request success'
,
$data
);
return
$this
->
response
(
"200"
,
'request success'
,
$data
);
}
}
...
...
application/api_broker/service/ReportService.php
View file @
19cca98b
...
@@ -133,7 +133,6 @@ class ReportService
...
@@ -133,7 +133,6 @@ class ReportService
$params
[
"house_ids"
]
=
$ids
;
$params
[
"house_ids"
]
=
$ids
;
$result
=
$this
->
oReportModel
->
selectReportList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
$result
=
$this
->
oReportModel
->
selectReportList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
$ids_str
=
""
;
$ids_str
=
""
;
if
(
count
(
$result
)
>
0
)
{
if
(
count
(
$result
)
>
0
)
{
foreach
(
$result
as
$k
=>
$v
)
{
foreach
(
$result
as
$k
=>
$v
)
{
...
@@ -154,12 +153,71 @@ class ReportService
...
@@ -154,12 +153,71 @@ class ReportService
}
}
}
}
return
$result
;
return
$result
;
}
}
return
null
;
return
null
;
}
}
/**
* 报备订单列表
* @param $field
* @param $params
* @param $pageNo
* @param $pageSize
* @return mixed|null
* @throws \think\db\exception\BindParamException
* @throws \think\exception\PDOException
*/
public
function
orderListForPc
(
$field
,
$params
,
$pageNo
,
$pageSize
)
{
//todo 获取我报备的我的案场的,如果是店长则获取其下所有的经纪人
$vModel
=
new
VerifyService
();
$agentArr
=
$vModel
->
getAgentsByAgentId
(
$params
[
"report_agent_id"
]);
if
(
$agentArr
)
{
$params
[
"agent_id_s"
]
=
array
(
"in"
,
$agentArr
);
$params
[
"report_agent_id"
]
=
$agentArr
;
}
$caseHouseId
=
$vModel
->
getCaseHouseIdByAgentId
(
$params
[
"agent_id_s"
]);
$ids
=
""
;
if
(
count
(
$caseHouseId
)
>
0
)
{
foreach
(
$caseHouseId
as
$item
)
{
$ids
.=
$item
[
"houses_id"
]
.
","
;
}
}
$ids
=
rtrim
(
$ids
,
","
);
$ids
=
$ids
?
$ids
:
0
;
$params
[
"house_ids"
]
=
$ids
;
$result
=
$this
->
oReportModel
->
selectReportList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
$count
=
$this
->
oReportModel
->
selectReportCount
(
$field
,
$params
);
$ids_str
=
""
;
if
(
count
(
$result
)
>
0
)
{
foreach
(
$result
as
$k
=>
$v
)
{
//$result[$k]["user_phone"] = preg_replace('/(\d{3})\d{4}(\d{4})/', '$1****$2', $v["user_phone"]);
$ids_str
.=
$v
[
"order_id"
]
.
","
;
}
$ids_str
=
rtrim
(
$ids_str
,
","
);
$sign_arr
=
$this
->
orderSign
(
$ids_str
);
foreach
(
$result
as
$k
=>
$v
)
{
$result
[
$k
][
"sign"
]
=
""
;
foreach
(
$sign_arr
as
$value
)
{
if
(
$v
[
"order_id"
]
==
$value
[
"order_id"
])
{
$result
[
$k
][
"sign"
]
.=
$this
->
signTitle
(
$value
[
"type"
])
.
","
;
}
}
}
$data
[
"result"
]
=
$result
;
$data
[
"total"
]
=
$count
[
0
][
"total"
];
return
$data
;
}
return
null
;
}
public
function
orderSign
(
$ids_str
)
public
function
orderSign
(
$ids_str
)
{
{
...
...
application/api_broker/service/VipService.php
View file @
19cca98b
...
@@ -25,7 +25,7 @@ class VipService
...
@@ -25,7 +25,7 @@ class VipService
$agent
=
new
AAgents
();
$agent
=
new
AAgents
();
$fields
=
'auth_group_id'
;
$fields
=
'auth_group_id'
;
$auth_group_id
=
$agent
->
getAgentsById
(
$id
,
$fields
);
$auth_group_id
=
$agent
->
getAgentsById
(
$id
,
$fields
);
//var_dump($auth_group_id);
$auth_group
=
New
AuthGroup
();
$auth_group
=
New
AuthGroup
();
$id
=
$auth_group_id
;
$id
=
$auth_group_id
;
...
@@ -39,6 +39,8 @@ class VipService
...
@@ -39,6 +39,8 @@ class VipService
$rules_arr
=
explode
(
','
,
$rules
);
$rules_arr
=
explode
(
','
,
$rules
);
//dump($rules_arr);
if
(
in_array
(
$sauth_ruel_id
,
$rules_arr
))
{
if
(
in_array
(
$sauth_ruel_id
,
$rules_arr
))
{
return
0
;
return
0
;
...
...
application/app_broker/view/index/shop_detail_pc.html
View file @
19cca98b
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<body
style=
"display: none;"
>
<body
style=
"display: none;"
>
<div
id=
"app"
>
<div
id=
"app"
>
<main>
<main>
<section
v-
if=
"d.lookShopArr && (d.lookShopArr.isPanParty || (d.lookShopArr.residue_num>0))
"
>
<section
v-
show=
"dataCode==200
"
>
<table>
<table>
<tbody>
<tbody>
<tr>
<tr>
...
@@ -90,7 +90,7 @@
...
@@ -90,7 +90,7 @@
<div
class=
"fl"
>
房东:
</div>
<div
class=
"fl"
>
房东:
</div>
<div
class=
"fl"
>
<div
class=
"fl"
>
<ul
class=
"oh phone-list"
>
<ul
class=
"oh phone-list"
>
<li
class=
"fl oh"
v-for=
"(item, index) in d.landlord_phone"
:key=
"index"
>
{{item.name+'-'+
item.phone
}}
</li>
<li
class=
"fl oh"
v-for=
"(item, index) in d.landlord_phone"
:key=
"index"
>
{{item.name+'-'+
hidePhone(item.phone)
}}
</li>
</ul>
</ul>
</div>
</div>
</td>
</td>
...
@@ -127,7 +127,8 @@
...
@@ -127,7 +127,8 @@
</tbody>
</tbody>
</table>
</table>
</section>
</section>
<section
v-else
>
查看数量已达上限
</section>
<section
v-show=
"dataCode==102"
>
查看数量已达上限
</section>
<section
v-show=
"dataCode!=200"
></section>
</main>
</main>
</div>
</div>
<script
src=
"/app/js/libs/require.min.js"
data-js=
"/app/js/shop_detail_pc.js"
data-main=
"/app/js/main"
data-norem=
"yes"
defer
async=
"true"
></script>
<script
src=
"/app/js/libs/require.min.js"
data-js=
"/app/js/shop_detail_pc.js"
data-main=
"/app/js/main"
data-norem=
"yes"
defer
async=
"true"
></script>
...
...
application/index/controller/Houses.php
View file @
19cca98b
...
@@ -9,8 +9,7 @@
...
@@ -9,8 +9,7 @@
namespace
app\index\controller
;
namespace
app\index\controller
;
use
app\api\controller\Sublet
;
use
app\api_broker\service\LookShopService
;
//use app\api_broker\service\LookShopService;
use
app\index\extend\Basic
;
use
app\index\extend\Basic
;
use
app\model\AAgents
;
use
app\model\AAgents
;
use
app\model\GHouses
;
use
app\model\GHouses
;
...
@@ -220,10 +219,10 @@ class Houses extends Basic
...
@@ -220,10 +219,10 @@ class Houses extends Basic
$data
[
'data'
][
'total'
]
=
$this
->
house
->
getHouseListDishTotal
(
$where
);
$data
[
'data'
][
'total'
]
=
$this
->
house
->
getHouseListDishTotal
(
$where
);
}
}
//
$look_shop = new LookShopService();
$look_shop
=
new
LookShopService
();
foreach
(
$data
[
'data'
][
'list'
]
as
$k
=>
$v
)
{
foreach
(
$data
[
'data'
][
'list'
]
as
$k
=>
$v
)
{
$data
[
'data'
][
'list'
][
$k
][
"is_look"
]
=
false
;
$data
[
'data'
][
'list'
][
$k
][
"is_look"
]
=
$look_shop
->
isLooked
(
$this
->
userId
,
$v
[
"id"
]);
;
}
}
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
...
...
application/index/controller/Member.php
View file @
19cca98b
...
@@ -255,6 +255,7 @@ class Member extends Basic{
...
@@ -255,6 +255,7 @@ class Member extends Basic{
$data
[
'list'
]
=
$this
->
user
->
getUserAgent
(
$pageNo
,
$pageSize
,
'a.id DESC'
,
$fields
,
$where
,
$type
);
$data
[
'list'
]
=
$this
->
user
->
getUserAgent
(
$pageNo
,
$pageSize
,
'a.id DESC'
,
$fields
,
$where
,
$type
);
foreach
(
$data
[
'list'
]
as
$k
=>
$v
)
{
foreach
(
$data
[
'list'
]
as
$k
=>
$v
)
{
$data
[
'list'
][
$k
][
'user_phone'
]
=
hide_customer_phone
(
$data
[
'list'
][
$k
][
'user_phone'
]);
$data
[
'list'
][
$k
][
'current_agent_id'
]
=
$this
->
userId
;
$data
[
'list'
][
$k
][
'current_agent_id'
]
=
$this
->
userId
;
}
}
...
...
application/index/controller/Remark.php
View file @
19cca98b
...
@@ -54,7 +54,7 @@ class Remark extends Basic
...
@@ -54,7 +54,7 @@ class Remark extends Basic
}
}
if
(
!
empty
(
$this
->
params
[
'customer'
]))
{
if
(
!
empty
(
$this
->
params
[
'customer'
]))
{
$where
[
'c.user_n
ick
'
]
=
$this
->
params
[
'customer'
];
$where
[
'c.user_n
ame
'
]
=
$this
->
params
[
'customer'
];
}
}
if
(
!
empty
(
$this
->
params
[
'phone'
]))
{
if
(
!
empty
(
$this
->
params
[
'phone'
]))
{
...
@@ -152,6 +152,7 @@ class Remark extends Basic
...
@@ -152,6 +152,7 @@ class Remark extends Basic
$user
=
new
Users
();
$user
=
new
Users
();
$user_res
=
$user
->
useraction_search_user_res
(
$user_id
,
1
);
$user_res
=
$user
->
useraction_search_user_res
(
$user_id
,
1
);
$user_res
[
'user_phone'
]
=
hide_customer_phone
(
$user_res
[
'user_phone'
]);
$user_res
[
'user_pic'
]
=
HEADERIMGURL
.
$user_res
[
'user_pic'
];
$user_res
[
'user_pic'
]
=
HEADERIMGURL
.
$user_res
[
'user_pic'
];
$table
=
new
AAgents
();
$table
=
new
AAgents
();
...
...
application/index/extend/Basic.php
View file @
19cca98b
...
@@ -48,7 +48,8 @@ class Basic extends Controller
...
@@ -48,7 +48,8 @@ class Basic extends Controller
'index/regions'
,
'index/regions'
,
'index/getAuth2'
,
'index/getAuth2'
,
'index/getDistrict'
,
'index/getDistrict'
,
'index/getAgentDistrictStore'
'index/getAgentDistrictStore'
,
'index/agentsUnBind'
);
);
/**
/**
...
@@ -145,8 +146,8 @@ class Basic extends Controller
...
@@ -145,8 +146,8 @@ class Basic extends Controller
}
}
}
}
//处理客方编辑客户
//处理客方编辑
、跟进、公客
客户
if
((
$requestPath
==
'index/pcEditClient'
||
$requestPath
==
'index/pcAddFollow'
)
&&
isset
(
$this
->
params
[
'id'
]))
{
if
((
$requestPath
==
'index/pcEditClient'
||
$requestPath
==
'index/pcAddFollow'
||
$requestPath
==
'index/useraction_search'
)
&&
isset
(
$this
->
params
[
'id'
]))
{
if
(
empty
(
$this
->
params
[
'id'
]))
{
if
(
empty
(
$this
->
params
[
'id'
]))
{
$is_auth
=
1
;
$is_auth
=
1
;
...
@@ -154,8 +155,13 @@ class Basic extends Controller
...
@@ -154,8 +155,13 @@ class Basic extends Controller
$m_user
=
new
Users
();
$m_user
=
new
Users
();
$where
[
'agent_id'
]
=
$this
->
userId
;
$where
[
'agent_id'
]
=
$this
->
userId
;
$where
[
'id'
]
=
$this
->
params
[
'id'
];
$where
[
'id'
]
=
$this
->
params
[
'id'
];
$is_
=
$m_user
->
getUserAgentTotal
(
$where
);
$is_
=
$m_user
->
selectUser
(
$where
,
'id,agent_id'
);
$is_auth
=
$is_
>
0
?
1
:
0
;
if
(
$is_
[
'agent_id'
]
==
0
)
{
$is_auth
=
1
;
}
else
{
$is_auth
=
$is_
>
0
?
1
:
0
;
}
}
}
}
}
}
}
...
@@ -182,9 +188,14 @@ class Basic extends Controller
...
@@ -182,9 +188,14 @@ class Basic extends Controller
if
(
empty
(
$this
->
userName
)
||
empty
(
$this
->
userId
)
||
empty
(
$this
->
lastLoginTime
)
){
if
(
empty
(
$this
->
userName
)
||
empty
(
$this
->
userId
)
||
empty
(
$this
->
lastLoginTime
)
){
$this
->
redirect
(
'/index/login'
);
$this
->
redirect
(
'/index/login'
);
}
}
//登录有效期为1小时
if
((
time
()
-
$this
->
lastLoginTime
)
>
7200
)
{
$time
=
time
();
//登录有效期为2小时
if
((
$time
-
$this
->
lastLoginTime
)
>
7200
)
{
$this
->
redirect
(
'/index/login'
);
$this
->
redirect
(
'/index/login'
);
}
else
{
//更新时间
Session
::
set
(
"lastLoginTime"
,
$time
);
}
}
return
;
return
;
...
...
application/index/view/houses/HouseFollowUp.html
View file @
19cca98b
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
<select class="form-control btn4 ld-Marheight input" name="" id="guest_stores" value="">
<select class="form-control btn4 ld-Marheight input" name="" id="guest_stores" value="">
</select>-->
</select>-->
<!--<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_name" placeholder="跟进人姓名" type="text" value="">-->
<!--<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_name" placeholder="跟进人姓名" type="text" value="">-->
<input
class=
"form-control btn
2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"user_phone"
placeholder=
"用户
姓名或电话"
type=
"text"
value=
""
>
<input
class=
"form-control btn
4 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"user_phone"
placeholder=
"跟进人
姓名或电话"
type=
"text"
value=
""
>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"search"
>
搜索
</span>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"search"
>
搜索
</span>
...
...
application/index/view/member/users_list.html
View file @
19cca98b
...
@@ -207,6 +207,11 @@
...
@@ -207,6 +207,11 @@
font-weight
:
600
;
font-weight
:
600
;
font-size
:
36px
;
font-size
:
36px
;
}
}
/*客户动态*/
.followup-modal-list-area
{
height
:
450px
;
overflow-y
:
scroll
;
}
</style>
</style>
<!--导航star-->
<!--导航star-->
...
@@ -227,7 +232,7 @@
...
@@ -227,7 +232,7 @@
<div
class=
"pull-right"
>
<div
class=
"pull-right"
>
<ul
class=
"bread_btn"
>
<ul
class=
"bread_btn"
>
<li>
<li>
<a
href=
"#modal_add_user"
data-toggle=
"modal"
class=
"btn btn-default add_alert"
><i
class=
"icon-plus"
></i>
新增客户
<a
href=
"#modal_add_user"
data-toggle=
"modal"
class=
"btn btn-default add_alert
add-user-new
"
><i
class=
"icon-plus"
></i>
新增客户
</a>
</a>
</li>
</li>
</ul>
</ul>
...
@@ -418,14 +423,14 @@
...
@@ -418,14 +423,14 @@
<label
for=
"inputEmail3"
class=
"col-sm-3 control-label"
>
姓名:
</label>
<label
for=
"inputEmail3"
class=
"col-sm-3 control-label"
>
姓名:
</label>
<div
class=
"col-sm-9"
>
<div
class=
"col-sm-9"
>
<input
type=
"text"
class=
"form-control btn6"
name=
"user_name"
id=
"inputEmail3"
placeholder=
"请输入姓名"
>
<input
type=
"text"
class=
"form-control btn6"
name=
"user_name"
id=
"inputEmail3"
placeholder=
"请输入姓名"
>
<
span
class=
"use-span text-danger"
>
(必填)
</span
>
<
!--<span class="use-span text-danger">(必填)</span>--
>
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
for=
"inputEmail3"
class=
"col-sm-3 control-label"
>
性别:
</label>
<label
for=
"inputEmail3"
class=
"col-sm-3 control-label"
>
性别:
</label>
<div
class=
"col-sm-9"
>
<div
class=
"col-sm-9"
>
<select
class=
"form-control btn6"
id=
"user_sex"
>
<select
class=
"form-control btn6"
id=
"user_sex"
>
<option
value=
"
0
"
class=
"successModel"
>
请选择
</option>
<option
value=
""
class=
"successModel"
>
请选择
</option>
<option
value=
"1"
>
男
</option>
<option
value=
"1"
>
男
</option>
<option
value=
"2"
>
女
</option>
<option
value=
"2"
>
女
</option>
</select>
</select>
...
@@ -435,7 +440,7 @@
...
@@ -435,7 +440,7 @@
<label
class=
"col-sm-3 control-label"
>
电话:
</label>
<label
class=
"col-sm-3 control-label"
>
电话:
</label>
<div
class=
"col-sm-9"
>
<div
class=
"col-sm-9"
>
<input
type=
"number"
class=
"form-control btn6"
name=
"user_phone"
autocomplete=
"off"
id=
"set_father_id2"
>
<input
type=
"number"
class=
"form-control btn6"
name=
"user_phone"
autocomplete=
"off"
id=
"set_father_id2"
>
<
span
class=
"use-span text-danger"
>
(必填)
</span
>
<
!--<span class="use-span text-danger">(必填)</span>--
>
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
...
@@ -444,7 +449,7 @@
...
@@ -444,7 +449,7 @@
<div
class=
"col-sm-9"
>
<div
class=
"col-sm-9"
>
<select
class=
"form-control btn6"
id=
"industry_type2"
>
<select
class=
"form-control btn6"
id=
"industry_type2"
>
<option
value=
"
0
"
>
业态选择
</option>
<option
value=
""
>
业态选择
</option>
<option>
轻餐饮
</option>
<option>
轻餐饮
</option>
<option>
重餐饮
</option>
<option>
重餐饮
</option>
<option>
百货零售
</option>
<option>
百货零售
</option>
...
@@ -605,9 +610,8 @@
...
@@ -605,9 +610,8 @@
</td>
</td>
</tr>
</tr>
<tr
class=
"ld-Marheight"
>
<tr
class=
"ld-Marheight"
>
<th
class=
"text-center"
>
跟进内容
</th>
<th
class=
"text-center"
>
客方修改记录:
</th>
<th
class=
"text-center"
>
跟进人
</th>
<th
class=
"text-center"
>
跟进时间
</th>
</tr>
</tr>
</thead>
</thead>
<tbody
class=
"text-center"
id=
"caozuo_table"
></tbody>
<tbody
class=
"text-center"
id=
"caozuo_table"
></tbody>
...
@@ -682,16 +686,14 @@
...
@@ -682,16 +686,14 @@
<label
class=
"control-label"
>
无效
</label><input
type=
"radio"
name=
"user_status"
value=
"-1"
>
<label
class=
"control-label"
>
无效
</label><input
type=
"radio"
name=
"user_status"
value=
"-1"
>
<span
class=
"text-danger"
>
(必填)
</span>
<span
class=
"text-danger"
>
(必填)
</span>
</div>
</div>
<div
class=
"clear"
>
</div>
<div
class=
"followup-modal-list-area"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
"
>
<!--<thead>
<tbody
class=
"text-center"
id=
"caozuo_table2"
>
<tr class="ld-Marheight">
</tbody>
<th class="text-center">跟进内容</th>
<th class="text-center">跟进人</th>
<th class="text-center">跟进时间</th>
</tr>
</thead>-->
<tbody
class=
"text-center"
id=
"caozuo_table2"
></tbody>
</table>
</table>
</div>
</div>
</div>
...
@@ -799,8 +801,10 @@
...
@@ -799,8 +801,10 @@
</div>-->
</div>-->
<div
class=
"clear"
></div>
<div
class=
"clear"
></div>
<span
class=
"fore-span ld-Marheight"
>
预计到场时间:
</span>
<span
class=
"fore-span ld-Marheight"
>
预计到场时间:
</span>
<
input
class=
"form-control btn6 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"look_shop_date"
name=
" "
type=
"datetime-local"
>
<
!--<input class="form-control btn6 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="" name=" " type="datetime-local">--
>
<!--datetime-local-->
<!--datetime-local-->
<!--bootstrap 时间控件-->
<input
type=
"text"
value=
""
class=
"form_datetime form-control btn6 ld-Marheight"
id=
"look_shop_date"
readonly=
"readonly"
>
<div
class=
"clear"
></div>
<div
class=
"clear"
></div>
<div
class=
"textarea-con ld-Marheight"
>
<div
class=
"textarea-con ld-Marheight"
>
...
...
application/model/AAgents.php
View file @
19cca98b
...
@@ -574,7 +574,8 @@ class AAgents extends BaseModel
...
@@ -574,7 +574,8 @@ class AAgents extends BaseModel
*/
*/
public
function
getAgentsById
(
$id
,
$fields
)
public
function
getAgentsById
(
$id
,
$fields
)
{
{
return
$this
->
where
(
'id'
,
$id
)
->
value
(
$fields
);
$return
=
$this
->
where
(
'id'
,
$id
)
->
value
(
$fields
);
return
$return
;
}
}
/**
/**
...
...
application/model/AuthGroup.php
View file @
19cca98b
...
@@ -242,6 +242,7 @@ class AuthGroup extends BaseModel
...
@@ -242,6 +242,7 @@ class AuthGroup extends BaseModel
*/
*/
public
function
getAuthGroupById
(
$id
,
$fields
)
public
function
getAuthGroupById
(
$id
,
$fields
)
{
{
return
$this
->
where
(
'id'
,
$id
)
->
value
(
$fields
);
$return
=
$this
->
where
(
'id'
,
$id
)
->
value
(
$fields
);
return
$return
;
}
}
}
}
application/model/AuthRule.php
View file @
19cca98b
...
@@ -205,6 +205,8 @@ class AuthRule extends BaseModel
...
@@ -205,6 +205,8 @@ class AuthRule extends BaseModel
*/
*/
public
function
getAuthRuleByName
(
$name
,
$fields
)
public
function
getAuthRuleByName
(
$name
,
$fields
)
{
{
return
$this
->
where
(
'name'
,
$name
)
->
value
(
$fields
);
$return
=
$this
->
where
(
'name'
,
$name
)
->
value
(
$fields
);
return
$return
;
}
}
}
}
\ No newline at end of file
application/model/OReportModel.php
View file @
19cca98b
...
@@ -311,6 +311,157 @@ class OReportModel extends Model
...
@@ -311,6 +311,157 @@ class OReportModel extends Model
}
}
}
/**
* @param string $filed
* @param $params
* @return mixed
* @throws \think\db\exception\BindParamException
* @throws \think\exception\PDOException
*/
public
function
selectReportCount
(
$filed
=
"id"
,
$params
)
{
if
(
isset
(
$params
[
"report_agent_id"
]))
{
$report_agent_id
=
$params
[
"report_agent_id"
];
}
if
(
isset
(
$params
[
"house_ids"
]))
{
$house_ids
=
$params
[
"house_ids"
];
}
switch
(
$params
[
"type"
])
{
case
2
:
$sql
=
"SELECT count(1) as total FROM
(( SELECT
$filed
FROM
`o_report` `a`
LEFT JOIN `o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `o_march_in` `c` ON `b`.`id` = `c`.`order_id`
WHERE
`a`.`report_agent_id` IN (
$report_agent_id
)
AND `a`.`status` = 0
AND `b`.`is_del` = 0
GROUP BY
`c`.`order_id`
)UNION(
SELECT
$filed
FROM
`o_report` `a`
LEFT JOIN `o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `o_march_in` `c` ON `b`.`id` = `c`.`order_id`
WHERE
`b`.`house_id` IN (
$house_ids
)
AND `a`.`status` = 0
AND `b`.`is_del` = 0
GROUP BY
`c`.`order_id`
) ) AS aaa "
;
$result
=
$this
->
db
->
query
(
$sql
);
return
$result
;
case
3
:
$sql
=
"SELECT count(1) as total FROM
(
(
SELECT
$filed
FROM
`o_report` `a`
LEFT JOIN `o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `o_paylog` `c` ON `b`.`id` = `c`.`order_id`
WHERE
`a`.`report_agent_id` IN (
$report_agent_id
)
AND `a`.`status` = 0
AND `b`.`is_del` = 0
GROUP BY
`c`.`order_id`
)
UNION
(
SELECT
$filed
FROM
`o_report` `a`
LEFT JOIN `o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `o_paylog` `c` ON `b`.`id` = `c`.`order_id`
WHERE
`b`.`house_id` IN (
$house_ids
)
AND `a`.`status` = 0
AND `b`.`is_del` = 0
GROUP BY
`c`.`order_id`
)
) AS aaa"
;
$result
=
$this
->
db
->
query
(
$sql
);
return
$result
;
case
4
:
$sql
=
"SELECT count(1) as total FROM
((
SELECT
$filed
FROM
`o_report` `a`
LEFT JOIN `o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `o_bargain` `c` ON `b`.`id` = `c`.`order_id`
WHERE
`a`.`report_agent_id` IN (
$report_agent_id
)
AND `a`.`status` = 0
AND `b`.`is_del` = 0
GROUP BY
`c`.`order_id`
)
UNION
(
SELECT
$filed
FROM
`o_report` `a`
LEFT JOIN `o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `o_bargain` `c` ON `b`.`id` = `c`.`order_id`
WHERE
`b`.`house_id` IN (
$house_ids
)
AND `a`.`status` = 0
AND `b`.`is_del` = 0
GROUP BY
`c`.`order_id`
)
) AS aaa "
;
$result
=
$this
->
db
->
query
(
$sql
);
return
$result
;
default
:
$sql
=
"SELECT count(1) as total FROM
((SELECT
$filed
FROM
`o_report` `a`
LEFT JOIN `o_order` `b` ON `a`.`id` = `b`.`f_id`
WHERE
`a`.`report_agent_id` IN (
$report_agent_id
)
AND `a`.`status` = 0
AND `b`.`is_del` = 0)
UNION
(SELECT
$filed
FROM
`o_report` `a`
LEFT JOIN `o_order` `b` ON `a`.`id` = `b`.`f_id`
WHERE
`b`.`house_id` IN (
$house_ids
)
AND `a`.`status` = 0
AND `b`.`is_del` = 0
) ) as aaa"
;
$result
=
$this
->
db
->
query
(
$sql
);
//echo $this->getLastSql();
return
$result
;
}
}
}
...
...
application/model/UPhoneFollowPp.php
View file @
19cca98b
...
@@ -171,6 +171,9 @@ class UPhoneFollowPp extends BaseModel
...
@@ -171,6 +171,9 @@ class UPhoneFollowPp extends BaseModel
{
{
$UPhoneFollowPp_res
=
db
(
'u_phone_follow_up'
)
$UPhoneFollowPp_res
=
db
(
'u_phone_follow_up'
)
//->where('user_id',$user_id)
//->where('user_id',$user_id)
->
field
(
'a.*,b.vip'
)
->
alias
(
'a'
)
->
join
(
'u_users b'
,
'a.user_id = b.id'
,
'left'
)
->
where
(
'content'
,
'like'
,
"%
$searchdate
%"
)
->
where
(
'content'
,
'like'
,
"%
$searchdate
%"
)
->
order
(
'create_time'
,
'desc'
)
->
order
(
'create_time'
,
'desc'
)
->
limit
(
$pagesize
)
->
limit
(
$pagesize
)
...
...
application/model/Users.php
View file @
19cca98b
...
@@ -267,7 +267,7 @@ class Users extends Model
...
@@ -267,7 +267,7 @@ class Users extends Model
if
(
!
empty
(
$data
[
'area_demand'
]))
{
if
(
!
empty
(
$data
[
'area_demand'
]))
{
$insert_data
[
'area_demand'
]
=
$data
[
'area_demand'
];
$insert_data
[
'area_demand'
]
=
$data
[
'area_demand'
];
}
}
if
(
!
empty
(
$data
[
'vip'
]))
{
if
(
isset
(
$data
[
'vip'
]))
{
$insert_data
[
'vip'
]
=
$data
[
'vip'
];
$insert_data
[
'vip'
]
=
$data
[
'vip'
];
}
}
if
(
$id
&&
$id
>
0
)
{
if
(
$id
&&
$id
>
0
)
{
...
...
application/route.php
View file @
19cca98b
...
@@ -428,6 +428,7 @@ Route::group('broker', [
...
@@ -428,6 +428,7 @@ Route::group('broker', [
'reportList'
=>
[
'api_broker/Report/reportList'
,
[
'method'
=>
'get'
]
],
'reportList'
=>
[
'api_broker/Report/reportList'
,
[
'method'
=>
'get'
]
],
'reportListForPc'
=>
[
'api_broker/Report/reportListForPc'
,
[
'method'
=>
'get'
]
],
'orderDetail'
=>
[
'api_broker/OrderLog/orderDetail'
,
[
'method'
=>
'get|post'
]
],
'orderDetail'
=>
[
'api_broker/OrderLog/orderDetail'
,
[
'method'
=>
'get|post'
]
],
...
...
public/app/js/shop_detail_pc.js
View file @
19cca98b
...
@@ -6,11 +6,11 @@ require(['vue', 'css!style/shop_detail_pc.css', 'jquery0325', 'common'],function
...
@@ -6,11 +6,11 @@ require(['vue', 'css!style/shop_detail_pc.css', 'jquery0325', 'common'],function
el
:
'#app'
,
el
:
'#app'
,
data
:
{
data
:
{
user_info_obj
,
user_info_obj
,
dataCode
:
''
,
d
:
{}
d
:
{}
},
},
created
:
function
()
{
created
:
function
()
{
var
_this
=
this
;
var
_this
=
this
;
document
.
body
.
style
.
display
=
'block'
;
$
.
ajax
({
$
.
ajax
({
type
:
'get'
,
type
:
'get'
,
url
:
'/broker/getShopDetail'
,
url
:
'/broker/getShopDetail'
,
...
@@ -23,7 +23,9 @@ require(['vue', 'css!style/shop_detail_pc.css', 'jquery0325', 'common'],function
...
@@ -23,7 +23,9 @@ require(['vue', 'css!style/shop_detail_pc.css', 'jquery0325', 'common'],function
dataType
:
'json'
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
success
:
function
(
_data
)
{
document
.
body
.
style
.
display
=
'block'
;
if
(
typeof
_data
===
'object'
)
{
if
(
typeof
_data
===
'object'
)
{
_this
.
dataCode
=
_data
[
'code'
];
if
(
_data
[
'code'
]
==
'200'
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
_this
.
d
=
_data
.
data
;
_this
.
d
=
_data
.
data
;
}
else
{
}
else
{
...
@@ -45,22 +47,8 @@ require(['vue', 'css!style/shop_detail_pc.css', 'jquery0325', 'common'],function
...
@@ -45,22 +47,8 @@ require(['vue', 'css!style/shop_detail_pc.css', 'jquery0325', 'common'],function
});
});
},
},
methods
:
{
methods
:
{
dealPriceSwicth
:
function
(
t
)
{
hidePhone
(
t
)
{
let
_this
=
this
;
return
hideTel
(
t
);
if
(
t
==
'1'
){
return
{
}
}
else
if
(
t
==
'2'
){
return
{
}
}
else
{
return
{
}
}
}
}
},
},
computed
:
{
computed
:
{
...
...
public/resource/js/houseFollowUp.js
View file @
19cca98b
...
@@ -83,7 +83,7 @@ define(['doT', 'text!temp/followHouseUp_template_tpl.html', 'css!style/home.css'
...
@@ -83,7 +83,7 @@ define(['doT', 'text!temp/followHouseUp_template_tpl.html', 'css!style/home.css'
$
(
'#guest_stores'
).
html
(
''
);
$
(
'#guest_stores'
).
html
(
''
);
});
});
},
},
getList
:
function
(
pageNo
)
{
//
获取约带看记录
列表
getList
:
function
(
pageNo
)
{
//
商铺跟进
列表
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
console
.
log
(
user_info_obj
.
AuthToken
);
console
.
log
(
user_info_obj
.
AuthToken
);
house
.
pageNo
=
pageNo
;
house
.
pageNo
=
pageNo
;
...
...
public/resource/js/inspectionRecord.js
View file @
19cca98b
...
@@ -89,7 +89,7 @@ define(['doT', 'text!temp/inspectionRecord_list_template_tpl.html', 'css!style/h
...
@@ -89,7 +89,7 @@ define(['doT', 'text!temp/inspectionRecord_list_template_tpl.html', 'css!style/h
});
});
},
},
getList
:
function
(
pageNo
)
{
//获取约带看记录列表
getList
:
function
(
pageNo
)
{
//获取约带看记录列表
record
.
pageNo
=
pageNo
;
record
.
pageNo
=
pageNo
;
//接收参数
var
params
=
{};
var
params
=
{};
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
console
.
log
(
user_info_obj
);
console
.
log
(
user_info_obj
);
...
@@ -100,8 +100,6 @@ define(['doT', 'text!temp/inspectionRecord_list_template_tpl.html', 'css!style/h
...
@@ -100,8 +100,6 @@ define(['doT', 'text!temp/inspectionRecord_list_template_tpl.html', 'css!style/h
// params.user_phone = $('#user_phone').val();
// params.user_phone = $('#user_phone').val();
// params.report_agent_phone = $('#report_agent_phone').val();
// params.report_agent_phone = $('#report_agent_phone').val();
// params.house_title = $('#house_title').val();
// params.house_title = $('#house_title').val();
params
.
pageNo
=
record
.
pageNo
;
params
.
pageSize
=
record
.
pageSize
;
// var start_ = $('#create_time_start').val()+" 00:00:00";
// var start_ = $('#create_time_start').val()+" 00:00:00";
// date_start =new Date(Date.parse(start_.replace(/-/g, "/")));
// date_start =new Date(Date.parse(start_.replace(/-/g, "/")));
// params.start_time =date_start.getTime()*0.001;
// params.start_time =date_start.getTime()*0.001;
...
@@ -114,9 +112,11 @@ define(['doT', 'text!temp/inspectionRecord_list_template_tpl.html', 'css!style/h
...
@@ -114,9 +112,11 @@ define(['doT', 'text!temp/inspectionRecord_list_template_tpl.html', 'css!style/h
params
.
AuthToken
=
user_info_obj
.
AuthToken
;
params
.
AuthToken
=
user_info_obj
.
AuthToken
;
params
.
agent_id
=
user_info_obj
.
id
;
params
.
agent_id
=
user_info_obj
.
id
;
params
.
type
=
1
;
params
.
type
=
1
;
params
.
page_no
=
record
.
pageNo
;
params
.
page_size
=
record
.
pageSize
;
$
.
ajax
({
$
.
ajax
({
type
:
'GET'
,
type
:
'GET'
,
url
:
'/broker/reportList'
,
//约带看记录 对接接口
url
:
'/broker/reportList
ForPc
'
,
//约带看记录 对接接口
data
:
params
,
data
:
params
,
timeout
:
30000
,
timeout
:
30000
,
dataType
:
'json'
,
dataType
:
'json'
,
...
@@ -125,10 +125,11 @@ define(['doT', 'text!temp/inspectionRecord_list_template_tpl.html', 'css!style/h
...
@@ -125,10 +125,11 @@ define(['doT', 'text!temp/inspectionRecord_list_template_tpl.html', 'css!style/h
if
(
typeof
data
===
'object'
)
{
if
(
typeof
data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
200
)
{
var
doTtmpl
=
doT
.
template
(
document
.
getElementById
(
'inspectionRecord_list_tpl'
).
innerHTML
);
var
doTtmpl
=
doT
.
template
(
document
.
getElementById
(
'inspectionRecord_list_tpl'
).
innerHTML
);
$
(
"#follow_list"
).
html
(
doTtmpl
(
data
.
data
));
$
(
"#follow_list"
).
html
(
doTtmpl
(
data
.
data
.
result
));
/*分页代码*/
/*分页代码*/
console
.
log
(
data
.
data
.
total
);
add_page
(
data
.
data
.
total
,
pageNo
,
record
.
pageSize
,
record
.
getList
);
add_page
(
data
.
data
.
total
,
pageNo
,
record
.
pageSize
,
record
.
getList
);
$
(
".move-block"
).
html
(
' '
);
//
$(".move-block").html(' ');
}
else
{
}
else
{
alert
(
data
[
'msg'
]);
alert
(
data
[
'msg'
]);
...
...
public/resource/js/login.js
View file @
19cca98b
...
@@ -54,7 +54,7 @@ $(function(){
...
@@ -54,7 +54,7 @@ $(function(){
if
(
typeof
data
===
'object'
)
{
if
(
typeof
data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
200
)
{
localStorage
.
setItem
(
'pcUserInfo'
,
encodeURIComponent
(
JSON
.
stringify
(
data
.
data
)));
//存储PC后台登录用户所有信息
localStorage
.
setItem
(
'pcUserInfo'
,
encodeURIComponent
(
JSON
.
stringify
(
data
.
data
)));
//存储PC后台登录用户所有信息
location
.
href
=
'/admin.php/index/
banner
'
;
location
.
href
=
'/admin.php/index/
getHouseList
'
;
}
else
{
}
else
{
alert
(
data
[
'msg'
]);
alert
(
data
[
'msg'
]);
};
};
...
...
public/resource/js/user.js
View file @
19cca98b
...
@@ -16,13 +16,33 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
...
@@ -16,13 +16,33 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
user
.
getList
();
user
.
getList
();
user
.
event
();
user
.
event
();
//时间控件初始化
//时间控件初始化
/* $('#datetimepicker').datetimepicker({
//bootstrap 时间控件选择
format: 'yyyy-MM-dd',
language: 'zh-CN',
//汉化实现
pickTime: false
;(
function
(
$
){
}).on('changeDate',function(){
$
.
fn
.
datetimepicker
.
dates
[
'zh-CN'
]
=
{
$(this).datetimepicker('hide');
days
:
[
"星期日"
,
"星期一"
,
"星期二"
,
"星期三"
,
"星期四"
,
"星期五"
,
"星期六"
,
"星期日"
],
});*/
daysShort
:
[
"周日"
,
"周一"
,
"周二"
,
"周三"
,
"周四"
,
"周五"
,
"周六"
,
"周日"
],
daysMin
:
[
"日"
,
"一"
,
"二"
,
"三"
,
"四"
,
"五"
,
"六"
,
"日"
],
months
:
[
"01"
,
"02"
,
"03"
,
"04"
,
"05"
,
"06"
,
"07"
,
"08"
,
"09"
,
"10"
,
"11"
,
"12"
],
monthsShort
:
[
"01"
,
"02"
,
"03"
,
"04"
,
"05"
,
"06"
,
"07"
,
"08"
,
"09"
,
"10"
,
"11"
,
"12"
],
today
:
"今日"
,
suffix
:
[],
meridiem
:
[
"am"
,
"pm"
],
weekStart
:
1
,
};
}(
jQuery
));
$
(
".form_datetime"
).
datetimepicker
({
//format: 'yyyy-mm-dd hh:ii:ss',
format
:
'yyyy-mm-dd hh:ii:00'
,
autoclose
:
true
,
language
:
'zh-CN'
,
minView
:
0
,
minuteStep
:
30
//hourStep: 1
});
},
},
event
:
function
()
{
event
:
function
()
{
var
_doc
=
$
(
document
);
var
_doc
=
$
(
document
);
...
@@ -118,12 +138,16 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
...
@@ -118,12 +138,16 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
document
.
getElementById
(
"add_user_form"
).
reset
();
document
.
getElementById
(
"add_user_form"
).
reset
();
});
});
//
===========================新增客户====================
//
新增客户
$
(
document
).
delegate
(
"#add_user"
,
"click"
,
function
()
{
//新增客户
$
(
document
).
delegate
(
"#add_user"
,
"click"
,
function
()
{
//新增客户
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
add_user
();
user
.
add_user
();
});
});
//点击新增客户 清除id
$
(
document
).
delegate
(
".add-user-new"
,
"click"
,
function
()
{
//新增客户
user
.
agent_id
=
''
;
});
// 跟进的提交按钮 点击
// 跟进的提交按钮 点击
$
(
document
).
delegate
(
"#edit_add"
,
"click"
,
function
(
e
)
{
$
(
document
).
delegate
(
"#edit_add"
,
"click"
,
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
...
@@ -140,8 +164,9 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
...
@@ -140,8 +164,9 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
user
.
user_phone
=
$
(
this
).
attr
(
"data-phone"
);
user
.
user_phone
=
$
(
this
).
attr
(
"data-phone"
);
user
.
Caozuo
();
user
.
Caozuo
();
});
});
$
(
document
).
on
(
"input"
,
"#set_father_id3"
,
function
()
{
//手机号搜索客方
$
(
document
).
on
(
"input"
,
"#set_father_id3"
,
function
()
{
//手机号
新增
搜索客方
if
(
$
(
"#set_father_id3"
).
val
()
==
''
)
{
if
(
$
(
"#set_father_id3"
).
val
()
==
''
)
{
user
.
agent_id
=
''
;
$
(
".user-ul"
).
html
(
''
);
$
(
".user-ul"
).
html
(
''
);
}
else
{
}
else
{
user
.
search_phone
();
user
.
search_phone
();
...
@@ -170,14 +195,15 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
...
@@ -170,14 +195,15 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
}
}
});
});
$
(
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-ul2"
).
html
(
''
);
$
(
".user-ul2"
).
html
(
''
);
}
else
{
}
else
{
user
.
search_phone2
();
user
.
search_phone2
();
}
}
});
});
$
(
document
).
delegate
(
".addphone"
,
"click"
,
function
()
{
//list消失
$
(
document
).
delegate
(
".addphone"
,
"click"
,
function
()
{
//list消失
新增客户 点击li事件 获取id ul消失
user
.
addphone
(
this
);
user
.
addphone
(
this
);
});
});
$
(
document
).
delegate
(
".addphone2"
,
"click"
,
function
()
{
//list2消失
$
(
document
).
delegate
(
".addphone2"
,
"click"
,
function
()
{
//list2消失
...
@@ -254,22 +280,19 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
...
@@ -254,22 +280,19 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
_this
.
parent
().
prev
().
val
(
_this
.
html
()).
attr
(
'data-id'
,
_this
.
attr
(
'data-id'
));
_this
.
parent
().
prev
().
val
(
_this
.
html
()).
attr
(
'data-id'
,
_this
.
attr
(
'data-id'
));
_this
.
parent
().
html
(
''
).
hide
();
_this
.
parent
().
html
(
''
).
hide
();
});
});
// ===================
},
},
addphone
:
function
(
obj
)
{
addphone
:
function
(
obj
)
{
//新增客户 input赋值
var
user_ht
=
$
(
obj
).
html
();
var
user_ht
=
$
(
obj
).
html
();
$
(
"#set_father_id3"
).
val
(
user_ht
);
$
(
"#set_father_id3"
).
val
(
user_ht
);
$
(
".user-ul"
).
html
(
''
);
$
(
".user-ul"
).
html
(
''
);
user
.
agent_id
=
$
(
obj
).
attr
(
"data-id"
);
user
.
agent_id
=
$
(
obj
).
attr
(
"data-id"
);
},
},
addphone2
:
function
(
obj
)
{
addphone2
:
function
(
obj
)
{
var
user_ht
=
$
(
obj
).
html
();
var
user_ht
=
$
(
obj
).
html
();
$
(
"#cus_fang"
).
val
(
user_ht
);
$
(
"#cus_fang"
).
val
(
user_ht
);
$
(
".user-ul2"
).
html
(
''
);
$
(
".user-ul2"
).
html
(
''
);
user
.
agent_id2
=
$
(
obj
).
attr
(
"data-id"
);
user
.
agent_id2
=
$
(
obj
).
attr
(
"data-id"
);
},
},
//约带看 商铺名称搜索
//约带看 商铺名称搜索
addphone3
:
function
(
obj
)
{
addphone3
:
function
(
obj
)
{
...
@@ -286,7 +309,6 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
...
@@ -286,7 +309,6 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
arr_look
[
i
]
=
$
(
'.look-shop'
).
eq
(
i
).
attr
(
'data-id'
);
arr_look
[
i
]
=
$
(
'.look-shop'
).
eq
(
i
).
attr
(
'data-id'
);
}
}
}
}
// if(user_info_obj.id==1){
// if(user_info_obj.id==1){
// alert('当前用户没有权限提交约带看');
// alert('当前用户没有权限提交约带看');
...
@@ -296,18 +318,16 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
...
@@ -296,18 +318,16 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
if
(
arr_look
.
length
<
0
||
arr_look
.
length
==
0
){
if
(
arr_look
.
length
<
0
||
arr_look
.
length
==
0
){
alert
(
'请选择约带看商铺'
);
alert
(
'请选择约带看商铺'
);
return
false
;
return
false
;
}
}
if
(
$
(
"#look_shop_date"
).
val
()
==
''
){
var
look_shop_date_val
=
$
(
"#look_shop_date"
).
val
();
if
(
look_shop_date_val
==
''
){
alert
(
'请选择预计到场时间'
);
alert
(
'请选择预计到场时间'
);
return
false
;
return
false
;
}
}
var
start_
=
$
(
"#look_shop_date"
).
val
()
+
":00"
;
var
_temp_date
=
new
Date
(
look_shop_date_val
+
':000'
);
//格式为2018-07-14 10:30:05:000
var
start_a
=
start_
.
replace
(
'T'
,
' '
);
console
.
log
(
_temp_date
);
console
.
log
(
start_a
);
var
start_time
=
_temp_date
.
getTime
();
date_start
=
new
Date
(
Date
.
parse
(
start_a
.
replace
(
/-/g
,
"/"
)));
console
.
log
(
start_time
);
var
start_time
=
date_start
.
getTime
()
*
0.001
;
// 2018-07-14T09:06 00:00:00
if
(
!
user
.
isAjaxSaving
){
if
(
!
user
.
isAjaxSaving
){
user
.
isAjaxSaving
=
true
;
user
.
isAjaxSaving
=
true
;
$
.
ajax
({
$
.
ajax
({
...
@@ -347,7 +367,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
...
@@ -347,7 +367,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
}
}
},
},
search_phone
:
function
()
{
//手机号
search_phone
:
function
()
{
//手机号
新增客户
$
.
ajax
({
$
.
ajax
({
url
:
'/index/getBroker_new'
,
url
:
'/index/getBroker_new'
,
type
:
'GET'
,
type
:
'GET'
,
...
@@ -371,7 +391,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
...
@@ -371,7 +391,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
}
}
});
});
},
},
search_phone2
:
function
()
{
//手机号
search_phone2
:
function
()
{
//手机号
编辑是 客方搜索
$
.
ajax
({
$
.
ajax
({
url
:
'/index/getBroker_new'
,
url
:
'/index/getBroker_new'
,
type
:
'GET'
,
type
:
'GET'
,
...
@@ -571,7 +591,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
...
@@ -571,7 +591,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
}
}
});
});
},
},
//
====================新增客户页面==================
//
新增客户页面
Caozuo
:
function
()
{
//获取跟进详情的数据
Caozuo
:
function
()
{
//获取跟进详情的数据
$
.
ajax
({
$
.
ajax
({
'type'
:
'GET'
,
'type'
:
'GET'
,
...
@@ -701,8 +721,8 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
...
@@ -701,8 +721,8 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
params
.
id
=
0
;
params
.
id
=
0
;
params
.
user_name
=
$
(
"#add_user_form input[name='user_name']"
).
val
();
params
.
user_name
=
$
(
"#add_user_form input[name='user_name']"
).
val
();
params
.
user_phone
=
$
(
"#add_user_form input[name='user_phone']"
).
val
();
params
.
user_phone
=
$
(
"#add_user_form input[name='user_phone']"
).
val
();
params
.
agent_id
=
user
.
agent_id
;
//客方
params
.
agent
s
_id
=
user
.
agent_id
;
//客方
params
.
sex
=
$
(
"#user_sex
option:selected
"
).
val
();
params
.
sex
=
$
(
"#user_sex"
).
val
();
params
.
price_demand
=
$
(
"#price_type2"
).
val
();
params
.
price_demand
=
$
(
"#price_type2"
).
val
();
params
.
area_demand
=
$
(
"#area_type2"
).
val
();
params
.
area_demand
=
$
(
"#area_type2"
).
val
();
params
.
industry_type
=
$
(
"#industry_type2"
).
val
();
params
.
industry_type
=
$
(
"#industry_type2"
).
val
();
...
@@ -713,9 +733,9 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
...
@@ -713,9 +733,9 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
$
(
"input[name='user_name']"
).
focus
();
$
(
"input[name='user_name']"
).
focus
();
return
;
return
;
}
}
if
(
params
.
vip
==
''
)
{
if
(
params
.
sex
==
''
)
{
alert
(
'请选择
vip
'
);
alert
(
'请选择
性别
'
);
$
(
"#user_
vip
"
).
focus
();
$
(
"#user_
sex
"
).
focus
();
return
;
return
;
}
}
if
(
params
.
user_phone
==
''
)
{
if
(
params
.
user_phone
==
''
)
{
...
@@ -733,6 +753,33 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
...
@@ -733,6 +753,33 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
$
(
"input[name='user_phone']"
).
focus
();
$
(
"input[name='user_phone']"
).
focus
();
return
;
return
;
}
}
if
(
params
.
industry_type
==
''
)
{
alert
(
'请选择业态'
);
$
(
"#industry_type2"
).
focus
();
return
;
}
if
(
params
.
price_demand
==
''
)
{
alert
(
'请选择价格'
);
$
(
"#price_type2"
).
focus
();
return
;
}
if
(
params
.
area_demand
==
''
)
{
alert
(
'请选择面积'
);
$
(
"#area_type2"
).
focus
();
return
;
}
if
(
$
(
'#set_father_id3'
).
val
()
==
''
)
{
alert
(
'请选择客方'
);
$
(
"#set_father_id3"
).
focus
();
return
;
}
if
(
params
.
vip
==
''
)
{
alert
(
'请选择vip'
);
$
(
"#user_vip"
).
focus
();
return
;
}
$
.
ajax
({
$
.
ajax
({
url
:
'/index/pcEditClient'
,
url
:
'/index/pcEditClient'
,
...
@@ -742,8 +789,9 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
...
@@ -742,8 +789,9 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
200
)
{
alert
(
'提交成功'
);
user
.
getList
(
1
);
user
.
getList
(
1
);
alert
(
'提交成功'
)
$
(
"#modal_add_user"
).
modal
(
'hide'
);
// document.getElementById("add_user_form").reset();
// document.getElementById("add_user_form").reset();
}
else
{
}
else
{
alert
(
data
.
msg
);
alert
(
data
.
msg
);
...
@@ -789,30 +837,23 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
...
@@ -789,30 +837,23 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
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: '/index
/useraction_search',
url
:
'/broker
/useraction_search'
,
url
:
'
broker/useraction_search'
,
// url: 'https://pre2.tonglianjituan.com'+'/
broker/useraction_search',
type
:
'GET'
,
type
:
'GET'
,
async
:
true
,
async
:
true
,
data
:
{
data
:
{
"AuthToken"
:
user_info_obj
.
AuthToken
,
"AuthToken"
:
user_info_obj
.
AuthToken
,
"searchdate"
:
1
,
"user_id"
:
user
.
user_id
,
"user_id"
:
user
.
user_id
,
"pagenum"
:
1
,
"agent_id"
:
user_info_obj
.
id
"agent_id"
:
user_info_obj
.
id
},
},
// AuthToken true string token
//user_id true int 客户的ID
//searchdate true int 动态关键字
//pagenum false int 页码:默认第一页
//agent_id true int 经纪人id
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
//客户动态 即跟进
//客户动态 即跟进
var
caozuo_table
=
""
;
var
caozuo_table
=
""
;
$
.
each
(
data
[
'data'
][
'user_date'
],
function
(
i
,
item
)
{
$
.
each
(
data
[
'data'
][
'user_date'
],
function
(
i
,
item
)
{
caozuo_table
+=
'<tr><td>'
+
item
.
content
+
'</td><td>'
+
item
.
agentinfo
+
'</td><td>'
+
item
.
create_time
+
'</td></tr>'
;
caozuo_table
+=
'<tr><td>'
+
item
.
step
+
'</td><td>'
+
item
.
name
+
'</td><td>'
+
item
.
create_time
+
'</td></tr>'
;
});
});
if
(
caozuo_table
){
if
(
caozuo_table
){
$
(
"#caozuo_table2"
).
html
(
caozuo_table
);
$
(
"#caozuo_table2"
).
html
(
caozuo_table
);
...
...
public/resource/template/user_template_tpl.html
View file @
19cca98b
...
@@ -4,6 +4,9 @@
...
@@ -4,6 +4,9 @@
<
td
>
[
%=
it
[
item
][
'id'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'id'
]
%
]
<
/td
>
<
td
>
<
td
>
[
%
if
(
it
[
item
][
"user_name"
]
!=
null
)
{
%
]
[
%=
it
[
item
][
"user_name"
]
%
]
[
%
}
%
]
[
%
if
(
it
[
item
][
"user_name"
]
!=
null
)
{
%
]
[
%=
it
[
item
][
"user_name"
]
%
]
[
%
}
%
]
[
%
if
(
it
[
item
][
"vip"
]
==
1
)
{
%
]
<
span
class
=
"btn1 btn-danger btn-xs"
>
vip
<
/span
>
[
%
}
%
]
<
/td
>
<
/td
>
<
td
>
[
%=
hideTel
(
it
[
item
][
"user_phone"
])
%
]
<
/td
>
<
td
>
[
%=
hideTel
(
it
[
item
][
"user_phone"
])
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"create_time"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"create_time"
]
%
]
<
/td
>
...
@@ -26,7 +29,7 @@
...
@@ -26,7 +29,7 @@
[
%
if
(
it
[
item
][
'first_login_time'
]
!=
null
){
%
]
[
%=
it
[
item
][
"first_login_time"
]
%
]
[
%
}
%
]
[
%
if
(
it
[
item
][
'first_login_time'
]
!=
null
){
%
]
[
%=
it
[
item
][
"first_login_time"
]
%
]
[
%
}
%
]
<
/td
>
<
/td
>
<
td
>
<
td
>
[
%
if
((
check_auth
(
'auth_vip
'
)
&&
it
[
item
][
'vip'
])
||
(
it
[
item
][
'agent_id'
]
==
it
[
item
][
'current_agent_id'
])
||
(
check_auth
(
'index/pcEditClient'
))
)
{
%
]
[
%
if
((
check_auth
(
'auth_vip
'
)
&&
it
[
item
][
'vip'
])
||
(
it
[
item
][
'agent_id'
]
==
0
)
||
(
it
[
item
][
'agent_id'
]
==
it
[
item
][
'current_agent_id'
])
||
check_auth
(
'index/pcEditClient'
)
)
{
%
]
<
a
class
=
"btn1 btn-success caozuo"
href
=
"#modal-record"
data
-
toggle
=
"modal"
data
-
phone
=
'[%= it[item]["user_phone"] %]'
data
-
id
=
'[%= it[item]["id"] %]'
>
<
a
class
=
"btn1 btn-success caozuo"
href
=
"#modal-record"
data
-
toggle
=
"modal"
data
-
phone
=
'[%= it[item]["user_phone"] %]'
data
-
id
=
'[%= it[item]["id"] %]'
>
详细信息
详细信息
<
/a
>
<
/a
>
...
...
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