diff --git a/common/config/main.php b/common/config/main.php index 674dd13..59d7b73 100644 --- a/common/config/main.php +++ b/common/config/main.php @@ -6,5 +6,5 @@ return [ 'class' => 'yii\caching\FileCache', ], ], - 'timeZone' => 'Asia/Chongqing', + 'timeZone' => 'Asia/Shanghai', ]; diff --git a/common/libs/MyLib.php b/common/libs/MyLib.php index 85efc26..eb1b026 100644 --- a/common/libs/MyLib.php +++ b/common/libs/MyLib.php @@ -214,7 +214,7 @@ class MyLib { } } static public function zhifufs($cx){ - + $cn = '未知'; if($cx==1) { $cn='上门收费'; }elseif($cx==2){ diff --git a/common/models/CaiwuT.php b/common/models/CaiwuT.php index b3c93fd..4207219 100644 --- a/common/models/CaiwuT.php +++ b/common/models/CaiwuT.php @@ -125,4 +125,9 @@ class CaiwuT extends \common\models\Base { return $this->hasOne(OrderCaiwuT::className(),['order_id'=>'order_id']); } + + public function getPayOrderUser() + { + return $this->hasMany(PayOrderUserT::className(),['order_id'=>'order_id']); + } } 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/GiftT.php b/common/models/GiftT.php index 26d42af..3726e92 100644 --- a/common/models/GiftT.php +++ b/common/models/GiftT.php @@ -62,7 +62,7 @@ class GiftT extends \common\models\Base public function getShowType() { - if($this->type_id == 1) return '实名礼品'; + if($this->type_id == 1) return '实物礼品'; if($this->type_id == 2) return '礼券'; return ''; } diff --git a/common/models/GiftUseLogT.php b/common/models/GiftUseLogT.php new file mode 100644 index 0000000..878495e --- /dev/null +++ b/common/models/GiftUseLogT.php @@ -0,0 +1,63 @@ + 50], + [['group_name', 'remark','info'], 'string', 'max' => 100], + ]; + } + + /** + * @inheritdoc + */ + public function attributeLabels() + { + return [ + 'id' => 'ID', + 'gift_use_id' => 'Gift Use ID', + 'op_man' => 'Op Man', + 'op_time' => 'Op Time', + 'group_name' => 'Group Name', + 'type' => 'Type', + 'remark' => 'Remark', + 'info' => 'Info', + 'created_at' => 'Created At', + 'updated_at' => 'Updated At', + ]; + } +} \ No newline at end of file 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/composer.json b/composer.json index 4d25cdc..15a058d 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,8 @@ "phpoffice/phpspreadsheet": "^1.9", "codeception/codeception": "^3.1", "yiisoft/yii2-imagine": "^2.2", - "phpoffice/phpexcel": "^1.8" + "phpoffice/phpexcel": "^1.8", + "guzzlehttp/guzzle": "^6.4" }, "require-dev": { "yiisoft/yii2-debug": "*", diff --git a/composer.lock b/composer.lock index 9652f66..65766e9 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4e10a054c08f42ba7431449d509147d7", + "content-hash": "f5d698a9c66d02defab335c7095a8982", "packages": [ { "name": "behat/gherkin", @@ -845,16 +845,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "6.3.3", + "version": "6.4.1", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" + "reference": "0895c932405407fd3a7368b6910c09a24d26db11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", - "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0895c932405407fd3a7368b6910c09a24d26db11", + "reference": "0895c932405407fd3a7368b6910c09a24d26db11", "shasum": "", "mirrors": [ { @@ -864,14 +864,15 @@ ] }, "require": { + "ext-json": "*", "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.4", + "guzzlehttp/psr7": "^1.6.1", "php": ">=5.5" }, "require-dev": { "ext-curl": "*", "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", - "psr/log": "^1.0" + "psr/log": "^1.1" }, "suggest": { "psr/log": "Required for using the Log middleware" @@ -883,12 +884,12 @@ } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\": "src/" - } + }, + "files": [ + "src/functions_include.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -912,7 +913,7 @@ "rest", "web service" ], - "time": "2018-04-22T15:46:56+00:00" + "time": "2019-10-23T15:58:00+00:00" }, { "name": "guzzlehttp/promises", diff --git a/frontend/config/params.php b/frontend/config/params.php index 7f754b9..f852a76 100644 --- a/frontend/config/params.php +++ b/frontend/config/params.php @@ -1,4 +1,14 @@ 'admin@example.com', + 'userPanel' => [ + 'token' => 'ff7dc73536475c11981a1c52531f2ff7', + 'phone_url' => 'http://user.banmacar.com/api/phone/op', + 'sms_url' => 'http://user.banmacar.com/api/sms/single-send', + 'myinfo_url' => 'http://user.banmacar.com/api/user/myinfo', + 'search_car_url' => 'http://user.banmacar.com/api/car/search-car', + 'car_info_url' => 'http://user.banmacar.com/api/car/car-info', + 'post-precise-price' => 'http://user.banmacar.com/api/car/post-precise-price', + 'get-precise-price' => 'http://user.banmacar.com/api/car/get-precise-price', + ], ]; diff --git a/frontend/controllers/AppointmentController.php b/frontend/controllers/AppointmentController.php index 61e9b7d..7b1cd69 100644 --- a/frontend/controllers/AppointmentController.php +++ b/frontend/controllers/AppointmentController.php @@ -328,11 +328,9 @@ class AppointmentController extends BaseController $car_man = $request->get('car_man'); $phone = $request->get('phone'); $car_no = $request->get('car_no'); - $page = $request->get('page',1); $username = $request->get('username'); $sort_key = $request->get('sort_key','appointment_t.pdate'); $sort_value = $request->get('sort_value','ASC'); - $user_id = $request->get('user_id'); $offset = $request->get('offset',0); $limit = $request->get('limit', 10); @@ -349,7 +347,7 @@ class AppointmentController extends BaseController $query->andWhere('car_t.car_man like "'.$car_man.'"'); } if($phone != '') { - $query->andWhere('car_t.phone like "'.$phone.'"'); + $query->andWhere('car_t.car_man_phone like "'.$phone.'"'); } if($car_no != '') { $query->andWhere('car_t.car_no like "'.$car_no.'"'); @@ -430,7 +428,7 @@ class AppointmentController extends BaseController $query = $query->andWhere('car_t.car_man like "'.$car_man.'"'); } if($phone != '') { - $query = $query->andWhere('car_t.phone="'.$phone.'"'); + $query = $query->andWhere('car_t.car_man_phone="'.$phone.'"'); } if($ptype > 0) { $query = $query->andWhere('appointment_t.ptype='.$ptype); @@ -507,7 +505,7 @@ class AppointmentController extends BaseController $query = $query->andWhere('car_t.car_man like "'.$car_man.'"'); } if($phone != '') { - $query = $query->andWhere('car_t.phone="'.$phone.'"'); + $query = $query->andWhere('car_t.car_man_phone="'.$phone.'"'); } if($ptype > 0) { $query = $query->andWhere('appointment_t.ptype='.$ptype); diff --git a/frontend/controllers/CarController.php b/frontend/controllers/CarController.php index c706d63..f627c88 100644 --- a/frontend/controllers/CarController.php +++ b/frontend/controllers/CarController.php @@ -63,9 +63,11 @@ use common\models\OrderAddress; use common\models\InvalidNew; use common\models\InvalidRenewal; use common\models\ZhongjiGiftT; +use GuzzleHttp\Client; use Yii; use yii\data\Pagination; use yii\db\Exception; +use yii\web\Request; use yii\web\Response; class CarController extends BaseController @@ -496,6 +498,313 @@ class CarController extends BaseController return $result; } + public function actionBihuSearch() + { + Yii::$app->response->format = Response::FORMAT_JSON; + $request = Yii::$app->request; + $id = $request->get('id',0); + $car_info = CarT::findOne(['id'=>$id]); + if($car_info) { + $url = Yii::$app->params['userPanel']['search_car_url']; + $token = Yii::$app->params['userPanel']['token']; + $params = [ + 'token' => $token, + 'LicenseNo' => $car_info->car_no, + 'EngineNo' => $car_info->engine_no, + 'CarVin' => $car_info->car_frame_no, + 'RegisterDate' => $car_info->register_date, + ]; + if($car_info->car_man_number != '' && substr($car_info->car_man_number, -6) != '') { + $params['SixDigitsAfterIdCard'] = substr($car_info->car_man_number, -6); + } + $client = new Client(['timeout'=> 120]); + $res = $client->request('POST', $url, [ + 'form_params' => $params, + 'http_errors' => false, + ]); + if($res->getStatusCode() == 200) { + $obj = json_decode($res->getBody()); + return MyLib::ok3($obj); + } + return MyLib::error3($res->getBody()); + } + return MyLib::error3('车辆信息不存在'); + } + + public function actionBihuCarinfo() + { + Yii::$app->response->format = Response::FORMAT_JSON; + $request = Yii::$app->request; + $id = $request->get('id',0); + $car_info = CarT::findOne(['id'=>$id]); + if($car_info) { + $url = Yii::$app->params['userPanel']['car_info_url']; + $token = Yii::$app->params['userPanel']['token']; + $params = [ + 'token' => $token, + 'LicenseNo' => $car_info->car_no, + 'EngineNo' => $car_info->engine_no, + 'CarVin' => $car_info->car_frame_no, + ]; + $client = new Client(['timeout'=> 120]); + $res = $client->request('POST', $url, [ + 'form_params' => $params, + 'http_errors' => false, + ]); + if($res->getStatusCode() == 200) { + $obj = json_decode($res->getBody()); + if($obj->code == 200) { + if($obj->data && $obj->data->UserInfo && $obj->data->UserInfo->CarUsedType != '') { + $car_user_info = CarUseT::find()->where(['name'=>$obj->data->UserInfo->CarUsedType])->one(); + if($car_user_info) { + $obj->data->UserInfo->CarUsedType = $car_user_info->id; + } + } + return MyLib::ok3($obj->data); + } else { + return MyLib::error3($obj->msg); + } + } + return MyLib::error3($res->getBody()); + } + return MyLib::error3('车辆信息不存在'); + } + + public function actionPostPrecisePrice() + { + Yii::$app->response->format = Response::FORMAT_JSON; + $request = Yii::$app->request; + $url = Yii::$app->params['userPanel']['post-precise-price']; + $token = Yii::$app->params['userPanel']['token']; + $types = $request->post('types'); + $nopays = $request->post('nopays'); + $params = [ + 'token' => $token, + 'LicenseNo' => $request->post('car_no'), + 'CarOwnersName' => $request->post('car_man'), + 'IdCard' => strtoupper($request->post('car_man_number')), + 'OwnerIdCardType' => $request->post('car_man_type'), // + 'QuoteGroup' => $request->post('company_id'), // + 'InsuredName' => $request->post('id_man'), + 'InsuredIdCard' => strtoupper($request->post('id_man_number')), + 'InsuredIdType' => $request->post('id_man_type'), // + 'HolderIdCard' => strtoupper($request->post('link_man_number')), + 'HolderName' => $request->post('link_man'), + 'HolderIdType' => $request->post('link_man_type'), // + 'CarUsedType' => $request->post('car_use_id'), + 'EngineNo' => strtoupper($request->post('engine_no')), + 'CarVin' => strtoupper($request->post('car_frame_no')), + 'RegisterDate' => $request->post('register_date'), + 'MoldName' => $request->post('factory_model'), + 'ForceTax' => 1, + 'BizTimeStamp' => $request->post('insurer1_begin_date'), + 'ForceTimeStamp' => $request->post('insurer2_begin_date'), + 'BoLi' => 0, + 'BuJiMianCheSun' => isset($nopays[1])?1:0, + 'BuJiMianDaoQiang' => isset($nopays[3])?1:0, + 'BuJiMianSanZhe' => isset($nopays[2])?1:0, + 'BuJiMianChengKe' => isset($nopays[5])?1:0, + 'BuJiMianSiJi' => isset($nopays[4])?1:0, + 'BuJiMianHuaHen' => isset($nopays[7])?1:0, + 'BuJiMianSheShui' => isset($nopays[8])?1:0, + 'BuJiMianZiRan' => isset($nopays[9])?1:0, + 'SheShui' => $types[8]=='是'?1:0, + 'HuaHen' => $types[7], + 'SiJi' => $types[4], + 'ChengKe' => $types[5], + 'CheSun' => floatval($types[1]), + 'DaoQiang' => $types[3]=='是'?1:0, + 'SanZhe' => $types[2], + 'ZiRan' => $types[9]=='是'?1:0, + 'SeatCount' => $request->post('seats'), + 'HcSanFangTeYue' => $types[12]=='是'?1:0, + 'PurchasePrice' => $request->post('purchase_price'), + 'AutoMoldCode' => $request->post('auto_mold_code'), + 'VehicleYear' => $request->post('vehicle_year'), + 'AutoMoldCodeSource' => 3, + ]; + if($params['QuoteGroup'] == 0) { + return MyLib::error3('请选择保险公司'); + } + if($params['CarUsedType'] == 0) { + return MyLib::error3('请选择车辆使用性质'); + } + if($params['OwnerIdCardType'] == '身份证') $params['OwnerIdCardType'] = 1; + else $params['OwnerIdCardType'] = 9; + if($params['InsuredIdType'] == '身份证') $params['InsuredIdType'] = 1; + else $params['InsuredIdType'] = 9; + if($params['HolderIdType'] == '身份证') $params['HolderIdType'] = 1; + else $params['HolderIdType'] = 9; + + $min_chesun = floatval($request->post('min_chesun')); + $max_chesun = floatval($request->post('max_chesun')); + if($params['CheSun'] > 0 && $min_chesun > 0 && $max_chesun > 0 && ($params['CheSun'] < $min_chesun || $params['CheSun'] > $max_chesun)) { + return MyLib::error3('车损只能填写:'.$min_chesun.' ~ '.$max_chesun.' 之间的值'); + } + if($params['CheSun'] > 0 && $types[10] == '是' && $types[11] == '是') { + $params['ForceTax'] = 1; + } + if($params['CheSun'] == 0 && $types[10] == '是' && $types[11] == '是') { + $params['ForceTax'] = 2; + } + if($params['CheSun'] > 0 && $types[10] == '否' && $types[11] == '否') { + $params['ForceTax'] = 0; + } + if($types[6] == '国产') { + $params['BoLi'] = 1; + } + if($types[6] == '进口') { + $params['BoLi'] = 2; + } + switch($types[7]) { + case '2000元': + $params['HuaHen'] = 2000; + break; + case '5000元': + $params['HuaHen'] = 5000; + break; + case '10000元': + $params['HuaHen'] = 10000; + break; + case '20000元': + $params['HuaHen'] = 20000; + break; + default: + $params['HuaHen'] = 0; + } + switch($types[4]) { + case '1万': + $params['SiJi'] = 10000; + break; + case '2万': + $params['SiJi'] = 20000; + break; + case '3万': + $params['SiJi'] = 30000; + break; + case '4万': + $params['SiJi'] = 40000; + break; + case '5万': + $params['SiJi'] = 50000; + break; + case '10万': + $params['SiJi'] = 100000; + break; + default: + $params['SiJi'] = 0; + } + switch($types[5]) { + case '1万': + $params['ChengKe'] = 10000; + break; + case '2万': + $params['ChengKe'] = 20000; + break; + case '3万': + $params['ChengKe'] = 30000; + break; + case '4万': + $params['ChengKe'] = 40000; + break; + case '5万': + $params['ChengKe'] = 50000; + break; + case '10万': + $params['ChengKe'] = 100000; + break; + default: + $params['ChengKe'] = 0; + } + switch($types[2]) { + case '5万': + $params['SanZhe'] = 50000; + break; + case '10万': + $params['SanZhe'] = 100000; + break; + case '15万': + $params['SanZhe'] = 150000; + break; + case '20万': + $params['SanZhe'] = 200000; + break; + case '30万': + $params['SanZhe'] = 300000; + break; + case '50万': + $params['SanZhe'] = 500000; + break; + case '100万': + $params['SanZhe'] = 1000000; + break; + case '150万': + $params['SanZhe'] = 1500000; + break; + case '200万': + $params['SanZhe'] = 2000000; + break; + default: + $params['SanZhe'] = 0; + } + $client = new Client(['timeout'=> 120]); + $res = $client->request('POST', $url, [ + 'form_params' => $params, + 'http_errors' => false, + ]); + if($res->getStatusCode() == 200) { + $obj = json_decode($res->getBody()); + if($obj->code == 200) { + if($obj->data && $obj->data->UserInfo && $obj->data->UserInfo->CarUsedType != '') { + $car_user_info = CarUseT::find()->where(['name'=>$obj->data->UserInfo->CarUsedType])->one(); + if($car_user_info) { + $obj->data->UserInfo->CarUsedType = $car_user_info->id; + } + } + return MyLib::ok3($obj->data); + } else { + return MyLib::error3($obj->msg); + } + } + return MyLib::error3($res->getBody()); + } + + public function actionGetPrecisePrice() + { + Yii::$app->response->format = Response::FORMAT_JSON; + $request = Yii::$app->request; + $url = Yii::$app->params['userPanel']['get-precise-price']; + $token = Yii::$app->params['userPanel']['token']; + $params = [ + 'token' => $token, + 'LicenseNo' => $request->post('car_no'), + 'QuoteGroup' => $request->post('company_id'), + ]; + $client = new Client(['timeout'=> 120]); + $res = $client->request('POST', $url, [ + 'form_params' => $params, + 'http_errors' => false, + ]); +// echo $url; +// var_dump($params); +// echo $res->getBody(); +// exit; + if($res->getStatusCode() == 200) { + $obj = json_decode($res->getBody()); + if($obj->code == 200) { + if($obj->data && $obj->data->UserInfo && $obj->data->UserInfo->CarUsedType != '') { + $car_user_info = CarUseT::find()->where(['name'=>$obj->data->UserInfo->CarUsedType])->one(); + if($car_user_info) { + $obj->data->UserInfo->CarUsedType = $car_user_info->id; + } + } + return MyLib::ok3($obj->data); + } else { + return MyLib::error3($obj->msg); + } + } + return MyLib::error3($res->getBody()); + } public function actionInfo() { @@ -503,6 +812,7 @@ class CarController extends BaseController $id = $request->get('id',0); $car_info = CarT::findOne(['id'=>$id]); + $order_info = $car_info->getOrders()->orderBy('id DESC')->one(); if(!$order_info) { $user_id = 0; @@ -531,35 +841,6 @@ class CarController extends BaseController $order_info->link_phone = $car_info->phone; $order_info->save(); } - $insurer_type_items = InsurerTypeT::find()->all(); - $insurer_company_items = InsurerCompanyT::find()->all(); - $insurer_company2_items = InsurerCompany2T::find()->all(); - $pay_type_items = PayTypeT::find()->all(); - $car_use_items = CarUseT::find()->all(); - $direction_items = DirectionT::find() - ->all(); - $range_items = RangeT::find() - ->all(); - $city_items = CityT::find() - ->all(); - $district_items = DistrictT::find() - ->orderBy('order_id ASC') - ->all(); - $gift_items = GiftT::find() - ->where('type_id=1') - ->all(); - $success_items = InvalidT::getTree(1); - $failure_items = InvalidT::getTreeXinbaoNew(2); - - $list = MeetT::getAllData(1); - $order_ad=OrderAddress::findOne(['id'=>$order_info->addr_id]); - - $province = Region::find()->asArray()->where(['parent_id'=>0])->andWhere(['level'=>1])->all(); - - $c=[]; - $d=[]; - $e=[]; - $linkMan_items = $car_info->getLinkmen() ->orderBy('created_at desc') ->all(); @@ -568,25 +849,7 @@ class CarController extends BaseController 'user_id' => $this->my->id, 'car_info' => $car_info, 'link_men' => $linkMan_items, - 'insurer_type_items' => $insurer_type_items, 'order_info' => $order_info, - 'insurer_company_items' => $insurer_company_items, - 'insurer_company2_items' => $insurer_company2_items, - 'list' => $list, - 'pay_type_items' => $pay_type_items, - 'car_use_items' => $car_use_items, - 'direction_items' => $direction_items, - 'range_items' => $range_items, - 'city_items' => $city_items, - 'district_items' => $district_items, - 'gift_items' => $gift_items, - 'success_items' => $success_items, - 'failure_items' => $failure_items, - 'province' => $province, - 'city' =>$c, - 'district' =>$d, - 'twon' =>isset($e)?$e:[], - 'order_ad' =>isset($order_ad)?$order_ad:[] ]); } /* @@ -1879,15 +2142,8 @@ class CarController extends BaseController $order_info->link_man_number = $link_man_number; $order_info->company_id = $company_id; - if($order_info->status_id != $status_id) { - if($order_info->return_status_id > 0) { - $order_info->status_id = $order_info->return_status_id; - $order_info->return_status_id = 0; - } else { - $order_info->status_id = $status_id; - $order_info->return_status_id = 0; - } - } + $order_info->status_id = $status_id; + $order_info->return_status_id = 0; $order_info->submit_date = date('Y-m-d'); //商业保险日期 $order_info->insurer1_begin_date = $insurer1_begin_date; diff --git a/frontend/controllers/CommonController.php b/frontend/controllers/CommonController.php index 533e403..9f28501 100644 --- a/frontend/controllers/CommonController.php +++ b/frontend/controllers/CommonController.php @@ -385,6 +385,9 @@ class CommonController extends \yii\web\Controller } public function actionCallPhone() { - return $this->render('call-phone'); + $user_info = $this->my; + return $this->render('call-phone',[ + 'user_info' => $user_info + ]); } } diff --git a/frontend/controllers/DatabaseController.php b/frontend/controllers/DatabaseController.php index 2a26daa..033a88b 100644 --- a/frontend/controllers/DatabaseController.php +++ b/frontend/controllers/DatabaseController.php @@ -207,7 +207,7 @@ class DatabaseController extends BaseController } if($has_phone == 1) { - $query->andWhere('phone<>""'); + $query->andWhere('car_man_phone<>""'); } if($no_insurerdate == 1) { $query->andWhere('insurer1_date="" or insurer1_date is null or insurer1_date="0000-00-00"'); @@ -285,7 +285,7 @@ class DatabaseController extends BaseController $car_info = CarT::findOne(['id'=>$id]); if($car_info->location == 1) { $car_info->location = 2; - $car_info->xubao_num = 0; + $car_info->is_xubao = 0; if(!$car_info->save(false)) { throw new Exception(print_r($car_info->getFirstErrors(),true)); } @@ -298,6 +298,12 @@ class DatabaseController extends BaseController if(!$b_info->save(false)) { throw new Exception(print_r($b_info->getFirstErrors(),true)); } + } else { + $b_info->user_id = 0; + if(!$b_info->save(false)) { + throw new Exception(print_r($b_info->getFirstErrors(),true)); + } + $this->addLog($car_info->id,'从B库回收成未分配状态',1); } $this->addLog($car_info->id,'从A库分配到B库',1); } @@ -333,7 +339,7 @@ class DatabaseController extends BaseController foreach($query->each(1000) as $car_info) { if($car_info->location == 1) { $car_info->location = 2; - $car_info->xubao_num = 0; + $car_info->is_xubao = 0; if(!$car_info->save(false)) { throw new Exception(print_r($car_info->getFirstErrors(),true)); } @@ -346,6 +352,12 @@ class DatabaseController extends BaseController if(!$b_info->save(false)) { throw new Exception(print_r($b_info->getFirstErrors(),true)); } + } else { + $b_info->user_id = 0; + if(!$b_info->save(false)) { + throw new Exception(print_r($b_info->getFirstErrors(),true)); + } + $this->addLog($car_info->id,'从B库回收成未分配状态',1); } $this->addLog($car_info->id,'从A库分配到B库',1); } @@ -383,7 +395,7 @@ class DatabaseController extends BaseController $car_info = CarT::findOne(['id'=>$id]); if($car_info->location == 1) { $car_info->location = 3; - $car_info->xubao_num = 1; + $car_info->is_xubao = 1; if(!$car_info->save(false)) { throw new Exception(print_r($car_info->getFirstErrors(),true)); } @@ -396,6 +408,12 @@ class DatabaseController extends BaseController if(!$c_info->save(false)) { throw new Exception(print_r($c_info->getFirstErrors(),true)); } + } else { + $c_info->user_id = 0; + if(!$c_info->save(false)) { + throw new Exception(print_r($c_info->getFirstErrors(),true)); + } + $this->addLog($car_info->id,'从C库回收成未分配状态',1); } $this->addLog($car_info->id,'从A库分配到C库',1); } @@ -647,10 +665,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 +842,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()) { @@ -988,20 +1006,23 @@ class DatabaseController extends BaseController } $b_info = CarBT::findOne(['id'=>$id]); - if($b_info->user_id > 0) { - //删除预约 - AppointmentT::deleteAll('car_id='.$b_info->id); - - //删除保单 还没有正本生成的保单可以直接删除,正本生成后,需要退单操作 - //删除操作人员 - $orders = OrderT::find() - ->where('car_id='.$b_info->id.' and status_id<5') - ->all(); - foreach($orders as $order_info) { - OrderUserT::deleteAll('order_id='.$order_info->id); - //删除保单 - $order_info->delete(); + if($b_info) { + if($b_info->user_id > 0) { + //删除预约 + AppointmentT::deleteAll('car_id='.$b_info->id); + + //删除保单 还没有正本生成的保单可以直接删除,正本生成后,需要退单操作 + //删除操作人员 + $orders = OrderT::find() + ->where('car_id='.$b_info->id.' and status_id<5') + ->all(); + foreach($orders as $order_info) { + OrderUserT::deleteAll('order_id='.$order_info->id); + //删除保单 + $order_info->delete(); + } } + $b_info->delete(); } $this->addLog($car_info->id,'从B库移动到无效库',1); } @@ -1214,10 +1235,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 +1409,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)); } @@ -1555,6 +1576,12 @@ class DatabaseController extends BaseController if(!$d_info->save(false)) { throw new Exception(print_r($d_info->getFirstErrors(),true)); } + } else { + $d_info->user_id = 0; + if(!$d_info->save(false)) { + throw new Exception(print_r($d_info->getFirstErrors(),true)); + } + $this->addLog($car_info->id,'从D库回收成未分配状态',1); } $this->addLog($car_info->id,'从C库分配到D库',1); } @@ -1601,6 +1628,12 @@ class DatabaseController extends BaseController if(!$d_info->save(false)) { throw new Exception(print_r($d_info->getFirstErrors(),true)); } + } else { + $d_info->user_id = 0; + if(!$d_info->save(false)) { + throw new Exception(print_r($d_info->getFirstErrors(),true)); + } + $this->addLog($car_info->id,'从D库回收成未分配状态',1); } $this->addLog($car_info->id,'从C库分配到D库',1); } @@ -1659,20 +1692,23 @@ class DatabaseController extends BaseController } $c_info = CarCT::findOne(['id'=>$id]); - if($c_info->user_id > 0) { - //删除预约 - AppointmentT::deleteAll('car_id='.$c_info->id); - - //删除保单 还没有正本生成的保单可以直接删除,正本生成后,需要退单操作 - //删除操作人员 - $orders = OrderT::find() - ->where('car_id='.$c_info->id.' and status_id<5') - ->all(); - foreach($orders as $order_info) { - OrderUserT::deleteAll('order_id='.$order_info->id); - //删除保单 - $order_info->delete(); + if($c_info) { + if($c_info->user_id > 0) { + //删除预约 + AppointmentT::deleteAll('car_id='.$c_info->id); + + //删除保单 还没有正本生成的保单可以直接删除,正本生成后,需要退单操作 + //删除操作人员 + $orders = OrderT::find() + ->where('car_id='.$c_info->id.' and status_id<5') + ->all(); + foreach($orders as $order_info) { + OrderUserT::deleteAll('order_id='.$order_info->id); + //删除保单 + $order_info->delete(); + } } + $c_info->delete(); } $this->addLog($car_info->id,'从C库移动到无效库',1); } @@ -1889,10 +1925,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 +2096,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; @@ -2236,20 +2272,23 @@ class DatabaseController extends BaseController } $d_info = CarDT::findOne(['id'=>$id]); - if($d_info->user_id > 0) { - //删除预约 - AppointmentT::deleteAll('car_id='.$d_info->id); - - //删除保单 还没有正本生成的保单可以直接删除,正本生成后,需要退单操作 - //删除操作人员 - $orders = OrderT::find() - ->where('car_id='.$d_info->id.' and status_id<5') - ->all(); - foreach($orders as $order_info) { - OrderUserT::deleteAll('order_id='.$order_info->id); - //删除保单 - $order_info->delete(); + if($d_info) { + if($d_info->user_id > 0) { + //删除预约 + AppointmentT::deleteAll('car_id='.$d_info->id); + + //删除保单 还没有正本生成的保单可以直接删除,正本生成后,需要退单操作 + //删除操作人员 + $orders = OrderT::find() + ->where('car_id='.$d_info->id.' and status_id<5') + ->all(); + foreach($orders as $order_info) { + OrderUserT::deleteAll('order_id='.$order_info->id); + //删除保单 + $order_info->delete(); + } } + $d_info->deletel(); } $this->addLog($car_info->id,'从C库移动到无效库',1); } @@ -2385,7 +2424,7 @@ class DatabaseController extends BaseController $row['car_man'] = MyLib::substr_cut($car_info->car_man, 8); $row['op_user'] = $item->user?$item->user->getShowName():''; $row['invalid_info'] = $item->invalid->getPath(); - $row['invalid_time'] = $item->invalid->created_at; + $row['invalid_time'] = $item->created_at; $data['rows'][] = $row; } return $data; diff --git a/frontend/controllers/FinanceController.php b/frontend/controllers/FinanceController.php index d2bd428..c4f09ee 100644 --- a/frontend/controllers/FinanceController.php +++ b/frontend/controllers/FinanceController.php @@ -213,15 +213,22 @@ class FinanceController extends \frontend\controllers\UserBaseController $data['rows'] = []; foreach($items as $item) { $row = $item->toArray(); - $row['group'] = $item->user->group->name; - $row['company_name'] = $item->order->company2->name; - $row['username'] = $item->user->getShowName(); - $row['submit_date'] = $item->order->submit_date; - $row['print_date'] = $item->order->print_date; + $row['group'] = $item->user && $item->user->group ? $item->user->group->name : ''; + $row['company_name'] = $item->order && $item->order->company2 ? $item->order->company2->name : 0; + $row['username'] = $item->user ? $item->user->getShowName() : 0; + $row['submit_date'] = $item->order ? $item->order->submit_date : ''; + $row['print_date'] = $item->order ? $item->order->print_date : ''; $row['total_real'] = round($item->total_clear_real + $item->total_tax_real,2); $data['rows'][] = $row; } + $data['rows'][] = array( + ['商业保总额', $sum_total], + ['商业净保总额', $sum_total_clear], + ['回款总额', $sum_r_total], + ['回款差额', $sum_total_dis] + ); + return $data; } public function actionReceiptImport() { @@ -3264,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); @@ -5147,12 +5154,20 @@ class FinanceController extends \frontend\controllers\UserBaseController $row['is_leave'] = $item->is_leave ? '已离职':''; $pay_info = $item->getPay($pay_date); $row['status_name'] = $pay_info ? $pay_info->getStatus($pay_info->status_id) : ''; - $row['real_pay'] = $pay_info->base_real_pay; - $row['should_pay'] = $pay_info->ticheng_real_pay; - $row['is_show'] = ($pay_info->renshi_status_id > 0 && $pay_info->chuna_status_id > 0 && $pay_info->status_id != 7 && $pay_info->status_id != 8) ? 1 : 0; + $row['real_pay'] = $pay_info ? $pay_info->base_real_pay : ''; + $row['should_pay'] = $pay_info ? $pay_info->ticheng_real_pay : ''; + $row['is_show'] = $pay_info && ($pay_info->renshi_status_id > 0 && $pay_info->chuna_status_id > 0 && $pay_info->status_id != 7 && $pay_info->status_id != 8) ? 1 : 0; $data['rows'][] = $row; } + $pay_chexian = PayT::find() + ->where("pay_date='{$pay_date}'") + ->sum('ticheng_real_pay'); + + $data['rows'][] = array( + ['提成工资总额', number_format($pay_chexian,2)], + ); + return $data; } @@ -6543,6 +6558,7 @@ class FinanceController extends \frontend\controllers\UserBaseController $query->andWhere('order_t.print_date<="' . $end_date . '"'); } $total = $query->count(); + $sum_total1_clear = $query->sum('total1_clear'); $query->offset($offset)->limit($limit); $items = $query->all(); @@ -6561,6 +6577,10 @@ class FinanceController extends \frontend\controllers\UserBaseController $data['rows'][] = $row; } + $data['rows'][] = array( + ['商业净保总额', number_format($sum_total1_clear,2)], + ); + return $data; } @@ -6718,19 +6738,14 @@ class FinanceController extends \frontend\controllers\UserBaseController $group_ids = []; if($group_id > 0) { $items = GroupT::getTree($group_id); - $group_ids[] = $group_id; foreach($items as $group_info) { $group_ids[] = $group_info->id; } } - - $query = CaiwuT::find() ->leftJoin(OrderT::tableName(), "order_t.id=caiwu_t.order_id") - ->where('order_t.status_id>1') - ->orderBy('order_t.print_date DESC'); - + ->where('order_t.status_id>1'); if($user_names != '' && $user_names != 'null'){ $user_arr = explode(',',$user_names); $user_ids = []; @@ -6739,40 +6754,33 @@ class FinanceController extends \frontend\controllers\UserBaseController if($user) $user_ids[] = $user->id; } - $query->andWhere(['in','caiwu_t.user_id',$user_ids]); } - if( $company_id > 0) { $query->andWhere('order_t.company2_id='.$company_id); } if( $car_no != '') { $query->andWhere('order_t.car_no="'.$car_no.'"'); } - if($car_no_type == 1){ $query->andWhere('caiwu_t.car_no like "' . '京' . '%"'); }elseif($car_no_type == 2){ $query->andWhere('caiwu_t.car_no not like "' . '京' . '%"'); } - if($begin_totalclear != ''){ $query->andWhere('caiwu_t.total_clear >=' . $begin_totalclear); } if($end_totalclear != ''){ $query->andWhere('caiwu_t.total_clear <=' . $end_totalclear); } - if ($begin_date != "") { $query->andWhere('order_t.print_date>="' . $begin_date . '"'); } if ($end_date != "") { $query->andWhere('order_t.print_date<="' . $end_date . '"'); } - $user_items = $this->my->getChildren(''); $user_items[] = $this->my; - $row = array(); foreach($user_items as $user_info) { if ($group_id > 0) { @@ -6782,58 +6790,46 @@ class FinanceController extends \frontend\controllers\UserBaseController } $row[] = $user_info->id; } - //加上级别筛选 if($group_id > 0){ $query->andWhere(['in','caiwu_t.user_id',$row]); } - - $query1 = clone $query; if($insurer_type ==1){ $query->andWhere('caiwu_t.insurer_type=1'); } - - - $items = $query->all(); - - $total2_clear_all = $query1->andWhere('caiwu_t.insurer_type=2')->sum('total_clear'); - - $yewu_ticheng_all = 0; - $total1_clear_all = 0; - $yeji_ticheng_all = 0; - $ticheng_money_all = 0; - $lipin_all = 0; - $liquan_all = 0; - $yuangong_money_all = 0; - foreach($items as $index => $item) { - $order_caiwu_info = $item->orderCaiwu; - $order_info = $item->order; - - $total1_clear_all += $item->total_clear; - $yewu_ticheng_all += $order_caiwu_info ? $order_caiwu_info->yewu_ticheng : 0; - $yeji_ticheng_all += $order_caiwu_info ? $order_caiwu_info->yeji_ticheng : 0; - $ticheng_money_all += $order_info ? $order_info->ticheng_money : 0; - $lipin_all += $order_info ? $order_info->getGiftPrice(1,1) : 0; - $liquan_all += $order_info ? $order_info->getGiftPrice(1,2) : 0; - $yuangong_money = 0; - if($order_info){ - $yuangong_money = $order_info->yuangong_money>0?$order_info->yuangong_money:0; - } - $yuangong_money_all += $yuangong_money; - - } -// echo $query->createCommand()->rawSql;exit; + $query1 = clone $query; + $sums = $query1 + ->leftJoin(OrderCaiwuT::tableName(), "order_t.id=order_caiwu_t.order_id") + ->select([ + 'sum_total1_clear' => 'sum(order_t.total1_clear)', + 'sum_total2_clear' => 'sum(order_t.total2_clear)', + 'sum_yeji_ticheng' => 'sum(order_caiwu_t.yeji_ticheng)', + 'sum_ticheng_money' => 'sum(order_caiwu_t.ticheng_money)', + 'sum_yuangong_money' => 'sum(order_caiwu_t.yuangong_money)', + 'sum_yewu_ticheng' => 'sum(order_caiwu_t.yewu_ticheng)', + ])->asArray()->one(); + $query2 = clone $query; + $gift_sum = $query2 + ->leftJoin(OrderGiftT::tableName(), "order_gift_t.order_id=caiwu_t.order_id") + ->leftJoin(GiftT::tableName(), "gift_t.id=order_gift_t.gift_id") + ->andWhere('order_gift_t.gift_type=1 && order_gift_t.is_free=2') + ->sum('gift_t.price'); + $query2 = clone $query; + $voucher_sum = $query2 + ->leftJoin(OrderGiftT::tableName(), "order_gift_t.order_id=caiwu_t.order_id") + ->leftJoin(GiftT::tableName(), "gift_t.id=order_gift_t.gift_id") + ->andWhere('order_gift_t.gift_type=2 && order_gift_t.is_free=2') + ->sum('gift_t.price'); $total = $query->count(); - - $query->offset($offset)->limit($limit); - $items = $query->all(); + $query=$query->offset($offset)->limit($limit); + $items = $query->orderBy('order_t.print_date DESC')->all(); $data = []; $data['total'] = $total; $data['rows'] = []; foreach($items as $item) { $row = $item->toArray(); - $row['company_name'] = $item->order->company2->name; + $row['company_name'] = $item->order->company2?$item->order->company2->name:''; $row['print_date'] = $item->order->print_date; $row['yeji_rate'] = $item->orderCaiwu->yeji_rate; $row['yeji_ticheng'] = $item->orderCaiwu->yeji_ticheng; @@ -6844,17 +6840,17 @@ class FinanceController extends \frontend\controllers\UserBaseController $row['yuangong_money'] = $item->order->yuangong_money; $row['yewu_ticheng'] = $item->orderCaiwu->yewu_ticheng; if($item->order->car->op2_id > 0) { - $row['op_user'] = $item->order->car->op2->showName; - $row['op_user1'] = $item->order->car->op1->showName; + $row['op_user'] = $item->order->car->op2?$item->order->car->op2->showName:''; + $row['op_user1'] = $item->order->car->op1?$item->order->car->op1->showName:''; } else { - $row['op_user'] = $item->order->car->op1->showName; + $row['op_user'] = $item->order->car->op1?$item->order->car->op1->showName:''; $row['op_user1'] = ''; } $row['first_xinbao_ticheng'] = $item->orderCaiwu->first_xinbao_ticheng; $row['hebao_ticheng'] = $item->orderCaiwu->hebao_ticheng; - $row['op1_user'] = $item->order->op1->showName; + $row['op1_user'] = $item->order->op1?$item->order->op1->showName:''; $row['zhengben_ticheng'] = $item->orderCaiwu->zhengben_ticheng; - $row['op2_user'] = $item->order->op2->showName; + $row['op2_user'] = $item->order->op2?$item->order->op2->showName:''; $row['dz_ticheng1'] = $item->orderCaiwu->dz_ticheng1; $row['dz_names1'] = $item->orderCaiwu->dz_names1; $row['dz_ticheng2'] = $item->orderCaiwu->dz_ticheng2; @@ -6867,6 +6863,16 @@ class FinanceController extends \frontend\controllers\UserBaseController $row['dz_names5'] = $item->orderCaiwu->dz_names5; $data['rows'][] = $row; } + $data['rows'][] = array( + ['保费总额', number_format($sums['sum_total1_clear'] + $sums['sum_total2_clear'],2)], + ['商业净保总额', number_format($sums['sum_total1_clear'],2)], + ['基本提成合计', number_format($sums['sum_yeji_ticheng'],2)], + ['加点提成合计', number_format($sums['sum_ticheng_money'],2)], + ['自费礼品合计', number_format($gift_sum,2)], + ['自费礼券合计', number_format($voucher_sum,2)], + ['自费减免合计', number_format($sums['sum_yuangong_money'],2)], + ['提成合计', number_format($sums['sum_yewu_ticheng'],2)] + ); return $data; } @@ -7380,6 +7386,9 @@ class FinanceController extends \frontend\controllers\UserBaseController $query = $query->offset($offset)->limit($limit); $items = $query->all(); + $pay_chexian = PayOrderUserT::find() + ->where("pay_date='{$pay_date}'") + ->sum('real_pay'); $data = []; $data['total'] = $total; @@ -7395,6 +7404,10 @@ class FinanceController extends \frontend\controllers\UserBaseController $data['rows'][] = $row; } + $data['rows'][] = array( + ['提成工资总额', number_format($pay_chexian,2)], + ); + return $data; } /** @@ -7586,7 +7599,6 @@ class FinanceController extends \frontend\controllers\UserBaseController $limit = $request->get('limit', 10); $user_id = $this->my->id; -// var_dump($user_id); $query = UserT::find() ->leftJoin('pay_t','pay_t.user_id=user_t.id') ->where('group_id>0 and is_delete=0'); @@ -7611,10 +7623,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'] = []; @@ -7631,8 +7639,17 @@ class FinanceController extends \frontend\controllers\UserBaseController $data['rows'][] = $row; } + $pay_chexian = PayT::find() + ->where("pay_date='{$pay_date}'") + ->sum('ticheng_real_pay'); + + $data['rows'][] = array( + ['提成工资总额', number_format($pay_chexian,2)], + ); + return $data; } + /** * 出纳工资-详情 * @return string @@ -7759,12 +7776,26 @@ class FinanceController extends \frontend\controllers\UserBaseController ]); } - public function actionReceiptLirun() + public function actionReceiptLirun() { + $company_items = InsurerCompany2T::find()->all(); + $group_items = GroupT::getTree((int)$this->my->group_id); + if($this->my->id == 1) + $group_items = GroupT::getTree(); + + return $this->render('receipt-lirun',[ + 'company_items' => $company_items, + 'group_items' => $group_items + ]); + } + + public function actionReceiptLirunJson() { + Yii::$app->response->format = Response::FORMAT_JSON; set_time_limit(0); ini_set('memory_limit', '3072M'); $request = Yii::$app->request; - $page = $request->get('page', 1); + $offset = $request->get('offset', 0); + $limit = $request->get('limit', 10); $insurer_type = $request->get('insurer_type', 0); $begin_date = $request->get('begin_date',date('Y-m-d')); $end_date = $request->get('end_date',date('Y-m-d')); @@ -7781,245 +7812,192 @@ class FinanceController extends \frontend\controllers\UserBaseController $zbname = $request->get('zbname'); //级别 $group_id = $request->get('group_id'); - $group_items = GroupT::getTree((int)$this->my->group_id); - if($this->my->id == 1 || $this->my->username=='6002' || $this->my->username=='7053') - $group_items = GroupT::getTree(); $group_ids[] = $group_id; - if($group_id > 0) { $items = GroupT::getTree($group_id); - foreach($items as $group_info) { $group_ids[] = $group_info->id; } } -// var_dump($group_ids); - - if ($page < 1) $page = 1; $query = CaiwuT::find() ->leftJoin(OrderT::tableName(), "order_t.id=caiwu_t.order_id") ->where('order_t.status_id>1'); -// ->orderBy('order_t.print_date DESC'); - - switch ($sort_key) { - case 'total': - $sort = 'caiwu_t.total '; - break; - case 'total_clear': - $sort = 'caiwu_t.total_clear '; - break; - case 'total_rate': - $sort = 'caiwu_t.total_rate '; - break; - case 'print_date'://默认按照print_date排序 - default: - $sort = 'order_t.print_date '; - break; - } - - switch ($sort_value) { - case 'ASC': - $sort .= 'ASC'; - break; - case 'DESC': - default: - $sort .= 'DESC'; - break; - } - - $query = $query->orderBy($sort); - if( $insurer_type != 0) { - $query = $query->andWhere('caiwu_t.insurer_type='.$insurer_type); + $query->andWhere('caiwu_t.insurer_type='.$insurer_type); } - if( $company_id > 0) { - $query = $query->andWhere('order_t.company_id='.$company_id); + $query->andWhere('order_t.company2_id='.$company_id); } if ($username != "") { -// $userdata = UserT::findOne(['username'=>$username]); $userdata = UserT::find()->where('username="'.$username.'"')->andwhere('is_leave=0')->one(); if($userdata){ - $query = $query->andWhere('caiwu_t.user_id = ' . $userdata->id . ''); + $query->andWhere('caiwu_t.user_id = ' . $userdata->id . ''); } } - if ($hebaoname != "") { -// $userdata = UserT::findOne(['username'=>$username]); $userdata = UserT::find()->where('username="'.$hebaoname.'"')->andwhere('is_leave=0')->one(); if($userdata){ - $query = $query->andWhere('order_t.op1_id = ' . $userdata->id . ''); + $query->andWhere('order_t.op1_id = ' . $userdata->id . ''); } } - if ($zbname != "") { -// $userdata = UserT::findOne(['username'=>$username]); $userdata = UserT::find()->where('username="'.$zbname.'"')->andwhere('is_leave=0')->one(); if($userdata){ - $query = $query->andWhere('order_t.op2_id = ' . $userdata->id . ''); + $query->andWhere('order_t.op2_id = ' . $userdata->id . ''); } } - if ($car_no != "") { - $query = $query->andWhere('caiwu_t.car_no like "%' . $car_no . '%"'); + $query->andWhere('caiwu_t.car_no like "%' . $car_no . '%"'); } - if ($insurer_no != "") { - $query = $query->andWhere('caiwu_t.insurer_no like "' . $insurer_no . '%"'); + $query->andWhere('caiwu_t.insurer_no like "' . $insurer_no . '%"'); } if ($status > 0) { if ($status == 1) { - $query = $query->andWhere('r_date="" or r_date is null'); + $query->andWhere('r_date="" or r_date is null'); } if ($status == 2) { - $query = $query->andWhere('r_date<>"" and total_dis=0'); + $query->andWhere('r_date<>"" and total_dis=0'); } if($status == 3) { - $query = $query->andWhere('r_date<>"" and total_dis<>0'); + $query->andWhere('r_date<>"" and total_dis<>0'); } } if ($begin_date != "") { - $query = $query->andWhere('order_t.print_date>="' . $begin_date . '"'); + $query->andWhere('order_t.print_date>="' . $begin_date . '"'); } if ($end_date != "") { - $query = $query->andWhere('order_t.print_date<="' . $end_date . '"'); + $query->andWhere('order_t.print_date<="' . $end_date . '"'); } if ($r_begin_date != "") { - $query = $query->andWhere('caiwu_t.r_date>="' . $r_begin_date . '"'); + $query->andWhere('caiwu_t.r_date>="' . $r_begin_date . '"'); } if ($r_end_date != "") { - $query = $query->andWhere('caiwu_t.r_date<="' . $r_end_date . '"'); + $query->andWhere('caiwu_t.r_date<="' . $r_end_date . '"'); } //找出$group_id 有多少在职的user_ids // 现在的搜索条件 $userSql = ''; -// if($username != '') { -// $userSql = ' username like "'.$username.'" and '; -// } - //$userSql .= 'is_locked=0 and is_login=1'; - $user_items = $this->my->getChildren($userSql); - if($this->my->username == '6002' || $this->my->username == '7053') - $user_items = $this->my->getChildren($userSql,1); $user_items[] = $this->my; - $row = array(); foreach($user_items as $user_info) { -// if ($user_info->is_leave == 1) continue; -// var_dump($user_info); if ($group_id > 0) { if (!in_array($user_info->group_id, $group_ids)) { continue; } } - $row[] = $user_info->id; - } - -// var_dump($row); //加上级别筛选 if($group_id > 0){ -// $query = $query->andWhere('order_t.company_id='.$company_id); - $query = $query->andWhere(['in','caiwu_t.user_id',$row]); -// $query = $query->andWhere('caiwu_t.user_id ="' . $group_id . '"'); + $query->andWhere(['in','caiwu_t.user_id',$row]); } - - $query1 = clone $query; - - - $item1s = $query1->all(); - -// echo $query->createCommand()->rawSql; $total = $query->count(); - $sum_r_total = $query->sum('r_total'); - //商业净保费综合 - $sum_total_clear = $query->sum('total_clear'); //是错误的 - - //商业总保费 - $sum_total = $query->sum('total'); - - $sum_total_dis = $query->sum('total_dis'); + $query1 = clone $query; + $sums = $query1->select([ + 'sum_total1' => 'sum(order_t.total1)', + 'sum_r_total' => 'sum(caiwu_t.r_total)', + 'sum_total1_clear' => 'sum(order_t.total1_clear)', + 'sum_budian' => 'sum(order_t.yuangong_money)', + 'sum_r_budian' => 'sum(ifnull(caiwu_t.budian_rate,0)*total_clear/100)', + 'sum_total1_dis' => 'sum(order_t.total1_dis)', + ])->asArray()->one(); + $query2 = clone $query; + $gift_sum = $query2 + ->leftJoin(OrderGiftT::tableName(), "order_gift_t.order_id=caiwu_t.order_id") + ->leftJoin(GiftT::tableName(), "gift_t.id=order_gift_t.gift_id") + ->andWhere('caiwu_t.insurer_type=1') + ->andWhere('order_gift_t.gift_type=1 && order_gift_t.is_free=2') + ->sum('gift_t.price'); + $query2 = clone $query; + $voucher_sum = $query2 + ->leftJoin(OrderGiftT::tableName(), "order_gift_t.order_id=caiwu_t.order_id") + ->leftJoin(GiftT::tableName(), "gift_t.id=order_gift_t.gift_id") + ->andWhere('caiwu_t.insurer_type=1') + ->andWhere('order_gift_t.gift_type=2 && order_gift_t.is_free=2') + ->sum('gift_t.price'); + $query2 = clone $query; + $gongzi_sum = $query2 + ->leftJoin(PayOrderUserT::tableName(), "pay_order_user_t.order_id=caiwu_t.order_id") + ->andWhere('caiwu_t.insurer_type=1') + ->sum('pay_order_user_t.real_pay'); - $pagination = new Pagination(['totalCount' => $total, 'pageSize' => 20]); - $pagination->setPage($page - 1); + switch ($sort_key) { + case 'total': + $sort = 'caiwu_t.total '; + break; + case 'total_clear': + $sort = 'caiwu_t.total_clear '; + break; + case 'total_rate': + $sort = 'caiwu_t.total_rate '; + break; + case 'print_date'://默认按照print_date排序 + default: + $sort = 'order_t.print_date '; + break; + } + switch ($sort_value) { + case 'ASC': + $sort .= 'ASC'; + break; + case 'DESC': + default: + $sort .= 'DESC'; + break; + } - $query = $query->offset($pagination->offset)->limit($pagination->limit); + $query = $query->orderBy($sort)->offset($offset)->limit($limit); $items = $query->all(); - $lirun_all = 0; - $gongzi_all = 0; - $liwu_all = 0; - $total1_dis_all = 0; - $bu_dian_all = 0; - $r_bu_dian_all = 0; - foreach($item1s as $item){ - - + $data = []; + $data['total'] = $total; + $data['rows'] = []; + foreach($items as $item) { $order_info = $item->order; - - $total_clear_real = $item->total_clear * $item->total_rate/100; - $total1_dis = $item->insurer_type == 1?($order_info->total1_dis + $order_info->yuangong_money):0; - - $gongzi = $item->insurer_type == 1?$item->getPayOrderUser()->sum('real_pay'):0; + $user_info = $item->user; + $row = $item->toArray(); + $row['username'] = $user_info->username; + $row['company_name'] = $order_info ? $order_info->company2->name : ''; + $row['group_name'] = $user_info->group ? $user_info->group->path : ''; + $row['submit_date'] = $order_info ? $order_info->submit_date : ''; + $row['print_date'] = $order_info ? $order_info->print_date : ''; + if($item->insurer_type == 1) { + $row['insurer_type'] = '商业'; + } else { + $row['insurer_type'] = '交强'; + } + $row['total_real'] = round($item->total * $item->total_rate/100,2); + $row['total_clear_real'] = round($item->total_clear * $item->total_rate/100,2); + $row['bu_dian'] = $item->budian_rate?round($item->budian_rate * $item->total_clear,2) / 100:0; + $row['r_bu_dian'] = $item->insurer_type == 1?round($item->b1_total+$item->b2_total+$item->b3_total,2):0; + $row['total1_dis'] = $item->insurer_type == 1?round($order_info->total1_dis + $order_info->yuangong_money,2):0; $ticket = $item->insurer_type == 1?$order_info->getGiftPrice(1,1):0; $gift = $item->insurer_type == 1?$order_info->getGiftPrice(1,2):0; - $r_bu_dian = $item->insurer_type == 1?($item->b1_total+$item->b2_total+$item->b3_total):0; - $bu_dian = $item->budian_rate?$item->budian_rate * $item->total_clear / 100:0; - $liwu = $ticket + $gift; - - $lirun_all += $total_clear_real + $bu_dian - $total1_dis - $gongzi - $liwu; - - $gongzi_all += $gongzi; - $liwu_all += $liwu; - $total1_dis_all += $total1_dis; - $bu_dian_all += $bu_dian; - $r_bu_dian_all += $r_bu_dian; - + $row['liwu'] = round($ticket + $gift,2); + $row['gongzi'] = $item->insurer_type == 1?round($item->getPayOrderUser()->sum('real_pay'),2):0; + $row['lirun'] = round($row['total_clear_real'] + $row['bu_dian'] - $row['total1_dis'] - $row['gongzi'] - $row['liwu'],2); + $data['rows'][] = $row; } -// var_dump($items); - - $page_info = MyLib::getPageInfo($pagination); - - $company_items = InsurerCompanyT::find()->all(); + $data['rows'][] = array( + ['商业保总额', number_format($sums['sum_total1'],2)], + ['商业净保总额', number_format($sums['sum_total1_clear'],2)], + ['回款总额', number_format($sums['sum_r_total'],2)], + ['补点总额', number_format($sums['sum_budian'],2)], + ['回款补点总额', number_format($sums['sum_r_budian'],2)], + ['减免总额', number_format($sums['sum_total1_dis'],2)], + ['礼品礼券自费总额', number_format($gift_sum + $voucher_sum,2)], + ['工资总额', number_format($gongzi_sum,2)], + ['利润总额', number_format($sums['sum_total1_clear'] + $sums['sum_budian'] - $sums['sum_total1_dis'] - $gongzi_sum - $gift_sum - $voucher_sum,2)], + ); - return $this->render('receipt-lirun', [ - 'items' => $items, - 'username' => $username, - 'hebaoname' => $hebaoname, - 'zbname' => $zbname, - 'page' => $page, - 'car_no' => $car_no, - 'insurer_no' => $insurer_no, - 'status' => $status, - 'begin_date' => $begin_date, - 'end_date' => $end_date, - 'r_begin_date' => $r_begin_date, - 'r_end_date' => $r_end_date, - 'page_info' => $page_info, - 'sort_key' => $sort_key, - 'sort_value' => $sort_value, - 'sum_r_total' => $sum_r_total, - 'sum_total_clear' => $sum_total_clear, - 'sum_total' => $sum_total, - 'sum_total_dis' => $sum_total_dis, - 'company_items' => $company_items, - 'group_id' => $group_id, - 'group_items' => $group_items, - 'company_id' => $company_id, - 'insurer_type' => $insurer_type, - 'lirun_all'=>$lirun_all, - 'gongzi_all'=>$gongzi_all, - 'liwu_all'=>$liwu_all, - 'total1_dis_all'=>$total1_dis_all, - 'bu_dian_all'=>$bu_dian_all, - 'r_bu_dian_all'=>$r_bu_dian_all - ]); + return $data; } public function actionGongziAllReturnSave() diff --git a/frontend/controllers/FixCarController.php b/frontend/controllers/FixCarController.php index 7f4cf26..d85d49f 100644 --- a/frontend/controllers/FixCarController.php +++ b/frontend/controllers/FixCarController.php @@ -207,9 +207,6 @@ class FixCarController extends BaseController $info->displacement_id = $car_info->displacement_id; $info->car_year = $car_info->car_year; $info->status = $status; -// var_dump($car_info->car_year); -// var_dump($info->car_year); -// die; } if($car_id == 0) { $car_id = $info->car_id; diff --git a/frontend/controllers/GiftController.php b/frontend/controllers/GiftController.php index 9a1145d..2c63b38 100644 --- a/frontend/controllers/GiftController.php +++ b/frontend/controllers/GiftController.php @@ -59,7 +59,7 @@ class GiftController extends \yii\web\Controller $query = GiftT::find() ->where('is_delete=0'); if($type_id > 0) { - $query = $query->andWhere('typeid='.$type_id); + $query = $query->andWhere('type_id='.$type_id); } if($name != '') { $query = $query->andWhere('name like "'.$name.'"'); @@ -75,7 +75,7 @@ class GiftController extends \yii\web\Controller $data['rows'] = []; foreach($items as $item) { $row = $item->toArray(); - $row['type'] = $item->getShowType(); + $row['type'] = $item->showType; $data['rows'][] = $row; } @@ -818,7 +818,7 @@ class GiftController extends \yii\web\Controller ->leftJoin('order_t','order_t.id=gift_ticket_t_use.order_id') ->leftJoin('gift_t','gift_t.id=gift_ticket_t_use.type_id') ->leftJoin('user_t','user_t.id=gift_ticket_t_use.user_id') - ->where('gift_t.type_id=2') + ->where('gift_t.type_id=1') ->orderBy('id DESC'); if($code != '') { $query->andWhere('gift_ticket_t_use.code="'.$code.'"'); @@ -1095,6 +1095,25 @@ class GiftController extends \yii\web\Controller return $data; } + + public function actionGiftUseEdit() + { + $request = Yii::$app->request; + $id = $request->get('id',0); + $back_params = $request->get('back_params'); + if($id > 0) { + $info = GiftTicketTUse::findOne(['id'=>$id]); + } else { + $info = new GiftTicketTUse(); + } + + + + return $this->render('gift-use-edit',[ + 'info' => $info + ]); + } + public function actionTicketUseEdit() { $request = Yii::$app->request; @@ -1114,7 +1133,6 @@ class GiftController extends \yii\web\Controller } public function actionHistoryLogJson() { - Yii::$app->response->format = Response::FORMAT_JSON; Yii::$app->response->format = Response::FORMAT_JSON; $request = Yii::$app->request; $id = $request->get('id'); diff --git a/frontend/controllers/InsurerController.php b/frontend/controllers/InsurerController.php index e0c84b0..c5fd1d1 100644 --- a/frontend/controllers/InsurerController.php +++ b/frontend/controllers/InsurerController.php @@ -131,20 +131,6 @@ class InsurerController extends BaseController if($order_info->non_id){ $nonitems=NonAutoInsurance::findOne(['id'=>$order_info->non_id]); } -// dd($order_info->non_id); - //快递 -// dd($car_info->id); -// $ems_items = EmsT::find() -// ->where(['car_id'=>$car_info->id,'order_id'=>$order_info->id]) -// ->orderBy('id ASC') -// ->all(); -// $ems_items1=(object)array(); -// if(!$ems_items){ -// $ems_items1 = ExpressT::find() -// ->where(['car_id'=>$car_info->id,'order_id'=>$order_info->id]) -// ->orderBy('id ASC') -// ->all(); -// } //礼品 $gift_free_group_items = GiftGroupT::find() ->where('is_free=1') @@ -177,8 +163,6 @@ class InsurerController extends BaseController return $this->render('info',[ 'order_info'=>$order_info, 'car_info'=>$car_info, -// 'ems_items' => $ems_items, -// 'ems_items1' => $ems_items1, 'money_man' => $money_man, 'money_no' => $money_no, 'money_bank' => $money_bank, @@ -613,6 +597,7 @@ class InsurerController extends BaseController if($company2_id > 0) { $query->andWhere('company2_id=:company2_id',[':company2_id'=>$company2_id]); } +// echo $query->createCommand()->rawSql; $query = $query->orderBy('updated_at asc'); $total = $query->count(); @@ -737,7 +722,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'] = '请输入商业跟单手续费!'; @@ -930,6 +915,26 @@ class InsurerController extends BaseController $insurer2_no= trim($insurer2_no); $insurer2_no=str_replace(" ","",$insurer2_no); + if($insurer1_no == $insurer2_no) { + $result['msg'] = '商业保单号和交强保单号不能相同!'; + return $result; + } + $tmp_count = OrderT::find() + ->where('insurer1_no=:insurer1_no or insurer2_no=:insurer1_no', [':insurer1_no'=>$insurer1_no]) + ->andWhere('id<>'.$order_id) + ->count(); + if($tmp_count > 0) { + $result['msg'] = '商业保单号已经存在!'; + return $result; + } + $tmp_count = OrderT::find() + ->where('insurer1_no=:insurer2_no or insurer2_no=:insurer2_no', [':insurer2_no'=>$insurer2_no]) + ->andWhere('id<>'.$order_id) + ->count(); + if($tmp_count > 0) { + $result['msg'] = '交强保单号已经存在!'; + return $result; + } $tran = OrderT::getDb()->beginTransaction(); try { @@ -1122,17 +1127,14 @@ class InsurerController extends BaseController if($group_id > 0) { $items = GroupT::getTree($group_id); - foreach($items as $group_info) { $group_ids[] = $group_info->id; } } - $query = OrderT::find() ->leftJoin('order_caiwu_t','order_caiwu_t.order_id=order_t.id') - ->where('order_caiwu_t.status_id>0') - ->orderBy('order_t.print_date asc'); + ->where('order_caiwu_t.status_id>0'); if($car_man != '') { $query->andWhere('id_man="'.$car_man.'"'); } @@ -1195,9 +1197,7 @@ class InsurerController extends BaseController continue; } } - $row[] = $user_info->id; - } //加上级别筛选 @@ -1205,8 +1205,15 @@ class InsurerController extends BaseController $query = $query->andWhere(['in','order_t.user_id',$row]); } $total = $query->count(); - - $query = $query->offset($offset)->limit($limit); + $query1 = clone $query; + $sums = $query1->select([ + 'sum_total1' => 'sum(order_t.total1)', + 'sum_total1_clear' => 'sum(order_t.total1_clear)', + 'sum_yuangong_money' => 'sum(order_t.yuangong_money)', + 'sum_non_total1_dis' => 'sum(order_t.non_total1_dis)', + 'sum_total1_dis' => 'sum(order_t.total1_dis)', + ])->asArray()->one(); + $query = $query->orderBy('order_t.print_date asc')->offset($offset)->limit($limit); $items = $query->all(); $data = []; @@ -1214,18 +1221,26 @@ class InsurerController extends BaseController $data['rows'] = []; foreach($items as $item) { $row = $item->toArray(); - $row['company_name'] = $item->company2->name; - $row['path'] = ($item->user && $item->user->group) ? $item->user->group->getPath():''; - $row['user_name'] = $item->user?$item->user->getShowName():''; - $row['total_user_real'] = number_format($item->total1_dis + $item->yuangong_money,2); + $row['company_name'] = $item->company2 ? $item->company2->name : ''; + $row['path'] = ($item->user && $item->user->group) ? $item->user->group->getPath() : ''; + $row['user_name'] = $item->user ? $item->user->getShowName() : ''; + $row['total_user_real'] = number_format($item->total1_dis + $item->yuangong_money, 2); $row['transfer_date'] = $item->caiwu->transfer_date; - $row['caiwu_status_name'] = $item->caiwu->caiwuStatus->name; + $row['caiwu_status_name'] = $item->caiwu && $item->caiwu->caiwuStatus ? $item->caiwu->caiwuStatus->name : ''; $row['shoufei_name'] = MyLib::zhifufs($item->shoufei_id); - $row['status_name'] = $item->caiwu->status->name; + $row['status_name'] = $item->caiwu && $item->caiwu->status ? $item->caiwu->status->name : ''; $row['lock_man'] = $item->caiwu->lock?$item->caiwu->lock->getShowName():''; $data['rows'][] = $row; } + $data['rows'][] = array( + ['商业保总额', number_format($sums['sum_total1'],2)], + ['商业净保总额', number_format($sums['sum_total1_clear'],2)], + ['业务自付', number_format($sums['sum_yuangong_money'],2)], + ['公司代付非车险', number_format($sums['sum_non_total1_dis'],2)], + ['公司返金额', number_format($sums['sum_total1_dis'],2)], + ['实返现金额', number_format($sums['sum_yuangong_money'] + $sums['sum_total1_dis'],2)] + ); return $data; } @@ -2019,7 +2034,7 @@ class InsurerController extends BaseController if($request->isPost) { $order_id = $request->post('order_id',0); - $return_status_id = $request->post('return_status_id',0); + $return_status_id = $request->post('return_status_id',2); $return_remark = $request->post('return_remark'); $tran = OrderT::getDb()->beginTransaction(); @@ -2031,7 +2046,8 @@ class InsurerController extends BaseController } $row->status_id = 1; - $row->return_status_id = $return_status_id; + $row->return_status_id = $row->status_id; + if($row->return_status_id == 0) $row->return_status_id = 2; $row->return_remark = $return_remark; $row->return_time = time(); // if($return_status_id == 2) { @@ -2361,8 +2377,8 @@ class InsurerController extends BaseController $limit = $request->get('limit', 10); $query = OrderT::find() - ->where('status_id>1') - ->orderBy('car_no desc,submit_date asc'); + ->andWhere('status_id>1') + ->orderBy('status_id desc,car_no desc,submit_date asc'); if($id_man != '') { $query->andWhere(['like','id_man',$id_man]); } @@ -2393,13 +2409,11 @@ class InsurerController extends BaseController if($date3_end != '') { $query->andWhere('insurer1_begin_date<=:end_date or insurer2_begin_date<=:end_date', [':end_date'=>$date3_end]); } - if($status > 0) { - if($status == 1) { - $query->andWhere('status_id>1 and status_id<10'); - } - if($status == 2) { - $query->andWhere('status_id=10'); - } + if($status == 1) { + $query->andWhere('status_id>1 and status_id<10'); + } + if($status == 2) { + $query->andWhere('status_id=10'); } $total = $query->count(); @@ -3475,12 +3489,69 @@ class InsurerController extends BaseController $tran->commit(); } catch (\Exception $e) { +// var_dump($e->getTrace()); $tran->rollBack(); $result['msg'] = $e->getMessage(); } } return $result; } + + /** + * 礼品状态回退 + * @return array + */ + public function actionGiftCancel() + { + Yii::$app->response->format = Response::FORMAT_JSON; + $request = Yii::$app->request; + $id = $request->post('order_id'); + $msg= $request->post('return_msg'); + $result = array('success'=>false,'msg'=>'操作成功'); + if(!$request->isPost){ + $result['msg'] = '请求方式错误'; + return $result; + } + if(!$this->my->id == 1){ + $result['msg'] = '无此操作权限'; + return $result; + } + if ($id < 0) { + $result['msg'] = '订单ID无效'; + return $result; + } + if ($msg == '') { + $result['msg'] = '退单理由必须'; + return $result; + } + + $order_info = OrderT::findOne($id); + if (!$order_info) { + $result['msg'] = '订单不存在'; + return $result; + } + + $tran = OrderT::getDb()->beginTransaction(); + try { + // 删除礼品/券库信息 + GiftTicketTUse::deleteAll('order_id=' . $order_info->id); + // 修改订单礼品/券信息 + OrderGiftT::updateAll(['gift_src' => ''], ['order_id' => $order_info->id]); + // 修改订单状态 + $order_info->gift_status = 0; + $order_info->save(); + $this->addLog($order_info->car_id, '回退礼品状态,理由:' . $msg, 1); + $tran->commit(); + } catch (\Exception $e) { + $tran->rollBack(); + $result['msg'] = '订单不存在'; + $result['msg'] = $e->getMessage(); + return $result; + } + $result['success'] = true; + return $result; + } + public function getGift($k, $v, $car_no, $order_info, $order_gift_id) { $result = array(); @@ -3495,8 +3566,7 @@ class InsurerController extends BaseController //礼券 if ($gift_info && $gift_info->type_id == 2) { $pinyin_arr = explode(' ', $gift_info->pinyin_name); -// dd($pinyin_arr); - $liquan_str = 'ch'; + $liquan_str = 'wf'; //获取礼券拼音首字母 foreach ($pinyin_arr as $first) { $liquan_str .= substr($first, 0, 1); @@ -3513,13 +3583,12 @@ class InsurerController extends BaseController if ($gift_use) { $liquan_str .= sprintf("%04d", $gift_use->gift_shuzi + 1); $new_gift_use->gift_shuzi = $gift_use->gift_shuzi + 1; - $new_gift_use->code = $liquan_str; } else { $liquan_str .= sprintf("%04d", 1); $new_gift_use->gift_shuzi = 1; - $new_gift_use->code = strtoupper($liquan_str); } + $new_gift_use->code = strtoupper($liquan_str); $new_gift_use->op_id = $this->my->id; $new_gift_use->type_id = $v; //礼券ID $new_gift_use->input_date = date('Y-m-d H:i:s'); @@ -3544,7 +3613,7 @@ class InsurerController extends BaseController if ($shiwu_use) { $new_shiwu->gift_shuzi = $shiwu_use->gift_shuzi + 1; - $new_shiwu->code = sprintf("%04d", $gift_use->gift_shuzi + 1); + $new_shiwu->code = sprintf("%04d", $shiwu_use->gift_shuzi + 1); } else { $new_shiwu->gift_shuzi = 1; $new_shiwu->code = sprintf("%04d", 1); @@ -3574,7 +3643,6 @@ class InsurerController extends BaseController $imgstr = '@frontend/web/upload/images/'.date('Ym'); $imgstr .= '/gift' . $name . '' . $datetime . '.png'; FileHelper::createDirectory(dirname(str_replace('@frontend/web/', '',$imgstr))); - //生成新的图片 if ($gift_info && $gift_info->type_id == 1) { // 实物 \yii\imagine\Image::thumbnail('@frontend/web/images/gift.png', 400, 252) @@ -3593,23 +3661,25 @@ class InsurerController extends BaseController ->save(Yii::getAlias($imgstr)); } elseif ($gift_info && $gift_info->type_id == 2) { + if($gift_info->original_img == '') { + throw new \Exception('礼券文件不存在'); + } $liquanSrc = '@frontend/web' . $gift_info->original_img; \yii\imagine\Image::thumbnail($liquanSrc, 1097, 979) ->save(Yii::getAlias($imgstr), ['quality' => 100]);//生成缩略图的质量 //图片打水印 $bianhao = '券号:' . $bianhao; - \yii\imagine\Image::text($liquanSrc, $bianhao, Yii::getAlias('@frontend/web/fonts/msyh.ttc'), [325, 85], ['color' => 'ffffff', 'size' => 14]) + \yii\imagine\Image::text($liquanSrc, $bianhao, Yii::getAlias('@frontend/web/fonts/msyh.ttc'), [20, 20], ['color' => '000000', 'size' => 14]) ->save(Yii::getAlias($imgstr)); - \yii\imagine\Image::text($imgstr, $car_no, Yii::getAlias('@frontend/web/fonts/msyh.ttc'), [900, 400], ['color' => 'ffffff', 'size' => 16]) + \yii\imagine\Image::text($imgstr, $car_no, Yii::getAlias('@frontend/web/fonts/msyh.ttc'), [425, 200], ['color' => '000000', 'size' => 16]) ->save(Yii::getAlias($imgstr)); - $panduan = \yii\imagine\Image::text($imgstr, $endDate, Yii::getAlias('@frontend/web/fonts/msyh.ttc'), [850, 440], ['color' => 'ffffff', 'size' => 16]) + $panduan = \yii\imagine\Image::text($imgstr, $endDate, Yii::getAlias('@frontend/web/fonts/msyh.ttc'), [425, 223], ['color' => '000000', 'size' => 16]) ->save(Yii::getAlias($imgstr)); } - $gift_src = str_replace('@frontend/web', '', $imgstr); //保存order_gift_t表里png文件地址 @@ -3620,4 +3690,100 @@ class InsurerController extends BaseController } } -} + /** + * 退单操作(超管权限任意状态退单) + * @return array + * @throws \Exception + */ + public function actionSupperReturn() + { + Yii::$app->response->format = Response::FORMAT_JSON; + $request = Yii::$app->request; + $result = array(); + $result['success'] = false; + $result['msg'] = '操作失败'; + if($request->isPost) { + $order_id = $request->post('order_id',0); + $return_remark = $request->post('return_remark'); + if ($order_id < 0) { + $result['msg'] = '订单ID无效'; + return $result; + } + if($return_remark == ''){ + $result['msg'] = '请填写退单理由!'; + return $result; + } + + $order_info = OrderT::findOne(['id'=>$order_id]); + if(empty($order_info)) { + $result['msg'] = '保单信息不存在!'; + return $result; + } + + // 订单信息更新 + $order_info->return_status_id = $order_info->status_id; + if($order_info->return_status_id == 0) $order_info->return_status_id = 2; + $order_info->lock_id = 0; + $order_info->status_id = 1; + $order_info->return_remark = $return_remark; + $order_info->return_time = time(); + $order_info->gift_status = 0; + // 车辆信息处理 + $car_info = $order_info->car; + if ($car_info->op2_id > 0) { //续保 + $car_info->location = 4; + }else { + $car_info->location = 2; + $car_info->is_xubao = 0; + } +// $car_info->user_id = $order_info->user_id; + + $tran = OrderT::getDb()->beginTransaction(); + try { + if(!$car_info->save()) { + throw new \Exception(print_r($car_info->getErrors(), true)); + } + // 财务处理 + CaiwuT::deleteAll(['order_id'=>$order_info->id]); + OrderCaiwuT::deleteAll(['order_id'=>$order_info->id]); + OrderUserT::deleteAll(['order_id'=>$order_info->id]); + + // 车辆信息 + CarCT::deleteAll(['id' => $order_info->car_id]); + // 检测车辆是否移库 + if($car_info->op2_id > 0 && $car_info->location != 4){ + $car_db_info = new CarDT(false); + $car_db_info->id = $order_info->car_id; + $car_db_info->user_id = $order_info->user_id; + if(!$car_db_info->save()) { + throw new \Exception(print_r($car_db_info->getErrors(), true)); + } + } + if(!$order_info->car->op2_id && $order_info->car->location != 2){ + $car_db_info = new CarBT(false); + $car_db_info->id = $order_info->car_id; + $car_db_info->user_id = $order_info->user_id; + if(!$car_db_info->save()) { + throw new \Exception(print_r($car_db_info->getErrors(), true)); + } + } + + // 礼品状态回退 + GiftTicketTUse::deleteAll('order_id=' . $order_info->id); + OrderGiftT::updateAll(['gift_src' => ''], ['order_id' => $order_info->id]); + + $this->addLog($order_info->car_id,'超管退单,理由是:'.$return_remark,1); + if(!$order_info->save()) { + throw new \Exception(print_r($order_info->getErrors(), true)); + } + $tran->commit(); + $result['success'] = true; + $result['msg'] = '操作成功'; + } catch (\Exception $e) { + $tran->rollBack(); + $result['msg'] = '操作失败,' . $e->getMessage(); + } + } + return $result; + } +} \ No newline at end of file diff --git a/frontend/controllers/MarketingStrategyController.php b/frontend/controllers/MarketingStrategyController.php index fb21ba7..9ef8497 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'); @@ -467,7 +492,7 @@ class MarketingStrategyController extends UserBaseController $total1_clear = $request->post('total1_clear', 0); $car_no = $request->post('car_no'); $car_use_id = $request->post('car_use_id', 0); - $company2_id = $request->post('company2_id', 0); + $company_id = $request->post('company_id', 0); $car_info = CarT::findOne($car_id); if(!$car_info) { @@ -484,7 +509,7 @@ class MarketingStrategyController extends UserBaseController } $date = date('Y-m-d H:i:s'); $query = ZhongjiYingxiao::find() - ->where('begin_date<=:begin_date and end_date>=:end_date',[':begin_date'=>$date,':end_date'=>$date]) + ->where('is_delete=0 and begin_date<=:begin_date and end_date>=:end_date',[':begin_date'=>$date,':end_date'=>$date]) ->andWhere(['in','id',$celuo_ids]) ->orderBy('id desc'); $yingxiao_item = $query->one(); @@ -493,49 +518,73 @@ 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 = []; + $flags = []; foreach($items as $item) { - $flag = false; //车牌 + $flags[0] = 0; if($item->car_type_id != '') { $car_type_ids = explode(',',$item->car_type_id); $tmp_type_id = 1; if(mb_substr($car_no, 0, 1, 'utf-8') != '京') $tmp_type_id = 2; if(in_array($tmp_type_id, $car_type_ids)) { - $flag = true; + $flags[0] = 1; + } else { + $flags[0] = -1; } } //保险公司 + $flags[1] = 0; if($item->company_ids != '') { $company_ids = explode(',',$item->company_ids); - if(in_array($company2_id, $company_ids)) { - $flag = true; + if(in_array($company_id, $company_ids)) { + $flags[1] = 1; + } else { + $flags[1] = -1; } } //车辆使用类型 + $flags[2] = 0; if($item->car_use_id != '') { $car_use_ids = explode(',',$item->car_use_id); if(in_array($car_use_id, $car_use_ids)) { - $flag = true; + $flags[2] = 1; + } else { + $flags[2] = -1; } } //新保、续保 + $flags[3] = 0; if($item->type_ids != '') { $type_ids = explode(',',$item->type_ids); $tmp_type_id = 1; if($car_info->is_xubao > 0) $tmp_type_id = 2; if(in_array($tmp_type_id, $type_ids)) { - $flag = true; + $flags[3] = 1; + } else { + $flags[3] = -1; + } + } + + $flag = true; + foreach($flags as $tmp_flag) { + if($tmp_flag == 0) continue; + if($tmp_flag == -1) { + $flag = false; + break; } } if($flag) { $ids[] = $item->id; } } + if(count($ids) == 0) { + return $result; + } $result['success'] = true; $result['ids'] = join(',',$ids); $result['celuo_id'] = $yingxiao_item->id; @@ -586,8 +635,10 @@ class MarketingStrategyController extends UserBaseController ->where(['order_id'=>$order_id,'gift_type'=>$type]) ->all(); $order_gift_ids = []; + $order_gift_srcs = []; foreach($order_gift_items as $order_gift_item) { $order_gift_ids[] = $order_gift_item->gift_id; + $order_gift_srcs[$order_gift_item->gift_id] = $order_gift_item->gift_src; } $gifts = ZhongjiGiftT::find() ->where(['fanxian_id'=>$fanxian_id,'gift_type'=>$type]) @@ -601,6 +652,12 @@ class MarketingStrategyController extends UserBaseController foreach($tmp_row['gifts'] as $index => $gift_info) { if(in_array($gift_info['id'], $order_gift_ids)) { $tmp_row['gifts'][$index]['selected'] = 1; + $tmp_gift = GiftT::find()->where('id='.$gift_info['id'])->one(); + if($tmp_gift && $tmp_gift->type_id == 2) { + $tmp_row['gifts'][$index]['img_src'] = $order_gift_srcs[$gift_info['id']]; + } else { + $tmp_row['gifts'][$index]['img_src'] = ''; + } } else { $tmp_row['gifts'][$index]['selected'] = 0; } diff --git a/frontend/controllers/PhoneCenterController.php b/frontend/controllers/PhoneCenterController.php index eaf24a3..457f868 100644 --- a/frontend/controllers/PhoneCenterController.php +++ b/frontend/controllers/PhoneCenterController.php @@ -10,6 +10,7 @@ namespace frontend\controllers; use common\models\FixCarT; use common\models\UserT; +use GuzzleHttp\Client; use yii\base\Controller; use common\libs\MyLib; use common\models\AppointmentT; @@ -277,6 +278,10 @@ public function actionDownload(){ $data['rows'] = []; foreach($sub_items as $item) { $row = $item->toArray(); + $row['status'] = ''; + if($item->bind_id != '') { + $row['status'] = '已绑定'; + } $data['rows'][] = $row; } @@ -315,7 +320,6 @@ public function actionDownload(){ $phone = $request->post('phone',''); $is_double = $request->post('is_double',0); - if($user_id == 0) { $result['msg'] = '请输入人员名称!'; return $result; @@ -326,14 +330,33 @@ public function actionDownload(){ return $result; } - - $tran = NetworkPhoneAssignT::getDb()->beginTransaction(); - try { $row = null; if($id > 0) { $row = NetworkPhoneAssignT::findOne(['id'=>$id]); + + $url = Yii::$app->params['userPanel']['phone_url']; + $token = Yii::$app->params['userPanel']['token']; + + $params = [ + 'token' => $token, + 'op' => 'edit', + 'phone' => $phone, + 'old_phone' => $row->phone + ]; + $client = new Client(); + $res = $client->request('POST', $url, [ + 'form_params' => $params, + 'http_errors' => false, + ]); + if($res->getStatusCode() == 200) { + $obj = json_decode($res->getBody()); + if($obj->code == 400) { + $result['msg'] = $obj->msg; + return $result; + } + } } else { if($is_double == 0) { $t = NetworkPhoneAssignT::findOne(['phone' => $phone]); @@ -342,6 +365,26 @@ public function actionDownload(){ return $result; } } + $url = Yii::$app->params['userPanel']['phone_url']; + $token = Yii::$app->params['userPanel']['token']; + + $params = [ + 'token' => $token, + 'op' => 'add', + 'phone' => $phone + ]; + $client = new Client(); + $res = $client->request('POST', $url, [ + 'form_params' => $params, + 'http_errors' => false, + ]); + if($res->getStatusCode() == 200) { + $obj = json_decode($res->getBody()); + if($obj->code == 400) { + $result['msg'] = $obj->msg; + return $result; + } + } $row = new NetworkPhoneAssignT(); } $row->user_id = $user_id; @@ -382,6 +425,27 @@ public function actionDownload(){ return $result; } $row = NetworkPhoneAssignT::findOne(['id'=>$id]); + + $url = Yii::$app->params['userPanel']['phone_url']; + $token = Yii::$app->params['userPanel']['token']; + + $params = [ + 'token' => $token, + 'op' => 'delete', + 'phone' => $row->phone + ]; + $client = new Client(); + $res = $client->request('POST', $url, [ + 'form_params' => $params, + 'http_errors' => false, + ]); + if($res->getStatusCode() == 200) { + $obj = json_decode($res->getBody()); + if($obj->code == 400) { + $result['msg'] = $obj->msg; + return $result; + } + } $row->delete(); $result['success'] = true; @@ -390,7 +454,7 @@ public function actionDownload(){ $tran->commit(); } catch(\Exception $e) { $tran->rollBack(); - throw $e; + $result['msg'] = $e->getMessage(); } } } @@ -408,7 +472,6 @@ public function actionDownload(){ $info = new NetworkPhoneSubT(); } - return $this->render('sub-edit',[ 'info' => $info, 'assign_id'=>$assign_id @@ -430,13 +493,12 @@ public function actionDownload(){ $is_called = $request->post('is_called'); $is_double = $request->post('is_double'); - - if($phone == '') { $result['msg'] = '请输入电话号码!'; return $result; } + $phone_info = NetworkPhoneAssignT::findOne(['id'=>$assign_id]); $tran = NetworkPhoneSubT::getDb()->beginTransaction(); @@ -444,6 +506,28 @@ public function actionDownload(){ $row = null; if($id > 0) { $row = NetworkPhoneSubT::findOne(['id'=>$id]); + + $url = Yii::$app->params['userPanel']['phone_url']; + $token = Yii::$app->params['userPanel']['token']; + $params = [ + 'token' => $token, + 'op' => 'sub_edit', + 'phone' => $phone_info->phone, + 'sub_phone' => $phone, + 'old_sub_phone' => $row->phone + ]; + $client = new Client(); + $res = $client->request('POST', $url, [ + 'form_params' => $params, + 'http_errors' => false, + ]); + if($res->getStatusCode() == 200) { + $obj = json_decode($res->getBody()); + if($obj->code == 400) { + $result['msg'] = $obj->msg; + return $result; + } + } } else { if($is_double == 0) { $t = NetworkPhoneSubT @@ -453,6 +537,28 @@ public function actionDownload(){ return $result; } } + + $url = Yii::$app->params['userPanel']['phone_url']; + $token = Yii::$app->params['userPanel']['token']; + $params = [ + 'token' => $token, + 'op' => 'sub_add', + 'phone' => $phone_info->phone, + 'sub_phone' => $phone + ]; + $client = new Client(); + $res = $client->request('POST', $url, [ + 'form_params' => $params, + 'http_errors' => false, + ]); + if($res->getStatusCode() == 200) { + $obj = json_decode($res->getBody()); + if($obj->code == 400) { + $result['msg'] = $obj->msg; + return $result; + } + } + $row = new NetworkPhoneSubT(); } $row->assign_id = $assign_id; @@ -463,7 +569,7 @@ public function actionDownload(){ $tran->commit(); } catch(\Exception $e) { $tran->rollBack(); - throw $e; + $result['msg'] = $e->getMessage(); } $result['success'] = true; @@ -488,6 +594,26 @@ public function actionDownload(){ try { $row = NetworkPhoneSubT::findOne(['id'=>$id]); if($row->bind_id == ''){ + $url = Yii::$app->params['userPanel']['phone_url']; + $token = Yii::$app->params['userPanel']['token']; + $params = [ + 'token' => $token, + 'op' => 'sub_delete', + 'sub_phone' => $row->phone + ]; + $client = new Client(); + $res = $client->request('POST', $url, [ + 'form_params' => $params, + 'http_errors' => false, + ]); + if($res->getStatusCode() == 200) { + $obj = json_decode($res->getBody()); + if($obj->code == 400) { + $result['msg'] = $obj->msg; + return $result; + } + } + $row->delete(); $result['success'] = true; @@ -498,7 +624,7 @@ public function actionDownload(){ $tran->commit(); } catch(\Exception $e) { $tran->rollBack(); - throw $e; + $result['msg'] = $e->getMessage(); } } } diff --git a/frontend/controllers/PhoneController.php b/frontend/controllers/PhoneController.php index e82e5cf..b9029d0 100644 --- a/frontend/controllers/PhoneController.php +++ b/frontend/controllers/PhoneController.php @@ -16,6 +16,7 @@ use common\models\NetworkPhoneAssignT; use common\models\NetworkPhoneSubT; use common\models\NetworkPhoneT; +use GuzzleHttp\Client; use Yii; use yii\console\Request; use yii\web\Response; @@ -723,11 +724,30 @@ class PhoneController extends \yii\web\Controller $phone = $request->get('phone',''); $user_id = $request->get('user_id',0); + //检查通话剩余分钟 + $url = Yii::$app->params['userPanel']['myinfo_url']; + $token = Yii::$app->params['userPanel']['token']; + + $client = new Client(); + $res = $client->request('GET', $url.'?token='.$token); + $phone_time = 0; + if($res->getStatusCode() == 200) { + $obj = json_decode($res->getBody(), true); + if($obj['code'] == 400) { + $result['msg'] = $obj['msg']; + return $result; + } + $phone_time = intval($obj['data']['phone_time']); + } + + if($phone_time <= 0) { + $result['msg'] = '电话剩余话费不足,请联系管理员充值'; + return $result; + } + $headers = array( "Content-Type: application/json;charset=UTF-8", "Accept:application/json", - - ); $uri = "http://api.1ketong.com/ykt-pool/number/ax2/call_out"; $app_key = '0946239060682011'; @@ -737,6 +757,7 @@ class PhoneController extends \yii\web\Controller $assign = NetworkPhoneAssignT::find()->where('user_id='.$user_id)->one(); if(!$assign){ + $result['msg'] = '该账号无绑定主叫号码'; return $result; } @@ -748,6 +769,7 @@ class PhoneController extends \yii\web\Controller $count = count($total_ids); if($count<= 0){ + $result['msg'] = '该主叫号码无绑定子号码'; return $result; } diff --git a/frontend/controllers/RenewalController.php b/frontend/controllers/RenewalController.php index 909585a..1e08582 100644 --- a/frontend/controllers/RenewalController.php +++ b/frontend/controllers/RenewalController.php @@ -97,11 +97,9 @@ class RenewalController extends BaseController $car_man = $request->get('car_man'); $phone = $request->get('phone'); $car_no = $request->get('car_no'); - $page = $request->get('page',1); $username = $request->get('username'); $sort_key = $request->get('sort_key','appointment_t.pdate'); $sort_value = $request->get('sort_value','ASC'); - $user_id = $request->get('user_id'); $offset = $request->get('offset',0); $limit = $request->get('limit', 10); @@ -118,7 +116,7 @@ class RenewalController extends BaseController $query->andWhere('car_t.car_man like "'.$car_man.'"'); } if($phone != '') { - $query->andWhere('car_t.phone like "'.$phone.'"'); + $query->andWhere('car_t.car_man_phone like "'.$phone.'"'); } if($car_no != '') { $query->andWhere('car_t.car_no like "'.$car_no.'"'); @@ -199,7 +197,7 @@ class RenewalController extends BaseController $query = $query->andWhere('car_t.car_man like "'.$car_man.'"'); } if($phone != '') { - $query = $query->andWhere('car_t.phone="'.$phone.'"'); + $query = $query->andWhere('car_t.car_man_phone="'.$phone.'"'); } if($ptype > 0) { $query = $query->andWhere('appointment_t.ptype='.$ptype); @@ -276,7 +274,7 @@ class RenewalController extends BaseController $query = $query->andWhere('car_t.car_man like "'.$car_man.'"'); } if($phone != '') { - $query = $query->andWhere('car_t.phone="'.$phone.'"'); + $query = $query->andWhere('car_t.car_man_phone="'.$phone.'"'); } if($ptype > 0) { $query = $query->andWhere('appointment_t.ptype='.$ptype); diff --git a/frontend/controllers/StatisticsController.php b/frontend/controllers/StatisticsController.php index e4cb4f6..d394593 100644 --- a/frontend/controllers/StatisticsController.php +++ b/frontend/controllers/StatisticsController.php @@ -21,8 +21,21 @@ class StatisticsController extends BaseController public $enableCsrfValidation = false; public $layout = 'blue-main'; - public function actionWork() + public function actionWork() { + $group_items = GroupT::getTree((int)$this->my->group_id); + if($this->my->id == 1 || $this->my->username=='6002') + $group_items = GroupT::getTree(); + $company_items = InsurerCompanyT::find() + ->all(); + return $this->render('work',[ + 'group_items' => $group_items, + 'company_items' => $company_items + ]); + } + + public function actionWorkJson() { + Yii::$app->response->format = Response::FORMAT_JSON; $request = Yii::$app->request; $date_begin = $request->get('date_begin',date('Y-m-d')); $date_end = $request->get('date_end',date('Y-m-d')); @@ -31,9 +44,7 @@ class StatisticsController extends BaseController $username = $request->get('username'); $group_id = $request->get('group_id'); $company_id = $request->get('company_id'); - $group_items = GroupT::getTree((int)$this->my->group_id); - if($this->my->id == 1 || $this->my->username=='6002') - $group_items = GroupT::getTree(); + $group_ids[] = $group_id; if($group_id > 0) { $items = GroupT::getTree($group_id); @@ -42,12 +53,6 @@ class StatisticsController extends BaseController } } -// 原来的搜索条件 -// $userSql = ''; -// if($username != '') { -// $userSql = ' username like "'.$username.'"'; -// } - // 现在的搜索条件 $userSql = ''; if($username != '') { @@ -58,8 +63,6 @@ class StatisticsController extends BaseController $user_items = $this->my->getChildren($userSql); if($this->my->username == '6002') $user_items = $this->my->getChildren($userSql,1); -// $user_items[] = $this->my; -//var_dump($user_items); $user_rows = array(); $sum_total = array(); $sum_total[0] = ''; @@ -95,22 +98,21 @@ class StatisticsController extends BaseController ->where('user_id='.$user_info->id.' and status_id>1') ->andWhere('insurance_status=1 or insurance_status=3'); if($date_begin != '') { - $tmp_query = $tmp_query->andWhere('submit_date>="'.$date_begin.'"'); + $tmp_query->andWhere('submit_date>="'.$date_begin.'"'); } if($date_end != '') { - $tmp_query = $tmp_query->andWhere('submit_date<="'.$date_end.'"'); + $tmp_query->andWhere('submit_date<="'.$date_end.'"'); } if($date2_begin != '') { - $tmp_query = $tmp_query->andWhere('print_date>="'.$date2_begin.'"'); + $tmp_query->andWhere('print_date>="'.$date2_begin.'"'); } if($date2_end != '') { - $tmp_query = $tmp_query->andWhere('print_date<="'.$date2_end.'"'); + $tmp_query->andWhere('print_date<="'.$date2_end.'"'); } if($company_id > 0) { - $tmp_query = $tmp_query->andWhere('company_id='.$company_id); + $tmp_query->andWhere('company_id='.$company_id); } -// exit; foreach($tmp_query->each() as $item) { $total[0]++; //提单总数 @@ -129,16 +131,16 @@ class StatisticsController extends BaseController $tmp_query = FixCarT::find() ->where('user_id='.$user_info->id.' and status>0'); if($date_begin != '') { - $tmp_query = $tmp_query->andWhere('submit_date>="'.$date_begin.'"'); + $tmp_query->andWhere('submit_date>="'.$date_begin.'"'); } if($date_end != '') { - $tmp_query = $tmp_query->andWhere('submit_date<="'.$date_end.'"'); + $tmp_query->andWhere('submit_date<="'.$date_end.'"'); } if($date2_begin != '') { - $tmp_query = $tmp_query->andWhere('submit_date>="'.$date2_begin.'"'); + $tmp_query->andWhere('submit_date>="'.$date2_begin.'"'); } if($date2_end != '') { - $tmp_query = $tmp_query->andWhere('submit_date<="'.$date2_end.'"'); + $tmp_query->andWhere('submit_date<="'.$date2_end.'"'); } $total[7] = $tmp_query->count(); @@ -146,7 +148,6 @@ class StatisticsController extends BaseController $phone_time = ''; $query = PhoneDayT::find() ->where('user_id='.$user_info->id.' and call_date>="'.$date_begin.'" and call_date<="'.$date_end.'"'); -// echo $query->createCommand()->rawSql; $items = $query->all(); $call_time = 0; foreach($items as $item) { @@ -163,7 +164,6 @@ class StatisticsController extends BaseController $row['total'] = $total; $user_rows[] = $row; -// $sum_total[0] += $total[0]; $sum_total[1] += $total[1]; $sum_total[2] += $total[2]; $sum_total[3] += $total[3]; @@ -173,23 +173,37 @@ class StatisticsController extends BaseController $sum_total[7] += $total[7]; } - $company_items = InsurerCompanyT::find() - ->all(); - - return $this->render('work',[ - 'user_rows' => $user_rows, - 'date_begin' => $date_begin, - 'date_end' => $date_end, - 'date2_begin' => $date2_begin, - 'date2_end' => $date2_end, - 'username' => $username, - 'sum_total' => $sum_total, - 'group_id' => $group_id, - 'group_items' => $group_items, - 'company_items' => $company_items, - 'company_id' => $company_id - ]); + $data = []; + $data['total'] = count($user_rows); + $data['rows'] = []; + foreach($user_rows as $item) { + $row = $item; + $row['total_0'] = $item['total'][0]!=''?$item['total'][0]:''; + $row['total_7'] = $item['total'][7]>0?$item['total'][7]:''; + $row['total_1'] = $item['total'][1]>0?$item['total'][1]:''; + $row['total_2'] = $item['total'][2]>0?'¥'.number_format($item['total'][2],2):''; + $row['total_3'] = $item['total'][3]>0?'¥'.number_format($item['total'][3],2):''; + $row['total_4'] = $item['total'][4]>0?'¥'.number_format($item['total'][4],2):''; + $row['total_5'] = $item['total'][5]>0?'¥'.number_format($item['total'][5],2):''; + $row['total_6'] = $item['total'][6]>0?'¥'.number_format($item['total'][6],2):''; + $row['op'] = 1; + $data['rows'][] = $row; + } + $row = []; + $row['username'] = '汇总'; + $row['total_7'] = $sum_total[7]>0?$sum_total[7]:''; + $row['total_1'] = $sum_total[1]>0?$sum_total[1]:''; + $row['total_2'] = $sum_total[2]>0?'¥'.number_format($sum_total[2],2):''; + $row['total_3'] = $sum_total[3]>0?'¥'.number_format($sum_total[3],2):''; + $row['total_4'] = $sum_total[4]>0?'¥'.number_format($sum_total[4],2):''; + $row['total_5'] = $sum_total[5]>0?'¥'.number_format($sum_total[5],2):''; + $row['total_6'] = $sum_total[6]>0?'¥'.number_format($sum_total[6],2):''; + $row['op'] = 0; + $data['rows'][] = $row; + + return $data; } + public function actionCleanWork() { $request = Yii::$app->request; @@ -210,7 +224,6 @@ class StatisticsController extends BaseController } } -// 现在的搜索条件 $userSql = ''; if($username != '') { $userSql = ' username like "'.$username.'" and '; @@ -221,7 +234,7 @@ class StatisticsController extends BaseController if($this->my->username == '6002') $user_items = $this->my->getChildrenClean($userSql,1); $user_items[] = $this->my; -//var_dump($user_items); + $user_rows = array(); $sum_total = array(); $sum_total[0] = 0; @@ -255,21 +268,6 @@ class StatisticsController extends BaseController $tmp_query = $tmp_query->andWhere('company_id='.$company_id); } -// exit; -// foreach($tmp_query->each() as $item) { -// $total[0]++; -// //提单总数 -// if ($item->status_id > 0) { -// $total[1]++; -// $total[2] += $item->total1_clear;//提单总净保费 -// $total[3] += $item->total2_clear;//交强总净保费 -// if($item->status_id > 5) { -// $total[4] += $item->total1_clear;//商业已收净保费 -// $total[5] += $item->total2_clear;//商业已收净保费 -// } -// $total[6] += $item->total1_clear + $item->total2_clear;//总签单净保费 -// } -// } $total['right_num']=$tmp_query->sum('right_num'); $total['wrong_num']=$tmp_query->sum('wrong_num'); $total['yuyue_num']=$tmp_query->sum('yuyue_num'); @@ -285,11 +283,6 @@ class StatisticsController extends BaseController $sum_total[1] += $total['wrong_num']; $sum_total[2] += $total['yuyue_num']; -// $sum_total[3] += $total[3]; -// $sum_total[4] += $total[4]; -// $sum_total[5] += $total[5]; -// $sum_total[6] += $total[6]; - } $company_items = InsurerCompanyT::find() @@ -321,7 +314,7 @@ class StatisticsController extends BaseController if($date_end != '') { $query = $query->andWhere('fenpei_date<="'.$date_end.'"'); } - $CleanFenpei=$query ->count(); + $CleanFenpei=$query ->count(); return $this->render('clean-work-zj',[ 'CleanFenpei' => $CleanFenpei, @@ -510,198 +503,27 @@ class StatisticsController extends BaseController 'company_id' => $company_id ]); } - - public function actionWorkOutput() - { - $objectPHPExcel = new \PHPExcel(); - $index = 1; - $objectPHPExcel->setActiveSheetIndex(0)->setCellValue('A'.$index,'工号'); - $objectPHPExcel->setActiveSheetIndex(0)->setCellValue('B'.$index,'真实姓名'); - $objectPHPExcel->setActiveSheetIndex(0)->setCellValue('C'.$index,'通时'); - $objectPHPExcel->setActiveSheetIndex(0)->setCellValue('D'.$index,'提车总数'); - $objectPHPExcel->setActiveSheetIndex(0)->setCellValue('E'.$index,'提单总数'); - $objectPHPExcel->setActiveSheetIndex(0)->setCellValue('F'.$index,'商业总净保费'); - $objectPHPExcel->setActiveSheetIndex(0)->setCellValue('G'.$index,'交强总净保费'); - $objectPHPExcel->setActiveSheetIndex(0)->setCellValue('H'.$index,'商业已收净保费'); - $objectPHPExcel->setActiveSheetIndex(0)->setCellValue('I'.$index,'交强已收净保费'); - $objectPHPExcel->setActiveSheetIndex(0)->setCellValue('J'.$index,'总签单净保费'); - + public function actionWorkInfo() { $request = Yii::$app->request; - $date_begin = $request->get('date_begin',date('Y-m-d')); - $date_end = $request->get('date_end',date('Y-m-d')); + $user_id = $request->get('user_id'); + $date_begin = $request->get('date_begin'); + $date_end = $request->get('date_end'); $date2_begin = $request->get('date2_begin'); $date2_end = $request->get('date2_end'); $username = $request->get('username'); - $group_id = $request->get('group_id'); - $company_id = $request->get('company_id'); - $group_items = GroupT::getTree((int)$this->my->group_id); - if($this->my->id == 1 || $this->my->username=='6002') - $group_items = GroupT::getTree(); - $group_ids[] = $group_id; - if($group_id > 0) { - $items = GroupT::getTree($group_id); - foreach($items as $group_info) { - $group_ids[] = $group_info->id; - } - } - -// 原来的搜索条件 -// $userSql = ''; -// if($username != '') { -// $userSql = ' username like "'.$username.'"'; -// } - -// 现在的搜索条件 - $userSql = ''; - if($username != '') { - $userSql = ' username like "'.$username.'" and '; - } - //$userSql .= 'is_locked=0 and is_login=1'; - - $user_items = $this->my->getChildren($userSql); - if($this->my->username == '6002') - $user_items = $this->my->getChildren($userSql,1); - $user_items[] = $this->my; -//var_dump($user_items); - $user_rows = array(); - $sum_total = array(); - $sum_total[0] = ''; - $sum_total[1] = 0; - $sum_total[2] = 0; - $sum_total[3] = 0; - $sum_total[4] = 0; - $sum_total[5] = 0; - $sum_total[6] = 0; - $sum_total[7] = 0; - foreach($user_items as $user_info) { - if($user_info->is_leave == 1) continue; - - if($group_id > 0) { - if(!in_array($user_info->group_id,$group_ids)) { - continue; - } - } - $total[0] = 0; - $total[1] = 0; - $total[2] = 0; - $total[3] = 0; - $total[4] = 0; - $total[5] = 0; - $total[6] = 0; - $total[7] = 0; - - $row = array(); - $row['id'] = $user_info->id; - $row['username'] = trim($user_info->username); - $row['truename'] = $user_info->name; - $tmp_query = OrderT::find() - ->where('user_id='.$user_info->id.' and status_id>1'); - if($date_begin != '') { - $tmp_query = $tmp_query->andWhere('submit_date>="'.$date_begin.'"'); - } - if($date_end != '') { - $tmp_query = $tmp_query->andWhere('submit_date<="'.$date_end.'"'); - } - if($date2_begin != '') { - $tmp_query = $tmp_query->andWhere('print_date>="'.$date2_begin.'"'); - } - if($date2_end != '') { - $tmp_query = $tmp_query->andWhere('print_date<="'.$date2_end.'"'); - } - if($company_id > 0) { - $tmp_query = $tmp_query->andWhere('company_id='.$company_id); - } - $index++; -// exit; - foreach($tmp_query->each() as $item) { - - $total[0]++; - //提单总数 - if ($item->status_id > 0) { - $total[1]++; - $total[2] += $item->total1_clear;//提单总净保费 - $total[3] += $item->total2_clear;//交强总净保费 - if($item->status_id > 5) { - $total[4] += $item->total1_clear;//商业已收净保费 - $total[5] += $item->total2_clear;//商业已收净保费 - } - $total[6] += $item->total1_clear + $item->total2_clear;//总签单净保费 - } - - } - $objectPHPExcel->setActiveSheetIndex(0)->setCellValue('A'.$index,$row['username']); - $objectPHPExcel->setActiveSheetIndex(0)->setCellValue('B'.$index,$row['truename']); - - - $objectPHPExcel->setActiveSheetIndex(0)->setCellValue('E'.$index,$total[1]>0?$total[1]:''); - $objectPHPExcel->setActiveSheetIndex(0)->setCellValue('F'.$index,$total[2]>0?'¥'.number_format($total[2],2):''); - $objectPHPExcel->setActiveSheetIndex(0)->setCellValue('G'.$index,$total[3]>0?'¥'.number_format($total[3],2):''); - $objectPHPExcel->setActiveSheetIndex(0)->setCellValue('H'.$index,$total[4]>0?'¥'.number_format($total[4],2):''); - $objectPHPExcel->setActiveSheetIndex(0)->setCellValue('I'.$index,$total[5]>0?'¥'.number_format($total[5],2):''); - $objectPHPExcel->setActiveSheetIndex(0)->setCellValue('J'.$index,$total[6]>0?'¥'.number_format($total[6],2):''); - //提单总数 - $tmp_query = FixCarT::find() - ->where('user_id='.$user_info->id.' and status>0'); - if($date_begin != '') { - $tmp_query = $tmp_query->andWhere('submit_date>="'.$date_begin.'"'); - } - if($date_end != '') { - $tmp_query = $tmp_query->andWhere('submit_date<="'.$date_end.'"'); - } - if($date2_begin != '') { - $tmp_query = $tmp_query->andWhere('submit_date>="'.$date2_begin.'"'); - } - if($date2_end != '') { - $tmp_query = $tmp_query->andWhere('submit_date<="'.$date2_end.'"'); - } - $total[7] = $tmp_query->count(); - $objectPHPExcel->setActiveSheetIndex(0)->setCellValue('D'.$index,$total[7]>0?$total[7]:''); - - //通时 - $phone_time = ''; - $query = PhoneDayT::find() - ->where('user_id='.$user_info->id.' and call_date>="'.$date_begin.'" and call_date<="'.$date_end.'"'); -// echo $query->createCommand()->rawSql; - $items = $query->all(); - $call_time = 0; - foreach($items as $item) { - $call_time += $item->call_time; - } - if($call_time > 0) { - $h = floor($call_time/3600); - $m = floor(($call_time - $h * 3600)/60); - $s = $call_time - $h * 3600 - $m * 60; - $phone_time = $h.':'.$m.':'.$s; - } - - $total[0] = $phone_time; - $objectPHPExcel->setActiveSheetIndex(0)->setCellValue('C'.$index,$total[0]!=''?$total[0]:''); - $row['total'] = $total; - $user_rows[] = $row; - - - -// $sum_total[0] += $total[0]; -// $sum_total[1] += $total[1]; -// $sum_total[2] += $total[2]; -// $sum_total[3] += $total[3]; -// $sum_total[4] += $total[4]; -// $sum_total[5] += $total[5]; -// $sum_total[6] += $total[6]; -// $sum_total[7] += $total[7]; - } - - header('Content-Type: application/vnd.ms-excel;charset=utf-8'); - header('Content-Disposition:attachment;filename="'.date("YmjHis").'.xls"'); - header('Cache-Control: max-age=0'); - $objWriter = \PHPExcel_IOFactory::createWriter($objectPHPExcel, 'Excel5'); - $objWriter->save('php://output'); - + return $this->render('work-info',[ + 'user_id' => $user_id, + 'date_begin' => $date_begin, + 'date_end' => $date_end, + 'date2_begin' => $date2_begin, + 'date2_end' => $date2_end, + 'username' => $username + ]); } - - public function actionWorkInfo() + public function actionWorkInfoJson() { + Yii::$app->response->format = Response::FORMAT_JSON; $request = Yii::$app->request; $user_id = $request->get('user_id'); $date_begin = $request->get('date_begin'); @@ -726,8 +548,7 @@ class StatisticsController extends BaseController //提交单数 $tmp_query = OrderT::find() - ->where('user_id='.$user_info->id.' and status_id>1') - ->andWhere('insurance_status=1 or insurance_status=3'); + ->where('user_id='.$user_info->id.' and status_id>1'); if($date_begin != '') { $tmp_query = $tmp_query->andWhere('submit_date>="'.$date_begin.'"'); } @@ -763,17 +584,29 @@ class StatisticsController extends BaseController $phone_time = ''; $total[0] = $phone_time; - return $this->render('work-info',[ - 'user_info' => $user_info, - 'items' => $items, - 'date_begin' => $date_begin, - 'date_end' => $date_end, - 'date2_begin' => $date2_begin, - 'date2_end' => $date2_end, - 'username' => $username, - 'total' => $total - ]); + $data = []; + $data['total'] = count($items); + $data['rows'] = []; + foreach($items as $item) { + $row = $item->toArray(); + $row['total1_clear'] = '¥'.$item->total1_clear; + $row['total1_real'] = '¥'.$item->total1_real; + $row['total1_dis'] = '¥'.$item->total1_dis; + $row['total1_percent'] = '¥'.$item->total1_percent; + $row['status_name'] = '¥'.$item->status->name; + $row['op'] = 1; + $data['rows'][] = $row; + } + $row = []; + $row['id'] = '汇总'; + $row['total1_clear'] = $total[2]?'¥'.number_format($total[2],2):''; + $row['total1_real'] = $total[8]?'¥'.number_format($total[8],2):''; + $row['total1_dis'] = $total[9]?'¥'.number_format($total[9],2):''; + $row['op'] = 0; + $data['rows'][] = $row; + return $data; } + public function actionFixWorkInfo() { $request = Yii::$app->request; @@ -1054,4 +887,4 @@ class StatisticsController extends BaseController 'total' => $total ]); } -} +} \ No newline at end of file diff --git a/frontend/controllers/SystemController.php b/frontend/controllers/SystemController.php index 4bda3eb..9d24355 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,14 +201,34 @@ 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; } } + + public function actionTest() { + $items = OrderT::find() + ->where('status_id=10') + ->all(); + foreach($items as $item) { + $car_info = $item->car; + if(!$car_info) { + echo 'error'; + break; + } + $car_info->op1_id = $item->user_id; + if(!$car_info->save()) { + print_r($car_info->getErrors()); + break; + } + } + return count($items); + } } diff --git a/frontend/views/appointment/all.php b/frontend/views/appointment/all.php index bbfb12b..6883663 100644 --- a/frontend/views/appointment/all.php +++ b/frontend/views/appointment/all.php @@ -28,6 +28,7 @@ use \common\libs\MyLib; +
@@ -80,6 +81,11 @@ use \common\libs\MyLib; } function search() { + o = {}; + var params = $("#searchFrm").serializeArray(); + $.each(params, function(index) { + o[this['name']] = this['value']; + }); $('#listTable').bootstrapTable('destroy'); $('#listTable').bootstrapTable({ url: "/appointment/all-json", @@ -87,10 +93,6 @@ use \common\libs\MyLib; sidePagination: 'server', multipleSelectRow: true, queryParams: function(params) { - o['car_man'] = $('#car_man').val(); - o['phone'] = $('#phone').val(); - o['car_no'] = $('#car_no').val(); - o['id_man'] = $('#id_man').val(); o['limit'] = params['limit']; o['offset'] = params['offset']; return o; diff --git a/frontend/views/appointment/first.php b/frontend/views/appointment/first.php index 6db468a..adffc3c 100644 --- a/frontend/views/appointment/first.php +++ b/frontend/views/appointment/first.php @@ -28,6 +28,7 @@ use \common\libs\MyLib;
+
@@ -80,6 +81,11 @@ use \common\libs\MyLib; } function search() { + o = {}; + var params = $("#searchFrm").serializeArray(); + $.each(params, function(index) { + o[this['name']] = this['value']; + }); $('#listTable').bootstrapTable('destroy'); $('#listTable').bootstrapTable({ url: "/appointment/first-json", @@ -87,10 +93,6 @@ use \common\libs\MyLib; sidePagination: 'server', multipleSelectRow: true, queryParams: function(params) { - o['car_man'] = $('#car_man').val(); - o['phone'] = $('#phone').val(); - o['car_no'] = $('#car_no').val(); - o['id_man'] = $('#id_man').val(); o['limit'] = params['limit']; o['offset'] = params['offset']; return o; diff --git a/frontend/views/appointment/today.php b/frontend/views/appointment/today.php index 75b60e0..ba5de94 100644 --- a/frontend/views/appointment/today.php +++ b/frontend/views/appointment/today.php @@ -28,6 +28,7 @@ use \common\libs\MyLib;
+
@@ -80,6 +81,11 @@ use \common\libs\MyLib; } function search() { + o = {}; + var params = $("#searchFrm").serializeArray(); + $.each(params, function(index) { + o[this['name']] = this['value']; + }); $('#listTable').bootstrapTable('destroy'); $('#listTable').bootstrapTable({ url: "/appointment/today-json", @@ -87,10 +93,6 @@ use \common\libs\MyLib; sidePagination: 'server', multipleSelectRow: true, queryParams: function(params) { - o['car_man'] = $('#car_man').val(); - o['phone'] = $('#phone').val(); - o['car_no'] = $('#car_no').val(); - o['id_man'] = $('#id_man').val(); o['limit'] = params['limit']; o['offset'] = params['offset']; return o; diff --git a/frontend/views/bank/edit.php b/frontend/views/bank/edit.php index b0f792e..7aa80eb 100644 --- a/frontend/views/bank/edit.php +++ b/frontend/views/bank/edit.php @@ -9,18 +9,18 @@ use \common\libs\MyLib;
-
+
- -
+ +
-
+
diff --git a/frontend/views/bank/index.php b/frontend/views/bank/index.php index 1a0111e..4643609 100644 --- a/frontend/views/bank/index.php +++ b/frontend/views/bank/index.php @@ -20,7 +20,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/car-type/edit.php b/frontend/views/car-type/edit.php index 4c8e17d..1fc949f 100644 --- a/frontend/views/car-type/edit.php +++ b/frontend/views/car-type/edit.php @@ -9,18 +9,18 @@ use \common\libs\MyLib;
-
+
- -
+ +
-
+
diff --git a/frontend/views/car-type/index.php b/frontend/views/car-type/index.php index e16fa3d..ff5542b 100644 --- a/frontend/views/car-type/index.php +++ b/frontend/views/car-type/index.php @@ -20,7 +20,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/car-use/index.php b/frontend/views/car-use/index.php index 7ccbe5d..79c6d9d 100644 --- a/frontend/views/car-use/index.php +++ b/frontend/views/car-use/index.php @@ -20,7 +20,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/car/edit.php b/frontend/views/car/edit.php index 56e0cf8..7ff1057 100644 --- a/frontend/views/car/edit.php +++ b/frontend/views/car/edit.php @@ -9,7 +9,7 @@ use \common\libs\MyLib;
-
+
@@ -89,7 +89,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/car/info-track-edit.php b/frontend/views/car/info-track-edit.php index 176c6f1..221ff35 100644 --- a/frontend/views/car/info-track-edit.php +++ b/frontend/views/car/info-track-edit.php @@ -34,92 +34,92 @@ use \common\libs\MyLib;
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -241,15 +241,15 @@ use \common\libs\MyLib;
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+

-
+
-
+
@@ -335,7 +335,7 @@ use \common\libs\MyLib;
-
+
@@ -367,7 +367,7 @@ use \common\libs\MyLib;
-
+
@@ -381,7 +381,7 @@ use \common\libs\MyLib;

-
+
@@ -412,7 +412,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/car/info-track-info.php b/frontend/views/car/info-track-info.php index 2d1c56f..f80f1f4 100644 --- a/frontend/views/car/info-track-info.php +++ b/frontend/views/car/info-track-info.php @@ -30,83 +30,83 @@ use \common\libs\MyLib;
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -227,15 +227,15 @@ use \common\libs\MyLib;
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+

-
+
-
+
@@ -321,7 +321,7 @@ use \common\libs\MyLib;
-
+
@@ -353,7 +353,7 @@ use \common\libs\MyLib;
-
+
@@ -367,7 +367,7 @@ use \common\libs\MyLib;

-
+
@@ -398,7 +398,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/car/info-track.php b/frontend/views/car/info-track.php index 40924d0..0564905 100644 --- a/frontend/views/car/info-track.php +++ b/frontend/views/car/info-track.php @@ -39,7 +39,7 @@ use \common\libs\MyLib; - + diff --git a/frontend/views/car/info.php b/frontend/views/car/info.php index 8a91200..5542cb4 100644 --- a/frontend/views/car/info.php +++ b/frontend/views/car/info.php @@ -10,6 +10,7 @@ use \common\libs\MyLib; +
@@ -181,7 +182,7 @@ use \common\libs\MyLib;
-
+
车架号 car_frame_no?> 车辆使用性质carUse->name?>carUse?$car_info->carUse->name:''?>
车主
@@ -249,6 +250,9 @@ use \common\libs\MyLib; $(function() { search(); wsInit(); + $.get('/car/bihu-search?id=id?>',function(obj) { + console.log(obj); + }, 'json'); }); - - diff --git a/frontend/views/common/top.php b/frontend/views/common/top.php deleted file mode 100644 index a62b97b..0000000 --- a/frontend/views/common/top.php +++ /dev/null @@ -1,100 +0,0 @@ - - - - - 车务管理系统 - - - - -
- - - - - - - -
- - - - - - - - - - -
- - - - - - 当前用户:context->my->getShowName()?>   -
-
- -
-
- - - - - - - -
修改密码退出登录
-
- - - - - diff --git a/frontend/views/common/update-pwd.php b/frontend/views/common/update-pwd.php index 6169175..4caef23 100644 --- a/frontend/views/common/update-pwd.php +++ b/frontend/views/common/update-pwd.php @@ -11,42 +11,42 @@ use \common\libs\MyLib;
-
+
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
-
+
diff --git a/frontend/views/database/a-index.php b/frontend/views/database/a-index.php index 6d66618..3f66a8f 100644 --- a/frontend/views/database/a-index.php +++ b/frontend/views/database/a-index.php @@ -48,7 +48,7 @@ use \common\libs\MyLib;
- + -
@@ -56,7 +56,7 @@ use \common\libs\MyLib;
- + -
@@ -177,7 +177,11 @@ use \common\libs\MyLib; btn: ['删除','取消'], //按钮 shade: false //不显示遮罩 }, function(){ + var index = parent.layer.load(1, { + shade: [0.1,'#fff'] //0.1透明度的白色背景 + }); $.post('/car/delete',{id:id},function(data) { + parent.layer.close(index); parent.layer.msg(data.msg); if(data.success == true) { refreshList(); @@ -240,7 +244,11 @@ use \common\libs\MyLib; rows.forEach(function(item,index,array){ params.push(item.id); }); + var index = parent.layer.load(1, { + shade: [0.1,'#fff'] //0.1透明度的白色背景 + }); $.post('/database/a-b', {ids:params.join(',')}, function(data) { + parent.layer.close(index); parent.layer.msg(data.msg); if(data.success == true) { refreshList(); @@ -248,15 +256,19 @@ use \common\libs\MyLib; },'json'); }); $('.btn-a-b-all').click(function() { - layer.confirm('是否确认批量移动?', { + parent.layer.confirm('是否确认批量移动?', { btn: ['确认','取消'], //按钮 shade: false //不显示遮罩 }, function(){ + var index = parent.layer.load(1, { + shade: [0.1,'#fff'] //0.1透明度的白色背景 + }); var params = o; $.post('/database/a-b-all',params,function(obj){ - layer.msg(obj.msg); + parent.layer.close(index); + parent.layer.msg(obj.msg); if(obj.success) { - layer.msg('保存成功'); + parent.layer.msg('保存成功'); search(); } },'json'); @@ -270,7 +282,11 @@ use \common\libs\MyLib; rows.forEach(function(item,index,array){ params.push(item.id); }); + var index = parent.layer.load(1, { + shade: [0.1,'#fff'] //0.1透明度的白色背景 + }); $.post('/database/a-c', {ids:params.join(',')}, function(data) { + parent.layer.close(index); parent.layer.msg(data.msg); if(data.success == true) { refreshList(); @@ -278,7 +294,7 @@ use \common\libs\MyLib; },'json'); }); $('.btn-a-invalid').click(function() { - layer.confirm('是否确认移动?', { + parent.layer.confirm('是否确认移动?', { btn: ['确认','取消'], //按钮 shade: false //不显示遮罩 }, function(){ @@ -288,10 +304,14 @@ use \common\libs\MyLib; rows.forEach(function(item,index,array){ params.push(item.id); }); + var index = parent.layer.load(1, { + shade: [0.1,'#fff'] //0.1透明度的白色背景 + }); $.post('/database/a-invalid',{ids:params.join(','), invalid_id:invalid_id},function(obj){ - layer.msg(obj.msg); + parent.layer.close(index); + parent.layer.msg(obj.msg); if(obj.success) { - layer.msg('保存成功'); + parent.layer.msg('保存成功'); search(); } },'json'); diff --git a/frontend/views/database/ad-clean-index.php b/frontend/views/database/ad-clean-index.php deleted file mode 100644 index dcffe3a..0000000 --- a/frontend/views/database/ad-clean-index.php +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - -
- 车牌: - 车主: - 联系电话: - 初登日期:从截止 - 保险公司: -
- 保险日期:从截止 - - 预约状态: - - 分配状态: - - 导入状态: - - - -
- - -id.'"'; -// if($item->id == $user_id) -// echo ' selected '; -// echo '>'.$item->getShowName().''; -// } -// ?> - - - - - - - - - -
总任务数:  
- -
- - - - - - - - - - - - - - - - $item) { - $car_info = $item->car; - ?> - - - - - - - - - - - - - - - - - - -
车牌车型车主联系电话初登日期保险日期保险公司发动机号车架号操作员
car_no?>factory_model,10)?>car_man,10)?>phone?>register_date?>insurer1_date?>company?>engine_no?>car_frame_no?>user?$item->user->getShowName():''?>
-
\ No newline at end of file diff --git a/frontend/views/database/b-index.php b/frontend/views/database/b-index.php index efa17ea..d6bbd40 100644 --- a/frontend/views/database/b-index.php +++ b/frontend/views/database/b-index.php @@ -33,7 +33,7 @@ use \common\libs\MyLib;
- + -
@@ -41,7 +41,7 @@ use \common\libs\MyLib;
- + -
diff --git a/frontend/views/database/c-index.php b/frontend/views/database/c-index.php index feb252b..d59d640 100644 --- a/frontend/views/database/c-index.php +++ b/frontend/views/database/c-index.php @@ -33,7 +33,7 @@ use \common\libs\MyLib;
- + -
@@ -41,7 +41,7 @@ use \common\libs\MyLib;
- + -
diff --git a/frontend/views/database/d-index.php b/frontend/views/database/d-index.php index 337b9f3..aadbcc8 100644 --- a/frontend/views/database/d-index.php +++ b/frontend/views/database/d-index.php @@ -33,7 +33,7 @@ use \common\libs\MyLib;
- + -
diff --git a/frontend/views/database/invalid-index-search.php b/frontend/views/database/invalid-index-search.php deleted file mode 100644 index 3dee376..0000000 --- a/frontend/views/database/invalid-index-search.php +++ /dev/null @@ -1,94 +0,0 @@ - -beginBlock('header_css'); ?> -endBlock(); ?> - -
-
-
-
-
- -
- -
- -
- -
- -
- -
-
-
- -
-
- - - -
-
- -
-
- - - -
-
- -
- -
-
-
- -
- -
- -
- -
-
-
-
- -
-
-
-
-
-
- -beginBlock('footer_js'); ?> - -endBlock('footer_js'); ?> diff --git a/frontend/views/database/invalid-index.php b/frontend/views/database/invalid-index.php index 4b8a14d..043b23c 100644 --- a/frontend/views/database/invalid-index.php +++ b/frontend/views/database/invalid-index.php @@ -33,7 +33,7 @@ use \common\libs\MyLib;
- + -
@@ -41,7 +41,7 @@ use \common\libs\MyLib;
- + -
diff --git a/frontend/views/district/edit.php b/frontend/views/district/edit.php index e2cc119..465ab21 100644 --- a/frontend/views/district/edit.php +++ b/frontend/views/district/edit.php @@ -9,16 +9,16 @@ use \common\libs\MyLib;
-
+
- -
+ +
- -
+ +
-
+
diff --git a/frontend/views/district/index.php b/frontend/views/district/index.php index 58c7699..5394128 100644 --- a/frontend/views/district/index.php +++ b/frontend/views/district/index.php @@ -20,7 +20,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/finance/budian-list.php b/frontend/views/finance/budian-list.php index dc346c5..cd0e4a7 100644 --- a/frontend/views/finance/budian-list.php +++ b/frontend/views/finance/budian-list.php @@ -40,8 +40,6 @@ use \common\libs\MyLib; id.'"'; - if($item->id == $company_id) - echo ' selected '; echo '>'.$item->name.''; } ?> @@ -126,6 +124,20 @@ use \common\libs\MyLib; o['offset'] = params['offset']; o['limit'] = params['limit']; return o; + }, + responseHandler: function (res) { + var totals = res.rows.pop(); + var html = ''; + $('#listTable').find('tfoot').remove(); + $('#listTable').append(html); + return res; } }); return false; diff --git a/frontend/views/finance/car-update-frame.php b/frontend/views/finance/car-update-frame.php index f0ae390..725d011 100644 --- a/frontend/views/finance/car-update-frame.php +++ b/frontend/views/finance/car-update-frame.php @@ -12,7 +12,7 @@ use \common\libs\MyLib;
-
+
@@ -27,7 +27,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/finance/chuna-gongzi-info.php b/frontend/views/finance/chuna-gongzi-info.php index 19365da..db32d6a 100644 --- a/frontend/views/finance/chuna-gongzi-info.php +++ b/frontend/views/finance/chuna-gongzi-info.php @@ -18,7 +18,7 @@ use \common\libs\MyLib;
-
+
@@ -46,7 +46,7 @@ use \common\libs\MyLib; status_id < 4 || $pay_info->status_id == 8) { ?>
-
+
@@ -64,7 +64,7 @@ use \common\libs\MyLib;
-
+
count() > 0) { ?>
'; + $.each(totals,function (i,d) { + html += '
' + + ''+ d[0] +':' + + ''+ d[1] +'' + + '
' + }); + html += '
diff --git a/frontend/views/finance/chuna-gongzi-list.php b/frontend/views/finance/chuna-gongzi-list.php index c240dc8..67f1d7b 100644 --- a/frontend/views/finance/chuna-gongzi-list.php +++ b/frontend/views/finance/chuna-gongzi-list.php @@ -125,6 +125,20 @@ use \common\libs\MyLib; o['offset'] = params['offset']; o['limit'] = params['limit']; return o; + }, + responseHandler: function (res) { + var totals = res.rows.pop(); + var html = ''; + $('#listTable').find('tfoot').remove(); + $('#listTable').append(html); + return res; } }); return false; diff --git a/frontend/views/finance/gongzi-all-info.php b/frontend/views/finance/gongzi-all-info.php index 78e7d3e..c4613fe 100644 --- a/frontend/views/finance/gongzi-all-info.php +++ b/frontend/views/finance/gongzi-all-info.php @@ -15,7 +15,7 @@ use \common\libs\MyLib;
-
+
@@ -56,7 +56,7 @@ use \common\libs\MyLib;
-
+
@@ -84,7 +84,7 @@ use \common\libs\MyLib; status_id < 5 || $pay_info->status_id == 8) { ?>
-
+
@@ -215,7 +215,7 @@ use \common\libs\MyLib;
-
+
count() > 0) { ?>
'; + $.each(totals,function (i,d) { + html += '
' + + ''+ d[0] +':' + + ''+ d[1] +'' + + '
' + }); + html += '
diff --git a/frontend/views/finance/gongzi-all-list.php b/frontend/views/finance/gongzi-all-list.php index cc4dab5..baa4c33 100644 --- a/frontend/views/finance/gongzi-all-list.php +++ b/frontend/views/finance/gongzi-all-list.php @@ -128,6 +128,20 @@ use \common\libs\MyLib; o['offset'] = params['offset']; o['limit'] = params['limit']; return o; + }, + responseHandler: function (res) { + var totals = res.rows.pop(); + var html = ''; + $('#listTable').find('tfoot').remove(); + $('#listTable').append(html); + return res; } }); return false; diff --git a/frontend/views/finance/pay2-info.php b/frontend/views/finance/pay2-info.php index 2119530..e45c078 100644 --- a/frontend/views/finance/pay2-info.php +++ b/frontend/views/finance/pay2-info.php @@ -15,7 +15,7 @@ use \common\libs\MyLib;
-
+
@@ -56,7 +56,7 @@ use \common\libs\MyLib;
-
+
@@ -84,14 +84,14 @@ use \common\libs\MyLib; status_id < 4 || $pay_info->status_id == 8 || $pay_info->status_id == 10) { ?>
-
+
-
+
@@ -222,7 +222,7 @@ use \common\libs\MyLib;
-
+
count() > 0) { ?>
'; + $.each(totals,function (i,d) { + html += '
' + + ''+ d[0] +':' + + ''+ d[1] +'' + + '
' + }); + html += '
diff --git a/frontend/views/finance/pay2-list.php b/frontend/views/finance/pay2-list.php index 6b56944..d4229b4 100644 --- a/frontend/views/finance/pay2-list.php +++ b/frontend/views/finance/pay2-list.php @@ -128,6 +128,20 @@ use \common\libs\MyLib; o['offset'] = params['offset']; o['limit'] = params['limit']; return o; + }, + responseHandler: function (res) { + var totals = res.rows.pop(); + var html = ''; + $('#listTable').find('tfoot').remove(); + $('#listTable').append(html); + return res; } }); return false; diff --git a/frontend/views/finance/receipt-info.php b/frontend/views/finance/receipt-info.php index 79ef837..24a3c42 100644 --- a/frontend/views/finance/receipt-info.php +++ b/frontend/views/finance/receipt-info.php @@ -54,7 +54,7 @@ use \common\libs\MyLib;
- +
@@ -74,12 +74,14 @@ use \common\libs\MyLib;
beginBlock('footer_js'); ?> - - - -
'; + $.each(totals,function (i,d) { + html += '
' + + ''+ d[0] +':' + + ''+ d[1] +'' + + '
' + }); + html += '
- - - - - - - -
- - 保险类型 - - 保单号: - 车牌: - 工号:   - - 出单日期: - - -- - -
-
- 回单日期: - - -- - -
保险公司: - 级别: - 排序: - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $item) { - $start_index = ($page-1)*20+$index; - $order = $item->order; - $users=$item->user->group; - $username=$item->user; - $uname=$username['name']; - $nams=$users['name']; - - $total_real = $item->total * $item->total_rate/100; - $total_clear_real = $item->total_clear * $item->total_rate/100; - $total_dis = round($total_clear_real - $item->r_total,2); - - $order_info = $item->order; - - $total1_dis = $item->insurer_type == 1?($order_info->total1_dis + $order_info->yuangong_money):0; - - $gongzi = $item->insurer_type == 1?$item->getPayOrderUser()->sum('real_pay'):0; - - $ticket = $item->insurer_type == 1?$order_info->getGiftPrice(1,1):0; - $gift = $item->insurer_type == 1?$order_info->getGiftPrice(1,2):0; - -// $bu_dian = $item->insurer_type == 1?($item->b1_total+$item->b2_total+$item->b3_total):0; - $bu_dian = $item->budian_rate?$item->budian_rate * $item->total_clear / 100:0; - - $r_bu_dian = $item->insurer_type == 1?($item->b1_total+$item->b2_total+$item->b3_total):0; - - $liwu = $ticket + $gift; - - $lirun = $total_clear_real + $bu_dian - $total1_dis - $gongzi - $liwu; - - - - - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
序号车牌号保险公司工号级别保单号提单日期出单日期保险类型商业总保费商业净保费手续费比例补点比例应得金额实得金额回款金额补点金额回款补点减免金额礼品礼券工资利润
car_no?>company ? $order->company->name:''?>user->username?>-insurer_no?>submit_date : ''?>print_date : ''?>insurer_type==1?'商业':'交强'?>total?>total_clear?>total_rate?>budian_rate?>r_total?>
- - - - - - - -
- - - - - - - - - - - - - + + + - - \ No newline at end of file +endBlock(); ?> diff --git a/frontend/views/finance/receipt.php b/frontend/views/finance/receipt.php index 581c955..a93f521 100644 --- a/frontend/views/finance/receipt.php +++ b/frontend/views/finance/receipt.php @@ -23,8 +23,8 @@ use \common\libs\MyLib;
@@ -145,6 +145,20 @@ use \common\libs\MyLib; o['offset'] = params['offset']; o['limit'] = params['limit']; return o; + }, + responseHandler: function (res) { + var totals = res.rows.pop(); + var html = ''; + $.each(totals,function (i,d) { + html += '
' + + ''+ d[0] +':' + + ''+ d[1] +'' + + '
' + }); + html += ''; + $('#listTable').find('tfoot').remove(); + $('#listTable').append(html); + return res; } }); return false; diff --git a/frontend/views/finance/ticheng-jisuan.php b/frontend/views/finance/ticheng-jisuan.php index ecfdaa8..bb5e3e1 100644 --- a/frontend/views/finance/ticheng-jisuan.php +++ b/frontend/views/finance/ticheng-jisuan.php @@ -58,7 +58,7 @@ use \common\libs\MyLib;
- + -
@@ -208,6 +208,20 @@ use \common\libs\MyLib; o['offset'] = params['offset']; o['limit'] = params['limit']; return o; + }, + responseHandler: function (res) { + var totals = res.rows.pop(); + var html = ''; + $.each(totals,function (i,d) { + html += '
' + + ''+ d[0] +':' + + ''+ d[1] +'' + + '
' + }); + html += ''; + $('#listTable').find('tfoot').remove(); + $('#listTable').append(html); + return res; } }); return false; diff --git a/frontend/views/fix-car/add-item.php b/frontend/views/fix-car/add-item.php index f4f617b..2b2db66 100644 --- a/frontend/views/fix-car/add-item.php +++ b/frontend/views/fix-car/add-item.php @@ -11,7 +11,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/fix-car/ajax-item-list.php b/frontend/views/fix-car/ajax-item-list.php index ecad3ee..491102e 100644 --- a/frontend/views/fix-car/ajax-item-list.php +++ b/frontend/views/fix-car/ajax-item-list.php @@ -11,7 +11,7 @@ use \common\libs\MyLib;
-
+
@@ -38,7 +38,7 @@ use \common\libs\MyLib;
-
+
@@ -65,7 +65,7 @@ use \common\libs\MyLib;
-
+
@@ -92,7 +92,7 @@ use \common\libs\MyLib;
-
+
@@ -119,7 +119,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/fix-car/my-list-edit.php b/frontend/views/fix-car/my-list-edit.php index a1e9859..1206bb9 100644 --- a/frontend/views/fix-car/my-list-edit.php +++ b/frontend/views/fix-car/my-list-edit.php @@ -29,23 +29,23 @@ use \common\libs\MyLib;
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -336,7 +336,7 @@ use \common\libs\MyLib;
- +
@@ -384,7 +384,7 @@ use \common\libs\MyLib;
-
+
@@ -440,10 +440,10 @@ use \common\libs\MyLib;
-
+
-
+
@@ -530,7 +530,7 @@ use \common\libs\MyLib; '
' + '
' + '
' + - '
' + + '
' + '
' + ' ' + ' ' + diff --git a/frontend/views/fix-car/my-search-result.php b/frontend/views/fix-car/my-search-result.php index 001379e..2822447 100644 --- a/frontend/views/fix-car/my-search-result.php +++ b/frontend/views/fix-car/my-search-result.php @@ -17,7 +17,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/fix-car/my-search.php b/frontend/views/fix-car/my-search.php index 76821b7..837c0cd 100644 --- a/frontend/views/fix-car/my-search.php +++ b/frontend/views/fix-car/my-search.php @@ -11,7 +11,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/fix-car/step1-list-finish.php b/frontend/views/fix-car/step1-list-finish.php index 4e00d7e..692909d 100644 --- a/frontend/views/fix-car/step1-list-finish.php +++ b/frontend/views/fix-car/step1-list-finish.php @@ -24,7 +24,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/fix-car/step2-list.php b/frontend/views/fix-car/step2-list.php index 56f4d69..83d5257 100644 --- a/frontend/views/fix-car/step2-list.php +++ b/frontend/views/fix-car/step2-list.php @@ -24,7 +24,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/fix-car/step3-list.php b/frontend/views/fix-car/step3-list.php index e7f8334..291a34e 100644 --- a/frontend/views/fix-car/step3-list.php +++ b/frontend/views/fix-car/step3-list.php @@ -24,7 +24,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/fix-car/step4-list.php b/frontend/views/fix-car/step4-list.php index edf97d2..048009b 100644 --- a/frontend/views/fix-car/step4-list.php +++ b/frontend/views/fix-car/step4-list.php @@ -24,7 +24,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/gift/gift-out.php b/frontend/views/gift/gift-out.php deleted file mode 100644 index 2a08279..0000000 --- a/frontend/views/gift/gift-out.php +++ /dev/null @@ -1,170 +0,0 @@ - -beginBlock('header_css'); ?> - -endBlock(); ?> - -
-
-
-
礼品出库
- -
-
-
-
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- -
-
- - - -
-
- -
-
- - - -
-
-
- -
-
- -
-
-
- - - - - - - - - - - - - - -
ID礼品编号礼品车牌号车架号提单人出库时间状态操作员操作
-
-
-
-
-
- - -beginBlock('footer_js'); ?> - - - - -endBlock(); ?> diff --git a/frontend/views/gift/gift-tj.php b/frontend/views/gift/gift-tj.php index 69ae0ae..b7e6bc0 100644 --- a/frontend/views/gift/gift-tj.php +++ b/frontend/views/gift/gift-tj.php @@ -16,28 +16,24 @@ use \common\libs\MyLib;
-
-
- -
- -
-
-
- - - -
-
-
- + +
+ + +
+
+
+ + +
+
@@ -46,7 +42,6 @@ use \common\libs\MyLib; ID 名称 - 库存 待出库 已出库 @@ -64,21 +59,26 @@ use \common\libs\MyLib; + + + +endBlock('footer_js'); ?> \ No newline at end of file diff --git a/frontend/views/gift/index.php b/frontend/views/gift/index.php index d3779fc..7baeb5a 100644 --- a/frontend/views/gift/index.php +++ b/frontend/views/gift/index.php @@ -24,7 +24,7 @@ use \common\libs\MyLib;
diff --git a/frontend/views/gift/mng-list-info.php b/frontend/views/gift/mng-list-info.php deleted file mode 100644 index c54d5ed..0000000 --- a/frontend/views/gift/mng-list-info.php +++ /dev/null @@ -1,400 +0,0 @@ - - - - - - - - - - - - -
- - - - - - - - - - -
 
-
- - - - -
- - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
车牌号car_no?>厂牌型号factory_model?>品牌brand?$car_info->brand->name:''?>车系series?$car_info->series->name:''?>
发动机号engine_no?>车架号car_frame_no?>初登日期register_date?>排量displacement?$car_info->displacement->name:''?>
车辆类型carType?$car_info->carType->name:''?>运营性质carUse?$car_info->carUse->name:''?>座位数seats?>年份car_year?>
车主car_man?>联系电话phone?>证件号码car_man_number?>
备注remark?>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
被保险人id_man?>证件号码id_number?>联系人link_man?>联系电话link_phone?>
送单日期send_date?>保险公司company?$order_info->company->name:''?>付款方式payType?$order_info->payType->name:''?>电子邮件email?>
商业起保日期insurer1_begin_date?>交强起保日期insurer2_begin_date?>缴费单号pay_no?>
商业保单号insurer1_no?>交强保单号insurer2_no?>备注remark?>
送单地址 - direction1?$order_info->direction1->name:''?> - range1?$order_info->range1->name:''?> - city1?$order_info->city1->name:''?> - district1?$order_info->district1->name:''?> - send_address1?> -
正本送单地址 - direction2?$order_info->direction2->name:''?> - range2?$order_info->range2->name:''?> - city2?$order_info->city2->name:''?> - district2?$order_info->district2->name:''?> - send_address2?> -
- - - - - - -
- - - - - - - id; - if(!$order_id) - $order_id = 0; - $tmp_row = PriceT::find() - ->where('order_id='.$order_id.' and type_id='.$item->id) - ->one(); - if($tmp_row->val == '' || $tmp_row->val == '0' || $tmp_row->val == '否' || $tmp_row->val == '无') continue; - ?> - - - - - - -
险种内容不计免赔
name?>(code?>)val?>is_nopay == 1) { - echo '是'; - } - ?> -
-
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
商业总净保费total1_clear?>商业含税总保费total1?>
交强总净保费total2_clear?>交强含税总保费total2?>
车船税total3?>共计签单total_all?>
折扣后商业净保费total1_real?>减免金额total1_dis?>
商业折扣率total1_percent?>应收total_real?>
备注price_remark?>
- - - - - - - - - - - - - -
领款人money_man?>
银行账号money_no?>
开户行money_bank?>
-
-
-
- - - - -
- - - - - - - - - - - - - - - - - - - - -
快递公司: - - 快递单号: - - 配送员电话: - -
描述: - -
- -
-
-
- - - - -
- - - - - - - - - - - - - - - - $item) { - if(!$item->gift) continue; - ?> - - - - - - - - - - - - -
选择礼品名称类型描述分类添加者操作时间状态
status == 0 || $item->status == 2) { - echo ''; - } else { - echo ''; - } - ?>gift->name?>gift->type->name?>gift->remark?>strategy_id>0?'公司礼品':'自费礼品'?>user?$item->user->getShowName():''?>submit_time)?> - status == 0) echo '未出库'; - if($item->status == 1) echo '已出库'; - if($item->status == 2) echo '正在退换'; - ?> -
-
- - - - -
-
-
-
-
- -
- - - - - \ No newline at end of file diff --git a/frontend/views/gift/mng-list.php b/frontend/views/gift/mng-list.php deleted file mode 100644 index a05603a..0000000 --- a/frontend/views/gift/mng-list.php +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - -
- 车主: - 电话: - 车牌: -
- - - - - - - - - - - - - - - - $item) { - $start_index = ($page - 1) * 20 + $index; - ?> - - - - - - - - - - - - - - - - - - -
序号车主提单日期送单日期车牌号品牌共计签单应收状态业务员当前操作操作
car_man,15)?>submit_date?>send_date?>car_no?>car?MyLib::substr_cut($item->car->factory_model,15):''?>total_all?>total_real?> status->name?>user?$item->user->getShowName():''?>lock?$item->lock->getShowName():''?> - [详情] -
diff --git a/frontend/views/gift/stastics.php b/frontend/views/gift/stastics.php deleted file mode 100644 index 5cc4686..0000000 --- a/frontend/views/gift/stastics.php +++ /dev/null @@ -1,65 +0,0 @@ - -beginBlock('header_css'); ?> - -endBlock(); ?> - -
-
-
-
礼品盘库
- -
-
-
-
- - - - - - - - - - -
ID名称总数量已出库已使用
-
-
-
-
-
- - -beginBlock('footer_js'); ?> - - - - -endBlock(); ?> diff --git a/frontend/views/gift/ticket-tj.php b/frontend/views/gift/ticket-tj.php index 3799fcc..db622c1 100644 --- a/frontend/views/gift/ticket-tj.php +++ b/frontend/views/gift/ticket-tj.php @@ -16,28 +16,24 @@ use \common\libs\MyLib;
-
-
- -
- -
-
-
- - - -
-
-
- + +
+ + +
+
+
+ + +
+
@@ -46,9 +42,8 @@ use \common\libs\MyLib; ID 名称 - 库存 - 待出库 - 已出库 + 未使用 + 已使用 @@ -64,21 +59,26 @@ use \common\libs\MyLib; + + + +endBlock('footer_js'); ?> \ No newline at end of file diff --git a/frontend/views/gift/ticket-use.php b/frontend/views/gift/ticket-use.php new file mode 100644 index 0000000..472c0d4 --- /dev/null +++ b/frontend/views/gift/ticket-use.php @@ -0,0 +1,169 @@ + +beginBlock('header_css'); ?> + +endBlock(); ?> + +
+
+
+
礼券使用
+ +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ + + +
+
+
+ +
+ + + +
+
+ +
+
+
+ + + + + + + + + + + + + + + + + +
ID礼券编号礼品车牌号车架号发放日期有效期日期提单人使用日期状态操作员操作
+
+
+
+
+
+ + +beginBlock('footer_js'); ?> + + + + +endBlock(); ?> \ No newline at end of file diff --git a/frontend/views/group/edit.php b/frontend/views/group/edit.php index 8536942..0562ffa 100644 --- a/frontend/views/group/edit.php +++ b/frontend/views/group/edit.php @@ -9,16 +9,16 @@ use \common\libs\MyLib;
-
+
- -
+ +
- -
+ +
- -
+ +
- -
+ +
-
+
diff --git a/frontend/views/group/index.php b/frontend/views/group/index.php index b11c948..a9ecf73 100644 --- a/frontend/views/group/index.php +++ b/frontend/views/group/index.php @@ -20,7 +20,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/group/permission.php b/frontend/views/group/permission.php deleted file mode 100644 index 4b445d0..0000000 --- a/frontend/views/group/permission.php +++ /dev/null @@ -1,65 +0,0 @@ - -
- - - - - -
- - - getPath():''?> -
- - - - - - - - - - - - - - - - -
菜单名称路径
- - name ?>path ?>
- - - - diff --git a/frontend/views/insurer-company/edit.php b/frontend/views/insurer-company/edit.php index 29a6a45..0c07168 100644 --- a/frontend/views/insurer-company/edit.php +++ b/frontend/views/insurer-company/edit.php @@ -9,7 +9,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/insurer-company/index.php b/frontend/views/insurer-company/index.php index f06f3b6..98a980d 100644 --- a/frontend/views/insurer-company/index.php +++ b/frontend/views/insurer-company/index.php @@ -20,7 +20,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/insurer-company2/edit.php b/frontend/views/insurer-company2/edit.php index efc3c81..9eda118 100644 --- a/frontend/views/insurer-company2/edit.php +++ b/frontend/views/insurer-company2/edit.php @@ -9,18 +9,18 @@ use \common\libs\MyLib;
-
+
- -
+ +
-
+
diff --git a/frontend/views/insurer-company2/index.php b/frontend/views/insurer-company2/index.php index 46aa7cc..0b7e5ef 100644 --- a/frontend/views/insurer-company2/index.php +++ b/frontend/views/insurer-company2/index.php @@ -20,7 +20,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/insurer-type/edit.php b/frontend/views/insurer-type/edit.php index 0de97b0..f8f28b4 100644 --- a/frontend/views/insurer-type/edit.php +++ b/frontend/views/insurer-type/edit.php @@ -9,28 +9,28 @@ use \common\libs\MyLib;
-
+
- -
+ +
- -
+ +
- -
+ +
- -
+ +
@@ -38,7 +38,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/insurer-type/index.php b/frontend/views/insurer-type/index.php index 7b388ba..90b8721 100644 --- a/frontend/views/insurer-type/index.php +++ b/frontend/views/insurer-type/index.php @@ -20,7 +20,7 @@ use \common\libs\MyLib;
-
+
@@ -47,12 +47,14 @@ use \common\libs\MyLib; - - -endBlock('footer_js'); ?> \ No newline at end of file +endBlock(); ?> \ No newline at end of file diff --git a/frontend/views/insurer/my-list-info.php b/frontend/views/insurer/my-list-info.php index 1cb3302..4c2a9cf 100644 --- a/frontend/views/insurer/my-list-info.php +++ b/frontend/views/insurer/my-list-info.php @@ -195,8 +195,8 @@ use common\models\PriceT; @@ -207,12 +207,17 @@ use common\models\PriceT;
送单地址 - - + +
-
+
gift_status == 0) { ?> + gift_status == 1 && $my_id == 1) { ?> + + @@ -264,7 +269,7 @@ use common\models\PriceT; html += '
'; $('#gifts').html(html); } else { - parent.layer.msg(obj.msg); + //parent.layer.msg(obj.msg); } }, 'json'); $.get('/marketing-strategy/get-gifts?type=2&order_id=id?>&fanxian_id=' + fanxian_id, function(obj){ @@ -291,8 +296,13 @@ use common\models\PriceT; html += ''; html += '
'; - if(sub_item.selected == 1) - html += '
' + sub_item.name + '
'; + if(sub_item.selected == 1) { + html += '
' + sub_item.name; + if(sub_item.img_src != '') { + html += ''; + } + html += '
'; + } }); html += ''; @@ -303,7 +313,7 @@ use common\models\PriceT; html += '
'; $('#quans').html(html); } else { - parent.layer.msg(obj.msg); + //parent.layer.msg(obj.msg); } }, 'json'); } @@ -345,6 +355,29 @@ use common\models\PriceT; // }); }); + gift_status == 1 && $my_id == 1) { ?> + layer.config({extend: 'extend/layer.ext.js'}); + $('.btn-cancel').click(function () { + layer.confirm('此操作将回滚礼品状态,删除已生成礼物记录,确定继续?', { + btn: ['确认','取消'], //按钮 + shade: false //不显示遮罩 + }, function(){ + layer.prompt({ + formType: 2, + title: '礼品状态回退理由', + }, function(value, index){ + $.post('/insurer/gift-cancel',{order_id:id?>,return_msg:value},function(data) { + layer.alert(data.msg,function () { + window.location.reload(); + }); + }, 'json'); + layer.close(index); + }); + }, function(){ + // + }); + }); + }); endBlock(); ?> diff --git a/frontend/views/insurer/my-list.php b/frontend/views/insurer/my-list.php index 9af1d06..921b693 100644 --- a/frontend/views/insurer/my-list.php +++ b/frontend/views/insurer/my-list.php @@ -16,9 +16,9 @@ use \common\libs\MyLib;
- -
- + +
+ @@ -28,6 +28,7 @@ use \common\libs\MyLib;
+
@@ -79,6 +80,11 @@ use \common\libs\MyLib; } function search() { + o = {}; + var params = $("#searchFrm").serializeArray(); + $.each(params, function(index) { + o[this['name']] = this['value']; + }); $('#listTable').bootstrapTable('destroy'); $('#listTable').bootstrapTable({ url: "/insurer/my-list-json", @@ -86,10 +92,6 @@ use \common\libs\MyLib; sidePagination: 'server', multipleSelectRow: true, queryParams: function(params) { - o['car_man'] = $('#car_man').val(); - o['phone'] = $('#phone').val(); - o['car_no'] = $('#car_no').val(); - o['id_man'] = $('#id_man').val(); o['limit'] = params['limit']; o['offset'] = params['offset']; return o; diff --git a/frontend/views/insurer/my-return-list.php b/frontend/views/insurer/my-return-list.php index 13e13da..4cfc0fd 100644 --- a/frontend/views/insurer/my-return-list.php +++ b/frontend/views/insurer/my-return-list.php @@ -16,9 +16,9 @@ use \common\libs\MyLib;
-
-
- + +
+ @@ -28,6 +28,7 @@ use \common\libs\MyLib;
+
@@ -74,6 +75,11 @@ use \common\libs\MyLib; } function search() { + o = {}; + var params = $("#searchFrm").serializeArray(); + $.each(params, function(index) { + o[this['name']] = this['value']; + }); $('#listTable').bootstrapTable('destroy'); $('#listTable').bootstrapTable({ url: "/insurer/my-return-list-json", diff --git a/frontend/views/insurer/office-mng-edit.php b/frontend/views/insurer/office-mng-edit.php index 78ed214..ce75846 100644 --- a/frontend/views/insurer/office-mng-edit.php +++ b/frontend/views/insurer/office-mng-edit.php @@ -195,8 +195,8 @@ use common\models\PriceT; 送单地址 - - + + @@ -215,9 +215,19 @@ use common\models\PriceT; - + - + @@ -225,9 +235,9 @@ use common\models\PriceT; @@ -28,6 +28,7 @@ use \common\libs\MyLib; +
@@ -78,6 +79,11 @@ use \common\libs\MyLib; } function search() { + o = {}; + var params = $("#searchFrm").serializeArray(); + $.each(params, function(index) { + o[this['name']] = this['value']; + }); $('#listTable').bootstrapTable('destroy'); $('#listTable').bootstrapTable({ url: "/insurer/office-mng-json", diff --git a/frontend/views/insurer/original-ems-edit.php b/frontend/views/insurer/original-ems-edit.php deleted file mode 100644 index 68547b2..0000000 --- a/frontend/views/insurer/original-ems-edit.php +++ /dev/null @@ -1,143 +0,0 @@ - -
商业手续费 +
+ +
%
+
+
交强手续费 +
+ +
%
+
+
内勤保险公司
- - - - - - - - - - - - send_address2):?> - - - - - - - -send_address2):?> - - - - - - - - - - - - - receiver_province):?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
送单表
收件人联系电话
正本送单地址 - city2?$order_info->city2->name:''; - $address2 .= $order_info->district2?$order_info->district2->name:''; - $address2 .= $order_info->send_address2; - ?> - -
收货人省份收货人城市
收货人区县收货人详细地址
收货人省份收货人城市
收货人区县收货人详细地址
收货人省份收货人城市
收货人区县收货人详细地址
保险公司
- -    - -
- - - - diff --git a/frontend/views/insurer/original-ems-edit1.php b/frontend/views/insurer/original-ems-edit1.php deleted file mode 100644 index 3c21c0d..0000000 --- a/frontend/views/insurer/original-ems-edit1.php +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
送单表
收件人联系电话
收货人省份收货人城市
收货人区县收货人详细地址
保险公司快递备注
快递单号
- - -    - -
- - - - diff --git a/frontend/views/insurer/original-mng-edit.php b/frontend/views/insurer/original-mng-edit.php index 0659d7f..7e05420 100644 --- a/frontend/views/insurer/original-mng-edit.php +++ b/frontend/views/insurer/original-mng-edit.php @@ -195,8 +195,8 @@ use common\models\PriceT; 送单地址 - - + + @@ -294,7 +294,7 @@ use common\models\PriceT;
-
+
@@ -398,7 +398,7 @@ use common\models\PriceT; $.post('/insurer/original-mng-save',params,function(obj){ parent.layer.msg(obj.msg); if(obj.success && status_id>5) { - $('.btn-back') + $('.btn-back').click(); } },'json'); } @@ -417,7 +417,7 @@ use common\models\PriceT; },function(obj){ parent.layer.msg(obj.msg); if(obj.success) { - $('#back-btn').click(); + $('.btn-back').click(); } },'json'); }); diff --git a/frontend/views/insurer/original-mng.php b/frontend/views/insurer/original-mng.php index 23e49aa..3b6ca85 100644 --- a/frontend/views/insurer/original-mng.php +++ b/frontend/views/insurer/original-mng.php @@ -16,9 +16,9 @@ use \common\libs\MyLib;
-
-
- + +
+ @@ -28,6 +28,7 @@ use \common\libs\MyLib;
+
@@ -77,6 +78,11 @@ use \common\libs\MyLib; } function search() { + o = {}; + var params = $("#searchFrm").serializeArray(); + $.each(params, function(index) { + o[this['name']] = this['value']; + }); $('#listTable').bootstrapTable('destroy'); $('#listTable').bootstrapTable({ url: "/insurer/original-mng-json", diff --git a/frontend/views/insurer/original-send-mng-edit.php b/frontend/views/insurer/original-send-mng-edit.php deleted file mode 100644 index 167ce8e..0000000 --- a/frontend/views/insurer/original-send-mng-edit.php +++ /dev/null @@ -1,566 +0,0 @@ - - - - - - - - - -
- - - - -
- -
- - - - - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
车牌号car_no?>厂牌型号factory_model?>品牌brand?$car_info->brand->name:''?>车系series?$car_info->series->name:''?>
发动机号engine_no?>车架号car_frame_no?>初登日期register_date?>排量displacement?$car_info->displacement->name:''?>
车辆类型carType?$car_info->carType->name:''?>运营性质carUse?$car_info->carUse->name:''?>座位数seats?>年份car_year?>
车主car_man?>联系电话phone?>证件号码car_man_number?>
备注remark?>业务员user?$order_info->user->getShowName():''?>联系电话user?$order_info->user->phone:''?>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
被保险人id_man?>证件号码id_number?>联系人link_man?>联系电话link_phone?>
送单日期send_date?>保险公司company?$order_info->company->name:''?>付款方式payType?$order_info->payType->name:''?>电子邮件email?>
商业起保日期insurer1_begin_date?>交强起保日期insurer2_begin_date?>缴费单号pay_no?>
商业保单号insurer1_no?>交强保单号insurer2_no?>备注remark?>
送单地址 - direction1?$order_info->direction1->name:''?> - range1?$order_info->range1->name:''?> - city1?$order_info->city1->name:''?> - district1?$order_info->district1->name:''?> - send_address1?> -
正本送单地址 - send_address2):?> - direction2?$order_info->direction2->name:''?> - range2?$order_info->range2->name:''?> - city2?$order_info->city2->name:''?> - district2?$order_info->district2->name:''?> - send_address2?> - - receiver_province):?> - receiver_province?> - receiver_city?> - receiver_county?> - receiver_address?> - - addr->regionP->name?> - addr->regionC->name?> - addr->regionD->name?> - addr->regionT)):?> - addr->regionT?> - - addr->regionT->name?> - - addr->address?> - -
- - - - - - -
- - - - - - - id; - if(!$order_id) - $order_id = 0; - $tmp_row = PriceT::find() - ->where('order_id='.$order_id.' and type_id='.$item->id) - ->one(); - if($tmp_row->val == '' || $tmp_row->val == '0' || $tmp_row->val == '否' || $tmp_row->val == '无') continue; - ?> - - - - - - -
险种内容不计免赔
name?>(code?>)val?>is_nopay==1) { - echo '是'; - } - ?> -
-
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
商业总净保费total1_clear?>商业含税总保费total1?>
交强总净保费total2_clear?>交强含税总保费total2?>
车船税total3?>共计签单total_all?>
折扣后商业净保费total1_real?>减免金额total1_dis?>
商业折扣率total1_percent?>应收total_real?>
备注price_remark?>
-
-

