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
d3a0394d
Commit
d3a0394d
authored
Oct 10, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
业绩排行-业绩-明细-实收数据
parent
bcb1b2a3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
19 deletions
+44
-19
Finance.php
application/index/controller/Finance.php
+4
-3
PerformanceInfo.php
application/index/controller/PerformanceInfo.php
+25
-16
OPartialCommission.php
application/model/OPartialCommission.php
+15
-0
No files found.
application/index/controller/Finance.php
View file @
d3a0394d
...
...
@@ -690,9 +690,9 @@ class Finance extends Basic
*/
public
function
partialCommissionList
()
{
if
(
!
$this
->
request
->
isAjax
())
{
return
view
(
'commission'
);
}
//
if (!$this->request->isAjax()) {
//
return view('commission');
//
}
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
...
...
@@ -750,6 +750,7 @@ class Finance extends Basic
try
{
$data
[
'data'
][
'list'
]
=
$m_commission
->
getCommissionBargainList
(
$pageNo
,
$pageSize
,
'a.id desc'
,
$field
,
$where
);
//dump($data['data']['list']);exit;
$data
[
'data'
][
'total'
]
=
$m_commission
->
getCommissionBargainListTotal
(
$where
);
if
(
$select
)
{
...
...
application/index/controller/PerformanceInfo.php
View file @
d3a0394d
...
...
@@ -12,6 +12,7 @@ namespace app\index\controller;
use
app\index\extend\Basic
;
use
app\index\untils\ExportExcelUntil
;
use
app\model\OBargainModel
;
use
app\model\OPartialCommission
;
use
think\Session
;
class
PerformanceInfo
extends
Basic
...
...
@@ -44,43 +45,43 @@ class PerformanceInfo extends Basic
$where
[
'Houses.shop_type'
]
=
$this
->
params
[
'shop_type'
];
}
//
todo
成交类型
// 成交类型
if
(
$this
->
params
[
'trade_type'
]
!=
NULL
)
{
$where
[
'Obargain.trade_type'
]
=
$this
->
params
[
'trade_type'
];
}
//
todo
商铺地址
// 商铺地址
if
(
$this
->
params
[
'landmark'
]
!=
NULL
)
{
$where
[
'Houses.landmark'
]
=
[
'like'
,
'%'
.
$this
->
params
[
'landmark'
]
.
'%'
];
}
//
todo
商铺编号
// 商铺编号
if
(
$this
->
params
[
'house_id'
]
!=
NULL
)
{
$where
[
'Houses.id'
]
=
$this
->
params
[
'house_id'
];
}
//
todo
部门
// 部门
if
(
$this
->
params
[
'district_id'
]
!=
NULL
)
{
$where
[
'District.id'
]
=
$this
->
params
[
'district_id'
]
;
}
//
todo
门店
// 门店
if
(
$this
->
params
[
'store_id'
]
!=
NULL
)
{
$where
[
'Store.id'
]
=
$this
->
params
[
'store_id'
]
;
}
//
todo
经纪人ID
// 经纪人ID
if
(
$this
->
params
[
'agents_id'
]
!=
NULL
)
{
$where
[
'Agent.id'
]
=
$this
->
params
[
'agents_id'
];
}
//
todo
姓名
// 姓名
if
(
$this
->
params
[
'name'
]
!=
NULL
)
{
$where
[
'Agent.name'
]
=
[
'like'
,
'%'
.
$this
->
params
[
'name'
]
.
'%'
];
}
//
todo
手机号
// 手机号
if
(
$this
->
params
[
'phone'
]
!=
NULL
)
{
$where
[
'Agent.phone'
]
=
[
'like'
,
'%'
.
$this
->
params
[
'phone'
]
.
'%'
];
}
//
todo
成交报告id
// 成交报告id
if
(
$this
->
params
[
'bargain_id'
]
!=
NULL
)
{
$where
[
'Obargain.id'
]
=
$this
->
params
[
'bargain_id'
];
}
...
...
@@ -100,6 +101,14 @@ class PerformanceInfo extends Basic
$field
.=
'Houses.landmark,'
;
$field
.=
'Oorder.house_id'
;
$return
=
$this
->
oBargainModel
->
performancelInfo
(
$where
,
$field
,
$pageSize
,
$pageNo
);
/*o_partial_commission表查询实收数据 2018-10-10 10:35:42 朱伟*/
$m_commission
=
new
OPartialCommission
();
foreach
(
$return
as
$key
=>
$val
)
{
$return_
=
$m_commission
->
getPracticalFee
(
$val
[
"id"
]);
$return
[
$key
][
'practical_fee'
]
=
$return_
[
0
][
'practical_fee'
]
?
$return_
[
0
][
'practical_fee'
]
:
0
;
}
//end
$return_total
=
$this
->
oBargainModel
->
performancelInfoTotal
(
$where
,
$field
);
$field
=
'sum(Obargain.scale_fee) as scale_fee_sum'
;
$return_sum
=
$this
->
oBargainModel
->
performancelInfo
(
$where
,
$field
,
$pageSize
,
$pageNo
);
...
...
@@ -128,32 +137,32 @@ class PerformanceInfo extends Basic
$where
[
'Houses.shop_type'
]
=
$this
->
params
[
'shop_type'
];
}
//
todo
成交类型
// 成交类型
if
(
$this
->
params
[
'trade_type'
]
!=
NULL
)
{
$where
[
'Obargain.trade_type'
]
=
$this
->
params
[
'trade_type'
];
}
//
todo
商铺地址
// 商铺地址
if
(
$this
->
params
[
'landmark'
]
!=
NULL
)
{
$where
[
'Houses.landmark'
]
=
[
'like'
,
'%'
.
$this
->
params
[
'landmark'
]
.
'%'
];
}
//
todo
商铺编号
// 商铺编号
if
(
$this
->
params
[
'house_id'
]
!=
NULL
)
{
$where
[
'Houses.id'
]
=
$this
->
params
[
'house_id'
];
}
//
todo
部门
// 部门
if
(
$this
->
params
[
'district_id'
]
!=
NULL
)
{
$where
[
'District.id'
]
=
$this
->
params
[
'district_id'
]
;
}
//
todo
门店
// 门店
if
(
$this
->
params
[
'store_id'
]
!=
NULL
)
{
$where
[
'Store.id'
]
=
$this
->
params
[
'store_id'
]
;
}
//
todo
姓名
// 姓名
if
(
$this
->
params
[
'name'
]
!=
NULL
)
{
$where
[
'Agent.name'
]
=
[
'like'
,
'%'
.
$this
->
params
[
'name'
]
.
'%'
];
}
//
todo
手机号
// 手机号
if
(
$this
->
params
[
'phone'
]
!=
NULL
)
{
$where
[
'Agent.phone'
]
=
[
'like'
,
'%'
.
$this
->
params
[
'phone'
]
.
'%'
];
}
...
...
application/model/OPartialCommission.php
View file @
d3a0394d
...
...
@@ -471,4 +471,18 @@ class OPartialCommission extends BaseModel
->
where
(
$where
)
->
find
();
}
/**
* 查询实收数据
*/
public
function
getPracticalFee
(
$bargain_id
)
{
$params
[
'bargain_id'
]
=
$bargain_id
;
$field
=
'practical_fee'
;
$result
=
$this
->
field
(
$field
)
->
where
(
$params
)
->
select
();
//dump($this->getLastSql());
return
$result
;
}
}
\ 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