Commit e7bdcc806293a0d79056979bd13b5ea8203705fd
1 parent
e48ded29
update...
Showing
4 changed files
with
68 additions
and
4 deletions
src/main/java/com/bsth/data/gpsdata/late_adjust/LateAdjustHandle.java renamed to src/main/java/com/bsth/data/schedule/late_adjust/LateAdjustHandle.java
src/main/java/com/bsth/entity/realcontrol/ScheduleRealInfo.java
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/jhlb.html
| ... | ... | @@ -22,10 +22,33 @@ |
| 22 | 22 | <div class="uk-grid"> |
| 23 | 23 | <div class="uk-width-1-1"> |
| 24 | 24 | <div class="uk-form-row"> |
| 25 | - <label class="uk-form-label" >班次</label> | |
| 25 | + <label class="uk-form-label" >路牌</label> | |
| 26 | + <div class="uk-form-controls"> | |
| 27 | + <select name="lpName"> | |
| 28 | + {{if lps.length > 1}} | |
| 29 | + <option value="-100">全部</option> | |
| 30 | + {{/if}} | |
| 31 | + {{each lps as lpName i}} | |
| 32 | + <option value="{{lpName}}">{{lpName}}</option> | |
| 33 | + {{/each}} | |
| 34 | + </select> | |
| 35 | + </div> | |
| 36 | + </div> | |
| 37 | + </div> | |
| 38 | + </div> | |
| 39 | + | |
| 40 | + <div class="uk-grid"> | |
| 41 | + <div class="uk-width-1-1"> | |
| 42 | + <div class="uk-form-row"> | |
| 43 | + <label class="uk-form-label" >班次 | |
| 44 | + <hr> | |
| 45 | + <label>全选 | |
| 46 | + <input class="i-cbox" name="allCheck" type="checkbox" > | |
| 47 | + </label> | |
| 48 | + </label> | |
| 26 | 49 | <div class="uk-form-controls sch-time-checkbox-list"> |
| 27 | 50 | {{each list as sch i}} |
| 28 | - <label {{if sch.destroy}}class="destroy-sch"{{/if}}> | |
| 51 | + <label data-lp="{{sch.lpName}}" {{if sch.destroy}}class="destroy-sch"{{/if}}> | |
| 29 | 52 | <input class="i-cbox" name="ids[]" value="{{sch.id}}" type="checkbox" {{if sch.destroy}}disabled{{/if}}> |
| 30 | 53 | {{sch.dfsj}} |
| 31 | 54 | |
| ... | ... | @@ -94,10 +117,17 @@ |
| 94 | 117 | return item.clZbh == sch.clZbh; |
| 95 | 118 | }).sort(gb_schedule_table.schedule_sort); |
| 96 | 119 | |
| 120 | + //获取路牌 | |
| 121 | + var lps = {}; | |
| 122 | + $.each(schArr, function () { | |
| 123 | + lps[this.lpName]=1; | |
| 124 | + }); | |
| 125 | + | |
| 97 | 126 | var formHtml = template('schedule-jhlb-form-temp', { |
| 98 | 127 | sch: sch, |
| 99 | 128 | list: schArr, |
| 100 | - adjustExps:adjustExps | |
| 129 | + adjustExps:adjustExps, | |
| 130 | + lps: gb_common.get_keys(lps) | |
| 101 | 131 | }); |
| 102 | 132 | $('form', modal).html(formHtml); |
| 103 | 133 | |
| ... | ... | @@ -137,6 +167,35 @@ |
| 137 | 167 | var rem=$('[name=remarks]', f); |
| 138 | 168 | rem.val(rem.val() + $(this).val() + ',').trigger('input'); |
| 139 | 169 | }); |
| 170 | + | |
| 171 | + //路牌切换事件 | |
| 172 | + $('[name=lpName]', f).on('change', function () { | |
| 173 | + var v = $(this).val(); | |
| 174 | + var lbs = $('.sch-time-checkbox-list label', modal); | |
| 175 | + if(v=='-100'){ | |
| 176 | + //显示全部 | |
| 177 | + lbs.show(); | |
| 178 | + } | |
| 179 | + else { | |
| 180 | + lbs.hide().each(function () { | |
| 181 | + if($(this).data('lp')==v) | |
| 182 | + $(this).show(); | |
| 183 | + else{ | |
| 184 | + //将隐藏的checkbox取消选中 | |
| 185 | + $(this).find('input[type=checkbox]')[0].checked=false; | |
| 186 | + } | |
| 187 | + }); | |
| 188 | + } | |
| 189 | + }); | |
| 190 | + | |
| 191 | + //全选 | |
| 192 | + $('[name=allCheck]', f).on('click', function () { | |
| 193 | + var cbs = $('.sch-time-checkbox-list label input[type=checkbox]:visible:enabled', modal); | |
| 194 | + var status = this.checked; | |
| 195 | + cbs.each(function () { | |
| 196 | + this.checked = status; | |
| 197 | + }); | |
| 198 | + }); | |
| 140 | 199 | }); |
| 141 | 200 | })(); |
| 142 | 201 | </script> | ... | ... |
src/main/resources/static/real_control_v2/js/line_schedule/context_menu.js
| ... | ... | @@ -22,6 +22,10 @@ var gb_schedule_context_menu = (function () { |
| 22 | 22 | var list = schArray.filter(function (sch) { |
| 23 | 23 | return sch.bcType != 'out' && sch.bcType != 'in' && sch.fcsjActual == null; |
| 24 | 24 | }); |
| 25 | + if(list.length == 0){ | |
| 26 | + notify_err('没有需要调整的班次!'); | |
| 27 | + return; | |
| 28 | + } | |
| 25 | 29 | open_modal(folder + '/multi_dftz.html', { |
| 26 | 30 | list: list |
| 27 | 31 | }, modal_opts); | ... | ... |