Commit 4c7586dfb9a8db57d6aa606f8263992ac7e427b8
1 parent
e834adca
update...
Showing
16 changed files
with
665 additions
and
63 deletions
src/main/java/com/bsth/data/abnormal/MainAbnormalClient.java
| ... | ... | @@ -10,6 +10,7 @@ import org.slf4j.LoggerFactory; |
| 10 | 10 | import org.springframework.beans.factory.annotation.Autowired; |
| 11 | 11 | import org.springframework.stereotype.Component; |
| 12 | 12 | |
| 13 | +import java.util.ArrayList; | |
| 13 | 14 | import java.util.List; |
| 14 | 15 | |
| 15 | 16 | /** |
| ... | ... | @@ -39,18 +40,29 @@ public class MainAbnormalClient { |
| 39 | 40 | public void put(AbnormalEntity ae){ |
| 40 | 41 | lineMultimap.put(ae.getLineCode(), ae); |
| 41 | 42 | |
| 42 | - if(ae.getType() == -1) | |
| 43 | + if(ae.getType() == 0) | |
| 43 | 44 | attendanceHandler.put(ae); |
| 44 | - else if(ae.getType() == -2) | |
| 45 | + else if(ae.getType() == 1) | |
| 45 | 46 | inOutHandler.put(ae); |
| 46 | 47 | |
| 47 | 48 | //web socket |
| 48 | 49 | sendUtils.abnormal_ydwd(ae); |
| 49 | 50 | } |
| 50 | 51 | |
| 51 | - public void dftz(Long id, String source){ | |
| 52 | - inOutHandler.dftzJd(id, source); | |
| 53 | - attendanceHandler.dftzJd(id, source); | |
| 52 | + public List<AbnormalEntity> dftz(Long id, String source){ | |
| 53 | + List<AbnormalEntity> aes = new ArrayList<>(); | |
| 54 | + | |
| 55 | + AbnormalEntity a1 = inOutHandler.dftzJd(id, source); | |
| 56 | + | |
| 57 | + if(null != a1) | |
| 58 | + aes.add(a1); | |
| 59 | + | |
| 60 | + AbnormalEntity a2 = attendanceHandler.dftzJd(id, source); | |
| 61 | + | |
| 62 | + if(null != a2) | |
| 63 | + aes.add(a2); | |
| 64 | + | |
| 65 | + return aes; | |
| 54 | 66 | } |
| 55 | 67 | |
| 56 | 68 | public List<AbnormalEntity> findByLine(String lineCode){ | ... | ... |
src/main/java/com/bsth/data/abnormal/handler/AttendanceHandler.java
| ... | ... | @@ -32,12 +32,12 @@ public class AttendanceHandler { |
| 32 | 32 | * 异常处理(待发调整) |
| 33 | 33 | * @param id |
| 34 | 34 | */ |
| 35 | - public void dftzJd(Long id, String source){ | |
| 35 | + public AbnormalEntity dftzJd(Long id, String source){ | |
| 36 | 36 | Long t = System.currentTimeMillis(); |
| 37 | 37 | |
| 38 | 38 | AbnormalEntity ae = schIdMap.get(id); |
| 39 | 39 | if(null == ae) |
| 40 | - return; | |
| 40 | + return null; | |
| 41 | 41 | |
| 42 | 42 | ScheduleInOut sio = ScheduleDataBuffer.findById(id); |
| 43 | 43 | |
| ... | ... | @@ -49,7 +49,10 @@ public class AttendanceHandler { |
| 49 | 49 | sio.setAbnormalStatus(0); |
| 50 | 50 | |
| 51 | 51 | schIdMap.remove(ae.getSchId()); |
| 52 | + | |
| 53 | + return ae; | |
| 52 | 54 | } |
| 55 | + return null; | |
| 53 | 56 | } |
| 54 | 57 | |
| 55 | 58 | public void handler(Long id){ | ... | ... |
src/main/java/com/bsth/data/abnormal/handler/InOutHandler.java
| ... | ... | @@ -29,12 +29,12 @@ public class InOutHandler { |
| 29 | 29 | * 异常处理(待发调整) |
| 30 | 30 | * @param id |
| 31 | 31 | */ |
| 32 | - public void dftzJd(Long id, String source){ | |
| 32 | + public AbnormalEntity dftzJd(Long id, String source){ | |
| 33 | 33 | Long t = System.currentTimeMillis(); |
| 34 | 34 | |
| 35 | 35 | AbnormalEntity ae = schIdMap.get(id); |
| 36 | 36 | if(null == ae) |
| 37 | - return; | |
| 37 | + return null; | |
| 38 | 38 | |
| 39 | 39 | ScheduleInOut sio = ScheduleDataBuffer.findById(id); |
| 40 | 40 | |
| ... | ... | @@ -46,7 +46,10 @@ public class InOutHandler { |
| 46 | 46 | sio.setAbnormalStatus(-1); |
| 47 | 47 | |
| 48 | 48 | schIdMap.remove(ae.getSchId()); |
| 49 | + | |
| 50 | + return ae; | |
| 49 | 51 | } |
| 52 | + return null; | |
| 50 | 53 | } |
| 51 | 54 | |
| 52 | 55 | public void handler(Long id){ | ... | ... |
src/main/java/com/bsth/data/schedule/real/ScheduleDataBuffer.java
src/main/java/com/bsth/service/schedule/impl/ScheduleServiceImpl.java
| ... | ... | @@ -83,9 +83,15 @@ public class ScheduleServiceImpl implements ScheduleService { |
| 83 | 83 | Map<String, Object> rs = new HashMap<>(); |
| 84 | 84 | try { |
| 85 | 85 | List<String> lineArray = Splitter.on(",").splitToList(idx); |
| 86 | - List<AbnormalEntity> list = new ArrayList<>(); | |
| 86 | + List<AbnormalEntity> list = new ArrayList<>(), | |
| 87 | + subList; | |
| 87 | 88 | for (String lineCode : lineArray) { |
| 88 | - list.addAll(mainAbnormalClient.findByLine(lineCode)); | |
| 89 | + subList = mainAbnormalClient.findByLine(lineCode); | |
| 90 | + | |
| 91 | + for(AbnormalEntity ae : subList){ | |
| 92 | + if(null == ae.getHandlerTime()) | |
| 93 | + list.add(ae); | |
| 94 | + } | |
| 89 | 95 | } |
| 90 | 96 | |
| 91 | 97 | //排序 |
| ... | ... | @@ -152,7 +158,10 @@ public class ScheduleServiceImpl implements ScheduleService { |
| 152 | 158 | ScheduleDataBuffer.put(sio); |
| 153 | 159 | |
| 154 | 160 | //处理相关异常 |
| 155 | - mainAbnormalClient.dftz(sio.getId(), "调档"); | |
| 161 | + List<AbnormalEntity> aes = mainAbnormalClient.dftz(sio.getId(), "调档"); | |
| 162 | + | |
| 163 | + rs.put("aes", aes); | |
| 164 | + rs.put("t", ScheduleDataBuffer.findById(sio.getId())); | |
| 156 | 165 | } |
| 157 | 166 | }catch (Exception e){ |
| 158 | 167 | logger.error("", e); | ... | ... |
src/main/resources/static/pages/abnormal/fragments/abnormal_handler.html renamed to src/main/resources/static/pages/abnormal/fragments/type_0/abnormal_handler.html
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | <script> |
| 15 | 15 | (function () { |
| 16 | 16 | var wrap = '.o_s_abnormal_handler_modal', modalId, |
| 17 | - folder = '/pages/abnormal/fragments/',ae; | |
| 17 | + folder = '/pages/abnormal/fragments/type_0/',ae; | |
| 18 | 18 | |
| 19 | 19 | $(wrap).on('init', function (e, data) { |
| 20 | 20 | e.stopPropagation(); | ... | ... |
src/main/resources/static/pages/abnormal/fragments/type_0/h_cont_dftz.html
0 → 100644
| 1 | +<div class="handler_cont_dftz_wrap modal_dftz_wrap"> | |
| 2 | + <div class="dftz_form_card"> | |
| 3 | + <form class="uk-grid-small uk-form-horizontal" uk-grid> | |
| 4 | + <div uk-spinner></div> | |
| 5 | + </form> | |
| 6 | + </div> | |
| 7 | + <script> | |
| 8 | + (function () { | |
| 9 | + | |
| 10 | + var wrap = '.handler_cont_dftz_wrap', ae, inoutSch, modalId; | |
| 11 | + | |
| 12 | + | |
| 13 | + $(wrap).on('init', function (e, data) { | |
| 14 | + e.stopPropagation(); | |
| 15 | + if ($(this).attr('data-init') == 1) | |
| 16 | + return; | |
| 17 | + | |
| 18 | + modalId = data.modalId; | |
| 19 | + ae = data.ae; | |
| 20 | + | |
| 21 | + inoutSch = gb_os_card.findByLineCode(ae.lineCode)[ae.schId]; | |
| 22 | + | |
| 23 | + //加载集调班次信息 | |
| 24 | + gb_common.$get('/in_out/findSchByLpName', { | |
| 25 | + lineCode: inoutSch.lineCode, | |
| 26 | + lpName: inoutSch.lpName | |
| 27 | + }, readerScheduleList); | |
| 28 | + | |
| 29 | + $(this).attr('data-init', 1); | |
| 30 | + | |
| 31 | + //提交 | |
| 32 | + $(wrap).on('click', '.submit-btn', _submit); | |
| 33 | + }); | |
| 34 | + | |
| 35 | + var readerScheduleList = function (rs) { | |
| 36 | + if (!rs.list || rs.list.length == 0) { | |
| 37 | + $('.dftz_form_card>form', wrap).html('<p style="color: red;">加载数据失败!</p>'); | |
| 38 | + return; | |
| 39 | + } | |
| 40 | + var currSch; | |
| 41 | + for (var i = 0, sch; sch = rs.list[i++];) { | |
| 42 | + if (sch.id == inoutSch.id) | |
| 43 | + currSch = sch; | |
| 44 | + } | |
| 45 | + var htmlStr = template('jd_schedule_form_table_002-temp', { | |
| 46 | + list: rs.list, | |
| 47 | + currSch: currSch, | |
| 48 | + tcc_code: current_tcc_code | |
| 49 | + }); | |
| 50 | + $('.dftz_form_card>form', wrap).html(htmlStr); | |
| 51 | + | |
| 52 | + | |
| 53 | + //将当前出场班次之前的班次都禁选 | |
| 54 | + var trs = $('.sch_list_table tr', wrap); | |
| 55 | + for (var i = 0, row; row = trs[i++];) { | |
| 56 | + if ($(row).data('id') == inoutSch.id) | |
| 57 | + break; | |
| 58 | + $(row).addClass('disabled') | |
| 59 | + .find('input[type=checkbox]') | |
| 60 | + .attr('disabled', 'disabled'); | |
| 61 | + } | |
| 62 | + //选中当前出场班次 | |
| 63 | + //$('.sch_list_table tr[data-id="'+inoutSch.id+'"]', wrap).trigger('click'); | |
| 64 | + | |
| 65 | + //滚动条 | |
| 66 | + $('.sch_list_table_wrap', wrap).perfectScrollbar({suppressScrollX: true}); | |
| 67 | + }; | |
| 68 | + | |
| 69 | + $(wrap).on('click', '.destroy_c_box', function () { | |
| 70 | + var $label = $(this).parent(), | |
| 71 | + $body = $('.destroy_body_panel', wrap); | |
| 72 | + if (this.checked) { | |
| 73 | + $label.addClass('ct_active'); | |
| 74 | + $body.show(); | |
| 75 | + | |
| 76 | + //滚动到可视区域 | |
| 77 | + var cont = $('.sch_list_table_wrap', wrap); | |
| 78 | + var dl = $('.sch_list_table tr[data-id="' + inoutSch.id + '"]', wrap) | |
| 79 | + ,slt = dl.offset().top - cont.offset().top + cont.scrollTop() - 38; | |
| 80 | + cont.animate({ | |
| 81 | + scrollTop: slt<0?1:slt | |
| 82 | + }, 300); | |
| 83 | + } | |
| 84 | + else { | |
| 85 | + $label.removeClass('ct_active'); | |
| 86 | + $body.hide(); | |
| 87 | + } | |
| 88 | + }); | |
| 89 | + | |
| 90 | + | |
| 91 | + /** | |
| 92 | + * row 点击选中 | |
| 93 | + */ | |
| 94 | + $(wrap).on('click', '.sch_list_table tr', function () { | |
| 95 | + if ($(this).hasClass('disabled')) | |
| 96 | + return; | |
| 97 | + var cbox = $('input[type=checkbox]', this)[0]; | |
| 98 | + if ($(this).hasClass('active')) { | |
| 99 | + $(this).removeClass('active'); | |
| 100 | + cbox.checked = false; | |
| 101 | + } | |
| 102 | + else { | |
| 103 | + $(this).addClass('active'); | |
| 104 | + cbox.checked = true; | |
| 105 | + | |
| 106 | + var cells = this.cells; | |
| 107 | + var f = $('.tzrc_form_card form', wrap); | |
| 108 | + $('[name=nbbm]', f).val($(cells[4]).text()); | |
| 109 | + $('[name=jsy]', f).val($(cells[2]).text()); | |
| 110 | + $('[name=spy]', f).val($(cells[3]).text()); | |
| 111 | + } | |
| 112 | + }); | |
| 113 | + | |
| 114 | + //全选 | |
| 115 | + $(wrap).on('click', '#globalCheckBox', function () { | |
| 116 | + var trs = $('.sch_list_table tr', wrap); | |
| 117 | + var cbox; | |
| 118 | + for (var i = 0, row; row = trs[i++];) { | |
| 119 | + if ($(row).hasClass('disabled')) | |
| 120 | + continue; | |
| 121 | + | |
| 122 | + cbox = $('input[type=checkbox]', row)[0]; | |
| 123 | + | |
| 124 | + if (this.checked) | |
| 125 | + $(row).addClass('active'); | |
| 126 | + else | |
| 127 | + $(row).removeClass('active'); | |
| 128 | + cbox.checked = this.checked; | |
| 129 | + } | |
| 130 | + }); | |
| 131 | + | |
| 132 | + | |
| 133 | + function _submit() { | |
| 134 | + var f = $('.dftz_form_card>form', wrap); | |
| 135 | + var fData = f.serializeJSON(); | |
| 136 | + if(!fData['remarks']){ | |
| 137 | + _shake_elem($('[name=remarks]', f)); | |
| 138 | + return UIkit.notification('你必须输入备注信息!', 'danger'); | |
| 139 | + } | |
| 140 | + | |
| 141 | + if(fData['destroyItem'] && !fData['reason']){ | |
| 142 | + _shake_elem($('[name=reason]', f)); | |
| 143 | + return UIkit.notification('你必须选择烂班原因!', 'danger'); | |
| 144 | + } | |
| 145 | + | |
| 146 | + gb_common.alt_confirm('确定提交当前操作?', '是的,我确定', function () { | |
| 147 | + disabledSubmitBtn(); | |
| 148 | + | |
| 149 | + var idx = ''; | |
| 150 | + if(fData['destroyItem']){ | |
| 151 | + for(var i in fData['destroyItem']) | |
| 152 | + idx+=(fData['destroyItem'][i]+','); | |
| 153 | + idx = idx.substr(0, idx.length-1); | |
| 154 | + } | |
| 155 | + fData['destroyIdx']=idx; | |
| 156 | + delete fData['destroyItem']; | |
| 157 | + | |
| 158 | + gb_common.$post('/in_out/dftz', fData, function (rs) { | |
| 159 | + UIkit.notification('操作成功!', 'success'); | |
| 160 | + gb_os_card.update(rs.t); | |
| 161 | + gb_o_s_abnormal.handle(rs.aes); | |
| 162 | + UIkit.modal(modalId).hide(); | |
| 163 | + }); | |
| 164 | + }); | |
| 165 | + } | |
| 166 | + | |
| 167 | + function disabledSubmitBtn() { | |
| 168 | + $('.submit-btn', wrap).html('<div uk-spinner></div>').attr('disabled', 'disabled'); | |
| 169 | + } | |
| 170 | + | |
| 171 | + function _shake_elem($e) { | |
| 172 | + $e.addClass('uk-animation-shake').one('animationend', function () { | |
| 173 | + $(this).removeClass('uk-animation-shake'); | |
| 174 | + }); | |
| 175 | + } | |
| 176 | + })(); | |
| 177 | + </script> | |
| 178 | +</div> | |
| 0 | 179 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/abnormal/fragments/h_cont_hrcc.html renamed to src/main/resources/static/pages/abnormal/fragments/type_0/h_cont_hrcc.html
src/main/resources/static/pages/abnormal/fragments/h_cont_rybd.html renamed to src/main/resources/static/pages/abnormal/fragments/type_0/h_cont_rybd.html
| 1 | 1 | <div class="handler_cont_rybd_wrap"> |
| 2 | - <div class="uk-alert-danger" uk-alert> | |
| 2 | + <div class="uk-alert-primary" uk-alert> | |
| 3 | 3 | <a class="uk-alert-close" uk-close></a> |
| 4 | 4 | <p><i uk-icon="info"></i> 如果人员无法正常使用刷卡机签到,请手动录入人员签到时间。</p> |
| 5 | 5 | </div> |
| ... | ... | @@ -92,7 +92,7 @@ |
| 92 | 92 | var v = $('[name=remarks]', f).val() + $(this).val() + ';'; |
| 93 | 93 | if(!v) |
| 94 | 94 | return; |
| 95 | - $('[name=remarks]', f).val(v); | |
| 95 | + $('[name=remarks]', f).val(v).trigger('input'); | |
| 96 | 96 | }); |
| 97 | 97 | |
| 98 | 98 | $(this).attr('data-init', 1); | ... | ... |
src/main/resources/static/pages/abnormal/fragments/type_1/abnormal_handler.html
0 → 100644
| 1 | +<div class="o_s_abnormal_handler_modal"> | |
| 2 | + <ul class="uk-subnav" uk-switcher uk-tab style="margin-top: 35px"> | |
| 3 | + <li><a><i uk-icon="file-edit"></i> 车已出场</a></li> | |
| 4 | + <li><a><i uk-icon="users" style="vertical-align: middle;margin-top: -3px;"></i> 换车出场</a></li> | |
| 5 | + <li><a><i uk-icon="clock"></i> 调整出场时间</a></li> | |
| 6 | + </ul> | |
| 7 | + | |
| 8 | + <ul class="uk-switcher uk-margin _switcher_cont"> | |
| 9 | + <li class="_content_one"></li> | |
| 10 | + <li class="_content_two"></li> | |
| 11 | + <li class="_content_three"></li> | |
| 12 | + </ul> | |
| 13 | + | |
| 14 | + <script> | |
| 15 | + (function () { | |
| 16 | + var wrap = '.o_s_abnormal_handler_modal', modalId, | |
| 17 | + folder = '/pages/abnormal/fragments/type_1/',ae; | |
| 18 | + | |
| 19 | + $(wrap).on('init', function (e, data) { | |
| 20 | + e.stopPropagation(); | |
| 21 | + modalId = '#' + data.modalId; | |
| 22 | + ae = gb_o_s_abnormal.get(data.key); | |
| 23 | + | |
| 24 | + //加载片段1 | |
| 25 | + $.get(folder + 'h_cont_cycc.html', function (dom) { | |
| 26 | + $('._content_one',wrap).html(dom); | |
| 27 | + $('.handler_cont_cycc_wrap', wrap).trigger('init', {ae: ae}); | |
| 28 | + }); | |
| 29 | + | |
| 30 | + //加载片段2 | |
| 31 | + $.get(folder + 'h_cont_hccc.html', function (dom) { | |
| 32 | + $('._content_two',wrap).html(dom); | |
| 33 | + }); | |
| 34 | + | |
| 35 | + //加载片段3 | |
| 36 | + $.get(folder + 'h_cont_dftz.html', function (dom) { | |
| 37 | + $('._content_three',wrap).html(dom); | |
| 38 | + }); | |
| 39 | + | |
| 40 | + data && data.caller && data.caller(); | |
| 41 | + }); | |
| 42 | + | |
| 43 | + $('._switcher_cont', wrap).on('show', function (e) { | |
| 44 | + $('div:first', e.target).trigger('init', {ae: ae, modalId: modalId}); | |
| 45 | + }); | |
| 46 | + })(); | |
| 47 | + </script> | |
| 48 | +</div> | |
| 0 | 49 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/abnormal/fragments/type_1/h_cont_cycc.html
0 → 100644
| 1 | +<div class="handler_cont_cycc_wrap"> | |
| 2 | + <!--<div class="uk-alert-danger" uk-alert> | |
| 3 | + <a class="uk-alert-close" uk-close></a> | |
| 4 | + <p><i uk-icon="info"></i> 如果人员无法正常使用刷卡机签到,请手动录入人员签到时间。</p> | |
| 5 | + </div>--> | |
| 6 | + | |
| 7 | + <div class="hc_body"></div> | |
| 8 | + <script id="o_s_abnormal_handler_cycc-temp" type="text/html"> | |
| 9 | + <table class="uk-table uk-table-small uk-table-divider curr_out_plan_table"> | |
| 10 | + <tr> | |
| 11 | + <th width="17%">线路</th> | |
| 12 | + <th width="12%">路牌</th> | |
| 13 | + <th width="21%">车辆</th> | |
| 14 | + <th width="17%">计划出场</th> | |
| 15 | + <th width="19%">停车场</th> | |
| 16 | + <th width="14%">状态</th> | |
| 17 | + </tr> | |
| 18 | + <tr> | |
| 19 | + <td>{{ae.lineName}}</td> | |
| 20 | + <td>{{ae.lpName}}</td> | |
| 21 | + <td>{{ae.nbbm}}</td> | |
| 22 | + <td>{{ae.dfsjStr}}</td> | |
| 23 | + <td>{{current_tcc_name}}</td> | |
| 24 | + <td><samp>未出场</samp></td> | |
| 25 | + </tr> | |
| 26 | + </table> | |
| 27 | + | |
| 28 | + <form class="uk-form-horizontal"> | |
| 29 | + <div class="uk-margin"> | |
| 30 | + <label class="uk-form-label" for="form-horizontal-text">出场时间</label> | |
| 31 | + <div class="uk-form-controls"> | |
| 32 | + <input class="uk-input" name="attSjTimeStr" id="form-horizontal-text" type="time" required> | |
| 33 | + </div> | |
| 34 | + </div> | |
| 35 | + | |
| 36 | + <div class="uk-margin"> | |
| 37 | + <label class="uk-form-label" for="form-horizontal-select">原因</label> | |
| 38 | + <div class="uk-form-controls"> | |
| 39 | + <select class="uk-select" name="reason" id="form-horizontal-select" required> | |
| 40 | + <option value="">请选择...</option> | |
| 41 | + <option>缺卡</option> | |
| 42 | + <option>其他</option> | |
| 43 | + </select> | |
| 44 | + </div> | |
| 45 | + </div> | |
| 46 | + | |
| 47 | + <div class="uk-margin"> | |
| 48 | + <div class="uk-form-label">备注</div> | |
| 49 | + <div class="uk-form-controls uk-form-controls-text"> | |
| 50 | + <textarea class="uk-textarea" name="remarks" rows="5" placeholder="备注,必填,限50字。" required data-fv-stringlength="true" data-fv-stringlength-max="50"></textarea> | |
| 51 | + </div> | |
| 52 | + </div> | |
| 53 | + </form> | |
| 54 | + | |
| 55 | + <p class="uk-text-right"> | |
| 56 | + <button class="uk-button uk-button-default uk-modal-close" type="button">取消</button> | |
| 57 | + <button class="uk-button uk-button-primary submit-btn" type="button">保存</button> | |
| 58 | + </p> | |
| 59 | + </script> | |
| 60 | + | |
| 61 | + <script> | |
| 62 | + (function () { | |
| 63 | + | |
| 64 | + var wrap = '.handler_cont_cycc_wrap', ae, $cont; | |
| 65 | + | |
| 66 | + | |
| 67 | + $(wrap).on('init', function (e, data) { | |
| 68 | + e.stopPropagation(); | |
| 69 | + if($(this).attr('data-init')==1) | |
| 70 | + return; | |
| 71 | + | |
| 72 | + ae = data.ae; | |
| 73 | + | |
| 74 | + var htmlStr = template('o_s_abnormal_handler_cycc-temp', {ae: ae, current_tcc_name: current_tcc_name}); | |
| 75 | + $cont = $('.hc_body', wrap).html(htmlStr); | |
| 76 | + | |
| 77 | + //submit | |
| 78 | + var f = $('form', wrap).formValidation(gb_form_validation_opts); | |
| 79 | + $('.submit-btn', wrap).on('click', function () { | |
| 80 | + f.submit(); | |
| 81 | + }); | |
| 82 | + f.on('success.form.fv', function(e) { | |
| 83 | + e.preventDefault(); | |
| 84 | + | |
| 85 | + var data = $(this).serializeJSON(); | |
| 86 | + | |
| 87 | + console.log('data', data); | |
| 88 | + }); | |
| 89 | + | |
| 90 | + //选择原因 | |
| 91 | + $('[name=reason]', f).on('change', function () { | |
| 92 | + var v = $('[name=remarks]', f).val() + $(this).val() + ';'; | |
| 93 | + if(!v) | |
| 94 | + return; | |
| 95 | + $('[name=remarks]', f).val(v).trigger('input'); | |
| 96 | + }); | |
| 97 | + | |
| 98 | + $(this).attr('data-init', 1); | |
| 99 | + }); | |
| 100 | + })(); | |
| 101 | + </script> | |
| 102 | +</div> | |
| 0 | 103 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/abnormal/fragments/h_cont_dftz.html renamed to src/main/resources/static/pages/abnormal/fragments/type_1/h_cont_dftz.html
src/main/resources/static/pages/abnormal/fragments/type_1/h_cont_hccc.html
0 → 100644
| 1 | +<div class="handler_cont_hccc_wrap tzrc_table_wrap"> | |
| 2 | + <table class="uk-table uk-table-small uk-table-divider curr_out_plan_table"> | |
| 3 | + <thead> | |
| 4 | + <tr> | |
| 5 | + <th width="17%">线路</th> | |
| 6 | + <th width="12%">路牌</th> | |
| 7 | + <th width="21%">人员</th> | |
| 8 | + <th width="17%">车辆</th> | |
| 9 | + <th width="19%">计划出场</th> | |
| 10 | + </tr> | |
| 11 | + </thead> | |
| 12 | + <tbody></tbody> | |
| 13 | + </table> | |
| 14 | + | |
| 15 | + <table class="uk-table uk-table-small uk-table-divider tab_wid_1"> | |
| 16 | + <thead> | |
| 17 | + <tr> | |
| 18 | + <th><input class="uk-checkbox " type="checkbox" id="globalCheckBox"></th> | |
| 19 | + <th>时间</th> | |
| 20 | + <th>驾驶员</th> | |
| 21 | + <th>售票员</th> | |
| 22 | + <th>车辆</th> | |
| 23 | + <th>状态</th> | |
| 24 | + </tr> | |
| 25 | + </thead> | |
| 26 | + </table> | |
| 27 | + <div class="sch_list_table_wrap"> | |
| 28 | + <table class="uk-table uk-table-small uk-table-divider sch_list_table tab_wid_1"> | |
| 29 | + <tr> | |
| 30 | + <td><div uk-spinner></div></td> | |
| 31 | + </tr> | |
| 32 | + </table> | |
| 33 | + </div> | |
| 34 | + | |
| 35 | + <div class="tzrc_form_card"> | |
| 36 | + <form class="uk-grid-small uk-form-horizontal" uk-grid> | |
| 37 | + <div class="uk-width-1-2@s"> | |
| 38 | + <label class="uk-form-label">车辆</label> | |
| 39 | + <div class="uk-form-controls"> | |
| 40 | + <div class="ct_auto_wrap" id="nbbmAutoCompleter"> | |
| 41 | + <input class="uk-input" name="nbbm" type="text" placeholder="车辆自编号" autocomplete="off"> | |
| 42 | + </div> | |
| 43 | + <input class="uk-checkbox switch_c_box" type="checkbox" checked> | |
| 44 | + </div> | |
| 45 | + </div> | |
| 46 | + <div class="uk-width-1-2@s"> | |
| 47 | + <label class="uk-form-label">驾驶员</label> | |
| 48 | + <div class="uk-form-controls"> | |
| 49 | + <div class="ct_auto_wrap" id="jsyAutoCompleter"> | |
| 50 | + <input class="uk-input" name="jsy" type="text" disabled placeholder="驾驶员工号" autocomplete="off"> | |
| 51 | + </div> | |
| 52 | + <input class="uk-checkbox switch_c_box" type="checkbox" > | |
| 53 | + </div> | |
| 54 | + </div> | |
| 55 | + <div class="uk-width-1-2@s"> | |
| 56 | + <label class="uk-form-label">售票员</label> | |
| 57 | + <div class="uk-form-controls"> | |
| 58 | + <div class="ct_auto_wrap" id="spyAutoCompleter"> | |
| 59 | + <input class="uk-input" name="spy" type="text" disabled placeholder="售票员工号" autocomplete="off"> | |
| 60 | + </div> | |
| 61 | + <input class="uk-checkbox switch_c_box" type="checkbox" > | |
| 62 | + </div> | |
| 63 | + </div> | |
| 64 | + <div class="uk-width-1-1@s"> | |
| 65 | + <hr> | |
| 66 | + <p class="uk-text-right"> | |
| 67 | + <button class="uk-button uk-button-default uk-modal-close" type="button">取消</button> | |
| 68 | + <button class="uk-button uk-button-primary submit-btn" type="button">保存</button> | |
| 69 | + </p> | |
| 70 | + </div> | |
| 71 | + </form> | |
| 72 | + </div> | |
| 73 | + <script id="a_h_hccc_out_tbody-temp" type="text/html"> | |
| 74 | + <tr> | |
| 75 | + <td>{{obj.lineName}}</td> | |
| 76 | + <td>{{obj.lpName}}</td> | |
| 77 | + <td>{{obj.jsy}}</td> | |
| 78 | + <td>{{obj.nbbm}}</td> | |
| 79 | + <td>{{obj.dfsjStr}}</td> | |
| 80 | + </tr> | |
| 81 | + </script> | |
| 82 | + | |
| 83 | + <script> | |
| 84 | + (function () { | |
| 85 | + | |
| 86 | + var wrap = '.handler_cont_hccc_wrap', ae, inoutSch; | |
| 87 | + | |
| 88 | + | |
| 89 | + $(wrap).on('init', function (e, data) { | |
| 90 | + e.stopPropagation(); | |
| 91 | + if($(this).attr('data-init')==1) | |
| 92 | + return; | |
| 93 | + | |
| 94 | + ae = data.ae; | |
| 95 | + | |
| 96 | + inoutSch = gb_os_card.findByLineCode(ae.lineCode)[ae.schId]; | |
| 97 | + $('.curr_out_plan_table>tbody', wrap).html(template('a_h_hccc_out_tbody-temp', {obj: inoutSch})); | |
| 98 | + | |
| 99 | + //加载集调班次信息 | |
| 100 | + gb_common.$get('/in_out/findSchByLpName', {lineCode: inoutSch.lineCode, lpName: inoutSch.lpName},readerScheduleList); | |
| 101 | + | |
| 102 | + //自动补全 | |
| 103 | + ct_autocompleter.initPerson($('#jsyAutoCompleter', wrap)); | |
| 104 | + ct_autocompleter.initPerson($('#spyAutoCompleter', wrap)); | |
| 105 | + ct_autocompleter.initBus($('#nbbmAutoCompleter', wrap)); | |
| 106 | + | |
| 107 | + $(this).attr('data-init', 1); | |
| 108 | + }); | |
| 109 | + | |
| 110 | + var readerScheduleList = function (rs) { | |
| 111 | + var htmlStr = template('jd_schedule_list_table-temp', {list: rs.list, tcc_code: current_tcc_code}); | |
| 112 | + $('.sch_list_table', wrap).html(htmlStr); | |
| 113 | + //滚动条 | |
| 114 | + $('.sch_list_table_wrap', wrap).perfectScrollbar({suppressScrollX: true}); | |
| 115 | + | |
| 116 | + //将当前出场班次之前的班次都禁选 | |
| 117 | + var trs = $('.sch_list_table tr', wrap); | |
| 118 | + for(var i=0,row;row=trs[i++];){ | |
| 119 | + if($(row).data('id')==inoutSch.id) | |
| 120 | + break; | |
| 121 | + $(row).addClass('disabled') | |
| 122 | + .find('input[type=checkbox]') | |
| 123 | + .attr('disabled','disabled'); | |
| 124 | + } | |
| 125 | + //选中当前出场班次 | |
| 126 | + var dl = $('.sch_list_table tr[data-id="'+inoutSch.id+'"]', wrap).trigger('click'); | |
| 127 | + | |
| 128 | + //滚动到可视区域 | |
| 129 | + var cont = $('.sch_list_table_wrap', wrap); | |
| 130 | + cont.animate({ | |
| 131 | + scrollTop: dl.offset().top - cont.offset().top + cont.scrollTop() - 38 | |
| 132 | + }, 300); | |
| 133 | + }; | |
| 134 | + | |
| 135 | + /** | |
| 136 | + * row 点击选中 | |
| 137 | + */ | |
| 138 | + $(wrap).on('click', '.sch_list_table tr', function () { | |
| 139 | + if($(this).hasClass('disabled')) | |
| 140 | + return; | |
| 141 | + var cbox = $('input[type=checkbox]', this)[0]; | |
| 142 | + if($(this).hasClass('active')){ | |
| 143 | + $(this).removeClass('active'); | |
| 144 | + cbox.checked = false; | |
| 145 | + } | |
| 146 | + else{ | |
| 147 | + $(this).addClass('active'); | |
| 148 | + cbox.checked = true; | |
| 149 | + | |
| 150 | + var cells = this.cells; | |
| 151 | + var f = $('.tzrc_form_card form', wrap); | |
| 152 | + $('[name=nbbm]', f).val($(cells[4]).text()); | |
| 153 | + $('[name=jsy]', f).val($(cells[2]).text()); | |
| 154 | + $('[name=spy]', f).val($(cells[3]).text()); | |
| 155 | + } | |
| 156 | + }); | |
| 157 | + | |
| 158 | + //全选 | |
| 159 | + $('#globalCheckBox', wrap).on('click', function () { | |
| 160 | + | |
| 161 | + var trs = $('.sch_list_table tr', wrap); | |
| 162 | + var cbox; | |
| 163 | + for(var i=0,row;row=trs[i++];){ | |
| 164 | + if($(row).hasClass('disabled')) | |
| 165 | + continue; | |
| 166 | + | |
| 167 | + cbox = $('input[type=checkbox]', row)[0]; | |
| 168 | + | |
| 169 | + if(this.checked) | |
| 170 | + $(row).addClass('active'); | |
| 171 | + else | |
| 172 | + $(row).removeClass('active'); | |
| 173 | + cbox.checked = this.checked; | |
| 174 | + } | |
| 175 | + }); | |
| 176 | + | |
| 177 | + $('.tzrc_form_card input[type=checkbox]', wrap).on('click', function () { | |
| 178 | + var $input = $(this).prev(); | |
| 179 | + if(this.checked) | |
| 180 | + $input.removeAttr('disabled'); | |
| 181 | + else | |
| 182 | + $input.attr('disabled', 'disabled'); | |
| 183 | + }); | |
| 184 | + | |
| 185 | + //switch_c_box | |
| 186 | + $('.switch_c_box', wrap).on('click', function () { | |
| 187 | + var input = $(this).parent().find('input[type=text]'); | |
| 188 | + if(this.checked) | |
| 189 | + input.removeAttr('disabled'); | |
| 190 | + else | |
| 191 | + input.attr('disabled', 'disabled'); | |
| 192 | + }); | |
| 193 | + })(); | |
| 194 | + </script> | |
| 195 | +</div> | |
| 0 | 196 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/abnormal/js/o_s_abnormal.js
| ... | ... | @@ -13,7 +13,9 @@ var gb_o_s_abnormal = (function () { |
| 13 | 13 | var idx = storage.getItem("abnormal_line_idx"); |
| 14 | 14 | |
| 15 | 15 | gb_common.$get('/in_out/findAbnormalByLineArray', {idx: idx}, function (rs) { |
| 16 | - var list = rs.list; | |
| 16 | + var list = rs.list.sort(function (a, b) { | |
| 17 | + return a['planTime'] - b['planTime']; | |
| 18 | + }); | |
| 17 | 19 | for(var i=0,obj;obj=list[i++];){ |
| 18 | 20 | obj.lineName = gb_o_s_basic_data.findLineNameByCode(obj.lineCode); |
| 19 | 21 | _data[obj['schId']+'_'+obj['type']]=obj; |
| ... | ... | @@ -32,16 +34,36 @@ var gb_o_s_abnormal = (function () { |
| 32 | 34 | $(document).on('click', wrap + ' .handler_btn_panel>button', function () { |
| 33 | 35 | var key = $(this).data('key'), |
| 34 | 36 | ae = gb_o_s_abnormal.get(key); |
| 35 | - console.log('aeae', ae); | |
| 36 | - gb_common.open_modal_default('/pages/abnormal/fragments/abnormal_handler.html', '未签到 (' + ae.lineName + '、'+ae.lpName + ')', {key:key}, 700); | |
| 37 | + | |
| 38 | + var type = $(this).data('type'),_title; | |
| 39 | + if(type==0) | |
| 40 | + _title = '未签到 '; | |
| 41 | + else if(type==1) | |
| 42 | + _title = '未出场 '; | |
| 43 | + gb_common.open_modal_default('/pages/abnormal/fragments/type_'+type+'/abnormal_handler.html', _title + '('+ ae.lineName + '、'+ae.lpName + ')' , {key:key}, 700); | |
| 37 | 44 | }); |
| 38 | 45 | |
| 39 | 46 | var getByKey = function (key) { |
| 40 | 47 | return _data[key]; |
| 41 | 48 | }; |
| 49 | + | |
| 50 | + var handle = function (array) { | |
| 51 | + if(!array || array.length==0) | |
| 52 | + return; | |
| 53 | + | |
| 54 | + var elem; | |
| 55 | + for(var i=0,ae;ae=array[i++];){ | |
| 56 | + elem = $('.uk-card-body[data-id='+ae.schId+']', wrap); | |
| 57 | + elem.addClass('uk-animation-slide-left-medium uk-animation-reverse') | |
| 58 | + .one('animationend', function () { | |
| 59 | + $(this).remove(); | |
| 60 | + }); | |
| 61 | + } | |
| 62 | + }; | |
| 42 | 63 | |
| 43 | 64 | return { |
| 44 | 65 | init: init, |
| 45 | - get: getByKey | |
| 66 | + get: getByKey, | |
| 67 | + handle: handle | |
| 46 | 68 | } |
| 47 | 69 | })(); |
| 48 | 70 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/abnormal/js/o_s_card.js
| ... | ... | @@ -8,29 +8,9 @@ var gb_os_card = (function () { |
| 8 | 8 | |
| 9 | 9 | var init = function (lineIdx, cb) { |
| 10 | 10 | $.get('/in_out/findOutByIdx',{idx: lineIdx}, function (list) { |
| 11 | - list.sort(function (a, b) { | |
| 12 | - return a['dfsjT'] - b['dfsjT']; | |
| 13 | - }); | |
| 14 | - for (var i = 0, sch; sch = list[i++];) { | |
| 15 | - sch.attJhTimeStr = moment(sch.attJhTime).format('HH:mm'); | |
| 16 | - sch.dfsjStr = moment(sch.dfsjT).format('HH:mm'); | |
| 17 | - if(sch.fcsjActualTime){//集调出场时间 | |
| 18 | - sch.fcsjActual = moment(sch.fcsjActualTime).format('HH:mm'); | |
| 19 | - } | |
| 20 | - | |
| 21 | - if(sch.outTimeRfid){//rfid出场时间 | |
| 22 | - sch.outTimeRfidStr = moment(sch.outTimeRfid).format('HH:mm'); | |
| 23 | - sch.rfidLate = sch.outTimeRfid - sch.dfsjT; | |
| 24 | - } | |
| 25 | 11 | |
| 26 | - if(sch.outTimePzsb){//牌照识别出场时间 | |
| 27 | - sch.outTimePzsbStr = moment(sch.outTimePzsb).format('HH:mm'); | |
| 28 | - sch.pzsbLate = sch.outTimePzsb - sch.dfsjT; | |
| 29 | - } | |
| 30 | - } | |
| 31 | 12 | //按线路分组数据 |
| 32 | 13 | var data = gb_common.groupBy(list, 'lineCode'); |
| 33 | - | |
| 34 | 14 | _data = {}; |
| 35 | 15 | for (var lineCode in data) { |
| 36 | 16 | _data[lineCode] = {}; |
| ... | ... | @@ -39,17 +19,57 @@ var gb_os_card = (function () { |
| 39 | 19 | } |
| 40 | 20 | } |
| 41 | 21 | |
| 42 | - //渲染 | |
| 43 | - var htmlStr = template('a_out_sch_cards-temp', {data: data}); | |
| 44 | - $('.right_panel>.line_card_list').html(htmlStr) | |
| 45 | - .find('.title_name').dblclick(function () { | |
| 46 | - $('.expand_card_icon', this).trigger('click'); | |
| 47 | - }); | |
| 48 | 22 | |
| 23 | + for(var lineCode in _data){ | |
| 24 | + renderByLine(lineCode); | |
| 25 | + } | |
| 49 | 26 | cb && cb(); |
| 50 | 27 | }); |
| 51 | 28 | }; |
| 52 | 29 | |
| 30 | + /** | |
| 31 | + * 渲染线路卡片 | |
| 32 | + * @param lineCode | |
| 33 | + */ | |
| 34 | + var renderByLine = function (lineCode) { | |
| 35 | + var list = gb_common.get_vals(_data[lineCode]); | |
| 36 | + list.sort(function (a, b) { | |
| 37 | + return a['dfsjT'] - b['dfsjT']; | |
| 38 | + }); | |
| 39 | + for (var i = 0, sch; sch = list[i++];) { | |
| 40 | + sch.attJhTimeStr = moment(sch.attJhTime).format('HH:mm'); | |
| 41 | + sch.dfsjStr = moment(sch.dfsjT).format('HH:mm'); | |
| 42 | + if(sch.fcsjActualTime){//集调出场时间 | |
| 43 | + sch.fcsjActual = moment(sch.fcsjActualTime).format('HH:mm'); | |
| 44 | + } | |
| 45 | + | |
| 46 | + if(sch.outTimeRfid){//rfid出场时间 | |
| 47 | + sch.outTimeRfidStr = moment(sch.outTimeRfid).format('HH:mm'); | |
| 48 | + sch.rfidLate = sch.outTimeRfid - sch.dfsjT; | |
| 49 | + } | |
| 50 | + | |
| 51 | + if(sch.outTimePzsb){//牌照识别出场时间 | |
| 52 | + sch.outTimePzsbStr = moment(sch.outTimePzsb).format('HH:mm'); | |
| 53 | + sch.pzsbLate = sch.outTimePzsb - sch.dfsjT; | |
| 54 | + } | |
| 55 | + } | |
| 56 | + | |
| 57 | + //渲染 | |
| 58 | + var $newPanel = $(template('a_out_sch_cards-temp', {list: list})); | |
| 59 | + | |
| 60 | + var $list = $('.right_panel>.line_card_list'), | |
| 61 | + $old = $('.o_s_line_card[data-line='+lineCode+']', $list); | |
| 62 | + if($old.length > 0) | |
| 63 | + $old.replaceWith($newPanel); | |
| 64 | + else{ | |
| 65 | + $list.append($newPanel); | |
| 66 | + } | |
| 67 | + | |
| 68 | + $('.title_name', $newPanel).dblclick(function () { | |
| 69 | + $('.expand_card_icon', this).trigger('click'); | |
| 70 | + }); | |
| 71 | + }; | |
| 72 | + | |
| 53 | 73 | //展开单线路全部 |
| 54 | 74 | $(document).on('click', '.right_panel>.line_card_list .expand_card_icon', function () { |
| 55 | 75 | var lineCode = $(this).data('code'); |
| ... | ... | @@ -108,14 +128,20 @@ var gb_os_card = (function () { |
| 108 | 128 | if (!isArray(schArr)) |
| 109 | 129 | schArr = [schArr]; |
| 110 | 130 | |
| 131 | + var lineArray = {}; | |
| 111 | 132 | $.each(schArr, function () { |
| 112 | 133 | try{ |
| 113 | 134 | _data[this.lineCode][this.id] = this; |
| 114 | - updateDom(this); | |
| 135 | + //updateDom(this); | |
| 136 | + lineArray[this.lineCode] = 1; | |
| 115 | 137 | }catch (e){ |
| 116 | 138 | console.log(e); |
| 117 | 139 | } |
| 118 | 140 | }); |
| 141 | + | |
| 142 | + for(var code in lineArray){ | |
| 143 | + renderByLine(code); | |
| 144 | + } | |
| 119 | 145 | }; |
| 120 | 146 | |
| 121 | 147 | var updateDom = function (sch) { | ... | ... |
src/main/resources/static/pages/abnormal/main.html
| ... | ... | @@ -20,14 +20,14 @@ |
| 20 | 20 | <div class="abnormal_data_tabs"> |
| 21 | 21 | <ul class="uk-subnav" uk-switcher uk-tab> |
| 22 | 22 | <li><a>异常情况 50</a></li> |
| 23 | - <li><a>已处理</a></li> | |
| 23 | + <!--<li><a>已处理</a></li>--> | |
| 24 | 24 | </ul> |
| 25 | 25 | |
| 26 | 26 | <ul class="uk-switcher uk-margin abnormal_data_body_ul"> |
| 27 | 27 | <li> |
| 28 | 28 | <div class="abnormal_data_list"></div> |
| 29 | 29 | </li> |
| 30 | - <li>Hello again!</li> | |
| 30 | + <!--<li>Hello again!</li>--> | |
| 31 | 31 | </ul> |
| 32 | 32 | </div> |
| 33 | 33 | |
| ... | ... | @@ -53,7 +53,7 @@ |
| 53 | 53 | |
| 54 | 54 | <script id="abnormal_card_list-temp" type="text/html"> |
| 55 | 55 | {{each list as obj i}} |
| 56 | - <div class="uk-card uk-card-default uk-card-body"> | |
| 56 | + <div class="uk-card uk-card-default uk-card-body" data-id="{{obj.schId}}"> | |
| 57 | 57 | {{if obj.type==0}} |
| 58 | 58 | <div class="_title"> |
| 59 | 59 | <span uk-icon="user"></span> |
| ... | ... | @@ -94,7 +94,7 @@ |
| 94 | 94 | </div> |
| 95 | 95 | {{/if}} |
| 96 | 96 | <div class="handler_btn_panel"> |
| 97 | - <button class="uk-button uk-button-primary uk-button-small" data-key="{{obj.schId}}_{{obj.type}}">处理 | |
| 97 | + <button class="uk-button uk-button-primary uk-button-small" data-type="{{obj.type}}" data-key="{{obj.schId}}_{{obj.type}}">处理 | |
| 98 | 98 | </button> |
| 99 | 99 | </div> |
| 100 | 100 | </div> |
| ... | ... | @@ -102,12 +102,11 @@ |
| 102 | 102 | </script> |
| 103 | 103 | |
| 104 | 104 | <script id="a_out_sch_cards-temp" type="text/html"> |
| 105 | - {{each data as a k}} | |
| 106 | - <div class="uk-card uk-card-default uk-card-body o_s_line_card"> | |
| 105 | + <div class="uk-card uk-card-default uk-card-body o_s_line_card" data-line="{{list[0].lineCode}}"> | |
| 107 | 106 | <div class="title_name"> |
| 108 | - {{data[k][0].lineName}} | |
| 109 | - <span class="expand_card_icon" data-code="{{data[k][0].lineCode}}" | |
| 110 | - data-name="{{data[k][0].lineName}}"></span> | |
| 107 | + {{list[0].lineName}} | |
| 108 | + <span class="expand_card_icon" data-code="{{list[0].lineCode}}" | |
| 109 | + data-name="{{list[0].lineName}}"></span> | |
| 111 | 110 | </div> |
| 112 | 111 | <div class="o_s_c_table"> |
| 113 | 112 | <div class="osc_table_head"> |
| ... | ... | @@ -125,7 +124,7 @@ |
| 125 | 124 | </dl> |
| 126 | 125 | </div> |
| 127 | 126 | <div class="osc_table_body"> |
| 128 | - {{each data[k] as sch i}} | |
| 127 | + {{each list as sch i}} | |
| 129 | 128 | {{if i <=5}} |
| 130 | 129 | <dl> |
| 131 | 130 | <dd>{{sch.lpName}}</dd> |
| ... | ... | @@ -144,7 +143,6 @@ |
| 144 | 143 | </div> |
| 145 | 144 | </div> |
| 146 | 145 | </div> |
| 147 | - {{/each}} | |
| 148 | 146 | </script> |
| 149 | 147 | <script id="jd_schedule_list_table-temp" type="text/html"> |
| 150 | 148 | {{if list.length==0}} |
| ... | ... | @@ -196,6 +194,13 @@ |
| 196 | 194 | </script> |
| 197 | 195 | |
| 198 | 196 | <script id="jd_schedule_form_table_002-temp" type="text/html"> |
| 197 | + {{if currSch.status > 0}} | |
| 198 | + <div class="uk-alert-danger" style="width: 100%;" uk-alert> | |
| 199 | + <a class="uk-alert-close" uk-close></a> | |
| 200 | + <p><i uk-icon="info"></i> 集调班次显示该车辆已出场,你不能再对预发时刻进行修改。</p> | |
| 201 | + </div> | |
| 202 | + {{/if}} | |
| 203 | + | |
| 199 | 204 | <input type="hidden" name="dftzId" value="{{currSch.id}}"> |
| 200 | 205 | <div class="uk-width-1-2@s"> |
| 201 | 206 | <label class="uk-form-label">从<small>(停车场)</small></label> |
| ... | ... | @@ -245,20 +250,20 @@ |
| 245 | 250 | <div class="uk-width-1-2@s"> |
| 246 | 251 | <label class="uk-form-label font-orange">预发时刻</label> |
| 247 | 252 | <div class="uk-form-controls"> |
| 248 | - <input class="uk-input" name="newTimeStr" type="time" value="{{currSch.dfsj}}" > | |
| 253 | + <input class="uk-input" {{currSch.status > 0?"disabled":""}} name="newTimeStr" type="time" value="{{currSch.dfsj}}" > | |
| 249 | 254 | </div> |
| 250 | 255 | </div> |
| 251 | 256 | |
| 252 | 257 | <div class="uk-width-1-1@s"> |
| 253 | 258 | <label class="uk-form-label font-orange">备注</label> |
| 254 | 259 | <div class="uk-form-controls"> |
| 255 | - <textarea class="uk-textarea" name="remarks" rows="4" placeholder="必填,不超过50字" >{{currSch.remarks}}</textarea> | |
| 260 | + <textarea class="uk-textarea" {{currSch.status > 0?"disabled":""}} name="remarks" rows="4" placeholder="必填,不超过50字" >{{currSch.remarks}}</textarea> | |
| 256 | 261 | </div> |
| 257 | 262 | </div> |
| 258 | 263 | |
| 259 | 264 | <div class="uk-width-1-1@s"> |
| 260 | 265 | <br> |
| 261 | - <label class="ct_grey"><input class="uk-checkbox destroy_c_box" type="checkbox" > 勾选需要烂班的班次!</label> | |
| 266 | + <label class="ct_grey"><input {{currSch.status > 0?"disabled":""}} class="uk-checkbox destroy_c_box" type="checkbox" > 勾选需要烂班的班次!</label> | |
| 262 | 267 | </div> |
| 263 | 268 | <div class="uk-width-1-1@s destroy_body_panel"> |
| 264 | 269 | <table class="uk-table uk-table-small uk-table-divider tab_wid_2"> |
| ... | ... | @@ -347,14 +352,14 @@ |
| 347 | 352 | <hr> |
| 348 | 353 | <p class="uk-text-right"> |
| 349 | 354 | <button class="uk-button uk-button-default uk-modal-close" type="button">取消</button> |
| 350 | - <button class="uk-button uk-button-primary submit-btn" type="button">提交</button> | |
| 355 | + <button class="uk-button uk-button-primary submit-btn" type="button" {{currSch.status > 0?"disabled":""}}>提交</button> | |
| 351 | 356 | </p> |
| 352 | 357 | </div> |
| 353 | 358 | </script> |
| 354 | 359 | <script> |
| 355 | 360 | (function () { |
| 356 | 361 | var wrap = '#abnormal_monitor_wrap'; |
| 357 | - var lineIdx = '10066,10067,10068,10146,10253,10335,10337,10340,10348,11014,60009,70123,104731'; | |
| 362 | + var lineIdx = '10146'; | |
| 358 | 363 | window.localStorage.setItem("abnormal_line_idx", lineIdx); |
| 359 | 364 | var initFlag; |
| 360 | 365 | ... | ... |