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
1a3759d6
Commit
1a3759d6
authored
Apr 28, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通话记录修改
parent
cfde8125
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
138 additions
and
120 deletions
+138
-120
CellPhone.php
application/index/controller/CellPhone.php
+8
-5
Houses.php
application/index/controller/Houses.php
+4
-4
Basic.php
application/index/extend/Basic.php
+39
-36
index.html
application/index/view/cell_phone/index.html
+8
-22
GHouses.php
application/model/GHouses.php
+14
-0
SecretReport.php
application/model/SecretReport.php
+20
-35
callPhoneIndex.js
public/resource/js/callPhoneIndex.js
+4
-4
user.js
public/resource/js/user.js
+3
-1
callPhone_template_tpl.html
public/resource/template/callPhone_template_tpl.html
+38
-13
No files found.
application/index/controller/CellPhone.php
View file @
1a3759d6
...
...
@@ -152,7 +152,7 @@ class CellPhone extends Basic
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
10
:
$this
->
params
[
'pageSize'
];
$report
=
new
SecretReport
();
$field
=
'agents_id,users_id,call_type,call_time,time,voice_file'
;
$field
=
'agents_id,users_id,call_type,call_time,time,voice_file
,user_status,a.id,a.create_time,type
'
;
$where
=
[];
if
(
!
empty
(
$this
->
params
[
'start_date'
]))
{
...
...
@@ -164,7 +164,7 @@ class CellPhone extends Basic
}
if
(
!
empty
(
$this
->
params
[
'call_name'
]))
{
$where
[
'
realN
ame'
]
=
[
'LIKE'
,
$this
->
params
[
'call_name'
]
.
'%'
];
$where
[
'
n
ame'
]
=
[
'LIKE'
,
$this
->
params
[
'call_name'
]
.
'%'
];
}
if
(
!
empty
(
$this
->
params
[
'call_phone'
]))
{
...
...
@@ -172,13 +172,16 @@ class CellPhone extends Basic
}
if
(
!
empty
(
$this
->
params
[
'client_phone'
]))
{
$where
[
'
peer_no
'
]
=
[
'LIKE'
,
$this
->
params
[
'client_phone'
]
.
'%'
];
$where
[
'
c.user_phone
'
]
=
[
'LIKE'
,
$this
->
params
[
'client_phone'
]
.
'%'
];
}
if
(
!
empty
(
$this
->
params
[
'
client_name
'
]))
{
$where
[
'
user_nick'
]
=
[
'LIKE'
,
$this
->
params
[
'client_name
'
]
.
'%'
];
if
(
!
empty
(
$this
->
params
[
'
user_nick
'
]))
{
$where
[
'
c.user_nick'
]
=
[
'LIKE'
,
'%'
.
$this
->
params
[
'user_nick
'
]
.
'%'
];
}
if
(
!
empty
(
$this
->
params
[
'call_type'
]))
{
$where
[
'a.type'
]
=
$this
->
params
[
'call_type'
];
}
$data
[
'list'
]
=
$report
->
getCallList
(
$pageNo
,
$pageSize
,
'id desc'
,
$field
,
$where
);
$data
[
'total'
]
=
$report
->
getCallListTotal
(
$where
);
return
$this
->
response
(
$result
[
'code'
],
$result
[
'msg'
],
$data
);
...
...
application/index/controller/Houses.php
View file @
1a3759d6
...
...
@@ -154,17 +154,17 @@ class Houses extends Basic
/*开始时间*/
if
(
$this
->
params
[
'start_date'
]
!=
NULL
&&
$this
->
params
[
'end_date'
]
==
NULL
)
{
$where
[
'create_time'
]
=
[
'> time'
,
$this
->
params
[
'start_date'
]
.
' 00:00:00'
];
$where
[
'
a.
create_time'
]
=
[
'> time'
,
$this
->
params
[
'start_date'
]
.
' 00:00:00'
];
}
/*结束时间*/
if
(
$this
->
params
[
'end_date'
]
!=
NULL
&&
$this
->
params
[
'start_date'
]
==
NULL
)
{
$where
[
'create_time'
]
=
[
'< time'
,
$this
->
params
[
'end_date'
]
.
' 23:59:59'
];
$where
[
'
a.
create_time'
]
=
[
'< time'
,
$this
->
params
[
'end_date'
]
.
' 23:59:59'
];
}
/*开始结束时间*/
if
(
$this
->
params
[
'start_date'
]
!=
NULL
&&
$this
->
params
[
'end_date'
]
!=
NULL
)
{
$where
[
'create_time'
]
=
[
'between time'
,
[
$this
->
params
[
'start_date'
]
.
' 00:00:00'
,
$this
->
params
[
'end_date'
]
.
' 23:59:59'
]];
$where
[
'
a.
create_time'
]
=
[
'between time'
,
[
$this
->
params
[
'start_date'
]
.
' 00:00:00'
,
$this
->
params
[
'end_date'
]
.
' 23:59:59'
]];
}
/*根据库存判断是否已租*/
...
...
@@ -190,7 +190,7 @@ class Houses extends Basic
}
$where
[
'status'
]
=
[
'<>'
,
3
];
$data
[
'data'
][
'list'
]
=
$this
->
house
->
getHouseList
(
$pageNo
,
$pageSize
,
'id DESC'
,
$fields
,
$where
,
$this
->
userId
);
$data
[
'data'
][
'total'
]
=
$this
->
house
->
getTotal
(
$where
);
$data
[
'data'
][
'total'
]
=
$this
->
house
->
get
HouseList
Total
(
$where
);
}
else
{
//盘方人搜索
/*楼盘编号*/
...
...
application/index/extend/Basic.php
View file @
1a3759d6
...
...
@@ -89,50 +89,53 @@ class Basic extends Controller
$session_auth
=
Session
::
get
(
"user_info.auth"
);
$auth_id
=
0
;
//判断当前控制器用户是否拥有进入权限
foreach
(
$session_menu
as
$v
){
//不区分大小写
if
(
strcasecmp
(
trim
(
$v
[
'name'
]),
$requestPath
)
==
0
){
$auth_id
=
$v
[
'id'
];
}
//去除管理验证
if
(
$this
->
userId
!=
1
)
{
//判断当前控制器用户是否拥有进入权限
foreach
(
$session_menu
as
$v
){
//不区分大小写
if
(
strcasecmp
(
trim
(
$v
[
'name'
]),
$requestPath
)
==
0
){
$auth_id
=
$v
[
'id'
];
}
if
(
!
empty
(
$v
[
'_child'
]))
{
foreach
(
$v
[
'_child'
]
as
$value
)
{
//不区分大小写
if
(
strcasecmp
(
$value
[
'name'
],
$requestPath
)
==
0
){
$auth_id
=
$value
[
'id'
];
if
(
!
empty
(
$v
[
'_child'
]))
{
foreach
(
$v
[
'_child'
]
as
$value
)
{
//不区分大小写
if
(
strcasecmp
(
$value
[
'name'
],
$requestPath
)
==
0
){
$auth_id
=
$value
[
'id'
];
}
}
}
}
}
foreach
(
$session_auth
as
$v
)
{
if
(
strcasecmp
(
$v
[
'name'
],
$requestPath
)
==
0
){
$auth_id
=
$v
[
'id'
];
foreach
(
$session_auth
as
$v
)
{
if
(
strcasecmp
(
$v
[
'name'
],
$requestPath
)
==
0
){
$auth_id
=
$v
[
'id'
];
}
}
}
$agents
=
new
AAgents
();
$is_auth
=
$agents
->
agentsAuth
(
$auth_id
,
$this
->
userId
);
$is_auth
=
empty
(
$is_auth
[
'id'
])
?
0
:
1
;
//处理盘方编辑商铺
if
(
$is_auth
==
0
)
{
if
(
$requestPath
==
'index/houseEdit'
&&
isset
(
$this
->
params
[
'id'
]))
{
$agent
=
new
GHousesToAgents
();
$where
[
'houses_id'
]
=
$this
->
params
[
'id'
];
$where
[
'type'
]
=
2
;
$where
[
'agents_id'
]
=
$this
->
userId
;
$is_
=
$agent
->
getTotal
(
$where
);
$is_auth
=
$is_
>
0
?
1
:
0
;
$agents
=
new
AAgents
();
$is_auth
=
$agents
->
agentsAuth
(
$auth_id
,
$this
->
userId
);
$is_auth
=
empty
(
$is_auth
[
'id'
])
?
0
:
1
;
//处理盘方编辑商铺
if
(
$is_auth
==
0
)
{
if
(
$requestPath
==
'index/houseEdit'
&&
isset
(
$this
->
params
[
'id'
]))
{
$agent
=
new
GHousesToAgents
();
$where
[
'houses_id'
]
=
$this
->
params
[
'id'
];
$where
[
'type'
]
=
2
;
$where
[
'agents_id'
]
=
$this
->
userId
;
$is_
=
$agent
->
getTotal
(
$where
);
$is_auth
=
$is_
>
0
?
1
:
0
;
}
}
}
if
(
empty
(
$is_auth
)
&&
$this
->
userId
!=
1
)
{
if
(
$this
->
request
->
isAjax
()){
echo
json_encode
(
array
(
"code"
=>
"300"
,
"msg"
=>
"没有权限!"
,
"data"
=>
[],
"type"
=>
"json"
));
exit
;
}
else
{
$this
->
error
(
'没有当前页面权限'
);
exit
;
if
(
empty
(
$is_auth
)
&&
$this
->
userId
!=
1
)
{
if
(
$this
->
request
->
isAjax
())
{
echo
json_encode
(
array
(
"code"
=>
"300"
,
"msg"
=>
"没有权限!"
,
"data"
=>
[],
"type"
=>
"json"
));
exit
;
}
else
{
$this
->
error
(
'没有当前页面权限'
);
exit
;
}
}
}
...
...
application/index/view/cell_phone/index.html
View file @
1a3759d6
...
...
@@ -16,7 +16,12 @@
<tr>
<td
colspan=
"9"
>
<form
id=
"form_search"
>
<span
class=
"fore-span ld-Marheight"
>
拨打类型:
</span>
<select
class=
"form-control btn2 ld-Marheight"
id=
"call_type"
>
<option
value=
"0"
>
未分配
</option>
<option
value=
"1"
>
阿里云
</option>
<option
value=
"2"
>
容联云
</option>
</select>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"industry_type"
placeholder=
"拨打人姓名"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"dish"
placeholder=
"拨打人手机号"
type=
"phone"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"id"
placeholder=
"被拨打人姓名"
type=
"text"
value=
""
>
...
...
@@ -40,30 +45,11 @@
<th
class=
"text-center"
>
花费
</th>
<th
class=
"text-center"
>
跟进
</th>
<th
class=
"text-center"
>
操作
</th>
<th
class=
"text-center"
>
拨打类型
</th>
</tr>
</thead>
<tbody
class=
"text-center"
id=
"callPhone_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>-->
</tbody>
</table>
</div>
<!-- /#page-content-wrapper -->
...
...
application/model/GHouses.php
View file @
1a3759d6
...
...
@@ -219,6 +219,20 @@ class GHouses extends BaseModel
return
$result
;
}
/**
* 楼盘列表
*
* @param string $params
* @return int|string
*/
public
function
getHouseListTotal
(
$params
=
''
)
{
return
$this
->
alias
(
'a'
)
->
where
(
$params
)
->
count
();
}
/**
* 查询属于盘方的商铺列表
*
...
...
application/model/SecretReport.php
View file @
1a3759d6
...
...
@@ -26,37 +26,27 @@ class SecretReport extends Model
*/
public
function
getCallList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
if
(
!
empty
(
$params
[
'realName'
])
||
!
empty
(
$params
[
'user_nick'
]))
{
$field
.=
',a.id,a.create_time'
;
$data
=
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'agents b'
,
'a.agents_id=b.id'
,
'left'
)
->
join
(
'u_users c'
,
'a.users_id=c.id'
,
'left'
)
->
where
(
$params
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
}
else
{
$field
.=
',id,create_time'
;
$data
=
$this
->
field
(
$field
)
->
where
(
$params
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
}
$data
=
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.agents_id=b.id'
,
'left'
)
->
join
(
'u_users c'
,
'a.users_id=c.id'
,
'left'
)
->
where
(
$params
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
$result
=
[];
foreach
(
$data
as
$k
=>
$v
)
{
$result
[
$k
]
=
$v
;
if
(
$v
->
agents_id
)
{
$agents_data
=
Db
::
table
(
'agents'
)
->
field
(
'realName,father_id'
)
->
where
(
'id'
,
$v
->
agents_id
)
->
find
();
$result
[
$k
][
'agents_name'
]
=
$agents_data
[
'realName'
];
$shop_data
=
Db
::
table
(
'agents'
)
->
field
(
'agentshopname,sub_shopname'
)
->
where
(
'id'
,
$agents_data
[
'father_id'
])
->
find
();
$result
[
$k
][
'shop_name'
]
=
$shop_data
[
'sub_shopname'
]
?
$shop_data
[
'agentshopname'
]
.
'-'
.
$shop_data
[
'sub_shopname'
]
:
$shop_data
[
'agentshopname'
];
}
else
{
if
(
empty
(
$v
[
'agents_id'
]))
{
$result
[
$k
][
'agents_name'
]
=
""
;
}
else
{
$agents_data
=
Db
::
table
(
'a_agents'
)
->
field
(
'name,store_id'
)
->
where
(
'id'
,
$v
[
'agents_id'
])
->
find
();
$store
=
new
AStore
();
$shop_name
=
$store
->
getStoreById
(
$agents_data
[
'store_id'
]);
$result
[
$k
][
'agents_name'
]
=
$shop_name
[
'district_name'
]
.
'-'
.
$agents_data
[
'name'
];
}
if
(
$v
->
users_id
)
{
...
...
@@ -106,18 +96,13 @@ class SecretReport extends Model
* @return int|string
*/
public
function
getCallListTotal
(
$params
)
{
if
(
!
empty
(
$params
[
'realName'
])
||
!
empty
(
$params
[
'user_nick'
]))
{
$data
=
$this
->
alias
(
'a'
)
->
join
(
'agents b'
,
'a.agents_id=b.id'
,
'left'
)
->
join
(
'u_users c'
,
'a.users_id=c.id'
,
'left'
)
->
where
(
$params
)
->
count
();
}
else
{
$data
=
$this
->
where
(
$params
)
->
count
();
}
return
$data
;
return
$this
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.agents_id=b.id'
,
'left'
)
->
join
(
'u_users c'
,
'a.users_id=c.id'
,
'left'
)
->
where
(
$params
)
->
count
();
}
/**
* 经纪人拨打记录汇总
*
...
...
public/resource/js/callPhoneIndex.js
View file @
1a3759d6
...
...
@@ -28,7 +28,7 @@ define (['doT', 'text!temp/callPhone_template_tpl.html', 'css!style/home.css','c
document
.
getElementById
(
"form_search"
).
reset
();
});
},
},
getList
:
function
(
pageNo
)
{
callphone
.
pageNo
=
pageNo
;
var
params
=
{};
...
...
@@ -36,13 +36,13 @@ define (['doT', 'text!temp/callPhone_template_tpl.html', 'css!style/home.css','c
params
.
pageSize
=
callphone
.
pageSize
;
params
.
call_name
=
$
(
'#industry_type'
)
.
val
();
//拨打人姓名
params
.
call_phone
=
$
(
'#dish'
)
.
val
();
//拨打人手机号
params
.
user_nick
=
$
(
'id'
)
.
val
();
//被拨打人姓名
params
.
user_nick
=
$
(
'
#
id'
)
.
val
();
//被拨打人姓名
params
.
client_phone
=
$
(
'#dish-phone'
)
.
val
();
//拨打人手机号
params
.
start_date
=
$
(
'#start_date'
)
.
val
();
//时间1
params
.
end_date
=
$
(
'#end_date'
)
.
val
();
//时间2
params
.
call_type
=
$
(
"#call_type"
).
val
();
$
.
ajax
({
url
:
'/index/callLog
.html
'
,
//获取列表
url
:
'/index/callLog'
,
//获取列表
type
:
'GET'
,
async
:
true
,
data
:
params
,
...
...
public/resource/js/user.js
View file @
1a3759d6
...
...
@@ -272,7 +272,9 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
!=
200
)
{
if
(
data
.
code
==
200
)
{
user
.
getList
(
1
);
}
else
{
alert
(
data
.
msg
);
}
}
...
...
public/resource/template/callPhone_template_tpl.html
View file @
1a3759d6
<script
id=
"callPhone_list_tpl"
type=
"text/template"
>
[
%
if
(
it
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
class
=
"text-center"
>
<
td
>
[
%=
it
[
item
][
'call_time'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'agents_name'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'user_nick'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'time'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'price'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'follow_up'
]
%
]
<
/td
>
<
td
>
<
video
id
=
"media"
src
=
"[%= it[item]['voice_file'] %]"
controls
width
=
"200px"
height
=
"38px"
><
/video
>
<
/td
>
<
/tr
>
[
%
}
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
class
=
"text-center"
>
<
td
>
[
%=
it
[
item
][
'call_time'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'agents_name'
]
%
]
<
/td
>
<
td
>
[
%
if
(
it
[
item
][
'user_nick'
]
!=
null
)
{
%
]
[
%=
it
[
item
][
'user_nick'
]
%
]
[
%
}
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'time'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'price'
]
%
]
<
/td
>
<
td
>
[
%
if
(
it
[
item
][
'follow_up'
]
!=
null
)
{
%
]
[
%=
it
[
item
][
'follow_up'
]
%
]
[
%
}
%
]
[
%
if
(
it
[
item
][
'user_status'
]
==
0
)
{
%
]
【求租】
[
%
}
else
if
(
it
[
item
][
'user_status'
]
==
1
)
{
%
]
【已租】
[
%
}
else
{
%
]
【无效】
[
%
}
%
]
<
/td
>
<
td
>
<
video
id
=
"media"
src
=
"[%= it[item]['voice_file'] %]"
controls
width
=
"200px"
height
=
"38px"
><
/video
>
<
/td
>
<
td
>
[
%
if
(
it
[
item
][
'type'
]
==
0
)
{
%
]
未分配
[
%
}
else
if
(
it
[
item
][
'type'
]
==
1
)
{
%
]
阿里云
[
%
}
else
{
%
]
容联云
[
%
}
%
]
<
/td
>
<
/tr
>
[
%
}
%
]
[
%
}
else
{
%
]
<
tr
>
<
td
colspan
=
"8"
style
=
"text-align:center;"
>
暂无数据
<
/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