Commit ec57c15fd841d3bbe9cecbeefac69b43fb7af013

Authored by 潘钊
1 parent a5ef1942

update...

src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -226,6 +226,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf @@ -226,6 +226,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf
226 226
227 ScheduleRealInfo schedule = dayOfSchedule.get(id); 227 ScheduleRealInfo schedule = dayOfSchedule.get(id);
228 228
  229 + if(schedule.getStatus() > 0){
  230 + map.put("status", ResponseCode.SUCCESS);
  231 + map.put("flag", "4008");
  232 + map.put("t", schedule);
  233 + return map;
  234 + }
  235 +
229 LineConfig config = lineConfigData.get(schedule.getXlBm()); 236 LineConfig config = lineConfigData.get(schedule.getXlBm());
230 //小于线路开始运营时间,则默认跨过24点 237 //小于线路开始运营时间,则默认跨过24点
231 if (dfsj.compareTo(config.getStartOpt()) < 0) { 238 if (dfsj.compareTo(config.getStartOpt()) < 0) {
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/bc_type_major.html
@@ -59,7 +59,7 @@ @@ -59,7 +59,7 @@
59 <script> 59 <script>
60 (function () { 60 (function () {
61 var modal = '#bctype-major-modal' 61 var modal = '#bctype-major-modal'
62 - , sch, stationRoutes, parentModal; 62 + , sch, stationRoutes, parentModal, _dfsj;
63 63
64 $('[name=sendDirective]', modal).on('click', function () { 64 $('[name=sendDirective]', modal).on('click', function () {
65 if ($(this)[0].checked) 65 if ($(this)[0].checked)
@@ -134,6 +134,8 @@ @@ -134,6 +134,8 @@
134 e.stopPropagation(); 134 e.stopPropagation();
135 sch = data.sch; 135 sch = data.sch;
136 parentModal = data.parentModal; 136 parentModal = data.parentModal;
  137 + if(data._dfsj)
  138 + sch.dfsj = data._dfsj;
137 139
138 //submit 140 //submit
139 var f = $('form', modal).formValidation(gb_form_validation_opts); 141 var f = $('form', modal).formValidation(gb_form_validation_opts);
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/bc_type_venting.html
@@ -131,6 +131,8 @@ @@ -131,6 +131,8 @@
131 e.stopPropagation(); 131 e.stopPropagation();
132 sch = data.sch; 132 sch = data.sch;
133 parentModal = data.parentModal; 133 parentModal = data.parentModal;
  134 + if(data._dfsj)
  135 + sch.dfsj = data._dfsj;
134 136
135 //submit 137 //submit
136 var f = $('form', modal).formValidation(gb_form_validation_opts); 138 var f = $('form', modal).formValidation(gb_form_validation_opts);
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/dftz.html
@@ -185,7 +185,7 @@ @@ -185,7 +185,7 @@
185 $(document.body).append(htmlStr); 185 $(document.body).append(htmlStr);
186 186
187 UIkit.modal(detailModal, {bgclose: true,modal:false}).show(); 187 UIkit.modal(detailModal, {bgclose: true,modal:false}).show();
188 - $(detailModal).trigger('init', {sch: sch, parentModal: modal}); 188 + $(detailModal).trigger('init', {sch: sch, parentModal: modal, _dfsj: $('[name=dfsj]', modal).val()});
189 }) 189 })
190 }); 190 });
191 }); 191 });
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task_v2/add_in_out.html
@@ -169,7 +169,7 @@ @@ -169,7 +169,7 @@
169 half_form.addClass('repeat_main destroy_form'); 169 half_form.addClass('repeat_main destroy_form');
170 //字典转换 170 //字典转换
171 dictionaryUtils.transformDom($('.nt-dictionary', half_form)); 171 dictionaryUtils.transformDom($('.nt-dictionary', half_form));
172 - sf.after(half_form); 172 + inf.after(half_form);
173 173
174 174
175 //班次类型切换 175 //班次类型切换
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/tzrc.html
@@ -108,8 +108,8 @@ @@ -108,8 +108,8 @@
108 {{/if}} 108 {{/if}}
109 </dd> 109 </dd>
110 <dd>{{sch.clZbh}}</dd> 110 <dd>{{sch.clZbh}}</dd>
111 - <dd>{{sch.jGh}}/{{sch.jName}}</dd>  
112 - <dd>{{sch.sGh}}/{{sch.sName}}</dd> 111 + <dd data-old="{{sch.jGh}}/{{sch.jName}}">{{sch.jGh}}/{{sch.jName}}</dd>
  112 + <dd data-old="{{sch.sGh}}/{{sch.sName}}">{{sch.sGh}}/{{sch.sName}}</dd>
