@layout("/common/_container.html"){
|
<style>
|
.newWidth, .single-line{
|
max-width:150px !important;display: initial !important;
|
}
|
.lab{
|
display: block;
|
width: 150px;
|
height: 45px;
|
text-align: center;
|
line-height: 45px;
|
cursor: pointer;
|
font-size: 16px;
|
background-color: #F8F8F8;
|
margin: 0;
|
}
|
.lab:hover{
|
background-color: #F3F4F5;
|
}
|
.checked{
|
background-color: #FFF !important;
|
border-left: 10px solid #077CCB;
|
}
|
.shareSeatPriceSetting>div>label{
|
text-align: center;
|
height: 35px;
|
line-height: 35px;
|
width: 200px;
|
border: 1px solid #E4E4E4;
|
}
|
.shareSeatPriceSetting .people, .shareSeatPriceSetting .carpool{
|
text-align: center;
|
border: 1px solid #377CCD;
|
color: #377CCD;
|
}
|
</style>
|
<div class="ibox float-e-margins">
|
<div class="ibox-content">
|
<div class="form-horizontal" id="specialPriceInfoForm">
|
|
<div class="row">
|
<div class="col-sm-11">
|
|
|
<div class="form-group waitFee">
|
<label class="col-sm-2 control-label">计费方式:</label>
|
|
<div class="col-sm-10">
|
起步价为
|
<input type="text" onblur="checkIsYuan(this)" value='${json.num1!}' name="num1" id="num1" class="form-control newWidth" placeholder="最多3位数"/>
|
元,起步包含<input type="text" onblur="checkIsGongLi(this)" name="num2" id="num2" value='${json.num2!}' class="form-control newWidth" placeholder="最多3位数"/>
|
公里,不足基价公里按基价公里收费</br></br>
|
超过起步里程后每公里加收 <input type="text" onblur="checkIsYuan(this)" name="num3" id="num3" value='${json.num3!}' class="form-control newWidth" placeholder="最多3位数"/>元
|
<!-- <span id="min">,<input type="text" onblur="checkIsMinute(this)" name="num5" id="num5" class="form-control newWidth" placeholder="最多3位数"/>-->
|
<!-- 分钟</span>-->
|
</div>
|
</div>
|
<div class="form-group waitFee">
|
<label class="col-sm-2 control-label">空驶费设置:</label>
|
<div class="col-sm-10">
|
单程载客行驶
|
<input type="text" onblur="checkIsGongLi(this)" name="num4" id="num4" value='${json.num4!}' class="form-control newWidth" placeholder="最多3位数" oninput="change(this)"/>
|
(不含<input type="text" id="buhan" value="${json.num4!}" disabled style="border: none;width:45px;text-align:center">公里)超出部分收取空驶费,每公里加收<input type="text" onblur="checkIsYuan(this)" name="num5" id="num5" value='${json.num5!}' class="form-control newWidth" placeholder="最多3位数"/>元
|
</div>
|
</div>
|
<div class="form-group waitFee">
|
<label class="col-sm-2 control-label">夜间行驶费用设置:</label>
|
<div class="col-sm-10">
|
<input type="text" name="num6" id="num6" class="form-control newWidth" value='${json.num6!}' placeholder="选择时间"/> 点为夜间行驶时间,
|
起步价变为<input type="text" onblur="checkIsYuan(this)" value='${json.num7!}' name="num7" id="num7" class="form-control newWidth" placeholder="最多3位数"/>元,
|
起步包含<input type="text" onblur="checkIsGongLi(this)" name="num8" value='${json.num8!}' id="num8" class="form-control newWidth" placeholder="最多3位数"/>
|
公里,不足基价公里按基价公里收费
|
,超过起步里程后每公里加收<input type="text" onblur="checkIsYuan(this)" name="num9" value='${json.num9!}' id="num9" class="form-control newWidth" placeholder="最多3位数"/>元
|
|
</div>
|
</div>
|
<!-- <div class="form-group waitFee">-->
|
<!-- <div class="col-sm-10">-->
|
<!-- 司机到达预约地点-->
|
<!--<!– <input type="text" onblur="checkIsMinute(this)" name="num8" id="num8" class="form-control newWidth" placeholder="最多3位数"/>–>-->
|
<!-- 分钟后开始收取等待费,为-->
|
<!--<!– <input type="text" onblur="checkIsMinute(this)" name="num9" id="num9" class="form-control newWidth" placeholder="最多3位数"/>–>-->
|
<!-- 元/分,不足一分钟按一分钟计算-->
|
<!-- </div>-->
|
<!-- </div>-->
|
|
</div>
|
</div>
|
|
<div class="row btn-group-m-t">
|
<div class="col-sm-10 col-sm-offset-5">
|
<#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="addTaxiSubmit()"/>
|
<!-- <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TSystemPriceInfoDlg.close()"/>-->
|
</div>
|
</div>
|
</div>
|
|
</div>
|
</div>
|
<script src="${ctxPath}/static/modular/system/tSystemPrice/tSystemPrice_info.js"></script>
|
<script type="text/javascript">
|
|
function change(obj) {
|
|
$("#buhan").val($("#num4").val())
|
}
|
|
function addTaxiSubmit() {
|
|
var b = false;
|
var waitFee = '{';
|
// waitFee = waitFee + '"num1":"'+$("#num1").val()+'",';
|
$('.waitFee input[type="text"]').each(function(){
|
var value = $(this).val();
|
if('' == value){
|
b = true;
|
Feng.info("请填写完整配置");
|
return
|
}
|
waitFee = waitFee + '"'+$(this)[0].name+'":"'+value+'",';
|
});
|
waitFee = waitFee.substring(0,waitFee.length-1);
|
waitFee += '}';
|
console.log(waitFee);
|
|
|
|
//提交信息
|
var ajax = new $ax(Feng.ctxPath + "/tSystemPrice/taxiSet", function(data){
|
if (500 == data.code){
|
Feng.error(data.message);
|
return;
|
}else{
|
Feng.success("添加成功!");
|
window.parent.TSystemPrice.table.refresh();
|
TSystemPriceInfoDlg.close();
|
}
|
},function(data){
|
Feng.error("添加失败!" + data.responseJSON.message + "!");
|
});
|
ajax.setData({
|
content: waitFee
|
})
|
ajax.start();
|
}
|
|
laydate.render({
|
elem: '.col-sm-10 #num6'
|
,type: 'time'
|
,range: '-'
|
,format: 'HH:mm'
|
});
|
function checkbox1() {
|
var checkbox1 = $('#num1').val();
|
if (checkbox1 == 1){
|
$("#times").hide()
|
$("#thanMin").show()
|
$("#min").show()
|
} else {
|
$("#times").show()
|
$("#thanMin").hide()
|
$("#min").hide()
|
}
|
}
|
var regDouble = /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/;
|
var regInt = /^[0-9]{0,3}$/;
|
function checkIsYuan(obj){
|
var num = $(obj).val();
|
if(!regDouble.test(num)){
|
layer.msg("【元】输入框不能超过3位数,保留两位小数");
|
$(obj).val('');
|
}
|
}
|
function checkIsGongLi(obj, clazz){
|
var num = $(obj).val();
|
if(!regDouble.test(num)){
|
layer.msg("【公里】输入框不能超过3位数,保留两位小数");
|
$(obj).val('');
|
}
|
if (obj.id == "num7"){
|
$("." + clazz + " #num9").val(num);
|
}else if (obj.id == "num10"){
|
$("." + clazz + " #num12").val(num);
|
}
|
}
|
function checkIsMinute(obj){
|
var num = $(obj).val();
|
if(!regInt.test(num)){
|
layer.msg("【分钟】输入框不能超过3位数");
|
$(obj).val('');
|
}
|
}
|
|
</script>
|
@}
|