dev
曾超新 5 years ago
parent 832ab578b3
commit 3b7b0553f7
  1. 13
      frontend/controllers/CarController.php

@ -4558,6 +4558,19 @@ class CarController extends BaseController
CarCT::deleteAll(['id'=>$car_info->id]);
CarBT::deleteAll(['id'=>$car_info->id]);
CarDT::deleteAll(['id'=>$car_info->id]);
AppointmentT::deleteAll('car_id='.$car_info->id);
//删除保单 还没有正本生成的保单可以直接删除,正本生成后,需要退单操作
//删除操作人员
$orders = OrderT::find()
->where('car_id='.$car_info->id.' and status_id<5')
->all();
foreach($orders as $order_info) {
OrderUserT::deleteAll('order_id='.$order_info->id);
//删除保单
$order_info->delete();
}
$this->addLog($car_info->id,'从业务员无效车辆信息',1);
$result['success'] = true;

Loading…
Cancel
Save