You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
166 lines
5.5 KiB
166 lines
5.5 KiB
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title></title>
|
|
<link rel="stylesheet" href="../layui/css/layui.css" />
|
|
<style>
|
|
|
|
.require-star {
|
|
position: absolute;
|
|
width: 3px;
|
|
height: 14px;
|
|
background-color: #ea4335;
|
|
top: 12px;
|
|
right: 8px;
|
|
border-radius: 1.5px;
|
|
}
|
|
|
|
.input-width {
|
|
width: 340px
|
|
}
|
|
|
|
.label-width {
|
|
width: 128px
|
|
}
|
|
|
|
.mainBox {
|
|
width: 100%;
|
|
position: absolute;
|
|
top: 0px;
|
|
left: 0px;
|
|
bottom: 50px;
|
|
overflow: auto;
|
|
}
|
|
|
|
.main-container {
|
|
margin: 15px;
|
|
}
|
|
|
|
.button-container {
|
|
position: absolute;
|
|
right: 15px;
|
|
}
|
|
|
|
.bottom {
|
|
width: 100%;
|
|
position: absolute;
|
|
bottom: 0px;
|
|
left: 0px;
|
|
height: 50px;
|
|
line-height: 50px;
|
|
background-color: #F8F8F8;
|
|
border-top: 1px solid #eee;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<form class="layui-form" action="">
|
|
|
|
<div class="main-container">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label label-width"><span class="require-star"></span>每分钟收费金额(元)</label>
|
|
<div class="layui-form-item layui-inline">
|
|
<input type="text" id="one_minute_money" name="one_minute_money" autocomplete="off"
|
|
lay-verify="required|number" placeholder="请输入每分钟收费金额" class="layui-input input-width">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label label-width"><span class="require-star"></span>免费时长(分钟)</label>
|
|
<div class="layui-form-item layui-inline">
|
|
<input type="text" id="free_duration" name="free_duration" autocomplete="off"
|
|
lay-verify="required|number|int" placeholder="请输入免费时长" class="layui-input input-width">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label label-width"><span class="require-star"></span>占位费上限金额(元)</label>
|
|
<div class="layui-form-item layui-inline">
|
|
<input type="text" id="money_limit" name="money_limit" autocomplete="off"
|
|
lay-verify="required|number" placeholder="请输入占位费上限金额" class="layui-input input-width">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="bottom">
|
|
<div class="button-container">
|
|
<button type="button" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="save">
|
|
<i class="layui-icon layui-icon-ok"></i>
|
|
提 交
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<script src="../layui/layui.js"></script>
|
|
|
|
<script>
|
|
layui.use(function () {
|
|
var form = layui.form;
|
|
var $ = layui.jquery;
|
|
var laytpl = layui.laytpl;
|
|
|
|
|
|
form.verify({
|
|
int: [/^[1-9]\d*$/, '请输入大于0的整数']
|
|
});
|
|
|
|
var id = GetQueryString("id");
|
|
|
|
$.ajax({
|
|
type: 'GET',
|
|
async: false,
|
|
url: ' /ZhuQue/hurryQuit/getStation',
|
|
data: { station_id: id },
|
|
success: function (res) {
|
|
if (res.success) {
|
|
$("#one_minute_money").val(res.one_minute_money);
|
|
$("#free_duration").val(res.free_duration);
|
|
$("#money_limit").val(res.money_limit);
|
|
}
|
|
}
|
|
});
|
|
|
|
|
|
form.on('submit(save)', function (data) {
|
|
data.field.station_id = id;
|
|
$.ajax({
|
|
url: '/ZhuQue/hurryQuit/setStation',
|
|
data: data.field,
|
|
type: 'post',
|
|
success: function (result) {
|
|
if (result.success) {
|
|
layer.msg("设置成功!", {
|
|
icon: 1,
|
|
time: 1300
|
|
}, function () {
|
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
|
window.parent.refreshTable();
|
|
});
|
|
} else {
|
|
layer.msg(result.message, {
|
|
icon: 2,
|
|
time: 2000
|
|
});
|
|
}
|
|
}
|
|
});
|
|
return false;
|
|
});
|
|
|
|
|
|
function GetQueryString(name, istop) {
|
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
|
var r = window.location.search.substr(1).match(reg);
|
|
if (typeof (istop) != "undefined") r = top.location.search.substr(1).match(reg);
|
|
|
|
if (r != null) return unescape(r[2]);
|
|
return null;
|
|
}
|
|
|
|
|
|
});
|
|
</script>
|
|
</body>
|
|
|
|
</html> |