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
940a20f1
Commit
940a20f1
authored
Dec 25, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退款详情
parent
1511a9f4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
0 deletions
+86
-0
Finance.php
application/index/controller/Finance.php
+59
-0
ORefundLogModel.php
application/model/ORefundLogModel.php
+26
-0
route.php
application/route.php
+1
-0
No files found.
application/index/controller/Finance.php
View file @
940a20f1
...
...
@@ -3593,6 +3593,15 @@ class Finance extends Basic
if
((
$refund_data
[
0
][
'status'
]
==
4
)
&&
(
$this
->
params
[
'status'
]
==
4
))
{
return
$this
->
response
(
$code
,
'该退款已驳回'
);
}
if
((
$refund_data
[
0
][
'status'
]
==
3
)
&&
(
$this
->
params
[
'status'
]
==
3
))
{
return
$this
->
response
(
$code
,
'该退款已审核'
);
}
if
((
$refund_data
[
0
][
'status'
]
==
2
)
&&
(
$this
->
params
[
'status'
]
==
2
))
{
return
$this
->
response
(
$code
,
'已退款'
);
}
$m_refund_log
=
new
ORefundLogModel
();
$save_data
[
'refund_id'
]
=
$this
->
params
[
'refund_id'
];
...
...
@@ -3632,4 +3641,54 @@ class Finance extends Basic
return
$this
->
response
(
$code
,
$msg
);
}
/**
* 退款详情
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
refundDetail
()
{
if
(
empty
(
$this
->
params
[
'refund_id'
]))
{
return
$this
->
response
(
101
,
'参数错误'
);
}
$code
=
200
;
$msg
=
''
;
$m_refund
=
new
ORefundModel
();
$m_refund_log
=
new
ORefundLogModel
();
$m_pay_log
=
new
OPayLogModel
();
$field
=
'id,refund_money,receipt_number,type,refund_cause,refund_way,card_no,bank,name,phone,agent_id,status,pay_log_id'
;
$refund_data
=
$m_refund
->
selectRefundByOrderNo
(
$field
,
[
'id'
=>
$this
->
params
[
'id'
],
'is_del'
=>
0
]);
if
(
empty
(
$refund_data
[
0
]))
{
return
$this
->
response
(
101
,
'退款信息错误'
);
}
$data
=
$refund_data
[
0
];
if
(
$data
[
'agent_id'
])
{
$m_store
=
new
AAgents
();
$store_name
=
$m_store
->
getAgentsStoreById
([
'a.id'
=>
$data
[
'agent_id'
]],
'a.name,b.store_name'
);
$data
[
'store_name'
]
=
$store_name
[
'store_name'
];
$data
[
'agent_name'
]
=
$store_name
[
'name'
];
}
else
{
$data
[
'store_name'
]
=
''
;
$data
[
'agent_name'
]
=
''
;
}
if
(
$data
[
'pay_log_id'
])
{
$pay_data
=
$m_pay_log
->
getOrderHouse
(
'a.income_time,c.internal_address as address'
,
[
'a.id'
=>
$data
[
'pay_log_id'
]]);
$data
[
'address'
]
=
$pay_data
[
0
][
'address'
];
$data
[
'income_time'
]
=
$pay_data
[
0
][
'income_time'
];
}
else
{
$data
[
'address'
]
=
''
;
$data
[
'income_time'
]
=
''
;
}
$data
[
'log'
]
=
$m_refund_log
->
getListAll
(
'operation_name,create_time,status'
,
[
'refund_id'
=>
$this
->
params
[
'refund_id'
],
'is_del'
=>
0
]);
return
$this
->
response
(
$code
,
$msg
,
$data
);
}
}
application/model/ORefundLogModel.php
View file @
940a20f1
...
...
@@ -22,11 +22,36 @@ class ORefundLogModel extends BaseModel
$this
->
db_
=
Db
::
name
(
$this
->
table
);
}
/**
* @param $data
* @return int|string
*/
public
function
insertData
(
$data
)
{
return
$this
->
db_
->
insert
(
$data
);
}
/**
* @param $data
* @param $where
* @return int|string
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
public
function
updateData
(
$data
,
$where
)
{
return
$this
->
db_
->
where
(
$where
)
->
update
(
$data
);
}
/**
* @param $field
* @param $where
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getListAll
(
$field
,
$where
)
{
return
$this
->
field
(
$field
)
->
where
(
$where
)
->
select
();
}
}
\ No newline at end of file
application/route.php
View file @
940a20f1
...
...
@@ -281,6 +281,7 @@ Route::group('index', [
'delPayLog'
=>
[
'index/Finance/delPayLog'
,
[
'method'
=>
'POST'
]],
//删除收款
'refundPayLog'
=>
[
'index/Finance/refundPayLog'
,
[
'method'
=>
'POST'
]],
//退款
'checkRefund'
=>
[
'index/Finance/checkRefund'
,
[
'method'
=>
'POST'
]],
//退款审核
'refundDetail'
=>
[
'index/Finance/refundDetail'
,
[
'method'
=>
'GET'
]],
//退款详情
'performanceInfo'
=>
[
'index/PerformanceInfo/performanceInfo'
,
[
'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