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
feb0a56b
Commit
feb0a56b
authored
Nov 12, 2018
by
zw
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1109-v2.9.8' of
https://gitee.com/zwyjjc/tl_estate
into 1109-v2.9.8
parents
6a0c43c1
aa683e01
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
590 additions
and
13 deletions
+590
-13
Broker.php
application/index/controller/Broker.php
+47
-0
pkListCon.html
application/index/view/pkList/pkListCon.html
+150
-5
AliYunSecretReport.php
application/model/AliYunSecretReport.php
+41
-8
TAgentTotalCallModel.php
application/model/TAgentTotalCallModel.php
+103
-0
route.php
application/route.php
+3
-0
PrivacyNumber.php
application/task/controller/PrivacyNumber.php
+130
-0
gold@1x.png
public/resource/image/gold@1x.png
+0
-0
pkList.js
public/resource/js/pkList.js
+94
-0
pk_list_template_tpl.html.html
public/resource/template/pk_list_template_tpl.html.html
+22
-0
No files found.
application/index/controller/Broker.php
View file @
feb0a56b
...
...
@@ -15,6 +15,7 @@ use app\api_broker\service\PushMessageService;
use
app\index\extend\Basic
;
use
app\model\AAgents
;
use
app\model\ABindingDevice
;
use
app\model\AStore
;
use
app\model\Evaluate
;
use
app\model\GHousesToAgents
;
use
think\Session
;
...
...
@@ -748,4 +749,49 @@ class Broker extends Basic
return
$this
->
response
(
101
,
'内部错误:'
.
$e
->
getMessage
());
}
}
/**
* 经纪人职称列表
*
* @return \think\Response
*/
public
function
agentPositionList
()
{
$msg
=
""
;
$code
=
200
;
$data
=
[];
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$where
[
'status'
]
=
0
;
if
(
!
empty
(
$this
->
params
[
'position'
]))
{
$where
[
'position'
]
=
$this
->
params
[
'position'
];
}
if
(
!
empty
(
$this
->
params
[
'name'
]))
{
$where
[
'name'
]
=
$this
->
params
[
'name'
];
}
if
(
!
empty
(
$this
->
params
[
'phone'
]))
{
$where
[
'phone'
]
=
$this
->
params
[
'phone'
];
}
try
{
$m_agent
=
new
AAgents
();
$m_store
=
new
AStore
();
$list
=
$m_agent
->
getList
(
$pageNo
,
$pageSize
,
'id desc'
,
'id,phone,name,position,store_id'
,
$where
);
foreach
(
$list
as
$k
=>
$v
)
{
$list
[
$k
][
'store_name'
]
=
$m_store
->
getStoreKeyById
(
'store_name'
,
[
'id'
=>
$v
[
'store_id'
]]);
}
$data
[
'list'
]
=
$list
;
$data
[
'total'
]
=
$m_agent
->
getTotal
(
$where
);
}
catch
(
\Exception
$e
)
{
$code
=
101
;
$msg
=
'内部错误:'
.
$e
->
getMessage
();
}
return
$this
->
response
(
$code
,
$msg
,
$data
);
}
}
\ No newline at end of file
application/index/view/pkList/pkListCon.html
View file @
feb0a56b
{layout name="global/frame_tpl" /}
<input
type=
"hidden"
class=
"page-load"
id=
"
realtimePerformance
"
/>
<input
type=
"hidden"
class=
"page-load"
id=
"
pkList
"
/>
<style>
.pk-container-detail
{
background-color
:
#fff
;
margin-left
:
10
px
;
margin-left
:
8
px
;
width
:
80%
;
height
:
77
0px
;
height
:
82
0px
;
border-radius
:
3px
;
box-sizing
:
border-box
;
padding
:
10px
;
padding
:
8px
;
position
:
relative
;
}
.results-pk
{
display
:
inline-block
;
height
:
32px
;
padding
:
6px
12px
;
font-size
:
14px
;
line-height
:
32px
;
color
:
#555
;
background-color
:
#fff
;
background-image
:
none
;
border
:
1px
solid
#ccc
;
border-radius
:
3px
;
box-shadow
:
inset
0
1px
1px
rgba
(
0
,
0
,
0
,
.075
);
transition
:
border-color
ease-in-out
.15s
,
}
.margain-right-10
{
margin-right
:
10px
;
}
.pk-yeji-bang
{
font-size
:
18px
;
color
:
#1C1C1C
;
font-weight
:
600
;
}
.pk-yeji-time
{
font-size
:
14px
;
color
:
#999999
;
}
.img-gold
{
position
:
absolute
;
top
:
0
;
right
:
6px
;
}
.pk-container-detail-team
{
margin-top
:
10px
;
}
.pk-container-detail-team
.team-span
{
width
:
70px
;
height
:
30px
;
font-size
:
11px
;
color
:
#FF9318
;
line-height
:
30px
;
background-color
:
rgba
(
255
,
147
,
24
,
.1
);
display
:
inline-block
;
margin-right
:
15px
;
text-align
:
center
;
cursor
:
pointer
;
}
.pk-container-detail-team
.team-span-active
{
width
:
70px
;
height
:
30px
;
font-size
:
11px
;
line-height
:
30px
;
display
:
inline-block
;
margin-right
:
15px
;
text-align
:
center
;
color
:
#FFF
;
background-color
:
#FF9318
;
cursor
:
pointer
;
}
.pk-container-detail-team
.export-pk
{
width
:
80px
;
height
:
30px
;
font-size
:
11px
;
line-height
:
30px
;
display
:
inline-block
;
text-align
:
center
;
margin-left
:
60px
;
background-color
:
#4F66C3
;
color
:
#fff
;
}
.pk-container-detail-a
{
margin
:
10px
0
;
}
.pk-container-detail-a
.a-span
{
width
:
30px
;
height
:
30px
;
font-size
:
11px
;
color
:
#FF9318
;
line-height
:
30px
;
background-color
:
rgba
(
255
,
147
,
24
,
.1
);
display
:
inline-block
;
margin-right
:
15px
;
text-align
:
center
;
cursor
:
pointer
;
}
.pk-container-detail-a
.a-span-active
{
width
:
30px
;
height
:
30px
;
font-size
:
11px
;
color
:
#fff
;
line-height
:
30px
;
background-color
:
rgba
(
255
,
147
,
24
);
display
:
inline-block
;
margin-right
:
15px
;
text-align
:
center
;
cursor
:
pointer
;
}
#pk_list
tr
:nth-child
(
even
)
{
background
:
#FFF
;
}
#pk_list
tr
:nth-child
(
odd
)
{
background
:
#F8F8F8
;
}
#pk_list
td
,
#pk_list
th
{
padding
:
3px
;
}
</style>
<div
id=
"page-content-wrapper"
>
<div
class=
"container pk-container"
>
<div
class=
"pk-container-detail"
>
9999
<div
class=
"pk-container-detail-header"
>
<span
class=
"margain-right-10 pk-yeji-bang"
>
业绩PK榜
</span>
<span
class=
"margain-right-10 pk-yeji-time"
>
(2018.11.01-2018.11.16)
</span>
<select
class=
"results-pk"
id=
"realtime_city_choose"
>
<option
value=
""
>
城市筛选
</option>
<option
value=
"10001"
>
上海市
</option>
<option
value=
"10002"
>
杭州市
</option>
</select>
<img
src=
"/resource/image/gold@1x.png"
class=
"img-gold"
/>
</div>
<div
class=
"pk-container-detail-con"
>
<div
class=
"pk-container-detail-team"
>
<span
class=
"team-span team-span-pk"
>
团队PK榜
</span>
<span
class=
"team-span-active team-span-pk"
>
店长PK榜
</span>
<span
class=
"team-span team-span-pk"
>
经理PK榜
</span>
<span
class=
"team-span team-span-pk"
>
主任PK榜
</span>
<span
class=
"team-span team-span-pk"
>
顾问PK榜
</span>
<span
class=
"team-span team-span-pk"
>
新人PK榜
</span>
<span
class=
"export-pk"
>
导出报表
</span>
</div>
<div
class=
"pk-container-detail-a"
>
<span
class=
"a-span"
>
A
</span>
<span
class=
"a-span"
>
B
</span>
<span
class=
"a-span-active"
>
C
</span>
<span
class=
"a-span"
>
D
</span>
<span
class=
"a-span"
>
E
</span>
<span
class=
"a-span"
>
F
</span>
<span
class=
"a-span"
>
G
</span>
<span
class=
"a-span"
>
H
</span>
<span
class=
"a-span"
>
I
</span>
<span
class=
"a-span"
>
J
</span>
</div>
<div
class=
"pk_list_content"
>
<table
id=
"pk_list"
class=
"table"
>
</table>
</div>
</div>
</div>
</div>
</div>
application/model/AliYunSecretReport.php
View file @
feb0a56b
...
...
@@ -107,14 +107,46 @@ class AliYunSecretReport extends BaseModel
}
/**
* 返回user_id
*
* @return array
* @param $pageNo
* @param $pageSize
* @param String $field
* @param array $where
* @param String $group
* @return false|int|\PDOStatement|string|\think\Collection
*/
public
function
getListGroupAll
(
$pageNo
,
$pageSize
,
String
$field
,
Array
$where
,
String
$group
)
{
try
{
$data
=
$this
->
field
(
$field
)
->
where
(
$where
)
->
group
(
$group
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
}
catch
(
\Exception
$e
)
{
$data
=
0
;
}
return
$data
;
}
/**
* @param array $where
* @param String $group
* @return int|string
*/
public
function
getCallUserId
()
{
return
$this
->
where
(
'create_time'
,
'between'
,
[
'2018-08-28'
,
'2018-08-31'
])
->
where
(
'users_id'
,
'NOT NULL'
)
->
group
(
'users_id'
)
->
column
(
'users_id'
);
public
function
getListGroupCount
(
Array
$where
,
String
$group
)
{
try
{
$data
=
$this
->
where
(
$where
)
->
group
(
$group
)
->
count
();
}
catch
(
\Exception
$e
)
{
$data
=
0
;
}
return
$data
;
}
public
function
getListAll
(
$field
,
$where
)
{
return
$this
->
field
(
$field
)
->
where
(
$where
)
->
select
();
}
}
\ No newline at end of file
application/model/TAgentTotalCallModel.php
0 → 100644
View file @
feb0a56b
<?php
namespace
app\model
;
use
think\Db
;
use
think\Model
;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/3/15
* Time : 下午2:00
* Intro:
*/
class
TAgentTotalCallModel
extends
Model
{
protected
$table
=
"t_agent_call"
;
private
$db_
;
function
__construct
()
{
$this
->
db_
=
Db
::
name
(
$this
->
table
);
}
/**
* @param $params
* @return int
*/
public
function
addTotal
(
$params
)
{
Db
::
startTrans
();
try
{
$this
->
db_
->
insertAll
(
$params
);
Db
::
commit
();
return
1
;
}
catch
(
\Exception
$e
)
{
print_r
(
$e
);
Db
::
rollback
();
return
0
;
}
}
/**
* @param $params
* @return int
*/
public
function
saveTotal
(
$params
)
{
Db
::
startTrans
();
try
{
foreach
(
$params
as
$k
=>
$v
)
{
$this
->
db_
->
table
(
$this
->
table
)
->
update
(
$v
);
}
Db
::
commit
();
return
1
;
}
catch
(
\Exception
$e
)
{
print_r
(
$e
);
Db
::
rollback
();
return
0
;
}
}
/**
* 获取最后统计的时间
*
* @param $field
* @param $param
* @return array|false|\PDOStatement|string|Model
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getTotalEndTimeByAgentId
(
$field
,
$param
)
{
return
$this
->
db_
->
field
(
$field
)
->
where
(
$param
)
->
order
(
"total_time desc"
)
->
find
();
}
/**
* @param String $field
* @param array $where
* @return array|false|int|\PDOStatement|string|Model
*/
public
function
getInfo
(
String
$field
,
array
$where
)
{
try
{
$data
=
$this
->
db_
->
field
(
$field
)
->
where
(
$where
)
->
find
();
}
catch
(
\Exception
$e
)
{
$data
=
0
;
}
return
$data
;
}
}
\ No newline at end of file
application/route.php
View file @
feb0a56b
...
...
@@ -111,6 +111,7 @@ Route::group('index', [
'getCurrentCity'
=>
[
'index/broker/getCurrentCity'
,
[
'method'
=>
'GET'
]],
//获取所属城市
'settingCity'
=>
[
'index/broker/settingCity'
,
[
'method'
=>
'POST'
]],
//设置所属城市
'getAgentGroupSite'
=>
[
'index/broker/getAgentGroupSite'
,
[
'method'
=>
'GET'
]],
//获得经纪人站点
'agentPositionList'
=>
[
'index/broker/agentPositionList'
,
[
'method'
=>
'GET'
]],
//经纪人职称列表
'batchChangDish'
=>
[
'index/houses/batchChangDish'
,
[
'method'
=>
'post'
]],
//批量修改盘方
'transformLandlord'
=>
[
'index/houses/transformLandlord'
,
[
'method'
=>
'post'
]],
//转换房东手机号
'lockHouse'
=>
[
'index/houses/lockHouse'
,
[
'method'
=>
'post'
]],
//锁盘
...
...
@@ -473,6 +474,8 @@ Route::group('task', [
'queryRecordFile'
=>
[
'task/PrivacyNumber/queryRecordFile'
,
[
'method'
=>
'get'
]],
//下载录音
'releaseNumber'
=>
[
'task/PrivacyNumber/releaseNumber'
,
[
'method'
=>
'get'
]],
//释放号码
'checkBindPhone'
=>
[
'task/PrivacyNumber/checkBindPhone'
,
[
'method'
=>
'get'
]],
//检查绑定关系,去除表中不存在的绑定关系
'totalAgentCall'
=>
[
'task/PrivacyNumber/totalAgentCall'
,
[
'method'
=>
'get'
]],
//统计每天经纪人拨打电话
'oldTotalAgentCall'
=>
[
'task/PrivacyNumber/oldTotalAgentCall'
,
[
'method'
=>
'get'
]],
//历史数据拨打数据
'updateStatusByTime'
=>
[
'task/updateShopStatusTask/updateStatusByTime'
,
[
'method'
=>
'get'
]],
//修改上下架
...
...
application/task/controller/PrivacyNumber.php
View file @
feb0a56b
...
...
@@ -17,6 +17,7 @@ use app\model\AAgents;
use
app\model\AAgentsPhone
;
use
app\model\AliYunSecretReport
;
use
app\model\BindingPhone
;
use
app\model\TAgentTotalCallModel
;
use
think\Db
;
use
think\Log
;
use
think\Request
;
...
...
@@ -26,11 +27,13 @@ class PrivacyNumber
private
$redis
;
private
$m_bind
;
private
$m_secret_report
;
private
$m_agent
;
public
function
__construct
()
{
$this
->
redis
=
RedisExt
::
getRedis
();
$this
->
m_secret_report
=
new
AliYunSecretReport
();
$this
->
m_bind
=
new
BindingPhone
();
$this
->
m_agent
=
new
AAgents
();
}
/**
...
...
@@ -375,4 +378,130 @@ class PrivacyNumber
$call_service
=
new
CallPhoneService
();
$call_service
->
defaultFollowUp
();
}
/**
* 统计每天经纪人拨打电话
*
* @param $month
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
totalAgentCall
(
$month
)
{
set_time_limit
(
0
);
// 取消脚本运行时间的超时上限
$call
=
new
TAgentTotalCallModel
();
if
(
empty
(
$month
))
{
$yesterday
=
date
(
'Y-m-d'
,
strtotime
(
'-1 day'
));
}
else
{
$yesterday
=
$month
;
}
$where
[
'create_time'
]
=
[
'between'
,
[
$yesterday
.
' 00:00:00'
,
$yesterday
.
' 23:59:59'
]];
$where
[
'time'
]
=
[
'>'
,
0
];
$total
=
$this
->
m_secret_report
->
getListGroupCount
(
$where
,
'phone_no'
);
$pageSize
=
50
;
$pageTotal
=
ceil
(
$total
/
$pageSize
);
for
(
$pageNo
=
1
;
$pageNo
<=
$pageTotal
;
$pageNo
++
)
{
$secret_data
=
$this
->
m_secret_report
->
getListGroupAll
(
$pageNo
,
$pageSize
,
'sum(time) as time,phone_no,agents_id'
,
$where
,
'phone_no'
);
if
(
empty
(
$secret_data
[
0
]))
{
continue
;
}
foreach
(
$secret_data
as
$k
=>
$v
)
{
$tmp_data
=
[];
$call_where
[
'agent_id'
]
=
$v
[
'agents_id'
];
$call_where
[
'total_time'
]
=
$yesterday
;
$call_where
[
'phone'
]
=
$v
[
'phone_no'
];
$call_data
=
$call
->
getInfo
(
'id,time,money'
,
$call_where
);
$where_agent
[
'agents_id'
]
=
$v
[
'agents_id'
];
$where_agent
[
'phone_no'
]
=
$v
[
'phone_no'
];
$where_agent
[
'create_time'
]
=
$where
[
'create_time'
];
$where_agent
[
'time'
]
=
$where
[
'time'
];
$time_arr
=
$this
->
m_secret_report
->
getListAll
(
'time'
,
$where_agent
);
$minute
=
0
;
foreach
(
$time_arr
as
$t_val
)
{
if
(
$t_val
[
'time'
]
%
60
==
0
){
$minute
+=
$t_val
[
'time'
]
/
60
;
}
else
{
$minute
+=
$t_val
[
'time'
]
/
60
+
1
;
}
}
$tmp_data
[
'money'
]
=
$minute
*
0.055
+
$minute
*
0.04
;
$tmp_data
[
'time'
]
=
$v
[
'time'
];
$tmp_data
[
'phone'
]
=
$v
[
'phone_no'
];
$tmp_data
[
'agent_id'
]
=
$v
[
'agents_id'
];
if
(
empty
(
$call_data
))
{
$tmp_data
[
'total_time'
]
=
$yesterday
;
$insert_data
[]
=
$this
->
binCallData
(
$tmp_data
);
}
else
{
$tmp_data
[
'id'
]
=
$call_data
[
'id'
];
$tmp_data
[
'total_time'
]
=
$yesterday
;
$update_data
[]
=
$this
->
binCallData
(
$tmp_data
);
}
unset
(
$tmp_data
);
}
if
(
!
empty
(
$insert_data
))
{
$call
->
addTotal
(
$insert_data
);
unset
(
$insert_data
);
}
if
(
!
empty
(
$update_data
))
{
$call
->
saveTotal
(
$update_data
);
unset
(
$update_data
);
}
}
return
;
}
/**
* 组装数据
*
* @param $data
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
private
function
binCallData
(
$data
)
{
if
(
!
empty
(
$data
[
'agent_id'
]))
{
$agent_data
=
$this
->
m_agent
->
getAgentInfo
(
'name,district_id,store_id,phone'
,
$data
[
'agent_id'
]);
$insert_data
[
'district_id'
]
=
$agent_data
[
'district_id'
];
$insert_data
[
'store_id'
]
=
$agent_data
[
'store_id'
];
$insert_data
[
'agent_id'
]
=
$data
[
'agent_id'
];
$insert_data
[
'name'
]
=
$agent_data
[
'name'
];
}
$insert_data
[
'phone'
]
=
$data
[
'phone'
];
$insert_data
[
'total_time'
]
=
$data
[
'total_time'
];
$insert_data
[
'time'
]
=
$data
[
'time'
];
$insert_data
[
'money'
]
=
$data
[
'money'
];
if
(
!
empty
(
$data
[
'id'
]))
{
$insert_data
[
'id'
]
=
$data
[
'id'
];
}
return
$insert_data
;
}
/**
* 历史数据
*/
public
function
oldTotalAgentCall
()
{
// $month = ['2018-03','2018-04','2018-05','2018-06','2018-07','2018-08','2018-09','2018-10','2018-11'];
$month
=
[
'2018-11'
];
foreach
(
$month
as
$v
)
{
$firstday
=
date
(
'Y-m-01'
,
strtotime
(
$v
));
$lastday
=
date
(
'd'
,
strtotime
(
"
$firstday
+1 month -1 day"
));
for
(
$i
=
1
;
$i
<=
$lastday
;
$i
++
)
{
$this
->
totalAgentCall
(
$v
.
'-'
.
$i
);
}
}
}
}
\ No newline at end of file
public/resource/image/gold@1x.png
0 → 100644
View file @
feb0a56b
3.41 KB
public/resource/js/pkList.js
0 → 100644
View file @
feb0a56b
define
([
'doT'
,
'text!temp/pk_list_template_tpl.html.html'
,
'css!style/home.css'
,
'ckfinder'
,
'ckfinderStart'
,
'pagination'
,
'bootstrapJs'
],
function
(
doT
,
template
)
{
pkList
=
{
pageNo
:
1
,
/*第几页*/
pageSize
:
25
,
/*每页显示多少条*/
mainTabIndex
:
0
,
mainTabIndexTwo
:
0
,
init
:
function
()
{
//初始化dot
$
(
document
.
body
).
append
(
template
);
pkList
.
getList
(
0
);
pkList
.
event
();
},
event
:
function
()
{
var
_doc
=
$
(
document
);
//主页面 团队 店长
_doc
.
on
(
'click'
,
'.team-span-pk'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
_this
.
removeClass
(
'team-span'
).
addClass
(
'team-span-active'
).
siblings
().
removeClass
(
'team-span-active'
).
addClass
(
'team-span'
);
pkList
.
mainTabIndex
=
_this
.
index
();
console
.
log
(
pkList
.
mainTabIndex
)
});
_doc
.
on
(
'click'
,
'.pk-container-detail-a>span'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
_this
.
removeClass
(
'a-span'
).
addClass
(
'a-span-active'
).
siblings
().
removeClass
(
'a-span-active'
).
addClass
(
'a-span'
);
pkList
.
mainTabIndexTwo
=
_this
.
index
();
console
.
log
(
pkList
.
mainTabIndexTwo
)
});
$
(
"#export"
).
click
(
function
()
{
//导出列表
pkList
.
exportList
();
});
},
// 导出列表
exportList
:
function
(
pageNo
)
{
console
.
log
(
2
);
follow
.
pageNo
=
pageNo
;
var
params
=
{};
var
excel_two
=
1
;
var
user_name
=
$
.
trim
(
$
(
'#customer_name'
).
val
());
var
start_time
=
$
(
'#start_date'
).
val
();
var
end_time
=
$
(
'#end_date'
).
val
();
var
internal_title
=
$
(
'#shop_name'
).
val
();
var
user_phone
=
$
(
'#customer_phone'
).
val
();
var
id
=
$
(
'#shop_num'
).
val
()
*
1
;
var
store_name
=
$
(
'#store_name'
).
val
();
var
report_phone
=
$
(
'#applicant_phone'
).
val
();
var
report_name
=
$
(
'#applicant_name'
).
val
();
window
.
open
(
'/index/getCollection?'
+
'excel='
+
excel_two
+
'&user_name='
+
user_name
+
'&start_time='
+
start_time
+
'&end_time='
+
end_time
+
'&internal_title='
+
internal_title
+
'&user_phone='
+
user_phone
+
'&id='
+
id
+
'&store_name='
+
store_name
+
'&report_phone='
+
report_phone
+
'&report_name='
+
report_name
);
},
getList
:
function
(
pageNo
)
{
var
params
=
{};
params
.
pageNo
=
pkList
.
pageNo
;
params
.
pageSize
=
pkList
.
pageSize
;
$
.
ajax
({
type
:
'GET'
,
url
:
'/index/evaluationList'
,
//拜访列表
data
:
params
,
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
if
(
typeof
data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
var
doTtmpl
=
doT
.
template
(
document
.
getElementById
(
'pk_list_tpl'
).
innerHTML
);
$
(
"#pk_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
add_page
(
data
.
data
.
total
,
pageNo
,
pkList
.
pageSize
,
pkList
.
getList
);
}
else
{
alert
(
data
[
'msg'
]);
};
}
else
{
alert
(
'数据错误'
);
};
},
error
:
function
()
{
alert
(
'error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
){
alert
(
'请求超时'
);
};
}
});
}
};
return
pkList
;
});
\ No newline at end of file
public/resource/template/pk_list_template_tpl.html.html
0 → 100644
View file @
feb0a56b
<script
id=
"pk_list_tpl"
type=
"text/template"
>
[
%
if
(
it
)
{
%
]
<
tr
>
<
th
class
=
"text-center"
>
排名
<
/th
>
<
th
class
=
"text-center"
>
所属门店
<
/th
>
<
th
class
=
"text-center"
>
经纪人
<
/th
>
<
th
class
=
"text-center"
>
业绩(元)
<
/th
>
<
/tr
>
[
%
for
(
var
item
in
it
){
%
]
<
tr
class
=
"text-center"
>
<
td
>
[
%=
it
[
item
][
"name"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"evaluate_content"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"phone"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"create_time"
]
%
]
<
/td
>
<
/tr
>
[
%
}
%
]
[
%
}
else
{
%
]
<
tr
>
<
td
colspan
=
"8"
style
=
"text-align:center;"
>
暂无数据
<
/td
>
<
/tr
>
[
%
}
%
]
</script>
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