Просмотр исходного кода

请选择未来二天或更后时间

shish 3 лет назад
Родитель
Сommit
5a53876652
2 измененных файлов с 12 добавлено и 4 удалено
  1. 10 2
      app-hd/controllers/PurchaseController.php
  2. 2 2
      biz-ghs/order/classes/OrderClass.php

+ 10 - 2
app-hd/controllers/PurchaseController.php

@@ -93,12 +93,20 @@ class PurchaseController extends BaseController
             //判断product数据是不是同个供货商的
             $ghsShopInfo = ShopClass::getById($ghsShopId, true);
             $ghsMainId = $ghsShopInfo->mainId ?? 0;
-
             $isOpen = ShopClass::isOpen($ghsShopInfo);
-            if ($isOpen == 0 && $post['book'] == 0) {
+            if ($isOpen == 0 && $book == 0) {
                 util::fail('本店已休息,请选择其它门店');
             }
 
+            $book = $post['book'] ?? 0;
+            $sendTimeWant = isset($post['sendTimeWant']) && !empty($post['sendTimeWant']) ? $post['sendTimeWant'] : date("Y-m-d");
+            $future = date("Y-m-d", strtotime('+2 day'));
+            if ($book == 1) {
+                if (strtotime($sendTimeWant) < strtotime($future)) {
+                    util::fail('请选择未来二天或更后时间');
+                }
+            }
+
             ProductClass::valid($productList, $ghsMainId);
 
             //供货商预订单最低公斤数要求和每公斤服务费

+ 2 - 2
biz-ghs/order/classes/OrderClass.php

@@ -970,10 +970,10 @@ class OrderClass extends BaseClass
         if (isset($orderInfo['sendType'])) {
             $sendName = '出车';
             if ($orderInfo['sendType'] == 1) {
-                $sendName = '自取';
+                $sendName = '到店自取';
             }
             if ($orderInfo['sendType'] == 2) {
-                $sendName = '发快递';
+                $sendName = '请跑腿送';
             }
             $content .= '<BR><B>' . $sendName . '</B><BR>';
         }