机构修改

main
tamguo 7 years ago
parent 656ff71f93
commit 4c00b00bb9

@ -4,6 +4,7 @@ import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
@ -15,6 +16,7 @@ import com.baomidou.mybatisplus.annotations.TableName;
public class SysOfficeEntity implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
private String officeCode;
private String address;
private String corpCode;

@ -3,10 +3,11 @@ package com.tamguo.modules.sys.service;
import java.util.List;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.service.IService;
import com.tamguo.modules.sys.model.SysOfficeEntity;
import com.tamguo.modules.sys.model.condition.SysOfficeCondition;
public interface ISysOfficeService {
public interface ISysOfficeService extends IService<SysOfficeEntity>{
List<SysOfficeEntity> listData(SysOfficeCondition condition);
@ -14,4 +15,6 @@ public interface ISysOfficeService {
void save(SysOfficeEntity office);
void update(SysOfficeEntity office);
}

@ -11,6 +11,7 @@ import org.springframework.util.StringUtils;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.Condition;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.tamguo.modules.sys.dao.SysOfficeMapper;
import com.tamguo.modules.sys.model.SysOfficeEntity;
import com.tamguo.modules.sys.model.condition.SysOfficeCondition;
@ -18,7 +19,7 @@ import com.tamguo.modules.sys.service.ISysOfficeService;
import com.tamguo.modules.sys.utils.ShiroUtils;
@Service
public class SysOfficeServiceImpl implements ISysOfficeService {
public class SysOfficeServiceImpl extends ServiceImpl<SysOfficeMapper, SysOfficeEntity> implements ISysOfficeService {
@Autowired
private SysOfficeMapper sysOfficeMapper;
@ -61,18 +62,61 @@ public class SysOfficeServiceImpl implements ISysOfficeService {
@Transactional(readOnly=false)
@Override
public void save(SysOfficeEntity office) {
// 父节点
SysOfficeEntity parent = sysOfficeMapper.selectById(office.getParentCode());
office.setCreateBy(ShiroUtils.getUserCode());
office.setCreateDate(new Date());
office.setUpdateBy(ShiroUtils.getUserCode());
office.setUpdateDate(new Date());
office.setOfficeCode(office.getViewCode());
office.setParentCode("0");
office.setParentCodes("0,");
if(StringUtils.isEmpty(office.getParentCode())) {
office.setParentCode("0");
office.setParentCodes("0,");
office.setTreeLeaf(false);
office.setTreeLevel(BigDecimal.valueOf(0));
}else {
office.setParentCodes(parent.getParentCodes() + parent.getOfficeCode() + ",");
office.setTreeLeaf(true);
office.setTreeLevel(parent.getTreeLevel().add(BigDecimal.valueOf(1)));
}
office.setTreeSorts(office.getTreeSort() + ",");
office.setTreeLeaf(false);
office.setTreeLevel(BigDecimal.valueOf(0));
office.setTreeNames(office.getOfficeName() + ",");
sysOfficeMapper.insert(office);
// 更新父节点
parent.setTreeLeaf(false);
sysOfficeMapper.updateById(parent);
}
@Override
public void update(SysOfficeEntity office) {
SysOfficeEntity oldOffice = sysOfficeMapper.selectById(office.getOfficeCode());
SysOfficeEntity parentOffice = sysOfficeMapper.selectById(office.getParentCode());
oldOffice.setAddress(office.getAddress());
oldOffice.setCorpCode(office.getCorpCode());
oldOffice.setCorpName(office.getCorpName());
oldOffice.setEmail(office.getEmail());
oldOffice.setFullName(office.getFullName());
oldOffice.setLeader(office.getLeader());
oldOffice.setOfficeCode(office.getOfficeCode());
oldOffice.setOfficeName(office.getOfficeName());
oldOffice.setOfficeType(office.getOfficeType());
oldOffice.setParentCode(office.getParentCode());
oldOffice.setRemarks(office.getRemarks());
oldOffice.setPhone(office.getPhone());
if(StringUtils.isEmpty(office.getParentCode())) {
oldOffice.setParentCode("0");
oldOffice.setParentCodes("0,");
oldOffice.setTreeLeaf(false);
oldOffice.setTreeLevel(BigDecimal.valueOf(0));
}else {
oldOffice.setParentCodes(parentOffice.getParentCodes() + parentOffice.getOfficeCode() + ",");
oldOffice.setTreeLeaf(true);
oldOffice.setTreeLevel(parentOffice.getTreeLevel().add(BigDecimal.valueOf(1)));
}
sysOfficeMapper.updateById(oldOffice);
}
}

@ -5,7 +5,9 @@ import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSONArray;
import com.tamguo.modules.sys.model.SysOfficeEntity;
@ -23,10 +25,30 @@ import com.tamguo.modules.sys.utils.Result;
@Controller
@RequestMapping(path="sys/office")
public class SysOfficeController {
private final String OFFICE_ADD_PAGE = "modules/sys/office/add";
private final String OFFICE_UPDATE_PAGE = "modules/sys/office/update";
@Autowired
private ISysOfficeService iSysOfficeService;
@RequestMapping(path="add")
public ModelAndView add(String parentCode , ModelAndView model) {
model.setViewName(OFFICE_ADD_PAGE);
model.addObject("parentOffice", iSysOfficeService.selectById(parentCode));
return model;
}
@RequestMapping(path="update")
public ModelAndView update(String officeCode , ModelAndView model) {
model.setViewName(OFFICE_UPDATE_PAGE);
SysOfficeEntity office = iSysOfficeService.selectById(officeCode);
SysOfficeEntity parentOffice = iSysOfficeService.selectById(office.getParentCode());
model.addObject("office", office);
model.addObject("parentOffice" , parentOffice);
return model;
}
@RequestMapping(path="listData")
@ResponseBody
public List<SysOfficeEntity> listData(SysOfficeCondition condition) {
@ -49,6 +71,16 @@ public class SysOfficeController {
return ExceptionSupport.resolverResult("新增机构", this.getClass(), e);
}
}
@RequestMapping(path="update",method=RequestMethod.POST)
@ResponseBody
public Result update(SysOfficeEntity office) {
try {
iSysOfficeService.update(office);
return Result.result(0, null, "修改机构【"+office.getOfficeName()+"】成功!");
} catch (Exception e) {
return ExceptionSupport.resolverResult("修改机构", this.getClass(), e);
}
}
}

@ -34,14 +34,14 @@ content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
<div class="form-group">
<label class="control-label col-sm-4">上级机构:</label>
<div class="col-sm-8">
<div class="input-group treeselect" id="parentDiv" data-url="sys/office/treeData?excludeCode='">
<input id="parentCode" type="hidden" name="parent.id" value="" class="isReset"/>
<input id="parentName" type="text" name="parent.officeName" value=""
class="form-control " readonly="readonly"
/><span class="input-group-btn"><a id="parentButton" href="javascript:"
class="btn btn-default "><i class="fa fa-search"></i></a>
</span>
</div>
<div class="input-group treeselect" id="parentDiv" data-url="sys/office/treeData?excludeCode='">
<input id="parentCode" type="hidden" name="parentCode" th:value="${parentOffice == null} ? '' : ${parentOffice.officeCode}" class="isReset"/>
<input id="parentName" type="text" name="parentName" th:value="${parentOffice == null} ? '' : ${parentOffice.officeName}"
class="form-control " readonly="readonly"/>
<span class="input-group-btn">
<a id="parentButton" href="javascript:" class="btn btn-default "><i class="fa fa-search"></i></a>
</span>
</div>
<script>
$("#parentButton,#parentName").click(function(){
if ($("#parentButton").hasClass("disabled")){
@ -132,7 +132,7 @@ $("#parentButton,#parentName").click(function(){
<div class="col-sm-8">
<input type="hidden" id="isNewRecord" name="isNewRecord" value="true"/>
<input type="hidden" id="officeCode" name="officeCode" value=""/>
<input type="text" id="viewCode" name="viewCode" value="SD1" maxlength="64" class="form-control required abc"/>
<input type="text" id="viewCode" name="viewCode" value="" maxlength="64" class="form-control required abc"/>
</div>
</div>
</div>
@ -152,7 +152,7 @@ $("#parentButton,#parentName").click(function(){
<label class="control-label col-sm-4" title="">
<span class="required ">*</span> 排序号:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<input type="text" id="treeSort" name="treeSort" value="70" maxlength="10" class="form-control required digits"/>
<input type="text" id="treeSort" name="treeSort" value="" maxlength="10" class="form-control required digits"/>
</div>
</div>
</div>
@ -264,7 +264,7 @@ $("#inputForm").validate({
submitHandler: function(form){
js.ajaxSubmitForm($(form), function(data){
js.showMessage(data.message);
if(data.result == Global.TRUE){
if(data.code == 0){
js.closeCurrentTabPage(function(contentWindow){
contentWindow.$('#dataGrid').dataGrid('refreshTreeChildren',
$('#parentCode').val(), '');

@ -98,7 +98,7 @@ $('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
{header:'机构名称', name:'officeName', index:'a.office_name', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){
return '( '+row.viewCode+' ) '+'<a href="/js/a/sys/office/form?officeCode='+row.officeCode+'" class="btnList" data-title="编辑机构">'+(val||row.id)+'</a>';
return '( '+row.viewCode+' ) '+'<a href="sys/office/update?officeCode='+row.officeCode+'" class="btnList" data-title="编辑机构">'+(val||row.id)+'</a>';
}},
{header:'机构全称', name:'fullName', index:'a.full_name', width:200, align:"left"},
{header:'排序号', name:'treeSort', index:'a.tree_sort', width:80, align:"center"},
@ -112,15 +112,15 @@ $('#dataGrid').dataGrid({
}},
{header:'操作', name:'actions', width:150, sortable:false, title:false, formatter: function(val, obj, row, act){
var actions = [];
actions.push('<a href="/js/a/sys/office/form?officeCode='+row.officeCode+'" class="btnList" title="编辑机构"><i class="fa fa-pencil"></i></a>&nbsp;');
actions.push('<a href="sys/office/update?officeCode='+row.officeCode+'" class="btnList" title="编辑机构"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="/js/a/sys/office/disable?officeCode='+row.officeCode+'" class="btnList" title="停用机构" data-confirm="确认要停用该机构吗?"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
actions.push('<a href="sys/office/disable?officeCode='+row.officeCode+'" class="btnList" title="停用机构" data-confirm="确认要停用该机构吗?"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
}
if (row.status == Global.STATUS_DISABLE){
actions.push('<a href="/js/a/sys/office/enable?officeCode='+row.officeCode+'" class="btnList" title="启用机构" data-confirm="确认要启用该机构吗?"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
actions.push('<a href="sys/office/enable?officeCode='+row.officeCode+'" class="btnList" title="启用机构" data-confirm="确认要启用该机构吗?"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
}
actions.push('<a href="/js/a/sys/office/delete?officeCode='+row.officeCode+'" class="btnList" title="删除机构" data-confirm="确认要删除该机构及所有子机构吗?" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a>&nbsp;');
actions.push('<a href="/js/a/sys/office/form?parentCode='+row.id+'" class="btnList" title="新增下级机构"><i class="fa fa-plus-square"></i></a>&nbsp;');
actions.push('<a href="sys/office/delete?officeCode='+row.officeCode+'" class="btnList" title="删除机构" data-confirm="确认要删除该机构及所有子机构吗?" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a>&nbsp;');
actions.push('<a href="sys/office/add?parentCode='+row.id+'" class="btnList" title="新增下级机构"><i class="fa fa-plus-square"></i></a>&nbsp;');
return actions.join('');
}}
],

@ -0,0 +1,289 @@
<!DOCTYPE html><html><head><meta charset="utf-8"><meta content="webkit" name="renderer"/><meta http-equiv="X-UA-Compatible"
content="IE=edge"><meta name="keywords" content="PoweredByJeeSiteV4.0"/><meta http-equiv="Cache-Control"
content="no-cache, no-store, must-revalidate"/><meta name="description" content="PoweredByJeeSiteV4.0"/><meta
content="no-cache" http-equiv="Pragma"/><meta http-equiv="Expires" content="0"/><meta
content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
<title>机构管理 - JeeSite Demo</title>
<script th:src="${setting.domain + 'global.min.js'}"></script>
<script th:src="${setting.domain + 'jquery/jquery-1.12.4.min.js'}"></script>
<script th:src="${setting.domain + 'jquery/jquery-migrate-1.4.1.min.js'}"></script>
<!--[if lt IE 9]><script src="/js/static/common/h5fix.min.js"></script><![endif]-->
<link rel="stylesheet" th:href="${setting.domain + 'fonts/font-icons.min.css'}">
<link rel="stylesheet" th:href="${setting.domain + 'bootstrap/css/bootstrap.min.css'}">
<link rel="stylesheet" th:href="${setting.domain + 'select2/4.0/select2.css'}">
<link rel="stylesheet" th:href="${setting.domain + 'icheck/1.0/minimal/grey.css'}">
<link rel="stylesheet" th:href="${setting.domain + 'adminlte/css/AdminLTE.min.css'}">
<link rel="stylesheet" th:href="${setting.domain + 'common/jeesite.css'}">
<link rel="stylesheet" th:href="${setting.domain + 'common/common.css'}">
</head><body class="hold-transition ">
<div class="wrapper"><div class="main-content">
<div class="box box-main">
<div class="box-header">
<div class="box-title">
<i class="fa icon-grid"></i> 编辑机构
</div>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
</div>
</div>
<form id="inputForm" th:action="${setting.domain + 'sys/office/update'}" method="post" class="form-horizontal">
<div class="box-body">
<div class="form-unit">基本信息</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4">上级机构:</label>
<div class="col-sm-8">
<div class="input-group treeselect" id="parentDiv" data-url="sys/office/treeData?excludeCode=SDJN">
<input id="parentCode" type="hidden" name="parentCode" th:value="${parentOffice.officeCode}" class="isReset"/>
<input id="parentName" type="text" name="parentName" th:value="${parentOffice.officeName}"
class="form-control " readonly="readonly"/><span class="input-group-btn"><a id="parentButton" href="javascript:"
class="btn btn-default "><i class="fa fa-search"></i></a>
</span>
</div>
<script>
$("#parentButton,#parentName").click(function(){
if ($("#parentButton").hasClass("disabled")){
return true;
}
var options = {
type: 2,
maxmin: true,
shadeClose: true,
title: '上级机构',
area: ['300px', '400px'],
content: 'sys/treeselect',
contentFormData: {
url: $('#parentDiv').attr('data-url'),
checkbox: 'false',
expandLevel: '-1',
selectCodes: $("#parentCode").val(),
isReturnValue: 'false'
},
success: function(layero, index){
if ($(js.layer.window).width() < 300
|| $(js.layer.window).height() < 400){
js.layer.full(index);
}
},
btn: ['<i class="fa fa-check"></i> 确定'],
btn1: function(index, layero){
var win = js.layer.iframeWindow(index);
win.$('#keyword').val('').change(); var codes = [], names = [], nodes;
if ("false" == "true"){
nodes = win.tree.getCheckedNodes(true);
}else{
nodes = win.tree.getSelectedNodes();
}
for(var i=0; i<nodes.length; i++) {
var code = nodes[i]['false'=='true'?'value':'id'], name = nodes[i]['name'];
codes.push(code.replace(/^u_/g,''));
names.push(name.replace(/\([0-9]*\)/g,''));
break;
}
if(typeof treeselectCheck == 'function'){
if (!treeselectCheck('parent', nodes)){
return false;
}
}
$("#parentCode").val(codes.join(',')).change();
$("#parentName").val(names.join(',')).change();
try { $('#parentCode,#parentName').valid(); }catch(e){}
if(typeof treeselectCallback == 'function'){
treeselectCallback('parent', 'ok', index, layero, nodes);
}
}
};
options.btn.push('<i class="fa fa-eraser"></i> 清除');
options['btn'+options.btn.length] = function(index, layero){
$("#parentCode").val('').change();
$("#parentName").val('').change();
if(typeof treeselectCallback == 'function'){
treeselectCallback('parent', 'clear', index, layero);
}
};
options.btn.push('<i class="fa fa-close"></i> 关闭');
options['btn'+options.btn.length] = function(index, layero){
if(typeof treeselectCallback == 'function'){
treeselectCallback('parent', 'cancel', index, layero);
}
};
js.layer.open(options);
});
</script> </div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required ">*</span> 机构名称:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<input type="text" id="officeName" name="officeName" th:value="${office.officeName}" maxlength="100" class="form-control required "/>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required ">*</span> 机构代码:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<input type="hidden" id="officeCode" name="officeCode" th:value="${office.officeCode}"/>
<input type="text" id="viewCode" name="viewCode" th:value="${office.viewCode}" maxlength="64" readonly="true" class="form-control required abc"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required ">*</span> 机构全称:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<input type="text" id="fullName" name="fullName" th:value="${office.fullName}" maxlength="200" class="form-control required "/>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required ">*</span> 排序号:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<input type="text" id="treeSort" name="treeSort" th:value="${office.treeSort}" maxlength="10" class="form-control required digits"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required ">*</span> 机构类型:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<select id="officeType" name="officeType" class="form-control required ">
<option value="1" th:selected="${office.officeType == '1'} ? true : false">省级公司</option>
<option value="2" th:selected="${office.officeType == '2'} ? true : false">市级公司</option>
<option value="3" th:selected="${office.officeType == '3'} ? true : false">部门</option>
</select>
</div>
</div>
</div>
</div>
<div class="form-unit">详细信息</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 负责人:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<input type="text" id="leader" name="leader" th:value="${office.leader}" maxlength="100" class="form-control "/>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 办公电话:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<input type="text" id="phone" name="phone" th:value="${office.phone}" maxlength="100" class="form-control phone"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 联系地址:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<input type="text" id="address" name="address" th:value="${office.address}" maxlength="255" class="form-control "/>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 邮政编码:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<input type="text" id="zipCode" name="zipCode" th:value="${office.zipCode}" maxlength="100" class="form-control zipCode"/>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="">
<span class="required hide">*</span> 电子邮箱:<i class="fa icon-question hide"></i></label>
<div class="col-sm-8">
<input type="text" id="email" name="email" th:value="${office.email}" maxlength="300" class="form-control email"/>
</div>
</div>
</div>
<div class="col-xs-12">
<div class="form-group">
<label class="control-label col-sm-2" title="">
<span class="required hide">*</span> 备注信息:<i class="fa icon-question hide"></i></label>
<div class="col-sm-10">
<textarea id="remarks" name="remarks" rows="4" maxlength="500" class="form-control " th:utext="${office.remarks}"></textarea>
</div>
</div>
</div>
</div>
</div>
<div class="box-footer">
<div class="row">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> 保 存</button>&nbsp;
<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> 关 闭</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<a id="scroll-up" href="#" class="btn btn-sm"><i class="fa fa-angle-double-up"></i></a>
<script th:src="${setting.domain + 'bootstrap/js/bootstrap.min.js'}"></script>
<script th:src="${setting.domain + 'select2/4.0/select2.js'}"></script>
<script th:src="${setting.domain + 'select2/4.0/i18n/zh_CN.js'}"></script>
<script th:src="${setting.domain + 'layer/3.1/layer.js'}"></script>
<script th:src="${setting.domain + 'my97/WdatePicker.js'}"></script>
<script th:src="${setting.domain + 'jquery-validation/1.16/jquery.validate.js'}"></script>
<script th:src="${setting.domain + 'jquery-validation/1.16/localization/messages_zh_CN.js'}"></script>
<script th:src="${setting.domain + 'jquery-validation/1.16/jquery.validate.extend.js'}"></script>
<script th:src="${setting.domain + 'common/jeesite.js'}"></script>
<script th:src="${setting.domain + 'common/i18n/jeesite_zh_CN.js'}"></script>
<script th:src="${setting.domain + 'common/common.js'}"></script>
<script>
$("#inputForm").validate({
submitHandler: function(form){
js.ajaxSubmitForm($(form), function(data){
js.showMessage(data.message);
if(data.code == 0){
js.closeCurrentTabPage(function(contentWindow){
contentWindow.$('#dataGrid').dataGrid('refreshTreeChildren',
$('#parentCode').val(), 'SDJN');
});
}
}, "json");
}
});
$('#officeName').change(function(){
if ($('#fullName').val()==''){
$('#fullName').val($(this).val());
}
});
// 选择父级菜单回调方法
function treeselectCallback(id, act, index, layero){
if (id == 'parent' && (act == 'ok' || act == 'clear')){
// 创建并初始化下一个节点信息,如:排序号、默认值
$.get('/js/a/sys/office/createNextNode?parentCode='
+$('#parentCode').val(), function(data){
$('#treeSort').val(data.treeSort);
});
}
}
</script>
Loading…
Cancel
Save