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
8b6dd4d6
Commit
8b6dd4d6
authored
Jun 19, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
进场记录列表
parent
316d5e80
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
297 additions
and
2 deletions
+297
-2
OfficeMarchIn.php
application/index/controller/OfficeMarchIn.php
+130
-0
marchin_list.html
application/index/view/office_marchin/marchin_list.html
+162
-0
OfficeOMarchInModel.php
application/model/OfficeOMarchInModel.php
+4
-2
route.php
application/route.php
+1
-0
No files found.
application/index/controller/OfficeMarchIn.php
0 → 100644
View file @
8b6dd4d6
<?php
namespace
app\index\controller
;
/**
* Created by PhpStorm.
* 进场相关
* User: zhuwei
* Date: 2018/6/13
* Time: 上午10:18
*/
use
app\api_broker\service\OfficeOrderLogService
;
use
app\api_broker\service\OrderLogService
;
use
app\index\extend\Basic
;
use
app\model\OfficeOMarchInModel
;
class
OfficeMarchIn
extends
Basic
{
protected
$oMarchInModel
;
public
function
__construct
(
$request
=
null
)
{
parent
::
__construct
(
$request
);
$this
->
oMarchInModel
=
new
OfficeOMarchInModel
();
}
/**
* 进场记录列表
* User: 朱伟
* Date: 2018/6/13
* Time: 上午10:34
*/
public
function
marchInList
(){
if
(
!
$this
->
request
->
isAjax
())
{
return
view
(
'office_marchin/marchin_list'
);
}
$params
=
$this
->
params
;
$checkResult
=
$this
->
validate
(
$params
,
"VerifyValidate.select"
);
if
(
true
!==
$checkResult
)
{
//return $this->response("101", $checkResult);
}
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$where
=
[];
//搜索条件 start
//1.进场时间
if
(
!
empty
(
$params
[
'create_time_start'
])
&&
!
empty
(
$params
[
'create_time_end'
]))
{
$where
[
'a.create_time'
]
=
[
'between time'
,
[
$params
[
'create_time_start'
]
.
' 00:00:00'
,
$params
[
'create_time_end'
]
.
' 23:59:59'
]];
}
//2.部门
if
(
!
empty
(
$params
[
'district_id'
]))
{
$where
[
'b.district_id'
]
=
$params
[
'district_id'
];
}
//3.门店名称
if
(
!
empty
(
$params
[
'store_id'
]))
{
$where
[
'b.store_id'
]
=
$params
[
'store_id'
];
}
//4.客户姓名
if
(
!
empty
(
$params
[
'user_name'
]))
{
$where
[
'd.user_name'
]
=
[
'LIKE'
,
'%'
.
$params
[
'user_name'
]
.
'%'
];
}
//5.客户手机号
if
(
!
empty
(
$params
[
'user_phone'
]))
{
$where
[
'd.user_phone'
]
=
[
'LIKE'
,
'%'
.
$params
[
'user_phone'
]
.
'%'
];
}
//6.报备人手机号
if
(
!
empty
(
$params
[
'report_agent_phone'
]))
{
$where
[
'd.report_agent_phone'
]
=
[
'LIKE'
,
'%'
.
$params
[
'report_agent_phone'
]
.
'%'
];
}
//7.报备人姓名
if
(
!
empty
(
$params
[
'report_agent_name'
]))
{
$where
[
'd.report_agent_name'
]
=
[
'LIKE'
,
'%'
.
$params
[
'report_agent_name'
]
.
'%'
];
}
//8.商铺名
if
(
!
empty
(
$params
[
'house_title'
]))
{
$where
[
'c.house_title'
]
=
[
'LIKE'
,
'%'
.
$params
[
'house_title'
]
.
'%'
];
}
//9.商铺类型
// if (isset($params['shop_type']) && $params['shop_type'] != -1) {
// $where['f.shop_type'] = $params['shop_type'] ;
// }
//10.带看ID
if
(
!
empty
(
$params
[
'order_id'
]))
{
$where
[
'a.order_id'
]
=
$params
[
'order_id'
]
;
}
//11.客户id
if
(
!
empty
(
$params
[
'user_id'
]))
{
$where
[
'd.user_id'
]
=
$params
[
'user_id'
];
}
//12.商铺id
if
(
!
empty
(
$params
[
'house_id'
]))
{
$where
[
'c.house_id'
]
=
$params
[
'house_id'
];
}
//搜索条件 end
$fields_evaluate
=
'a.id,a.report_id,a.order_id,d.user_name,d.user_phone,a.create_time,d.report_agent_name,'
;
$fields_evaluate
.=
'd.report_agent_phone,e.store_name,a.march_in_img,g.longitude,g.latitude,a.march_in_area'
;
$data
[
'list'
]
=
$this
->
oMarchInModel
->
findmarchInList
(
$pageNo
,
$pageSize
,
'a.id desc'
,
$fields_evaluate
,
$where
);
$data
[
'total'
]
=
$this
->
oMarchInModel
->
findmarchInListCount
(
$fields_evaluate
,
$where
);
$OrderLogService
=
new
OfficeOrderLogService
();
foreach
(
$data
[
'list'
]
as
$k
=>
$v
)
{
if
(
$v
[
'march_in_img'
]){
$data
[
'list'
][
$k
][
'march_in_img'
]
=
[[
'img_name'
=>
$v
[
'march_in_img'
]]];
}
else
{
$data
[
'list'
][
$k
][
'march_in_img'
]
=
$OrderLogService
->
getOImg
(
$v
[
'id'
],
1
);
}
}
foreach
(
$data
[
'list'
]
as
$k
=>
$v
)
{
$data
[
'list'
][
$k
][
'user_phone'
]
=
preg_replace
(
'/(\d{3})\d{4}(\d{4})/'
,
'$1****$2'
,
$v
[
"user_phone"
]);
}
return
$this
->
response
(
200
,
'success'
,
$data
);
}
}
\ No newline at end of file
application/index/view/office_marchin/marchin_list.html
0 → 100644
View file @
8b6dd4d6
{layout name="global/frame_two_tpl" /}
<input
type=
"hidden"
class=
"page-load"
id=
"marchinList"
/>
<style>
.modal-body
{
/*height: 600px;*/
overflow-y
:
auto
;
padding-bottom
:
60px
;
}
.user-ul2
{
width
:
100%
;
height
:
auto
;
padding-bottom
:
15px
;
float
:
left
;
}
.user-ul2
li
{
list-style
:
none
;
line-height
:
30px
;
}
.money_total_two
{
font-weight
:
bold
;
font-size
:
15px
;
}
#search
{
float
:
left
;
}
#reset
{
float
:
left
;
}
.J_preview
{
width
:
30px
;
height
:
30px
;
/*border-radius: 15px;*/
}
#preview
img
{
width
:
388px
;
}
</style>
<div
id=
"page-content-wrapper"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
""
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading breadcrumb"
>
<li>
<a
href=
"javascript:;"
>
进场记录
</a>
</li>
</div>
<div
class=
"panel-body"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<thead>
<tr>
<td
colspan=
"10"
>
<form
id=
"form_search"
>
<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>
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"create_time_end"
name=
"end_date1"
type=
"date"
>
<!--<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="district_id" placeholder="报备人所属部门" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="district_id" placeholder="所属门店" type="text" value="">-->
<select
class=
"form-control btn4 ld-Marheight input"
name=
""
id=
"district_id"
>
<option
value=
""
>
报备人所属部门
</option>
</select>
<select
class=
"form-control btn4 ld-Marheight input"
name=
""
id=
"guest_stores"
value=
""
>
</select>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"user_id"
placeholder=
"客户ID"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"shop_id"
placeholder=
"商铺ID"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"user_phone"
placeholder=
"客户手机号"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"report_agent_name"
placeholder=
"报备人姓名"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"report_agent_phone"
placeholder=
"报备人手机号"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"house_title"
placeholder=
"商铺名"
type=
"text"
value=
""
>
<select
class=
"form-control btn2 ld-Marheight"
id=
"shop_type"
>
<option
value=
"-1"
>
商铺类型
</option>
<option
value=
"0"
>
商场
</option>
<option
value=
"1"
>
街铺
</option>
</select>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"bargain_id"
placeholder=
"带看订单ID"
type=
"text"
value=
""
>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"search"
>
搜索
</span>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"reset"
>
重置
</span>
</form>
</td>
</tr>
<tr>
<th
class=
"text-center"
>
带看ID
</th>
<th
class=
"text-center"
>
客户姓名
</th>
<th
class=
"text-center"
>
客户电话
</th>
<th
class=
"text-center"
>
进场时间
</th>
<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=
"follow_list"
>
</table>
</div>
<!-- /#page-content-wrapper -->
<div
class=
"text-right"
id=
"pagediv"
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script
type=
"text/javascript"
src=
"https://api.map.baidu.com/api?v=2.0&ak=RTimRTxtj23AYTCkSsPvNDuQkGpR2fPX"
></script>
<!--时间轴-->
<!--时间轴-->
<div
class=
"modal fade"
id=
"modal-time"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
时间轴
</h4>
</div>
<div
class=
"modal-body"
class=
"iframe-div-parent"
>
<iframe
class=
"iframe-time-line"
></iframe>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--主要列表模板-->
<script
id=
"marchin_list_tpl"
type=
"text/template"
>
<
tr
class
=
"text-center"
>
<
td
>
{
7
}
<
/td
>
<
td
>
{
0
}
<
/td
>
<
td
>
{
1
}
<
/td
>
<
td
>
{
2
}
<
/td
>
<
td
>
<
img
src
=
'{5}'
class
=
"diagram-image J_preview no-scroll-page-img"
data
-
bimg
=
'{5}'
>
<
/td
>
<
td
>
{
4
}
<
/td
>
<
td
>
{
3
}
<
/td
>
<
td
>
{
6
}
<
/td
>
<
/tr
>
</script>
<script
id=
"marchin_list_tpl2"
type=
"text/template"
>
<
a
class
=
"btn1 btn-success timeline"
href
=
"#modal-time"
data
-
toggle
=
"modal"
data
-
id
=
'{0}'
>
时间轴
<
/a
>
</script>
\ No newline at end of file
application/model/OfficeOMarchInModel.php
View file @
8b6dd4d6
...
@@ -351,7 +351,8 @@ class OfficeOMarchInModel extends Model
...
@@ -351,7 +351,8 @@ class OfficeOMarchInModel extends Model
->
join
(
'o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'o_report d'
,
'a.report_id = d.id'
,
'left'
)
->
join
(
'o_report d'
,
'a.report_id = d.id'
,
'left'
)
->
join
(
'a_store e'
,
'd.report_store_id = e.id'
,
'left'
)
->
join
(
'a_store e'
,
'd.report_store_id = e.id'
,
'left'
)
->
join
(
'g_houses f'
,
'c.house_id = f.id'
,
'left'
)
->
join
(
'office_g_room f'
,
'c.house_id = f.id'
,
'left'
)
->
join
(
'office_g_building g'
,
'f.building = g.id'
,
'left'
)
->
where
(
$params
)
->
where
(
$params
)
->
order
(
$order_
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
limit
(
$pageSize
)
...
@@ -371,7 +372,8 @@ class OfficeOMarchInModel extends Model
...
@@ -371,7 +372,8 @@ class OfficeOMarchInModel extends Model
->
join
(
'o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'o_report d'
,
'a.report_id = d.id'
,
'left'
)
->
join
(
'o_report d'
,
'a.report_id = d.id'
,
'left'
)
->
join
(
'a_store e'
,
'd.report_store_id = e.id'
,
'left'
)
->
join
(
'a_store e'
,
'd.report_store_id = e.id'
,
'left'
)
->
join
(
'g_houses f'
,
'c.house_id = f.id'
,
'left'
)
->
join
(
'office_g_room f'
,
'c.house_id = f.id'
,
'left'
)
->
join
(
'office_g_building g'
,
'f.building = g.id'
,
'left'
)
->
where
(
$params
)
->
where
(
$params
)
->
count
();
->
count
();
...
...
application/route.php
View file @
8b6dd4d6
...
@@ -1056,6 +1056,7 @@ Route::group('office_index', [
...
@@ -1056,6 +1056,7 @@ Route::group('office_index', [
'inspectionRecordAll/:check_status'
=>
[
'index/OfficeReport/inspectionRecordAll'
,
[
'method'
=>
'GET'
],
[
'check_status'
=>
3
]],
//全部约带看
'inspectionRecordAll/:check_status'
=>
[
'index/OfficeReport/inspectionRecordAll'
,
[
'method'
=>
'GET'
],
[
'check_status'
=>
3
]],
//全部约带看
'getDistance'
=>
[
'index/OfficeManage/getDistance'
,
[
'method'
=>
'GET'
]],
//获取两个经纬度距离
'getDistance'
=>
[
'index/OfficeManage/getDistance'
,
[
'method'
=>
'GET'
]],
//获取两个经纬度距离
'getHouseAddress'
=>
[
'index/OfficeRoom/checkRepetition'
,
[
'method'
=>
'get'
]],
//搜索楼号/栋/座+楼层+房号
'getHouseAddress'
=>
[
'index/OfficeRoom/checkRepetition'
,
[
'method'
=>
'get'
]],
//搜索楼号/栋/座+楼层+房号
'marchInList'
=>
[
'index/officeMarchIn/marchInList'
,
[
'method'
=>
'POST|GET'
]],
//进场记录列表 朱伟 2018-06-13
]);
]);
Route
::
group
(
'office_api'
,
[
Route
::
group
(
'office_api'
,
[
...
...
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