Explorar o código

预订单暂不支持取消

shish %!s(int64=3) %!d(string=hai) anos
pai
achega
3ac77c4fc8
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      app-ghs/controllers/OrderController.php

+ 4 - 1
app-ghs/controllers/OrderController.php

@@ -996,7 +996,7 @@ class OrderController extends BaseController
         }
     }
 
-    //取消(供货商)订单 shizhongqi 20220619
+    //取消订单 shizhongqi 20220619
     public function actionCancelOrder()
     {
         $post = Yii::$app->request->post();
@@ -1012,6 +1012,9 @@ class OrderController extends BaseController
         if (isset($order->status) == false || $order->status != 1) {
             util::fail('不是待付款状态,无法取消');
         }
+        if (isset($order->book) && $order->book == 1) {
+            util::fail('预订单暂不支持取消');
+        }
         $purchaseId = $order->purchaseId ?? 0;
         $purchase = PurchaseClass::getById($purchaseId);
         if (empty($purchase)) {