Merge pull request 'update' (#78) from zhangwei into master

Reviewed-on: http://git.excellentkk.cn/mkm/TaskSystem/pulls/78
This commit is contained in:
wei1990 2023-08-31 18:11:16 +08:00
commit 3b772ef5b3

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