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.

215 lines
7.5 KiB

9 months ago
<!DOCTYPE html>
8 months ago
<html>
9 months ago
<head>
8 months ago
<meta charset="utf-8">
9 months ago
<title></title>
<link rel="stylesheet" href="../layui/css/layui.css" />
<style>
8 months ago
.woo-tool-text-delimiter {
width: 1px;
height: 12px;
background: #EEEEEE;
display: inline-block;
margin: 0 6px 0 4px;
9 months ago
}
8 months ago
.woo-theme-color {
color: #1e9fff !important;
9 months ago
}
8 months ago
.woo-tool-span {
margin: 0 3px;
position: relative;
top: -1px;
cursor: pointer;
9 months ago
}
8 months ago
.layui-card-body .layui-form {
margin-top: 0 !important;
9 months ago
}
8 months ago
.layui-form-select {
width: 300px;
9 months ago
}
8 months ago
.layui-form-item .layui-input-inline {
float: left;
width: 300px;
margin-right: 10px;
9 months ago
}
</style>
</head>
8 months ago
<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">
9 months ago
</div>
</div>
8 months ago
<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>
9 months ago
</div>
</div>
8 months ago
<div class="layui-form-item layui-inline">
8 months ago
<button class="layui-btn" lay-submit lay-filter="user-query">
<i class="layui-icon layui-icon-search"></i>
查询
8 months ago
</button>
</div>
8 months ago
</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>
9 months ago
</div>
8 months ago
9 months ago
<script src="../layui/layui.js"></script>
8 months ago
<script src="../../../lib/base64.js"></script>
9 months ago
<script>
layui.use(function () {
8 months ago
var table = layui.table;
9 months ago
var form = layui.form;
var $ = layui.jquery;
8 months ago
tableRender();
9 months ago
8 months ago
function tableRender() {
9 months ago
8 months ago
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' },
6 months ago
{ title: '场站名称', field: 'station_name', align: 'left' },
{ title: '状态', align: 'center', templet: '#status', width: "10%" },
5 months ago
{ title: '每分钟收费金额(元)', field: 'one_minute_money', align: 'center', width: "15%" },
8 months ago
{ title: '免费时长(分钟)', field: 'free_duration', align: 'center', width: "15%" },
6 months ago
{ title: '占位费上限金额(元)', field: 'money_limit', align: 'center', width: "15%" },
8 months ago
{ title: '操作', toolbar: '#table-bar', align: 'center', width: "10%" }
]],
skin: 'line',
defaultToolbar: []
});
9 months ago
8 months ago
}
9 months ago
8 months ago
window.refreshTable = function () {
tableRender();
}
9 months ago
8 months ago
form.on('submit(user-query)', function () {
9 months ago
8 months ago
tableRender();
9 months ago
8 months ago
// 阻止表单的默认提交行为
return false;
9 months ago
});
8 months ago
table.on('tool(data-table)', function (obj) {
if (obj.event === 'set') {
layer.open({
type: 2,
title: '设置',
7 months ago
area: ['560px', '300px'],
8 months ago
shade: 0.1,
content: './set.html?id=' + obj.data.id
9 months ago
});
8 months ago
} 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
});
}
}
});
9 months ago
});
}
8 months ago
});
9 months ago
});
</script>
</body>
</html>