113 <dd> 113 <dd>
114 {{if sch.status==2}} 114 {{if sch.status==2}}
115 <span class="ct_zt_yzx">已执行</span> 115 <span class="ct_zt_yzx">已执行</span>
@@ -160,20 +160,26 @@ @@ -160,20 +160,26 @@
160 $('.tzrc-table-wrap', modal).perfectScrollbar('update'); 160 $('.tzrc-table-wrap', modal).perfectScrollbar('update');
161 }); 161 });
162 162
  163 +
  164 + writeSch2Form(sch);
163 $(modal).on('click', '.sch-tzrc-table .ct_table_body dl', function () { 165 $(modal).on('click', '.sch-tzrc-table .ct_table_body dl', function () {
164 var cbox = $('input[type=checkbox]',this)[0]; 166 var cbox = $('input[type=checkbox]',this)[0];
165 //var active = $(); 167 //var active = $();
166 if(!$(this).hasClass('active')){ 168 if(!$(this).hasClass('active')){
167 $(this).addClass('active'); 169 $(this).addClass('active');
168 cbox.checked = true; 170 cbox.checked = true;
169 - var lineCode = $('[name=lineSelect]', modal).val();  
170 - var sch = gb_schedule_table.findScheduleByLine(lineCode)[$(this).data('id')];  
171 -  
172 - writeSch2Form(sch); 171 + //var lineCode = $('[name=lineSelect]', modal).val();
  172 + //var sch = gb_schedule_table.findScheduleByLine(lineCode)[$(this).data('id')];
  173 + renderCell();
173 } 174 }
174 else{ 175 else{
175 $(this).removeClass('active'); 176 $(this).removeClass('active');
176 cbox.checked = false; 177 cbox.checked = false;
  178 + //$(this).find('dd[data-old]').text()
  179 + var $jsyCell = $($($(this).find('dd')[2]));
  180 + var $spyCell = $($($(this).find('dd')[3]));
  181 + $jsyCell.text($jsyCell.data('old'));
  182 + $spyCell.text($spyCell.data('old'));
177 } 183 }
178 }); 184 });
179 185
@@ -236,8 +242,34 @@ @@ -236,8 +242,34 @@
236 }); 242 });
237 return false; 243 return false;
238 }); 244 });
  245 +
  246 + /**
  247 + * 驾驶员/售票员文本框改变事件
  248 + */
  249 + var renderRunFlag;
  250 + $('input[name=jsy],input[name=spy]', modal).on('input change', function () {
  251 + if(renderRunFlag)
  252 + return;
  253 + renderRunFlag = true;
  254 + setTimeout(function () {
  255 + renderCell();
  256 + renderRunFlag = false;
  257 + }, 200);
  258 + });
239 }); 259 });
240 260
  261 +
  262 + function renderCell() {
  263 + var jsy = $('input[name=jsy]', modal).val();
  264 + var spy = $('input[name=spy]', modal).val();
  265 + $('.sch-tzrc-table .ct_table_body>dl.active').each(function () {
  266 + var jsyCell = $(this).find('dd')[2];
  267 + var spyCell = $(this).find('dd')[3];
  268 + $(jsyCell).text(jsy);
  269 + $(spyCell).text(spy);
  270 + });
  271 + }
  272 +
