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
bc5f4a70
Commit
bc5f4a70
authored
May 16, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收款开业审核
parent
3174a59d
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
225 additions
and
5 deletions
+225
-5
Finance.php
application/index/controller/Finance.php
+95
-3
PayOpenService.php
application/index/service/PayOpenService.php
+26
-0
AAgents.php
application/model/AAgents.php
+1
-1
BaseModel.php
application/model/BaseModel.php
+12
-0
OPayOpen.php
application/model/OPayOpen.php
+62
-0
OPayOpenLog.php
application/model/OPayOpenLog.php
+23
-0
route.php
application/route.php
+6
-1
No files found.
application/index/controller/Finance.php
View file @
bc5f4a70
...
@@ -27,6 +27,8 @@ use app\model\ODaily;
...
@@ -27,6 +27,8 @@ use app\model\ODaily;
use
app\model\OImg
;
use
app\model\OImg
;
use
app\model\OMarchInModel
;
use
app\model\OMarchInModel
;
use
app\model\OPayLogAdjustment
;
use
app\model\OPayLogAdjustment
;
use
app\model\OPayOpen
;
use
app\model\OPayOpenLog
;
use
app\model\OrderModel
;
use
app\model\OrderModel
;
use
app\model\ORealIncome
;
use
app\model\ORealIncome
;
use
app\model\ORefundLogModel
;
use
app\model\ORefundLogModel
;
...
@@ -4957,13 +4959,103 @@ class Finance extends Basic
...
@@ -4957,13 +4959,103 @@ 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
* User HuJun
* User HuJun
* Date 19-5-16 下午
2:00
* Date 19-5-16 下午
3:51
*/
*/
public
function
payCheckList
()
{
public
function
payCheckList
()
{
if
(
!
$this
->
request
->
isAjax
())
{
if
(
!
$this
->
request
->
isAjax
()
&&
$this
->
params
[
'excel'
]
==
0
)
{
return
view
(
"finance/pay_check_list"
);
return
view
(
"finance/pay_check_list"
);
}
}
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
if
(
$this
->
params
[
'excel'
]
==
0
)
{
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
}
else
{
$pageSize
=
40000
;
}
$status_string
=
'全部'
;
//0财务一审
switch
(
$this
->
params
[
'check_status'
])
{
case
1
:
//财务一审
$where
[
'a.status'
]
=
2
;
$where
[
'b.status'
]
=
2
;
$status_string
=
'总监审核'
;
break
;
case
2
:
//财务二审
$where
[
'a.status'
]
=
3
;
$where
[
'b.status'
]
=
3
;
$status_string
=
'财务二审'
;
break
;
case
3
:
//未审核
$where
[
'a.status'
]
=
0
;
$status_string
=
'未审核'
;
break
;
case
4
:
//总监
$where
[
'a.status'
]
=
1
;
$where
[
'b.status'
]
=
1
;
break
;
}
$where
[
'a.is_del'
]
=
0
;
$fields
=
'a.id,a.create_time,a.agent_name,a.pay_log_id,a.bargain_id,a.order_id,a.house_id,a.house_address,a.status,b.create_time as disc_time,max(b.id) as two_id'
;
$m_pay_open
=
new
OPayOpen
();
$m_pay_open_log
=
new
OPayOpenLog
();
$list
=
$m_pay_open
->
getListCheck
(
$pageNo
,
$pageSize
,
'a.id desc'
,
$fields
,
$where
);
if
(
$this
->
params
[
'excel'
]
==
0
)
{
foreach
(
$list
as
$k
=>
$v
)
{
if
(
$v
[
'status'
]
==
3
)
{
$log_where
[
'open_id'
]
=
$v
[
'id'
];
$log_where
[
'is_del'
]
=
0
;
$list
[
$k
][
'check_time'
]
=
$m_pay_open_log
->
getFieldOneValue
(
'create_time'
,
$log_where
);
}
else
{
$list
[
$k
][
'check_time'
]
=
''
;
}
unset
(
$list
[
$k
][
'two_id'
]);
}
$data
[
'list'
]
=
$list
;
$data
[
'total'
]
=
$m_pay_open
->
getListCheckTotal
(
$where
);
return
$this
->
response
(
200
,
''
,
$data
);
}
$excel_data
=
[];
foreach
(
$list
as
$k
=>
$v
)
{
if
(
$v
[
'status'
]
==
3
)
{
$log_where
[
'open_id'
]
=
$v
[
'id'
];
$log_where
[
'is_del'
]
=
0
;
$check_time
=
$m_pay_open_log
->
getFieldOneValue
(
'create_time'
,
$log_where
);
}
else
{
$check_time
=
''
;
}
$excel_data
[
$k
]
=
[
'id'
=>
$v
[
'id'
],
'create_time'
=>
$v
[
'create_time'
],
'agent_name'
=>
$v
[
'agent_name'
],
'pay_log_id'
=>
$v
[
'pay_log_id'
],
'bargain_id'
=>
$v
[
'bargain_id'
],
'order_id'
=>
$v
[
'order_id'
],
'house_id'
=>
$v
[
'house_id'
],
'house_address'
=>
$v
[
'house_address'
],
'status_string'
=>
$status_string
,
'disc_time'
=>
$v
[
'disc_time'
],
'check_time'
=>
$check_time
];
}
$export
=
new
ExportExcelUntil
();
$title
=
[
'申请ID'
,
'提交时间'
,
'提交人'
,
'收款ID'
,
'成交报告ID'
,
'带看订单ID'
,
'成交商铺ID'
,
'成交商铺地址'
,
'状态'
,
'总监通过时间'
,
'开业确定时间'
];
$file_name
=
'收款开业审核-'
.
$status_string
;
$export
->
exportTable
(
$file_name
,
$excel_data
,
11
,
'开业审核-'
.
$status_string
,
$title
);
}
}
}
}
application/index/service/PayOpenService.php
0 → 100644
View file @
bc5f4a70
<?php
namespace
app\index\service
;
use
app\model\OPayOpen
;
use
app\model\OPayOpenLog
;
class
PayOpenService
{
private
$m_open
;
private
$m_open_log
;
public
function
__construct
()
{
$this
->
m_open
=
new
OPayOpen
();
$this
->
m_open_log
=
new
OPayOpenLog
();
}
public
function
getList
()
{
}
}
\ No newline at end of file
application/model/AAgents.php
View file @
bc5f4a70
...
@@ -1128,7 +1128,7 @@ class AAgents extends BaseModel
...
@@ -1128,7 +1128,7 @@ class AAgents extends BaseModel
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\DbException
*/
*/
public
function
getAgentClient
(
string
$field
=
'*'
,
array
$params
=
[])
public
function
getAgentClient
(
string
$field
,
array
$params
=
[])
{
{
return
$this
->
field
(
$field
)
->
alias
(
'a'
)
return
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'u_evaluate b'
,
'a.id = b.agents_id'
,
'left'
)
->
join
(
'u_evaluate b'
,
'a.id = b.agents_id'
,
'left'
)
...
...
application/model/BaseModel.php
View file @
bc5f4a70
...
@@ -79,4 +79,15 @@ class BaseModel extends Model
...
@@ -79,4 +79,15 @@ class BaseModel extends Model
->
select
();
->
select
();
}
}
/**
* @param $field
* @param $where
* @return mixed
* User HuJun
* Date 19-5-16 下午2:50
*/
public
function
getFieldOneValue
(
$field
,
$where
)
{
return
$this
->
where
(
$where
)
->
value
(
$field
);
}
}
}
\ No newline at end of file
application/model/OPayOpen.php
0 → 100644
View file @
bc5f4a70
<?php
namespace
app\model
;
use
think\Db
;
class
OPayOpen
extends
BaseModel
{
protected
$table
=
"o_paylog_open"
;
private
$db_
;
public
function
__construct
(
$data
=
[])
{
parent
::
__construct
(
$data
);
$this
->
db_
=
Db
::
name
(
$this
->
table
);
}
/**
* @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
* User HuJun
* Date 19-5-16 下午2:45
*/
public
function
getListCheck
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
return
$this
->
db_
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'o_paylog_open_log b'
,
'a.id=b.open_id'
,
'left'
)
->
where
(
$params
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
order
(
$order_
)
->
group
(
'a.id'
)
->
select
();
}
/**
* @param string $field
* @param $params
* @return int|string
* User HuJun
* Date 19-5-16 下午2:47]
*/
public
function
getListCheckTotal
(
$params
,
$field
=
'a.id'
)
{
return
$this
->
db_
->
alias
(
'a'
)
->
join
(
'o_paylog_open_log b'
,
'a.id=b.open_id'
,
'left'
)
->
where
(
$params
)
->
group
(
'a.id'
)
->
count
(
$field
);
}
}
\ No newline at end of file
application/model/OPayOpenLog.php
0 → 100644
View file @
bc5f4a70
<?php
namespace
app\model
;
use
think\Db
;
class
OPayOpenLog
extends
BaseModel
{
protected
$table
=
"o_paylog_open_log"
;
private
$db_
;
public
function
__construct
(
$data
=
[])
{
parent
::
__construct
(
$data
);
$this
->
db_
=
Db
::
name
(
$this
->
table
);
}
}
\ No newline at end of file
application/route.php
View file @
bc5f4a70
...
@@ -291,7 +291,12 @@ Route::group('index', [
...
@@ -291,7 +291,12 @@ Route::group('index', [
'refundDetail'
=>
[
'index/Finance/refundDetail'
,
[
'method'
=>
'GET'
]],
//退款详情
'refundDetail'
=>
[
'index/Finance/refundDetail'
,
[
'method'
=>
'GET'
]],
//退款详情
'delRefund'
=>
[
'index/Finance/delRefund'
,
[
'method'
=>
'POST'
]],
//删除退款
'delRefund'
=>
[
'index/Finance/delRefund'
,
[
'method'
=>
'POST'
]],
//删除退款
'recoveryBargain'
=>
[
'index/Finance/recoveryBargain'
,
[
'method'
=>
'POST'
]],
//撤销列表-恢复成交报告
'recoveryBargain'
=>
[
'index/Finance/recoveryBargain'
,
[
'method'
=>
'POST'
]],
//撤销列表-恢复成交报告
'payCheckList'
=>
[
'index/Finance/payCheckList'
,
[
'method'
=>
'GET'
]],
//收款开业审核
'payCheckList'
=>
[
'index/Finance/payCheckList'
,
[
'method'
=>
'GET'
]],
//收款开业审核-视图
'payCheckListOne/:check_status'
=>
[
'index/Finance/payCheckList'
,
[
'method'
=>
'GET'
],
[
'check_status'
=>
0
]],
//收款开业审核-财务一审
'payCheckListTwo/:check_status'
=>
[
'index/Finance/payCheckList'
,
[
'method'
=>
'GET'
],
[
'check_status'
=>
1
]],
//收款开业审核-财务二审
'payCheckListNo/:check_status'
=>
[
'index/Finance/payCheckList'
,
[
'method'
=>
'GET'
],
[
'check_status'
=>
2
]],
//收款开业审核-未审核
'payCheckListAll'
=>
[
'index/Finance/payCheckList'
,
[
'method'
=>
'GET'
]],
//收款开业审核-全部
'payCheckListDisc/:check_status'
=>
[
'index/Finance/payCheckList'
,
[
'method'
=>
'GET'
],
[
'check_status'
=>
4
]],
//收款开业审核-总监
'performanceInfo'
=>
[
'index/PerformanceInfo/performanceInfo'
,
[
'method'
=>
'post|get'
]],
//业绩明细
'performanceInfo'
=>
[
'index/PerformanceInfo/performanceInfo'
,
[
'method'
=>
'post|get'
]],
//业绩明细
'getPerformanceInfoExcel'
=>
[
'index/PerformanceInfo/getPerformanceInfoExcel'
,
[
'method'
=>
'post|get'
]],
//业绩明细
'getPerformanceInfoExcel'
=>
[
'index/PerformanceInfo/getPerformanceInfoExcel'
,
[
'method'
=>
'post|get'
]],
//业绩明细
...
...
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