Commit 4ef6bbc33a6159288f3cfd9d949a75c779ffc3e0
1 parent
bf7e9cacdd
Exists in
master
提交页面修改
Showing 3 changed files with 30 additions and 9 deletions
center.manager/src/main/webapp/WEB-INF/views/depart/depart_edit.html
View file @
4ef6bbc
| ... | ... | @@ -19,6 +19,15 @@ |
| 19 | 19 | </div> |
| 20 | 20 | </div> |
| 21 | 21 | |
| 22 | + <div class="form-group"> | |
| 23 | + <label class="col-sm-3 control-label">上级部门:</label> | |
| 24 | + <div class="col-sm-8"> | |
| 25 | + <select class="form-control" name="parentId" id="parent"> | |
| 26 | + <option value="0">--选择--</option> | |
| 27 | + </select> | |
| 28 | + </div> | |
| 29 | + </div> | |
| 30 | + | |
| 22 | 31 | <!-- <div class="form-group"> |
| 23 | 32 | <label class="col-sm-3 control-label">状态:</label> |
| 24 | 33 | <div class="col-sm-8"> |
| 25 | 34 | |
| 26 | 35 | |
| 27 | 36 | |
| 28 | 37 | |
| ... | ... | @@ -68,19 +77,36 @@ |
| 68 | 77 | #extends("/common/base_list.html") |
| 69 | 78 | <!-- <script src="${ctx}/static/js/area.js"></script> --> |
| 70 | 79 | <script type="text/javascript"> |
| 80 | + | |
| 81 | + // | |
| 71 | 82 | var model = "/sysOrganizations/list?_size=100000&_offset=0"; |
| 72 | 83 | $.get(APP.PATH+model,function(data) { |
| 73 | - //console.log(data); | |
| 74 | 84 | if(data!==null) { |
| 75 | 85 | var orgs = data.rows; |
| 76 | - //console.log(orgs); | |
| 77 | 86 | for(var i=0;i<orgs.length;i++) { |
| 78 | 87 | var tag = ""; |
| 79 | - //console.log("$!depart.orgId") | |
| 80 | 88 | if(orgs[i].id==="$!depart.orgId") { |
| 81 | 89 | tag = 'selected="selected"'; |
| 82 | 90 | } |
| 83 | 91 | $("#orgs").append("<option "+tag+" value="+orgs[i].id+">"+orgs[i].name+"</option>"); |
| 92 | + } | |
| 93 | + } | |
| 94 | + }) | |
| 95 | + | |
| 96 | + model = "/sysDepartments/list?_size=100000&_offset=0"; | |
| 97 | + $.get(APP.PATH+model,function(data) { | |
| 98 | + if(data!==null) { | |
| 99 | + var orgs = data.rows; | |
| 100 | + for(var i=0;i<orgs.length;i++) { | |
| 101 | + if(orgs[i].id==="$!depart.id"){ | |
| 102 | + continue; | |
| 103 | + } | |
| 104 | + var tag = ""; | |
| 105 | + console.log(orgs[i].id+" ->" +"$!depart.parentId") | |
| 106 | + if(orgs[i].id==="$!depart.parentId") { | |
| 107 | + tag = 'selected="selected"'; | |
| 108 | + } | |
| 109 | + $("#parent").append("<option "+tag+" value="+orgs[i].id+">"+orgs[i].name+"</option>"); | |
| 84 | 110 | } |
| 85 | 111 | } |
| 86 | 112 | }) |
center.manager/src/main/webapp/WEB-INF/views/depart/depart_list.html
View file @
4ef6bbc
core.sdk/src/main/java/com/lyms/web/controller/BaseController.java
View file @
4ef6bbc