Commit 5f82a2e9 authored by hujun's avatar hujun

退款审核-驳回

parent ea51f172
...@@ -13,6 +13,7 @@ use app\api_broker\service\OrderLogService; ...@@ -13,6 +13,7 @@ use app\api_broker\service\OrderLogService;
use app\index\extend\Basic; use app\index\extend\Basic;
use app\model\AAgents; use app\model\AAgents;
use app\model\OBargainModel; use app\model\OBargainModel;
use app\model\OFinancialAudit;
use app\model\OPayLogModel; use app\model\OPayLogModel;
class Finance extends Basic class Finance extends Basic
...@@ -125,46 +126,6 @@ class Finance extends Basic ...@@ -125,46 +126,6 @@ class Finance extends Basic
return $this->response($data['code'], $data['msg'], $data['data']); return $this->response($data['code'], $data['msg'], $data['data']);
} }
/**
* 退款审核
*
* @return \think\response\View
*/
public function refundList() {
if ($this->request->isAjax()) {
if ($this->request->get()) {
} else {
}
} else {
$result = view('finance/refund');
}
return $result;
}
/**
* 账户列表
*
* @return \think\response\View
*/
public function accountList() {
if ($this->request->isAjax()) {
if ($this->request->get()) {
} else {
}
} else {
$result = view('finance/account');
}
return $result;
}
/** /**
* 通过id获取成交报告详情 * 通过id获取成交报告详情
* *
...@@ -372,4 +333,45 @@ class Finance extends Basic ...@@ -372,4 +333,45 @@ class Finance extends Basic
$data = $service_->selectListByOrderNo($params["order_id"]); $data = $service_->selectListByOrderNo($params["order_id"]);
return $this->response("200", "request success", $data); return $this->response("200", "request success", $data);
} }
/**
* 退款驳回
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\PDOException
*/
public function overRule() {
if (empty($this->params['id'])) {
return $this->response("101", "请求参数错误");
}
$bargain = new OBargainModel();
$is = $bargain->ifBargainNumByOrderId(['id' => $this->params['id']]);
if ($is < 1) {
return $this->response("101", "没有成交报告信息");
}
$bargain->updateBargainById($this->params['id'], ['status'=>12]);
$params['audit_id'] = $this->userId;
$params['audit_name'] = $this->userName;
$params['audit_id'] = $this->userId;
$params['audit_level'] = $this->params['check_status'];
$params['remark'] = $this->params['remark'];
$status = $bargain->addCheckBargain($this->params['id'], $params, 2, 2);
if ($status) {
$data['code'] = 200;
$data['msg'] = '驳回成功';
} else {
$data['code'] = 101;
$data['msg'] = '驳回失败';
}
return $this->response($data['code'], $data['msg']);
}
} }
\ No newline at end of file
{layout name="global/frame_tpl" /}
账户列表
\ No newline at end of file
...@@ -46,4 +46,25 @@ class OFinancialAudit extends BaseModel ...@@ -46,4 +46,25 @@ class OFinancialAudit extends BaseModel
'status' => 1 'status' => 1
])->order('id desc')->find(); ])->order('id desc')->find();
} }
/**
* 修改信息
*
* @param $id
* @param $params
* @return int
*/
public function updateBargainById($id, $params)
{
$params["update_time"] = date("Y-m-d H:i:s", time());
Db::startTrans();
try {
$this->db_->where('id', $id)->update($params);
Db::commit();
return 1;
} catch (\Exception $e) {
Db::rollback();
return 0;
}
}
} }
\ No newline at end of file
...@@ -198,6 +198,10 @@ Route::group('index', [ ...@@ -198,6 +198,10 @@ Route::group('index', [
'checkReportManager/:check_status' => ['index/Finance/checkReport', [ 'method' => 'post' ], ['check_status'=>1]], //审核成交报告-经理审核 'checkReportManager/:check_status' => ['index/Finance/checkReport', [ 'method' => 'post' ], ['check_status'=>1]], //审核成交报告-经理审核
'checkReportMajordomo/:check_status' => ['index/Finance/checkReport', [ 'method' => 'post' ], ['check_status'=>2]], //审核成交报告-总监审核 'checkReportMajordomo/:check_status' => ['index/Finance/checkReport', [ 'method' => 'post' ], ['check_status'=>2]], //审核成交报告-总监审核
'checkReportCashier/:check_status' => ['index/Finance/checkReport', [ 'method' => 'post' ], ['check_status'=>3]], //审核成交报告-出纳审核 'checkReportCashier/:check_status' => ['index/Finance/checkReport', [ 'method' => 'post' ], ['check_status'=>3]], //审核成交报告-出纳审核
'overRuleAttache/:check_status' => ['index/Finance/overRule', [ 'method' => 'post' ], ['check_status'=>0]], //退款审核-驳回-专员审核
'overRuleManager/:check_status' => ['index/Finance/overRule', [ 'method' => 'post' ], ['check_status'=>1]], //退款审核-驳回-经理审核
'overRuleMajordomo/:check_status' => ['index/Finance/overRule', [ 'method' => 'post' ], ['check_status'=>2]], //退款审核-驳回-总监审核
'overRuleCashier/:check_status' => ['index/Finance/overRule', [ 'method' => 'post' ], ['check_status'=>3]], //退款审核-驳回-总监审核
'bargainInfo' => ['index/Finance/bargainInfo', [ 'method' => 'get' ] ], //获取成交报告详情 'bargainInfo' => ['index/Finance/bargainInfo', [ 'method' => 'get' ] ], //获取成交报告详情
'editBargainInfo' => ['index/Finance/editBargainInfo', [ 'method' => 'post' ] ], //修改成交报告佣金 'editBargainInfo' => ['index/Finance/editBargainInfo', [ 'method' => 'post' ] ], //修改成交报告佣金
'addBargain' => ['index/Finance/addBargain', [ 'method' => 'post' ] ], //新增成交报告佣金(分佣提成) 'addBargain' => ['index/Finance/addBargain', [ 'method' => 'post' ] ], //新增成交报告佣金(分佣提成)
......
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