wugg 8 months ago
parent
commit
cc266871fe
1 changed files with 4 additions and 1 deletions
  1. 4 1
      app/admin/controller/Payment.php

+ 4 - 1
app/admin/controller/Payment.php

@@ -2028,7 +2028,7 @@ class Payment extends Base
 	    if($payinfo==false){
 		    return error_show(1004,"对账单数据未找到");
 	    }
-	    if ($this->level == 2) {
+	    if ($this->level == 2 && $payinfo['is_comon']==0) {
 		    //判断是否开通供应商账号
 		    $temp = check_has_account_by_supplierNos([$payinfo['supplierNo']]);
 		    if (isset($temp['data'][$payinfo['supplierNo']])) return error_show(1004, '该供应商已经开通账号,不允许当前账号操作');
@@ -2143,6 +2143,9 @@ class Payment extends Base
 		$up =Db::name("pay_return")->where($returninfo)->update($update);
 		if($up==false)throw new Exception("退款申请审核失败");
 		Db::commit();
+		if($param['status']==2 && $pay['is_comon']==1){
+            event('comonOrder', ['payNo' => $payinfo['payNo'], 'pay_fee' => $payment['pay_fee'], 'type' => 'repay']);
+        }
 		return app_show(0,"退款申请审核成功");
 		}catch (\Exception $e){
 			Db::rollback();