|
|
@@ -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);
|
|
|
|
|
|
//供货商预订单最低公斤数要求和每公斤服务费
|