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.
219 lines
7.1 KiB
219 lines
7.1 KiB
<!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;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body class="pear-container layui-form">
|
|
|
|
<div class="layui-card" style="margin-bottom: 10px !important;">
|
|
<div class="layui-card-body">
|
|
<div class="layui-form-item" style="margin: 10px 0 5px 0 !important;">
|
|
<div class="layui-form-item layui-inline" id="selectTreeDiv" style="margin-right: -5px !important;">
|
|
<label class="layui-form-label" style="width: 30px;padding: 9px 7px 9px 1px !important;">地区</label>
|
|
<div class="layui-input-inline" style="width: 135px !important;">
|
|
<ul id="selectTree" class="dtree" data-id="0"></ul>
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item layui-inline" style="margin-right: 8px !important;">
|
|
<label class="layui-form-label" style="width: 60px;padding: 9px 7px 9px 1px !important;">单位类型</label>
|
|
<div class="layui-input-inline" style="width: 100px !important;">
|
|
<select id="orgTypeId" name="orgTypeId" lay-filter="orgTypeId">
|
|
<option value="0">全部</option>
|
|
<option value="1">学校</option>
|
|
<option value="2">单位</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item layui-inline">
|
|
<div class="layui-input-group">
|
|
<input type="text" id="searchTxt" lay-affix="clear" lay-filter="clear" placeholder="请输入单位名称"
|
|
class="layui-input">
|
|
<div class="layui-input-split layui-input-suffix" style="cursor: pointer;">
|
|
<i class="layui-icon layui-icon-search" id="searchBtn"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- <div class="layui-form-item layui-inline" style="margin-right: 8px !important;">
|
|
<div class="layui-input-inline" style="width: 135px !important;">
|
|
<input type="text" id="searchTxt" autocomplete="off" placeholder="请输入单位名称" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item layui-inline">
|
|
<button class="pear-btn pear-btn-md pear-btn-primary" id="searchBtn">
|
|
<i class="layui-icon layui-icon-search"></i>
|
|
查询
|
|
</button>
|
|
</div> -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<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" data-tool-sort="120" lay-event="selectOrg"><a
|
|
class="woo-theme-color">调转单位</a></span>
|
|
</script>
|
|
|
|
<script src="../../../component/layui/layui.js"></script>
|
|
<script src="../../../component/pear/pear.js"></script>
|
|
<script src="../../../component/pear/base64.js"></script>
|
|
|
|
<script>
|
|
layui.use(['table', 'form', 'jquery', 'common', 'dtree', 'laytpl'], function () {
|
|
var table = layui.table;
|
|
var form = layui.form;
|
|
var $ = layui.jquery;
|
|
var common = layui.common;
|
|
var dtree = layui.dtree;
|
|
var laytpl = layui.laytpl;
|
|
|
|
var personId = GetQueryString("person_id");
|
|
|
|
var areaId = "0";
|
|
var levelId = "0";
|
|
var selectAreaId = "0";
|
|
|
|
//获取登录人员信息
|
|
var loginPersonInfo = getPersonLoginInfo($);
|
|
|
|
var globalInfo = getGlobalInfo($, Base64.encode("install_area"));
|
|
var areaId = globalInfo.data[0].global_value;
|
|
var levelId = "2";
|
|
selectTreeRender(areaId);
|
|
|
|
//下拉树
|
|
function selectTreeRender(areaId) {
|
|
dtree.render({
|
|
elem: "#selectTree",
|
|
selectInitVal: areaId,
|
|
initLevel: "2",
|
|
method: 'get',
|
|
url: "/dsBase/dm/getAreaNew?parent_id=" + areaId,
|
|
select: true,
|
|
icon: "-1",
|
|
selectInputName: {
|
|
recordData: "recordData"
|
|
}
|
|
});
|
|
}
|
|
|
|
dtree.on('node("selectTree")', function (obj) {
|
|
// var param = dtree.selectVal("selectTree");
|
|
areaId = obj.param.nodeId;
|
|
tableRender();
|
|
});
|
|
|
|
form.on('select(orgTypeId)', function (data) {
|
|
tableRender();
|
|
});
|
|
|
|
$("#searchBtn").click(function () {
|
|
tableRender();
|
|
});
|
|
|
|
tableRender();
|
|
|
|
function tableRender() {
|
|
table.render({
|
|
elem: '#data-table',
|
|
url: '/dsBase/organization/getBureauListByAreaId',
|
|
where: {
|
|
type_id: $("#orgTypeId").val(),
|
|
area_id: areaId,
|
|
keyword: $("#searchTxt").val(),
|
|
not_include_child: 1
|
|
},
|
|
height: 'full-150',
|
|
page: {
|
|
limit: 15
|
|
, layout: ['count', 'prev', 'page', 'next', 'skip']
|
|
, prev: "上一页"
|
|
, next: "下一页"
|
|
},
|
|
cols: [[
|
|
{ title: '序号', align: 'center', width: "5%", type: 'numbers', },
|
|
{ title: '单位名称', field: 'org_name', align: 'center' },
|
|
{ title: '统一社会信用代码', field: 'org_code', align: 'center', width: "30%" },
|
|
{ title: '操作', toolbar: '#table-bar', align: 'center', width: "15%" }
|
|
]],
|
|
skin: 'line'
|
|
});
|
|
}
|
|
|
|
|
|
table.on('tool(data-table)', function (obj) {
|
|
if (obj.event === 'selectOrg') {
|
|
window.selectOrg(obj);
|
|
}
|
|
});
|
|
|
|
form.on('input-affix(clear)', function (data) {
|
|
tableRender();
|
|
});
|
|
|
|
|
|
window.selectOrg = function (data) {
|
|
layer.open({
|
|
type: 2,
|
|
title: '调转说明',
|
|
shade: 0.1,
|
|
area: ['400px', '240px'],
|
|
content: './turn_memo.html?person_id=' + personId + '&bureau_id=' + data.data['org_id']
|
|
});
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
window.closeLayer = function () {
|
|
setTimeout(function () {
|
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
|
}, 500);
|
|
}
|
|
|
|
//点击任何地方关闭下拉树
|
|
$("body").on("click", function (event) {
|
|
$("div[dtree-id][dtree-select]").removeClass("layui-form-selected");
|
|
$("div[dtree-id][dtree-card]").removeClass("dtree-select-show layui-anim layui-anim-upbit");
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
|
|
</html> |