|
@@ -84,6 +84,8 @@ class DeliveryAppointmentController extends Controller
|
|
|
$total = $capacity*DeliveryAppointment::HOUR[$key];//仓库该时段产能总量
|
|
$total = $capacity*DeliveryAppointment::HOUR[$key];//仓库该时段产能总量
|
|
|
$used = $map[$date."-".$key] ?? 0; //已使用产能
|
|
$used = $map[$date."-".$key] ?? 0; //已使用产能
|
|
|
$available = $total-$used; //可用产能
|
|
$available = $total-$used; //可用产能
|
|
|
|
|
+ $period = explode("-",$period);
|
|
|
|
|
+ $period = $period[0].":00 - ".$period[1].":00";
|
|
|
if ($available < $need)$periods[] = ["time"=>$period,"index"=>$key,"isAvailable"=>false];
|
|
if ($available < $need)$periods[] = ["time"=>$period,"index"=>$key,"isAvailable"=>false];
|
|
|
else $periods[] = ["time"=>$period,"index"=>$key,"isAvailable"=>true];
|
|
else $periods[] = ["time"=>$period,"index"=>$key,"isAvailable"=>true];
|
|
|
}
|
|
}
|