main
kgdxpr 1 year ago
parent 67a50746d4
commit b9c5644f1a

@ -109,9 +109,16 @@
}
});
window.shoudongMatch = function (obj) {
console.log(obj);
refresh();
window.shoudongMatch = function (obj) {
layer.open({
type: 2,
title: '手工匹配',
offset: 'r',
anim: 'slideLeft',
area: ['800px', '100%'],
shade: 0.1,
content: './ty_org_list.html?org_id=' + obj.data.org_id
});
}
window.zhinengMatch = function (obj) {

@ -80,7 +80,7 @@
{ title: '操作', unresize: true, align: 'center', width: "10%", toolbar: '#table-bar' }
]],
skin: 'line',
toolbar: false,
toolbar: true,
defaultToolbar: [{
title: '刷新',
layEvent: 'refresh',

@ -35,6 +35,15 @@
<div class="layui-card">
<div class="layui-card-body">
<div class="layui-table-tool" style="min-height: 38px !important">
<div class="layui-input-group" style="margin-left: -16px;">
<input type="text" id="org_name" placeholder="请输入单位名称" class="layui-input" lay-affix="clear"
lay-filter="clear">
<div class="layui-input-split layui-input-suffix" style="cursor: pointer;" lay-on="confirm">
<i class="layui-icon layui-icon-search"></i>
</div>
</div>
</div>
<table id="data-table"></table>
</div>
@ -42,7 +51,7 @@
<script type="text/html" id="table-bar">
<span class="woo-tool-span woo-tool-text-span" lay-event="unMatch"><a
<span class="woo-tool-span woo-tool-text-span" lay-event="select"><a
class="woo-theme-color">选 择</a></span>
</script>
@ -56,6 +65,9 @@
var $ = layui.jquery;
var common = layui.common;
var laytpl = layui.laytpl;
var util = layui.util;
var orgId = GetQueryString("org_id");
tableRender();
@ -63,58 +75,62 @@
table.render({
elem: '#data-table',
url: '/QingLong/collect/getTyBureauList',
height: 'full-60',
where: {
keyword: $("#org_name").val()
},
height: 'full-120',
page: {
limit: 15
, layout: ['count', 'prev', 'page', 'next', 'skip']
, prev: "上一页"
, next: "下一页"
},
cols: [[
cols: [[
{ title: '序号', unresize: true, align: 'center', width: "5%", type: 'numbers' },
{ title: '单位名称', unresize: true, align: 'center', field: 'org_name' },
{ 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',
}]
toolbar: false
});
}
table.on('tool(data-table)', function (obj) {
if (obj.event === 'unMatch') {
window.unMatch(obj);
form.on('input-affix(clear)', function (data) {
tableRender();
});
util.on({
confirm: function () {
tableRender();
}
});
table.on('toolbar(data-table)', function (obj) {
if (obj.event === 'refresh') {
window.refresh();
table.on('tool(data-table)', function (obj) {
if (obj.event === 'select') {
window.select(obj);
}
});
window.unMatch = function (obj) {
var orgId = obj.data.org_id;
layer.confirm('确定要取消匹配吗?', {
window.select = function (obj) {
var tyOrgId = obj.data.org_id;
layer.confirm('确定要匹配吗?', {
icon: 3,
title: '提示'
}, function (index) {
$.ajax({
url: "/QingLong/collect/disMatchBureau",
url: "/QingLong/collect/matchBureau",
async: false,
type: 'POST',
data: { "org_id": orgId },
data: { "org_id": orgId, "third_party_id": tyOrgId },
success: function (res) {
if (res.success) {
layer.msg("取消匹配成功!", {
layer.msg("匹配成功!", {
icon: 1,
time: 1300
}, function () {
refresh();
parent.layer.close(parent.layer.getFrameIndex(window.name));
parent.refresh();
});
} else {
layer.msg(res.message, {

Loading…
Cancel
Save