241 function writeSch2Form(sch) { 273 function writeSch2Form(sch) {
242 var f = $('.tzrc_form', modal); 274 var f = $('.tzrc_form', modal);
243 $('input[name=clZbh]', f).val(sch.clZbh).trigger('input'); 275 $('input[name=clZbh]', f).val(sch.clZbh).trigger('input');
src/main/resources/static/real_control_v2/js/line_schedule/context_menu.js
@@ -40,6 +40,10 @@ var gb_schedule_context_menu = (function () { @@ -40,6 +40,10 @@ var gb_schedule_context_menu = (function () {
40 return add_sch_doms; 40 return add_sch_doms;
41 }, 41 },
42 dftz: function (sch) { 42 dftz: function (sch) {
  43 + if(sch.status > 0){
  44 + notify_err((sch.status==1?'已发出':'已执行') + '的班次不能修改待发');
  45 + return;
  46 + }
43 open_modal(folder + '/dftz.html', { 47 open_modal(folder + '/dftz.html', {
44 sch: sch 48 sch: sch
45 }, modal_opts); 49 }, modal_opts);
src/main/resources/static/real_control_v2/js/line_schedule/dbclick.js
@@ -21,6 +21,11 @@ var gb_schedule_table_dbclick = (function() { @@ -21,6 +21,11 @@ var gb_schedule_table_dbclick = (function() {
21 remarks: '', 21 remarks: '',
22 opType: '0' 22 opType: '0'
23 }, function(rs) { 23 }, function(rs) {
  24 + if(rs.flag && rs.flag==4008){
  25 + notify_err('已发出的班次不能调整待发');
  26 + gb_schedule_table.updateSchedule(rs.t);
  27 + return;
  28 + }
24 gb_schedule_table.updateSchedule(rs.ts); 29 gb_schedule_table.updateSchedule(rs.ts);
25 notify_succ('待发调整成功!'); 30 notify_succ('待发调整成功!');
26 //重新计算应发未发 31 //重新计算应发未发
src/main/resources/static/real_control_v2/js/main.js
@@ -47,7 +47,7 @@ var gb_main_ep = new EventProxy(), @@ -47,7 +47,7 @@ var gb_main_ep = new EventProxy(),
47 $('li.map-panel', '#main-tab-content').load('/real_control_v2/mapmonitor/real.html'); 47 $('li.map-panel', '#main-tab-content').load('/real_control_v2/mapmonitor/real.html');
48 }, 1000); 48 }, 1000);
49 //弹出更新说明 49 //弹出更新说明
50 - showUpdateDescription(); 50 + //showUpdateDescription();
51 }); 51 });
52 52
53 function g_emit(id) { 53 function g_emit(id) {
src/main/resources/static/real_control_v2/js/north/tabs.js
@@ -18,12 +18,12 @@ var gb_tabs = (function() { @@ -18,12 +18,12 @@ var gb_tabs = (function() {
18 $('.main-container').html(tabContentHtmlStr); 18 $('.main-container').html(tabContentHtmlStr);
19 19
20 setTimeout(renderStyle, 4000); 20 setTimeout(renderStyle, 4000);
21 - /*//地图选项卡初始点击 21 + //地图选项卡初始点击
22 $('#north_tabs_map_btn').one('click', function () { 22 $('#north_tabs_map_btn').one('click', function () {
23 if(typeof(gb_map_overlay_mge)!="undefined"){ 23 if(typeof(gb_map_overlay_mge)!="undefined"){
24 gb_map_overlay_mge.centerToRational(); 24 gb_map_overlay_mge.centerToRational();
25 } 25 }
26 - });*/ 26 + });
27 27
28 //班次选项卡第一次点击,更新滚动条高度 28 //班次选项卡第一次点击,更新滚动条高度
29 $('.north-tabs .uk-tab li.tab-line').one('click', function(e){ 29 $('.north-tabs .uk-tab li.tab-line').one('click', function(e){