@layout("/common/_container.html"){
|
<style>
|
.newWidth, .single-line{
|
max-width:150px !important;display: initial !important;
|
}
|
</style>
|
<div class="ibox float-e-margins">
|
<div class="ibox-content">
|
<div class="form-horizontal">
|
<div class="row">
|
<div class="col-sm-11">
|
<div class="ibox-title">
|
<h3>系统设置:</h3>
|
</div>
|
|
<div class="form-group">
|
<label class="col-sm-2 control-label">改派设置:</label>
|
<div class="col-sm-10">
|
改派费用为 <input type="text" oninput="checkIsDouble(this)"
|
@if(isNotEmpty(reformist)){
|
value="${reformist.money}"
|
@}else{
|
value=""
|
@}
|
name="one" id="one" class="form-control newWidth" /> 元;<br/>
|
</div>
|
</div>
|
|
<div class="form-group">
|
<label class="col-sm-2 control-label">积分设置:</label>
|
<div class="col-sm-10">
|
消费一元积 <input type="text" oninput="checkIsInt(this)"
|
@if(isNotEmpty(integral)){
|
value="${integral.integral}"
|
@}else{
|
value=""
|
@}
|
name="two" id="two" class="form-control newWidth" /> 积分;<br/>
|
</div>
|
</div>
|
|
<div class="form-group" style="height: 70px;">
|
<label class="col-sm-2 control-label">人脸识别:</label>
|
<div class="col-sm-10">
|
<div class="radio radio-danger">
|
<input type="radio" name="three" id="three1" value="2"
|
${isNotEmpty(faceDistinguish) && 2 == faceDistinguish.isOpen ? 'checked=checked' : ''}
|
onclick="threeClick(2)">
|
<label for="three1">
|
关闭
|
</label>
|
</div>
|
<div class="radio radio-danger">
|
<input type="radio" name="three" id="three2" value="1"
|
${isNotEmpty(faceDistinguish) && 1 == faceDistinguish.isOpen ? 'checked=checked' : ''}
|
onclick="threeClick(1)">
|
<label for="three2">
|
打开
|
<div id="openDiv" style="position: relative;top: -26px;margin-left: 50px;display: none;">
|
<span style="margin-left: 20px;">上班中每隔</span>
|
<input type="text" oninput="checkIsInt(this)" class="form-control newWidth"
|
${isNotEmpty(faceDistinguish) && 1 == faceDistinguish.isOpen ? 'value='+faceDistinguish.minuteNum : ''}
|
id="openValue" name="openValue">
|
<span>分钟,进行一次人脸识别;</span>
|
</div>
|
</label>
|
</div>
|
</div>
|
</div>
|
|
<div class="form-group">
|
<label class="col-sm-2 control-label">专车改派:</label>
|
<div class="col-sm-10">
|
<div class="form-group">
|
<div class="col-sm-9">
|
<input type="checkbox" class="js-switch" id="isSpecialCar"
|
@if(isNotEmpty(reformist)){
|
${1 == reformist.isSpecialCar ? '' : 'checked=checked'}
|
@}
|
/>
|
</div>
|
</div>
|
</div>
|
</div>
|
|
<div class="form-group">
|
<label class="col-sm-2 control-label">出租车改派:</label>
|
<div class="col-sm-10">
|
<div class="form-group">
|
<div class="col-sm-9">
|
<input type="checkbox" class="js-switch1" id="isTaxiCar"
|
@if(isNotEmpty(reformist)){
|
${1 == reformist.isTaxiCar ? '' : 'checked=checked'}
|
@}
|
/>
|
</div>
|
</div>
|
</div>
|
</div>
|
|
<div class="ibox-title" >
|
<h3>推单设置:</h3>
|
</div>
|
<div class="form-group">
|
<label class="col-sm-2 control-label">专车推单:</label>
|
<div class="col-sm-10">
|
第一轮推单:推单距离为 <input type="text" oninput="checkIsDouble(this)"
|
@if(isNotEmpty(zcOne)){
|
value="${zcOne.pushDistance}"
|
@}else{
|
value=""
|
@}
|
name="zc1" id="zc1" class="form-control newWidth" /> 公里,
|
推单时间为 <input type="text" oninput="checkIsInt(this)"
|
@if(isNotEmpty(zcOne)){
|
value="${zcOne.pushTime}"
|
@}else{
|
value=""
|
@}
|
name="zc2" id="zc2" class="form-control newWidth" /> 秒钟;
|
每次推所有司机的 <input type="text" oninput="checkIsDouble(this)"
|
@if(isNotEmpty(zcOne)){
|
value="${zcOne.driverProportion}"
|
@}else{
|
value=""
|
@}
|
name="zc3" id="zc3" class="form-control newWidth" /> %
|
<br/>
|
<br/>
|
第二轮推单:推单距离为 <input type="text" oninput="checkIsDouble(this)"
|
@if(isNotEmpty(zcTwo)){
|
value="${zcTwo.pushDistance}"
|
@}else{
|
value=""
|
@}
|
name="zc4" id="zc4" class="form-control newWidth" /> 公里,
|
推单时间为 <input type="text" oninput="checkIsInt(this)"
|
@if(isNotEmpty(zcTwo)){
|
value="${zcTwo.pushTime}"
|
@}else{
|
value=""
|
@}
|
name="zc5" id="zc5" class="form-control newWidth" /> 秒钟;
|
每次推所有司机的 <input type="text" oninput="checkIsDouble(this)"
|
@if(isNotEmpty(zcTwo)){
|
value="${zcTwo.driverProportion}"
|
@}else{
|
value=""
|
@}
|
name="zc6" id="zc6" class="form-control newWidth" /> %
|
<br/>
|
<br/>
|
第三轮推单:推单距离为 <input type="text" oninput="checkIsDouble(this)"
|
@if(isNotEmpty(zcThree)){
|
value="${zcThree.pushDistance}"
|
@}else{
|
value=""
|
@}
|
name="zc7" id="zc7" class="form-control newWidth" /> 公里,
|
推单时间为 <input type="text" oninput="checkIsInt(this)"
|
@if(isNotEmpty(zcThree)){
|
value="${zcThree.pushTime}"
|
@}else{
|
value=""
|
@}
|
name="zc8" id="zc8" class="form-control newWidth" /> 秒钟;
|
每次推所有司机的 <input type="text" oninput="checkIsDouble(this)"
|
@if(isNotEmpty(zcThree)){
|
value="${zcThree.driverProportion}"
|
@}else{
|
value=""
|
@}
|
name="zc9" id="zc9" class="form-control newWidth" /> %
|
<br/>
|
</div>
|
</div>
|
<div class="form-group">
|
<label class="col-sm-2 control-label">出租车推单:</label>
|
<div class="col-sm-10">
|
第一轮推单:推单距离为 <input type="text" oninput="checkIsDouble(this)"
|
@if(isNotEmpty(czcOne)){
|
value="${czcOne.pushDistance}"
|
@}else{
|
value=""
|
@}
|
name="czc1" id="czc1" class="form-control newWidth" /> 公里,
|
推单时间为 <input type="text" oninput="checkIsInt(this)"
|
@if(isNotEmpty(czcOne)){
|
value="${czcOne.pushTime}"
|
@}else{
|
value=""
|
@}
|
name="czc2" id="czc2" class="form-control newWidth" /> 秒钟;
|
每次推所有司机的 <input type="text" oninput="checkIsDouble(this)"
|
@if(isNotEmpty(czcOne)){
|
value="${czcOne.driverProportion}"
|
@}else{
|
value=""
|
@}
|
name="czc3" id="czc3" class="form-control newWidth" /> %
|
<br/>
|
<br/>
|
第二轮推单:推单距离为 <input type="text" oninput="checkIsDouble(this)"
|
@if(isNotEmpty(czcTwo)){
|
value="${czcTwo.pushDistance}"
|
@}else{
|
value=""
|
@}
|
name="czc4" id="czc4" class="form-control newWidth" /> 公里,
|
推单时间为 <input type="text" oninput="checkIsInt(this)"
|
@if(isNotEmpty(czcTwo)){
|
value="${czcTwo.pushTime}"
|
@}else{
|
value=""
|
@}
|
name="czc5" id="czc5" class="form-control newWidth" /> 秒钟;
|
每次推所有司机的 <input type="text" oninput="checkIsDouble(this)"
|
@if(isNotEmpty(czcTwo)){
|
value="${czcTwo.driverProportion}"
|
@}else{
|
value=""
|
@}
|
name="czc6" id="czc6" class="form-control newWidth" /> %
|
<br/>
|
<br/>
|
第三轮推单:推单距离为 <input type="text" oninput="checkIsDouble(this)"
|
@if(isNotEmpty(czcThree)){
|
value="${czcThree.pushDistance}"
|
@}else{
|
value=""
|
@}
|
name="czc7" id="czc7" class="form-control newWidth" /> 公里,
|
推单时间为 <input type="text" oninput="checkIsInt(this)"
|
@if(isNotEmpty(czcThree)){
|
value="${czcThree.pushTime}"
|
@}else{
|
value=""
|
@}
|
name="czc8" id="czc8" class="form-control newWidth" /> 秒钟;
|
每次推所有司机的 <input type="text" oninput="checkIsDouble(this)"
|
@if(isNotEmpty(czcThree)){
|
value="${czcThree.driverProportion}"
|
@}else{
|
value=""
|
@}
|
name="czc9" id="czc9" class="form-control newWidth" /> %
|
<br/>
|
</div>
|
</div>
|
<div class="form-group">
|
<label class="col-sm-2 control-label">取消设置:</label>
|
<div class="col-sm-10">
|
专车订单取消规则:专车订单在司机接单 <input type="text" oninput="checkIsInt(this)"
|
@if(isNotEmpty(ptCancel1)){
|
value="${ptCancel1.minuteNum}"
|
@}else{
|
value=""
|
@}
|
name="ptCancel1" id="ptCancel1" class="form-control newWidth" /> 分钟后,
|
取消订单收取 <input type="text" oninput="checkIsDouble(this)"
|
@if(isNotEmpty(ptCancel1)){
|
value="${ptCancel1.money}"
|
@}else{
|
value=""
|
@}
|
name="ptCancel2" id="ptCancel2" class="form-control newWidth" /> 元取消费用;
|
<br/>
|
<br/>
|
出租车订单取消规则:出租车订单在司机接单 <input type="text" oninput="checkIsInt(this)"
|
@if(isNotEmpty(ptCancel2)){
|
value="${ptCancel2.minuteNum}"
|
@}else{
|
value=""
|
@}
|
name="ptCancel3" id="ptCancel3" class="form-control newWidth" /> 分钟后,
|
取消订单收取 <input type="text" oninput="checkIsDouble(this)"
|
@if(isNotEmpty(ptCancel2)){
|
value="${ptCancel2.money}"
|
@}else{
|
value=""
|
@}
|
name="ptCancel4" id="ptCancel4" class="form-control newWidth" /> 元取消费用;
|
<br/>
|
</div>
|
</div>
|
<div class="form-group">
|
<label class="col-sm-2 control-label">预约单取消设置:</label>
|
<div class="col-sm-10">
|
专车订单取消规则:专车订单在司机接单 <input type="text" oninput="checkIsInt(this)"
|
@if(isNotEmpty(yyCancel1)){
|
value="${yyCancel1.minuteNum}"
|
@}else{
|
value=""
|
@}
|
name="yyCancel1" id="yyCancel1" class="form-control newWidth" /> 分钟后,
|
取消订单收取 <input type="text" oninput="checkIsDouble(this)"
|
@if(isNotEmpty(yyCancel1)){
|
value="${yyCancel1.money}"
|
@}else{
|
value=""
|
@}
|
name="yyCancel2" id="yyCancel2" class="form-control newWidth" /> 元取消费用;
|
<br/>
|
<br/>
|
出租车订单取消规则:出租车订单在司机接单 <input type="text" oninput="checkIsInt(this)"
|
@if(isNotEmpty(yyCancel2)){
|
value="${yyCancel2.minuteNum}"
|
@}else{
|
value=""
|
@}
|
name="yyCancel3" id="yyCancel3" class="form-control newWidth" /> 分钟后,
|
取消订单收取 <input type="text" oninput="checkIsDouble(this)"
|
@if(isNotEmpty(yyCancel2)){
|
value="${yyCancel2.money}"
|
@}else{
|
value=""
|
@}
|
name="yyCancel4" id="yyCancel4" class="form-control newWidth" /> 元取消费用;
|
<br/>
|
</div>
|
</div>
|
<div class="form-group">
|
<label class="col-sm-2 control-label">电话设置:</label>
|
<div class="col-sm-10">
|
报警电话: <input type="text"
|
@if(isNotEmpty(phone1)){
|
value="${phone1.phone}"
|
@}else{
|
value=""
|
@}
|
name="phone1" id="phone1" class="form-control newWidth" />
|
<br/>
|
<br/>
|
客服电话: <input type="text"
|
@if(isNotEmpty(phone2)){
|
value="${phone2.phone}"
|
@}else{
|
value=""
|
@}
|
name="phone2" id="phone2" class="form-control newWidth" />
|
<br/>
|
<br/>
|
包车调度电话: <input type="text"
|
@if(isNotEmpty(phone3)){
|
value="${phone3.phone}"
|
@}else{
|
value=""
|
@}
|
name="phone3" id="phone3" class="form-control newWidth" />
|
<br/>
|
</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="setUp()"/>
|
</div>
|
</div>
|
</div>
|
|
</div>
|
</div>
|
<script type="text/javascript">
|
$(function() {
|
var elem = document.querySelector(".js-switch");
|
var init = new Switchery(elem);
|
var elem1 = document.querySelector(".js-switch1");
|
var init1 = new Switchery(elem1);
|
|
var three = $("input[name='three']:checked").val();
|
if (three == "" || three == null || three == undefined){
|
$("#three1").attr("checked","checked");
|
}
|
threeClick($("input[name='three']:checked").val());
|
});
|
|
//人脸识别打开按钮被点击
|
function threeClick(obj) {
|
if (obj == 1){
|
$("#openDiv").show();
|
} else {
|
$("#openDiv").hide();
|
}
|
}
|
|
var regDouble = /^[0-9]\d*(\.\d*[0-9])?$/;
|
function checkIsDouble(obj){
|
var num = $(obj).val();
|
if(!regDouble.test(num)){
|
layer.msg("小数/正整数格式");
|
}
|
}
|
|
//验证是否输入正整数
|
var regInt = /^[0-9]\d*$/;
|
function checkIsInt(obj){
|
var num = $(obj).val();
|
if(!regInt.test(num)){
|
layer.msg("正整数格式");
|
}
|
}
|
|
/**
|
* 提交操作
|
*/
|
function setUp() {
|
var one = $("#one").val().trim();
|
var two = $("#two").val().trim();
|
var three = $("input[name='three']:checked").val();
|
var openValue = $("#openValue").val();
|
|
var isSpecialCar = $("#isSpecialCar").is(":checked");
|
if (isSpecialCar){
|
isSpecialCar = 2;
|
} else {
|
isSpecialCar = 1;
|
}
|
var isTaxiCar = $("#isTaxiCar").is(":checked");
|
if (isTaxiCar){
|
isTaxiCar = 2;
|
} else {
|
isTaxiCar = 1;
|
}
|
|
var zc1 = $("#zc1").val().trim();
|
var zc2 = $("#zc2").val().trim();
|
var zc3 = $("#zc3").val().trim();
|
var zc4 = $("#zc4").val().trim();
|
var zc5 = $("#zc5").val().trim();
|
var zc6 = $("#zc6").val().trim();
|
var zc7 = $("#zc7").val().trim();
|
var zc8 = $("#zc8").val().trim();
|
var zc9 = $("#zc9").val().trim();
|
|
var czc1 = $("#czc1").val().trim();
|
var czc2 = $("#czc2").val().trim();
|
var czc3 = $("#czc3").val().trim();
|
var czc4 = $("#czc4").val().trim();
|
var czc5 = $("#czc5").val().trim();
|
var czc6 = $("#czc6").val().trim();
|
var czc7 = $("#czc7").val().trim();
|
var czc8 = $("#czc8").val().trim();
|
var czc9 = $("#czc9").val().trim();
|
|
var ptCancel1 = $("#ptCancel1").val().trim();
|
var ptCancel2 = $("#ptCancel2").val().trim();
|
var ptCancel3 = $("#ptCancel3").val().trim();
|
var ptCancel4 = $("#ptCancel4").val().trim();
|
// var ptCancel5 = $("#ptCancel5").val().trim();
|
// var ptCancel6 = $("#ptCancel6").val().trim();
|
|
var yyCancel1 = $("#yyCancel1").val().trim();
|
var yyCancel2 = $("#yyCancel2").val().trim();
|
var yyCancel3 = $("#yyCancel3").val().trim();
|
var yyCancel4 = $("#yyCancel4").val().trim();
|
|
var phone1 = $("#phone1").val().trim();
|
var phone2 = $("#phone2").val().trim();
|
var phone3 = $("#phone3").val().trim();
|
|
if ("" == one || "" == two || "" == three
|
|| "" == zc1 || "" == zc2 || "" == zc3 || "" == zc4 || "" == zc5 || "" == zc6 || "" == zc7 || "" == zc8 || "" == zc9
|
|| "" == czc1 || "" == czc2 || "" == czc3 || "" == czc4 || "" == czc5 || "" == czc6 || "" == czc7 || "" == czc8 || "" == czc9
|
|| "" == ptCancel1 || "" == ptCancel2 || "" == ptCancel3 || "" == ptCancel4 /*|| "" == ptCancel5 || "" == ptCancel6*/
|
|| "" == yyCancel1 || "" == yyCancel2 || "" == yyCancel3 || "" == yyCancel4
|
|| "" == phone1 || "" == phone2 ) {
|
Feng.info("输入框不能为空!");
|
return;
|
}else if (1 == three){
|
if ("" == openValue || null == openValue || undefined == openValue){
|
Feng.info("人脸识别分钟数不能为空!");
|
return;
|
}else if (!regInt.test(openValue)) {
|
Feng.info("人脸识别分钟数格式不正确!");
|
return;
|
}
|
} else if (!regDouble.test(one) || !regInt.test(two)
|
|
|| !regDouble.test(zc1) || !regInt.test(zc2) || !regDouble.test(zc3)
|
|| !regDouble.test(zc4) || !regInt.test(zc5) || !regDouble.test(zc6)
|
|| !regDouble.test(zc7) || !regInt.test(zc8) || !regDouble.test(zc9)
|
|
|| !regDouble.test(czc1) || !regInt.test(czc2) || !regDouble.test(czc3)
|
|| !regDouble.test(czc4) || !regInt.test(czc5) || !regDouble.test(czc6)
|
|| !regDouble.test(czc7) || !regInt.test(czc8) || !regDouble.test(czc9)
|
|
|| !regInt.test(ptCancel1) || !regDouble.test(ptCancel2) || !regInt.test(ptCancel3) || !regDouble.test(ptCancel4) /*|| !regInt.test(ptCancel5) || !regDouble.test(ptCancel6)*/
|
|| !regInt.test(yyCancel1) || !regDouble.test(yyCancel2) || !regInt.test(yyCancel3) || !regDouble.test(yyCancel4)) {
|
Feng.info("格式不正确!");
|
return ;
|
}
|
|
//提交信息
|
var ajax = new $ax(Feng.ctxPath + "/tSysReformist/setUp", function(data){
|
Feng.success("操作成功!");
|
location.reload();
|
},function(data){
|
Feng.error("操作失败!" + data.responseJSON.message + "!");
|
});
|
ajax.set("one", one);
|
ajax.set("two", two);
|
ajax.set("three", three);
|
if (1 == three){
|
ajax.set("openValue",openValue);
|
} else if (2 == three){
|
ajax.set("openValue",0);
|
}
|
|
ajax.set("isSpecialCar", isSpecialCar);
|
ajax.set("isTaxiCar", isTaxiCar);
|
|
ajax.set("zc1", zc1);
|
ajax.set("zc2", zc2);
|
ajax.set("zc3", zc3);
|
ajax.set("zc4", zc4);
|
ajax.set("zc5", zc5);
|
ajax.set("zc6", zc6);
|
ajax.set("zc7", zc7);
|
ajax.set("zc8", zc8);
|
ajax.set("zc9", zc9);
|
|
ajax.set("czc1", czc1);
|
ajax.set("czc2", czc2);
|
ajax.set("czc3", czc3);
|
ajax.set("czc4", czc4);
|
ajax.set("czc5", czc5);
|
ajax.set("czc6", czc6);
|
ajax.set("czc7", czc7);
|
ajax.set("czc8", czc8);
|
ajax.set("czc9", czc9);
|
|
ajax.set("ptCancel1", ptCancel1);
|
ajax.set("ptCancel2", ptCancel2);
|
ajax.set("ptCancel3", ptCancel3);
|
ajax.set("ptCancel4", ptCancel4);
|
ajax.set("ptCancel5", 0);
|
ajax.set("ptCancel6", 0);
|
|
ajax.set("yyCancel1", yyCancel1);
|
ajax.set("yyCancel2", yyCancel2);
|
ajax.set("yyCancel3", yyCancel3);
|
ajax.set("yyCancel4", yyCancel4);
|
|
ajax.set("phone1", phone1);
|
ajax.set("phone2", phone2);
|
ajax.set("phone3", phone3);
|
ajax.start();
|
|
}
|
|
</script>
|
@}
|