Commit 037461174b03eb58655db3d2a5ed4895def6f0a5
1 parent
6321c1ec
Update
Showing
5 changed files
with
44 additions
and
24 deletions
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-detail.html
| ... | ... | @@ -19,7 +19,7 @@ |
| 19 | 19 | <i class="fa fa-circle"></i> |
| 20 | 20 | </li> |
| 21 | 21 | <li> |
| 22 | - <a ui-sref="ttInfoDetailManage_edit({xlid: ctrl.xlid, ttid : ctrl.ttid, xlname: ctrl.xlname, ttname : ctrl.ttname})"><span ng-bind="ctrl.title1"></span></a> | |
| 22 | + <a ui-sref="ttInfoDetailManage_edit3({xlid: ctrl.xlid, ttid : ctrl.ttid, xlname: ctrl.xlname, ttname : ctrl.ttname})"><span ng-bind="ctrl.title1"></span></a> | |
| 23 | 23 | <i class="fa fa-circle"></i> |
| 24 | 24 | </li> |
| 25 | 25 | <li> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-detail2.html
| ... | ... | @@ -19,7 +19,7 @@ |
| 19 | 19 | <i class="fa fa-circle"></i> |
| 20 | 20 | </li> |
| 21 | 21 | <li> |
| 22 | - <a ui-sref="ttInfoDetailManage_edit({xlid: ctrl.xlid, ttid : ctrl.ttid, xlname: ctrl.xlname, ttname : ctrl.ttname})"><span ng-bind="ctrl.title1"></span></a> | |
| 22 | + <a ui-sref="ttInfoDetailManage_edit3({xlid: ctrl.xlid, ttid : ctrl.ttid, xlname: ctrl.xlname, ttname : ctrl.ttname})"><span ng-bind="ctrl.title1"></span></a> | |
| 23 | 23 | <i class="fa fa-circle"></i> |
| 24 | 24 | </li> |
| 25 | 25 | <li> |
| ... | ... | @@ -54,7 +54,7 @@ |
| 54 | 54 | cmaps="{'qdz.id' : 'stationid'}" |
| 55 | 55 | dcname="qdz.id" |
| 56 | 56 | icname="stationid" |
| 57 | - dsparams="{{ {type: 'ajax', param:{'xlid': ctrl.xlid, 'xldir': ctrl.TimeTableDetailForSave.xlDir}, atype:'zd' } | json }}" | |
| 57 | + dsparams="{{ {type: 'ajax', param:{'xlid': ctrl.xlid, 'xldir': ctrl.tt.xlDir}, atype:'zd' } | json }}" | |
| 58 | 58 | iterobjname="item" |
| 59 | 59 | iterobjexp="item.stationname" |
| 60 | 60 | searchph="请输拼音..." |
| ... | ... | @@ -71,7 +71,7 @@ |
| 71 | 71 | cmaps="{'zdz.id' : 'stationid'}" |
| 72 | 72 | dcname="zdz.id" |
| 73 | 73 | icname="stationid" |
| 74 | - dsparams="{{ {type: 'ajax', param:{'xlid': ctrl.xlid, 'xldir': ctrl.TimeTableDetailForSave.xlDir}, atype:'zd' } | json }}" | |
| 74 | + dsparams="{{ {type: 'ajax', param:{'xlid': ctrl.xlid, 'xldir': ctrl.tt.xlDir}, atype:'zd' } | json }}" | |
| 75 | 75 | iterobjname="item" |
| 76 | 76 | iterobjexp="item.stationname" |
| 77 | 77 | searchph="请输拼音..." | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit3.html
| ... | ... | @@ -61,6 +61,12 @@ |
| 61 | 61 | </li> |
| 62 | 62 | <li class="divider"></li> |
| 63 | 63 | <li> |
| 64 | + <a href="javascript:" class="tool-action" ng-click="ctrl.clearsel()"> | |
| 65 | + <i class="fa fa-refresh"></i> | |
| 66 | + 清除选择 | |
| 67 | + </a> | |
| 68 | + </li> | |
| 69 | + <li> | |
| 64 | 70 | <a href="javascript:" class="tool-action" ng-click="ctrl.refresh()"> |
| 65 | 71 | <i class="fa fa-refresh"></i> |
| 66 | 72 | 刷行数据 | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/timeTableDetailManage_old.js
| ... | ... | @@ -182,18 +182,8 @@ angular.module('ScheduleApp').factory( |
| 182 | 182 | deferred.reject(); |
| 183 | 183 | } |
| 184 | 184 | } else { |
| 185 | - for (var key in updateObject) { | |
| 186 | - if (updateObject[key]) { | |
| 187 | - if (key == 'tcc' || key == 'qdz' || key == 'zdz') { | |
| 188 | - if (updateObject[key].id) { | |
| 189 | - value[key] = updateObject[key]; | |
| 190 | - } | |
| 191 | - } else { | |
| 192 | - value[key] = updateObject[key]; | |
| 193 | - } | |
| 185 | + updateObject.reSetTTinfoDetail(value); | |
| 194 | 186 | |
| 195 | - } | |
| 196 | - } | |
| 197 | 187 | } |
| 198 | 188 | value.$save(function() { |
| 199 | 189 | if (value.status == 'ERROR') { |
| ... | ... | @@ -285,6 +275,15 @@ angular.module('ScheduleApp').controller( |
| 285 | 275 | true |
| 286 | 276 | ); |
| 287 | 277 | |
| 278 | + // 清除选择 | |
| 279 | + self.clearsel = function() { | |
| 280 | + var ds = service.getEditInfo().detailInfos; | |
| 281 | + for (var i = 0; i < ds.length; i++) { | |
| 282 | + for (var j = 0; j < ds[i].length; j++) { | |
| 283 | + ds[i][j].sel = false; | |
| 284 | + } | |
| 285 | + } | |
| 286 | + }; | |
| 288 | 287 | // 刷新时刻表数据 |
| 289 | 288 | self.refresh = function() { |
| 290 | 289 | service.refreshEditInfo(self.xlid, self.ttid); |
| ... | ... | @@ -555,10 +554,9 @@ angular.module('ScheduleApp').controller( |
| 555 | 554 | 'TimeTableDetailManageFormCtrl_old2', |
| 556 | 555 | [ |
| 557 | 556 | 'TimeTableDetailManageService_old', |
| 558 | - 'ttInfoDetailService_edit3', | |
| 559 | 557 | '$stateParams', |
| 560 | 558 | '$state', |
| 561 | - function(service, service2, $stateParams, $state) { | |
| 559 | + function(service, $stateParams, $state) { | |
| 562 | 560 | var self = this; |
| 563 | 561 | var TTInfoDetail = service.getQueryClass(); |
| 564 | 562 | |
| ... | ... | @@ -570,10 +568,26 @@ angular.module('ScheduleApp').controller( |
| 570 | 568 | self.float_regex = /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/; |
| 571 | 569 | |
| 572 | 570 | // 欲保存的busInfo信息,绑定 |
| 573 | - self.tt = new TTInfoDetail; | |
| 574 | - self.tt.tcc = {id: undefined}; | |
| 575 | - self.tt.qdz = {id: undefined}; | |
| 576 | - self.tt.zdz = {id: undefined}; | |
| 571 | + //self.tt = new TTInfoDetail; | |
| 572 | + self.tt = { | |
| 573 | + xlDir: undefined, | |
| 574 | + tcc: {id: undefined}, | |
| 575 | + qdz: {id: undefined}, | |
| 576 | + zdz: {id: undefined}, | |
| 577 | + reSetTTinfoDetail: function(value) { | |
| 578 | + for (var key in this) { | |
| 579 | + if (!angular.isFunction(this[key])) { | |
| 580 | + if (key == 'tcc' || key == 'qdz' || key == 'zdz') { | |
| 581 | + if (this[key].id) { | |
| 582 | + value[key] = this[key]; | |
| 583 | + } | |
| 584 | + } else if (this[key]) { | |
| 585 | + value[key] = this[key]; | |
| 586 | + } | |
| 587 | + } | |
| 588 | + } | |
| 589 | + } | |
| 590 | + }; | |
| 577 | 591 | |
| 578 | 592 | // 获取传过来的id,有的话就是修改,获取一遍数据 |
| 579 | 593 | self.xlid = $stateParams.xlid; // 获取传过来的线路id | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/list.html
| ... | ... | @@ -79,12 +79,12 @@ |
| 79 | 79 | <span class="glyphicon glyphicon-remove" ng-if="info.isCancel == '1'"></span> |
| 80 | 80 | </td> |
| 81 | 81 | <td> |
| 82 | - <a ui-sref="ttInfoDetailManage_edit({xlid: info.xl.id, ttid : info.id, xlname: info.xl.name, ttname : info.name, rflag : true})" | |
| 83 | - class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 编辑 </a> | |
| 82 | + <!--<a ui-sref="ttInfoDetailManage_edit({xlid: info.xl.id, ttid : info.id, xlname: info.xl.name, ttname : info.name, rflag : true})"--> | |
| 83 | + <!--class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 编辑 </a>--> | |
| 84 | 84 | <!--<a ui-sref="ttInfoDetailManage_edit2({xlid: info.xl.id, ttid : info.id, xlname: info.xl.name, ttname : info.name})"--> |
| 85 | 85 | <!--class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 编辑2 </a>--> |
| 86 | 86 | <a ui-sref="ttInfoDetailManage_edit3({xlid: info.xl.id, ttid : info.id, xlname: info.xl.name, ttname : info.name, rflag : true})" |
| 87 | - class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 编辑3 </a> | |
| 87 | + class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 编辑 </a> | |
| 88 | 88 | <a ng-click="ctrl.toTtInfoDetailAuto(info.id)" |
| 89 | 89 | class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 生成 </a> |
| 90 | 90 | <a ui-sref="ttInfoDetailManage_form({xlid: info.xl.id, ttid : info.id, xlname: info.xl.name, ttname : info.name})" | ... | ... |