This commit is contained in:
unknown 2023-10-18 17:03:26 +08:00
parent 38690a5c9a
commit c8af6af007

View File

@ -279,13 +279,14 @@ class VehicleContractController extends BaseAdminController
if($data['type'] == 1){
if(empty($v['id'])){
$cars[$k]['type'] = 1;
}else{
$rentInfo = VehicleRent::where('car_id',$v['id'])->findOrEmpty();
if($rentInfo->isEmpty()){
$cars[$k]['type'] = 0;
}else{
$cars[$k]['type'] = $rentInfo['type'];
}
}
$rentInfo = VehicleRent::where('car_id',$v['id'])->findOrEmpty();
if($rentInfo->isEmpty()){
$cars[$k]['type'] = 0;
}else{
$cars[$k]['type'] = $rentInfo['type'];
}
}
if($data['type'] == 2){
$rentInfo = VehicleRent::where('car_id',$v['id'])->findOrEmpty();