shish hai 1 ano
pai
achega
844e653bd7
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      app-ghs/controllers/ExpressController.php

+ 10 - 0
app-ghs/controllers/ExpressController.php

@@ -46,6 +46,15 @@ class ExpressController extends BaseController
         if ($order->mainId != $this->mainId) {
             util::fail('不是你的订单');
         }
+
+        if ($order->status == 2) {
+            if ($order->fhWlStatus == 1) {
+                util::fail('已发货');
+            }
+        } else {
+            util::fail('无需发货');
+        }
+
         $orderSn = $order->orderSn ?? '';
         $customId = $order->customId ?? 0;
         $custom = CustomClass::getById($customId, true);
@@ -140,6 +149,7 @@ class ExpressController extends BaseController
             'staffName' => $staffName,
         ];
         ExpressClass::addWayBill($params, $order);
+        util::complete('操作成功');
     }
 
 }