parent
2987add2d6
commit
8b6e7c1417
@ -0,0 +1,153 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="../../../../component/pear/css/pear.css" />
|
||||
<style>
|
||||
.woo-tool-text-delimiter {
|
||||
width: 1px;
|
||||
height: 12px;
|
||||
background: #EEEEEE;
|
||||
display: inline-block;
|
||||
margin: 0 6px 0 4px;
|
||||
}
|
||||
|
||||
.woo-theme-color {
|
||||
color: #2d8cf0 !important;
|
||||
}
|
||||
|
||||
.woo-tool-span {
|
||||
margin: 0 3px;
|
||||
position: relative;
|
||||
top: -1px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.layui-table-tool-temp {
|
||||
padding-right: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="pear-container layui-form">
|
||||
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<table id="data-table"></table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/html" id="table-bar">
|
||||
<span class="woo-tool-span woo-tool-text-span" lay-event="unMatch"><a
|
||||
class="woo-theme-color">选 择</a></span>
|
||||
</script>
|
||||
|
||||
<script src="../../../../component/layui/layui.js"></script>
|
||||
<script src="../../../../component/pear/pear.js"></script>
|
||||
|
||||
<script>
|
||||
layui.use(['table', 'form', 'jquery', 'common', 'laytpl'], function () {
|
||||
var table = layui.table;
|
||||
var form = layui.form;
|
||||
var $ = layui.jquery;
|
||||
var common = layui.common;
|
||||
var laytpl = layui.laytpl;
|
||||
|
||||
tableRender();
|
||||
|
||||
function tableRender() {
|
||||
table.render({
|
||||
elem: '#data-table',
|
||||
url: '/QingLong/collect/getTyBureauList',
|
||||
height: 'full-60',
|
||||
page: {
|
||||
limit: 15
|
||||
, layout: ['count', 'prev', 'page', 'next', 'skip']
|
||||
, prev: "上一页"
|
||||
, next: "下一页"
|
||||
},
|
||||
cols: [[
|
||||
{ title: '序号', unresize: true, align: 'center', width: "5%", type: 'numbers' },
|
||||
{ title: '单位名称', unresize: true, align: 'center', field: 'org_name' },
|
||||
{ title: '操作', unresize: true, align: 'center', width: "15%", toolbar: '#table-bar' }
|
||||
]],
|
||||
skin: 'line',
|
||||
toolbar: false,
|
||||
defaultToolbar: [{
|
||||
title: '刷新',
|
||||
layEvent: 'refresh',
|
||||
icon: 'layui-icon-refresh',
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
table.on('tool(data-table)', function (obj) {
|
||||
if (obj.event === 'unMatch') {
|
||||
window.unMatch(obj);
|
||||
}
|
||||
});
|
||||
|
||||
table.on('toolbar(data-table)', function (obj) {
|
||||
if (obj.event === 'refresh') {
|
||||
window.refresh();
|
||||
}
|
||||
});
|
||||
|
||||
window.unMatch = function (obj) {
|
||||
var orgId = obj.data.org_id;
|
||||
layer.confirm('确定要取消匹配吗?', {
|
||||
icon: 3,
|
||||
title: '提示'
|
||||
}, function (index) {
|
||||
$.ajax({
|
||||
url: "/QingLong/collect/disMatchBureau",
|
||||
async: false,
|
||||
type: 'POST',
|
||||
data: { "org_id": orgId },
|
||||
success: function (res) {
|
||||
if (res.success) {
|
||||
layer.msg("取消匹配成功!", {
|
||||
icon: 1,
|
||||
time: 1300
|
||||
}, function () {
|
||||
refresh();
|
||||
});
|
||||
} else {
|
||||
layer.msg(res.message, {
|
||||
icon: 2,
|
||||
time: 2000
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
layer.msg("出现异常!", {
|
||||
icon: 2,
|
||||
time: 1000
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
window.refresh = function (param) {
|
||||
table.reload('data-table');
|
||||
}
|
||||
|
||||
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>
|
Loading…
Reference in new issue