@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="isTransfer"
|
@if(isNotEmpty(reformist)){
|
${1 == reformist.isTransfer ? '' : '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(jsjOne)){
|
value="${jsjOne.pushDistance}"
|
@}else{
|
value=""
|
@}
|
name="jsj1" id="jsj1" class="form-control newWidth" /> 公里,
|
推单时间为 <input type="text" oninput="checkIsInt(this)"
|
@if(isNotEmpty(jsjOne)){
|
value="${jsjOne.pushTime}"
|
@}else{
|
value=""
|
@}
|
name="jsj2" id="jsj2" class="form-control newWidth" /> 秒钟;
|
每次推所有司机的 <input type="text" oninput="checkIsDouble(this)"
|
@if(isNotEmpty(jsjOne)){
|
value="${jsjOne.driverProportion}"
|
@}else{
|
value=""
|
@}
|
name="jsj3" id="jsj3" class="form-control newWidth" /> %
|
<br/>
|
<br/>
|
第二轮推单:推单距离为 <input type="text" oninput="checkIsDouble(this)"
|
@if(isNotEmpty(jsjTwo)){
|
value="${jsjTwo.pushDistance}"
|
@}else{
|
value=""
|
@}
|
name="jsj4" id="jsj4" class="form-control newWidth" /> 公里,
|
推单时间为 <input type="text" oninput="checkIsInt(this)"
|
@if(isNotEmpty(jsjTwo)){
|
value="${jsjTwo.pushTime}"
|
@}else{
|
value=""
|
@}
|
name="jsj5" id="jsj5" class="form-control newWidth" /> 秒钟;
|
每次推所有司机的 <input type="text" oninput="checkIsDouble(this)"
|
@if(isNotEmpty(jsjTwo)){
|
value="${jsjTwo.driverProportion}"
|
@}else{
|
value=""
|
@}
|
name="jsj6" id="jsj6" class="form-control newWidth" /> %
|
<br/>
|
<br/>
|
第三轮推单:推单距离为 <input type="text" oninput="checkIsDouble(this)"
|
@if(isNotEmpty(jsjThree)){
|
value="${jsjThree.pushDistance}"
|
@}else{
|
value=""
|
@}
|
name="jsj7" id="jsj7" class="form-control newWidth" /> 公里,
|
推单时间为 <input type="text" oninput="checkIsInt(this)"
|
@if(isNotEmpty(jsjThree)){
|
value="${jsjThree.pushTime}"
|
@}else{
|
value=""
|
@}
|
name="jsj8" id="jsj8" class="form-control newWidth" /> 秒钟;
|
每次推所有司机的 <input type="text" oninput="checkIsDouble(this)"
|
@if(isNotEmpty(jsjThree)){
|
value="${jsjThree.driverProportion}"
|
@}else{
|
value=""
|
@}
|
name="jsj9" id="jsj9" 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-3">
|
报警电话: <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 class="col-sm-3">
|
<#avatar id="userQrCode" name="用户端客服二维码" avatarImg="${reformist.userQrCode!}"/>
|
</div>
|
<div class="col-sm-3">
|
<#avatar id="driverQrCode" name="司机端客服二维码" avatarImg="${reformist.driverQrCode!}"/>
|
</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());
|
|
|
// 初始化图片上传
|
var userQrCode = new $WebUpload("userQrCode");
|
userQrCode.setUploadBarId("progressBar");
|
userQrCode.init();
|
var driverQrCode = new $WebUpload("driverQrCode");
|
driverQrCode.setUploadBarId("progressBar");
|
driverQrCode.init();
|
|
});
|
|
//人脸识别打开按钮被点击
|
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 isTransfer = $("#isTransfer").is(":checked");
|
// if (isTransfer){
|
// isTransfer = 2;
|
// } else {
|
// isTransfer = 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 jsj1 = $("#jsj1").val().trim();
|
var jsj2 = $("#jsj2").val().trim();
|
var jsj3 = $("#jsj3").val().trim();
|
var jsj4 = $("#jsj4").val().trim();
|
var jsj5 = $("#jsj5").val().trim();
|
var jsj6 = $("#jsj6").val().trim();
|
var jsj7 = $("#jsj7").val().trim();
|
var jsj8 = $("#jsj8").val().trim();
|
var jsj9 = $("#jsj9").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();
|
var userQrCode = $("#userQrCode").val().trim();
|
var driverQrCode = $("#driverQrCode").val().trim();
|
|
if ("" == one || "" == two || "" == three
|
|| "" == zc1 || "" == zc2 || "" == zc3 || "" == zc4 || "" == zc5 || "" == zc6 || "" == zc7 || "" == zc8 || "" == zc9
|
|| "" == jsj1 || "" == jsj2 || "" == jsj3 || "" == jsj4 || "" == jsj5 || "" == jsj6 || "" == jsj7 || "" == jsj8 || "" == jsj9
|
|| "" == 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(jsj1) || !regInt.test(jsj2) || !regDouble.test(jsj3)
|
|| !regDouble.test(jsj4) || !regInt.test(jsj5) || !regDouble.test(jsj6)
|
|| !regDouble.test(jsj7) || !regInt.test(jsj8) || !regDouble.test(jsj9)
|
|
|| !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", 0);
|
ajax.set("isTaxiCar", 0);
|
ajax.set("isTransfer", 0);
|
|
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("jsj1", jsj1);
|
ajax.set("jsj2", jsj2);
|
ajax.set("jsj3", jsj3);
|
ajax.set("jsj4", jsj4);
|
ajax.set("jsj5", jsj5);
|
ajax.set("jsj6", jsj6);
|
ajax.set("jsj7", jsj7);
|
ajax.set("jsj8", jsj8);
|
ajax.set("jsj9", jsj9);
|
|
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.set("userQrCode", userQrCode);
|
ajax.set("driverQrCode", driverQrCode);
|
ajax.start();
|
|
}
|
|
</script>
|
@}
|