Commit 2f564133 authored by hujun's avatar hujun

驳回

parent 3e5c2b4f
...@@ -3577,8 +3577,8 @@ class Finance extends Basic ...@@ -3577,8 +3577,8 @@ class Finance extends Basic
if (!isset($params["agent_id"]) || !isset($params["agent_name"]) || !isset($params["report_id"]) || 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["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["refund_money"]) || !isset($params["bank"]) || !isset($params["card_no"])
|| !isset($params["remark_img"]) || !isset($params["receipt_number"]) || !isset($params["type"]) || !isset($params["receipt_number"]) || !isset($params["type"])
|| !isset($params["refund_cause"]) || !isset($params["refund_way"])) { || !isset($params["refund_cause"]) || !isset($params["refund_way"]) || empty($params["pay_log_id"])) {
return $this->response("101", "请求参数错误"); return $this->response("101", "请求参数错误");
} }
...@@ -3602,6 +3602,10 @@ class Finance extends Basic ...@@ -3602,6 +3602,10 @@ class Finance extends Basic
"refund_way" => 0, //退款方式:0银行卡 "refund_way" => 0, //退款方式:0银行卡
);*/ );*/
$refund_id = isset($params["refund_id"]) ? $params["refund_id"] : 0;
if($refund_id == 0 && !isset($params["remark_img"])){
return $this->response("101", "请上传图片");
}
$agent_id = $params["agent_id"]; $agent_id = $params["agent_id"];
$agent_name = $params["agent_name"]; $agent_name = $params["agent_name"];
$report_id = $params["report_id"]; $report_id = $params["report_id"];
...@@ -3619,14 +3623,15 @@ class Finance extends Basic ...@@ -3619,14 +3623,15 @@ class Finance extends Basic
$refund_way = $params["refund_way"]; $refund_way = $params["refund_way"];
$remark = isset($params["remark"]) ? $params["remark"] : ""; $remark = isset($params["remark"]) ? $params["remark"] : "";
$remark_img = isset($params["remark_img"]) ? $params["remark_img"] : ""; $remark_img = isset($params["remark_img"]) ? $params["remark_img"] : "";
$del_img =isset($params["del_img"]) ? $params["del_img"] : "";
//todo 判断此单是否有付款 //todo 判断此单是否有付款
$service = new PayLogService(); $service = new PayLogService();
$is_ok = $service->addRefund($agent_id,$agent_name,$report_id,$order_id,$order_no,$refund_money,$name, $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); $phone, $bank, $card_no, $receipt_number, $type, $refund_cause, $pay_log_id, $refund_way, $remark, $remark_img
,$refund_id,$del_img);
if ($is_ok > 0) { if ($is_ok > 0) {
return $this->response("200", "request success", []); return $this->response("200", "request success", []);
}elseif($is_ok == -2){ } elseif ($is_ok == -2) {
return $this->response("101", "退款金不能大于剩余的支付金额"); return $this->response("101", "退款金不能大于剩余的支付金额");
} }
return $this->response("101", "request faild"); return $this->response("101", "request faild");
...@@ -3685,13 +3690,11 @@ class Finance extends Basic ...@@ -3685,13 +3690,11 @@ class Finance extends Basic
$save_data['operation_id'] = $this->userId; $save_data['operation_id'] = $this->userId;
$save_data['operation_name'] = $this->userName; $save_data['operation_name'] = $this->userName;
$save_data['order_id'] = $refund_data[0]['order_id']; $save_data['order_id'] = $refund_data[0]['order_id'];
$log_where['is_del'] = 0;
$num = 0; $num = 0;
switch ($this->params['status']) { switch ($this->params['status']) {
case 1 : case 1 :
$log_where['refund_id'] = $this->params['refund_id'];
$log_where['status'] = 1; $log_where['status'] = 1;
$log_where['is_del'] = 0;
$check_num = $m_refund_log->getTotal($log_where); $check_num = $m_refund_log->getTotal($log_where);
if ($check_num < 3) { if ($check_num < 3) {
...@@ -3709,8 +3712,10 @@ class Finance extends Basic ...@@ -3709,8 +3712,10 @@ class Finance extends Basic
$m_img = new OImg(); $m_img = new OImg();
$m_img->addImgAll($id, 4, $this->params['img_arr']); $m_img->addImgAll($id, 4, $this->params['img_arr']);
} }
break; break;
case 4 :
$save_data['status'] = 4;
$num = $m_refund_log->insertData($save_data);
} }
if ($num) { if ($num) {
......
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