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
f2e4603b
Commit
f2e4603b
authored
Oct 31, 2018
by
zw
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/1030-v2.9.6' into 1030-v2.9.6
parents
14b9f474
572e994c
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
194 additions
and
1 deletion
+194
-1
Report.php
application/index/controller/Report.php
+77
-0
OReportModel.php
application/model/OReportModel.php
+86
-1
route.php
application/route.php
+1
-0
public.css
public/resource/css/public.css
+18
-0
public.js
public/resource/js/public.js
+12
-0
No files found.
application/index/controller/Report.php
0 → 100644
View file @
f2e4603b
<?php
/**
* Created by PhpStorm.
* User: hu jun
* Date: 2018/10/31
* Time: 9:54
*/
namespace
app\index\controller
;
use
app\index\extend\Basic
;
use
app\model\OReportModel
;
class
Report
extends
Basic
{
/**
* 获取报备列表 pc
*
* @return \think\Response
*/
public
function
inspectionRecordAll
()
{
if
(
!
$this
->
request
->
isAjax
())
{
return
view
(
'reportList'
);
}
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
$m_report
=
new
OReportModel
();
$data
[
'code'
]
=
200
;
$data
[
'msg'
]
=
""
;
$where
=
[];
if
(
!
empty
(
$this
->
params
[
'start_time'
])
&&
empty
(
$this
->
params
[
'end_time'
]))
{
$where
[
'a.create_time'
]
=
[
'> time'
,
$this
->
params
[
'start_time'
]
.
' 00:00:00'
];
}
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
empty
(
$this
->
params
[
'start_time'
]))
{
$where
[
'a.create_time'
]
=
[
'< time'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
];
}
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
!
empty
(
$this
->
params
[
'start_time'
]))
{
$where
[
'a.create_time'
]
=
[
'between time'
,
[
$this
->
params
[
'start_time'
]
.
' 00:00:00'
,
$this
->
params
[
'end_time'
]
.
' 23:59:59'
]];
}
if
(
!
empty
(
$this
->
params
[
'user_phone'
]))
{
$where
[
'a.user_phone'
]
=
$this
->
params
[
'user_phone'
];
}
if
(
!
empty
(
$this
->
params
[
'internal_title'
]))
{
$where
[
'c.internal_title'
]
=
$this
->
params
[
'internal_title'
];
}
if
(
!
empty
(
$this
->
params
[
'report_agent_name'
]))
{
$where
[
'a.report_agent_name'
]
=
$this
->
params
[
'report_agent_name'
];
}
if
(
!
empty
(
$this
->
params
[
'report_agent_phone'
]))
{
$where
[
'a.report_agent_phone'
]
=
$this
->
params
[
'report_agent_phone'
];
}
$field
=
'b.id as order_id,a.user_name,a.user_phone,a.create_time,a.report_agent_name,c.internal_title,a.predict_see_time'
;
try
{
$list
=
$m_report
->
getReportList
(
$pageNo
,
$pageSize
,
'a.id desc'
,
$field
,
$where
);
$data
[
'data'
][
'total'
]
=
$m_report
->
getAddReportListTotal
(
$where
);
$data
[
'data'
][
'list'
]
=
$list
;
}
catch
(
\Exception
$e
)
{
$data
[
'code'
]
=
101
;
$data
[
'code'
]
=
'内部错误:'
.
$e
->
getMessage
();
}
return
$this
->
response
(
$data
[
'code'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
}
\ No newline at end of file
application/model/OReportModel.php
View file @
f2e4603b
...
...
@@ -600,7 +600,6 @@ class OReportModel extends Model
return
$result
;
}
/**
* @param $params
* @param $field
...
...
@@ -634,6 +633,92 @@ class OReportModel extends Model
return
$result
;
}
/**
* @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
getReportList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'a.id desc'
,
$field
=
''
,
$params
=
''
)
{
$where_
=
[];
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"a.report_agent_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"create_time"
]))
{
$where_
[
"a.create_time"
]
=
$params
[
"create_time"
];
}
if
(
isset
(
$params
[
"house_ids"
]))
{
$where_
[
"b.house_id"
]
=
array
(
"in"
,
$params
[
"house_ids"
]
);
}
if
(
isset
(
$params
[
'report_agent_name'
]))
{
$where_
[
"a.report_agent_name"
]
=
$params
[
'report_agent_name'
];
}
if
(
isset
(
$params
[
'report_agent_phone'
]))
{
$where_
[
"a.report_agent_phone"
]
=
$params
[
'report_agent_phone'
];
}
if
(
isset
(
$params
[
'internal_title'
]))
{
$where_
[
"c.internal_title"
]
=
$params
[
'internal_title'
];
}
if
(
isset
(
$params
[
'user_phone'
]))
{
$where_
[
"a.user_phone"
]
=
$params
[
'user_phone'
];
}
$where_
[
"a.status"
]
=
0
;
$result
=
$this
->
db
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id = b.f_id"
,
"left"
)
->
join
(
"g_houses c"
,
"b.house_id = c.id"
,
"left"
)
->
where
(
$where_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
order
(
$order_
)
->
select
();
return
$result
;
}
/**
* 约带看总数
*
* @param $params
* @return int|string
*/
public
function
getAddReportListTotal
(
$params
)
{
$where_
[
"a.status"
]
=
0
;
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"a.report_agent_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"create_time"
]))
{
$where_
[
"a.create_time"
]
=
$params
[
"create_time"
];
}
if
(
isset
(
$params
[
"house_ids"
]))
{
$where_
[
"b.house_id"
]
=
array
(
"in"
,
$params
[
"house_ids"
]);
}
if
(
isset
(
$params
[
'report_agent_name'
]))
{
$where_
[
"a.report_agent_name"
]
=
$params
[
'report_agent_name'
];
}
if
(
isset
(
$params
[
'report_agent_phone'
]))
{
$where_
[
"a.report_agent_phone"
]
=
$params
[
'report_agent_phone'
];
}
if
(
isset
(
$params
[
'internal_title'
]))
{
$where_
[
"c.internal_title"
]
=
$params
[
'internal_title'
];
}
if
(
isset
(
$params
[
'user_phone'
]))
{
$where_
[
"a.user_phone"
]
=
$params
[
'user_phone'
];
}
return
$this
->
db
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id = b.f_id"
,
"left"
)
->
join
(
"g_houses c"
,
"b.house_id = c.id"
,
"left"
)
->
where
(
$where_
)
->
count
(
'a.id'
);
}
public
function
getAddReportListPcInfo
(
$params
,
$field
,
$page_no
,
$page_size
)
{
$where_
=
[];
...
...
application/route.php
View file @
f2e4603b
...
...
@@ -343,6 +343,7 @@ Route::group('index', [
'addSite'
=>
[
'index/Site/addSite'
,
[
'method'
=>
'POST|GET'
]
],
//获取站点列表 朱伟 2018-10-18
'getSiteList'
=>
[
'index/Site/getSiteList'
,
[
'method'
=>
'POST|GET'
]
],
//获取站点列表 朱伟 2018-10-18
'delImageDepot'
=>
[
'index/Site/delImageDepot'
,
[
'method'
=>
'POST|GET'
]
],
//关闭或开启站点 朱伟 2018-10-18
'inspectionRecordAll'
=>
[
'index/report/inspectionRecordAll'
,
[
'method'
=>
'GET'
]
],
//全部约带看
]);
...
...
public/resource/css/public.css
View file @
f2e4603b
...
...
@@ -722,3 +722,20 @@ p{margin: 0;}
#preview_big_img_div
>
img
{
max-height
:
98%
;
}
.mark
{
display
:
none
;
position
:
fixed
;
top
:
20%
;
right
:
0
;
/*bottom: 0;*/
left
:
0
;
margin
:
auto
;
height
:
0.88rem
;
line-height
:
0.88rem
;
width
:
40%
;
text-align
:
center
;
font-size
:
0.28rem
;
color
:
#fff
;
background
:
rgba
(
0
,
0
,
0
,
0.6
);
border-radius
:
0.1rem
;
}
\ No newline at end of file
public/resource/js/public.js
View file @
f2e4603b
...
...
@@ -301,3 +301,14 @@ function urlDeal(urlStr, httpStr) {
function
dealPunctuation
(
str
)
{
return
str
.
replace
(
/!!!!!/g
,
''
).
replace
(
/!!!!!/g
,
''
).
replace
(
/
\?\?\?\?\?
/g
,
''
).
replace
(
/?????/g
,
''
).
replace
(
/。。。。。/g
,
''
);
}
function
alert
(
str
)
{
var
div
=
'<div class="mark"></div>'
;
$
(
'body'
).
append
(
div
)
$
(
'.mark'
).
html
(
str
);
$
(
'.mark'
).
show
();
setTimeout
(
function
()
{
$
(
'.mark'
).
hide
();
$
(
'.mark'
).
remove
();
},
2000000
)
}
\ No newline at end of file
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