diff --git a/admin/controllers/auto/Cars.php b/admin/controllers/auto/Cars.php index 9c4366a6..70755a34 100644 --- a/admin/controllers/auto/Cars.php +++ b/admin/controllers/auto/Cars.php @@ -61,7 +61,7 @@ class Cars extends HD_Controller{ $lists = array(); if($total){ $orderby = 'id desc'; - $select = 'id,brand_id,s_id,attrs,status'; + $select = '*'; $rows = $this->auto_cars_model->select($where, $orderby, $page, $size, $select); if($rows){ $s_ids = array(); @@ -94,14 +94,21 @@ class Cars extends HD_Controller{ $attr = $map_attr[$attr_id]; $arr[$attr['type']] =$attr['title']; } - $attr_title = "{$arr[1]}-{$arr[0]}-{$arr[2]}"; + $attr_title = "{$arr[1]}-{$arr[0]}-内饰{$arr[2]}"; + $title = "{$map_brand[$v['brand_id']]} {$map_sery[$v['s_id']]} {$attr_title}"; $lists[] = array( 'id' => $v['id'], - 'brand_name' => $map_brand[$v['brand_id']], - 'sery_name' => $map_sery[$v['s_id']], - 'attr_title' => $attr_title, + 'title' => $title, 'status' => $v['status'], - 'status_name' => $statusAry[$v['status']] + 'price_car' => $v['price_car'] > 0 ? $v['price_car'] : '0.00', + 'price_insure' => $v['price_insure'] > 0 ? $v['price_insure'] : '0.00', + 'price_fine' => $v['price_fine'] > 0 ? $v['price_fine'] : '0.00', + 'price_finance' => $v['price_finance'] > 0 ? $v['price_finance'] : '0.00', + 'first_pay' => $v['first_pay'] > 0 ? $v['first_pay'] : '0.00', + 'month_pay' => $v['month_pay'] > 0 ? $v['month_pay'] : '0.00', + 'price_coplus' => $v['price_coplus'] > 0 ? $v['price_coplus'] : '0.00', + 'brokerage_1' => $v['brokerage_1'] > 0 ? $v['brokerage_1'] : '0.00', + 'brokerage_2' => $v['brokerage_2'] > 0 ? $v['brokerage_2'] : '0.00', ); } } @@ -132,8 +139,6 @@ class Cars extends HD_Controller{ $str_ids = implode(',', $attr_ids); $where_attr = array("id in ({$str_ids})" => null); $map_attr = $this->auto_attr_model->map('type', 'title', $where_attr, 'id desc', 0 , 0, 'type, title'); - //属性分类 - $attr_types = $this->auto_attr_model->get_type(); $attr = "{$map_attr[1]}-{$map_attr[0]}-{$map_attr[2]}(内饰)"; //车系 $row_sery = $this->auto_series_model->get(array('id' => $row['s_id'])); @@ -148,6 +153,7 @@ class Cars extends HD_Controller{ 'price_fine' => $row['price_fine'] > 0 ? $row['price_fine'] : '', 'price_finance' => $row['price_finance'] > 0 ? $row['price_finance'] : '', 'first_pay' => $row['first_pay'] > 0 ? $row['first_pay'] : '', + 'month_pay' => $row['month_pay'] > 0 ? $row['month_pay'] : '0.00', 'price_coplus' => $row['price_coplus'] > 0 ? $row['price_coplus'] : '', 'brokerage_1' => $row['brokerage_1'] > 0 ? $row['brokerage_1'] : '', 'brokerage_2' => $row['brokerage_2'] > 0 ? $row['brokerage_2'] : '', @@ -252,6 +258,7 @@ class Cars extends HD_Controller{ 'price_fine' => floatval($info['price_fine']), 'price_finance' => floatval($info['price_finance']), 'first_pay' => floatval($info['first_pay']), + 'month_pay' => floatval($info['month_pay']), 'price_coplus' => floatval($info['price_coplus']), 'brokerage_1' => floatval($info['brokerage_1']), 'brokerage_2' => floatval($info['brokerage_2']), diff --git a/admin/views/auto/cars/lists.php b/admin/views/auto/cars/lists.php index 17cd0ad3..18be9543 100644 --- a/admin/views/auto/cars/lists.php +++ b/admin/views/auto/cars/lists.php @@ -45,32 +45,65 @@ ID -