礼券

- - where('group_id='.$item->id.' and car_no like "'.$order_info->car_no.'"') -// ->one(); - $index++; - echo ''; - echo ''; - echo ''; - - echo ''; - echo ''; - } - echo ''; - - ?> -
'.$index.' '.$item->name.''; - echo ''; - echo ''; - echo '
-

实物礼品

- - where('group_id='.$item->id.' and car_no="'.$order_info->car_no.'"') - ->one(); - $index++; - echo ''; - echo ''; - echo ''; - if($ticket_info) { - echo ''; - echo ''; - } else { - echo ''; - echo ''; - } - echo ''; - } - ?> -
'.$index.' '.$item->name.''; - echo $ticket_info->type->name; - echo ''; - echo sprintf("%07d",$ticket_info->code); - echo ''; - echo ''; - echo '未出库已出库'; - echo '
- -
- - - - - - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - send_address2){ - $address2 = $order_info->city2?$order_info->city2->name:''; - $address2 .= $order_info->district2?$order_info->district2->name:''; - $address2 .= $order_info->send_address2; - ?> - - receiver_province){ - $address2 = $order_info->receiver_province; - $address2 .= $order_info->receiver_city; - $address2 .= $order_info->receiver_county; - $address2 .= $order_info->receiver_address; - ?> - - addr->regionP->name; - $address2.=$order_info->addr->regionC->name; - $address2.=$order_info->addr->regionD->name; - if(is_string($order_info->addr->regionT)){ - $address2.= $order_info->addr->regionT; - - }else{ - $address2.= $order_info->addr->regionT->name; - } - $address2.=$order_info->addr->address; - ?> - - - - - - - -
快递公司: - - 快递单号: - - 体检卡号: - - 收件人姓名: - -
收件人电话: - - 是否发送快递 - 发快递 |自上门或其它 - 收件人地址: - -
- -
-
- - - - - - -
- - - - -
- - - - - - - - -
保单文件打印: - shangye_src):?> - 查看商业保单并打印 - - - jiaoqiang_src):?> - 查看交强保单并打印 - -
- -
- - - - - - - -
- - - - -
-
-
-
-
- -    - -    - -    - -    - -    - -
- - - - - - - diff --git a/frontend/views/insurer/original-send-mng.php b/frontend/views/insurer/original-send-mng.php deleted file mode 100644 index 9eaaac8..0000000 --- a/frontend/views/insurer/original-send-mng.php +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - -
- 被保险人: - 电话: - 车牌: - - - - -
- - - - - - - - - - - - - - - - $item) { - $start_index = ($page - 1) * 20 + $index; - ?> - - - - - - - - - - - - - - - - - - -
序号被保险人联系电话车牌号保险公司送单时间送单地址送单备注销售座席状态当前操作操作
id_man,10)?>link_phone?>car_no?>company?$item->company->name:''?>send_date?>remark,30)?>user?$item->user->getShowName():''?> status->name?>lock?$item->lock->getShowName():''?> - [详情] -
diff --git a/frontend/views/insurer/search.php b/frontend/views/insurer/search.php index 1e22eb4..93ea8e5 100644 --- a/frontend/views/insurer/search.php +++ b/frontend/views/insurer/search.php @@ -65,7 +65,7 @@ use \common\libs\MyLib;
- +
diff --git a/frontend/views/insurer/send-mng-edit.php b/frontend/views/insurer/send-mng-edit.php deleted file mode 100644 index b405416..0000000 --- a/frontend/views/insurer/send-mng-edit.php +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
送单表
车牌出单日期送单日期
保险起期保险公司缴费单号
车型种类联系人电话
交强签单车船税商业签单
共计签单实收金额实际回款 
发票抬头缴费方式
送单备注
礼品 - - -
送单地址 - direction1?$order_info->direction1->name:''; - $address1 .= $order_info->range1?$order_info->range1->name:''; - $address1 .= $order_info->city1?$order_info->city1->name:''; - $address1 .= $order_info->district1?$order_info->district1->name:''; - $address1 .= $order_info->send_address1; - ?> - -
正本送单地址 - - - send_address2){ - $address2 = $order_info->city2?$order_info->city2->name:''; - $address2 .= $order_info->district2?$order_info->district2->name:''; - $address2 .= $order_info->send_address2; - ?> - - - receiver_province){ - $address2 = $order_info->receiver_province; - $address2 .= $order_info->receiver_city; - $address2 .= $order_info->receiver_county; - $address2 .= $order_info->receiver_address; - ?> - addr->regionP->name; - $address2.=$order_info->addr->regionC->name; - $address2.=$order_info->addr->regionD->name; - if(is_string($order_info->addr->regionT)){ - $address2.= $order_info->addr->regionT; - - }else{ - $address2.= $order_info->addr->regionT->name; - } - $address2.=$order_info->addr->regionT->name; - $address2.=$order_info->addr->address; - ?> - - - -
业务员电话送单员 - -
优惠金额被保险人签字
- -    - -    - -    - -
- - - - - diff --git a/frontend/views/insurer/send-mng.php b/frontend/views/insurer/send-mng.php deleted file mode 100644 index e579c14..0000000 --- a/frontend/views/insurer/send-mng.php +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - -
- 被保险人: - 电话: - 车牌: - 送单日期: -
- - - - - - - - - - - - - - - - - - - - $item) { - $start_index = ($page-1)*20+$index; - $op_user = $item->getUsers()->where('type_id=2')->one(); - ?> - - - - - - - - - - - - - - - - - - - - - - -
序号车牌号被保险人保险公司送单时间方位送单地址送单备注商业起保时间配送次数交强起保时间销售座席核保人员状态当前操作操作
car_no?>id_man,10)?>company?$item->company->name:''?>send_date?>direction1?$item->direction1->name:''?>city1?$item->city1->name:''; - $address .= $item->district1?$item->district1->name:''; - $address .= $item->send_address1; - echo MyLib::substr_cut($address,30); - ?> - remark,20)?>insurer1_begin_date?>send_times?>insurer2_begin_date?>user?$item->user->getShowName():''?> user ? $op_user->user->getShowName():''?>status->name?>lock?$item->lock->getShowName():''?> - [详情] -
diff --git a/frontend/views/invalid/edit.php b/frontend/views/invalid/edit.php index d8492ec..9febae6 100644 --- a/frontend/views/invalid/edit.php +++ b/frontend/views/invalid/edit.php @@ -9,16 +9,16 @@ use \common\libs\MyLib;
-
+
- -
+ +
- -
+ +
@@ -45,14 +45,14 @@ use \common\libs\MyLib;
- -
+ +
-
+
diff --git a/frontend/views/invalid/index.php b/frontend/views/invalid/index.php index 67a4461..9fd2f0c 100644 --- a/frontend/views/invalid/index.php +++ b/frontend/views/invalid/index.php @@ -20,7 +20,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/marketing-strategy/add.php b/frontend/views/marketing-strategy/add.php index ab73ea8..cf4816d 100644 --- a/frontend/views/marketing-strategy/add.php +++ b/frontend/views/marketing-strategy/add.php @@ -9,7 +9,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/marketing-strategy/edit.php b/frontend/views/marketing-strategy/edit.php index 3040161..0da66e6 100644 --- a/frontend/views/marketing-strategy/edit.php +++ b/frontend/views/marketing-strategy/edit.php @@ -23,7 +23,7 @@ use \common\libs\MyLib;
-
+
@@ -70,7 +70,7 @@ use \common\libs\MyLib;
-
+
@@ -106,7 +106,7 @@ use \common\libs\MyLib; html += '
'; html += '
'; html += '
'; - html += '
'; + html += '
'; html += '
条件:
'; html += '

