Commit 027a93263b94d0e9577ad49bd5587da46baecdcc
1 parent
b00bf7071e
Exists in
master
修改科室
Showing 4 changed files with 37 additions and 8 deletions
- parent/center.manager/src/main/java/com/lyms/cm/controller/sys/SysDepartmentsController.java
- parent/center.manager/src/main/webapp/WEB-INF/views/depart/depart_edit.html
- parent/center.manager/src/main/webapp/WEB-INF/views/depart/depart_list.html
- parent/center.manager/src/main/webapp/WEB-INF/views/organ/org_list.html
parent/center.manager/src/main/java/com/lyms/cm/controller/sys/SysDepartmentsController.java
View file @
027a932
| ... | ... | @@ -17,6 +17,7 @@ |
| 17 | 17 | import com.lyms.base.common.enums.ValidityEnum; |
| 18 | 18 | import com.lyms.base.common.service.organ.DepartmentsService; |
| 19 | 19 | import com.lyms.constants.OperationName; |
| 20 | +import com.lyms.util.StrUtils; | |
| 20 | 21 | import com.lyms.web.bean.AjaxResult; |
| 21 | 22 | import com.lyms.web.controller.BaseController; |
| 22 | 23 | |
| ... | ... | @@ -64,6 +65,14 @@ |
| 64 | 65 | Page<Departments> page = getPage(); |
| 65 | 66 | EntityWrapper<Departments> ew = new EntityWrapper<Departments>(); |
| 66 | 67 | ew.where("ifdel=" + ValidityEnum.VALIDITY.getValidity()); |
| 68 | + String searchName = getParameter("name"); | |
| 69 | + String searchOrgId = getParameter("orgId"); | |
| 70 | + if (StrUtils.isNotEmpty(searchName)) { | |
| 71 | + ew.and("name like {0}", searchName.trim() + "%"); | |
| 72 | + } | |
| 73 | + if (StrUtils.isNotEmpty(searchOrgId)) { | |
| 74 | + ew.and("org_id = {0}", searchOrgId.trim() ); | |
| 75 | + } | |
| 67 | 76 | page = departmentService.selectPage(page, ew); |
| 68 | 77 | return toGridData(page); |
| 69 | 78 | } |
parent/center.manager/src/main/webapp/WEB-INF/views/depart/depart_edit.html
View file @
027a932
| ... | ... | @@ -4,27 +4,33 @@ |
| 4 | 4 | <form id="validForm" class="form-horizontal m-t" novalidate="novalidate"> |
| 5 | 5 | <input type="hidden" id="depart.id" name="id" value="$!depart.id"/> |
| 6 | 6 | <div class="form-group"> |
| 7 | - <label class="col-sm-3 control-label">名称:</label> | |
| 7 | + <label class="col-sm-3 control-label">科室名称:</label> | |
| 8 | 8 | <div class="col-sm-8"> |
| 9 | 9 | <input type="text" placeholder="科室名称" value="$!depart.name" aria-required="true" required="true" class="form-control" minlength="2" name="name" id="name"> |
| 10 | 10 | </div> |
| 11 | 11 | </div> |
| 12 | 12 | |
| 13 | 13 | <div class="form-group"> |
| 14 | - <label class="col-sm-3 control-label">医院:</label> | |
| 14 | + <label class="col-sm-3 control-label">医院id:</label> | |
| 15 | 15 | <div class="col-sm-8"> |
| 16 | + <input type="text" placeholder="医院id" value="$!depart.orgId" aria-required="true" required="true" class="form-control" minlength="2" name="orgId" id="orgId"> | |
| 17 | + <!-- | |
| 16 | 18 | <select class="form-control" name="orgId" id="orgs"> |
| 17 | 19 | <option value="0">--选择--</option> |
| 18 | 20 | </select> |
| 21 | + --> | |
| 19 | 22 | </div> |
| 20 | 23 | </div> |
| 21 | 24 | |
| 22 | 25 | <div class="form-group"> |
| 23 | - <label class="col-sm-3 control-label">上级科室:</label> | |
| 26 | + <label class="col-sm-3 control-label">上级科室id:</label> | |
| 24 | 27 | <div class="col-sm-8"> |
| 28 | + <input type="text" placeholder="上级科室id" value="$!depart.parentId" aria-required="true" required="true" class="form-control" minlength="2" name="parentId" id="parentId"> | |
| 29 | + <!-- | |
| 25 | 30 | <select class="form-control" name="parentId" id="parent"> |
| 26 | 31 | <option value="0">--选择--</option> |
| 27 | 32 | </select> |
| 33 | + --> | |
| 28 | 34 | </div> |
| 29 | 35 | </div> |
| 30 | 36 |
parent/center.manager/src/main/webapp/WEB-INF/views/depart/depart_list.html
View file @
027a932
| ... | ... | @@ -4,14 +4,18 @@ |
| 4 | 4 | <div style="padding-top:30px;"> |
| 5 | 5 | <form role="form" class="form-inline"> |
| 6 | 6 | <div class="form-group" id="leve"> |
| 7 | - <span class="form-control">医院组</span> | |
| 8 | - <input type="text" placeholder="请输入医院组名称" id="usernameSearch" class="form-control"> | |
| 7 | + <span class="form-control">医院id</span> | |
| 8 | + <input type="text" placeholder="医院id" id="searchOrgId" class="form-control"> | |
| 9 | 9 | </div> |
| 10 | + <div class="form-group" id="leve"> | |
| 11 | + <span class="form-control">科室名称</span> | |
| 12 | + <input type="text" placeholder="科室名称" id="searchName" class="form-control"> | |
| 13 | + </div> | |
| 10 | 14 | </form> |
| 11 | 15 | </div> |
| 12 | 16 | </div> |
| 13 | 17 | <div class="col-sm-2"> |
| 14 | - <div class="title-action"> | |
| 18 | + <div class="title-action" onclick="search();"> | |
| 15 | 19 | <a class="btn btn-primary"><i class="fa fa-search"></i> 查询</a> |
| 16 | 20 | </div> |
| 17 | 21 | </div> |
| ... | ... | @@ -33,6 +37,15 @@ |
| 33 | 37 | <script type="text/javascript"> |
| 34 | 38 | |
| 35 | 39 | var controllerRequestMappint = "/sysDepartments/"; |
| 40 | +function search(){ | |
| 41 | + var queryParams = { | |
| 42 | + query:{ | |
| 43 | + name: $("#searchName").val(), | |
| 44 | + orgId: $("#searchOrgId").val() | |
| 45 | + } | |
| 46 | + } | |
| 47 | + $('#dataTable').bootstrapTable('refresh', queryParams ); | |
| 48 | +} | |
| 36 | 49 | |
| 37 | 50 | function add() { |
| 38 | 51 | popWindow("添加科室/科室", APP.PATH + controllerRequestMappint + "/toEdit?orgId=",700,550); |
| ... | ... | @@ -60,7 +73,7 @@ |
| 60 | 73 | title: '编号' |
| 61 | 74 | },{ |
| 62 | 75 | field: 'name', |
| 63 | - title: '名称' | |
| 76 | + title: '科室名称' | |
| 64 | 77 | },{ |
| 65 | 78 | field: 'orgId', |
| 66 | 79 | title: '医院' |
parent/center.manager/src/main/webapp/WEB-INF/views/organ/org_list.html
View file @
027a932
| ... | ... | @@ -3,11 +3,12 @@ |
| 3 | 3 | <div class="col-sm-10"> |
| 4 | 4 | <div style="padding-top:30px;"> |
| 5 | 5 | <form role="form" class="form-inline"> |
| 6 | + <!-- | |
| 6 | 7 | <div class="form-group" id="leve"> |
| 7 | 8 | <span class="form-control">所属区域</span> |
| 8 | 9 | #extends("/organ/org.html") |
| 9 | 10 | </div> |
| 10 | - | |
| 11 | + --> | |
| 11 | 12 | <div class="form-group"> |
| 12 | 13 | <input type="text" placeholder="请输入医院名" id="usernameSearch" class="form-control"> |
| 13 | 14 | </div> |