Merge pull request 'update' (#118) from zhangwei into dev

Reviewed-on: #118
This commit is contained in:
weiz 2023-10-18 17:03:44 +08:00
commit 074cad1ca4

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();