This commit is contained in:
unknown 2023-08-31 18:10:52 +08:00
parent 1ca360ef4f
commit cc81b9cb4b

View File

@ -271,15 +271,7 @@ class VehicleController extends BaseApiController
if($vehicleContract['company_a_id'] != $this->userInfo['company_id']){
return $this->fail('数据不匹配');
}
if(!empty($vehicleContract['cars_info'])){
$vehicleContract['cars_info'] = json_decode($vehicleContract['cars_info'],true);
}
//判断申请状态
if($vehicleContract['status'] == -1){
$vehicleRentCars = VehicleRent::where('company_id',$vehicleContract['company_a_id'])->where('status',0)->select()->toArray();
}else{
$vehicleRentCars = [];
}
$vehicleRentCars = VehicleRent::where('company_id',$vehicleContract['company_a_id'])->select()->toArray();
$data = [
'vehicleContract' => $vehicleContract->toArray(),
'vehicleRentCars' => $vehicleRentCars