Commit 22c88023 authored by hujun's avatar hujun

删除退款

parent 9c833f2a
......@@ -4650,7 +4650,7 @@ class Finance extends Basic
if ($data['pay_log_id']) {
$pay_field = 'a.income_time,c.internal_address as address,a.create_time,a.order_id,b.house_id';
$pay_data = $m_pay_log->getOrderHouse($pay_filed, ['a.id'=>$data['pay_log_id']]);
$pay_data = $m_pay_log->getOrderHouse($pay_field, ['a.id'=>$data['pay_log_id']]);
$data['address'] = $pay_data[0]['address'] ? $pay_data[0]['address'] : '';
$data['income_time'] = $pay_data[0]['income_time'];
$data['pay_create_time'] = $pay_data[0]['create_time'];
......@@ -4670,6 +4670,40 @@ class Finance extends Basic
return $this->response($code, $msg, $data);
}
/**
* 删除退款
*
* @return \think\Response
*/
public function delRefund() {
$code = 101;
if (empty($this->params['refund_id'])) {
return $this->response($code, '参数错误');
}
try {
$where['id'] = $this->params['id'];
$where['status'] = ['<>', 2];
$m_refund = new ORefundModel();
$data = $m_refund->getFind('id', $where);
if (empty($data['id'])) {
return $this->response($code, '退款信息错误');
}
$num = $m_refund->updateData(['is_del'=>1], ['id'=>$this->params['id']]);
$msg = '删除失败';
if ($num) {
$code = 200;
$msg = '';
}
} catch (\Exception $e) {
$msg = '内部错误:'.$e->getMessage();
}
return $this->response($code, $msg, []);
}
/**
* 撤销列表-恢复成交报告
*
......
......@@ -286,6 +286,7 @@ Route::group('index', [
'refundPayLog' => ['index/Finance/refundPayLog', ['method' => 'POST']],//退款
'checkRefund' => ['index/Finance/checkRefund', ['method' => 'POST']],//退款审核
'refundDetail' => ['index/Finance/refundDetail', ['method' => 'GET']],//退款详情
'delRefund' => ['index/Finance/delRefund', ['method' => 'GET']],//删除退款
'recoveryBargain' => ['index/Finance/recoveryBargain', ['method' => 'POST']],//撤销列表-恢复成交报告
'performanceInfo' => ['index/PerformanceInfo/performanceInfo', ['method' => 'post|get']],//业绩明细
'getPerformanceInfoExcel' => ['index/PerformanceInfo/getPerformanceInfoExcel', ['method' => 'post|get']],//业绩明细
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment