YS换货提交

es
yangsai@163.com 6 months ago
parent 93551f4dfc
commit 51d1bb96ba
  1. 11
      app/api/controller/Refund.php
  2. 11
      app/store/controller/order/Refund.php

@ -12,7 +12,6 @@ declare (strict_types=1);
namespace app\api\controller;
use app\common\enum\order\refund\RefundType as RefundTypeEnum;
use think\response\Json;
use app\api\model\OrderRefund as OrderRefundModel;
@ -92,14 +91,8 @@ class Refund extends Controller
{
// 售后单详情
$model = OrderRefundModel::getDetail($orderRefundId, false);
if($model['type']==RefundTypeEnum::EXCHANGE){
if ($model->huanhuo($this->postForm())) {
return $this->renderSuccess([], '操作成功');
}
}else{
if ($model->delivery($this->postForm())) {
return $this->renderSuccess([], '操作成功');
}
if ($model->delivery($this->postForm())) {
return $this->renderSuccess([], '操作成功');
}
return $this->renderError($model->getError() ?: '提交失败');
}

@ -12,6 +12,7 @@ declare (strict_types=1);
namespace app\store\controller\order;
use app\common\enum\order\refund\RefundType as RefundTypeEnum;
use think\response\Json;
use app\store\controller\Controller;
use app\store\model\OrderRefund as OrderRefundModel;
@ -77,8 +78,14 @@ class Refund extends Controller
// 售后单详情
$model = OrderRefundModel::detail($orderRefundId);
// 确认收货并退款
if ($model->receipt($this->postForm())) {
return $this->renderSuccess('操作成功');
if($model['type']==RefundTypeEnum::EXCHANGE){
if ($model->huanhuo($this->postForm())) {
return $this->renderSuccess([], '操作成功');
}
}else{
if ($model->receipt($this->postForm())) {
return $this->renderSuccess('操作成功');
}
}
return $this->renderError($model->getError() ?: '操作失败');
}

Loading…
Cancel
Save