dev
曾超新 5 years ago
parent ed10240b00
commit 9740a8cf7f
  1. 12
      common/models/CarT.php
  2. 2
      frontend/controllers/CarController.php
  3. 2
      frontend/controllers/DatabaseController.php
  4. 14
      frontend/controllers/FinanceController.php

@ -18,7 +18,7 @@ use Yii;
* @property string $insurer1_date
* @property string $insurer2_date
* @property string $id_man
* @property string $id_number
* @property string $id_man_number
* @property string $engine_no
* @property string $car_frame_no
* @property integer $seats
@ -34,10 +34,11 @@ use Yii;
* @property string $company
* @property string $op_user1
* @property string $op_user2
* @property string $op_user3
* @property string $from_src
* @property string $created_at
* @property string $updated_at
* @property integer $op1_id
* @property integer $op2_id
*/
class CarT extends \common\models\Base
{
@ -57,10 +58,9 @@ class CarT extends \common\models\Base
return [
[['user_id'], 'required'],
[['user_id', 'car_type_id', 'car_use_id','seats','location','op1_id', 'op2_id'], 'integer'],
[['register_date', 'insurer1_date', 'insurer2_date','id_man','id_number','print_date','car_man_number', 'created_at', 'updated_at'], 'safe'],
[['register_date', 'insurer1_date', 'insurer2_date','id_man','id_man_number','print_date','car_man_number', 'created_at', 'updated_at'], 'safe'],
[['car_no', 'factory_model', 'car_model', 'engine_no', 'car_frame_no','id_man_phone'], 'string', 'max' => 50],
[['car_year'], 'string', 'max' => 10],
[['car_man','car_man_phone','remark','company','op_user1','op_user2','weixin','from_src'], 'string', 'max' => 200],
[['car_man','car_man_phone','remark','company','op_user1','op_user2','from_src'], 'string', 'max' => 200],
];
}
@ -81,7 +81,7 @@ class CarT extends \common\models\Base
'insurer1_date' => 'Insurer 1 Date',
'insurer2_date' => 'Insurer 2 Date',
'id_man' => 'ID Man',
'id_number' => 'ID Number',
'id_man_number' => 'ID Number',
'engine_no' => 'Engine No',
'car_frame_no' => 'Car Frame No',
'seats' => 'Seats',

@ -134,7 +134,7 @@ class CarController extends BaseController
$objectPHPExcel->setActiveSheetIndex(0)->setCellValue('E'.$index,$car->insurer1_date);
$objectPHPExcel->setActiveSheetIndex(0)->setCellValue('F'.$index,$car->insurer2_date);
$objectPHPExcel->setActiveSheetIndex(0)->setCellValue('G'.$index,$car->id_man);
$objectPHPExcel->setActiveSheetIndex(0)->setCellValue('H'.$index,$car->id_number);
$objectPHPExcel->setActiveSheetIndex(0)->setCellValue('H'.$index,$car->id_man_number);
$objectPHPExcel->setActiveSheetIndex(0)->setCellValue('I'.$index,$car->engine_no);
$objectPHPExcel->setActiveSheetIndex(0)->setCellValue('J'.$index,$car->car_frame_no);
$objectPHPExcel->setActiveSheetIndex(0)->setCellValue('K'.$index,$car->car_year);

@ -2063,7 +2063,7 @@ class DatabaseController extends BaseController
$order_row->id_man_number = $d_info->car->id_number;
$order_row->link_man = $d_info->car->car_man;
$order_row->link_man_phone = $d_info->car->car_man_phone;
$order_row->link_man_number = $d_info->car->id_number;
$order_row->link_man_number = $d_info->car->id_man_number;
if(!$order_row->save()) {
throw new \Exception(print_r($order_row->getErrors(),true));
}

@ -1765,7 +1765,7 @@ class FinanceController extends \frontend\controllers\UserBaseController
$car_info->insurer1_date = $insurer1_date;
$car_info->insurer2_date = $insurer2_date;
$car_info->id_man = $id_man;
$car_info->id_number = $id_number;
$car_info->id_man_number = $id_number;
$car_info->save();
//为空的车牌新增
@ -1814,7 +1814,7 @@ class FinanceController extends \frontend\controllers\UserBaseController
$car_infos->insurer1_date = $insurer1_date;
$car_infos->insurer2_date = $insurer2_date;
$car_infos->id_man = $id_man;
$car_infos->id_number = $id_number;
$car_infos->id_man_number = $id_number;
$car_infos->save();
}else{
$car_info = new CarT();
@ -1834,7 +1834,7 @@ class FinanceController extends \frontend\controllers\UserBaseController
$car_info->insurer1_date = $insurer1_date;
$car_info->insurer2_date = $insurer2_date;
$car_info->id_man = $id_man;
$car_info->id_number = $id_number;
$car_info->id_man_number = $id_number;
$car_info->location = 1;
$car_info->is_track = 0;
$car_info->times = 1;
@ -3544,7 +3544,7 @@ class FinanceController extends \frontend\controllers\UserBaseController
$car_info->insurer1_date = $insurer1_date;
$car_info->insurer2_date = $insurer2_date;
$car_info->id_man = $id_man;
$car_info->id_number = $id_number;
$car_info->id_man_number = $id_number;
// $car_info->location = 1;
// $car_info->is_track = 0;
@ -6268,7 +6268,7 @@ class FinanceController extends \frontend\controllers\UserBaseController
$car_info->insurer1_date = $insurer1_date;
$car_info->insurer2_date = $insurer2_date;
$car_info->id_man = $id_man;
$car_info->id_number = $id_number;
$car_info->id_man_number = $id_number;
$car_info->location = 1;
$car_info->is_track = 0;
$car_info->times = 1;
@ -6422,7 +6422,7 @@ class FinanceController extends \frontend\controllers\UserBaseController
$car_info->id_man = $id_man;
}
if($id_number != ''){
$car_info->id_number = $id_number;
$car_info->id_man_number = $id_number;
}
if($id_phone != ''){
$car_info->id_man_phone = $id_phone;
@ -6479,7 +6479,7 @@ class FinanceController extends \frontend\controllers\UserBaseController
$car_info->id_man = $id_man;
}
if($id_number != ''){
$car_info->id_number = $id_number;
$car_info->id_man_number = $id_number;
}
if($id_phone != ''){
$car_info->id_man_phone = $id_phone;

Loading…
Cancel
Save