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
6ad313cd
Commit
6ad313cd
authored
Jul 19, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的约带看
parent
47eddd4a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
8 deletions
+71
-8
Report.php
application/index/controller/Report.php
+63
-0
route.php
application/route.php
+5
-5
inspectionRecordAll.js
public/resource/js/inspectionRecordAll.js
+3
-3
No files found.
application/index/controller/Report.php
View file @
6ad313cd
...
@@ -9,12 +9,20 @@
...
@@ -9,12 +9,20 @@
namespace
app\index\controller
;
namespace
app\index\controller
;
use
app\api_broker\service\ReportService
;
use
app\index\extend\Basic
;
use
app\index\extend\Basic
;
use
app\model\AAgents
;
use
app\model\AAgents
;
use
app\model\OReportModel
;
use
app\model\OReportModel
;
class
Report
extends
Basic
class
Report
extends
Basic
{
{
private
$service_
;
public
function
__construct
(
$request
=
null
)
{
parent
::
__construct
(
$request
);
$this
->
service_
=
new
ReportService
();
}
/**
/**
* 获取报备列表 pc
* 获取报备列表 pc
*
*
...
@@ -115,4 +123,58 @@ class Report extends Basic
...
@@ -115,4 +123,58 @@ class Report extends Basic
return
$this
->
response
(
$data
[
'code'
],
$data
[
'msg'
],
$data
[
'data'
]);
return
$this
->
response
(
$data
[
'code'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
}
/**
* 获取报备列表
* @return \think\Response
* @throws \think\db\exception\BindParamException
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\PDOException
*/
public
function
reportList
()
{
$params
=
$this
->
params
;
/* $params = array(
"agent_id" =>6562,
"type" => 1,//1表示全部 2表示进场 3 表示收款 4成交报告
"is_all"=>0,//0搜索我自己的,1全部
"page_no"=>1,
"page_size"=>15
);*/
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"type"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
$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,a.report_agent_name"
;
$params
[
"report_agent_id"
]
=
$params
[
"agent_id"
];
$result
=
[];
//todo 总监账号看全部带看记录 by 190708
$agentModel
=
new
AAgents
();
$agents_data
=
$agentModel
->
getAgentInfo
(
'id,level'
,
$this
->
userId
);
// if (isset($params["is_all"]) && $params["is_all"] == 1) {
$check_type
=
1
;
if
(
$agents_data
[
"level"
]
<
30
)
{
$check_type
=
$this
->
service_
->
getCheckType
(
$this
->
userId
);
if
(
$check_type
==
0
)
{
return
$this
->
response
(
101
,
"暂无权限"
);
}
}
$result
=
$this
->
service_
->
orderListAll
(
$field
,
$params
,
$pageNo
,
$pageSize
,
$check_type
);
// } else {
// $result = $this->service_->orderList($field, $params, $pageNo, $pageSize);
// }
if
(
count
(
$result
)
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
else
{
return
$this
->
response
(
"200"
,
"request null"
);
}
}
}
}
\ No newline at end of file
application/route.php
View file @
6ad313cd
...
@@ -442,10 +442,10 @@ Route::group('index', [
...
@@ -442,10 +442,10 @@ Route::group('index', [
'addSite'
=>
[
'index/Site/addSite'
,
[
'method'
=>
'POST|GET'
]],
//获取站点列表 朱伟 2018-10-18
'addSite'
=>
[
'index/Site/addSite'
,
[
'method'
=>
'POST|GET'
]],
//获取站点列表 朱伟 2018-10-18
'getSiteList'
=>
[
'index/Site/getSiteList'
,
[
'method'
=>
'POST|GET'
]],
//获取站点列表 朱伟 2018-10-18
'getSiteList'
=>
[
'index/Site/getSiteList'
,
[
'method'
=>
'POST|GET'
]],
//获取站点列表 朱伟 2018-10-18
'delImageDepot_Site'
=>
[
'index/Site/delImageDepot'
,
[
'method'
=>
'POST|GET'
]],
//关闭或开启站点 朱伟 2018-10-18
'delImageDepot_Site'
=>
[
'index/Site/delImageDepot'
,
[
'method'
=>
'POST|GET'
]],
//关闭或开启站点 朱伟 2018-10-18
'inspectionRecordOur/:check_status'
=>
[
'index/Report/
inspectionRecordAll
'
,
[
'method'
=>
'GET'
],
[
'check_status'
=>
0
]],
//我的约带看
'inspectionRecordOur/:check_status'
=>
[
'index/Report/
reportList
'
,
[
'method'
=>
'GET'
],
[
'check_status'
=>
0
]],
//我的约带看
'inspectionRecordStore/:check_status'
=>
[
'index/Report/
inspectionRecordAll
'
,
[
'method'
=>
'GET'
],
[
'check_status'
=>
1
]],
//门店约带看
'inspectionRecordStore/:check_status'
=>
[
'index/Report/
reportList
'
,
[
'method'
=>
'GET'
],
[
'check_status'
=>
1
]],
//门店约带看
'inspectionRecordDistrict/:check_status'
=>
[
'index/Report/
inspectionRecordAll
'
,
[
'method'
=>
'GET'
],
[
'check_status'
=>
2
]],
//部门约带看
'inspectionRecordDistrict/:check_status'
=>
[
'index/Report/
reportList
'
,
[
'method'
=>
'GET'
],
[
'check_status'
=>
2
]],
//部门约带看
'inspectionRecordAll/:check_status'
=>
[
'index/Report/
inspectionRecordAll
'
,
[
'method'
=>
'GET'
],
[
'check_status'
=>
3
]],
//全部约带看
'inspectionRecordAll/:check_status'
=>
[
'index/Report/
reportList
'
,
[
'method'
=>
'GET'
],
[
'check_status'
=>
3
]],
//全部约带看
'setSite'
=>
[
'index/auth/setSite'
,
[
'method'
=>
'GET|POST'
]],
//设置角色站点
'setSite'
=>
[
'index/auth/setSite'
,
[
'method'
=>
'GET|POST'
]],
//设置角色站点
...
@@ -772,7 +772,7 @@ Route::group('broker', [
...
@@ -772,7 +772,7 @@ Route::group('broker', [
'reportList'
=>
[
'api_broker/Report/reportList'
,
[
'method'
=>
'get'
]],
'reportList'
=>
[
'api_broker/Report/reportList'
,
[
'method'
=>
'get'
]],
'getCheckType'
=>
[
'api_broker/Report/getCheckType'
,
[
'method'
=>
'get|post'
]],
'getCheckType'
=>
[
'api_broker/Report/getCheckType'
,
[
'method'
=>
'get|post'
]],
'reportListForPc'
=>
[
'api_broker/Report/reportList
ForPc
'
,
[
'method'
=>
'get'
]],
'reportListForPc'
=>
[
'api_broker/Report/reportList'
,
[
'method'
=>
'get'
]],
'orderDetail'
=>
[
'api_broker/OrderLog/orderDetail'
,
[
'method'
=>
'get|post'
]],
'orderDetail'
=>
[
'api_broker/OrderLog/orderDetail'
,
[
'method'
=>
'get|post'
]],
...
...
public/resource/js/inspectionRecordAll.js
View file @
6ad313cd
...
@@ -227,11 +227,11 @@ define(['doT', 'text!temp/inspectionRecordAll_list_template_tpl.html', 'css!styl
...
@@ -227,11 +227,11 @@ define(['doT', 'text!temp/inspectionRecordAll_list_template_tpl.html', 'css!styl
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'
)));
//读取缓存
params
.
start_time
=
$
(
'#create_time_start'
).
val
();
params
.
create_time_start
=
$
(
'#create_time_start'
).
val
();
params
.
end_time
=
$
(
'#create_time_end'
).
val
();
params
.
create_time_end
=
$
(
'#create_time_end'
).
val
();
params
.
report_agent_name
=
$
(
'#user_name'
).
val
();
params
.
report_agent_name
=
$
(
'#user_name'
).
val
();
params
.
report_agent_phone
=
$
(
'#user_phone'
).
val
();
params
.
report_agent_phone
=
$
(
'#user_phone'
).
val
();
params
.
internal
_title
=
$
(
'#house_title'
).
val
();
params
.
house
_title
=
$
(
'#house_title'
).
val
();
params
.
user_phone
=
$
(
'#report_agent_phone'
).
val
();
params
.
user_phone
=
$
(
'#report_agent_phone'
).
val
();
params
.
order_id
=
$
(
'#report_id'
).
val
();
//全部约带看记录 订单id搜索
params
.
order_id
=
$
(
'#report_id'
).
val
();
//全部约带看记录 订单id搜索
params
.
AuthToken
=
user_info_obj
.
AuthToken
;
params
.
AuthToken
=
user_info_obj
.
AuthToken
;
...
...
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