parent
6536fbcb26
commit
51434ddb89
@ -0,0 +1,154 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="../../../component/pear/css/pear.css" />
|
||||
<link rel="stylesheet" href="../../../component/ztree/zTreeStyle.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='ztree' id='mytree' style="margin-top: 10px;margin-left:10px"></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 src="../../../admin/js/jquery-3.6.0.min.js"></script>
|
||||
<script src="../../../component/ztree/jquery.ztree.core-3.5.min.js"></script>
|
||||
<script src="../../../component/ztree/jquery.ztree.exedit-3.5.min.js"></script>
|
||||
<script>
|
||||
layui.use(['form', 'jquery', 'laytpl', 'laydate'], function () {
|
||||
var form = layui.form;
|
||||
var $ = layui.jquery;
|
||||
|
||||
var id = GetQueryString("id");
|
||||
var bureauId = GetQueryString("bureau_id");
|
||||
|
||||
var orgId = "";
|
||||
|
||||
var ztreeSetting = {
|
||||
view: {
|
||||
selectedMulti: false
|
||||
},
|
||||
data: {
|
||||
simpleData: {
|
||||
enable: true,
|
||||
idKey: "org_id",
|
||||
pIdKey: "parent_id",
|
||||
rootPId: 0
|
||||
},
|
||||
key: {
|
||||
name: "org_name"
|
||||
}
|
||||
},
|
||||
callback: {
|
||||
onClick: zTreeOnClick,
|
||||
}
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
async: false,
|
||||
url: '/QingLong/organization/getOrgTreeByBureauId?bureau_id=' + bureauId,
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
var zTreeObj = $.fn.zTree.init($("#mytree"), ztreeSetting, data.data);
|
||||
zTreeObj.expandAll(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function zTreeOnClick(event, treeId, treeNode) {
|
||||
orgId = treeNode.org_id;
|
||||
}
|
||||
|
||||
form.on('submit(save)', function (data) {
|
||||
if (orgId == "") {
|
||||
layer.msg("请选择接收部门!", {
|
||||
icon: 2,
|
||||
time: 1300
|
||||
});
|
||||
return false;
|
||||
}
|
||||
layer.confirm('确定要接收调转吗?', {
|
||||
icon: 3,
|
||||
title: '提示'
|
||||
}, function (index) {
|
||||
$.ajax({
|
||||
url: "/QingLong/teacherYd/checkTeacherTransfer",
|
||||
data: {
|
||||
"id": id,
|
||||
"status_id,": 2,
|
||||
"org_id": orgId
|
||||
},
|
||||
type: 'post',
|
||||
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");
|
||||
});
|
||||
} 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>
|
Loading…
Reference in new issue