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.

195 lines
7.1 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>二维码管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="../../static/css/font.css">
<link rel="stylesheet" href="../../static/css/weadmin.css">
<link rel="stylesheet" href="../../lib/ztree/zTreeStyle.css">
<!-- 让IE8/9支持媒体查询从而兼容栅格 -->
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
select {
width: 180px;
height: 38px;
line-height: 38px;
border: 1px solid #ccc;
border-radius: 3px;
font-size: 15px;
padding-left: 6px;
color: #666;
}
.inline {
display: inline-block;
vertical-align: top;
}
.disabled {
pointer-events: none;
border: 1px solid #e6e6e6;
background: #FBFBFB;
color: #C9C9C9;
cursor: not-allowed;
opacity: 1;
}
#searchTxt {
width: 164px;
border: 1px solid #dedede;
border-radius: 3px;
height: 37px;
padding-left: 13px;
vertical-align: top;
}
#search {
border: none;
margin-left: 12px;
}
#iconDel {
position: absolute;
right: 92px;
top: 10px;
display: none;
}
.aaa {
background-color: #FBFBFB;
border: 1px solid #e6e6e6;
color: #C9C9C9;
cursor: not-allowed;
opacity: 1;
}
.layui-table-cell {
height: auto;
}
</style>
</head>
<body>
<div class="weadmin-nav">
<span class="layui-breadcrumb" id="super">
<a href="">首页</a>
<a href="">防控安全管理<span id="tiptit">
</span></a>
<a><cite>二维码管理</cite></a>
</span>
<a class="layui-btn layui-btn-sm" style="line-height:1.6em;margin-top:3px;float:right"
href="javascript:location.reload();" title="刷新">
<i class="layui-icon layui-icon-refresh-3" style="line-height:30px"></i></a>
</div>
<div class="weadmin-body">
<table border=0 align=left width="100%">
<tr>
<td align=left valign=top style="padding-left:10px">
<div class="layui-form-item inline" style="float:right">
<span id="importAcc">
<div class="layui-btn" onclick="addQrcode();" type="button"><i class="layui-icon"></i>增加</div>
</span>
</div>
<div class="layui-form-item">
<table class="layui-table" lay-filter="idTest" id="idTest"></table>
<script type="text/html" id="barDemo">
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="delete">删除</a>
</script>
</div>
</td>
</tr>
</table>
</div>
<script src="../../lib/layui/layui.js"></script>
<script src="../../lib/template.js"></script>
<script src="../../lib/base64.js"></script>
<script>
layui.extend({
admin: '{/}../../static/js/admin'
});
layui.use(['form', 'jquery', 'admin', 'table','element'], function () {
var form = layui.form,
$ = layui.jquery,
admin = layui.admin,
table = layui.table,
element = layui.element;
//获取url传参的办法
window.GetQueryString = function (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;
};
window.getQecodeTable = function () {
table.render({
elem: '#idTest'
, url: '/baseService/mobile/placeListQrcodePage'
, cols: [[
{field: 'qrcode_id', title: '序号', align: 'center', type: 'numbers', width: 80}
, {field: 'place_name', title: '场地名称', align: 'center'}
, {field: 'qrcode_name', title: '二维码', align: 'center',
templet: function (d) {
var str = '<div><img src="../mobile/FieldQrcode/' + d.qrcode_name + '"></div>';
return str;
}
}
, {fixed: 'right', title: '操作', toolbar: '#barDemo', align: 'center', width:200}
]]
, page: true
, height: 'full'
, done: function () {
}
});
table.on('tool(idTest)', function (obj) {
var data = obj.data;
if (obj.event === 'delete') {
var place_name=data.place_name;
layer.confirm('您确定要删除二维码:'+place_name+'吗?', {
btn: ['确定', '取消']
}, function (index, layero) {
var place_id=data.place_id;
$.ajax({
type: "POST",
dataType: "json",
async: false,
data: {
"place_id": place_id
},
url: "/baseService/mobile/placeListQrcodeDelete",
success: function (data) {
layer.msg("删除成功", {icon: 1, time: 1000, shade: [0.5, '#000', true]}, function () {
var index = layer.getFrameIndex(window.name);
layer.close(index);
layer.closeAll('dialog'); //加入这个信息点击确定 会关闭这个消息框
layui.table.reload('idTest', {
where: {}
, page: {
curr: 1
}
});
});
}
});
}
);
}
});
}
getQecodeTable();
})
</script>
</body>
</html>