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
76d34af0
Commit
76d34af0
authored
Apr 13, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
跟进列表重写
parent
b04b1190
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
95 additions
and
95 deletions
+95
-95
TransferHouseInfo.php
application/api/controller/TransferHouseInfo.php
+1
-1
Remark.php
application/index/controller/Remark.php
+36
-58
remark_follow_index.html
application/index/view/remark/remark_follow_index.html
+0
-27
UPhoneFollowPp.php
application/model/UPhoneFollowPp.php
+41
-0
route.php
application/route.php
+1
-1
RemarkFollowIndex.js
public/resource/js/RemarkFollowIndex.js
+5
-4
remark_follow_template_tpl.html
public/resource/template/remark_follow_template_tpl.html
+11
-4
No files found.
application/api/controller/TransferHouseInfo.php
View file @
76d34af0
...
@@ -63,7 +63,7 @@ class TransferHouseInfo extends Controller
...
@@ -63,7 +63,7 @@ class TransferHouseInfo extends Controller
$g_house_data
[
'status'
]
=
1
;
$g_house_data
[
'status'
]
=
1
;
}
}
$g_house_data
[
'home_page_sort'
]
=
$house_info_data
[
'home_page_sort'
];
$g_house_data
[
'home_page_sort'
]
=
empty
(
$house_info_data
[
'home_page_sort'
])
?
0
:
$house_info_data
[
'home_page_sort'
];
$g_house_data
[
'shop_type'
]
=
$house_info_data
[
'shangpu_type'
];
$g_house_data
[
'shop_type'
]
=
$house_info_data
[
'shangpu_type'
];
$g_house_data
[
'shop_sign'
]
=
$house_info_data
[
'shangpu_tags'
];
$g_house_data
[
'shop_sign'
]
=
$house_info_data
[
'shangpu_tags'
];
$g_house_data
[
'management_fee'
]
=
$house_info_data
[
'management_fee'
]
*
100
;
$g_house_data
[
'management_fee'
]
=
$house_info_data
[
'management_fee'
]
*
100
;
...
...
application/index/controller/Remark.php
View file @
76d34af0
...
@@ -37,65 +37,43 @@ class Remark extends Basic
...
@@ -37,65 +37,43 @@ class Remark extends Basic
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\DbException
*/
*/
public
function
RemarkFollowList
(){
public
function
followUpList
(){
$table
=
new
Remarks
;
$data
[
'status'
]
=
200
;
$data
[
'status'
]
=
200
;
$data
[
'msg'
]
=
''
;
$data
[
'msg'
]
=
''
;
//获取当前模块可操作按钮start********************************
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$userRule
=
Session
::
get
(
'userRule'
);
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
$data
[
'cz'
]
=
$userRule
[
'cz'
];
//获取当前模块可操作按钮end**********************************
$u_phone_follow
=
new
UPhoneFollowPp
();
$params
=
$this
->
request
->
param
();
if
(
!
empty
(
$this
->
params
[
'start_date'
])
&&
empty
(
$this
->
params
[
'end_date'
]))
{
$where
[
'a.create_time'
]
=
[
'> time'
,
$this
->
params
[
'start_date'
]
.
' 00:00:00'
];
}
if
(
!
empty
(
$this
->
params
[
'end_date'
])
&&
empty
(
$this
->
params
[
'start_date'
]))
{
$where
[
'a.create_time'
]
=
[
'< time'
,
$this
->
params
[
'end_date'
]
.
' 23:59:59'
];;
}
//获取操作权限
if
(
!
empty
(
$this
->
params
[
'end_date'
])
&&
!
empty
(
$this
->
params
[
'start_date'
]))
{
$userRule
=
Session
::
get
(
'userRule'
);
$where
[
'a.create_time'
]
=
[
'between'
,[
$this
->
params
[
'start_date'
]
.
' 00:00:00'
,
$this
->
params
[
'end_date'
]
.
' 23:59:59'
]];
$data
[
'userRule'
]
=
$userRule
;
}
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
if
(
!
empty
(
$this
->
params
[
'customer'
]))
{
//条件
$where
[
'c.user_nick'
]
=
$this
->
params
[
'customer'
];
$where
=
"r.isinstatus=1 and r.content like '%【跟进】%' "
;
}
//--查询条件
//----跟进内容
if
(
!
empty
(
$this
->
params
[
'phone'
]))
{
if
(
!
empty
(
$params
[
'content'
])){
$where
[
'c.user_phone'
]
=
$this
->
params
[
'phone'
];
$where
.=
" and r.content like '%
{
$params
[
'content'
]
}
%'"
;
}
}
if
(
!
empty
(
$this
->
params
[
'content'
]))
{
//----客户手机号
$where
[
'a.content'
]
=
[
'like'
,
"%
{
$this
->
params
[
'content'
]
}
%"
];
if
(
!
empty
(
$params
[
'phone'
])){
}
$where
.=
" and a.phpone like '%
{
$params
[
'phone'
]
}
%'"
;
$field
=
'a.id,a.create_time,a.content,b.name as admin,d.name as label_name,c.user_nick,c.user_phone'
;
}
$data
[
'data'
][
'list'
]
=
$u_phone_follow
->
getFollowList
(
$pageNo
,
$pageSize
,
$order_
=
'a.id desc'
,
$field
,
$where
);
//----客户姓名
$data
[
'data'
][
'total'
]
=
$u_phone_follow
->
getFollowTotal
(
$where
);
if
(
!
empty
(
$params
[
'customer'
])){
return
$this
->
response
(
200
,
'成功'
,
$data
);
$where
.=
" and a.customer like '%
{
$params
[
'customer'
]
}
%'"
;
}
//----时间选择
if
(
!
empty
(
$params
[
'start_time'
])
&&
!
empty
(
$params
[
'end_time'
])){
$where
.=
" and r.created (BETWEEN '
{
$params
[
'start_time'
]
}
00:00:00' and '
{
$params
[
'start_time'
]
}
23:59:59')"
;
}
else
if
(
!
empty
(
$params
[
'start_time'
])
&&
empty
(
$params
[
'end_time'
])){
$where
.=
" and '
{
$params
[
'start_time'
]
}
00:00:00' <= r.created "
;
}
else
if
(
empty
(
$params
[
'start_time'
])
&&
!
empty
(
$params
[
'end_time'
])){
$where
.=
" and '
{
$params
[
'end_time'
]
}
00:00:00' >= r.created "
;
}
$field
=
"r.id,r.apply_id,r.shopuser_id,r.content,r.house_id,r.created,r.admin,
a.customer,a.phpone,a.sex,
a2.realname"
;
$order
=
'r.id asc'
;
$join
=
[
[
'applies a'
,
' a.id=r.apply_id'
,
'left'
],
[
'agents a2'
,
'a2.id=r.shopuser_id'
,
'left'
]
];
$data
[
'list'
]
=
$table
->
getListJoin
(
$pageNo
,
$pageSize
,
$order
,
$field
,
$join
,
$where
);
$data
[
'total'
]
=
$table
->
getTotal2
(
$join
,
$where
);
// prt($list);//转化arr
//prt(collection($list)->toArray());//转化arr
return
$this
->
response
(
200
,
'成功'
,
$data
);
}
}
/**
/**
...
...
application/index/view/remark/remark_follow_index.html
View file @
76d34af0
...
@@ -6,10 +6,6 @@
...
@@ -6,10 +6,6 @@
overflow-y
:
auto
;
overflow-y
:
auto
;
padding-bottom
:
60px
;
padding-bottom
:
60px
;
}
}
.user-ul2
{
.user-ul2
{
width
:
100%
;
width
:
100%
;
height
:
auto
;
height
:
auto
;
...
@@ -31,8 +27,6 @@
...
@@ -31,8 +27,6 @@
<a
href=
"javascript:;"
>
跟进列表
</a>
<a
href=
"javascript:;"
>
跟进列表
</a>
</li>
</li>
</div>
</div>
<div
class=
"panel-body"
>
<div
class=
"panel-body"
>
<div
class=
"table-responsive"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
...
@@ -62,27 +56,6 @@
...
@@ -62,27 +56,6 @@
</tr>
</tr>
</thead>
</thead>
<tbody
class=
"text-center"
id=
"follow_list"
>
<tbody
class=
"text-center"
id=
"follow_list"
>
<!--<tr>-->
<!--<td>212</td>-->
<!--<td>商场</td>-->
<!--<td>长兴</td>-->
<!--<td>1000</td>-->
<!--<td>是</td>-->
<!--<td>2018-01-16 17:02:00</td>-->
<!--<td>已租</td>-->
<!--<td>张娜张-->
<!--<a data-toggle="modal" data-id="77" href="#modal-watch" class="btn1 btn-danger add_applies">修改</a>-->
<!--</td>-->
<!--<td>-->
<!--<a class="btn1 btn-success " href="#modal-process" data-toggle="modal" data-id="77" onclick="alertFollow(this)">编辑</a>-->
<!--<a class="btn1 btn-success " href="#modal-process" data-toggle="modal" data-id="77" onclick="alertFollow(this)">推荐至首页</a>-->
<!--<a class="btn1 btn-success " href="#modal-process" data-toggle="modal" data-id="77" onclick="alertFollow(this)">设置案场权限人</a>-->
<!--<a class="btn1 btn-success " href="#modal-process" data-toggle="modal" data-id="77" onclick="alertFollow(this)">是否独家</a>-->
<!--<a class="btn1 btn-success " href="#modal-process" data-toggle="modal" data-id="77" onclick="alertFollow(this)">操作记录</a>-->
<!--<a data-toggle="modal" data-id="77" href="#modal-watch" class="btn1 btn-danger add_applies" onclick="delete_house(4720)">删除</a>-->
<!--</td>-->
<!--</tr>-->
</table>
</table>
</div>
</div>
<!-- /#page-content-wrapper -->
<!-- /#page-content-wrapper -->
...
...
application/model/UPhoneFollowPp.php
View file @
76d34af0
...
@@ -183,4 +183,45 @@ class UPhoneFollowPp extends BaseModel
...
@@ -183,4 +183,45 @@ class UPhoneFollowPp extends BaseModel
->count();*/
->count();*/
return
$UPhoneFollowPp_res
;
return
$UPhoneFollowPp_res
;
}
}
/**
* 公用方法,列表
*
* @param int $pageNo
* @param int $pageSize
* @param string $order_
* @param string $field
* @param string $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getFollowList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
return
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.agent_id = b.id'
,
'left'
)
->
join
(
'u_users c'
,
'a.user_id = c.id'
,
'left'
)
->
join
(
'u_labels d'
,
'd.id = a.labels_id'
,
'left'
)
->
where
(
$params
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
}
/**
* 记录总数
*
* @param $params
* @return int|string
*/
public
function
getFollowTotal
(
$params
)
{
return
$this
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.agent_id = b.id'
,
'left'
)
->
join
(
'u_users c'
,
'a.user_id = c.id'
,
'left'
)
->
where
(
$params
)
->
count
();
}
}
}
application/route.php
View file @
76d34af0
...
@@ -165,7 +165,7 @@ Route::group('index', [
...
@@ -165,7 +165,7 @@ Route::group('index', [
//数据统计
//数据统计
'RemarkFollowIndex'
=>
[
'index/remark/remarkFollowIndex'
,[
'method'
=>
'get'
]],
//跟进列表主界面
'RemarkFollowIndex'
=>
[
'index/remark/remarkFollowIndex'
,[
'method'
=>
'get'
]],
//跟进列表主界面
'RemarkFollowList'
=>
[
'index/remark/
RemarkFollow
List'
,[
'method'
=>
'get'
]],
//跟进列表【接口】
'RemarkFollowList'
=>
[
'index/remark/
followUp
List'
,[
'method'
=>
'get'
]],
//跟进列表【接口】
'phone_list'
=>
[
'index/Phone/index'
,[
'method'
=>
'get'
]],
//隐私号码列表
'phone_list'
=>
[
'index/Phone/index'
,[
'method'
=>
'get'
]],
//隐私号码列表
'bindPhoneList'
=>
[
'index/Phone/bindPhoneList'
,[
'method'
=>
'get'
]],
//绑定的隐私号码列表
'bindPhoneList'
=>
[
'index/Phone/bindPhoneList'
,[
'method'
=>
'get'
]],
//绑定的隐私号码列表
'edit_aliYunPhone'
=>
[
'index/Phone/edit_aliYunPhone'
,[
'method'
=>
'get|post'
]],
//新增或编辑中间号
'edit_aliYunPhone'
=>
[
'index/Phone/edit_aliYunPhone'
,[
'method'
=>
'get|post'
]],
//新增或编辑中间号
...
...
public/resource/js/RemarkFollowIndex.js
View file @
76d34af0
...
@@ -137,8 +137,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
...
@@ -137,8 +137,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
'pageNo'
:
follow
.
pageNo
,
'pageNo'
:
follow
.
pageNo
,
'pageSize'
:
follow
.
pageSize
'pageSize'
:
follow
.
pageSize
};
};
_startDateObj
.
val
()
!=
''
&&
(
params
.
end
_date
=
_startDateObj
.
val
());
_startDateObj
.
val
()
!=
''
&&
(
params
.
start
_date
=
_startDateObj
.
val
());
_endDateObj
.
val
()
!=
''
&&
(
params
.
start
_date
=
_endDateObj
.
val
());
_endDateObj
.
val
()
!=
''
&&
(
params
.
end
_date
=
_endDateObj
.
val
());
$
.
trim
(
_customerNameObj
.
val
())
!=
''
&&
(
params
.
customer
=
$
.
trim
(
_customerNameObj
.
val
()));
$
.
trim
(
_customerNameObj
.
val
())
!=
''
&&
(
params
.
customer
=
$
.
trim
(
_customerNameObj
.
val
()));
$
.
trim
(
_customerPhoneObj
.
val
())
!=
''
&&
(
params
.
phone
=
$
.
trim
(
_customerPhoneObj
.
val
()));
$
.
trim
(
_customerPhoneObj
.
val
())
!=
''
&&
(
params
.
phone
=
$
.
trim
(
_customerPhoneObj
.
val
()));
$
.
trim
(
_followContentObj
.
val
())
!=
''
&&
(
params
.
content
=
$
.
trim
(
_followContentObj
.
val
()));
$
.
trim
(
_followContentObj
.
val
())
!=
''
&&
(
params
.
content
=
$
.
trim
(
_followContentObj
.
val
()));
...
@@ -152,12 +152,13 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
...
@@ -152,12 +152,13 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
beforeSend
:
function
()
{},
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
typeof
data
===
'object'
)
{
if
(
typeof
data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
200
)
{
var
doTtmpl
=
doT
.
template
(
document
.
getElementById
(
'remark_follow_tpl'
).
innerHTML
);
var
doTtmpl
=
doT
.
template
(
document
.
getElementById
(
'remark_follow_tpl'
).
innerHTML
);
$
(
"#follow_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
$
(
"#follow_list"
).
html
(
doTtmpl
(
data
.
data
.
data
.
list
));
/*分页代码*/
/*分页代码*/
$
(
"#pagediv"
).
pagination
({
$
(
"#pagediv"
).
pagination
({
length
:
data
.
data
.
total
,
length
:
data
.
data
.
data
.
total
,
current
:
pageNo
,
current
:
pageNo
,
every
:
follow
.
pageSize
,
every
:
follow
.
pageSize
,
onClick
:
function
(
el
)
{
onClick
:
function
(
el
)
{
...
...
public/resource/template/remark_follow_template_tpl.html
View file @
76d34af0
...
@@ -2,11 +2,18 @@
...
@@ -2,11 +2,18 @@
[
%
if
(
it
)
{
%
]
[
%
if
(
it
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
class
=
"text-center"
>
<
tr
class
=
"text-center"
>
<
td
>
[
%=
it
[
item
][
'created'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'create_time'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'content'
]
%
]
<
/td
>
<
td
>
[
%
if
(
it
[
item
][
'label_name'
])
{
%
]
【
[
%=
it
[
item
][
'label_name'
]
%
]
】
[
%
}
else
{
%
]
【】
[
%
}
%
]
[
%=
it
[
item
][
'content'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'admin'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'admin'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'
customer
'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'
user_nick
'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'
php
one'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'
user_ph
one'
]
%
]
<
/td
>
<
td
>
<
td
>
<
a
class
=
"btn1 btn-success caozuo"
href
=
"#modal-record"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
详细信息
<
/a
>
<
a
class
=
"btn1 btn-success caozuo"
href
=
"#modal-record"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
详细信息
<
/a
>
<
/td
>
<
/td
>
...
...
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