|
|
@@ -407,8 +407,17 @@ class IntraCityController extends BaseController
|
|
|
}
|
|
|
$actPrice = $order['actPrice'] ?? 0;
|
|
|
if ($actPrice <= 0) {
|
|
|
- util::fail('订单没有价格,不需要发跑腿');
|
|
|
+ util::fail('订单没有价格,不能发跑腿');
|
|
|
}
|
|
|
+ if ($order['status'] != 2) {
|
|
|
+ util::fail('待发货订单才能发跑腿,请刷新页面');
|
|
|
+ }
|
|
|
+ // 不能创建配送的几种配送状态
|
|
|
+ $notCanCreateSendStatus = [-1, 3];
|
|
|
+ if (!in_array($order['sendStatus'], $notCanCreateSendStatus)) {
|
|
|
+ util::fail('不能叫跑腿,请刷新页面');
|
|
|
+ }
|
|
|
+
|
|
|
$sn = $order['orderSn'];
|
|
|
$itemInfo = OrderItemClass::getByCondition(['orderSn' => $sn], null, 'id, name, cover, num');
|
|
|
$num = intval($order['itemNum']);
|