diff --git a/common/models/CarT.php b/common/models/CarT.php index 06ff0b8..f10c817 100644 --- a/common/models/CarT.php +++ b/common/models/CarT.php @@ -21,13 +21,9 @@ use Yii; * @property string $id_number * @property string $engine_no * @property string $car_frame_no - * @property integer $brand_id - * @property integer $series_id - * @property integer $displacement_id - * @property string $car_year * @property integer $seats * @property string $car_man - * @property string $phone + * @property string $car_man_phone * @property string $weixin * @property string $remark * @property integer $location @@ -48,9 +44,6 @@ use Yii; */ class CarT extends \common\models\Base { - const MONTH = [1,2,3,4,5,6,7,8,9,10,11,12]; - const DAYS = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]; - /** * @inheritdoc */ @@ -66,7 +59,7 @@ class CarT extends \common\models\Base { return [ [['user_id'], 'required'], - [['user_id', 'car_type_id', 'car_use_id','seats','brand_id','series_id','displacement_id','location','invalid_id','invalid_flag','is_track','times','biaozhu','hiddenes'], 'integer'], + [['user_id', 'car_type_id', 'car_use_id','seats','location','invalid_id','invalid_flag','is_track','times','biaozhu','hiddenes'], 'integer'], [['register_date', 'insurer1_date', 'insurer2_date','id_man','id_number','print_date','car_man_number', 'created_at', 'updated_at'], 'safe'], [['car_no', 'factory_model', 'car_model', 'engine_no', 'car_frame_no','old_user','phone1','id_phone'], 'string', 'max' => 50], [['car_year'], 'string', 'max' => 10], @@ -94,10 +87,6 @@ class CarT extends \common\models\Base 'id_number' => 'ID Number', 'engine_no' => 'Engine No', 'car_frame_no' => 'Car Frame No', - 'brand_id' => 'Brand ID', - 'series_id' => 'Series ID', - 'displacement_id' => 'Displacement ID', - 'car_year' => 'Car Year', 'seats' => 'Seats', 'car_man' => 'Car Man', 'phone' => 'Phone', diff --git a/frontend/controllers/CarController.php b/frontend/controllers/CarController.php index ca856d1..37bcfe3 100644 --- a/frontend/controllers/CarController.php +++ b/frontend/controllers/CarController.php @@ -780,17 +780,6 @@ class CarController extends BaseController $car_use_items = CarUseT::find()->all(); // 车辆类型 $car_type_items = CarTypeT::find()->all(); - // 品牌信息 - $brand_items = BrandT::find()->all(); - // 车系信息 - $series_items = SeriesT::find() - ->where('brand_id='.intval($car_info->brand_id)) - ->all(); - // 排量信息 - $displacement_items = DisplacementT::find() - ->where('series_id='.intval($car_info->series_id)) - ->all(); -// $failure_items = InvalidT::getTree(2); // 无效数据 $failure_items = InvalidT::getTrees(); @@ -916,9 +905,6 @@ class CarController extends BaseController 'sort_value' => $sort_value, 'car_use_items' => $car_use_items, 'car_type_items' => $car_type_items, - 'brand_items' => $brand_items, - 'series_items' => $series_items, - 'displacement_items' => $displacement_items, 'back_params' => $back_params, 'business_group' => $business_group, 'adid' => $aid, @@ -943,13 +929,6 @@ class CarController extends BaseController $car_use_items = CarUseT::find()->all(); $car_type_items = CarTypeT::find()->all(); - $brand_items = BrandT::find()->all(); - $series_items = SeriesT::find() - ->where('brand_id='.intval($car_info->brand_id)) - ->all(); - $displacement_items = DisplacementT::find() - ->where('series_id='.intval($car_info->series_id)) - ->all(); $failure_items = InvalidT::getTree(2); //新礼品 @@ -1074,9 +1053,6 @@ class CarController extends BaseController 'sort_value' => $sort_value, 'car_use_items' => $car_use_items, 'car_type_items' => $car_type_items, - 'brand_items' => $brand_items, - 'series_items' => $series_items, - 'displacement_items' => $displacement_items, 'back_params' => $back_params, 'business_group' => $business_group, 'business_group_id' => $business_group_id, @@ -1133,13 +1109,6 @@ class CarController extends BaseController $pay_type_items = PayTypeT::find()->all(); $car_use_items = CarUseT::find()->all(); $car_type_items = CarTypeT::find()->all(); - $brand_items = BrandT::find()->all(); - $series_items = SeriesT::find() - ->where('brand_id='.intval($car_info->brand_id)) - ->all(); - $displacement_items = DisplacementT::find() - ->where('series_id='.intval($car_info->series_id)) - ->all(); $direction_items = DirectionT::find() ->all(); $range_items = RangeT::find() @@ -1320,9 +1289,6 @@ class CarController extends BaseController 'pay_type_items' => $pay_type_items, 'car_use_items' => $car_use_items, 'car_type_items' => $car_type_items, - 'brand_items' => $brand_items, - 'series_items' => $series_items, - 'displacement_items' => $displacement_items, 'direction_items' => $direction_items, 'range_items' => $range_items, 'city_items' => $city_items, @@ -1405,13 +1371,6 @@ class CarController extends BaseController $pay_type_items = PayTypeT::find()->all(); $car_use_items = CarUseT::find()->all(); $car_type_items = CarTypeT::find()->all(); - $brand_items = BrandT::find()->all(); - $series_items = SeriesT::find() - ->where('brand_id='.intval($car_info->brand_id)) - ->all(); - $displacement_items = DisplacementT::find() - ->where('series_id='.intval($car_info->series_id)) - ->all(); $direction_items = DirectionT::find() ->all(); $range_items = RangeT::find() @@ -1579,9 +1538,6 @@ class CarController extends BaseController 'pay_type_items' => $pay_type_items, 'car_use_items' => $car_use_items, 'car_type_items' => $car_type_items, - 'brand_items' => $brand_items, - 'series_items' => $series_items, - 'displacement_items' => $displacement_items, 'direction_items' => $direction_items, 'range_items' => $range_items, 'city_items' => $city_items, @@ -1622,35 +1578,11 @@ class CarController extends BaseController $car_use_items = CarUseT::find()->all(); $car_type_items = CarTypeT::find()->all(); - $brand_items = BrandT::find()->all(); - $factory_items = FactoryT::find() - ->where('brand_id='.intval($info->brand_id)) - ->all(); - $series_items = SeriesT::find() - ->where('factory_id='.intval($info->factory_id)) - ->all(); - $displacement_items = DisplacementT::find() - ->where('series_id='.intval($info->series_id)) - ->all(); - $year_items = YearT::find() - ->where('series_id='.intval($info->series_id.' and displacement_id='.intval($info->displacement_id))) - ->all(); - $model_items = ModelT::find() - ->where('series_id='.intval($info->series_id)) - ->andWhere('displacement_id='.intval($info->displacement_id)) - ->andWhere('year_id='.intval($info->year_id)) - ->all(); return $this->render('info-edit',[ 'info' => $info, 'car_use_items' => $car_use_items, 'car_type_items' => $car_type_items, - 'brand_items' => $brand_items, - 'factory_items' => $factory_items, - 'series_items' => $series_items, - 'displacement_items' => $displacement_items, - 'year_items' => $year_items, - 'model_items' => $model_items ]); }