Commit 5ea65027e9e667094644dc8914fe4adb0d03d3ae

Authored by 徐烜
1 parent 9955d855

iss提交1:

1、在人员配置新增修改界面添加人员公司,分公司,是否停用验证
2、在人员基础信息列表中显示是否停用状态
src/main/java/com/bsth/controller/schedule/core/EmployeeConfigInfoController.java
... ... @@ -53,6 +53,49 @@ public class EmployeeConfigInfoController extends BController<EmployeeConfigInfo
53 53 return rtn;
54 54 }
55 55  
  56 + @RequestMapping(value = "/validate_jsy_destroy", method = RequestMethod.GET)
  57 + public Map<String, Object> validate_jsy_destroy(@RequestParam Map<String, Object> param) {
  58 + Map<String, Object> rtn = new HashMap<>();
  59 + try {
  60 + EmployeeConfigInfo employeeConfigInfo = new EmployeeConfigInfo(
  61 + null,
  62 + null,
  63 + null,
  64 + param.get("jsy.id_eq"),
  65 + null
  66 + );
  67 + employeeConfigInfoService.validate_jsy_destroy(employeeConfigInfo);
  68 + rtn.put("status", ResponseCode.SUCCESS);
  69 + } catch (ScheduleException exp) {
  70 + rtn.put("status", ResponseCode.ERROR);
  71 + rtn.put("msg", exp.getMessage());
  72 + }
  73 +
  74 + return rtn;
  75 + }
  76 +
  77 + @RequestMapping(value = "/validate_spy_destroy", method = RequestMethod.GET)
  78 + public Map<String, Object> validate_spy_destroy(@RequestParam Map<String, Object> param) {
  79 + Map<String, Object> rtn = new HashMap<>();
  80 + try {
  81 + EmployeeConfigInfo employeeConfigInfo = new EmployeeConfigInfo(
  82 + null,
  83 + null,
  84 + null,
  85 + null,
  86 + param.get("spy.id_eq")
  87 + );
  88 + employeeConfigInfoService.validate_spy_destroy(employeeConfigInfo);
  89 + rtn.put("status", ResponseCode.SUCCESS);
  90 + } catch (ScheduleException exp) {
  91 + rtn.put("status", ResponseCode.ERROR);
  92 + rtn.put("msg", exp.getMessage());
  93 + }
  94 +
  95 + return rtn;
  96 + }
  97 +
  98 +
