Commit 27a0a49e9bc644d14c55da5f5bd69a638693b2bf
1 parent
9953864c
update
Showing
21 changed files
with
679 additions
and
151 deletions
src/main/java/com/bsth/controller/schedule/CarConfigInfoController.java
| @@ -2,8 +2,6 @@ package com.bsth.controller.schedule; | @@ -2,8 +2,6 @@ package com.bsth.controller.schedule; | ||
| 2 | 2 | ||
| 3 | import com.bsth.controller.BaseController; | 3 | import com.bsth.controller.BaseController; |
| 4 | import com.bsth.entity.schedule.CarConfigInfo; | 4 | import com.bsth.entity.schedule.CarConfigInfo; |
| 5 | -import com.bsth.repository.CarsRepository; | ||
| 6 | -import com.bsth.repository.LineRepository; | ||
| 7 | import com.bsth.repository.schedule.CarConfigInfoRepository; | 5 | import com.bsth.repository.schedule.CarConfigInfoRepository; |
| 8 | import com.bsth.service.schedule.utils.DataToolsProperties; | 6 | import com.bsth.service.schedule.utils.DataToolsProperties; |
| 9 | import org.springframework.beans.factory.annotation.Autowired; | 7 | import org.springframework.beans.factory.annotation.Autowired; |
| @@ -24,11 +22,6 @@ public class CarConfigInfoController extends BaseController<CarConfigInfo, Long> | @@ -24,11 +22,6 @@ public class CarConfigInfoController extends BaseController<CarConfigInfo, Long> | ||
| 24 | @Autowired | 22 | @Autowired |
| 25 | private CarConfigInfoRepository carConfigInfoRepository; | 23 | private CarConfigInfoRepository carConfigInfoRepository; |
| 26 | 24 | ||
| 27 | - @Autowired | ||
| 28 | - private LineRepository lineRepository; | ||
| 29 | - @Autowired | ||
| 30 | - private CarsRepository carsRepository; | ||
| 31 | - | ||
| 32 | @Override | 25 | @Override |
| 33 | protected String getDataImportKtrClasspath() { | 26 | protected String getDataImportKtrClasspath() { |
| 34 | return dataToolsProperties.getCarsconfigDatainputktr(); | 27 | return dataToolsProperties.getCarsconfigDatainputktr(); |
src/main/java/com/bsth/controller/schedule/EmployeeConfigInfoController.java
| @@ -6,9 +6,9 @@ import com.bsth.repository.schedule.EmployeeConfigInfoRepository; | @@ -6,9 +6,9 @@ import com.bsth.repository.schedule.EmployeeConfigInfoRepository; | ||
| 6 | import com.bsth.service.schedule.utils.DataToolsProperties; | 6 | import com.bsth.service.schedule.utils.DataToolsProperties; |
| 7 | import org.springframework.beans.factory.annotation.Autowired; | 7 | import org.springframework.beans.factory.annotation.Autowired; |
| 8 | import org.springframework.boot.context.properties.EnableConfigurationProperties; | 8 | import org.springframework.boot.context.properties.EnableConfigurationProperties; |
| 9 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 10 | -import org.springframework.web.bind.annotation.RequestMethod; | ||
| 11 | -import org.springframework.web.bind.annotation.RestController; | 9 | +import org.springframework.web.bind.annotation.*; |
| 10 | + | ||
| 11 | +import java.util.Map; | ||
| 12 | 12 | ||
| 13 | /** | 13 | /** |
| 14 | * Created by xu on 16/5/10. | 14 | * Created by xu on 16/5/10. |
| @@ -27,15 +27,22 @@ public class EmployeeConfigInfoController extends BaseController<EmployeeConfigI | @@ -27,15 +27,22 @@ public class EmployeeConfigInfoController extends BaseController<EmployeeConfigI | ||
| 27 | return dataToolsProperties.getEmployeesconfigDatainputktr(); | 27 | return dataToolsProperties.getEmployeesconfigDatainputktr(); |
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | + @Override | ||
| 31 | + public EmployeeConfigInfo findById(@PathVariable("id") Long aLong) { | ||
| 32 | + return employeeConfigInfoRepository.findOneExtend(aLong); | ||
| 33 | + } | ||
| 34 | + | ||
| 30 | /** | 35 | /** |
| 31 | - * | ||
| 32 | - * @Title: list | ||
| 33 | - * @Description: TODO(多条件查询) | ||
| 34 | - * @param @param map | 36 | + * 覆写方法,因为form提交的方式参数不全,改用 json形式提交 @RequestBody |
| 37 | + * @Title: save | ||
| 38 | + * @Description: TODO(持久化对象) | ||
| 39 | + * @param @param t | ||
| 40 | + * @param @return 设定文件 | ||
| 41 | + * @return Map<String,Object> {status: 1(成功),-1(失败)} | ||
| 35 | * @throws | 42 | * @throws |
| 36 | */ | 43 | */ |
| 37 | - @RequestMapping(value = "/alljsy", method = RequestMethod.GET) | ||
| 38 | - public Iterable<Object> alljsy(){ | ||
| 39 | - return employeeConfigInfoRepository.findAllJsy(); | 44 | + @RequestMapping(method = RequestMethod.POST) |
| 45 | + public Map<String, Object> save(@RequestBody EmployeeConfigInfo t){ | ||
| 46 | + return baseService.save(t); | ||
| 40 | } | 47 | } |
| 41 | } | 48 | } |
src/main/java/com/bsth/controller/schedule/GuideboardInfoController.java
| @@ -2,9 +2,11 @@ package com.bsth.controller.schedule; | @@ -2,9 +2,11 @@ package com.bsth.controller.schedule; | ||
| 2 | 2 | ||
| 3 | import com.bsth.controller.BaseController; | 3 | import com.bsth.controller.BaseController; |
| 4 | import com.bsth.entity.schedule.GuideboardInfo; | 4 | import com.bsth.entity.schedule.GuideboardInfo; |
| 5 | +import com.bsth.repository.schedule.GuideboardInfoRepository; | ||
| 5 | import com.bsth.service.schedule.utils.DataToolsProperties; | 6 | import com.bsth.service.schedule.utils.DataToolsProperties; |
| 6 | import org.springframework.beans.factory.annotation.Autowired; | 7 | import org.springframework.beans.factory.annotation.Autowired; |
| 7 | import org.springframework.boot.context.properties.EnableConfigurationProperties; | 8 | import org.springframework.boot.context.properties.EnableConfigurationProperties; |
| 9 | +import org.springframework.web.bind.annotation.PathVariable; | ||
| 8 | import org.springframework.web.bind.annotation.RequestMapping; | 10 | import org.springframework.web.bind.annotation.RequestMapping; |
| 9 | import org.springframework.web.bind.annotation.RestController; | 11 | import org.springframework.web.bind.annotation.RestController; |
| 10 | 12 | ||
| @@ -17,9 +19,16 @@ import org.springframework.web.bind.annotation.RestController; | @@ -17,9 +19,16 @@ import org.springframework.web.bind.annotation.RestController; | ||
| 17 | public class GuideboardInfoController extends BaseController<GuideboardInfo, Long> { | 19 | public class GuideboardInfoController extends BaseController<GuideboardInfo, Long> { |
| 18 | @Autowired | 20 | @Autowired |
| 19 | private DataToolsProperties dataToolsProperties; | 21 | private DataToolsProperties dataToolsProperties; |
| 22 | + @Autowired | ||
| 23 | + private GuideboardInfoRepository guideboardInfoRepository; | ||
| 20 | 24 | ||
| 21 | @Override | 25 | @Override |
| 22 | protected String getDataImportKtrClasspath() { | 26 | protected String getDataImportKtrClasspath() { |
| 23 | return dataToolsProperties.getGuideboardsDatainputktr(); | 27 | return dataToolsProperties.getGuideboardsDatainputktr(); |
| 24 | } | 28 | } |
| 29 | + | ||
| 30 | + @Override | ||
| 31 | + public GuideboardInfo findById(@PathVariable("id") Long aLong) { | ||
| 32 | + return guideboardInfoRepository.findOneExtend(aLong); | ||
| 33 | + } | ||
| 25 | } | 34 | } |
src/main/java/com/bsth/entity/schedule/EmployeeConfigInfo.java
| @@ -6,6 +6,7 @@ import com.bsth.entity.Personnel; | @@ -6,6 +6,7 @@ import com.bsth.entity.Personnel; | ||
| 6 | import com.bsth.entity.sys.SysUser; | 6 | import com.bsth.entity.sys.SysUser; |
| 7 | 7 | ||
| 8 | import javax.persistence.*; | 8 | import javax.persistence.*; |
| 9 | +import javax.validation.constraints.NotNull; | ||
| 9 | import java.util.Date; | 10 | import java.util.Date; |
| 10 | 11 | ||
| 11 | /** | 12 | /** |
| @@ -28,19 +29,20 @@ public class EmployeeConfigInfo { | @@ -28,19 +29,20 @@ public class EmployeeConfigInfo { | ||
| 28 | private Long id; | 29 | private Long id; |
| 29 | 30 | ||
| 30 | /** 线路关联 */ | 31 | /** 线路关联 */ |
| 31 | - @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY) | 32 | + @ManyToOne(optional = false, cascade = CascadeType.DETACH, fetch = FetchType.LAZY) |
| 32 | private Line xl; | 33 | private Line xl; |
| 33 | - /** 车辆关联 */ | ||
| 34 | - @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY) | 34 | + /** 车辆关联(TODO:貌似没用了) */ |
| 35 | + @ManyToOne(cascade = CascadeType.DETACH, fetch = FetchType.LAZY) | ||
| 35 | private Cars cl; | 36 | private Cars cl; |
| 36 | /** 人员关联(驾驶员) */ | 37 | /** 人员关联(驾驶员) */ |
| 37 | - @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY) | 38 | + @ManyToOne(optional = false, cascade = CascadeType.DETACH, fetch = FetchType.LAZY) |
| 38 | private Personnel jsy; | 39 | private Personnel jsy; |
| 39 | /** 人员关联(售票员) */ | 40 | /** 人员关联(售票员) */ |
| 40 | - @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY) | 41 | + @ManyToOne(cascade = CascadeType.DETACH, fetch = FetchType.LAZY) |
| 41 | private Personnel spy; | 42 | private Personnel spy; |
| 42 | 43 | ||
| 43 | - /** 搭班编码(TODO:估计是售票员和驾驶员搭配时使用) */ | 44 | + /** 搭班编码(是售票员和驾驶员搭配时使用,同一条线路搭班编码不能重复) */ |
| 45 | + @NotNull | ||
| 44 | private String dbbm; | 46 | private String dbbm; |
| 45 | 47 | ||
| 46 | /** 创建人 */ | 48 | /** 创建人 */ |
src/main/java/com/bsth/entity/schedule/GuideboardInfo.java
| @@ -25,7 +25,7 @@ public class GuideboardInfo { | @@ -25,7 +25,7 @@ public class GuideboardInfo { | ||
| 25 | private Long id; | 25 | private Long id; |
| 26 | 26 | ||
| 27 | /** 线路关联 */ | 27 | /** 线路关联 */ |
| 28 | - @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY) | 28 | + @ManyToOne(optional = false, cascade = CascadeType.DETACH, fetch = FetchType.LAZY) |
| 29 | private Line xl; | 29 | private Line xl; |
| 30 | 30 | ||
| 31 | /** 路牌顺序号 */ | 31 | /** 路牌顺序号 */ |
src/main/java/com/bsth/repository/schedule/EmployeeConfigInfoRepository.java
| 1 | package com.bsth.repository.schedule; | 1 | package com.bsth.repository.schedule; |
| 2 | 2 | ||
| 3 | +import com.bsth.entity.schedule.CarConfigInfo; | ||
| 3 | import com.bsth.entity.schedule.EmployeeConfigInfo; | 4 | import com.bsth.entity.schedule.EmployeeConfigInfo; |
| 4 | import com.bsth.repository.BaseRepository; | 5 | import com.bsth.repository.BaseRepository; |
| 5 | 6 | ||
| @@ -26,7 +27,7 @@ public interface EmployeeConfigInfoRepository extends BaseRepository<EmployeeCon | @@ -26,7 +27,7 @@ public interface EmployeeConfigInfoRepository extends BaseRepository<EmployeeCon | ||
| 26 | @Override | 27 | @Override |
| 27 | Page<EmployeeConfigInfo> findAll(Specification<EmployeeConfigInfo> spec, Pageable pageable); | 28 | Page<EmployeeConfigInfo> findAll(Specification<EmployeeConfigInfo> spec, Pageable pageable); |
| 28 | 29 | ||
| 29 | - // TODO:这里不是标准,是hibernate的map返回,以后改成nativesql查询,然后动态指定返回类型 | ||
| 30 | - @Query("select new map(ec.jsy.personnelName as name, ec.jsy.jobCode as code, ec.jsy.id as id) from EmployeeConfigInfo ec") | ||
| 31 | - List<Object> findAllJsy(); | 30 | + @EntityGraph(value = "employeeConfigInfo_jsy_spy_xl", type = EntityGraph.EntityGraphType.FETCH) |
| 31 | + @Query("select cc from EmployeeConfigInfo cc where cc.id=?1") | ||
| 32 | + EmployeeConfigInfo findOneExtend(Long aLong); | ||
| 32 | } | 33 | } |
src/main/java/com/bsth/repository/schedule/GuideboardInfoRepository.java
| 1 | package com.bsth.repository.schedule; | 1 | package com.bsth.repository.schedule; |
| 2 | 2 | ||
| 3 | +import com.bsth.entity.schedule.EmployeeConfigInfo; | ||
| 3 | import com.bsth.entity.schedule.GuideboardInfo; | 4 | import com.bsth.entity.schedule.GuideboardInfo; |
| 4 | import com.bsth.repository.BaseRepository; | 5 | import com.bsth.repository.BaseRepository; |
| 5 | import org.springframework.data.domain.Page; | 6 | import org.springframework.data.domain.Page; |
| 6 | import org.springframework.data.domain.Pageable; | 7 | import org.springframework.data.domain.Pageable; |
| 7 | import org.springframework.data.jpa.domain.Specification; | 8 | import org.springframework.data.jpa.domain.Specification; |
| 8 | import org.springframework.data.jpa.repository.EntityGraph; | 9 | import org.springframework.data.jpa.repository.EntityGraph; |
| 10 | +import org.springframework.data.jpa.repository.Query; | ||
| 9 | import org.springframework.stereotype.Repository; | 11 | import org.springframework.stereotype.Repository; |
| 10 | 12 | ||
| 11 | /** | 13 | /** |
| @@ -17,4 +19,8 @@ public interface GuideboardInfoRepository extends BaseRepository<GuideboardInfo, | @@ -17,4 +19,8 @@ public interface GuideboardInfoRepository extends BaseRepository<GuideboardInfo, | ||
| 17 | @EntityGraph(value = "guideboardInfo_xl", type = EntityGraph.EntityGraphType.FETCH) | 19 | @EntityGraph(value = "guideboardInfo_xl", type = EntityGraph.EntityGraphType.FETCH) |
| 18 | @Override | 20 | @Override |
| 19 | Page<GuideboardInfo> findAll(Specification<GuideboardInfo> spec, Pageable pageable); | 21 | Page<GuideboardInfo> findAll(Specification<GuideboardInfo> spec, Pageable pageable); |
| 22 | + | ||
| 23 | + @EntityGraph(value = "guideboardInfo_xl", type = EntityGraph.EntityGraphType.FETCH) | ||
| 24 | + @Query("select cc from GuideboardInfo cc where cc.id=?1") | ||
| 25 | + GuideboardInfo findOneExtend(Long aLong); | ||
| 20 | } | 26 | } |
src/main/resources/static/pages/scheduleApp/module/core/busConfig/busConfig.js
| @@ -239,23 +239,21 @@ angular.module('ScheduleApp').controller('BusConfigFormCtrl', ['BusConfigService | @@ -239,23 +239,21 @@ angular.module('ScheduleApp').controller('BusConfigFormCtrl', ['BusConfigService | ||
| 239 | self.busConfigForSave.cl["id"] = self.busConfigForSave["cl_id"]; | 239 | self.busConfigForSave.cl["id"] = self.busConfigForSave["cl_id"]; |
| 240 | delete self.busConfigForSave["cl_id"]; | 240 | delete self.busConfigForSave["cl_id"]; |
| 241 | 241 | ||
| 242 | - | ||
| 243 | - | ||
| 244 | - //busConfigService.saveDetail(self.busConfigForSave).then( | ||
| 245 | - // function(result) { | ||
| 246 | - // // TODO:弹出框方式以后改 | ||
| 247 | - // if (result.status == 'SUCCESS') { | ||
| 248 | - // alert("保存成功!"); | ||
| 249 | - // $state.go("busConfig"); | ||
| 250 | - // } else { | ||
| 251 | - // alert("保存异常!"); | ||
| 252 | - // } | ||
| 253 | - // }, | ||
| 254 | - // function(result) { | ||
| 255 | - // // TODO:弹出框方式以后改 | ||
| 256 | - // alert("出错啦!"); | ||
| 257 | - // } | ||
| 258 | - //); | 242 | + busConfigService.saveDetail(self.busConfigForSave).then( |
| 243 | + function(result) { | ||
| 244 | + // TODO:弹出框方式以后改 | ||
| 245 | + if (result.status == 'SUCCESS') { | ||
| 246 | + alert("保存成功!"); | ||
| 247 | + $state.go("busConfig"); | ||
| 248 | + } else { | ||
| 249 | + alert("保存异常!"); | ||
| 250 | + } | ||
| 251 | + }, | ||
| 252 | + function(result) { | ||
| 253 | + // TODO:弹出框方式以后改 | ||
| 254 | + alert("出错啦!"); | ||
| 255 | + } | ||
| 256 | + ); | ||
| 259 | }; | 257 | }; |
| 260 | }]); | 258 | }]); |
| 261 | 259 |
src/main/resources/static/pages/scheduleApp/module/core/busConfig/edit.html
| @@ -145,7 +145,7 @@ | @@ -145,7 +145,7 @@ | ||
| 145 | myForm.qyrq.$error.required || | 145 | myForm.qyrq.$error.required || |
| 146 | myForm.tcd.$error.required" | 146 | myForm.tcd.$error.required" |
| 147 | ><i class="fa fa-check"></i> 提交</button> | 147 | ><i class="fa fa-check"></i> 提交</button> |
| 148 | - <a type="button" class="btn default" ui-sref="busInfoManage" ><i class="fa fa-times"></i> 取消</a> | 148 | + <a type="button" class="btn default" ui-sref="busConfig" ><i class="fa fa-times"></i> 取消</a> |
| 149 | </div> | 149 | </div> |
| 150 | </div> | 150 | </div> |
| 151 | </div> | 151 | </div> |
src/main/resources/static/pages/scheduleApp/module/core/busConfig/form.html
| @@ -145,7 +145,7 @@ | @@ -145,7 +145,7 @@ | ||
| 145 | myForm.qyrq.$error.required || | 145 | myForm.qyrq.$error.required || |
| 146 | myForm.tcd.$error.required" | 146 | myForm.tcd.$error.required" |
| 147 | ><i class="fa fa-check"></i> 提交</button> | 147 | ><i class="fa fa-check"></i> 提交</button> |
| 148 | - <a type="button" class="btn default" ui-sref="busInfoManage" ><i class="fa fa-times"></i> 取消</a> | 148 | + <a type="button" class="btn default" ui-sref="busConfig" ><i class="fa fa-times"></i> 取消</a> |
| 149 | </div> | 149 | </div> |
| 150 | </div> | 150 | </div> |
| 151 | </div> | 151 | </div> |
src/main/resources/static/pages/scheduleApp/module/core/busConfig/list.html
| @@ -7,7 +7,6 @@ | @@ -7,7 +7,6 @@ | ||
| 7 | <input type="checkbox" class="group-checkable"/> | 7 | <input type="checkbox" class="group-checkable"/> |
| 8 | </th> | 8 | </th> |
| 9 | <th>序号</th> | 9 | <th>序号</th> |
| 10 | - <th>所在公司</th> | ||
| 11 | <th>线路</th> | 10 | <th>线路</th> |
| 12 | <th>内部编号</th> | 11 | <th>内部编号</th> |
| 13 | <th>启用日期</th> | 12 | <th>启用日期</th> |
| @@ -20,16 +19,6 @@ | @@ -20,16 +19,6 @@ | ||
| 20 | <td></td> | 19 | <td></td> |
| 21 | <td> | 20 | <td> |
| 22 | <div style="width: 150px"> | 21 | <div style="width: 150px"> |
| 23 | - <sa-Select model="ctrl.searchCondition()" | ||
| 24 | - dicgroup="gsType" | ||
| 25 | - placeholder="请选择..." | ||
| 26 | - name="gs" | ||
| 27 | - codename="cl.businessCode_eq"> | ||
| 28 | - </sa-Select> | ||
| 29 | - </div> | ||
| 30 | - </td> | ||
| 31 | - <td> | ||
| 32 | - <div style="width: 150px"> | ||
| 33 | <sa-Select2 model="ctrl.searchCondition()" | 22 | <sa-Select2 model="ctrl.searchCondition()" |
| 34 | type="xl" | 23 | type="xl" |
| 35 | modelcolname1="xl.lineCode_eq" | 24 | modelcolname1="xl.lineCode_eq" |
| @@ -67,9 +56,6 @@ | @@ -67,9 +56,6 @@ | ||
| 67 | <span ng-bind="$index + 1"></span> | 56 | <span ng-bind="$index + 1"></span> |
| 68 | </td> | 57 | </td> |
| 69 | <td> | 58 | <td> |
| 70 | - <span ng-bind="info.cl.company"></span> | ||
| 71 | - </td> | ||
| 72 | - <td> | ||
| 73 | <span ng-bind="info.xl.name"></span> | 59 | <span ng-bind="info.xl.name"></span> |
| 74 | </td> | 60 | </td> |
| 75 | <td> | 61 | <td> |
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/detail.html
| 1 | -<h1>TODO</h1> | ||
| 2 | \ No newline at end of file | 1 | \ No newline at end of file |
| 2 | +<div class="page-head"> | ||
| 3 | + <div class="page-title"> | ||
| 4 | + <h1>人员配置管理</h1> | ||
| 5 | + </div> | ||
| 6 | +</div> | ||
| 7 | + | ||
| 8 | +<ul class="page-breadcrumb breadcrumb"> | ||
| 9 | + <li> | ||
| 10 | + <a href="/pages/home.html" data-pjax>首页</a> | ||
| 11 | + <i class="fa fa-circle"></i> | ||
| 12 | + </li> | ||
| 13 | + <li> | ||
| 14 | + <span class="active">运营计划管理</span> | ||
| 15 | + <i class="fa fa-circle"></i> | ||
| 16 | + </li> | ||
| 17 | + <li> | ||
| 18 | + <a ui-sref="employeeConfig">人员配置管理</a> | ||
| 19 | + <i class="fa fa-circle"></i> | ||
| 20 | + </li> | ||
| 21 | + <li> | ||
| 22 | + <span class="active">人员配置详细信息</span> | ||
| 23 | + </li> | ||
| 24 | +</ul> | ||
| 25 | + | ||
| 26 | +<div class="portlet light bordered" ng-controller="EmployeeConfigDetailCtrl as ctrl"> | ||
| 27 | + <div class="portlet-title"> | ||
| 28 | + <div class="caption"> | ||
| 29 | + <i class="icon-equalizer font-red-sunglo"></i> <span | ||
| 30 | + class="caption-subject font-red-sunglo bold uppercase" | ||
| 31 | + ng-bind="ctrl.title"></span> | ||
| 32 | + </div> | ||
| 33 | + </div> | ||
| 34 | + | ||
| 35 | + <div class="portlet-body form"> | ||
| 36 | + <form class="form-horizontal" novalidate name="myForm"> | ||
| 37 | + <!--<div class="alert alert-danger display-hide">--> | ||
| 38 | + <!--<button class="close" data-close="alert"></button>--> | ||
| 39 | + <!--您的输入有误,请检查下面的输入项--> | ||
| 40 | + <!--</div>--> | ||
| 41 | + | ||
| 42 | + | ||
| 43 | + <!-- 其他信息放置在这里 --> | ||
| 44 | + <div class="form-body"> | ||
| 45 | + <div class="form-group has-success has-feedback"> | ||
| 46 | + <label class="col-md-2 control-label">线路*:</label> | ||
| 47 | + <div class="col-md-3"> | ||
| 48 | + <input type="text" class="form-control" | ||
| 49 | + name="xl" ng-model="ctrl.employeeConfigForDetail.xl.name" readonly/> | ||
| 50 | + </div> | ||
| 51 | + </div> | ||
| 52 | + <div class="form-group has-success has-feedback"> | ||
| 53 | + <label class="col-md-2 control-label">搭班编码*:</label> | ||
| 54 | + <div class="col-md-3"> | ||
| 55 | + <input type="text" class="form-control" | ||
| 56 | + name="dbbm" ng-model="ctrl.employeeConfigForDetail.dbbm" readonly/> | ||
| 57 | + </div> | ||
| 58 | + </div> | ||
| 59 | + | ||
| 60 | + <div class="form-group has-success has-feedback"> | ||
| 61 | + <label class="col-md-2 control-label">驾驶员姓名*:</label> | ||
| 62 | + <div class="col-md-3"> | ||
| 63 | + <input type="text" class="form-control" name="jsy_name" | ||
| 64 | + ng-model="ctrl.employeeConfigForDetail.jsy.personnelName" readonly/> | ||
| 65 | + </div> | ||
| 66 | + </div> | ||
| 67 | + | ||
| 68 | + <div class="form-group has-success has-feedback"> | ||
| 69 | + <label class="col-md-2 control-label">驾驶员工号*:</label> | ||
| 70 | + <div class="col-md-3"> | ||
| 71 | + <input type="text" class="form-control" name="jsy_code" | ||
| 72 | + ng-model="ctrl.employeeConfigForDetail.jsy.jobCode" readonly/> | ||
| 73 | + </div> | ||
| 74 | + </div> | ||
| 75 | + | ||
| 76 | + <div class="form-group has-success has-feedback"> | ||
| 77 | + <label class="col-md-2 control-label">售票员姓名:</label> | ||
| 78 | + <div class="col-md-3"> | ||
| 79 | + <input type="text" class="form-control" name="spy_name" | ||
| 80 | + ng-model="ctrl.employeeConfigForDetail.spy.personnelName" readonly/> | ||
| 81 | + </div> | ||
| 82 | + </div> | ||
| 83 | + | ||
| 84 | + <div class="form-group has-success has-feedback"> | ||
| 85 | + <label class="col-md-2 control-label">售票员工号:</label> | ||
| 86 | + <div class="col-md-3"> | ||
| 87 | + <input type="text" class="form-control" name="spy_code" | ||
| 88 | + ng-model="ctrl.employeeConfigForDetail.spy.jobCode" readonly/> | ||
| 89 | + </div> | ||
| 90 | + </div> | ||
| 91 | + | ||
| 92 | + | ||
| 93 | + <!-- 其他form-group --> | ||
| 94 | + | ||
| 95 | + </div> | ||
| 96 | + | ||
| 97 | + </form> | ||
| 98 | + | ||
| 99 | + </div> | ||
| 100 | +</div> | ||
| 3 | \ No newline at end of file | 101 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/edit.html
| 1 | -<h1>TODO</h1> | ||
| 2 | \ No newline at end of file | 1 | \ No newline at end of file |
| 2 | +<div class="page-head"> | ||
| 3 | + <div class="page-title"> | ||
| 4 | + <h1>人员配置管理</h1> | ||
| 5 | + </div> | ||
| 6 | +</div> | ||
| 7 | + | ||
| 8 | +<ul class="page-breadcrumb breadcrumb"> | ||
| 9 | + <li> | ||
| 10 | + <a href="/pages/home.html" data-pjax>首页</a> | ||
| 11 | + <i class="fa fa-circle"></i> | ||
| 12 | + </li> | ||
| 13 | + <li> | ||
| 14 | + <span class="active">运营计划管理</span> | ||
| 15 | + <i class="fa fa-circle"></i> | ||
| 16 | + </li> | ||
| 17 | + <li> | ||
| 18 | + <a ui-sref="employeeConfig">人员配置管理</a> | ||
| 19 | + <i class="fa fa-circle"></i> | ||
| 20 | + </li> | ||
| 21 | + <li> | ||
| 22 | + <span class="active">修改人员配置信息</span> | ||
| 23 | + </li> | ||
| 24 | +</ul> | ||
| 25 | + | ||
| 26 | +<div class="portlet light bordered" ng-controller="EmployeeConfigFormCtrl as ctrl"> | ||
| 27 | + <div class="portlet-title"> | ||
| 28 | + <div class="caption"> | ||
| 29 | + <i class="icon-equalizer font-red-sunglo"></i> <span | ||
| 30 | + class="caption-subject font-red-sunglo bold uppercase">表单</span> | ||
| 31 | + </div> | ||
| 32 | + </div> | ||
| 33 | + | ||
| 34 | + <div class="portlet-body form"> | ||
| 35 | + <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm"> | ||
| 36 | + <!--<div class="alert alert-danger display-hide">--> | ||
| 37 | + <!--<button class="close" data-close="alert"></button>--> | ||
| 38 | + <!--您的输入有误,请检查下面的输入项--> | ||
| 39 | + <!--</div>--> | ||
| 40 | + | ||
| 41 | + | ||
| 42 | + <!-- 其他信息放置在这里 --> | ||
| 43 | + <div class="form-body"> | ||
| 44 | + <div class="form-group has-success has-feedback"> | ||
| 45 | + <label class="col-md-2 control-label">线路*:</label> | ||
| 46 | + <div class="col-md-3"> | ||
| 47 | + <sa-Select2 model="ctrl.employeeConfigForSave" | ||
| 48 | + name="xl" | ||
| 49 | + required="true" | ||
| 50 | + type="xl" | ||
| 51 | + modelcolname1="xl_id" | ||
| 52 | + datacolname1="id" | ||
| 53 | + showcolname="name" | ||
| 54 | + placeholder="请输拼音..."> | ||
| 55 | + </sa-Select2> | ||
| 56 | + </div> | ||
| 57 | + <!-- 隐藏块,显示验证信息 --> | ||
| 58 | + <div class="alert alert-danger well-sm" ng-show="myForm.xl.$error.required"> | ||
| 59 | + 线路必须选择 | ||
| 60 | + </div> | ||
| 61 | + </div> | ||
| 62 | + | ||
| 63 | + <div class="form-group"> | ||
| 64 | + <label class="col-md-2 control-label">搭班编码*:</label> | ||
| 65 | + <div class="col-md-3"> | ||
| 66 | + <input type="text" class="form-control" name="dbbm" ng-model="ctrl.employeeConfigForSave.dbbm" required | ||
| 67 | + placeholder="请输入搭班编码"/> | ||
| 68 | + </div> | ||
| 69 | + <!-- 隐藏块,显示验证信息 --> | ||
| 70 | + <div class="alert alert-danger well-sm" ng-show="myForm.dbbm.$error.required"> | ||
| 71 | + 搭班编码必须填写 | ||
| 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 | + <sa-Select2 model="ctrl.employeeConfigForSave" | ||
| 79 | + name="jsy" | ||
| 80 | + required="true" | ||
| 81 | + type="ry" | ||
| 82 | + modelcolname1="jsy_id" | ||
| 83 | + datacolname1="id" | ||
| 84 | + showcolname="personnelName" | ||
| 85 | + placeholder="请输拼音..."> | ||
| 86 | + </sa-Select2> | ||
| 87 | + </div> | ||
| 88 | + <!-- 隐藏块,显示验证信息 --> | ||
| 89 | + <div class="alert alert-danger well-sm" ng-show="myForm.jsy.$error.required"> | ||
| 90 | + 驾驶员必须选择 | ||
| 91 | + </div> | ||
| 92 | + </div> | ||
| 93 | + | ||
| 94 | + <div class="form-group has-success has-feedback"> | ||
| 95 | + <label class="col-md-2 control-label">售票员*:</label> | ||
| 96 | + <div class="col-md-3"> | ||
| 97 | + <sa-Select2 model="ctrl.employeeConfigForSave" | ||
| 98 | + name="spy" | ||
| 99 | + type="ry" | ||
| 100 | + modelcolname1="spy_id" | ||
| 101 | + datacolname1="id" | ||
| 102 | + showcolname="personnelName" | ||
| 103 | + placeholder="请输拼音..."> | ||
| 104 | + </sa-Select2> | ||
| 105 | + </div> | ||
| 106 | + </div> | ||
| 107 | + | ||
| 108 | + <!-- 其他form-group --> | ||
| 109 | + | ||
| 110 | + </div> | ||
| 111 | + | ||
| 112 | + <!-- TODO:!myForm.$valid 在这里有点问题,改用以下方法验证 --> | ||
| 113 | + <div class="form-actions"> | ||
| 114 | + <div class="row"> | ||
| 115 | + <div class="col-md-offset-3 col-md-4"> | ||
| 116 | + <button type="submit" class="btn green" | ||
| 117 | + ng-disabled="myForm.xl.$error.required || | ||
| 118 | + myForm.dbbm.$error.required || | ||
| 119 | + myForm.jsy.$error.required || | ||
| 120 | + myForm.spy.$error.required" | ||
| 121 | + ><i class="fa fa-check"></i> 提交</button> | ||
| 122 | + <a type="button" class="btn default" ui-sref="employeeConfig" ><i class="fa fa-times"></i> 取消</a> | ||
| 123 | + </div> | ||
| 124 | + </div> | ||
| 125 | + </div> | ||
| 126 | + | ||
| 127 | + </form> | ||
| 128 | + | ||
| 129 | + </div> | ||
| 130 | + | ||
| 131 | + | ||
| 132 | +</div> | ||
| 3 | \ No newline at end of file | 133 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/employeeConfig.js
| @@ -39,7 +39,7 @@ angular.module('ScheduleApp').factory('EmployeeConfigService', ['EmployeeConfigS | @@ -39,7 +39,7 @@ angular.module('ScheduleApp').factory('EmployeeConfigService', ['EmployeeConfigS | ||
| 39 | getPage: function() { | 39 | getPage: function() { |
| 40 | var params = currentSearchCondition; // 查询条件 | 40 | var params = currentSearchCondition; // 查询条件 |
| 41 | params.page = currentPageNo - 1; // 服务端页码从0开始 | 41 | params.page = currentPageNo - 1; // 服务端页码从0开始 |
| 42 | - return service.list(params).$promise; | 42 | + return service.rest.list(params).$promise; |
| 43 | }, | 43 | }, |
| 44 | /** | 44 | /** |
| 45 | * 获取明细信息。 | 45 | * 获取明细信息。 |
| @@ -48,7 +48,7 @@ angular.module('ScheduleApp').factory('EmployeeConfigService', ['EmployeeConfigS | @@ -48,7 +48,7 @@ angular.module('ScheduleApp').factory('EmployeeConfigService', ['EmployeeConfigS | ||
| 48 | */ | 48 | */ |
| 49 | getDetail: function(id) { | 49 | getDetail: function(id) { |
| 50 | var params = {id: id}; | 50 | var params = {id: id}; |
| 51 | - return service.get(params).$promise; | 51 | + return service.rest.get(params).$promise; |
| 52 | }, | 52 | }, |
| 53 | /** | 53 | /** |
| 54 | * 保存信息。 | 54 | * 保存信息。 |
| @@ -56,7 +56,7 @@ angular.module('ScheduleApp').factory('EmployeeConfigService', ['EmployeeConfigS | @@ -56,7 +56,7 @@ angular.module('ScheduleApp').factory('EmployeeConfigService', ['EmployeeConfigS | ||
| 56 | * @return 返回一个 promise | 56 | * @return 返回一个 promise |
| 57 | */ | 57 | */ |
| 58 | saveDetail: function(obj) { | 58 | saveDetail: function(obj) { |
| 59 | - return service.save(obj).$promise; | 59 | + return service.rest.save(obj).$promise; |
| 60 | } | 60 | } |
| 61 | }; | 61 | }; |
| 62 | }]); | 62 | }]); |
| @@ -184,10 +184,88 @@ angular.module('ScheduleApp').controller('EmployeeConfigListCtrl', ['EmployeeCon | @@ -184,10 +184,88 @@ angular.module('ScheduleApp').controller('EmployeeConfigListCtrl', ['EmployeeCon | ||
| 184 | }]); | 184 | }]); |
| 185 | 185 | ||
| 186 | angular.module('ScheduleApp').controller('EmployeeConfigFormCtrl', ['EmployeeConfigService', '$stateParams', '$state', function(employeeConfigService, $stateParams, $state) { | 186 | angular.module('ScheduleApp').controller('EmployeeConfigFormCtrl', ['EmployeeConfigService', '$stateParams', '$state', function(employeeConfigService, $stateParams, $state) { |
| 187 | - // TODO: | 187 | + var self = this; |
| 188 | + | ||
| 189 | + // 欲保存的busInfo信息,绑定 | ||
| 190 | + self.employeeConfigForSave = {}; | ||
| 191 | + | ||
| 192 | + // 获取传过来的id,有的话就是修改,获取一遍数据 | ||
| 193 | + var id = $stateParams.id; | ||
| 194 | + if (id) { | ||
| 195 | + self.employeeConfigForSave.id = id; | ||
| 196 | + employeeConfigService.getDetail(id).then( | ||
| 197 | + function(result) { | ||
| 198 | + var key; | ||
| 199 | + for (key in result) { | ||
| 200 | + self.employeeConfigForSave[key] = result[key]; | ||
| 201 | + } | ||
| 202 | + | ||
| 203 | + // 添加xl_id,jsy_id,spy_id | ||
| 204 | + self.employeeConfigForSave["xl_id"] = self.employeeConfigForSave.xl.id; | ||
| 205 | + self.employeeConfigForSave["jsy_id"] = self.employeeConfigForSave.jsy.id; | ||
| 206 | + self.employeeConfigForSave["spy_id"] = | ||
| 207 | + self.employeeConfigForSave.spy || self.employeeConfigForSave.spy.id; | ||
| 208 | + | ||
| 209 | + }, | ||
| 210 | + function(result) { | ||
| 211 | + alert("出错啦!"); | ||
| 212 | + } | ||
| 213 | + ); | ||
| 214 | + } | ||
| 215 | + | ||
| 216 | + // 提交方法 | ||
| 217 | + self.submit = function() { | ||
| 218 | + console.log(self.employeeConfigForSave); | ||
| 219 | + | ||
| 220 | + // jsy_id,cl_id要组织成对象,然后删除 | ||
| 221 | + self.employeeConfigForSave["xl"] = {}; | ||
| 222 | + self.employeeConfigForSave.xl["id"] = self.employeeConfigForSave["xl_id"]; | ||
| 223 | + delete self.employeeConfigForSave["xl_id"]; | ||
| 224 | + self.employeeConfigForSave["jsy"] = {}; | ||
| 225 | + self.employeeConfigForSave.jsy["id"] = self.employeeConfigForSave["jsy_id"]; | ||
| 226 | + delete self.employeeConfigForSave["jsy_id"]; | ||
| 227 | + self.employeeConfigForSave["spy"] = {}; | ||
| 228 | + self.employeeConfigForSave.spy["id"] = self.employeeConfigForSave["spy_id"]; | ||
| 229 | + delete self.employeeConfigForSave["spy_id"]; | ||
| 230 | + | ||
| 231 | + employeeConfigService.saveDetail(self.employeeConfigForSave).then( | ||
| 232 | + function(result) { | ||
| 233 | + // TODO:弹出框方式以后改 | ||
| 234 | + if (result.status == 'SUCCESS') { | ||
| 235 | + alert("保存成功!"); | ||
| 236 | + $state.go("employeeConfig"); | ||
| 237 | + } else { | ||
| 238 | + alert("保存异常!"); | ||
| 239 | + } | ||
| 240 | + }, | ||
| 241 | + function(result) { | ||
| 242 | + // TODO:弹出框方式以后改 | ||
| 243 | + alert("出错啦!"); | ||
| 244 | + } | ||
| 245 | + ); | ||
| 246 | + }; | ||
| 188 | }]); | 247 | }]); |
| 189 | 248 | ||
| 190 | angular.module('ScheduleApp').controller('EmployeeConfigDetailCtrl', ['EmployeeConfigService', '$stateParams', function(employeeConfigService, $stateParams) { | 249 | angular.module('ScheduleApp').controller('EmployeeConfigDetailCtrl', ['EmployeeConfigService', '$stateParams', function(employeeConfigService, $stateParams) { |
| 191 | - // TODO: | 250 | + var self = this; |
| 251 | + self.title = ""; | ||
| 252 | + self.employeeConfigForDetail = {}; | ||
| 253 | + self.employeeConfigForDetail.id = $stateParams.id; | ||
| 254 | + | ||
| 255 | + // 当转向到此页面时,就获取明细信息并绑定 | ||
| 256 | + employeeConfigService.getDetail($stateParams.id).then( | ||
| 257 | + function(result) { | ||
| 258 | + var key; | ||
| 259 | + for (key in result) { | ||
| 260 | + self.employeeConfigForDetail[key] = result[key]; | ||
| 261 | + } | ||
| 262 | + | ||
| 263 | + self.title = "驾驶员 " + self.employeeConfigForDetail.jsy.personnelName + " 配置详细信息"; | ||
| 264 | + }, | ||
| 265 | + function(result) { | ||
| 266 | + // TODO:弹出框方式以后改 | ||
| 267 | + alert("出错啦!"); | ||
| 268 | + } | ||
| 269 | + ); | ||
| 192 | }]); | 270 | }]); |
| 193 | 271 |
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/form.html
| 1 | -<h1>TODO</h1> | ||
| 2 | \ No newline at end of file | 1 | \ No newline at end of file |
| 2 | +<div class="page-head"> | ||
| 3 | + <div class="page-title"> | ||
| 4 | + <h1>人员配置管理</h1> | ||
| 5 | + </div> | ||
| 6 | +</div> | ||
| 7 | + | ||
| 8 | +<ul class="page-breadcrumb breadcrumb"> | ||
| 9 | + <li> | ||
| 10 | + <a href="/pages/home.html" data-pjax>首页</a> | ||
| 11 | + <i class="fa fa-circle"></i> | ||
| 12 | + </li> | ||
| 13 | + <li> | ||
| 14 | + <span class="active">运营计划管理</span> | ||
| 15 | + <i class="fa fa-circle"></i> | ||
| 16 | + </li> | ||
| 17 | + <li> | ||
| 18 | + <a ui-sref="employeeConfig">人员配置管理</a> | ||
| 19 | + <i class="fa fa-circle"></i> | ||
| 20 | + </li> | ||
| 21 | + <li> | ||
| 22 | + <span class="active">添加人员配置信息</span> | ||
| 23 | + </li> | ||
| 24 | +</ul> | ||
| 25 | + | ||
| 26 | +<div class="portlet light bordered" ng-controller="EmployeeConfigFormCtrl as ctrl"> | ||
| 27 | + <div class="portlet-title"> | ||
| 28 | + <div class="caption"> | ||
| 29 | + <i class="icon-equalizer font-red-sunglo"></i> <span | ||
| 30 | + class="caption-subject font-red-sunglo bold uppercase">表单</span> | ||
| 31 | + </div> | ||
| 32 | + </div> | ||
| 33 | + | ||
| 34 | + <div class="portlet-body form"> | ||
| 35 | + <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm"> | ||
| 36 | + <!--<div class="alert alert-danger display-hide">--> | ||
| 37 | + <!--<button class="close" data-close="alert"></button>--> | ||
| 38 | + <!--您的输入有误,请检查下面的输入项--> | ||
| 39 | + <!--</div>--> | ||
| 40 | + | ||
| 41 | + | ||
| 42 | + <!-- 其他信息放置在这里 --> | ||
| 43 | + <div class="form-body"> | ||
| 44 | + <div class="form-group has-success has-feedback"> | ||
| 45 | + <label class="col-md-2 control-label">线路*:</label> | ||
| 46 | + <div class="col-md-3"> | ||
| 47 | + <sa-Select2 model="ctrl.employeeConfigForSave" | ||
| 48 | + name="xl" | ||
| 49 | + required="true" | ||
| 50 | + type="xl" | ||
| 51 | + modelcolname1="xl_id" | ||
| 52 | + datacolname1="id" | ||
| 53 | + showcolname="name" | ||
| 54 | + placeholder="请输拼音..."> | ||
| 55 | + </sa-Select2> | ||
| 56 | + </div> | ||
| 57 | + <!-- 隐藏块,显示验证信息 --> | ||
| 58 | + <div class="alert alert-danger well-sm" ng-show="myForm.xl.$error.required"> | ||
| 59 | + 线路必须选择 | ||
| 60 | + </div> | ||
| 61 | + </div> | ||
| 62 | + | ||
| 63 | + <div class="form-group"> | ||
| 64 | + <label class="col-md-2 control-label">搭班编码*:</label> | ||
| 65 | + <div class="col-md-3"> | ||
| 66 | + <input type="text" class="form-control" name="dbbm" ng-model="ctrl.employeeConfigForSave.dbbm" required | ||
| 67 | + placeholder="请输入搭班编码"/> | ||
| 68 | + </div> | ||
| 69 | + <!-- 隐藏块,显示验证信息 --> | ||
| 70 | + <div class="alert alert-danger well-sm" ng-show="myForm.dbbm.$error.required"> | ||
| 71 | + 搭班编码必须填写 | ||
| 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 | + <sa-Select2 model="ctrl.employeeConfigForSave" | ||
| 79 | + name="jsy" | ||
| 80 | + required="true" | ||
| 81 | + type="ry" | ||
| 82 | + modelcolname1="jsy_id" | ||
| 83 | + datacolname1="id" | ||
| 84 | + showcolname="personnelName" | ||
| 85 | + placeholder="请输拼音..."> | ||
| 86 | + </sa-Select2> | ||
| 87 | + </div> | ||
| 88 | + <!-- 隐藏块,显示验证信息 --> | ||
| 89 | + <div class="alert alert-danger well-sm" ng-show="myForm.jsy.$error.required"> | ||
| 90 | + 驾驶员必须选择 | ||
| 91 | + </div> | ||
| 92 | + </div> | ||
| 93 | + | ||
| 94 | + <div class="form-group has-success has-feedback"> | ||
| 95 | + <label class="col-md-2 control-label">售票员*:</label> | ||
| 96 | + <div class="col-md-3"> | ||
| 97 | + <sa-Select2 model="ctrl.employeeConfigForSave" | ||
| 98 | + name="spy" | ||
| 99 | + type="ry" | ||
| 100 | + modelcolname1="spy_id" | ||
| 101 | + datacolname1="id" | ||
| 102 | + showcolname="personnelName" | ||
| 103 | + placeholder="请输拼音..."> | ||
| 104 | + </sa-Select2> | ||
| 105 | + </div> | ||
| 106 | + </div> | ||
| 107 | + | ||
| 108 | + <!-- 其他form-group --> | ||
| 109 | + | ||
| 110 | + </div> | ||
| 111 | + | ||
| 112 | + <!-- TODO:!myForm.$valid 在这里有点问题,改用以下方法验证 --> | ||
| 113 | + <div class="form-actions"> | ||
| 114 | + <div class="row"> | ||
| 115 | + <div class="col-md-offset-3 col-md-4"> | ||
| 116 | + <button type="submit" class="btn green" | ||
| 117 | + ng-disabled="myForm.xl.$error.required || | ||
| 118 | + myForm.dbbm.$error.required || | ||
| 119 | + myForm.jsy.$error.required || | ||
| 120 | + myForm.spy.$error.required" | ||
| 121 | + ><i class="fa fa-check"></i> 提交</button> | ||
| 122 | + <a type="button" class="btn default" ui-sref="employeeConfig" ><i class="fa fa-times"></i> 取消</a> | ||
| 123 | + </div> | ||
| 124 | + </div> | ||
| 125 | + </div> | ||
| 126 | + | ||
| 127 | + </form> | ||
| 128 | + | ||
| 129 | + </div> | ||
| 130 | + | ||
| 131 | + | ||
| 132 | +</div> | ||
| 3 | \ No newline at end of file | 133 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/list.html
| @@ -7,7 +7,6 @@ | @@ -7,7 +7,6 @@ | ||
| 7 | <input type="checkbox" class="group-checkable"/> | 7 | <input type="checkbox" class="group-checkable"/> |
| 8 | </th> | 8 | </th> |
| 9 | <th>序号</th> | 9 | <th>序号</th> |
| 10 | - <th>所在公司</th> | ||
| 11 | <th>线路</th> | 10 | <th>线路</th> |
| 12 | <th>搭班编码</th> | 11 | <th>搭班编码</th> |
| 13 | <th>驾驶员工号</th> | 12 | <th>驾驶员工号</th> |
| @@ -21,16 +20,6 @@ | @@ -21,16 +20,6 @@ | ||
| 21 | <td></td> | 20 | <td></td> |
| 22 | <td> | 21 | <td> |
| 23 | <div style="width: 150px"> | 22 | <div style="width: 150px"> |
| 24 | - <sa-Select model="ctrl.searchCondition()" | ||
| 25 | - dicgroup="gsType" | ||
| 26 | - placeholder="请选择..." | ||
| 27 | - name="gs" | ||
| 28 | - codename="jsy.companyCode_eq"> | ||
| 29 | - </sa-Select> | ||
| 30 | - </div> | ||
| 31 | - </td> | ||
| 32 | - <td> | ||
| 33 | - <div style="width: 150px"> | ||
| 34 | <sa-Select2 model="ctrl.searchCondition()" | 23 | <sa-Select2 model="ctrl.searchCondition()" |
| 35 | type="xl" | 24 | type="xl" |
| 36 | modelcolname1="xl.lineCode_eq" | 25 | modelcolname1="xl.lineCode_eq" |
| @@ -44,15 +33,8 @@ | @@ -44,15 +33,8 @@ | ||
| 44 | <td></td> | 33 | <td></td> |
| 45 | <td> | 34 | <td> |
| 46 | <div style="width: 180px"> | 35 | <div style="width: 180px"> |
| 47 | - <!--<sa-Select2 model="ctrl.searchCondition()"--> | ||
| 48 | - <!--type="ry"--> | ||
| 49 | - <!--modelcolname1="jsy.id_eq"--> | ||
| 50 | - <!--datacolname1="id"--> | ||
| 51 | - <!--showcolname="name"--> | ||
| 52 | - <!--placeholder="请输拼音...">--> | ||
| 53 | - <!--</sa-Select2>--> | ||
| 54 | <sa-Select2 model="ctrl.searchCondition()" | 36 | <sa-Select2 model="ctrl.searchCondition()" |
| 55 | - type="ry2" | 37 | + type="ry" |
| 56 | modelcolname1="jsy.id_eq" | 38 | modelcolname1="jsy.id_eq" |
| 57 | datacolname1="id" | 39 | datacolname1="id" |
| 58 | showcolname="personnelName" | 40 | showcolname="personnelName" |
| @@ -84,9 +66,6 @@ | @@ -84,9 +66,6 @@ | ||
| 84 | <span ng-bind="$index + 1"></span> | 66 | <span ng-bind="$index + 1"></span> |
| 85 | </td> | 67 | </td> |
| 86 | <td> | 68 | <td> |
| 87 | - <span ng-bind="info.jsy.company"></span> | ||
| 88 | - </td> | ||
| 89 | - <td> | ||
| 90 | <span ng-bind="info.xl.name"></span> | 69 | <span ng-bind="info.xl.name"></span> |
| 91 | </td> | 70 | </td> |
| 92 | <td> | 71 | <td> |
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/detail.html
| 1 | -<h1>TODO</h1> | ||
| 2 | \ No newline at end of file | 1 | \ No newline at end of file |
| 2 | +<div class="page-head"> | ||
| 3 | + <div class="page-title"> | ||
| 4 | + <h1>路牌管理</h1> | ||
| 5 | + </div> | ||
| 6 | +</div> | ||
| 7 | + | ||
| 8 | +<ul class="page-breadcrumb breadcrumb"> | ||
| 9 | + <li> | ||
| 10 | + <a href="/pages/home.html" data-pjax>首页</a> | ||
| 11 | + <i class="fa fa-circle"></i> | ||
| 12 | + </li> | ||
| 13 | + <li> | ||
| 14 | + <span class="active">运营计划管理</span> | ||
| 15 | + <i class="fa fa-circle"></i> | ||
| 16 | + </li> | ||
| 17 | + <li> | ||
| 18 | + <a ui-sref="guideboardManage">路牌管理</a> | ||
| 19 | + <i class="fa fa-circle"></i> | ||
| 20 | + </li> | ||
| 21 | + <li> | ||
| 22 | + <span class="active">路牌详细信息</span> | ||
| 23 | + </li> | ||
| 24 | +</ul> | ||
| 25 | + | ||
| 26 | +<div class="portlet light bordered" ng-controller="GuideboardManageDetailCtrl as ctrl"> | ||
| 27 | + <div class="portlet-title"> | ||
| 28 | + <div class="caption"> | ||
| 29 | + <i class="icon-equalizer font-red-sunglo"></i> <span | ||
| 30 | + class="caption-subject font-red-sunglo bold uppercase" | ||
| 31 | + ng-bind="ctrl.title"></span> | ||
| 32 | + </div> | ||
| 33 | + </div> | ||
| 34 | + | ||
| 35 | + <div class="portlet-body form"> | ||
| 36 | + <form class="form-horizontal" novalidate name="myForm"> | ||
| 37 | + <!--<div class="alert alert-danger display-hide">--> | ||
| 38 | + <!--<button class="close" data-close="alert"></button>--> | ||
| 39 | + <!--您的输入有误,请检查下面的输入项--> | ||
| 40 | + <!--</div>--> | ||
| 41 | + | ||
| 42 | + | ||
| 43 | + <!-- 其他信息放置在这里 --> | ||
| 44 | + <div class="form-body"> | ||
| 45 | + <div class="form-group has-success has-feedback"> | ||
| 46 | + <label class="col-md-2 control-label">线路*:</label> | ||
| 47 | + <div class="col-md-3"> | ||
| 48 | + <input type="text" class="form-control" | ||
| 49 | + name="xl" ng-model="ctrl.guideboardForDetail.xl.name" readonly/> | ||
| 50 | + </div> | ||
| 51 | + </div> | ||
| 52 | + <div class="form-group has-success has-feedback"> | ||
| 53 | + <label class="col-md-2 control-label">路牌编号*:</label> | ||
| 54 | + <div class="col-md-3"> | ||
| 55 | + <input type="text" class="form-control" | ||
| 56 | + name="lpNo" ng-model="ctrl.guideboardForDetail.lpNo" readonly/> | ||
| 57 | + </div> | ||
| 58 | + </div> | ||
| 59 | + | ||
| 60 | + <div class="form-group has-success has-feedback"> | ||
| 61 | + <label class="col-md-2 control-label">路牌名称*:</label> | ||
| 62 | + <div class="col-md-3"> | ||
| 63 | + <input type="text" class="form-control" name="lpName" | ||
| 64 | + ng-model="ctrl.guideboardForDetail.lpName" readonly/> | ||
| 65 | + </div> | ||
| 66 | + </div> | ||
| 67 | + | ||
| 68 | + <div class="form-group has-success has-feedback"> | ||
| 69 | + <label class="col-md-2 control-label">路牌类型*:</label> | ||
| 70 | + <div class="col-md-3"> | ||
| 71 | + <input type="text" class="form-control" name="lpType" | ||
| 72 | + ng-model="ctrl.guideboardForDetail.lpType" readonly/> | ||
| 73 | + </div> | ||
| 74 | + </div> | ||
| 75 | + | ||
| 76 | + <!-- 其他form-group --> | ||
| 77 | + | ||
| 78 | + </div> | ||
| 79 | + | ||
| 80 | + </form> | ||
| 81 | + | ||
| 82 | + </div> | ||
| 83 | +</div> | ||
| 3 | \ No newline at end of file | 84 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/guideboardManage.js
| @@ -39,7 +39,7 @@ angular.module('ScheduleApp').factory('GuideboardManageService', ['GuideboardMan | @@ -39,7 +39,7 @@ angular.module('ScheduleApp').factory('GuideboardManageService', ['GuideboardMan | ||
| 39 | getPage: function() { | 39 | getPage: function() { |
| 40 | var params = currentSearchCondition; // 查询条件 | 40 | var params = currentSearchCondition; // 查询条件 |
| 41 | params.page = currentPageNo - 1; // 服务端页码从0开始 | 41 | params.page = currentPageNo - 1; // 服务端页码从0开始 |
| 42 | - return service.list(params).$promise; | 42 | + return service.rest.list(params).$promise; |
| 43 | }, | 43 | }, |
| 44 | /** | 44 | /** |
| 45 | * 获取明细信息。 | 45 | * 获取明细信息。 |
| @@ -48,7 +48,7 @@ angular.module('ScheduleApp').factory('GuideboardManageService', ['GuideboardMan | @@ -48,7 +48,7 @@ angular.module('ScheduleApp').factory('GuideboardManageService', ['GuideboardMan | ||
| 48 | */ | 48 | */ |
| 49 | getDetail: function(id) { | 49 | getDetail: function(id) { |
| 50 | var params = {id: id}; | 50 | var params = {id: id}; |
| 51 | - return service.get(params).$promise; | 51 | + return service.rest.get(params).$promise; |
| 52 | }, | 52 | }, |
| 53 | /** | 53 | /** |
| 54 | * 保存信息。 | 54 | * 保存信息。 |
| @@ -56,7 +56,7 @@ angular.module('ScheduleApp').factory('GuideboardManageService', ['GuideboardMan | @@ -56,7 +56,7 @@ angular.module('ScheduleApp').factory('GuideboardManageService', ['GuideboardMan | ||
| 56 | * @return 返回一个 promise | 56 | * @return 返回一个 promise |
| 57 | */ | 57 | */ |
| 58 | saveDetail: function(obj) { | 58 | saveDetail: function(obj) { |
| 59 | - return service.save(obj).$promise; | 59 | + return service.rest.save(obj).$promise; |
| 60 | } | 60 | } |
| 61 | }; | 61 | }; |
| 62 | }]); | 62 | }]); |
| @@ -183,12 +183,31 @@ angular.module('ScheduleApp').controller('GuideboardManageListCtrl', ['Guideboar | @@ -183,12 +183,31 @@ angular.module('ScheduleApp').controller('GuideboardManageListCtrl', ['Guideboar | ||
| 183 | 183 | ||
| 184 | }]); | 184 | }]); |
| 185 | 185 | ||
| 186 | -angular.module('ScheduleApp').controller('GuideboardManageFormCtrl', '$stateParams', '$state', ['GuideboardManageService', function(guideboardManageService, $stateParams, $state) { | 186 | +angular.module('ScheduleApp').controller('GuideboardManageFormCtrl', ['GuideboardManageService', '$stateParams', '$state', function(guideboardManageService, $stateParams, $state) { |
| 187 | // TODO: | 187 | // TODO: |
| 188 | }]); | 188 | }]); |
| 189 | 189 | ||
| 190 | -angular.module('ScheduleApp').controller('GuideboardManageDetailCtrl', '$stateParams', ['GuideboardManageService', function(guideboardManageService, $stateParams) { | ||
| 191 | - // TODO: | 190 | +angular.module('ScheduleApp').controller('GuideboardManageDetailCtrl', ['GuideboardManageService', '$stateParams', function(guideboardManageService, $stateParams) { |
| 191 | + var self = this; | ||
| 192 | + self.title = ""; | ||
| 193 | + self.guideboardForDetail = {}; | ||
| 194 | + self.guideboardForDetail.id = $stateParams.id; | ||
| 195 | + | ||
| 196 | + // 当转向到此页面时,就获取明细信息并绑定 | ||
| 197 | + guideboardManageService.getDetail($stateParams.id).then( | ||
| 198 | + function(result) { | ||
| 199 | + var key; | ||
| 200 | + for (key in result) { | ||
| 201 | + self.guideboardForDetail[key] = result[key]; | ||
| 202 | + } | ||
| 203 | + | ||
| 204 | + self.title = "路牌 " + self.guideboardForDetail.lpName + " 详细信息"; | ||
| 205 | + }, | ||
| 206 | + function(result) { | ||
| 207 | + // TODO:弹出框方式以后改 | ||
| 208 | + alert("出错啦!"); | ||
| 209 | + } | ||
| 210 | + ); | ||
| 192 | }]); | 211 | }]); |
| 193 | 212 | ||
| 194 | 213 |
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/index.html
| @@ -27,10 +27,10 @@ | @@ -27,10 +27,10 @@ | ||
| 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" ng-click="ctrl.goForm()"> | ||
| 31 | - <i class="fa fa-plus"></i> | ||
| 32 | - 添加路牌 | ||
| 33 | - </a> | 30 | + <!--<a href="javascirpt:" class="btn btn-circle blue" ng-click="ctrl.goForm()">--> |
| 31 | + <!--<i class="fa fa-plus"></i>--> | ||
| 32 | + <!--添加路牌--> | ||
| 33 | + <!--</a>--> | ||
| 34 | 34 | ||
| 35 | <div class="btn-group"> | 35 | <div class="btn-group"> |
| 36 | <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown"> | 36 | <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown"> |
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/list.html
| @@ -64,8 +64,8 @@ | @@ -64,8 +64,8 @@ | ||
| 64 | <td> | 64 | <td> |
| 65 | <!--<a href="details.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 详细 </a>--> | 65 | <!--<a href="details.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 详细 </a>--> |
| 66 | <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>--> | 66 | <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>--> |
| 67 | - <a ui-sref="#" class="btn default blue-stripe btn-sm"> 详细 </a> | ||
| 68 | - <a ui-sref="#" class="btn default blue-stripe btn-sm"> 修改 </a> | 67 | + <a ui-sref="guideboardManage_detail({id : info.id})" class="btn default blue-stripe btn-sm"> 详细 </a> |
| 68 | + <!--<a ui-sref="#" class="btn default blue-stripe btn-sm"> 修改 </a>--> | ||
| 69 | </td> | 69 | </td> |
| 70 | </tr> | 70 | </tr> |
| 71 | </tbody> | 71 | </tbody> |
src/main/resources/static/pages/scheduleApp/module/main.js
| @@ -483,6 +483,23 @@ ScheduleApp.config(['$stateProvider', '$urlRouterProvider', function($stateProvi | @@ -483,6 +483,23 @@ ScheduleApp.config(['$stateProvider', '$urlRouterProvider', function($stateProvi | ||
| 483 | }] | 483 | }] |
| 484 | } | 484 | } |
| 485 | }) | 485 | }) |
| 486 | + .state("guideboardManage_detail", { | ||
| 487 | + url: '/guideboardManage_detail/:id', | ||
| 488 | + views: { | ||
| 489 | + "": {templateUrl: 'pages/scheduleApp/module/core/guideboardManage/detail.html'} | ||
| 490 | + }, | ||
| 491 | + resolve: { | ||
| 492 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 493 | + return $ocLazyLoad.load({ | ||
| 494 | + name: 'guideboardManage_detail_module', | ||
| 495 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 496 | + files: [ | ||
| 497 | + "pages/scheduleApp/module/core/guideboardManage/guideboardManage.js" | ||
| 498 | + ] | ||
| 499 | + }); | ||
| 500 | + }] | ||
| 501 | + } | ||
| 502 | + }) | ||
| 486 | 503 | ||
| 487 | 504 | ||
| 488 | // 时刻表管理 | 505 | // 时刻表管理 |
| @@ -803,6 +820,30 @@ angular.module('ScheduleApp').factory('BusConfigService_g', ['$resource', functi | @@ -803,6 +820,30 @@ angular.module('ScheduleApp').factory('BusConfigService_g', ['$resource', functi | ||
| 803 | method: 'POST' | 820 | method: 'POST' |
| 804 | } | 821 | } |
| 805 | } | 822 | } |
| 823 | + ) | ||
| 824 | + }; | ||
| 825 | +}]); | ||
| 826 | + | ||
| 827 | +// 人员配置service | ||
| 828 | +angular.module('ScheduleApp').factory('EmployeeConfigService_g', ['$resource', function($resource) { | ||
| 829 | + return { | ||
| 830 | + rest : $resource( | ||
| 831 | + '/eci/:id', | ||
| 832 | + {order: 'createDate', direction: 'ASC', id: '@id_route'}, | ||
| 833 | + { | ||
| 834 | + list: { | ||
| 835 | + method: 'GET', | ||
| 836 | + params: { | ||
| 837 | + page: 0 | ||
| 838 | + } | ||
| 839 | + }, | ||
| 840 | + get: { | ||
| 841 | + method: 'GET' | ||
| 842 | + }, | ||
| 843 | + save: { | ||
| 844 | + method: 'POST' | ||
| 845 | + } | ||
| 846 | + } | ||
| 806 | ), | 847 | ), |
| 807 | validate: $resource( // TODO: | 848 | validate: $resource( // TODO: |
| 808 | '/personnel/validate/:type', | 849 | '/personnel/validate/:type', |
| @@ -816,48 +857,28 @@ angular.module('ScheduleApp').factory('BusConfigService_g', ['$resource', functi | @@ -816,48 +857,28 @@ angular.module('ScheduleApp').factory('BusConfigService_g', ['$resource', functi | ||
| 816 | }; | 857 | }; |
| 817 | }]); | 858 | }]); |
| 818 | 859 | ||
| 819 | -// 人员配置service | ||
| 820 | -angular.module('ScheduleApp').factory('EmployeeConfigService_g', ['$resource', function($resource) { | ||
| 821 | - return $resource( | ||
| 822 | - '/eci/:id', | ||
| 823 | - {order: 'createDate', direction: 'DESC', id: '@id_route'}, // TODO:以后需要根据属性对象的属性查询 | ||
| 824 | - { | ||
| 825 | - list: { | ||
| 826 | - method: 'GET', | ||
| 827 | - params: { | ||
| 828 | - page: 0 | ||
| 829 | - } | ||
| 830 | - }, | ||
| 831 | - get: { | ||
| 832 | - method: 'GET' | ||
| 833 | - }, | ||
| 834 | - save: { | ||
| 835 | - method: 'POST' | ||
| 836 | - } | ||
| 837 | - } | ||
| 838 | - ); | ||
| 839 | -}]); | ||
| 840 | - | ||
| 841 | // 路牌管理service | 860 | // 路牌管理service |
| 842 | angular.module('ScheduleApp').factory('GuideboardManageService_g', ['$resource', function($resource) { | 861 | angular.module('ScheduleApp').factory('GuideboardManageService_g', ['$resource', function($resource) { |
| 843 | - return $resource( | ||
| 844 | - '/gic/:id', | ||
| 845 | - {order: 'createDate', direction: 'DESC', id: '@id_route'}, // TODO:以后需要根据属性对象的属性查询 | ||
| 846 | - { | ||
| 847 | - list: { | ||
| 848 | - method: 'GET', | ||
| 849 | - params: { | ||
| 850 | - page: 0 | 862 | + return { |
| 863 | + rest: $resource( | ||
| 864 | + '/gic/:id', | ||
| 865 | + {order: 'createDate', direction: 'DESC', id: '@id_route'}, | ||
| 866 | + { | ||
| 867 | + list: { | ||
| 868 | + method: 'GET', | ||
| 869 | + params: { | ||
| 870 | + page: 0 | ||
| 871 | + } | ||
| 872 | + }, | ||
| 873 | + get: { | ||
| 874 | + method: 'GET' | ||
| 875 | + }, | ||
| 876 | + save: { | ||
| 877 | + method: 'POST' | ||
| 851 | } | 878 | } |
| 852 | - }, | ||
| 853 | - get: { | ||
| 854 | - method: 'GET' | ||
| 855 | - }, | ||
| 856 | - save: { | ||
| 857 | - method: 'POST' | ||
| 858 | } | 879 | } |
| 859 | - } | ||
| 860 | - ); | 880 | + ) |
| 881 | + }; | ||
| 861 | }]); | 882 | }]); |
| 862 | 883 | ||
| 863 | // 时刻表管理service | 884 | // 时刻表管理service |
| @@ -1260,16 +1281,6 @@ angular.module('ScheduleApp').factory('$$SearchInfoService_g', ['$resource', fun | @@ -1260,16 +1281,6 @@ angular.module('ScheduleApp').factory('$$SearchInfoService_g', ['$resource', fun | ||
| 1260 | } | 1281 | } |
| 1261 | ), | 1282 | ), |
| 1262 | ry: $resource( | 1283 | ry: $resource( |
| 1263 | - '/eci/alljsy', | ||
| 1264 | - {order: 'jsy.personnelName', direction: 'ASC'}, | ||
| 1265 | - { | ||
| 1266 | - list: { | ||
| 1267 | - method: 'GET', | ||
| 1268 | - isArray: true | ||
| 1269 | - } | ||
| 1270 | - } | ||
| 1271 | - ), | ||
| 1272 | - ry2: $resource( | ||
| 1273 | '/personnel/:type', | 1284 | '/personnel/:type', |
| 1274 | {order: 'personnelName', direction: 'ASC'}, | 1285 | {order: 'personnelName', direction: 'ASC'}, |
| 1275 | { | 1286 | { |