parent
38778c258b
commit
5e1a8718ec
@ -0,0 +1,115 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="../../../component/pear/css/pear.css" />
|
||||
<style>
|
||||
.require-star {
|
||||
position: absolute;
|
||||
width: 3px;
|
||||
height: 14px;
|
||||
background-color: #ea4335;
|
||||
top: 12px;
|
||||
right: 8px;
|
||||
border-radius: 1.5px;
|
||||
}
|
||||
|
||||
.input-width {
|
||||
max-width: 455px
|
||||
}
|
||||
|
||||
.layui-form-select {
|
||||
width: 455px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<form class="layui-form" action="">
|
||||
<div class="mainBox">
|
||||
<div class="main-container" style="margin-left: 0 !important;">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label" style="width: auto !important;"></span>调转说明:</label>
|
||||
<div class="layui-input-block" style="margin-left: 100px !important;">
|
||||
<textarea name="memo" id="memo" placeholder="请输入调转说明"
|
||||
class="layui-textarea input-width"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottom">
|
||||
<div class="button-container">
|
||||
<button type="submit" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit="" lay-filter="save">
|
||||
<i class="layui-icon layui-icon-ok"></i>
|
||||
提交
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script src="../../../component/layui/layui.js"></script>
|
||||
<script src="../../../component/pear/pear.js"></script>
|
||||
|
||||
<script>
|
||||
layui.use(['form', 'jquery', 'laytpl', 'laydate'], function () {
|
||||
var form = layui.form;
|
||||
var $ = layui.jquery;
|
||||
var laytpl = layui.laytpl
|
||||
var laydate = layui.laydate;
|
||||
|
||||
var personId = GetQueryString('person_id');
|
||||
var bureauId = GetQueryString('bureau_id');
|
||||
|
||||
form.on('submit(save)', function (data) {
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '/QingLong/teacherYd/teacherTransferApply',
|
||||
data: {
|
||||
"target_bureau_id": bureauId,
|
||||
"person_id": personId,
|
||||
"apply_message": $("#memo").val()
|
||||
},
|
||||
|
||||
success: function (result) {
|
||||
if (result.success) {
|
||||
layer.msg("调转成功!", {
|
||||
icon: 1,
|
||||
time: 1300
|
||||
}, function () {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
// parent.layui.table.reload("data-table");
|
||||
parent.closeLayer();
|
||||
});
|
||||
} else {
|
||||
layer.msg(result.message, {
|
||||
icon: 2,
|
||||
time: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
|
||||
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>
|
@ -0,0 +1,230 @@
|
||||
<!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($);
|
||||
if (loginPersonInfo.identity_id == "1") {
|
||||
//$("#selectTreeDiv").show();
|
||||
var globalInfo = getGlobalInfo($, Base64.encode("install_area"));
|
||||
areaId = globalInfo.data[0].global_value;
|
||||
levelId = "2";
|
||||
selectTreeRender(areaId);
|
||||
} else if (loginPersonInfo.identity_id == 2) {
|
||||
areaId = loginPersonInfo.city_id;
|
||||
levelId = "2";
|
||||
selectTreeRender(areaId);
|
||||
} else {
|
||||
areaId = loginPersonInfo.area_id;
|
||||
levelId = "3";
|
||||
selectTreeRender(areaId);
|
||||
}
|
||||
|
||||
//下拉树
|
||||
function selectTreeRender(areaId) {
|
||||
dtree.render({
|
||||
elem: "#selectTree",
|
||||
selectInitVal: areaId,
|
||||
initLevel: "2",
|
||||
method: 'get',
|
||||
url: "/QingLong/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: '/QingLong/organization/getBureauListByAreaId',
|
||||
where: {
|
||||
type_id: $("#orgTypeId").val(),
|
||||
area_id: areaId,
|
||||
keyword: $("#searchTxt").val()
|
||||
},
|
||||
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: "20%" }
|
||||
]],
|
||||
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: ['300px', '400px'],
|
||||
content: './tree.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>
|
Loading…
Reference in new issue