This commit is contained in:
unknown 2023-09-01 21:02:59 +08:00
parent 265502dccc
commit bdec0d3dd7

View File

@ -376,11 +376,14 @@ class VehicleController extends BaseApiController
return $this->fail('非小组公司不能访问');
}
//获取申请信息
$vehicleContract = VehicleContract::where('company_b_id',$company['id'])->where('type','<>',2)->order('id desc')->find();
$vehicleContract = VehicleContract::where('company_b_id',$company['id'])->order('id desc')->find();
if(empty($vehicleContract)){
return $this->success('没有数据,请申请',['status'=>-1]);
}
if($vehicleContract['status'] == 2){
if($vehicleContract['type'] == 2){
return $this->success('合同已解除',['status'=>-1]);
}
if($vehicleContract['status'] == 3){
if(!empty($vehicleContract['cars_info'])){
$vehicleContract['cars_info'] = json_decode($vehicleContract['cars_info'],true);
if(!empty($vehicleContract['cars_info'])){