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
ad1d4b97
Commit
ad1d4b97
authored
Dec 25, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退款
parent
76628f4e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
0 deletions
+68
-0
Finance.php
application/index/controller/Finance.php
+67
-0
route.php
application/route.php
+1
-0
No files found.
application/index/controller/Finance.php
View file @
ad1d4b97
...
...
@@ -3488,4 +3488,71 @@ class Finance extends Basic
return
$this
->
response
(
$code
,
$msg
);
}
/**
* 退款
*
* @return \think\Response
* @throws \think\Exception
*/
public
function
refundPayLog
()
{
$params
=
$this
->
params
;
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"agent_name"
])
||
!
isset
(
$params
[
"report_id"
])
||
!
isset
(
$params
[
"order_id"
])
||
!
isset
(
$params
[
"order_no"
])
||
!
isset
(
$params
[
"name"
])
||
!
isset
(
$params
[
"phone"
])
||
!
isset
(
$params
[
"refund_money"
])
||
!
isset
(
$params
[
"bank"
])
||
!
isset
(
$params
[
"card_no"
])
||
!
isset
(
$params
[
"remark_img"
])
||
!
isset
(
$params
[
"receipt_number"
])
||
!
isset
(
$params
[
"type"
])
||
!
isset
(
$params
[
"refund_cause"
])
||
!
isset
(
$params
[
"refund_way"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
/* $params = array(
"agent_id" => 1,//退款经纪人id
"agent_name" => 1,//退款经纪人id
"report_id" => 1,//报备id
"order_id" => 1, //关联order表id
"order_no" => "12312312312312", //订单no
"refund_money" => 1200, //退款金额
"name" => "qweqwe", //收款人姓名
"phone" => "123123123", //收款人电话
"bank" => "asdasdasd", //收款人银行
"card_no" => "123123123123", //银行卡号
"remark" => "没什么备注", //其他说明
"remark_img" => "12312312312",
"receipt_number" => "12312312312",
"type" => "12312312312", //退款类型:0退意向金1意向金转定2退保管金3保管金转定4退中介费5退案场费
"refund_cause" => "12312312312", //退款原因
"pay_log_id" => 1, //支付id
"refund_way" => 0, //退款方式:0银行卡
);*/
$agent_id
=
$params
[
"agent_id"
];
$agent_name
=
$params
[
"agent_name"
];
$report_id
=
$params
[
"report_id"
];
$order_id
=
$params
[
"order_id"
];
$order_no
=
$params
[
"order_no"
];
$refund_money
=
$params
[
"refund_money"
];
$name
=
$params
[
"name"
];
$phone
=
$params
[
"phone"
];
$bank
=
$params
[
"bank"
];
$card_no
=
$params
[
"card_no"
];
$receipt_number
=
$params
[
"receipt_number"
];
$type
=
$params
[
"type"
];
$refund_cause
=
$params
[
"refund_cause"
];
$pay_log_id
=
$params
[
"pay_log_id"
];
$refund_way
=
$params
[
"refund_way"
];
$remark
=
isset
(
$params
[
"remark"
])
?
$params
[
"remark"
]
:
""
;
$remark_img
=
isset
(
$params
[
"remark_img"
])
?
$params
[
"remark_img"
]
:
""
;
//todo 判断此单是否有付款
$service
=
new
PayLogService
();
$is_ok
=
$service
->
addRefund
(
$agent_id
,
$agent_name
,
$report_id
,
$order_id
,
$order_no
,
$refund_money
,
$name
,
$phone
,
$bank
,
$card_no
,
$receipt_number
,
$type
,
$refund_cause
,
$pay_log_id
,
$refund_way
,
$remark
,
$remark_img
);
if
(
$is_ok
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,
[]);
}
elseif
(
$is_ok
==
-
2
){
return
$this
->
response
(
"101"
,
"退款金不能大于剩余的支付金额"
);
}
return
$this
->
response
(
"101"
,
"request faild"
);
}
}
application/route.php
View file @
ad1d4b97
...
...
@@ -279,6 +279,7 @@ Route::group('index', [
'getAdjustmentDetail'
=>
[
'index/Finance/getAdjustmentDetail'
,
[
'method'
=>
'get'
]],
//调整详情
'getPayLogTotalPrice'
=>
[
'index/Finance/getPayLogTotalPrice'
,
[
'method'
=>
'get'
]],
//佣金统计
'delPayLog'
=>
[
'index/Finance/delPayLog'
,
[
'method'
=>
'POST'
]],
//删除收款
'refundPayLog'
=>
[
'index/Finance/refundPayLog'
,
[
'method'
=>
'POST'
]],
//退款
'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