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
5da837b5
Commit
5da837b5
authored
Mar 13, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
成交报告列表
parent
ee9c57a5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
6 deletions
+59
-6
Finance.php
application/index/controller/Finance.php
+20
-4
OBargainModel.php
application/model/OBargainModel.php
+39
-2
No files found.
application/index/controller/Finance.php
View file @
5da837b5
...
...
@@ -10,22 +10,38 @@ namespace app\index\controller;
use
app\index\extend\Basic
;
use
app\model\OBargainModel
;
class
Finance
extends
Basic
{
/**
* 成交报告
*
* @return \think\response\View
* @return \think\Response|\think\response\View
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
reportList
()
{
if
(
$this
->
request
->
isAjax
())
{
if
(
$this
->
request
->
get
())
{
if
(
$this
->
request
->
isAjax
())
{
$data
[
'code'
]
=
200
;
$data
[
'msg'
]
=
""
;
$data
[
'data'
]
=
[];
if
(
$this
->
request
->
isGet
())
{
$pageNo
=
empty
(
$_POST
[
'pageNo'
])
?
1
:
$_POST
[
'pageNo'
];
$pageSize
=
empty
(
$_POST
[
'pageSize'
])
?
15
:
$_POST
[
'pageSize'
];
$fields
=
'a.id,a.create_time,b.user_phone,b.user_name,d.internal_title,d.internal_address,a.commission,a.practical_fee'
;
$where
[
'a.father_id'
]
=
0
;
$where
[
'c.is_del'
]
=
0
;
$bargain
=
new
OBargainModel
();
$data
[
'data'
]
=
$bargain
->
getBargain
(
$pageNo
,
$pageSize
,
'a.id DESC'
,
$fields
,
$where
);
}
else
{
}
$result
=
$this
->
response
(
$data
[
'code'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
else
{
$result
=
view
(
'finance/index'
);
}
...
...
application/model/OBargainModel.php
View file @
5da837b5
...
...
@@ -49,6 +49,7 @@ class OBargainModel extends Model
/**
* 修改信息
*
* @param $id
* @param $params
* @return int
...
...
@@ -69,9 +70,13 @@ class OBargainModel extends Model
/**
* 查询成交报告记录
* @param string $filed
*
* @param $filed
* @param $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
selectBargainByOrderNo
(
$filed
,
$params
)
{
...
...
@@ -95,14 +100,17 @@ class OBargainModel extends Model
->
select
();
}
/**
* 获取我得成交
*
* @param $filed
* @param $params
* @param $pageNo
* @param $pageSize
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
selectBargainList
(
$filed
,
$params
,
$pageNo
,
$pageSize
){
$where_
=
[];
...
...
@@ -130,9 +138,13 @@ class OBargainModel extends Model
/**
* 获取成交报告详情
*
* @param $filed
* @param $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
selectBargainDetail
(
$filed
,
$params
){
$where_
=
$whereOr_
=
[];
...
...
@@ -152,4 +164,28 @@ class OBargainModel extends Model
echo
$this
->
getLastSql
();
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
getBargain
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
return
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'o_report b'
,
'a.report_id = b.id'
,
'left'
)
->
join
(
'o_order c'
,
'c.f_id = b.id'
,
'left'
)
->
join
(
'g_houses d'
,
'c.house_id = d.id'
,
'left'
)
->
where
(
$params
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
}
}
\ 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