56 99 @RequestMapping(value = "/validate_jsy", method = RequestMethod.GET)
57 100 public Map<String, Object> validate_jsy(@RequestParam Map<String, Object> param) {
58 101 Map<String, Object> rtn = new HashMap<>();
... ...
src/main/java/com/bsth/service/schedule/EmployeeConfigInfoService.java
... ... @@ -26,6 +26,10 @@ public interface EmployeeConfigInfoService extends BService&lt;EmployeeConfigInfo,
26 26 void validate_spy_gs(EmployeeConfigInfo employeeConfigInfo, List<CompanyAuthority> companyAuthorityList) throws ScheduleException;
27 27 // 判定驾驶员所属分公司和当前用户的所属分公司
28 28 void validate_spy_fgs(EmployeeConfigInfo employeeConfigInfo, List<CompanyAuthority> companyAuthorityList) throws ScheduleException;
  29 + // 验证驾驶员是否停用
  30 + void validate_jsy_destroy(EmployeeConfigInfo employeeConfigInfo) throws ScheduleException;
  31 + // 验证售票员是否停用
  32 + void validate_spy_destroy(EmployeeConfigInfo employeeConfigInfo) throws ScheduleException;
29 33  
30 34 void toggleCancel(Long id) throws ScheduleException;
31 35 Long getMaxDbbm(Integer xlId);
... ...
src/main/java/com/bsth/service/schedule/impl/EmployeeConfigInfoServiceImpl.java
... ... @@ -4,6 +4,7 @@ import com.bsth.entity.Personnel;
4 4 import com.bsth.entity.schedule.EmployeeConfigInfo;
5 5 import com.bsth.entity.schedule.rule.ScheduleRule1Flat;
6 6 import com.bsth.entity.sys.CompanyAuthority;
  7 +import com.bsth.repository.PersonnelRepository;
7 8 import com.bsth.service.schedule.EmployeeConfigInfoService;
8 9 import com.bsth.service.schedule.EmployeeService;
9 10 import com.bsth.service.schedule.ScheduleRule1FlatService;
... ... @@ -35,6 +36,9 @@ public class EmployeeConfigInfoServiceImpl extends BServiceImpl&lt;EmployeeConfigIn
35 36 private EmployeeService employeeService;
36 37  
37 38 @Autowired
  39 + private PersonnelRepository personnelRepository;
  40 +
  41 + @Autowired
38 42 @Qualifier(value = "employeeConfig_dataTool")
39 43 private DataToolsService dataToolsService;
40 44  
... ... @@ -77,6 +81,23 @@ public class EmployeeConfigInfoServiceImpl extends BServiceImpl&lt;EmployeeConfigIn
77 81  
78 82 @Transactional
79 83 @Override
  84 + public void validate_jsy_destroy(EmployeeConfigInfo employeeConfigInfo) throws ScheduleException {
  85 + Personnel jsy = this.personnelRepository.findOne(employeeConfigInfo.getJsy().getId());
  86 + if (jsy.getDestroy() != null && jsy.getDestroy() == 1) {
  87 + throw new ScheduleException("当前驾驶员已经停用!");
  88 + }
  89 + }
  90 + @Transactional
  91 + @Override
  92 + public void validate_spy_destroy(EmployeeConfigInfo employeeConfigInfo) throws ScheduleException {
  93 + Personnel spy = this.personnelRepository.findOne(employeeConfigInfo.getSpy().getId());
  94 + if (spy.getDestroy() != null && spy.getDestroy() == 1) {
  95 + throw new ScheduleException("当前售票员已经停用!");
  96 + }
  97 + }
  98 +
  99 + @Transactional
  100 + @Override
80 101 public void validate_jsy(EmployeeConfigInfo employeeConfigInfo) throws ScheduleException {
81 102 // 驾驶员不能重复配置
82 103 Map<String, Object> param = new HashMap<>();
... ...
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/list.html
... ... @@ -8,10 +8,11 @@
8 8 <th style="width: 130px;">姓名</th>
9 9 <th style="width: 100px;">编号</th>
10 10 <th style="width: 100px;">工号</th>
11   - <th style="width: 5%;">性别</th>
  11 + <th style="width: 60px;">性别</th>
12 12 <th style="width: 15%;">所在公司</th>
13 13 <th >分公司</th>
14   - <th style="width: 20%;">工种</th>
  14 + <th style="width: 15%;">工种</th>
  15 + <th style="width: 80px;">停用</th>
15 16 <th >操作</th>
16 17 </tr>
17 18 <tr role="row" class="filter">
... ... @@ -73,6 +74,11 @@
73 74 </sa-Select5>
74 75 </td>
75 76 <td>
  77 + <label class="checkbox-inline">
  78 + <input type="checkbox" ng-true-value="1" ng-model="ctrl.searchCondition()['destroy_eq']"/>停用
  79 + </label>
  80 + </td>
  81 + <td>
76 82 <div class="btn-group">
77 83 <button class="btn btn-sm green btn-outline filter-submit margin-bottom" style="margin-right: 0;"
78 84 ng-click="ctrl.doPage()">
... ... @@ -101,7 +107,7 @@
101 107 </tr>
102 108 </thead>
103 109 <tbody>
104   - <tr ng-repeat="info in ctrl.page()['content']" class="odd gradeX">
  110 + <tr ng-repeat="info in ctrl.page()['content']" class="odd gradeX" ng-class="{danger: info.destroy == '1'}">
105 111 <td>
106 112 <div>
107 113 <a href="#"
... ... @@ -150,6 +156,10 @@
150 156 <span ng-bind="info.posts | dict:'gzType':'未知'"></span>
151 157 </td>
152 158 <td>
  159 + <span class="glyphicon glyphicon-ok" ng-if="info.destroy != '1'"></span>
  160 + <span class="glyphicon glyphicon-remove" ng-if="info.destroy == '1'"></span>
  161 + </td>
  162 + <td>
153 163 <!--<a href="details.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 详细 </a>-->
154 164 <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>-->
155 165 <a ui-sref="employeeInfoManage_detail({id: info.id})" class="btn btn-info btn-sm"> 详细 </a>
... ...
src/main/resources/static/pages/scheduleApp/module/common/prj-common-directive.js
... ... @@ -4407,331 +4407,331 @@ angular.module(&#39;ScheduleApp&#39;).directive(
4407 4407 ]
4408 4408 );
4409 4409  
4410   -/**
4411   - * saTimetablePreview指令,时刻表预览模式视图。
4412   - */
4413   -angular.module("ScheduleApp").directive(
4414   - "saTimetable2",
4415   - [
4416   - '$timeout',
4417   - function($timeout) {
4418   - return {
4419   - restrict : 'E',
4420   - templateUrl : '/pages/scheduleApp/module/common/dts2/ttinfotable/saTimeTablePreViewTemplate.html',
4421   - scope : { // 独立作用域
4422   - // 使用外部数据源,内部重新组合显示
4423   - ds : "=ngModel"
4424   - },
4425   - controllerAs : "$saTimeTablePreviewCtrl",
4426   - bindToController: true,
4427   - controller : function() {
4428   - var self = this;
4429   -
4430   - // 内部班次时刻模型
4431   - self.internalBcModel = {
4432   - up_qdz_name : "", // 上行起点站名字
4433   - down_qdz_name : "", // 下行起点站名字
4434   - up_bc_list_asc : [], // 上行班次列表(按照发车时间升序)
4435   - down_bc_list_asc : [] // 下行班次列表(按照发车时间升序)
4436   - };
4437   -
4438   - // 内部各个路牌block车次链模型
4439   - self.internalLpBlockModel = {
4440   - // key:路牌名字
4441   - // value: 数组(按照发车时间排序)
4442   - // value 数据内对象 {fcsj:发车时间,isUp:是否上行,fcno:发车顺序号,index:对应的班次列表索引}
4443   - };
4444   -
4445   - // TODO:
4446   - },
4447   -
4448   - /**,
4449   - * compile阶段,angular还没有编译模版,根据需要可以修改模版dom
4450   - * @param tElem
4451   - * @param tAttrs
4452   - * @returns {{pre: Function, post: Function}}
4453   - */
4454   - compile : function(tElem, tAttrs) {
4455   - // 获取属性
4456   - var $attr_name = tAttrs["name"]; // 控件的名字
4457   - if (!$attr_name) {
4458   - throw new Error("saTimeTablePreview指令 name属性required");
4459   - }
4460   -
4461   - // 内部controlAs名字
4462   - var ctrlAs = "$saTimeTablePreviewCtrl";
4463   -
4464   - // TODO:
4465   -
4466   - //------------------ 内部方法 --------------------//
4467   - var date_wrap_prefix = "2000-01-01 "; // 包装日期的前缀
4468   - var date_wrap_format = "YYYY-MM-DD HH:mm"; // 日期格式
4469   - /**
4470   - * 将时间包装成日期,方便计算。
4471   - * @param timeStr 时间格式,如 06:30
4472   - * @returns moment对象
4473   - */
4474   - var _fun_WrapTime = function(timeStr) {
4475   - return moment(
4476   - date_wrap_prefix + timeStr,
4477   - date_wrap_format
4478   - );
4479   - };
4480   -
4481   - /**
4482   - * 点击班次html元素(dl),触发班次移动,如下:
4483   - * 1、点击上行班次,下一个下行班次在下行班次列表中移到中间位置
4484   - * 2、点击下行班次,下一个上行班次在上行班次列表中移到中间位置
4485   - * @param ctrl 内部控制器
4486   - * @param index 班次索引
4487   - * @param isUp 是否上行
4488   - * @private
4489   - */
4490   - var _fun_bcDDViewMove = function(ctrl, index, isUp) {
4491   - // 获取当前点击班次对象
4492   - var oBc;
4493   - if (isUp) {
4494   - oBc = ctrl.internalBcModel.up_bc_list_asc[index];
4495   - } else {
4496   - oBc = ctrl.internalBcModel.down_bc_list_asc[index];
4497   - }
4498   -
4499   - // 找出车次链中的下一个班次索引,没有就undefined
4500   - var nextIndex = undefined;
4501   - var nextBlockBc = undefined;
4502   - var currentBlockBcIndex = undefined;
4503   - angular.forEach(ctrl.internalLpBlockModel[oBc.lpName], function(data, i) {
4504   - if (data.fcsj == oBc.fcsj) {
4505   - currentBlockBcIndex = i;
4506   - }
4507   - });
4508   - if (currentBlockBcIndex != undefined &&
4509   - currentBlockBcIndex < (ctrl.internalLpBlockModel[oBc.lpName].length - 1)) {
4510   - nextBlockBc = ctrl.internalLpBlockModel[oBc.lpName][currentBlockBcIndex + 1];
4511   - nextIndex = nextBlockBc.index;
4512   - }
4513   - // 先删除click标记,再添加
4514   - angular.forEach(ctrl.internalBcModel.up_bc_list_asc, function(data) {
4515   - delete data["isClick"];
4516   - });
4517   - angular.forEach(ctrl.internalBcModel.down_bc_list_asc, function(data) {
4518   - delete data["isClick"];
4519   - });
4520   - oBc.isClick = true;
4521   - if (nextIndex) {
4522   - if (nextBlockBc.isUp) {
4523   - ctrl.internalBcModel.up_bc_list_asc[nextIndex].isClick = true;
4524   - } else {
4525   - ctrl.internalBcModel.down_bc_list_asc[nextIndex].isClick = true;
4526   - }
4527   - }
4528   -
4529   - // 移动,同方向不移动
4530   - var clientHeight = angular.element("#temp").height() - 34;
4531   - if (nextBlockBc && isUp != nextBlockBc.isUp) {
4532   - if (isUp) { // 移动下行
4533   - angular.element(".ttpv_table_scrollbar:eq(1)").animate(
4534   - {scrollTop : nextIndex * 30 - clientHeight / 2}, 400);
4535   - } else { // 移动上行
4536   - angular.element(".ttpv_table_scrollbar:eq(0)").animate(
4537   - {scrollTop : nextIndex * 30 - clientHeight / 2}, 400);
4538   - }
4539   - }
4540   -
4541   - };
4542   -
4543   - /**
4544   - * 刷新内部数据。
4545   - * @param ctrl 内部控制器对象($saTimeTablePreviewCtrl)
4546   - * @private
4547   - */
4548   - var _fun_refreshInternalModel = function(ctrl) {
4549   - // 初始化内部数据
4550   - ctrl.internalBcModel = {
4551   - up_qdz_name : "", // 上行起点站名字
4552   - up_zdz_name : "", // 上行终点站名字
4553   - down_qdz_name : "", // 下行起点站名字
4554   - down_zdz_name : "", // 下行终点站名字
4555   - up_bc_list_asc : [], // 上行班次列表(按照发车时间升序)
4556   - down_bc_list_asc : [] // 下行班次列表(按照发车时间升序)
4557   - };
4558   - ctrl.internalLpBlockModel = {
4559   -
4560   - };
4561   -
4562   - // ngModel传入的数据
4563   - var dataSource = ctrl.ds.bcList;
4564   -
4565   - // 构造上下行班次列表,并确定上下行的首发站点
4566   - angular.forEach(dataSource, function(bcObj) {
4567   - var _internalBcObj = {};
4568   - // 构造内部班次对象
4569   - _internalBcObj.lpName = bcObj.lp.lpName; // 路牌
4570   - _internalBcObj.fcsj = bcObj.fcsj; // 发车时间
4571   - _internalBcObj.ddsj = _fun_WrapTime(bcObj.fcsj).add(bcObj.bcsj, "m").format("HH:mm");
4572   - _internalBcObj.qdzName = bcObj.qdzName; // 起点站名字
4573   - _internalBcObj.zdzName = bcObj.zdzName; // 终点站名字
4574   - _internalBcObj.bcType = bcObj.bcType; // 班次类型
4575   - _internalBcObj.isTs = bcObj.isTS; // 是否停驶
4576   - _internalBcObj.isFb = bcObj.isFB; // 是否分班
4577   - _internalBcObj.remark = bcObj.remark; // 备注
4578   - _internalBcObj._fcno = bcObj.fcno; // 发车顺序号
4579   -
4580   - if (bcObj.xlDir == "0") { // 上行
4581   - ctrl.internalBcModel.up_bc_list_asc.push(_internalBcObj);
4582   - // 确定起点站
4583   - if (ctrl.internalBcModel.up_qdz_name == "") {
4584   - if (bcObj.bcType == "normal") {
4585   - ctrl.internalBcModel.up_qdz_name = bcObj.qdzName;
4586   - }
4587   - }
4588   - // 确定终点站
4589   - if (ctrl.internalBcModel.up_zdz_name == "") {
4590   - if (bcObj.bcType == "normal") {
4591   - ctrl.internalBcModel.up_zdz_name = bcObj.zdzName;
4592   - }
4593   - }
4594   - }
4595   - if (bcObj.xlDir == "1") { // 下行
4596   - ctrl.internalBcModel.down_bc_list_asc.push(_internalBcObj);
4597   - // 确定起点站
4598   - if (ctrl.internalBcModel.down_qdz_name == "") {
4599   - if (bcObj.bcType == "normal") {
4600   - ctrl.internalBcModel.down_qdz_name = bcObj.qdzName;
4601   - }
4602   - }
4603   - // 确定终点站
4604   - if (ctrl.internalBcModel.down_zdz_name == "") {
4605   - if (bcObj.bcType == "normal") {
4606   - ctrl.internalBcModel.down_zdz_name = bcObj.zdzName;
4607   - }
4608   - }
4609   - }
4610   -
4611   - });
4612   -
4613   - // 发车时间升序排序上行班次
4614   - ctrl.internalBcModel.up_bc_list_asc.sort(function(a, b) {
4615   - var a_wrapTime = _fun_WrapTime(a.fcsj);
4616   - var b_wrapTime = _fun_WrapTime(b.fcsj);
4617   -
4618   - // 判定如果发车时间是以00,01,02,03开头的,说明是下一天凌晨的班次,需要加1天判定
4619   - // TODO:以后要配合首班车的发车时间判定
4620   - if (a.fcsj.indexOf("00:") == 0 ||
4621   - a.fcsj.indexOf("01:") == 0 ||
4622   - a.fcsj.indexOf("02:") == 0) {
4623   - a_wrapTime.add(1, "day");
4624   - }
4625   - if (b.fcsj.indexOf("00:") == 0 ||
4626   - b.fcsj.indexOf("01:") == 0 ||
4627   - b.fcsj.indexOf("02:") == 0) {
4628   - b_wrapTime.add(1, "day");
4629   - }
4630   -
4631   - if (a_wrapTime.isBefore(b_wrapTime)) {
4632   - return -1;
4633   - } else if (a_wrapTime.isAfter(b_wrapTime)) {
4634   - return 1;
4635   - } else {
4636   - return 0;
4637   - }
4638   -
4639   - });
4640   - // 发车时间升序排序下行班次
4641   - ctrl.internalBcModel.down_bc_list_asc.sort(function(a, b) {
4642   - var a_wrapTime = _fun_WrapTime(a.fcsj);
4643   - var b_wrapTime = _fun_WrapTime(b.fcsj);
4644   -
4645   - // 判定如果发车时间是以00,01,02,03开头的,说明是下一天凌晨的班次,需要加1天判定
4646   - // TODO:以后要配合首班车的发车时间判定
4647   - if (a.fcsj.indexOf("00:") == 0 ||
4648   - a.fcsj.indexOf("01:") == 0 ||
4649   - a.fcsj.indexOf("02:") == 0) {
4650   - a_wrapTime.add(1, "day");
4651   - }
4652   - if (b.fcsj.indexOf("00:") == 0 ||
4653   - b.fcsj.indexOf("01:") == 0 ||
4654   - b.fcsj.indexOf("02:") == 0) {
4655   - b_wrapTime.add(1, "day");
4656   - }
4657   -
4658   - if (a_wrapTime.isBefore(b_wrapTime)) {
4659   - return -1;
4660   - } else if (a_wrapTime.isAfter(b_wrapTime)) {
4661   - return 1;
4662   - } else {
4663   - return 0;
4664   - }
4665   - });
4666   -
4667   - // 构造路牌block车次链,按照发车顺序排序
4668   - angular.forEach(ctrl.internalBcModel.up_bc_list_asc, function(data, index) {
4669   - if (!ctrl.internalLpBlockModel[data.lpName]) {
4670   - ctrl.internalLpBlockModel[data.lpName] = [];
4671   - }
4672   - ctrl.internalLpBlockModel[data.lpName].push({
4673   - fcsj : data.fcsj,
4674   - isUp : true,
4675   - fcno : data._fcno,
4676   - index : index
4677   - });
4678   - });
4679   - angular.forEach(ctrl.internalBcModel.down_bc_list_asc, function(data, index) {
4680   - if (!ctrl.internalLpBlockModel[data.lpName]) {
4681   - ctrl.internalLpBlockModel[data.lpName] = [];
4682   - }
4683   - ctrl.internalLpBlockModel[data.lpName].push({
4684   - fcsj : data.fcsj,
4685   - isUp : false,
4686   - fcno : data._fcno,
4687   - index : index
4688   - });
4689   - });
4690   - angular.forEach(ctrl.internalLpBlockModel, function(value, key) {
4691   - value.sort(function (a, b) {
4692   - if (a.fcno < b.fcno) {
4693   - return -1;
4694   - } else if (a.fcno > b.fcno) {
4695   - return 1;
4696   - } else {
4697   - return 0;
4698   - }
4699   - });
4700   - });
4701   -
4702   -
4703   - };
4704   -
4705   - return {
4706   - pre : function(scope, element, attr) {
4707   - // TODO:
4708   - },
4709   - post : function(scope, element, attr) {
4710   - // 班次html点击事件
4711   - scope[ctrlAs].$$bcDD_Click = function(index, xlDir) {
4712   - _fun_bcDDViewMove(scope[ctrlAs], index, xlDir);
4713   - };
4714   -
4715   - // 监控ngModel绑定的外部数据源的刷新状态变化
4716   - scope.$watch(
4717   - function() {
4718   - return scope[ctrlAs].ds.refreshInfos;
4719   - },
4720   - function(newValue, oldValue) {
4721   - if (newValue === undefined && oldValue === undefined) {
4722   - return;
4723   - }
4724   - console.log("saTimetable2 refresh");
4725   - _fun_refreshInternalModel(scope[ctrlAs]);
4726   - },
4727   - true
4728   - );
4729   - }
4730   - };
4731   - }
4732   - };
4733   - }
4734   - ]
  4410 +/**
  4411 + * saTimetablePreview指令,时刻表预览模式视图。
  4412 + */
  4413 +angular.module("ScheduleApp").directive(
  4414 + "saTimetable2",
  4415 + [
  4416 + '$timeout',
  4417 + function($timeout) {
  4418 + return {
  4419 + restrict : 'E',
  4420 + templateUrl : '/pages/scheduleApp/module/common/dts2/ttinfotable/saTimeTablePreViewTemplate.html',
  4421 + scope : { // 独立作用域
  4422 + // 使用外部数据源,内部重新组合显示
  4423 + ds : "=ngModel"
  4424 + },
  4425 + controllerAs : "$saTimeTablePreviewCtrl",
  4426 + bindToController: true,
  4427 + controller : function() {
  4428 + var self = this;
  4429 +
  4430 + // 内部班次时刻模型
  4431 + self.internalBcModel = {
  4432 + up_qdz_name : "", // 上行起点站名字
  4433 + down_qdz_name : "", // 下行起点站名字
  4434 + up_bc_list_asc : [], // 上行班次列表(按照发车时间升序)
  4435 + down_bc_list_asc : [] // 下行班次列表(按照发车时间升序)
  4436 + };
  4437 +
  4438 + // 内部各个路牌block车次链模型
  4439 + self.internalLpBlockModel = {
  4440 + // key:路牌名字
  4441 + // value: 数组(按照发车时间排序)
  4442 + // value 数据内对象 {fcsj:发车时间,isUp:是否上行,fcno:发车顺序号,index:对应的班次列表索引}
  4443 + };
  4444 +
  4445 + // TODO:
  4446 + },
  4447 +
  4448 + /**,
  4449 + * compile阶段,angular还没有编译模版,根据需要可以修改模版dom
  4450 + * @param tElem
  4451 + * @param tAttrs
  4452 + * @returns {{pre: Function, post: Function}}
  4453 + */
  4454 + compile : function(tElem, tAttrs) {
  4455 + // 获取属性
  4456 + var $attr_name = tAttrs["name"]; // 控件的名字
  4457 + if (!$attr_name) {
  4458 + throw new Error("saTimeTablePreview指令 name属性required");
  4459 + }
  4460 +
  4461 + // 内部controlAs名字
  4462 + var ctrlAs = "$saTimeTablePreviewCtrl";
  4463 +
  4464 + // TODO:
  4465 +
  4466 + //------------------ 内部方法 --------------------//
  4467 + var date_wrap_prefix = "2000-01-01 "; // 包装日期的前缀
  4468 + var date_wrap_format = "YYYY-MM-DD HH:mm"; // 日期格式
  4469 + /**
  4470 + * 将时间包装成日期,方便计算。
  4471 + * @param timeStr 时间格式,如 06:30
  4472 + * @returns moment对象
  4473 + */
  4474 + var _fun_WrapTime = function(timeStr) {
  4475 + return moment(
  4476 + date_wrap_prefix + timeStr,
  4477 + date_wrap_format
  4478 + );
  4479 + };
  4480 +
  4481 + /**
  4482 + * 点击班次html元素(dl),触发班次移动,如下:
  4483 + * 1、点击上行班次,下一个下行班次在下行班次列表中移到中间位置
  4484 + * 2、点击下行班次,下一个上行班次在上行班次列表中移到中间位置
  4485 + * @param ctrl 内部控制器
  4486 + * @param index 班次索引
  4487 + * @param isUp 是否上行
  4488 + * @private
  4489 + */
  4490 + var _fun_bcDDViewMove = function(ctrl, index, isUp) {
  4491 + // 获取当前点击班次对象
  4492 + var oBc;
  4493 + if (isUp) {
  4494 + oBc = ctrl.internalBcModel.up_bc_list_asc[index];
  4495 + } else {
  4496 + oBc = ctrl.internalBcModel.down_bc_list_asc[index];
  4497 + }
  4498 +
  4499 + // 找出车次链中的下一个班次索引,没有就undefined
  4500 + var nextIndex = undefined;
  4501 + var nextBlockBc = undefined;
  4502 + var currentBlockBcIndex = undefined;
  4503 + angular.forEach(ctrl.internalLpBlockModel[oBc.lpName], function(data, i) {
  4504 + if (data.fcsj == oBc.fcsj) {
  4505 + currentBlockBcIndex = i;
  4506 + }
  4507 + });
  4508 + if (currentBlockBcIndex != undefined &&
  4509 + currentBlockBcIndex < (ctrl.internalLpBlockModel[oBc.lpName].length - 1)) {
  4510 + nextBlockBc = ctrl.internalLpBlockModel[oBc.lpName][currentBlockBcIndex + 1];
  4511 + nextIndex = nextBlockBc.index;
  4512 + }
  4513 + // 先删除click标记,再添加
  4514 + angular.forEach(ctrl.internalBcModel.up_bc_list_asc, function(data) {
  4515 + delete data["isClick"];
  4516 + });
  4517 + angular.forEach(ctrl.internalBcModel.down_bc_list_asc, function(data) {
  4518 + delete data["isClick"];
  4519 + });
  4520 + oBc.isClick = true;
  4521 + if (nextIndex) {
  4522 + if (nextBlockBc.isUp) {
  4523 + ctrl.internalBcModel.up_bc_list_asc[nextIndex].isClick = true;
  4524 + } else {
  4525 + ctrl.internalBcModel.down_bc_list_asc[nextIndex].isClick = true;
  4526 + }
  4527 + }
  4528 +
  4529 + // 移动,同方向不移动
  4530 + var clientHeight = angular.element("#temp").height() - 34;
  4531 + if (nextBlockBc && isUp != nextBlockBc.isUp) {
  4532 + if (isUp) { // 移动下行
  4533 + angular.element(".ttpv_table_scrollbar:eq(1)").animate(
  4534 + {scrollTop : nextIndex * 30 - clientHeight / 2}, 400);
  4535 + } else { // 移动上行
  4536 + angular.element(".ttpv_table_scrollbar:eq(0)").animate(
  4537 + {scrollTop : nextIndex * 30 - clientHeight / 2}, 400);
  4538 + }
  4539 + }
  4540 +
  4541 + };
  4542 +
  4543 + /**
  4544 + * 刷新内部数据。
  4545 + * @param ctrl 内部控制器对象($saTimeTablePreviewCtrl)
  4546 + * @private
  4547 + */
  4548 + var _fun_refreshInternalModel = function(ctrl) {
  4549 + // 初始化内部数据
  4550 + ctrl.internalBcModel = {
  4551 + up_qdz_name : "", // 上行起点站名字
  4552 + up_zdz_name : "", // 上行终点站名字
  4553 + down_qdz_name : "", // 下行起点站名字
  4554 + down_zdz_name : "", // 下行终点站名字
  4555 + up_bc_list_asc : [], // 上行班次列表(按照发车时间升序)
  4556 + down_bc_list_asc : [] // 下行班次列表(按照发车时间升序)
  4557 + };
  4558 + ctrl.internalLpBlockModel = {
  4559 +
  4560 + };
  4561 +
  4562 + // ngModel传入的数据
  4563 + var dataSource = ctrl.ds.bcList;
  4564 +
  4565 + // 构造上下行班次列表,并确定上下行的首发站点
  4566 + angular.forEach(dataSource, function(bcObj) {
  4567 + var _internalBcObj = {};
  4568 + // 构造内部班次对象
  4569 + _internalBcObj.lpName = bcObj.lp.lpName; // 路牌
  4570 + _internalBcObj.fcsj = bcObj.fcsj; // 发车时间
  4571 + _internalBcObj.ddsj = _fun_WrapTime(bcObj.fcsj).add(bcObj.bcsj, "m").format("HH:mm");
  4572 + _internalBcObj.qdzName = bcObj.qdzName; // 起点站名字
  4573 + _internalBcObj.zdzName = bcObj.zdzName; // 终点站名字
  4574 + _internalBcObj.bcType = bcObj.bcType; // 班次类型
  4575 + _internalBcObj.isTs = bcObj.isTS; // 是否停驶
  4576 + _internalBcObj.isFb = bcObj.isFB; // 是否分班
  4577 + _internalBcObj.remark = bcObj.remark; // 备注
  4578 + _internalBcObj._fcno = bcObj.fcno; // 发车顺序号
  4579 +
  4580 + if (bcObj.xlDir == "0") { // 上行
  4581 + ctrl.internalBcModel.up_bc_list_asc.push(_internalBcObj);
  4582 + // 确定起点站
  4583 + if (ctrl.internalBcModel.up_qdz_name == "") {
  4584 + if (bcObj.bcType == "normal") {
  4585 + ctrl.internalBcModel.up_qdz_name = bcObj.qdzName;
  4586 + }
  4587 + }
  4588 + // 确定终点站
  4589 + if (ctrl.internalBcModel.up_zdz_name == "") {
  4590 + if (bcObj.bcType == "normal") {
  4591 + ctrl.internalBcModel.up_zdz_name = bcObj.zdzName;
  4592 + }
  4593 + }
  4594 + }
  4595 + if (bcObj.xlDir == "1") { // 下行
  4596 + ctrl.internalBcModel.down_bc_list_asc.push(_internalBcObj);
  4597 + // 确定起点站
  4598 + if (ctrl.internalBcModel.down_qdz_name == "") {
  4599 + if (bcObj.bcType == "normal") {
  4600 + ctrl.internalBcModel.down_qdz_name = bcObj.qdzName;
  4601 + }
  4602 + }
  4603 + // 确定终点站
  4604 + if (ctrl.internalBcModel.down_zdz_name == "") {
  4605 + if (bcObj.bcType == "normal") {
  4606 + ctrl.internalBcModel.down_zdz_name = bcObj.zdzName;
  4607 + }
  4608 + }
  4609 + }
  4610 +
  4611 + });
  4612 +
  4613 + // 发车时间升序排序上行班次
  4614 + ctrl.internalBcModel.up_bc_list_asc.sort(function(a, b) {
  4615 + var a_wrapTime = _fun_WrapTime(a.fcsj);
  4616 + var b_wrapTime = _fun_WrapTime(b.fcsj);
  4617 +
  4618 + // 判定如果发车时间是以00,01,02,03开头的,说明是下一天凌晨的班次,需要加1天判定
  4619 + // TODO:以后要配合首班车的发车时间判定
  4620 + if (a.fcsj.indexOf("00:") == 0 ||
  4621 + a.fcsj.indexOf("01:") == 0 ||
  4622 + a.fcsj.indexOf("02:") == 0) {
  4623 + a_wrapTime.add(1, "day");
  4624 + }
  4625 + if (b.fcsj.indexOf("00:") == 0 ||
  4626 + b.fcsj.indexOf("01:") == 0 ||
  4627 + b.fcsj.indexOf("02:") == 0) {
  4628 + b_wrapTime.add(1, "day");
  4629 + }
  4630 +
  4631 + if (a_wrapTime.isBefore(b_wrapTime)) {
  4632 + return -1;
  4633 + } else if (a_wrapTime.isAfter(b_wrapTime)) {
  4634 + return 1;
  4635 + } else {
  4636 + return 0;
  4637 + }
  4638 +
  4639 + });
  4640 + // 发车时间升序排序下行班次
  4641 + ctrl.internalBcModel.down_bc_list_asc.sort(function(a, b) {
  4642 + var a_wrapTime = _fun_WrapTime(a.fcsj);
  4643 + var b_wrapTime = _fun_WrapTime(b.fcsj);
  4644 +
  4645 + // 判定如果发车时间是以00,01,02,03开头的,说明是下一天凌晨的班次,需要加1天判定
  4646 + // TODO:以后要配合首班车的发车时间判定
  4647 + if (a.fcsj.indexOf("00:") == 0 ||
  4648 + a.fcsj.indexOf("01:") == 0 ||
  4649 + a.fcsj.indexOf("02:") == 0) {
  4650 + a_wrapTime.add(1, "day");
  4651 + }
  4652 + if (b.fcsj.indexOf("00:") == 0 ||
  4653 + b.fcsj.indexOf("01:") == 0 ||
  4654 + b.fcsj.indexOf("02:") == 0) {
  4655 + b_wrapTime.add(1, "day");
  4656 + }
  4657 +
  4658 + if (a_wrapTime.isBefore(b_wrapTime)) {
  4659 + return -1;
  4660 + } else if (a_wrapTime.isAfter(b_wrapTime)) {
  4661 + return 1;
  4662 + } else {
  4663 + return 0;
  4664 + }
  4665 + });
  4666 +
  4667 + // 构造路牌block车次链,按照发车顺序排序
  4668 + angular.forEach(ctrl.internalBcModel.up_bc_list_asc, function(data, index) {
  4669 + if (!ctrl.internalLpBlockModel[data.lpName]) {
  4670 + ctrl.internalLpBlockModel[data.lpName] = [];
  4671 + }
  4672 + ctrl.internalLpBlockModel[data.lpName].push({
  4673 + fcsj : data.fcsj,
  4674 + isUp : true,
  4675 + fcno : data._fcno,
  4676 + index : index
  4677 + });
  4678 + });
  4679 + angular.forEach(ctrl.internalBcModel.down_bc_list_asc, function(data, index) {
  4680 + if (!ctrl.internalLpBlockModel[data.lpName]) {
  4681 + ctrl.internalLpBlockModel[data.lpName] = [];
  4682 + }
  4683 + ctrl.internalLpBlockModel[data.lpName].push({
  4684 + fcsj : data.fcsj,
  4685 + isUp : false,
  4686 + fcno : data._fcno,
  4687 + index : index
  4688 + });
  4689 + });
  4690 + angular.forEach(ctrl.internalLpBlockModel, function(value, key) {
  4691 + value.sort(function (a, b) {
  4692 + if (a.fcno < b.fcno) {
  4693 + return -1;
  4694 + } else if (a.fcno > b.fcno) {
  4695 + return 1;
  4696 + } else {
  4697 + return 0;
  4698 + }
  4699 + });
  4700 + });
  4701 +
  4702 +
  4703 + };
  4704 +
  4705 + return {
  4706 + pre : function(scope, element, attr) {
  4707 + // TODO:
  4708 + },
  4709 + post : function(scope, element, attr) {
  4710 + // 班次html点击事件
  4711 + scope[ctrlAs].$$bcDD_Click = function(index, xlDir) {
  4712 + _fun_bcDDViewMove(scope[ctrlAs], index, xlDir);
  4713 + };
  4714 +
  4715 + // 监控ngModel绑定的外部数据源的刷新状态变化
  4716 + scope.$watch(
  4717 + function() {
  4718 + return scope[ctrlAs].ds.refreshInfos;
  4719 + },
  4720 + function(newValue, oldValue) {
  4721 + if (newValue === undefined && oldValue === undefined) {
  4722 + return;
  4723 + }
  4724 + console.log("saTimetable2 refresh");
  4725 + _fun_refreshInternalModel(scope[ctrlAs]);
  4726 + },
  4727 + true
  4728 + );
  4729 + }
  4730 + };
  4731 + }
  4732 + };
  4733 + }
  4734 + ]
4735 4735 );
4736 4736 /**
4737 4737 * 滚动事件控制指令。
... ...
src/main/resources/static/pages/scheduleApp/module/common/prj-common-globalservice-legacy.js
... ... @@ -495,6 +495,30 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;$$SearchInfoService_g&#39;, [&#39;$resource&#39;, fun
495 495 }
496 496 )
497 497 },
  498 + ec_jsy_destroy: { // 驾驶员是否停用
  499 + template: {'jsy.id_eq': -1}, // 查询参数模版
  500 + remote: $resource( // $resource封装对象
  501 + '/eci/validate_jsy_destroy',
  502 + {},
  503 + {
  504 + do: {
  505 + method: 'GET'
  506 + }
  507 + }
  508 + )
  509 + },
  510 + ec_spy_destroy: { // 售票员是否停用
  511 + template: {'spy.id_eq': -1}, // 查询参数模版
  512 + remote: $resource( // $resource封装对象
  513 + '/eci/validate_spy_destroy',
  514 + {},
  515 + {
  516 + do: {
  517 + method: 'GET'
  518 + }
  519 + }
  520 + )
  521 + },
498 522 ec_jsy: { // 驾驶员不能重复配置
499 523 template: {'xl.id_eq': -1, 'xl.name_eq': '-1', 'jsy.id_eq': -1}, // 查询参数模版
500 524 remote: $resource( // $resource封装对象
... ...
src/main/resources/static/pages/scheduleApp/module/common/prj-common-globalservice.js
... ... @@ -1396,6 +1396,30 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;$$SearchInfoService_g&#39;, [&#39;$resource&#39;, fun
1396 1396 }
1397 1397 )
1398 1398 },
  1399 + ec_jsy_destroy: { // 驾驶员是否停用
  1400 + template: {'jsy.id_eq': -1}, // 查询参数模版
  1401 + remote: $resource( // $resource封装对象
  1402 + '/eci/validate_jsy_destroy',
  1403 + {},
  1404 + {
  1405 + do: {
  1406 + method: 'GET'
  1407 + }
  1408 + }
  1409 + )
  1410 + },
  1411 + ec_spy_destroy: { // 售票员是否停用
  1412 + template: {'spy.id_eq': -1}, // 查询参数模版
  1413 + remote: $resource( // $resource封装对象
  1414 + '/eci/validate_spy_destroy',
  1415 + {},
  1416 + {
  1417 + do: {
  1418 + method: 'GET'
  1419 + }
  1420 + }
  1421 + )
  1422 + },
1399 1423 ec_jsy: { // 驾驶员不能重复配置
1400 1424 template: {'xl.id_eq': -1, 'xl.name_eq': '-1', 'jsy.id_eq': -1}, // 查询参数模版
1401 1425 remote: $resource( // $resource封装对象
... ...
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/edit.html
... ... @@ -89,21 +89,55 @@
89 89 searchexp="this.name + '<' + this.workId + '>'"
90 90 required >
91 91 </sa-Select5>
92   - <input type="hidden" name="jsy_h" ng-model="ctrl.employeeConfigForSave.jsy.id"
93   - remote-Warn
94   - remotewtype="ec_jsy"
95   - remotewparam="{{ {'id_eq': ctrl.employeeConfigForSave.id, 'xl.id_eq': ctrl.employeeConfigForSave.xl.id, 'xl.name_eq': ctrl.employeeConfigForSave.xl.name, 'jsy.id_eq': ctrl.employeeConfigForSave.jsy.id} | json}}"
96   - remotewmsgprop="jsy_warn"
97   - />
98 92 </div>
99 93 <!-- 隐藏块,显示验证信息 -->
100 94 <div class="alert alert-danger well-sm" ng-show="myForm.jsy.$error.required">
101 95 驾驶员必须选择
102 96 </div>
  97 +
  98 + <!-- 重复配置 -->
  99 + <input type="hidden" name="jsy_h" ng-model="ctrl.employeeConfigForSave.jsy.id"
  100 + remote-Warn
  101 + remotewtype="ec_jsy"
  102 + remotewparam="{{ {'id_eq': ctrl.employeeConfigForSave.id, 'xl.id_eq': ctrl.employeeConfigForSave.xl.id, 'xl.name_eq': ctrl.employeeConfigForSave.xl.name, 'jsy.id_eq': ctrl.employeeConfigForSave.jsy.id} | json}}"
  103 + remotewmsgprop="jsy_warn"
  104 + />
103 105 <div class="alert alert-warning well-sm" ng-show="ctrl.jsy_warn">
104 106 <i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
105 107 {{ctrl.jsy_warn}}
106 108 </div>
  109 +
  110 + <!-- 是否停用 -->
  111 + <input type="hidden" name="jsy_h_destroy" ng-model="ctrl.employeeConfigForSave.jsy.id"
  112 + remote-Validation
  113 + remotevtype="ec_jsy_destroy"
  114 + remotevparam="{{ {'jsy.id_eq': ctrl.employeeConfigForSave.jsy.id} | json}}" />
  115 + <div class="alert alert-danger well-sm" ng-show="myForm.jsy_h_destroy.$error.remote">
  116 + <i class="fa fa-times-circle" aria-hidden="true"></i>
  117 + {{$remote_msg}}
  118 + </div>
  119 +
  120 + <!-- 公司权限 -->
  121 + <input type="hidden" name="jsy_h_gs" ng-model="ctrl.employeeConfigForSave.jsy.id"
  122 + remote-Validation
  123 + remotevtype="ec_jsy_gs"
  124 + remotevparam="{{ {'xl.id_eq': ctrl.employeeConfigForSave.xl.id, 'xl.name_eq': ctrl.employeeConfigForSave.xl.name, 'jsy.id_eq': ctrl.employeeConfigForSave.jsy.id} | json}}" />
  125 + <div class="alert alert-danger well-sm" ng-show="myForm.jsy_h_gs.$error.remote">
  126 + <i class="fa fa-times-circle" aria-hidden="true"></i>
  127 + {{$remote_msg}}
  128 + </div>
  129 + <!-- 分公司权限 -->
  130 + <input type="hidden" name="jsy_h_fgs" ng-model="ctrl.employeeConfigForSave.jsy.id"
  131 + remote-Warn
  132 + remotewtype="ec_jsy_fgs"
  133 + remotewparam="{{ {'xl.id_eq': ctrl.employeeConfigForSave.xl.id, 'xl.name_eq': ctrl.employeeConfigForSave.xl.name, 'jsy.id_eq': ctrl.employeeConfigForSave.jsy.id} | json}}"
  134 + remotewmsgprop="ec_jsy_fgs_warn"
  135 + />
  136 + <div class="alert alert-warning well-sm" ng-show="ctrl.ec_jsy_fgs_warn">
  137 + <i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
  138 + {{ctrl.ec_jsy_fgs_warn}}
  139 + </div>
  140 +
107 141 </div>
108 142  
109 143 <div class="form-group">
... ... @@ -121,17 +155,51 @@
121 155 searchexp="this.name + '<' + this.workId + '>'"
122 156 >
123 157 </sa-Select5>
124   - <input type="hidden" name="spy_h" ng-model="ctrl.employeeConfigForSave.spy.id"
125   - remote-Warn
126   - remotewtype="ec_spy"
127   - remotewparam="{{ {'id_eq': ctrl.employeeConfigForSave.id, 'xl.id_eq': ctrl.employeeConfigForSave.xl.id, 'xl.name_eq': ctrl.employeeConfigForSave.xl.name, 'spy.id_eq': ctrl.employeeConfigForSave.spy.id} | json}}"
128   - remotewmsgprop="spy_warn"
129   - />
130 158 </div>
  159 +
  160 + <!-- 重复配置 -->
  161 + <input type="hidden" name="spy_h" ng-model="ctrl.employeeConfigForSave.spy.id"
  162 + remote-Warn
  163 + remotewtype="ec_spy"
  164 + remotewparam="{{ {'id_eq': ctrl.employeeConfigForSave.id, 'xl.id_eq': ctrl.employeeConfigForSave.xl.id, 'xl.name_eq': ctrl.employeeConfigForSave.xl.name, 'spy.id_eq': ctrl.employeeConfigForSave.spy.id} | json}}"
  165 + remotewmsgprop="spy_warn"
  166 + />
131 167 <div class="alert alert-warning well-sm" ng-show="ctrl.spy_warn">
132 168 <i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
133 169 {{ctrl.spy_warn}}
134 170 </div>
  171 +
  172 + <!-- 是否停用 -->
  173 + <input type="hidden" name="spy_h_destroy" ng-model="ctrl.employeeConfigForSave.spy.id"
  174 + remote-Validation
  175 + remotevtype="ec_spy_destroy"
  176 + remotevparam="{{ {'spy.id_eq': ctrl.employeeConfigForSave.spy.id} | json}}" />
  177 + <div class="alert alert-danger well-sm" ng-show="myForm.spy_h_destroy.$error.remote">
  178 + <i class="fa fa-times-circle" aria-hidden="true"></i>
  179 + {{$remote_msg}}
  180 + </div>
  181 +
  182 + <!-- 公司权限 -->
  183 + <input type="hidden" name="spy_h_gs" ng-model="ctrl.employeeConfigForSave.spy.id"
  184 + remote-Validation
  185 + remotevtype="ec_spy_gs"
  186 + remotevparam="{{ {'xl.id_eq': ctrl.employeeConfigForSave.xl.id, 'xl.name_eq': ctrl.employeeConfigForSave.xl.name, 'spy.id_eq': ctrl.employeeConfigForSave.spy.id} | json}}" />
  187 + <div class="alert alert-danger well-sm" ng-show="myForm.spy_h_gs.$error.remote">
  188 + <i class="fa fa-times-circle" aria-hidden="true"></i>
  189 + {{$remote_msg}}
  190 + </div>
  191 + <!-- 分公司权限 -->
  192 + <input type="hidden" name="spy_h_fgs" ng-model="ctrl.employeeConfigForSave.spy.id"
  193 + remote-Warn
  194 + remotewtype="ec_spy_fgs"
  195 + remotewparam="{{ {'xl.id_eq': ctrl.employeeConfigForSave.xl.id, 'xl.name_eq': ctrl.employeeConfigForSave.xl.name, 'spy.id_eq': ctrl.employeeConfigForSave.spy.id} | json}}"
  196 + remotewmsgprop="ec_spy_fgs_warn"
  197 + />
  198 + <div class="alert alert-warning well-sm" ng-show="ctrl.ec_spy_fgs_warn">
  199 + <i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
  200 + {{ctrl.ec_spy_fgs_warn}}
  201 + </div>
  202 +
135 203 </div>
136 204  
137 205 <!-- 其他form-group -->
... ...
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/form.html
... ... @@ -89,21 +89,55 @@
89 89 searchexp="this.name + '<' + this.workId + '>'"
90 90 required >
91 91 </sa-Select5>
92   - <input type="hidden" name="jsy_h" ng-model="ctrl.employeeConfigForSave.jsy.id"
93   - remote-Warn
94   - remotewtype="ec_jsy"
95   - remotewparam="{{ {'id_eq': ctrl.employeeConfigForSave.id, 'xl.id_eq': ctrl.employeeConfigForSave.xl.id, 'xl.name_eq': ctrl.employeeConfigForSave.xl.name, 'jsy.id_eq': ctrl.employeeConfigForSave.jsy.id} | json}}"
96   - remotewmsgprop="jsy_warn"
97   - />
98 92 </div>
99 93 <!-- 隐藏块,显示验证信息 -->
100 94 <div class="alert alert-danger well-sm" ng-show="myForm.jsy.$error.required">
101 95 驾驶员必须选择
102 96 </div>
  97 +
  98 + <!-- 重复配置 -->
  99 + <input type="hidden" name="jsy_h" ng-model="ctrl.employeeConfigForSave.jsy.id"
  100 + remote-Warn
  101 + remotewtype="ec_jsy"
  102 + remotewparam="{{ {'id_eq': ctrl.employeeConfigForSave.id, 'xl.id_eq': ctrl.employeeConfigForSave.xl.id, 'xl.name_eq': ctrl.employeeConfigForSave.xl.name, 'jsy.id_eq': ctrl.employeeConfigForSave.jsy.id} | json}}"
  103 + remotewmsgprop="jsy_warn"
  104 + />
103 105 <div class="alert alert-warning well-sm" ng-show="ctrl.jsy_warn">
104 106 <i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
105 107 {{ctrl.jsy_warn}}
106 108 </div>
  109 +
  110 + <!-- 是否停用 -->
  111 + <input type="hidden" name="jsy_h_destroy" ng-model="ctrl.employeeConfigForSave.jsy.id"
  112 + remote-Validation
  113 + remotevtype="ec_jsy_destroy"
  114 + remotevparam="{{ {'jsy.id_eq': ctrl.employeeConfigForSave.jsy.id} | json}}" />
  115 + <div class="alert alert-danger well-sm" ng-show="myForm.jsy_h_destroy.$error.remote">
  116 + <i class="fa fa-times-circle" aria-hidden="true"></i>
  117 + {{$remote_msg}}
  118 + </div>
  119 +
  120 + <!-- 公司权限 -->
  121 + <input type="hidden" name="jsy_h_gs" ng-model="ctrl.employeeConfigForSave.jsy.id"
  122 + remote-Validation
  123 + remotevtype="ec_jsy_gs"
  124 + remotevparam="{{ {'xl.id_eq': ctrl.employeeConfigForSave.xl.id, 'xl.name_eq': ctrl.employeeConfigForSave.xl.name, 'jsy.id_eq': ctrl.employeeConfigForSave.jsy.id} | json}}" />
  125 + <div class="alert alert-danger well-sm" ng-show="myForm.jsy_h_gs.$error.remote">
  126 + <i class="fa fa-times-circle" aria-hidden="true"></i>
  127 + {{$remote_msg}}
  128 + </div>
  129 + <!-- 分公司权限 -->
  130 + <input type="hidden" name="jsy_h_fgs" ng-model="ctrl.employeeConfigForSave.jsy.id"
  131 + remote-Warn
  132 + remotewtype="ec_jsy_fgs"
  133 + remotewparam="{{ {'xl.id_eq': ctrl.employeeConfigForSave.xl.id, 'xl.name_eq': ctrl.employeeConfigForSave.xl.name, 'jsy.id_eq': ctrl.employeeConfigForSave.jsy.id} | json}}"
  134 + remotewmsgprop="ec_jsy_fgs_warn"
  135 + />
  136 + <div class="alert alert-warning well-sm" ng-show="ctrl.ec_jsy_fgs_warn">
  137 + <i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
  138 + {{ctrl.ec_jsy_fgs_warn}}
  139 + </div>
  140 +
107 141 </div>
108 142  
109 143 <div class="form-group">
... ... @@ -121,17 +155,51 @@
121 155 searchexp="this.name + '<' + this.workId + '>'"
122 156 >
123 157 </sa-Select5>
124   - <input type="hidden" name="spy_h" ng-model="ctrl.employeeConfigForSave.spy.id"
125   - remote-Warn
126   - remotewtype="ec_spy"
127   - remotewparam="{{ {'id_eq': ctrl.employeeConfigForSave.id, 'xl.id_eq': ctrl.employeeConfigForSave.xl.id, 'xl.name_eq': ctrl.employeeConfigForSave.xl.name, 'spy.id_eq': ctrl.employeeConfigForSave.spy.id} | json}}"
128   - remotewmsgprop="spy_warn"
129   - />
130 158 </div>
  159 +
  160 + <!-- 重复配置 -->
  161 + <input type="hidden" name="spy_h" ng-model="ctrl.employeeConfigForSave.spy.id"
  162 + remote-Warn
  163 + remotewtype="ec_spy"
  164 + remotewparam="{{ {'id_eq': ctrl.employeeConfigForSave.id, 'xl.id_eq': ctrl.employeeConfigForSave.xl.id, 'xl.name_eq': ctrl.employeeConfigForSave.xl.name, 'spy.id_eq': ctrl.employeeConfigForSave.spy.id} | json}}"
  165 + remotewmsgprop="spy_warn"
  166 + />
131 167 <div class="alert alert-warning well-sm" ng-show="ctrl.spy_warn">
132 168 <i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
133 169 {{ctrl.spy_warn}}
134 170 </div>
  171 +
  172 + <!-- 是否停用 -->
  173 + <input type="hidden" name="spy_h_destroy" ng-model="ctrl.employeeConfigForSave.spy.id"
  174 + remote-Validation
  175 + remotevtype="ec_spy_destroy"
  176 + remotevparam="{{ {'spy.id_eq': ctrl.employeeConfigForSave.spy.id} | json}}" />
  177 + <div class="alert alert-danger well-sm" ng-show="myForm.spy_h_destroy.$error.remote">
  178 + <i class="fa fa-times-circle" aria-hidden="true"></i>
  179 + {{$remote_msg}}
  180 + </div>
  181 +
  182 + <!-- 公司权限 -->
  183 + <input type="hidden" name="spy_h_gs" ng-model="ctrl.employeeConfigForSave.spy.id"
  184 + remote-Validation
  185 + remotevtype="ec_spy_gs"
  186 + remotevparam="{{ {'xl.id_eq': ctrl.employeeConfigForSave.xl.id, 'xl.name_eq': ctrl.employeeConfigForSave.xl.name, 'spy.id_eq': ctrl.employeeConfigForSave.spy.id} | json}}" />
  187 + <div class="alert alert-danger well-sm" ng-show="myForm.spy_h_gs.$error.remote">
  188 + <i class="fa fa-times-circle" aria-hidden="true"></i>
  189 + {{$remote_msg}}
  190 + </div>
  191 + <!-- 分公司权限 -->
  192 + <input type="hidden" name="spy_h_fgs" ng-model="ctrl.employeeConfigForSave.spy.id"
  193 + remote-Warn
  194 + remotewtype="ec_spy_fgs"
  195 + remotewparam="{{ {'xl.id_eq': ctrl.employeeConfigForSave.xl.id, 'xl.name_eq': ctrl.employeeConfigForSave.xl.name, 'spy.id_eq': ctrl.employeeConfigForSave.spy.id} | json}}"
  196 + remotewmsgprop="ec_spy_fgs_warn"
  197 + />
  198 + <div class="alert alert-warning well-sm" ng-show="ctrl.ec_spy_fgs_warn">
  199 + <i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
  200 + {{ctrl.ec_spy_fgs_warn}}
  201 + </div>
  202 +
135 203 </div>
136 204  
137 205 <!-- 其他form-group -->
... ...