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
586e2698
Commit
586e2698
authored
Jul 15, 2019
by
clone
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' of
https://gitee.com/zwyjjc/tl_estate
into test
parents
360d8bf9
bfcf02a8
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
144 additions
and
28 deletions
+144
-28
RegisterService.php
application/api/service/RegisterService.php
+1
-1
User.php
application/api_broker/controller/User.php
+7
-6
UserLogService.php
application/index/service/UserLogService.php
+1
-1
UserService.php
application/index/service/UserService.php
+22
-6
UserSiteService.php
application/index/service/UserSiteService.php
+30
-4
footer_tpl.html
application/index/view/global/footer_tpl.html
+1
-1
HouseFollowUp.html
application/index/view/houses/HouseFollowUp.html
+6
-2
houseFollowUp.js
public/resource/js/houseFollowUp.js
+74
-5
user_genjing_modal.js
public/resource/js/user_genjing_modal.js
+2
-2
No files found.
application/api/service/RegisterService.php
View file @
586e2698
...
...
@@ -106,7 +106,7 @@ class RegisterService
}
//判断邀请关系 if邀请人是用户的话则此客户的盘方修改为邀请人的盘方
$site_id
=
1000
0
1
;
$site_id
=
10001
;
if
(
$agent_id
==
0
)
{
$agent_id
=
$this
->
inviteRelationship
(
$referrer_id
,
$referrer_source
);
}
else
{
...
...
application/api_broker/controller/User.php
View file @
586e2698
...
...
@@ -950,21 +950,21 @@ class User extends Basic
/**
* 客方同步到新表
* @return
bool
* @return
\think\Response
*/
public
function
moveHouseAgent
()
{
ini_set
(
'memory_limit'
,
'500M'
);
//内存限制
set_time_limit
(
0
);
$s_user_agent
=
new
UserAgentService
();
$
res
=
$
s_user_agent
->
moveHouse
();
return
$
res
;
$s_user_agent
->
moveHouse
();
return
$
this
->
response
(
"200"
,
"成功"
)
;
}
/**
* 站点同步到新表
* @return
bool
* @return
\think\Response
*/
public
function
moveHouseSiteId
()
{
...
...
@@ -972,8 +972,8 @@ class User extends Basic
set_time_limit
(
0
);
$s
=
new
UserSiteService
();
$
res
=
$
s
->
moveUserSite
();
return
$
res
;
$s
->
moveUserSite
();
return
$
this
->
response
(
"200"
,
"成功"
)
;
}
}
\ No newline at end of file
application/index/service/UserLogService.php
View file @
586e2698
...
...
@@ -270,7 +270,7 @@ class UserLogService
$result
[
'is_phone_button_show'
]
=
$this
->
isPhoneButtonShow
(
$user_id
,
$agent_id
,
$result
[
'vip'
],
$result
[
'user_phone'
],
$result
[
'agent_id'
]);
#编辑客户详情权限 0:有权限 1:无权限
$result
[
'is_can_edit_user_info'
]
=
$user_service
->
isCanEditUserInfo
(
$result
[
"agent_id"
],
$agent_id
);
$result
[
'is_can_edit_user_info'
]
=
$user_service
->
isCanEditUserInfo
(
$result
[
"agent_id"
],
$agent_id
,
$user_id
);
return
$result
;
}
...
...
application/index/service/UserService.php
View file @
586e2698
...
...
@@ -582,20 +582,36 @@ class UserService
* 编辑客户详情权限 0:有权限 1:无权限
* @param $user_agent_id
* @param $agent_id
* @param $user_id
* @return int
*/
public
function
isCanEditUserInfo
(
$user_agent_id
,
$agent_id
){
public
function
isCanEditUserInfo
(
$user_agent_id
,
$agent_id
,
$user_id
){
$is_can_edit_user_info
=
1
;
if
(
$user_agent_id
==
$agent_id
){
$is_can_edit_user_info
=
0
;
}
$s_vip
=
new
VipService
();
//0:有权限 1:无权限
$is_can_edit
=
$s_vip
->
vip
(
$agent_id
,
'index/pcEditClient'
);
if
(
$is_can_edit
==
0
)
{
$is_can_edit_user_info
=
0
;
if
(
$is_can_edit_user_info
!=
0
){
$s_user_agent
=
new
UserAgentService
();
$user_agent_list
=
$s_user_agent
->
getUserAgentId
(
$user_id
);
if
(
$user_agent_list
)
{
foreach
(
$user_agent_list
as
$key
=>
$value
)
{
if
(
$value
[
'agent_id'
]
==
$agent_id
){
$is_can_edit_user_info
=
0
;
}
}
}
}
if
(
$is_can_edit_user_info
!=
0
){
$s_vip
=
new
VipService
();
//0:有权限 1:无权限
$is_can_edit
=
$s_vip
->
vip
(
$agent_id
,
'index/pcEditClient'
);
if
(
$is_can_edit
==
0
)
{
$is_can_edit_user_info
=
0
;
}
}
return
$is_can_edit_user_info
;
}
...
...
application/index/service/UserSiteService.php
View file @
586e2698
...
...
@@ -98,7 +98,7 @@ class UserSiteService
$field
=
"id as user_id,site_ids as site_id,create_time"
;
$params
[]
=
[
'EXP'
,
'site_ids IS NOT NULL '
];
$list
=
$this
->
m_user
->
moveUserSite
(
$field
,
$params
,
$page
,
$limit
,
"id asc"
);
$list_
=
[];
foreach
(
$list
as
$k
=>
$v
)
{
$site_ids
=
explode
(
','
,
$v
[
'site_id'
]);
foreach
(
$site_ids
as
$k1
=>
$v1
)
{
...
...
@@ -111,9 +111,35 @@ class UserSiteService
}
}
// dump($list);exit;
$user_insert
=
$this
->
m_user_site
->
moveHouseInsertAll
(
$list_
);
return
$user_insert
;
foreach
(
$list_
as
$k2
=>
$v2
)
{
$is_save
=
$this
->
isSaveEd
(
$v2
[
'user_id'
],
$v2
[
'site_id'
]);
if
(
$is_save
){
unset
(
$list_
[
$k2
]);
}
}
if
(
$list_
)
$this
->
m_user_site
->
moveHouseInsertAll
(
$list_
);
return
''
;
}
/**
* 是否存在数据
* @param $user_id
* @param $site_id
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
isSaveEd
(
$user_id
,
$site_id
){
$params
=
[];
$params
[
"user_id"
]
=
$user_id
;
$params
[
"site_id"
]
=
$site_id
;
$params
[
"is_del"
]
=
0
;
$field
=
'user_id'
;
$res
=
$this
->
m_user_site
->
selectUserSite
(
$field
,
$params
);
return
$res
;
}
/*
...
...
application/index/view/global/footer_tpl.html
View file @
586e2698
<script
src=
'/resource/lib/js/require.min.js'
data-main=
'/resource/js/main?version=2019071
6
'
charset=
'utf-8'
></script>
<script
src=
'/resource/lib/js/require.min.js'
data-main=
'/resource/js/main?version=2019071
8
'
charset=
'utf-8'
></script>
application/index/view/houses/HouseFollowUp.html
View file @
586e2698
...
...
@@ -96,9 +96,13 @@
<tr>
<td
colspan=
"10"
>
<form
id=
"form_search"
>
<select
class=
"form-control btn2 ld-Marheight"
id=
"shop_area_id"
>
<select
class=
"ld-Marheight form-control btn2-city shop_city_choose_site_list"
></select>
<select
class=
"ld-Marheight form-control btn2-city"
id=
"shop_area_id"
>
<option
value=
""
selected=
"selected"
>
区域
</option>
</select>
<!--<select class="form-control btn2 ld-Marheight" id="shop_area_id">
<option value="" selected="selected">区域筛选</option>
</select>
</select>
-->
<span
class=
"fore-span ld-Marheight"
>
跟进时间:
</span>
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"create_time_start"
name=
"start_date1"
type=
"date"
>
<span
class=
"fore-span ld-Marheight"
>
-
</span>
...
...
public/resource/js/houseFollowUp.js
View file @
586e2698
...
...
@@ -67,7 +67,36 @@ define(['doT', 'text!temp/followHouseUp_template_tpl.html', 'css!style/home.css'
$
(
'#create_time_start'
).
val
(
day_end
);
$
(
'#create_time_end'
).
val
(
day_end
);
//商铺跟进 添加 默认时间 一个月
//初始化城市 区域筛选
house
.
initializationCityFunction
();
// house.initializationCityFunction();
house
.
getList
(
0
);
//默认城市
//初始化 商铺跟进列表城市
$
.
ajax
({
url
:
'/index/getAgentGroupSite'
,
type
:
'GET'
,
async
:
true
,
data
:
{
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
.
length
!=
0
)
{
var
str
=
'<option value="">选择城市</option>'
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
str
+=
'<option value="'
+
item
.
city
+
'">'
+
item
.
city
+
'</option>'
;
});
$
(
".shop_city_choose_site_list"
).
append
(
str
);
}
else
{
var
_city
=
user_info_obj
.
city
;
var
_str1
=
'<option value="">选择城市</option>'
;
var
_str
=
_str1
+
'<option value="'
+
_city
+
'">'
+
_city
+
'</option>'
;
$
(
".shop_city_choose_site_list"
).
append
(
_str
);
}
}
});
// 部门 门店 二级联动
house
.
getDistrict
(
function
()
{
...
...
@@ -132,7 +161,23 @@ define(['doT', 'text!temp/followHouseUp_template_tpl.html', 'css!style/home.css'
if
(
_this
.
hasClass
(
'btn-success'
)){
_this
.
removeClass
(
'btn-success'
).
addClass
(
'btn-warning'
);
};
});
});
//城市 区域 二级联动 筛选
_doc
.
on
(
'input'
,
'.shop_city_choose_site_list'
,
function
()
{
$
(
'#shop_area_id'
).
val
(
''
);
var
_this
=
$
(
this
);
var
_id
=
_this
.
val
();
$
(
'#shop_area_id'
).
html
(
''
);
//先清空
if
(
_id
&&
_id
!=
'0'
)
{
house
.
getDistrictStoreListA
(
_id
,
function
(
_data
)
{
var
_str
=
'<option value="">区域</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
name
+
'">'
+
item
.
name
+
'</option>'
;
});
$
(
'#shop_area_id'
).
html
(
_str
);
});
}
else
{};
});
//点击跟进,获取商铺跟进动态的接口
_doc
.
on
(
'click'
,
'[href="#modal_followup"]'
,
function
(){
house
.
id
=
$
(
this
).
attr
(
"data-id"
);
...
...
@@ -181,9 +226,9 @@ define(['doT', 'text!temp/followHouseUp_template_tpl.html', 'css!style/home.css'
});
}
else
{};
});
_doc
.
on
(
'input'
,
'#shop_area_id'
,
function
()
{
house
.
getList
();
});
//
_doc.on('input', '#shop_area_id', function() {
//
house.getList();
//
});
//查看点击事件
_doc
.
on
(
'click'
,
'a[href="#modal_shop_detail"]'
,
function
(
e
){
e
.
preventDefault
();
...
...
@@ -225,6 +270,13 @@ define(['doT', 'text!temp/followHouseUp_template_tpl.html', 'css!style/home.css'
params
.
pageSize
=
house
.
pageSize
;
params
.
AuthToken
=
user_info_obj
.
AuthToken
;
params
.
disc
=
$
(
'#shop_area_id'
).
val
();
//区域筛选
if
(
$
(
'.shop_city_choose_site_list'
).
val
()){
params
.
city
=
$
(
'.shop_city_choose_site_list'
).
val
();
//城市筛选
}
else
{
params
.
city
=
'全部'
;
//城市筛选
}
if
(
!
(
params
.
end_time
&&
params
.
start_time
)){
alert
(
'请选择时间'
)
return
;
...
...
@@ -360,6 +412,23 @@ define(['doT', 'text!temp/followHouseUp_template_tpl.html', 'css!style/home.css'
}
});
},
//城市 区域 筛选
getDistrictStoreListA
:
function
(
id
,
fn
)
{
$
.
ajax
({
url
:
'/index/getAllDisc'
,
type
:
'GET'
,
async
:
true
,
data
:
{
'city'
:
id
,
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
fn
&&
fn
(
data
.
data
);
}
}
});
},
getDistrictStoreList
:
function
(
id
,
fn
)
{
$
.
ajax
({
url
:
'/index/getDistrictStoreList'
,
...
...
public/resource/js/user_genjing_modal.js
View file @
586e2698
...
...
@@ -1503,7 +1503,7 @@ define(['doT', 'text!temp/user_model_template_tpl.html','css!style/home.css', 'c
}
else
{
var
follow_status
=
'电话跟进:'
};
caozuo_table
+=
'<tr><td class="text-left follow-up-home" width="70%">'
+
follow_status
+
dealPunctuation
(
item
.
content
)
+
user_status
+
'<img src="'
+
ServerHostImageLiu
+
'/static/chat_image/'
+
item
.
img_str
+
'" alt="" style="width:
20px;height: 20
px;" class="diagram-image J_preview" /></td><td>'
+
item
.
name
+
'</td><td>'
+
item
.
create_time
+
'</td></tr>'
;
caozuo_table
+=
'<tr><td class="text-left follow-up-home" width="70%">'
+
follow_status
+
dealPunctuation
(
item
.
content
)
+
user_status
+
'<img src="'
+
ServerHostImageLiu
+
'/static/chat_image/'
+
item
.
img_str
+
'" alt="" style="width:
30px;height: 20px;border: 1px solid #f0ad4e;border-radius: 3
px;" class="diagram-image J_preview" /></td><td>'
+
item
.
name
+
'</td><td>'
+
item
.
create_time
+
'</td></tr>'
;
});
if
(
data
.
data
.
length
<
10
){
//第一个接口 数据条数小于10 加载第二个接口
...
...
@@ -1570,7 +1570,7 @@ define(['doT', 'text!temp/user_model_template_tpl.html','css!style/home.css', 'c
}
else
{
var
follow_status
=
'电话跟进:'
};
caozuo_table
+=
'<tr><td class="text-left follow-up-home" width="70%">'
+
follow_status
+
dealPunctuation
(
item
.
content
)
+
user_status
+
'<img src="'
+
ServerHostImageLiu
+
'/static/chat_image/'
+
item
.
img_str
+
'" alt="" style="width:
20px;height: 20
px;" class="diagram-image J_preview"/></td><td>'
+
item
.
name
+
'</td><td>'
+
item
.
create_time
+
'</td></tr>'
;
caozuo_table
+=
'<tr><td class="text-left follow-up-home" width="70%">'
+
follow_status
+
dealPunctuation
(
item
.
content
)
+
user_status
+
'<img src="'
+
ServerHostImageLiu
+
'/static/chat_image/'
+
item
.
img_str
+
'" alt="" style="width:
30px;height: 20px;border: 1px solid #f0ad4e;border-radius: 3
px;" class="diagram-image J_preview"/></td><td>'
+
item
.
name
+
'</td><td>'
+
item
.
create_time
+
'</td></tr>'
;
});
if
(
caozuo_table
){
...
...
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