修复无法发送短信BUG

dev
曾超新 5 years ago
parent 5b71471ce5
commit bd70c22332
  1. 42
      frontend/controllers/CarController.php
  2. 6
      frontend/views/car/order-add.php

@ -4572,30 +4572,30 @@ class CarController extends BaseController
$result['msg'] = '生成失败'; $result['msg'] = '生成失败';
$order_id = $request->post('order_id'); $order_id = $request->post('order_id');
$company2_id = $request->post('company2_id'); $company_id = $request->post('company_id');
// $company2_name = InsurerCompany2T::findOne($company2_id)->name; // $company2_name = InsurerCompany2T::findOne($company2_id)->name;
$company2_name =''; $company_name ='';
if($company2_id == 1){ if($company_id == 1){
$company2_name = '人保车险'; $company_name = '人保车险';
}elseif ($company2_id ==8){ }elseif ($company_id ==8){
$company2_name = '平安车险'; $company_name = '平安车险';
}elseif ($company2_id == 4){ }elseif ($company_id == 4){
$company2_name = '太平洋车险'; $company_name = '太平洋车险';
}elseif ($company2_id ==7){ }elseif ($company_id ==7){
$company2_name = '人寿车险'; $company_name = '人寿车险';
} }
$company2 =''; $company ='';
if($company2_id == 1){ if($company_id == 1){
$company2 = '人保'; $company = '人保';
}elseif ($company2_id == 8){ }elseif ($company_id == 8){
$company2 = '平安'; $company = '平安';
}elseif ($company2_id == 4){ }elseif ($company_id == 4){
$company2 = '太平洋'; $company = '太平洋';
}elseif ($company2_id == 7){ }elseif ($company_id == 7){
$company2 = '太平洋'; $company = '太平洋';
} }
// var_dump($order_id); // var_dump($order_id);
@ -4617,7 +4617,7 @@ class CarController extends BaseController
$insurer_type_items = InsurerTypeT::find()->all(); $insurer_type_items = InsurerTypeT::find()->all();
$msg = '【'.$company2_name.'】尊敬的'.$car_info->car_no.'客户您好:'.$company2.$this->my->name.'为您报价:'; $msg = '【'.$company_name.'】尊敬的'.$car_info->car_no.'客户您好:'.$company.$this->my->name.'为您报价:';
$msg .= '交强、'; $msg .= '交强、';
if($total3 > 0) { if($total3 > 0) {
$msg .= '车船税、'; $msg .= '车船税、';

@ -539,7 +539,7 @@ use common\models\PriceT;
//生成短信内容 //生成短信内容
$('.sms-make-btn').click(function(){ $('.sms-make-btn').click(function(){
var params = $('#orderFrm').serialize(); var params = $('#orderFrm').serialize();
var baoxiangs=$('#company2_id').val(); var baoxiangs=$('#company_id').val();
var smstel=$('#sms-tel').val(); var smstel=$('#sms-tel').val();
if(isNull(smstel)){ if(isNull(smstel)){
@ -563,7 +563,7 @@ use common\models\PriceT;
$('.sms-send-btn').click(function(){ $('.sms-send-btn').click(function(){
var tel = $('#sms-tel').val(); var tel = $('#sms-tel').val();
var msg = $('#sms-msg').val(); var msg = $('#sms-msg').val();
var baoxiangs=$('#company2_id').val(); var baoxiangs=$('#company_id').val();
var smstel=$('#sms-tel').val(); var smstel=$('#sms-tel').val();
var smsmsg=$('#sms-msg').val(); var smsmsg=$('#sms-msg').val();
@ -581,7 +581,7 @@ use common\models\PriceT;
} }
// return; // return;
$.post('/car/sms-send',{tel:tel,msg:msg,company2_id:baoxiangs},function(obj){ $.post('/car/sms-send',{tel:tel,msg:msg,company_id:baoxiangs},function(obj){
parent.layer.msg(obj.msg); parent.layer.msg(obj.msg);
},'json'); },'json');
}); });

Loading…
Cancel
Save