diff --git a/common/models/CarT.php b/common/models/CarT.php index c972f75..c4f9d57 100644 --- a/common/models/CarT.php +++ b/common/models/CarT.php @@ -175,11 +175,7 @@ class CarT extends \common\models\Base switch($this->location) { case 1: $car=CarT::findOne(['id'=>$this->id]); - if($car->qiyong==2){ - $name = 'A库(永不启用)'; - }else{ - $name = 'A库'; - } + $name = 'A库'; break; case 2: $carb=CarBT::findOne(['id'=>$this->id]); diff --git a/common/models/SysIpT.php b/common/models/SysIpT.php index 7a2fc79..57e65ed 100644 --- a/common/models/SysIpT.php +++ b/common/models/SysIpT.php @@ -57,7 +57,6 @@ class SysIpT extends \common\models\Base static public function getIpArray(){ $list = self::find() - ->where('status = 1') ->orderBy('id ASC') ->all(); diff --git a/frontend/controllers/DatabaseController.php b/frontend/controllers/DatabaseController.php index 2a26daa..010f73f 100644 --- a/frontend/controllers/DatabaseController.php +++ b/frontend/controllers/DatabaseController.php @@ -647,10 +647,10 @@ class DatabaseController extends BaseController $order_row->user_id = $user_id; $order_row->status_id = 1; $order_row->id_man = $b_info->car->car_man; - $order_row->id_man_number = $b_info->car->id_number; + $order_row->id_man_number = $b_info->car->id_man_number; $order_row->link_man = $b_info->car->car_man; $order_row->link_man_phone = $b_info->car->car_man_phone; - $order_row->link_man_number = $b_info->car->id_number; + $order_row->link_man_number = $b_info->car->id_man_number; if(!$order_row->save()) { throw new \Exception(print_r($order_row->getErrors(),true)); } @@ -824,7 +824,7 @@ class DatabaseController extends BaseController $order_row->id_man = $b_info->car->car_man; $order_row->link_man = $b_info->car->car_man; $order_row->link_man_phone = $b_info->car->car_man_phone; - $order_row->link_man_number = $b_info->car->id_number; + $order_row->link_man_number = $b_info->car->id_man_number; $order_row->return_status_id = 0; $order_row->return_remark = ''; if(!$order_row->save()) { @@ -1214,10 +1214,10 @@ class DatabaseController extends BaseController $order_row->user_id = $user_id; $order_row->status_id = 1; $order_row->id_man = $c_info->car->car_man; - $order_row->id_man_number = $c_info->car->id_number; + $order_row->id_man_number = $c_info->car->id_man_number; $order_row->link_man = $c_info->car->car_man; $order_row->link_man_phone = $c_info->car->car_man_phone; - $order_row->link_man_number = $c_info->car->id_number; + $order_row->link_man_number = $c_info->car->id_man_number; if(!$order_row->save()) { throw new \Exception(print_r($order_row->getErrors(),true)); } @@ -1388,10 +1388,10 @@ class DatabaseController extends BaseController $order_row->user_id = $c_info->user_id; $order_row->status_id = 1; $order_row->id_man = $c_info->car->car_man; - $order_row->id_man_number = $c_info->car->id_number; + $order_row->id_man_number = $c_info->car->id_man_number; $order_row->link_man = $c_info->car->car_man; $order_row->link_man_phone = $c_info->car->car_man_phone; - $order_row->link_man_number = $c_info->car->id_number; + $order_row->link_man_number = $c_info->car->id_man_number; if(!$order_row->save()) { throw new \Exception(print_r($order_row->getErrors(),true)); } @@ -1889,10 +1889,10 @@ class DatabaseController extends BaseController $order_row->user_id = $user_id; $order_row->status_id = 1; $order_row->id_man = $d_info->car->car_man; - $order_row->id_man_number = $d_info->car->id_number; + $order_row->id_man_number = $d_info->car->id_man_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)); } @@ -2060,7 +2060,7 @@ class DatabaseController extends BaseController $order_row->user_id = $d_info->user_id; $order_row->status_id = 1; $order_row->id_man = $d_info->car->car_man; - $order_row->id_man_number = $d_info->car->id_number; + $order_row->id_man_number = $d_info->car->id_man_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_man_number; diff --git a/frontend/controllers/FinanceController.php b/frontend/controllers/FinanceController.php index f46fb33..1a68846 100644 --- a/frontend/controllers/FinanceController.php +++ b/frontend/controllers/FinanceController.php @@ -3271,18 +3271,18 @@ class FinanceController extends \frontend\controllers\UserBaseController for ($i = 7; $i <= $rowCount; $i++) { $cell = $currentSheet->getCellByColumnAndRow(1, $i); - $insurer_no = $cell->getValue();//$data[$i][1]; + $insurer_no = $cell->getFormattedValue();//$data[$i][1]; // var_dump($insurer_no); $cell = $currentSheet->getCellByColumnAndRow(2, $i); - $policy_man = $cell->getValue();//$data[$i][2]; + $policy_man = $cell->getFormattedValue();//$data[$i][2]; $cell = $currentSheet->getCellByColumnAndRow(3, $i); - $total_real = $cell->getValue();//$data[$i][3]; + $total_real = $cell->getFormattedValue();//$data[$i][3]; $cell = $currentSheet->getCellByColumnAndRow(4, $i); - $total_rate = $cell->getValue();//$data[$i][4]; + $total_rate = $cell->getFormattedValue();//$data[$i][4]; $cell = $currentSheet->getCellByColumnAndRow(5, $i); - $pay_total = $cell->getValue();//$data[$i][5]; + $pay_total = $cell->getFormattedValue();//$data[$i][5]; $cell = $currentSheet->getCellByColumnAndRow(6, $i); - $insurer_total = $cell->getValue();//$data[$i][6]; + $insurer_total = $cell->getFormattedValue();//$data[$i][6]; $cell = $currentSheet->getCellByColumnAndRow(7, $i); $insurer_date = $cell->getFormattedValue(); // var_dump($insurer_date); @@ -7618,10 +7618,6 @@ class FinanceController extends \frontend\controllers\UserBaseController $query->offset($offset)->limit($limit); $items = $query->all(); - $page_info = MyLib::getPageInfo($pagination); - - $group_items = GroupT::getTree(); - $data = []; $data['total'] = $total; $data['rows'] = []; diff --git a/frontend/controllers/InsurerController.php b/frontend/controllers/InsurerController.php index e0c84b0..2522c73 100644 --- a/frontend/controllers/InsurerController.php +++ b/frontend/controllers/InsurerController.php @@ -737,7 +737,7 @@ class InsurerController extends BaseController $total1_rate = $request->post('total1_rate','0.00'); $total2_rate = $request->post('total2_rate','0.00'); $pay_no = $request->post('pay_no',0); - $company2_id = $request->post('company2_id',0); + $company2_id = $request->post('company_id',0); if($total1_rate == '') { $result['msg'] = '请输入商业跟单手续费!'; diff --git a/frontend/controllers/MarketingStrategyController.php b/frontend/controllers/MarketingStrategyController.php index fb21ba7..ce49943 100644 --- a/frontend/controllers/MarketingStrategyController.php +++ b/frontend/controllers/MarketingStrategyController.php @@ -110,6 +110,31 @@ class MarketingStrategyController extends UserBaseController return $result; } + public function actionDelete() { + Yii::$app->response->format = Response::FORMAT_JSON; + $request = Yii::$app->request; + $result = array(); + $result['success'] = false; + $result['msg'] = '删除失败'; + + $id = $request->post('id',0); + + if($id == 0) + return $result; + + $tichengTypeT = ZhongjiYingxiao::findOne(['id'=>$id]); + if($tichengTypeT) { + $tichengTypeT->is_delete = 1; + $tichengTypeT->save(); + } + + + $result['success'] = true; + $result['msg'] = '删除成功'; + + return $result; + } + public function actionUsers() { $request = Yii::$app->request; $id = $request->get('id'); @@ -493,7 +518,7 @@ class MarketingStrategyController extends UserBaseController } $items = ZhongjiTiaojian::find() ->where('celuo_id=:celuo_id and type=1',[':celuo_id'=>$yingxiao_item->id]) - ->andWhere(['<','baofei', $total1_clear]) + ->andWhere(['<=','baofei', $total1_clear]) ->all(); $ids = []; foreach($items as $item) { @@ -506,6 +531,8 @@ class MarketingStrategyController extends UserBaseController $tmp_type_id = 2; if(in_array($tmp_type_id, $car_type_ids)) { $flag = true; + } else { + $flag = false; } } //保险公司 @@ -513,6 +540,8 @@ class MarketingStrategyController extends UserBaseController $company_ids = explode(',',$item->company_ids); if(in_array($company2_id, $company_ids)) { $flag = true; + } else { + $flag = false; } } //车辆使用类型 @@ -520,6 +549,8 @@ class MarketingStrategyController extends UserBaseController $car_use_ids = explode(',',$item->car_use_id); if(in_array($car_use_id, $car_use_ids)) { $flag = true; + } else { + $flag = false; } } //新保、续保 @@ -530,6 +561,8 @@ class MarketingStrategyController extends UserBaseController $tmp_type_id = 2; if(in_array($tmp_type_id, $type_ids)) { $flag = true; + } else { + $flag = false; } } if($flag) { diff --git a/frontend/controllers/SystemController.php b/frontend/controllers/SystemController.php index 4bda3eb..97a6ec6 100644 --- a/frontend/controllers/SystemController.php +++ b/frontend/controllers/SystemController.php @@ -19,7 +19,8 @@ class SystemController extends \yii\web\Controller { public $my = null; public $web = null; - private $_STATE = 1; + public $enableCsrfValidation = false; + public $layout = 'blue-main'; public function init() { @@ -94,21 +95,27 @@ class SystemController extends \yii\web\Controller * @author liukangle * */ - public function actionIp(){ + public function actionIp() { + return $this->render('ip'); + } + public function actionIpJson(){ + Yii::$app->response->format = Response::FORMAT_JSON; $request = Yii::$app->request; - $name = $request->get('name'); - $ips = SysIpT::find(); - if($name != ''){ - $ips = $ips->andWhere(['like','city_name',$name]); + + $ips = SysIpT::find()->orderBy('id ASC'); + $total = $ips->count(); + $items = $ips->all(); + + $data = []; + $data['total'] = $total; + $data['rows'] = []; + foreach($items as $item) { + $row = $item->toArray(); + $data['rows'][] = $row; } - $ips = $ips->andWhere('status ='.$this->_STATE); - $data = $ips->orderBy('id ASC')->all(); - return $this->render('ip',[ - 'info' => $data, - 'name' => $name, - ]); + return $data; } /** @@ -119,7 +126,7 @@ class SystemController extends \yii\web\Controller * @author liukangle * */ - public function actionEdit() + public function actionIpEdit() { $request = Yii::$app->request; @@ -129,7 +136,7 @@ class SystemController extends \yii\web\Controller } else { $info = new SysIpT(); } - return $this->render('edit',[ + return $this->render('ip-edit',[ 'info' => $info, ]); } @@ -181,7 +188,7 @@ class SystemController extends \yii\web\Controller * @author liukangle * */ - public function actionDel() + public function actionIpDelete() { Yii::$app->response->format = Response::FORMAT_JSON; $request = Yii::$app->request; @@ -194,11 +201,12 @@ class SystemController extends \yii\web\Controller $id = $request->post('id'); if($id > 0){ $row = SysIpT::findOne(['id'=>$id]); - $row->status = 0; - $row->save(); + if($row) { + $row->delete(); + } $result['success'] = true; - $result['msg'] = '保存成功'; + $result['msg'] = '删除成功'; } return $result; diff --git a/frontend/views/insurer-type/index.php b/frontend/views/insurer-type/index.php index 2118666..00702ef 100644 --- a/frontend/views/insurer-type/index.php +++ b/frontend/views/insurer-type/index.php @@ -47,12 +47,14 @@ use \common\libs\MyLib; - - - diff --git a/frontend/views/system/ip-edit.php b/frontend/views/system/ip-edit.php new file mode 100644 index 0000000..4cdab31 --- /dev/null +++ b/frontend/views/system/ip-edit.php @@ -0,0 +1,68 @@ + +beginBlock('header_css'); ?> + +endBlock(); ?> + +
序列号 | -城市 | -IP | -操作 | -
= $index+1 ?> | -= $item->city_name ?> | -= $item->ip ?> | -- [修改] - [删除] - | -