保费:' + item.tiaojian.baofei + '元

'; if(item.tiaojian.car_type != '') diff --git a/frontend/views/marketing-strategy/index.php b/frontend/views/marketing-strategy/index.php index b4dc936..6f7f356 100644 --- a/frontend/views/marketing-strategy/index.php +++ b/frontend/views/marketing-strategy/index.php @@ -20,7 +20,7 @@ use \common\libs\MyLib;
-
+
@@ -71,7 +71,9 @@ use \common\libs\MyLib; }, function(){ $.post('/marketing-strategy/delete',{id:id},function(data) { parent.layer.msg(data.msg); - refreshList(); + if(data.success) { + refreshList(); + } }, 'json'); }, function(){ // diff --git a/frontend/views/marketing-strategy/select-fanxian.php b/frontend/views/marketing-strategy/select-fanxian.php index c8f0eec..cc1f241 100644 --- a/frontend/views/marketing-strategy/select-fanxian.php +++ b/frontend/views/marketing-strategy/select-fanxian.php @@ -9,7 +9,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/meet/edit.php b/frontend/views/meet/edit.php index d7da96e..6e87a4d 100644 --- a/frontend/views/meet/edit.php +++ b/frontend/views/meet/edit.php @@ -9,22 +9,22 @@ use \common\libs\MyLib;
-
+
- -
+ +
- -
+ +
- -
+ +
diff --git a/frontend/views/menu/edit.php b/frontend/views/menu/edit.php index ea66ee4..837769f 100644 --- a/frontend/views/menu/edit.php +++ b/frontend/views/menu/edit.php @@ -9,16 +9,16 @@ use \common\libs\MyLib;
-
+
- -
+ +
- -
+ +
- -
+ +
- -
+ +
-
+
diff --git a/frontend/views/menu/index.php b/frontend/views/menu/index.php index b67f9b5..90f4d97 100644 --- a/frontend/views/menu/index.php +++ b/frontend/views/menu/index.php @@ -20,7 +20,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/menu/power-detail.php b/frontend/views/menu/power-detail.php deleted file mode 100644 index a85e592..0000000 --- a/frontend/views/menu/power-detail.php +++ /dev/null @@ -1,67 +0,0 @@ - - -
- - - -
- 权限组名称: - - - - -
- - - - - - - - - - - - - -
菜单名称路径
name ?>path ?>
- - - - - diff --git a/frontend/views/menu/power-list.php b/frontend/views/menu/power-list.php deleted file mode 100644 index d4d7e01..0000000 --- a/frontend/views/menu/power-list.php +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - -
- -
- - - - - - - - $v){ ?> - - - - - - - - - - - -
序号组名操作
name?>修改 | 删除
暂无权限组数据!
- - - - diff --git a/frontend/views/pay-type/edit.php b/frontend/views/pay-type/edit.php index 3867948..c4f8d66 100644 --- a/frontend/views/pay-type/edit.php +++ b/frontend/views/pay-type/edit.php @@ -9,18 +9,18 @@ use \common\libs\MyLib;
-
+
- -
+ +
-
+
@@ -50,7 +50,7 @@ use \common\libs\MyLib; parent.refreshList(); layer_close(); } else { - parent.layer.msg(data.msg); + parent.layer.msg(obj.msg); } },'json'); }, function(){ diff --git a/frontend/views/pay-type/index.php b/frontend/views/pay-type/index.php index c26e5c7..39f395c 100644 --- a/frontend/views/pay-type/index.php +++ b/frontend/views/pay-type/index.php @@ -20,7 +20,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/payee/edit.php b/frontend/views/payee/edit.php index f6d9435..370f2f3 100644 --- a/frontend/views/payee/edit.php +++ b/frontend/views/payee/edit.php @@ -9,18 +9,18 @@ use \common\libs\MyLib;
-
+
- -
+ +
-
+
diff --git a/frontend/views/payee/index.php b/frontend/views/payee/index.php index 0d35692..bc57941 100644 --- a/frontend/views/payee/index.php +++ b/frontend/views/payee/index.php @@ -20,7 +20,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/payment/edit.php b/frontend/views/payment/edit.php index a11eebf..78a957e 100644 --- a/frontend/views/payment/edit.php +++ b/frontend/views/payment/edit.php @@ -9,18 +9,18 @@ use \common\libs\MyLib;
-
+
- -
+ +
-
+
diff --git a/frontend/views/payment/index.php b/frontend/views/payment/index.php index cb9d87f..a9df891 100644 --- a/frontend/views/payment/index.php +++ b/frontend/views/payment/index.php @@ -20,7 +20,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/permissions/edit.php b/frontend/views/permissions/edit.php index 77a778d..42077f3 100644 --- a/frontend/views/permissions/edit.php +++ b/frontend/views/permissions/edit.php @@ -9,18 +9,18 @@ use \common\libs\MyLib;
-
+
- -
+ +
-
+
diff --git a/frontend/views/permissions/index.php b/frontend/views/permissions/index.php index b2f0ffe..b4838ae 100644 --- a/frontend/views/permissions/index.php +++ b/frontend/views/permissions/index.php @@ -20,7 +20,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/permissions/permission.php b/frontend/views/permissions/permission.php index 448ed78..fba3055 100644 --- a/frontend/views/permissions/permission.php +++ b/frontend/views/permissions/permission.php @@ -2,71 +2,92 @@ use \common\libs\MyLib; ?> beginBlock('header_css'); ?> - + endBlock(); ?> -
-
-
-
- - - -
-
-
-
-
- -
-
-
-
- menus as $sub_item) { ?> +
+
+
+
+ + + +
+
+
-
+
- +
+
+ menus as $sub_item) { ?> +
+
+ +
+
+ +
-
- - -
-
-
- + + +
+
+
+ +
-
beginBlock('footer_js'); ?> - - - - + + + -endBlock(); ?> + +endBlock(); ?> \ No newline at end of file diff --git a/frontend/views/personnel/pay-info.php b/frontend/views/personnel/pay-info.php index b214edb..344d0fd 100644 --- a/frontend/views/personnel/pay-info.php +++ b/frontend/views/personnel/pay-info.php @@ -14,7 +14,7 @@ use \common\libs\MyLib;
-
+
@@ -88,7 +88,7 @@ use \common\libs\MyLib;
-
+
@@ -161,7 +161,7 @@ use \common\libs\MyLib;
-
+
@@ -250,7 +250,7 @@ use \common\libs\MyLib; status_id < 4 || $pay_info->status_id == 7) { ?>
-
+
diff --git a/frontend/views/phone-center/assign-phone.php b/frontend/views/phone-center/assign-phone.php index 7a0d74a..634e495 100644 --- a/frontend/views/phone-center/assign-phone.php +++ b/frontend/views/phone-center/assign-phone.php @@ -20,7 +20,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/phone-center/edit.php b/frontend/views/phone-center/edit.php index 93e3ceb..6cadf28 100644 --- a/frontend/views/phone-center/edit.php +++ b/frontend/views/phone-center/edit.php @@ -11,12 +11,12 @@ use \common\libs\MyLib;
-
+
- -
+ +
-
+
diff --git a/frontend/views/phone-center/sub-edit.php b/frontend/views/phone-center/sub-edit.php index 186f2e5..2a0c215 100644 --- a/frontend/views/phone-center/sub-edit.php +++ b/frontend/views/phone-center/sub-edit.php @@ -11,18 +11,18 @@ use \common\libs\MyLib;
-
+
- -
+ +
-
+
diff --git a/frontend/views/phone-center/sub-index.php b/frontend/views/phone-center/sub-index.php index adde1cb..dd495cf 100644 --- a/frontend/views/phone-center/sub-index.php +++ b/frontend/views/phone-center/sub-index.php @@ -23,12 +23,13 @@ use \common\libs\MyLib;
-
+
+ @@ -58,10 +59,10 @@ use \common\libs\MyLib; } function create() { title = '新增小号'; - layer_show(title, '/phone-center/sub-edit?assign_id='); + layer_show(title, '/phone-center/sub-edit?assign_id=id?>'); } function link(id) { - $.get('/phone/ax-init',{id:id,assign_id:},function(obj){ + $.get('/phone/ax-init',{id:id,assign_id:id?>},function(obj){ parent.layer.msg(obj.msg); },'json'); diff --git a/frontend/views/renewal/all.php b/frontend/views/renewal/all.php index fad1547..52bebeb 100644 --- a/frontend/views/renewal/all.php +++ b/frontend/views/renewal/all.php @@ -16,9 +16,9 @@ use \common\libs\MyLib;
- -
- + +
+ @@ -28,6 +28,7 @@ use \common\libs\MyLib;
+
@@ -80,6 +81,11 @@ use \common\libs\MyLib; } function search() { + o = {}; + var params = $("#searchFrm").serializeArray(); + $.each(params, function(index) { + o[this['name']] = this['value']; + }); $('#listTable').bootstrapTable('destroy'); $('#listTable').bootstrapTable({ url: "/renewal/all-json", @@ -87,10 +93,6 @@ use \common\libs\MyLib; sidePagination: 'server', multipleSelectRow: true, queryParams: function(params) { - o['car_man'] = $('#car_man').val(); - o['phone'] = $('#phone').val(); - o['car_no'] = $('#car_no').val(); - o['id_man'] = $('#id_man').val(); o['limit'] = params['limit']; o['offset'] = params['offset']; return o; diff --git a/frontend/views/renewal/first.php b/frontend/views/renewal/first.php index bac5a5b..551b859 100644 --- a/frontend/views/renewal/first.php +++ b/frontend/views/renewal/first.php @@ -16,9 +16,9 @@ use \common\libs\MyLib;
-
-
- + +
+ @@ -28,6 +28,7 @@ use \common\libs\MyLib;
+
@@ -80,6 +81,11 @@ use \common\libs\MyLib; } function search() { + o = {}; + var params = $("#searchFrm").serializeArray(); + $.each(params, function(index) { + o[this['name']] = this['value']; + }); $('#listTable').bootstrapTable('destroy'); $('#listTable').bootstrapTable({ url: "/renewal/first-json", @@ -87,10 +93,6 @@ use \common\libs\MyLib; sidePagination: 'server', multipleSelectRow: true, queryParams: function(params) { - o['car_man'] = $('#car_man').val(); - o['phone'] = $('#phone').val(); - o['car_no'] = $('#car_no').val(); - o['id_man'] = $('#id_man').val(); o['limit'] = params['limit']; o['offset'] = params['offset']; return o; diff --git a/frontend/views/renewal/today.php b/frontend/views/renewal/today.php index cd54e7d..8f14d24 100644 --- a/frontend/views/renewal/today.php +++ b/frontend/views/renewal/today.php @@ -16,9 +16,9 @@ use \common\libs\MyLib;
-
-
- + +
+ @@ -28,6 +28,7 @@ use \common\libs\MyLib;
+
@@ -80,6 +81,11 @@ use \common\libs\MyLib; } function search() { + o = {}; + var params = $("#searchFrm").serializeArray(); + $.each(params, function(index) { + o[this['name']] = this['value']; + }); $('#listTable').bootstrapTable('destroy'); $('#listTable').bootstrapTable({ url: "/renewal/today-json", @@ -87,10 +93,6 @@ use \common\libs\MyLib; sidePagination: 'server', multipleSelectRow: true, queryParams: function(params) { - o['car_man'] = $('#car_man').val(); - o['phone'] = $('#phone').val(); - o['car_no'] = $('#car_no').val(); - o['id_man'] = $('#id_man').val(); o['limit'] = params['limit']; o['offset'] = params['offset']; return o; diff --git a/frontend/views/renewal/today_bak.php b/frontend/views/renewal/today_bak.php deleted file mode 100644 index 8d23886..0000000 --- a/frontend/views/renewal/today_bak.php +++ /dev/null @@ -1,88 +0,0 @@ - - - - - -
ID 电话号码状态 操作
- - - - - - - - - -
- 车主: - 电话: - 车牌: -
- 排序: - -
- - - - - - - - - - - - - - - $item) { - $start_index = ($page-1) * 20 + $index; - $car_info = $item->car; - ?> - - - - - - - - - - - - - - - - - -
序号预约日期预约时间车牌号车主初登日期商业起保日期交强起保日期预约备注业务员操作
pdate?>ptime?>car_no?>car_man?>register_date?>insurer1_date?>insurer2_date?>remark,40)?>user?$item->user->getShowName():''?> - [详情] -
diff --git a/frontend/views/renewal/today_new.php b/frontend/views/renewal/today_new.php deleted file mode 100644 index 3a94179..0000000 --- a/frontend/views/renewal/today_new.php +++ /dev/null @@ -1,143 +0,0 @@ - - - - - 拼图前端框架跨屏响应式模板 - - - - - - - - - -
-
-
-
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- size="20" /> -
-
-
- -
-
-
-
-
- -
-
- -
-
-
-
- -
-
-
-
-
-
-
- - - - - - - - - - - - - - - $item) { - $start_index = ($page-1) * 20 + $index; - $car_info = $item->car; - ?> - - - - - - - - - - - - - - -
序号预约日期预约时间车牌号车主初登日期商业起保日期交强起保日期预约备注业务员操作
pdate?>ptime?>car_no?>car_man,9)?>register_date?>insurer1_date?>insurer2_date?>remark,40)?>user?$item->user->getShowName():''?> - -
-

- -

-
-
- - - - - \ No newline at end of file diff --git a/frontend/views/role/edit.php b/frontend/views/role/edit.php index bfdba3a..ff8448e 100644 --- a/frontend/views/role/edit.php +++ b/frontend/views/role/edit.php @@ -9,18 +9,18 @@ use \common\libs\MyLib;
-
+
- -
+ +
-
+
diff --git a/frontend/views/role/index.php b/frontend/views/role/index.php index bdb9b98..5748d1b 100644 --- a/frontend/views/role/index.php +++ b/frontend/views/role/index.php @@ -20,7 +20,7 @@ use \common\libs\MyLib;
-
+
diff --git a/frontend/views/statistics/clean-work-zj.php b/frontend/views/statistics/clean-work-zj.php deleted file mode 100644 index 3a4eb42..0000000 --- a/frontend/views/statistics/clean-work-zj.php +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - -
- - - - - -
- 分配日期:从截止 - - - - - - - - - 当天   - &date_end=">7天   - &date_end=">1个月   - &date_end=">3个月   -
- - - - - - - - - - -
分配数据合计
diff --git a/frontend/views/statistics/clean-work.php b/frontend/views/statistics/clean-work.php deleted file mode 100644 index 2e3a28c..0000000 --- a/frontend/views/statistics/clean-work.php +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - -
- 提单日期:从截止 - - 工号: - 级别: - - - - - 当天   - &date_end=">7天   - &date_end=">1个月   - &date_end=">3个月   -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
工号真实姓名正确数据总数错误数据总数预约数据总数
汇总
diff --git a/frontend/views/statistics/fix-info.php b/frontend/views/statistics/fix-info.php deleted file mode 100644 index 030ab25..0000000 --- a/frontend/views/statistics/fix-info.php +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - -
- - 提单日期: - 正本日期: -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
车主车牌号发动机号车架号进厂时间出厂时间维修金额状态详情
car_man?>car_no?>engine_no?>car_frame_no?>total1_clear?>total1_real?>total1_dis?>total1_percent?>status->name?> - [详情] -
汇总
diff --git a/frontend/views/statistics/non-work-info.php b/frontend/views/statistics/non-work-info.php deleted file mode 100644 index 7c2eaf2..0000000 --- a/frontend/views/statistics/non-work-info.php +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - -
- - 提单日期: - 正本日期: -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
车主车牌号总保额保险费用投保份数状态详情
car_man?>car_no?>ord_scheme_id?$item->nona->baoer:''?>ord_scheme_id?$item->nona->baofei:''?>non_num?>status->name?> - [详情] -
汇总
diff --git a/frontend/views/statistics/non-work.php b/frontend/views/statistics/non-work.php deleted file mode 100644 index a83e19e..0000000 --- a/frontend/views/statistics/non-work.php +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - -
- 提单日期:从截止 - 正本日期:从截止 - 工号: - 级别: - - - - 当天   - &date_end=">7天   - &date_end=">1个月   - &date_end=">3个月   -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
工号真实姓名提单总数保险费用投保份数详情
0?$row['total'][1]:''?>0?'¥'.number_format($row['total'][2],2):''?>0?$row['total'][3]:''?>[详情]
汇总
diff --git a/frontend/views/statistics/work-info.bak.php b/frontend/views/statistics/work-info.bak.php deleted file mode 100644 index 019139e..0000000 --- a/frontend/views/statistics/work-info.bak.php +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - -
- - 提单日期: - 正本日期: -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
车主车牌号商业总净保费折扣后商业净保费减免金额商业折扣率状态详情
car_man?>car_no?>total1_clear?>total1_real?>total1_dis?>total1_percent?>status->name?> - [详情] -
汇总
diff --git a/frontend/views/statistics/work-info.php b/frontend/views/statistics/work-info.php index 4c157c6..9cc29c9 100644 --- a/frontend/views/statistics/work-info.php +++ b/frontend/views/statistics/work-info.php @@ -3,589 +3,83 @@ use \common\libs\MyLib; ?> beginBlock('header_css'); ?> - endBlock(); ?> -
-
-
-
保单信息
- -
-
-
-
-
- -
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-

-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-

-
- +
+
+
+
+
+
- - - + + + + + + + +
ID险种内容不计免赔车主车牌号商业总净保费折扣后商业净保费减免金额商业折扣率状态操作
-

-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
-
-
-
- -
- - -
-
-
- - -
-
-
- -
-
-
-
-
-
-
-
-
礼品信息
-
-
-
-
-

免费礼品

- - - - - - - - -
ID组名礼品名
-
-
-

自费礼品

- - - - - - - - -
ID组名礼品名
-
-
-
-
-
-
-
财务信息
-
-
-
-
-
-
-
- - -
-
- - -
-
- - -
-
-
-
-
-
-
-
操作记录
-
-
-
-
-
-
- - - - - - - - - - -
ID操作者操作时间操作内容
-
-
-
-
- -
+ beginBlock('footer_js'); ?> - - + -endBlock('footer_js'); ?> \ No newline at end of file +endBlock(); ?> \ No newline at end of file diff --git a/frontend/views/statistics/work.bak.php b/frontend/views/statistics/work.bak.php deleted file mode 100644 index 61e09b1..0000000 --- a/frontend/views/statistics/work.bak.php +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - - - - -
- 提单日期:从截止 - 正本日期:从截止 - 工号: - 级别: - - - - 当天   - &date_end=">7天   - &date_end=">1个月   - &date_end=">3个月   -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
工号真实姓名通时提车总数提单总数商业总净保费交强总净保费商业已收净保费交强已收净保费总签单净保费详情
0?$row['total'][7]:''?>0?$row['total'][1]:''?>0?'¥'.number_format($row['total'][2],2):''?>0?'¥'.number_format($row['total'][3],2):''?>0?'¥'.number_format($row['total'][4],2):''?>0?'¥'.number_format($row['total'][5],2):''?>0?'¥'.number_format($row['total'][6],2):''?>[详情]
汇总
diff --git a/frontend/views/statistics/work.php b/frontend/views/statistics/work.php index 0dd608c..b42fa9c 100644 --- a/frontend/views/statistics/work.php +++ b/frontend/views/statistics/work.php @@ -2,206 +2,149 @@ use \common\libs\MyLib; ?> beginBlock('header_css'); ?> - - + endBlock(); ?> -
-
-
-
工作量统计
-
-
-