|
|
<!DOCTYPE html>
|
|
|
<html>
|
|
|
|
|
|
<head>
|
|
|
<meta charset="utf-8">
|
|
|
<title></title>
|
|
|
<link rel="stylesheet" href="../layui/css/layui.css" />
|
|
|
<style>
|
|
|
.woo-tool-text-delimiter {
|
|
|
width: 1px;
|
|
|
height: 12px;
|
|
|
background: #EEEEEE;
|
|
|
display: inline-block;
|
|
|
margin: 0 6px 0 4px;
|
|
|
}
|
|
|
|
|
|
.woo-theme-color {
|
|
|
color: #1e9fff !important;
|
|
|
}
|
|
|
|
|
|
.woo-tool-span {
|
|
|
margin: 0 3px;
|
|
|
position: relative;
|
|
|
top: -1px;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
|
|
|
.layui-card-body .layui-form {
|
|
|
margin-top: 0 !important;
|
|
|
}
|
|
|
|
|
|
.layui-form-select {
|
|
|
width: 300px;
|
|
|
}
|
|
|
|
|
|
.layui-form-item .layui-input-inline {
|
|
|
float: left;
|
|
|
width: 300px;
|
|
|
margin-right: 10px;
|
|
|
|
|
|
|
|
|
}
|
|
|
</style>
|
|
|
</head>
|
|
|
|
|
|
<body class="layui-form">
|
|
|
|
|
|
<div class="layui-card-body">
|
|
|
<div class="layui-form-item" style="margin: 10px 0 5px 0 !important;">
|
|
|
<div class="layui-form-item layui-inline">
|
|
|
<label class="layui-form-label" style="width: auto;">场站名称:</label>
|
|
|
<div class="layui-input-inline" id="orgTypeView">
|
|
|
<input type="text" id="station_name" lay-affix="clear" lay-filter="clear" placeholder="请输入场站名称"
|
|
|
class="layui-input">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-form-item layui-inline">
|
|
|
<label class="layui-form-label" style="width: auto;">状态:</label>
|
|
|
<div class="layui-input-inline" id="station">
|
|
|
<select id="statusId" lay-filter="statusFilter">
|
|
|
<option value="-1">全部</option>
|
|
|
<option value="0">未配置</option>
|
|
|
<option value="1">已配置</option>
|
|
|
</select>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-form-item layui-inline">
|
|
|
<button class="layui-btn" lay-submit lay-filter="user-query">
|
|
|
<i class="layui-icon layui-icon-search"></i>
|
|
|
查询
|
|
|
</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="layui-card-body">
|
|
|
<table id="data-table"></table>
|
|
|
<script type="text/html" id="status">
|
|
|
{{# if(d.flag === 1){ }}
|
|
|
<span style="color: #16b777;font-weight: bold;">已设置</span>
|
|
|
{{# } else { }}
|
|
|
<span style="color: #ff5722;">未设置</span>
|
|
|
{{# } }}
|
|
|
</script>
|
|
|
|
|
|
<script type="text/html" id="table-bar">
|
|
|
<span class="woo-tool-span woo-tool-text-span" lay-event="set"><a
|
|
|
class="woo-theme-color">设置</a></span>
|
|
|
<i class="woo-tool-text-delimiter"></i>
|
|
|
{{# if(d.flag === 1){ }}
|
|
|
<span class="woo-tool-span woo-tool-text-span" lay-event="cancal"><a
|
|
|
class="woo-theme-color">取消</a></span>
|
|
|
{{# } else { }}
|
|
|
<span class="woo-tool-span woo-tool-text-span">
|
|
|
<a style="color: #d2d2d2;cursor: default;" >取消</a></span>
|
|
|
{{# } }}
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
<script src="../layui/layui.js"></script>
|
|
|
<script src="../../../lib/base64.js"></script>
|
|
|
|
|
|
<script>
|
|
|
layui.use(function () {
|
|
|
var table = layui.table;
|
|
|
var form = layui.form;
|
|
|
var $ = layui.jquery;
|
|
|
|
|
|
tableRender();
|
|
|
|
|
|
function tableRender() {
|
|
|
|
|
|
table.render({
|
|
|
elem: '#data-table',
|
|
|
url: '/ZhuQue/hurryQuit/pageStationList',
|
|
|
where: {
|
|
|
flag: $("#statusId").val(),
|
|
|
keyword: $("#station_name").val(),
|
|
|
},
|
|
|
request: {
|
|
|
pageName: 'pageNum', // 页码的参数名称,默认:page
|
|
|
limitName: 'pageSize' // 每页数据条数的参数名,默认:limit
|
|
|
},
|
|
|
height: 'full-100',
|
|
|
page: {
|
|
|
limit: 20
|
|
|
, layout: ['count', 'prev', 'page', 'next', 'skip']
|
|
|
, prev: "上一页"
|
|
|
, next: "下一页"
|
|
|
},
|
|
|
cols: [[
|
|
|
{ title: '序号', align: 'center', width: "5%", type: 'numbers' },
|
|
|
{ title: '场站名称', field: 'station_name', align: 'left' },
|
|
|
{ title: '状态', align: 'center', templet: '#status', width: "10%" },
|
|
|
{ title: '每分钟收费金额(元)', field: 'one_minute_money', align: 'center', width: "15%" },
|
|
|
{ title: '免费时长(分钟)', field: 'free_duration', align: 'center', width: "15%" },
|
|
|
{ title: '占位费上限金额(元)', field: 'money_limit', align: 'center', width: "15%" },
|
|
|
{ title: '操作', toolbar: '#table-bar', align: 'center', width: "10%" }
|
|
|
]],
|
|
|
skin: 'line',
|
|
|
defaultToolbar: []
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
window.refreshTable = function () {
|
|
|
tableRender();
|
|
|
}
|
|
|
|
|
|
|
|
|
form.on('submit(user-query)', function () {
|
|
|
|
|
|
tableRender();
|
|
|
|
|
|
// 阻止表单的默认提交行为
|
|
|
return false;
|
|
|
});
|
|
|
|
|
|
table.on('tool(data-table)', function (obj) {
|
|
|
if (obj.event === 'set') {
|
|
|
layer.open({
|
|
|
type: 2,
|
|
|
title: '设置',
|
|
|
area: ['560px', '300px'],
|
|
|
shade: 0.1,
|
|
|
content: './set.html?id=' + obj.data.id
|
|
|
});
|
|
|
} else {
|
|
|
|
|
|
layer.confirm('确定要取消吗?', {
|
|
|
icon: 3,
|
|
|
title: '提示'
|
|
|
}, function (index) {
|
|
|
layer.close(index);
|
|
|
$.ajax({
|
|
|
url: '/ZhuQue/hurryQuit/deleteStation',
|
|
|
data: {
|
|
|
"station_id": obj.data.id
|
|
|
},
|
|
|
type: 'post',
|
|
|
success: function (result) {
|
|
|
if (result.success) {
|
|
|
layer.msg("取消成功!", {
|
|
|
icon: 1,
|
|
|
time: 1300
|
|
|
}, function () {
|
|
|
tableRender();
|
|
|
});
|
|
|
} else {
|
|
|
layer.msg(result.message, {
|
|
|
icon: 2,
|
|
|
time: 2000
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
</script>
|
|
|
</body>
|
|
|
|
|
|
</html> |