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
e9d5cb4f
Commit
e9d5cb4f
authored
May 04, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
已退款
parent
141fcd4b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
104 additions
and
6 deletions
+104
-6
Finance.php
application/index/controller/Finance.php
+42
-4
refund_order_list.html
application/index/view/finance/refund_order_list.html
+3
-0
ORefundModel.php
application/model/ORefundModel.php
+54
-0
route.php
application/route.php
+5
-2
No files found.
application/index/controller/Finance.php
View file @
e9d5cb4f
...
...
@@ -144,7 +144,8 @@ class Finance extends Basic
$data
[
'data'
]
=
[];
$bargain
=
new
OBargainModel
();
if
(
empty
(
$this
->
params
[
'id'
])
||
empty
(
$this
->
params
[
'source'
])
||
$this
->
params
[
'status'
])
{
if
(
empty
(
$this
->
params
[
'id'
])
||
empty
(
$this
->
params
[
'source'
])
||
empty
(
$this
->
params
[
'status'
]))
{
$data
[
'code'
]
=
101
;
$data
[
'msg'
]
=
'Id is null'
;
}
else
{
...
...
@@ -412,9 +413,12 @@ 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
refundList
()
{
...
...
@@ -422,8 +426,41 @@ class Finance extends Basic
return
view
(
'refundList'
);
}
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
$refund
=
new
ORefundModel
();
$field
=
''
;
$where
=
[];
$data
[
'data'
][
'list'
]
=
$refund
->
selectRefundByOrderNoPage
(
$pageNo
,
$pageSize
,
'id desc'
,
$field
,
$where
);
$data
[
'data'
][
'total'
]
=
$refund
->
selectRefundByOrderNoPageTotal
(
$where
);
return
$this
->
response
(
"200"
,
"request success"
,
$data
);
}
/**
* 已退款列表
*
* @return \think\Response|\think\response\View
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
refundOrderList
()
{
if
(
!
$this
->
request
->
isAjax
())
{
return
view
(
'refund_order_list'
);
}
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
$refund
=
new
ORefundModel
();
$field
=
'a.id,a.agent_name,a.name,a.bank,a.card_no,a.create_time,a.refund_money,b.report_agent_name'
;
$where
=
[];
$refund
->
selectRefundByOrderNo
();
$data
[
'data'
][
'list'
]
=
$refund
->
selectRefundByOrderNoPage
(
$pageNo
,
$pageSize
,
'id desc'
,
$field
,
$where
);
$data
[
'data'
][
'total'
]
=
$refund
->
selectRefundByOrderNoPageTotal
(
$where
);
return
$this
->
response
(
"200"
,
"request success"
,
$data
);
}
}
\ No newline at end of file
application/index/view/finance/refund_order_list.html
0 → 100644
View file @
e9d5cb4f
{layout name="global/frame_tpl" /}
已退款列表
\ No newline at end of file
application/model/ORefundModel.php
View file @
e9d5cb4f
...
...
@@ -109,6 +109,60 @@ class ORefundModel extends Model{
->
select
();
}
/**
* 查询退款记录带分页
*
* @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
selectRefundByOrderNoPage
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
$where_
=
[];
if
(
isset
(
$params
[
"report_id"
]))
{
$where_
[
"report_id"
]
=
$params
[
"report_id"
];
}
if
(
isset
(
$params
[
"order_no"
]))
{
$where_
[
"order_no"
]
=
$params
[
"order_no"
];
}
if
(
isset
(
$params
[
"order_id"
]))
{
$where_
[
"order_id"
]
=
$params
[
"order_id"
];
}
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"agent_id"
]
=
$params
[
"agent_id"
];
}
return
$this
->
db_
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'o_report b'
,
'a.report_id = b.id'
,
'left'
)
->
where
(
$params
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
order
(
$order_
)
->
select
();
}
/**
* 查询退款记录带分页总数
*
* @param $params
* @return int|string
*/
public
function
selectRefundByOrderNoPageTotal
(
$params
)
{
return
$this
->
db_
->
alias
(
'a'
)
->
join
(
'o_report b'
,
'a.report_id = b.id'
,
'left'
)
->
where
(
$params
)
->
count
();
}
public
function
getRefundByOrderId
(
$field
,
$params
){
$where_
=
[];
if
(
isset
(
$params
[
"order_id"
])){
...
...
application/route.php
View file @
e9d5cb4f
...
...
@@ -191,8 +191,11 @@ Route::group('index', [
'reportListStatement/:check_status'
=>
[
'index/Finance/reportList'
,
[
'method'
=>
'get'
]
,[
'check_status'
=>
4
]],
//财务 成交报告-已结单
'reportListBackout/:check_status'
=>
[
'index/Finance/reportList'
,
[
'method'
=>
'get'
]
,[
'check_status'
=>
5
]],
//财务 成交报告-待撤销
'reportListUndone/:check_status'
=>
[
'index/Finance/reportList'
,
[
'method'
=>
'get'
]
,[
'check_status'
=>
6
]],
//财务 成交报告-已撤销
'refundList/:status'
=>
[
'index/Finance/refundList'
,
[
'method'
=>
'get|post'
],
[
'status'
=>
1
]
],
//财务 退款
'refundedList/:status'
=>
[
'index/Finance/refundList'
,
[
'method'
=>
'get|post'
],
[
'status'
=>
2
]
],
//财务 已退款
'refundListAttache/:status'
=>
[
'index/Finance/refundList'
,
[
'method'
=>
'get|post'
],
[
'status'
=>
0
]
],
//退款列表-专员审核
'refundListManager/:status'
=>
[
'index/Finance/refundList'
,
[
'method'
=>
'get|post'
],
[
'status'
=>
1
]
],
//退款列表-财务经理
'refundListMajordomo/:status'
=>
[
'index/Finance/refundList'
,
[
'method'
=>
'get|post'
],
[
'status'
=>
2
]
],
//财务 退款
'refundListCashier/:status'
=>
[
'index/Finance/refundList'
,
[
'method'
=>
'get|post'
],
[
'status'
=>
3
]
],
//财务 退款
'refundOrderList'
=>
[
'index/Finance/refundOrderList'
,
[
'method'
=>
'get'
]],
//财务 已退款
'checkReportAttache/:check_status'
=>
[
'index/Finance/checkReport'
,
[
'method'
=>
'post'
],
[
'check_status'
=>
0
]],
//审核成交报告-专员审核
'checkReportManager/:check_status'
=>
[
'index/Finance/checkReport'
,
[
'method'
=>
'post'
],
[
'check_status'
=>
1
]],
//审核成交报告-经理审核
'checkReportMajordomo/:check_status'
=>
[
'index/Finance/checkReport'
,
[
'method'
=>
'post'
],
[
'check_status'
=>
2
]],
//审核成交报告-总监审核
...
...
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