修改车损值

dev
曾超新 5 years ago
parent f850c7909e
commit 66a421a6ac
  1. 14
      frontend/controllers/CarController.php
  2. 9
      frontend/views/car/order-add.php

@ -612,7 +612,7 @@ class CarController extends BaseController
'HuaHen' => $types[7],
'SiJi' => $types[4],
'ChengKe' => $types[5],
'CheSun' => $types[1],
'CheSun' => floatval($types[1]),
'DaoQiang' => $types[3]=='是'?1:0,
'SanZhe' => $types[2],
'ZiRan' => $types[9]=='是'?1:0,
@ -636,13 +636,19 @@ class CarController extends BaseController
if($params['HolderIdType'] == '身份证') $params['HolderIdType'] = 1;
else $params['HolderIdType'] = 9;
if(floatval($types[1]) > 0 && $types[10] == '是' && $types[11] == '是') {
$min_chesun = floatval($request->input('min_chesun'));
$max_chesun = floatval($request->input('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(floatval($types[1]) == 0 && $types[10] == '是' && $types[11] == '是') {
if($params['CheSun'] == 0 && $types[10] == '是' && $types[11] == '是') {
$params['ForceTax'] = 2;
}
if(floatval($types[1]) > 0 && $types[10] == '否' && $types[11] == '否') {
if($params['CheSun'] > 0 && $types[10] == '否' && $types[11] == '否') {
$params['ForceTax'] = 0;
}
switch($types[7]) {

@ -17,6 +17,8 @@ use common\models\PriceT;
<input type="hidden" name="fanxian_id" id="fanxian_id" value="<?=$order_info->fanxian_id?>">
<input type="hidden" name="auto_mold_code" id="auto_mold_code" value="">
<input type="hidden" name="vehicle_year" id="vehicle_year" value="">
<input type="hidden" name="min_chesun" id="min_chesun" value="">
<input type="hidden" name="max_chesun" id="max_chesun" value="">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>保单信息</h5>
@ -477,11 +479,8 @@ use common\models\PriceT;
}
if(obj.data.VehicleItems[0].DepreciationPrice) {
$('#types_1').val(obj.data.VehicleItems[0].DepreciationPrice);
$('#types_1').ionRangeSlider({
min: obj.data.VehicleItems[0].DownPrice,
max: obj.data.VehicleItems[0].UpPrice,
from: obj.data.VehicleItems[0].DepreciationPrice,
});
$('#min_chesun').val(obj.data.VehicleItems[0].DownPrice);
$('#max_chesun').val(obj.data.VehicleItems[0].UpPrice);
}
if(obj.data.VehicleItems[0].VehicleSeat) {
$('#seats').val(obj.data.VehicleItems[0].VehicleSeat);

Loading…
Cancel
Save