Commit 7605d4b26c676434f3c6dcea731b10f495564254
1 parent
a388c8b5
update
Showing
14 changed files
with
942 additions
and
34 deletions
src/main/java/com/bsth/controller/PersonnelController.java
0 → 100644
| 1 | +package com.bsth.controller; | ||
| 2 | + | ||
| 3 | +import com.bsth.entity.Personnel; | ||
| 4 | +import org.springframework.web.bind.annotation.RequestBody; | ||
| 5 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 6 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
| 7 | +import org.springframework.web.bind.annotation.RestController; | ||
| 8 | + | ||
| 9 | +import java.util.Map; | ||
| 10 | + | ||
| 11 | +/** | ||
| 12 | + * Created by xu on 16/6/15. | ||
| 13 | + */ | ||
| 14 | +@RestController | ||
| 15 | +@RequestMapping("personnel") | ||
| 16 | +public class PersonnelController extends BaseController<Personnel, Integer> { | ||
| 17 | + /** | ||
| 18 | + * 覆写方法,因为form提交的方式参数不全,改用 json形式提交 @RequestBody | ||
| 19 | + * @Title: save | ||
| 20 | + * @Description: TODO(持久化对象) | ||
| 21 | + * @param @param t | ||
| 22 | + * @param @return 设定文件 | ||
| 23 | + * @return Map<String,Object> {status: 1(成功),-1(失败)} | ||
| 24 | + * @throws | ||
| 25 | + */ | ||
| 26 | + @RequestMapping(method = RequestMethod.POST) | ||
| 27 | + public Map<String, Object> save(@RequestBody Personnel t){ | ||
| 28 | + return baseService.save(t); | ||
| 29 | + } | ||
| 30 | +} |
src/main/java/com/bsth/repository/PersonnelRepository.java
0 → 100644
src/main/java/com/bsth/service/PersonnelService.java
0 → 100644
src/main/java/com/bsth/service/impl/PersonnelServiceImpl.java
0 → 100644
| 1 | +package com.bsth.service.impl; | ||
| 2 | + | ||
| 3 | +import com.bsth.entity.Personnel; | ||
| 4 | +import com.bsth.service.PersonnelService; | ||
| 5 | +import org.springframework.stereotype.Service; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * Created by xu on 16/6/15. | ||
| 9 | + */ | ||
| 10 | +@Service | ||
| 11 | +public class PersonnelServiceImpl extends BaseServiceImpl<Personnel, Integer> implements PersonnelService { | ||
| 12 | +} |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/busInfoManage.js
| @@ -348,7 +348,7 @@ angular.module('ScheduleApp').controller('BusInfoManageFormCtrl', ['BusInfoManag | @@ -348,7 +348,7 @@ angular.module('ScheduleApp').controller('BusInfoManageFormCtrl', ['BusInfoManag | ||
| 348 | busInfoManageService.saveDetail(self.busInfoForSave).then( | 348 | busInfoManageService.saveDetail(self.busInfoForSave).then( |
| 349 | function(result) { | 349 | function(result) { |
| 350 | // TODO:弹出框方式以后改 | 350 | // TODO:弹出框方式以后改 |
| 351 | - if (result.status == 1) { | 351 | + if (result.status == 'SUCCESS') { |
| 352 | alert("保存成功!"); | 352 | alert("保存成功!"); |
| 353 | $state.go("busInfoManage"); | 353 | $state.go("busInfoManage"); |
| 354 | } else { | 354 | } else { |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/edit.html
| @@ -77,7 +77,7 @@ | @@ -77,7 +77,7 @@ | ||
| 77 | </div> | 77 | </div> |
| 78 | <!-- 隐藏块,显示验证信息 --> | 78 | <!-- 隐藏块,显示验证信息 --> |
| 79 | <div class="alert alert-danger well-sm" ng-show="myForm.gs.$error.required"> | 79 | <div class="alert alert-danger well-sm" ng-show="myForm.gs.$error.required"> |
| 80 | - 内部编号必须填写 | 80 | + 公司必须选择 |
| 81 | </div> | 81 | </div> |
| 82 | </div> | 82 | </div> |
| 83 | 83 |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/form.html
| @@ -77,7 +77,7 @@ | @@ -77,7 +77,7 @@ | ||
| 77 | </div> | 77 | </div> |
| 78 | <!-- 隐藏块,显示验证信息 --> | 78 | <!-- 隐藏块,显示验证信息 --> |
| 79 | <div class="alert alert-danger well-sm" ng-show="myForm.gs.$error.required"> | 79 | <div class="alert alert-danger well-sm" ng-show="myForm.gs.$error.required"> |
| 80 | - 内部编号必须填写 | 80 | + 公司必须选择 |
| 81 | </div> | 81 | </div> |
| 82 | </div> | 82 | </div> |
| 83 | 83 |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/detail.html
| 1 | +<div class="page-head"> | ||
| 2 | + <div class="page-title"> | ||
| 3 | + <h1>人员详细信息</h1> | ||
| 4 | + </div> | ||
| 5 | +</div> | ||
| 6 | + | ||
| 7 | +<ul class="page-breadcrumb breadcrumb"> | ||
| 8 | + <li> | ||
| 9 | + <a href="/pages/home.html" data-pjax>首页</a> | ||
| 10 | + <i class="fa fa-circle"></i> | ||
| 11 | + </li> | ||
| 12 | + <li> | ||
| 13 | + <span class="active">基础信息</span> | ||
| 14 | + <i class="fa fa-circle"></i> | ||
| 15 | + </li> | ||
| 16 | + <li> | ||
| 17 | + <a ui-sref="employeeInfoManage">人员信息管理</a> | ||
| 18 | + <i class="fa fa-circle"></i> | ||
| 19 | + </li> | ||
| 20 | + <li> | ||
| 21 | + <span class="active">人员详细信息</span> | ||
| 22 | + </li> | ||
| 23 | +</ul> | ||
| 24 | + | ||
| 25 | +<div class="portlet light bordered" ng-controller="EmployeeInfoManageDetailCtrl as ctrl"> | ||
| 26 | + <div class="portlet-title"> | ||
| 27 | + <div class="caption"> | ||
| 28 | + <i class="icon-equalizer font-red-sunglo"></i> <span | ||
| 29 | + class="caption-subject font-red-sunglo bold uppercase" | ||
| 30 | + ng-bind="ctrl.title"></span> | ||
| 31 | + </div> | ||
| 32 | + </div> | ||
| 33 | + | ||
| 34 | + <div class="portlet-body form"> | ||
| 35 | + <form class="form-horizontal" novalidate name="myForm"> | ||
| 36 | + <div class="form-body"> | ||
| 37 | + <div class="form-group has-success has-feedback"> | ||
| 38 | + <label class="col-md-2 control-label">所属公司*:</label> | ||
| 39 | + <div class="col-md-3"> | ||
| 40 | + <input type="text" class="form-control" name="company" | ||
| 41 | + ng-model="ctrl.employeeInfoForDetail.company" readonly/> | ||
| 42 | + </div> | ||
| 43 | + </div> | ||
| 44 | + <div class="form-group"> | ||
| 45 | + <label class="col-md-2 control-label">所属分公司:</label> | ||
| 46 | + <div class="col-md-3"> | ||
| 47 | + <input type="text" class="form-control" name="brancheCompany" | ||
| 48 | + ng-model="ctrl.employeeInfoForDetail.brancheCompany" readonly/> | ||
| 49 | + </div> | ||
| 50 | + </div> | ||
| 51 | + <div class="form-group has-success has-feedback"> | ||
| 52 | + <label class="col-md-2 control-label">工号*:</label> | ||
| 53 | + <div class="col-md-3"> | ||
| 54 | + <input type="text" class="form-control" name="jobCode" | ||
| 55 | + ng-model="ctrl.employeeInfoForDetail.jobCode" readonly/> | ||
| 56 | + </div> | ||
| 57 | + </div> | ||
| 58 | + <div class="form-group has-success has-feedback"> | ||
| 59 | + <label class="col-md-2 control-label">姓名*:</label> | ||
| 60 | + <div class="col-md-3"> | ||
| 61 | + <input type="text" class="form-control" name="personnelName" | ||
| 62 | + ng-model="ctrl.employeeInfoForDetail.personnelName" readonly/> | ||
| 63 | + </div> | ||
| 64 | + </div> | ||
| 65 | + <div class="form-group"> | ||
| 66 | + <label class="col-md-2 control-label">运营服务证书号:</label> | ||
| 67 | + <div class="col-md-4"> | ||
| 68 | + <input type="text" class="form-control" name="papersCode" | ||
| 69 | + ng-model="ctrl.employeeInfoForDetail.papersCode" readonly/> | ||
| 70 | + </div> | ||
| 71 | + </div> | ||
| 72 | + <div class="form-group"> | ||
| 73 | + <label class="col-md-2 control-label">一卡通工作卡号:</label> | ||
| 74 | + <div class="col-md-4"> | ||
| 75 | + <input type="text" class="form-control" name="icCardCode" | ||
| 76 | + ng-model="ctrl.employeeInfoForDetail.icCardCode" readonly/> | ||
| 77 | + </div> | ||
| 78 | + </div> | ||
| 79 | + <div class="form-group"> | ||
| 80 | + <label class="col-md-2 control-label">性别:</label> | ||
| 81 | + <div class="col-md-4"> | ||
| 82 | + <label class="radio-inline"> | ||
| 83 | + <input type="radio" name="ledScreen" ng-value="'男性'" ng-model="ctrl.employeeInfoForDetail.personnelType" disabled/>男性 | ||
| 84 | + </label> | ||
| 85 | + <label class="radio-inline"> | ||
| 86 | + <input type="radio" name="ledScreen" ng-value="'女性'" ng-model="ctrl.employeeInfoForDetail.personnelType" disabled/>女性 | ||
| 87 | + </label> | ||
| 88 | + </div> | ||
| 89 | + </div> | ||
| 90 | + <div class="form-group"> | ||
| 91 | + <label class="col-md-2 control-label">工种:</label> | ||
| 92 | + <div class="col-md-4"> | ||
| 93 | + <input type="text" class="form-control" name="posts" | ||
| 94 | + ng-model="ctrl.employeeInfoForDetail.posts" readonly/> | ||
| 95 | + </div> | ||
| 96 | + </div> | ||
| 97 | + | ||
| 98 | + <!-- 其他form-group --> | ||
| 99 | + | ||
| 100 | + </div> | ||
| 101 | + </form> | ||
| 102 | + </div> | ||
| 103 | + | ||
| 104 | +</div> | ||
| 0 | \ No newline at end of file | 105 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/edit.html
0 → 100644
| 1 | +<div class="page-head"> | ||
| 2 | + <div class="page-title"> | ||
| 3 | + <h1>修改人员信息</h1> | ||
| 4 | + </div> | ||
| 5 | +</div> | ||
| 6 | + | ||
| 7 | +<ul class="page-breadcrumb breadcrumb"> | ||
| 8 | + <li> | ||
| 9 | + <a href="/pages/home.html" data-pjax>首页</a> | ||
| 10 | + <i class="fa fa-circle"></i> | ||
| 11 | + </li> | ||
| 12 | + <li> | ||
| 13 | + <span class="active">基础信息</span> | ||
| 14 | + <i class="fa fa-circle"></i> | ||
| 15 | + </li> | ||
| 16 | + <li> | ||
| 17 | + <a ui-sref="employeeInfoManage">人员信息管理</a> | ||
| 18 | + <i class="fa fa-circle"></i> | ||
| 19 | + </li> | ||
| 20 | + <li> | ||
| 21 | + <span class="active">修改人员信息</span> | ||
| 22 | + </li> | ||
| 23 | +</ul> | ||
| 24 | + | ||
| 25 | +<div class="portlet light bordered" ng-controller="EmployeeInfoManageFormCtrl as ctrl"> | ||
| 26 | + <div class="portlet-title"> | ||
| 27 | + <div class="caption"> | ||
| 28 | + <i class="icon-equalizer font-red-sunglo"></i> <span | ||
| 29 | + class="caption-subject font-red-sunglo bold uppercase">表单</span> | ||
| 30 | + </div> | ||
| 31 | + </div> | ||
| 32 | + | ||
| 33 | + <div class="portlet-body form"> | ||
| 34 | + <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm"> | ||
| 35 | + <div class="form-body"> | ||
| 36 | + <div class="form-group has-success has-feedback"> | ||
| 37 | + <label class="col-md-2 control-label">所属公司*:</label> | ||
| 38 | + <div class="col-md-3"> | ||
| 39 | + <div class="input-group"> | ||
| 40 | + <ui-select ng-model="ctrl.employeeInfoForSave.gs_selected" | ||
| 41 | + on-select="ctrl.gs_selected_change($item, $model)" | ||
| 42 | + theme="bootstrap" name="gs" required> | ||
| 43 | + <ui-select-match placeholder="请选择所属公司...">{{$select.selected.gsmc}}</ui-select-match> | ||
| 44 | + <ui-select-choices repeat="item in ctrl.gses"> | ||
| 45 | + <span ng-bind="item.gsmc"></span> | ||
| 46 | + </ui-select-choices> | ||
| 47 | + </ui-select> | ||
| 48 | + <span class="input-group-btn"> | ||
| 49 | + <button type="button" ng-click="ctrl.gs_selected_remove()" class="btn btn-default"> | ||
| 50 | + <span class="glyphicon glyphicon-trash"></span> | ||
| 51 | + </button> | ||
| 52 | + </span> | ||
| 53 | + </div> | ||
| 54 | + </div> | ||
| 55 | + <!-- 隐藏块,显示验证信息 --> | ||
| 56 | + <div class="alert alert-danger well-sm" ng-show="myForm.gs.$error.required"> | ||
| 57 | + 公司必须选择 | ||
| 58 | + </div> | ||
| 59 | + </div> | ||
| 60 | + | ||
| 61 | + <!-- TODO --> | ||
| 62 | + <div class="form-group"> | ||
| 63 | + <label class="col-md-2 control-label">分公司:</label> | ||
| 64 | + <div class="col-md-3"> | ||
| 65 | + <select name="brancheCompanyCode" class="form-control"> | ||
| 66 | + <option value="">请选择...</option> | ||
| 67 | + <option value="1">分公司1</option> | ||
| 68 | + <option value="2">分公司1</option> | ||
| 69 | + <option value="3">分公司1</option> | ||
| 70 | + <option value="4">分公司1</option> | ||
| 71 | + </select> | ||
| 72 | + </div> | ||
| 73 | + </div> | ||
| 74 | + | ||
| 75 | + <div class="form-group has-success has-feedback"> | ||
| 76 | + <label class="col-md-2 control-label">工号*:</label> | ||
| 77 | + <div class="col-md-3"> | ||
| 78 | + <input type="text" class="form-control" | ||
| 79 | + name="jobCode" ng-model="ctrl.employeeInfoForSave.jobCode" | ||
| 80 | + required placeholder="请输入工号"/> | ||
| 81 | + </div> | ||
| 82 | + <!-- 隐藏块,显示验证信息 --> | ||
| 83 | + <div class="alert alert-danger well-sm" ng-show="myForm.jobCode.$error.required"> | ||
| 84 | + 工号必须填写 | ||
| 85 | + </div> | ||
| 86 | + </div> | ||
| 87 | + | ||
| 88 | + <div class="form-group has-success has-feedback"> | ||
| 89 | + <label class="col-md-2 control-label">工号*:</label> | ||
| 90 | + <div class="col-md-3"> | ||
| 91 | + <input type="text" class="form-control" | ||
| 92 | + name="personnelName" ng-model="ctrl.employeeInfoForSave.personnelName" | ||
| 93 | + required placeholder="请输入姓名"/> | ||
| 94 | + </div> | ||
| 95 | + <!-- 隐藏块,显示验证信息 --> | ||
| 96 | + <div class="alert alert-danger well-sm" ng-show="myForm.personnelName.$error.required"> | ||
| 97 | + 姓名必须填写 | ||
| 98 | + </div> | ||
| 99 | + </div> | ||
| 100 | + | ||
| 101 | + <div class="form-group"> | ||
| 102 | + <label class="col-md-2 control-label">运营服务证书号:</label> | ||
| 103 | + <div class="col-md-4"> | ||
| 104 | + <input type="text" class="form-control" ng-model="ctrl.employeeInfoForSave.papersCode" | ||
| 105 | + placeholder="请输入运营服务证书号"/> | ||
| 106 | + </div> | ||
| 107 | + </div> | ||
| 108 | + | ||
| 109 | + <div class="form-group"> | ||
| 110 | + <label class="col-md-2 control-label">一卡通号:</label> | ||
| 111 | + <div class="col-md-4"> | ||
| 112 | + <input type="text" class="form-control" ng-model="ctrl.employeeInfoForSave.icCardCode" | ||
| 113 | + placeholder="请输入一卡通工作卡号"/> | ||
| 114 | + </div> | ||
| 115 | + </div> | ||
| 116 | + | ||
| 117 | + <div class="form-group"> | ||
| 118 | + <label class="col-md-2 control-label">性别:</label> | ||
| 119 | + <div class="col-md-4"> | ||
| 120 | + <label class="radio-inline"> | ||
| 121 | + <input type="radio" name="personnelType" | ||
| 122 | + ng-value="'男性'" ng-model="ctrl.employeeInfoForSave.personnelType"/>男性 | ||
| 123 | + </label> | ||
| 124 | + <label class="radio-inline"> | ||
| 125 | + <input type="radio" name="personnelType" | ||
| 126 | + ng-value="'女性'" ng-model="ctrl.employeeInfoForSave.personnelType"/>女性 | ||
| 127 | + </label> | ||
| 128 | + </div> | ||
| 129 | + </div> | ||
| 130 | + | ||
| 131 | + <div class="form-group"> | ||
| 132 | + <label class="col-md-2 control-label">工种:</label> | ||
| 133 | + <div class="col-md-4"> | ||
| 134 | + <div class="input-group"> | ||
| 135 | + <ui-select ng-model="ctrl.employeeInfoForSave.posts_selected" | ||
| 136 | + on-select="ctrl.posts_selected_change($item, $model)" | ||
| 137 | + theme="bootstrap" name="posts"> | ||
| 138 | + <ui-select-match placeholder="请选择工种...">{{$select.selected.type}}</ui-select-match> | ||
| 139 | + <ui-select-choices repeat="item in ctrl.postes"> | ||
| 140 | + <span ng-bind="item.type"></span> | ||
| 141 | + </ui-select-choices> | ||
| 142 | + </ui-select> | ||
| 143 | + <span class="input-group-btn"> | ||
| 144 | + <button type="button" ng-click="ctrl.posts_selected_remove()" class="btn btn-default"> | ||
| 145 | + <span class="glyphicon glyphicon-trash"></span> | ||
| 146 | + </button> | ||
| 147 | + </span> | ||
| 148 | + </div> | ||
| 149 | + </div> | ||
| 150 | + </div> | ||
| 151 | + | ||
| 152 | + <!-- 其他form-group --> | ||
| 153 | + | ||
| 154 | + </div> | ||
| 155 | + | ||
| 156 | + <div class="form-actions"> | ||
| 157 | + <div class="row"> | ||
| 158 | + <div class="col-md-offset-3 col-md-4"> | ||
| 159 | + <button type="submit" class="btn green" ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button> | ||
| 160 | + <a type="button" class="btn default" ui-sref="employeeInfoManage" ><i class="fa fa-times"></i> 取消</a> | ||
| 161 | + </div> | ||
| 162 | + </div> | ||
| 163 | + </div> | ||
| 164 | + | ||
| 165 | + </form> | ||
| 166 | + </div> | ||
| 167 | + | ||
| 168 | +</div> | ||
| 0 | \ No newline at end of file | 169 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/employeeInfoManage.js
| 1 | // 人员信息管理 service controller等写在一起 | 1 | // 人员信息管理 service controller等写在一起 |
| 2 | 2 | ||
| 3 | -angular.module('ScheduleApp').factory('EmployeeInfoManageService', ['$resource', function($resource) { | ||
| 4 | - // TODO:测试 | 3 | +angular.module('ScheduleApp').factory('EmployeeInfoManageService', ['EmployeeInfoManageService_g', function(service) { |
| 4 | + /** 公司字典 */ | ||
| 5 | + var gses = [ | ||
| 6 | + {gsdm: "55", gsmc: "上南公司"}, | ||
| 7 | + {gsdm: "22", gsmc: "金高公司"}, | ||
| 8 | + {gsdm: "05", gsmc: "杨高公司"}, | ||
| 9 | + {gsdm: "26", gsmc: "南汇公司"} | ||
| 10 | + ]; | ||
| 11 | + /** 男女性别类型字典 */ | ||
| 12 | + var sexes = [ | ||
| 13 | + {type: "男"}, | ||
| 14 | + {type: "女"} | ||
| 15 | + ]; | ||
| 16 | + /** 工种类型字典 */ | ||
| 17 | + var postes = [ | ||
| 18 | + {type: "公共汽电车驾驶员"}, | ||
| 19 | + {type: "公共汽电车调度员"}, | ||
| 20 | + {type: "公共汽电车售票员"}, | ||
| 21 | + {type: "站员"}, | ||
| 22 | + {type: "管理员"}, | ||
| 23 | + {type: "安检员"}, | ||
| 24 | + {type: "机务"}, | ||
| 25 | + {type: "引导员"}, | ||
| 26 | + {type: "乘务员"}, | ||
| 27 | + {type: "车队长(线长、主"}, | ||
| 28 | + {type: "公司管理人员"}, | ||
| 29 | + {type: "警消人员"}, | ||
| 30 | + {type: "票务人员"}, | ||
| 31 | + {type: "其他服务人员"} | ||
| 32 | + ]; | ||
| 5 | 33 | ||
| 34 | + /** 当前的查询条件信息 */ | ||
| 35 | + var currentSearchCondition = { | ||
| 36 | + //"carCode_like" : "", | ||
| 37 | + //"insideCode_like" : "", | ||
| 38 | + //"equipmentCode_like" : "", | ||
| 39 | + //"carPlate_like" : "" | ||
| 40 | + }; | ||
| 6 | 41 | ||
| 7 | - return $resource( | ||
| 8 | - '/cci', | ||
| 9 | - {}, | ||
| 10 | - { | ||
| 11 | - list: { | ||
| 12 | - method: 'GET' | 42 | + /** 当前第几页 */ |
| 43 | + var currentPageNo = 1; | ||
| 44 | + | ||
| 45 | + return { | ||
| 46 | + /** | ||
| 47 | + * 获取公司字典。 | ||
| 48 | + */ | ||
| 49 | + getGses: function() { | ||
| 50 | + return gses; | ||
| 51 | + }, | ||
| 52 | + /** | ||
| 53 | + * 获取性别字典。 | ||
| 54 | + */ | ||
| 55 | + getSexes: function() { | ||
| 56 | + return sexes; | ||
| 57 | + }, | ||
| 58 | + /** | ||
| 59 | + * 获取工种类型字典。 | ||
| 60 | + */ | ||
| 61 | + getPostes: function() { | ||
| 62 | + return postes; | ||
| 63 | + }, | ||
| 64 | + /** | ||
| 65 | + * 获取查询条件信息, | ||
| 66 | + * 用于给controller用来和页面数据绑定。 | ||
| 67 | + */ | ||
| 68 | + getSearchCondition: function() { | ||
| 69 | + return currentSearchCondition; | ||
| 70 | + }, | ||
| 71 | + /** | ||
| 72 | + * 重置查询条件信息。 | ||
| 73 | + */ | ||
| 74 | + resetSearchCondition: function() { | ||
| 75 | + var key; | ||
| 76 | + for (key in currentSearchCondition) { | ||
| 77 | + currentSearchCondition[key] = ""; | ||
| 13 | } | 78 | } |
| 79 | + }, | ||
| 80 | + /** | ||
| 81 | + * 设置当前页码。 | ||
| 82 | + * @param cpn 从1开始,后台是从0开始的 | ||
| 83 | + */ | ||
| 84 | + setCurrentPageNo: function(cpn) { | ||
| 85 | + currentPageNo = cpn; | ||
| 86 | + }, | ||
| 87 | + /** | ||
| 88 | + * 组装查询参数,返回一个promise查询结果。 | ||
| 89 | + * @param params 查询参数 | ||
| 90 | + * @return 返回一个 promise | ||
| 91 | + */ | ||
| 92 | + getPage: function() { | ||
| 93 | + var params = currentSearchCondition; // 查询条件 | ||
| 94 | + params.page = currentPageNo - 1; // 服务端页码从0开始 | ||
| 95 | + return service.list(params).$promise; | ||
| 96 | + }, | ||
| 97 | + /** | ||
| 98 | + * 获取明细信息。 | ||
| 99 | + * @param id 车辆id | ||
| 100 | + * @return 返回一个 promise | ||
| 101 | + */ | ||
| 102 | + getDetail: function(id) { | ||
| 103 | + var params = {id: id}; | ||
| 104 | + return service.get(params).$promise; | ||
| 105 | + }, | ||
| 106 | + /** | ||
| 107 | + * 保存信息。 | ||
| 108 | + * @param obj 车辆详细信息 | ||
| 109 | + * @return 返回一个 promise | ||
| 110 | + */ | ||
| 111 | + saveDetail: function(obj) { | ||
| 112 | + return service.save(obj).$promise; | ||
| 14 | } | 113 | } |
| 15 | - ); | 114 | + } |
| 16 | 115 | ||
| 17 | }]); | 116 | }]); |
| 18 | 117 | ||
| 19 | -angular.module('ScheduleApp').controller('EmployeeInfoManageCtrl', ['EmployeeInfoManageService', function(employeeInfoManageService) { | 118 | +angular.module('ScheduleApp').controller('EmployeeInfoManageCtrl', ['EmployeeInfoManageService', '$state', function(employeeInfoManageService, $state) { |
| 119 | + var self = this; | ||
| 20 | 120 | ||
| 121 | + // 切换到form状态 | ||
| 122 | + self.goForm = function() { | ||
| 123 | + //alert("切换"); | ||
| 124 | + $state.go("employeeInfoManage_form"); | ||
| 125 | + } | ||
| 21 | }]); | 126 | }]); |
| 22 | 127 | ||
| 23 | angular.module('ScheduleApp').controller('EmployeeInfoManageListCtrl', ['EmployeeInfoManageService', function(employeeInfoManageService) { | 128 | angular.module('ScheduleApp').controller('EmployeeInfoManageListCtrl', ['EmployeeInfoManageService', function(employeeInfoManageService) { |
| 24 | - // TODO:模拟数据 | ||
| 25 | var self = this; | 129 | var self = this; |
| 26 | - self.totalItems = 64; | ||
| 27 | - self.currentPage = 4; | ||
| 28 | - self.infos = {}; | 130 | + self.pageInfo = { |
| 131 | + totalItems : 0, | ||
| 132 | + currentPage : 1, | ||
| 133 | + infos: [] | ||
| 134 | + }; | ||
| 135 | + | ||
| 136 | + // 初始创建的时候,获取一次列表数据 | ||
| 137 | + employeeInfoManageService.getPage().then( | ||
| 138 | + function(result) { | ||
| 139 | + self.pageInfo.totalItems = result.totalElements; | ||
| 140 | + self.pageInfo.currentPage = result.number + 1; | ||
| 141 | + self.pageInfo.infos = result.content; | ||
| 142 | + employeeInfoManageService.setCurrentPageNo(result.number + 1); | ||
| 143 | + }, | ||
| 144 | + function(result) { | ||
| 145 | + alert("出错啦!"); | ||
| 146 | + } | ||
| 147 | + ); | ||
| 148 | + | ||
| 149 | + //$scope.$watch("ctrl.pageInfo.currentPage", function() { | ||
| 150 | + // alert("dfdfdf"); | ||
| 151 | + //}); | ||
| 152 | + | ||
| 153 | + // 翻页的时候调用 | ||
| 29 | self.pageChanaged = function() { | 154 | self.pageChanaged = function() { |
| 30 | - console.log("页面跳转到:" + currentPage.currentPage); | ||
| 31 | - } | 155 | + employeeInfoManageService.setCurrentPageNo(self.pageInfo.currentPage); |
| 156 | + employeeInfoManageService.getPage().then( | ||
| 157 | + function(result) { | ||
| 158 | + self.pageInfo.totalItems = result.totalElements; | ||
| 159 | + self.pageInfo.currentPage = result.number + 1; | ||
| 160 | + self.pageInfo.infos = result.content; | ||
| 161 | + employeeInfoManageService.setCurrentPageNo(result.number + 1); | ||
| 162 | + }, | ||
| 163 | + function(result) { | ||
| 164 | + alert("出错啦!"); | ||
| 165 | + } | ||
| 166 | + ); | ||
| 167 | + }; | ||
| 168 | + // 获取查询条件数据 | ||
| 169 | + self.searchCondition = function() { | ||
| 170 | + return employeeInfoManageService.getSearchCondition(); | ||
| 171 | + }; | ||
| 172 | + // 重置查询条件 | ||
| 173 | + self.resetSearchCondition = function() { | ||
| 174 | + return employeeInfoManageService.resetSearchCondition(); | ||
| 175 | + }; | ||
| 32 | }]); | 176 | }]); |
| 33 | 177 | ||
| 34 | -angular.module('ScheduleApp').controller('EmployeeInfoManageFormCtrl', ['EmployeeInfoManageService', function(employeeInfoManageService) { | 178 | +angular.module('ScheduleApp').controller('EmployeeInfoManageFormCtrl', ['EmployeeInfoManageService', '$stateParams', '$state', function(employeeInfoManageService, $stateParams, $state) { |
| 179 | + var self = this; | ||
| 180 | + | ||
| 181 | + // 欲保存的busInfo信息,绑定 | ||
| 182 | + self.employeeInfoForSave = {}; | ||
| 183 | + | ||
| 184 | + // 公司 selectedItem | ||
| 185 | + self.employeeInfoForSave.gs_selected = null; | ||
| 186 | + self.gses = employeeInfoManageService.getGses(); | ||
| 187 | + self.gs_selected_change = function($item, $model) { | ||
| 188 | + self.employeeInfoForSave.companyCode = $item.gsdm; | ||
| 189 | + self.employeeInfoForSave.company = $item.gsmc; | ||
| 190 | + }; | ||
| 191 | + self.gs_selected_remove = function() { | ||
| 192 | + self.employeeInfoForSave.gs_selected = null; | ||
| 193 | + self.employeeInfoForSave.companyCode = null; | ||
| 194 | + self.employeeInfoForSave.company = null; | ||
| 195 | + }; | ||
| 196 | + | ||
| 197 | + // 工种 selectedItem | ||
| 198 | + self.employeeInfoForSave.posts_selected = null; | ||
| 199 | + self.postes = employeeInfoManageService.getPostes(); | ||
| 200 | + self.posts_selected_change = function($item, $model) { | ||
| 201 | + self.employeeInfoForSave.posts = $item.type; | ||
| 202 | + }; | ||
| 203 | + self.posts_selected_remove = function() { | ||
| 204 | + self.employeeInfoForSave.posts_selected = null; | ||
| 205 | + self.employeeInfoForSave.posts = null; | ||
| 206 | + }; | ||
| 207 | + | ||
| 208 | + // 获取传过来的id,有的话就是修改,获取一遍数据 | ||
| 209 | + var id = $stateParams.id; | ||
| 210 | + if (id) { | ||
| 211 | + self.employeeInfoForSave.id = id; | ||
| 212 | + employeeInfoManageService.getDetail(id).then( | ||
| 213 | + function(result) { | ||
| 214 | + var key; | ||
| 215 | + for (key in result) { | ||
| 216 | + self.employeeInfoForSave[key] = result[key]; | ||
| 217 | + } | ||
| 218 | + // 填写所有的 select 控件选中框数据 | ||
| 219 | + // 公司字典 | ||
| 220 | + if (self.employeeInfoForSave.companyCode) { | ||
| 221 | + angular.forEach(self.gses, function(data) { | ||
| 222 | + if (self.employeeInfoForSave.companyCode == data.gsdm) { | ||
| 223 | + self.employeeInfoForSave.gs_selected = data; | ||
| 224 | + } | ||
| 225 | + }); | ||
| 226 | + } | ||
| 227 | + // 工种字典 | ||
| 228 | + if (self.employeeInfoForSave.posts) { | ||
| 229 | + angular.forEach(self.postes, function(data) { | ||
| 230 | + if (self.employeeInfoForSave.posts == data.type) { | ||
| 231 | + self.employeeInfoForSave.posts_selected = data; | ||
| 232 | + } | ||
| 233 | + }); | ||
| 234 | + } | ||
| 235 | + | ||
| 236 | + }, | ||
| 237 | + function(result) { | ||
| 238 | + alert("出错啦!"); | ||
| 239 | + } | ||
| 240 | + ); | ||
| 241 | + } | ||
| 242 | + | ||
| 243 | + // 提交方法 | ||
| 244 | + self.submit = function() { | ||
| 245 | + console.log(self.employeeInfoForSave); | ||
| 246 | + employeeInfoManageService.saveDetail(self.employeeInfoForSave).then( | ||
| 247 | + function(result) { | ||
| 248 | + // TODO:弹出框方式以后改 | ||
| 249 | + if (result.status == 'SUCCESS') { | ||
| 250 | + alert("保存成功!"); | ||
| 251 | + $state.go("employeeInfoManage"); | ||
| 252 | + } else { | ||
| 253 | + alert("保存异常!"); | ||
| 254 | + } | ||
| 255 | + }, | ||
| 256 | + function(result) { | ||
| 257 | + // TODO:弹出框方式以后改 | ||
| 258 | + alert("出错啦!"); | ||
| 259 | + } | ||
| 260 | + ); | ||
| 261 | + }; | ||
| 262 | + | ||
| 35 | 263 | ||
| 36 | }]); | 264 | }]); |
| 37 | 265 | ||
| 38 | -angular.module('ScheduleApp').controller('EmployeeInfoManageDetailCtrl', ['EmployeeInfoManageService', function(employeeInfoManageService) { | 266 | +angular.module('ScheduleApp').controller('EmployeeInfoManageDetailCtrl', ['EmployeeInfoManageService', '$stateParams', function(employeeInfoManageService, $stateParams) { |
| 267 | + var self = this; | ||
| 268 | + self.title = ""; | ||
| 269 | + self.employeeInfoForDetail = {}; | ||
| 270 | + self.employeeInfoForDetail.id = $stateParams.id; | ||
| 39 | 271 | ||
| 272 | + // 当转向到此页面时,就获取明细信息并绑定 | ||
| 273 | + employeeInfoManageService.getDetail($stateParams.id).then( | ||
| 274 | + function(result) { | ||
| 275 | + var key; | ||
| 276 | + for (key in result) { | ||
| 277 | + self.employeeInfoForDetail[key] = result[key]; | ||
| 278 | + } | ||
| 279 | + | ||
| 280 | + self.title = "员工 " + self.employeeInfoForDetail.personnelName + " 详细信息"; | ||
| 281 | + }, | ||
| 282 | + function(result) { | ||
| 283 | + // TODO:弹出框方式以后改 | ||
| 284 | + alert("出错啦!"); | ||
| 285 | + } | ||
| 286 | + ); | ||
| 40 | }]); | 287 | }]); |
| 41 | 288 |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/form.html
| 1 | +<div class="page-head"> | ||
| 2 | + <div class="page-title"> | ||
| 3 | + <h1>添加人员信息</h1> | ||
| 4 | + </div> | ||
| 5 | +</div> | ||
| 6 | + | ||
| 7 | +<ul class="page-breadcrumb breadcrumb"> | ||
| 8 | + <li> | ||
| 9 | + <a href="/pages/home.html" data-pjax>首页</a> | ||
| 10 | + <i class="fa fa-circle"></i> | ||
| 11 | + </li> | ||
| 12 | + <li> | ||
| 13 | + <span class="active">基础信息</span> | ||
| 14 | + <i class="fa fa-circle"></i> | ||
| 15 | + </li> | ||
| 16 | + <li> | ||
| 17 | + <a ui-sref="employeeInfoManage">人员信息管理</a> | ||
| 18 | + <i class="fa fa-circle"></i> | ||
| 19 | + </li> | ||
| 20 | + <li> | ||
| 21 | + <span class="active">添加人员信息</span> | ||
| 22 | + </li> | ||
| 23 | +</ul> | ||
| 24 | + | ||
| 25 | +<div class="portlet light bordered" ng-controller="EmployeeInfoManageFormCtrl as ctrl"> | ||
| 26 | + <div class="portlet-title"> | ||
| 27 | + <div class="caption"> | ||
| 28 | + <i class="icon-equalizer font-red-sunglo"></i> <span | ||
| 29 | + class="caption-subject font-red-sunglo bold uppercase">表单</span> | ||
| 30 | + </div> | ||
| 31 | + </div> | ||
| 32 | + | ||
| 33 | + <div class="portlet-body form"> | ||
| 34 | + <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm"> | ||
| 35 | + <div class="form-body"> | ||
| 36 | + <div class="form-group has-success has-feedback"> | ||
| 37 | + <label class="col-md-2 control-label">所属公司*:</label> | ||
| 38 | + <div class="col-md-3"> | ||
| 39 | + <div class="input-group"> | ||
| 40 | + <ui-select ng-model="ctrl.employeeInfoForSave.gs_selected" | ||
| 41 | + on-select="ctrl.gs_selected_change($item, $model)" | ||
| 42 | + theme="bootstrap" name="gs" required> | ||
| 43 | + <ui-select-match placeholder="请选择所属公司...">{{$select.selected.gsmc}}</ui-select-match> | ||
| 44 | + <ui-select-choices repeat="item in ctrl.gses"> | ||
| 45 | + <span ng-bind="item.gsmc"></span> | ||
| 46 | + </ui-select-choices> | ||
| 47 | + </ui-select> | ||
| 48 | + <span class="input-group-btn"> | ||
| 49 | + <button type="button" ng-click="ctrl.gs_selected_remove()" class="btn btn-default"> | ||
| 50 | + <span class="glyphicon glyphicon-trash"></span> | ||
| 51 | + </button> | ||
| 52 | + </span> | ||
| 53 | + </div> | ||
| 54 | + </div> | ||
| 55 | + <!-- 隐藏块,显示验证信息 --> | ||
| 56 | + <div class="alert alert-danger well-sm" ng-show="myForm.gs.$error.required"> | ||
| 57 | + 公司必须选择 | ||
| 58 | + </div> | ||
| 59 | + </div> | ||
| 60 | + | ||
| 61 | + <!-- TODO --> | ||
| 62 | + <div class="form-group"> | ||
| 63 | + <label class="col-md-2 control-label">分公司:</label> | ||
| 64 | + <div class="col-md-3"> | ||
| 65 | + <select name="brancheCompanyCode" class="form-control"> | ||
| 66 | + <option value="">请选择...</option> | ||
| 67 | + <option value="1">分公司1</option> | ||
| 68 | + <option value="2">分公司1</option> | ||
| 69 | + <option value="3">分公司1</option> | ||
| 70 | + <option value="4">分公司1</option> | ||
| 71 | + </select> | ||
| 72 | + </div> | ||
| 73 | + </div> | ||
| 74 | + | ||
| 75 | + <div class="form-group has-success has-feedback"> | ||
| 76 | + <label class="col-md-2 control-label">工号*:</label> | ||
| 77 | + <div class="col-md-3"> | ||
| 78 | + <input type="text" class="form-control" | ||
| 79 | + name="jobCode" ng-model="ctrl.employeeInfoForSave.jobCode" | ||
| 80 | + required placeholder="请输入工号"/> | ||
| 81 | + </div> | ||
| 82 | + <!-- 隐藏块,显示验证信息 --> | ||
| 83 | + <div class="alert alert-danger well-sm" ng-show="myForm.jobCode.$error.required"> | ||
| 84 | + 工号必须填写 | ||
| 85 | + </div> | ||
| 86 | + </div> | ||
| 87 | + | ||
| 88 | + <div class="form-group has-success has-feedback"> | ||
| 89 | + <label class="col-md-2 control-label">工号*:</label> | ||
| 90 | + <div class="col-md-3"> | ||
| 91 | + <input type="text" class="form-control" | ||
| 92 | + name="personnelName" ng-model="ctrl.employeeInfoForSave.personnelName" | ||
| 93 | + required placeholder="请输入姓名"/> | ||
| 94 | + </div> | ||
| 95 | + <!-- 隐藏块,显示验证信息 --> | ||
| 96 | + <div class="alert alert-danger well-sm" ng-show="myForm.personnelName.$error.required"> | ||
| 97 | + 姓名必须填写 | ||
| 98 | + </div> | ||
| 99 | + </div> | ||
| 100 | + | ||
| 101 | + <div class="form-group"> | ||
| 102 | + <label class="col-md-2 control-label">运营服务证书号:</label> | ||
| 103 | + <div class="col-md-4"> | ||
| 104 | + <input type="text" class="form-control" ng-model="ctrl.employeeInfoForSave.papersCode" | ||
| 105 | + placeholder="请输入运营服务证书号"/> | ||
| 106 | + </div> | ||
| 107 | + </div> | ||
| 108 | + | ||
| 109 | + <div class="form-group"> | ||
| 110 | + <label class="col-md-2 control-label">一卡通号:</label> | ||
| 111 | + <div class="col-md-4"> | ||
| 112 | + <input type="text" class="form-control" ng-model="ctrl.employeeInfoForSave.icCardCode" | ||
| 113 | + placeholder="请输入一卡通工作卡号"/> | ||
| 114 | + </div> | ||
| 115 | + </div> | ||
| 116 | + | ||
| 117 | + <div class="form-group"> | ||
| 118 | + <label class="col-md-2 control-label">性别:</label> | ||
| 119 | + <div class="col-md-4"> | ||
| 120 | + <label class="radio-inline"> | ||
| 121 | + <input type="radio" name="personnelType" | ||
| 122 | + ng-value="'男性'" ng-model="ctrl.employeeInfoForSave.personnelType"/>男性 | ||
| 123 | + </label> | ||
| 124 | + <label class="radio-inline"> | ||
| 125 | + <input type="radio" name="personnelType" | ||
| 126 | + ng-value="'女性'" ng-model="ctrl.employeeInfoForSave.personnelType"/>女性 | ||
| 127 | + </label> | ||
| 128 | + </div> | ||
| 129 | + </div> | ||
| 130 | + | ||
| 131 | + <div class="form-group"> | ||
| 132 | + <label class="col-md-2 control-label">工种:</label> | ||
| 133 | + <div class="col-md-4"> | ||
| 134 | + <div class="input-group"> | ||
| 135 | + <ui-select ng-model="ctrl.employeeInfoForSave.posts_selected" | ||
| 136 | + on-select="ctrl.posts_selected_change($item, $model)" | ||
| 137 | + theme="bootstrap" name="posts"> | ||
| 138 | + <ui-select-match placeholder="请选择工种...">{{$select.selected.type}}</ui-select-match> | ||
| 139 | + <ui-select-choices repeat="item in ctrl.postes"> | ||
| 140 | + <span ng-bind="item.type"></span> | ||
| 141 | + </ui-select-choices> | ||
| 142 | + </ui-select> | ||
| 143 | + <span class="input-group-btn"> | ||
| 144 | + <button type="button" ng-click="ctrl.posts_selected_remove()" class="btn btn-default"> | ||
| 145 | + <span class="glyphicon glyphicon-trash"></span> | ||
| 146 | + </button> | ||
| 147 | + </span> | ||
| 148 | + </div> | ||
| 149 | + </div> | ||
| 150 | + </div> | ||
| 151 | + | ||
| 152 | + <!-- 其他form-group --> | ||
| 153 | + | ||
| 154 | + </div> | ||
| 155 | + | ||
| 156 | + <div class="form-actions"> | ||
| 157 | + <div class="row"> | ||
| 158 | + <div class="col-md-offset-3 col-md-4"> | ||
| 159 | + <button type="submit" class="btn green" ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button> | ||
| 160 | + <a type="button" class="btn default" ui-sref="employeeInfoManage" ><i class="fa fa-times"></i> 取消</a> | ||
| 161 | + </div> | ||
| 162 | + </div> | ||
| 163 | + </div> | ||
| 164 | + | ||
| 165 | + </form> | ||
| 166 | + </div> | ||
| 167 | + | ||
| 168 | +</div> | ||
| 0 | \ No newline at end of file | 169 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/index.html
| @@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
| 27 | <span class="caption-subject bold uppercase">人员信息表</span> | 27 | <span class="caption-subject bold uppercase">人员信息表</span> |
| 28 | </div> | 28 | </div> |
| 29 | <div class="actions"> | 29 | <div class="actions"> |
| 30 | - <a href="javascirpt:" class="btn btn-circle blue"> | 30 | + <a href="javascirpt:" class="btn btn-circle blue" ng-click="ctrl.goForm()"> |
| 31 | <i class="fa fa-plus"></i> | 31 | <i class="fa fa-plus"></i> |
| 32 | 添加人员信息 | 32 | 添加人员信息 |
| 33 | </a> | 33 | </a> |
| @@ -58,7 +58,7 @@ | @@ -58,7 +58,7 @@ | ||
| 58 | </div> | 58 | </div> |
| 59 | 59 | ||
| 60 | <div class="portlet-body"> | 60 | <div class="portlet-body"> |
| 61 | - <div ui-view="list"></div> | 61 | + <div ui-view="employeeInfoManage_list"></div> |
| 62 | </div> | 62 | </div> |
| 63 | </div> | 63 | </div> |
| 64 | </div> | 64 | </div> |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/list.html
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | <div ng-controller="EmployeeInfoManageListCtrl as ctrl"> | 2 | <div ng-controller="EmployeeInfoManageListCtrl as ctrl"> |
| 3 | <table class="table table-striped table-bordered table-hover table-checkable order-column"> | 3 | <table class="table table-striped table-bordered table-hover table-checkable order-column"> |
| 4 | <thead> | 4 | <thead> |
| 5 | - <tr> | 5 | + <tr role="row" class="heading"> |
| 6 | <th> | 6 | <th> |
| 7 | <input type="checkbox" class="group-checkable"/> | 7 | <input type="checkbox" class="group-checkable"/> |
| 8 | </th> | 8 | </th> |
| @@ -16,16 +16,85 @@ | @@ -16,16 +16,85 @@ | ||
| 16 | <th>工种</th> | 16 | <th>工种</th> |
| 17 | <th>一卡通号</th> | 17 | <th>一卡通号</th> |
| 18 | <th>运营服务证号</th> | 18 | <th>运营服务证号</th> |
| 19 | - <th>操作</th> | 19 | + <th width="14%">操作</th> |
| 20 | + </tr> | ||
| 21 | + <tr role="row" class="filter"> | ||
| 22 | + <td></td> | ||
| 23 | + <td></td> | ||
| 24 | + <td> | ||
| 25 | + <input type="text" class="form-control input-sm" ng-model="ctrl.searchCondition().personnelCode_like"/> | ||
| 26 | + </td> | ||
| 27 | + <td> | ||
| 28 | + <input type="text" class="form-control input-sm" ng-model="ctrl.searchCondition().personnelName_like"/> | ||
| 29 | + </td> | ||
| 30 | + <td> | ||
| 31 | + <input type="text" class="form-control input-sm" ng-model="ctrl.searchCondition().jobCode_like"/> | ||
| 32 | + </td> | ||
| 33 | + <td> | ||
| 34 | + <select class="form-contrl form-filter"> | ||
| 35 | + <option value="">请选择</option> | ||
| 36 | + <option value="男">男</option> | ||
| 37 | + <option value="女">女</option> | ||
| 38 | + </select> | ||
| 39 | + </td> | ||
| 40 | + <td> | ||
| 41 | + <select class="form-control form-filter " > | ||
| 42 | + <option value="">请选择...</option> | ||
| 43 | + <option value="55">上南公司</option> | ||
| 44 | + <option value="22">金高公司</option> | ||
| 45 | + <option value="05">杨高公司</option> | ||
| 46 | + <option value="26">南汇公司</option> | ||
| 47 | + </select> | ||
| 48 | + </td> | ||
| 49 | + <td> | ||
| 50 | + <select class="form-control form-filter " > | ||
| 51 | + <option value="">请选择...</option> | ||
| 52 | + </select> | ||
| 53 | + </td> | ||
| 54 | + <td> | ||
| 55 | + <select class="form-control form-filter " > | ||
| 56 | + <option value="">请选择...</option> | ||
| 57 | + <option value="公共汽电车驾驶员">公共汽电车驾驶员</option> | ||
| 58 | + <option value="公共汽电车调度员">公共汽电车调度员</option> | ||
| 59 | + <option value="公共汽电车售票员">公共汽电车售票员</option> | ||
| 60 | + <option value="站员">站员</option> | ||
| 61 | + <option value="管理员">管理员</option> | ||
| 62 | + <option value="安检员">安检员</option> | ||
| 63 | + <option value="机务">机务</option> | ||
| 64 | + <option value="引导员">引导员</option> | ||
| 65 | + <option value="乘务员">乘务员</option> | ||
| 66 | + <option value="车队长(线长、主">车队长(线长、主</option> | ||
| 67 | + <option value="公司管理人员">公司管理人员</option> | ||
| 68 | + <option value="警消人员">警消人员</option> | ||
| 69 | + <option value="票务人员">票务人员</option> | ||
| 70 | + <option value="其他服务人员">其他服务人员</option> | ||
| 71 | + </select> | ||
| 72 | + </td> | ||
| 73 | + <td> | ||
| 74 | + <input type="text" class="form-control input-sm" ng-model="ctrl.searchCondition().icCardCode_like"/> | ||
| 75 | + </td> | ||
| 76 | + <td> | ||
| 77 | + <input type="text" class="form-control input-sm" ng-model="ctrl.searchCondition().papersCode_like"/> | ||
| 78 | + </td> | ||
| 79 | + <td> | ||
| 80 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom" | ||
| 81 | + ng-click="ctrl.pageChanaged()"> | ||
| 82 | + <i class="fa fa-search"></i> 搜索</button> | ||
| 83 | + | ||
| 84 | + <button class="btn btn-sm red btn-outline filter-cancel" | ||
| 85 | + ng-click="ctrl.resetSearchCondition()"> | ||
| 86 | + <i class="fa fa-times"></i> 重置</button> | ||
| 87 | + </td> | ||
| 88 | + | ||
| 20 | </tr> | 89 | </tr> |
| 21 | </thead> | 90 | </thead> |
| 22 | <tbody> | 91 | <tbody> |
| 23 | - <tr ng-repeat="info in ctrl.infos" class="odd gradeX"> | 92 | + <tr ng-repeat="info in ctrl.pageInfo.infos" class="odd gradeX"> |
| 24 | <td> | 93 | <td> |
| 25 | <input type="checkbox"/> | 94 | <input type="checkbox"/> |
| 26 | </td> | 95 | </td> |
| 27 | <td> | 96 | <td> |
| 28 | - <span>TODO</span> | 97 | + <span ng-bind="$index + 1"></span> |
| 29 | </td> | 98 | </td> |
| 30 | <td> | 99 | <td> |
| 31 | <span ng-bind="info.personnelCode"></span> | 100 | <span ng-bind="info.personnelCode"></span> |
| @@ -46,7 +115,7 @@ | @@ -46,7 +115,7 @@ | ||
| 46 | <span ng-bind="info.brancheCompany"></span> | 115 | <span ng-bind="info.brancheCompany"></span> |
| 47 | </td> | 116 | </td> |
| 48 | <td> | 117 | <td> |
| 49 | - <span>TODO</span> | 118 | + <span ng-bind="info.posts"></span> |
| 50 | </td> | 119 | </td> |
| 51 | <td> | 120 | <td> |
| 52 | <span ng-bind="info.icCardCode"></span> | 121 | <span ng-bind="info.icCardCode"></span> |
| @@ -55,18 +124,26 @@ | @@ -55,18 +124,26 @@ | ||
| 55 | <span ng-bind="info.papersCode"></span> | 124 | <span ng-bind="info.papersCode"></span> |
| 56 | </td> | 125 | </td> |
| 57 | <td> | 126 | <td> |
| 58 | - <span>TODO</span> | 127 | + <!--<a href="details.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 详细 </a>--> |
| 128 | + <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>--> | ||
| 129 | + <a ui-sref="employeeInfoManage_detail({id: info.id})" class="btn default blue-stripe btn-sm"> 详细 </a> | ||
| 130 | + <a ui-sref="employeeInfoManage_edit({id: info.id})" class="btn default blue-stripe btn-sm"> 修改 </a> | ||
| 59 | </td> | 131 | </td> |
| 60 | </tr> | 132 | </tr> |
| 61 | </tbody> | 133 | </tbody> |
| 62 | </table> | 134 | </table> |
| 63 | 135 | ||
| 64 | <div style="text-align: right;"> | 136 | <div style="text-align: right;"> |
| 65 | - <uib-pagination total-items="ctrl.totalItems" | ||
| 66 | - ng-model="ctrl.currentPage" | ||
| 67 | - ng-change="ctrl.pageChanged()" | 137 | + <uib-pagination total-items="ctrl.pageInfo.totalItems" |
| 138 | + ng-model="ctrl.pageInfo.currentPage" | ||
| 139 | + ng-change="ctrl.pageChanaged()" | ||
| 140 | + rotate="false" | ||
| 141 | + max-size="10" | ||
| 142 | + boundary-links="true" | ||
| 143 | + first-text="首页" | ||
| 68 | previous-text="上一页" | 144 | previous-text="上一页" |
| 69 | - next-text="下一页"> | 145 | + next-text="下一页" |
| 146 | + last-text="尾页"> | ||
| 70 | </uib-pagination> | 147 | </uib-pagination> |
| 71 | </div> | 148 | </div> |
| 72 | </div> | 149 | </div> |
| 73 | \ No newline at end of file | 150 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/main.js
| @@ -131,7 +131,7 @@ ScheduleApp.config(['$stateProvider', '$urlRouterProvider', function($stateProvi | @@ -131,7 +131,7 @@ ScheduleApp.config(['$stateProvider', '$urlRouterProvider', function($stateProvi | ||
| 131 | "": { | 131 | "": { |
| 132 | templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/index.html' | 132 | templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/index.html' |
| 133 | }, | 133 | }, |
| 134 | - "list@employeeInfoManage": { | 134 | + "employeeInfoManage_list@employeeInfoManage": { |
| 135 | templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/list.html' | 135 | templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/list.html' |
| 136 | } | 136 | } |
| 137 | }, | 137 | }, |
| @@ -148,6 +148,67 @@ ScheduleApp.config(['$stateProvider', '$urlRouterProvider', function($stateProvi | @@ -148,6 +148,67 @@ ScheduleApp.config(['$stateProvider', '$urlRouterProvider', function($stateProvi | ||
| 148 | }] | 148 | }] |
| 149 | } | 149 | } |
| 150 | }) | 150 | }) |
| 151 | + .state("employeeInfoManage_form", { | ||
| 152 | + url: '/employeeInfoManage_form', | ||
| 153 | + views: { | ||
| 154 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/form.html'} | ||
| 155 | + }, | ||
| 156 | + resolve: { | ||
| 157 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 158 | + return $ocLazyLoad.load({ | ||
| 159 | + name: 'employeeInfoManage_form_module', | ||
| 160 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 161 | + files: [ | ||
| 162 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 163 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 164 | + "pages/scheduleApp/module/basicInfo/employeeInfoManage/employeeInfoManage.js" | ||
| 165 | + ] | ||
| 166 | + }); | ||
| 167 | + }] | ||
| 168 | + } | ||
| 169 | + }) | ||
| 170 | + .state("employeeInfoManage_edit", { | ||
| 171 | + url: '/employeeInfoManage_edit/:id', | ||
| 172 | + views: { | ||
| 173 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/edit.html'} | ||
| 174 | + }, | ||
| 175 | + resolve: { | ||
| 176 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 177 | + return $ocLazyLoad.load({ | ||
| 178 | + name: 'employeeInfoManage_edit_module', | ||
| 179 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 180 | + files: [ | ||
| 181 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 182 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 183 | + "pages/scheduleApp/module/basicInfo/employeeInfoManage/employeeInfoManage.js" | ||
| 184 | + ] | ||
| 185 | + }); | ||
| 186 | + }] | ||
| 187 | + } | ||
| 188 | + }) | ||
| 189 | + .state("employeeInfoManage_detail", { | ||
| 190 | + url: '/employeeInfoManage_detail/:id', | ||
| 191 | + views: { | ||
| 192 | + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/detail.html'} | ||
| 193 | + }, | ||
| 194 | + resolve: { | ||
| 195 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 196 | + return $ocLazyLoad.load({ | ||
| 197 | + name: 'employeeInfoManage_module', | ||
| 198 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 199 | + files: [ | ||
| 200 | + "pages/scheduleApp/module/basicInfo/employeeInfoManage/employeeInfoManage.js" | ||
| 201 | + ] | ||
| 202 | + }); | ||
| 203 | + }] | ||
| 204 | + } | ||
| 205 | + }) | ||
| 206 | + | ||
| 207 | + | ||
| 208 | + | ||
| 209 | + | ||
| 210 | + | ||
| 211 | + | ||
| 151 | 212 | ||
| 152 | // 车辆设备信息模块配置 | 213 | // 车辆设备信息模块配置 |
| 153 | .state("deviceInfoManage", { | 214 | .state("deviceInfoManage", { |
| @@ -273,6 +334,27 @@ angular.module('ScheduleApp').factory('BusInfoManageService_g', ['$resource', fu | @@ -273,6 +334,27 @@ angular.module('ScheduleApp').factory('BusInfoManageService_g', ['$resource', fu | ||
| 273 | } | 334 | } |
| 274 | ); | 335 | ); |
| 275 | }]); | 336 | }]); |
| 337 | +// 人员信息service | ||
| 338 | +angular.module('ScheduleApp').factory('EmployeeInfoManageService_g', ['$resource', function($resource) { | ||
| 339 | + return $resource( | ||
| 340 | + '/personnel/:id', | ||
| 341 | + {order: 'jobCode', direction: 'ASC', id: '@id_route'}, | ||
| 342 | + { | ||
| 343 | + list: { | ||
| 344 | + method: 'GET', | ||
| 345 | + params: { | ||
| 346 | + page: 0 | ||
| 347 | + } | ||
| 348 | + }, | ||
| 349 | + get: { | ||
| 350 | + method: 'GET' | ||
| 351 | + }, | ||
| 352 | + save: { | ||
| 353 | + method: 'POST' | ||
| 354 | + } | ||
| 355 | + } | ||
| 356 | + ); | ||
| 357 | +}]); | ||
| 276 | 358 | ||
| 277 | 359 | ||
| 278 | 360 |