wupengfei vor 2 Jahren
Ursprung
Commit
831a256784

+ 4 - 3
application/common/service/PurchaseLogic.php

@@ -178,8 +178,9 @@ class PurchaseLogic
     }
 
     // 供货订单退款申请审核
-    public static function auditSupplierRefund($order_id,$sh_status,$remark)
+    public static function auditSupplierRefund($refund_id,$sh_status,$remark)
     {
+        $order_id = SupplierOrderRefund::where('id',$refund_id)->value('order_id');
         $order_info = SupplierOrder::with('orderItem')->where('id',$order_id)->find()->toArray();
         if(in_array($order_info['refund_status'],[2])) return ['code'=>201,'msg'=>'订单已退款,请勿重新审核'];
         Db::startTrans();
@@ -314,9 +315,9 @@ class PurchaseLogic
     }
 
    // 线下订单退款申请审核
-    public static function auditOfflineRefund($order_id,$sh_status,$remark)
+    public static function auditOfflineRefund($refund_id,$sh_status,$remark)
     {
-        var_dump($order_id);
+        $order_id = OfflineOrderRefund::where('id',$refund_id)->value('order_id');
         $order_info = OfflineOrder::with('orderItem')->where('id',$order_id)->find()->toArray();
         if(in_array($order_info['refund_status'],[2])) return ['code'=>201,'msg'=>'订单已退款,请勿重新审核'];
         Db::startTrans();

+ 1 - 1
application/purchase/controller/OfflineOrderRefund.php

@@ -109,7 +109,7 @@ class OfflineOrderRefund extends PurBase
         if($this->request->isPost()) {
             // 审核人id
             if($this->request->action() == 'audit') {
-                $order_sh = \app\common\model\OfflineOrder::where('id',$data['id'])->value('sh_status');
+                $order_sh = \app\common\model\OfflineOrderRefund::where('id',$data['id'])->value('sh_status');
                 if($order_sh == 1) $this->error('已审核通过,不能修改');
                 $data['audit_user'] = $this->admin_user['id'];
             }

+ 1 - 1
application/purchase/controller/SupplierOrder.php

@@ -211,7 +211,7 @@ class SupplierOrder extends PurBase
     // 退款申请
     protected function _refund_form_result($id){
          $res =  PurchaseLogic::supplierOrderApplyRefund($id,$this->request->post('reason'));
-        $res['code'] == 200 ? $this->success($res['msg']):$this->error($res['msg']);
+         $res['code'] == 200 ? $this->success($res['msg']):$this->error($res['msg']);
     }
 
     protected function _form_result($id)