Commit 102a0d56a11344f318de07dee9bfe452ccdbffa2

Authored by 徐烜
1 parent 31aef8c1

QPBS-2020-0002 更新

1、调度执勤日报修改人员,车辆时,初始会修改已有车辆人员配置(如套跑某个班次的车辆不一样,初始时会修改),修改saPlanInfoEdit2指令
2、调度执勤日报显示中ngRepeat的问题,修改指定track by
3、排班明细修改班次时,修改去除工号的前缀
src/main/resources/static/pages/scheduleApp/module/common/dts2/scheduleplan/saPlanInfoEdit2.js
@@ -58,14 +58,14 @@ angular.module('ScheduleApp').directive( @@ -58,14 +58,14 @@ angular.module('ScheduleApp').directive(
58 58
59 // 表单值,被赋值的次数 59 // 表单值,被赋值的次数
60 var form_data_assign_count = { 60 var form_data_assign_count = {
61 - cl1 : 1,  
62 - cl2 : 1,  
63 - j1 : 1,  
64 - j2 : 1,  
65 - j3 : 1,  
66 - s1 : 1,  
67 - s2 : 1,  
68 - s3 : 1 61 + cl1 : -1,
  62 + cl2 : -1,
  63 + j1 : -1,
  64 + j2 : -1,
  65 + j3 : -1,
  66 + s1 : -1,
  67 + s2 : -1,
  68 + s3 : -1
69 }; 69 };
70 70
71 return { 71 return {
@@ -359,7 +359,10 @@ angular.module('ScheduleApp').directive( @@ -359,7 +359,10 @@ angular.module('ScheduleApp').directive(
359 new_cl1 = undefined; 359 new_cl1 = undefined;
360 } 360 }
361 361
362 - scope[ctrlAs].$$internal_refresh_dsdata_cl(); 362 + form_data_assign_count.cl1 ++;
  363 + if (form_data_assign_count.cl1 > 1) {
  364 + scope[ctrlAs].$$internal_refresh_dsdata_cl();
  365 + }
363 }, 366 },
364 true 367 true
365 ); 368 );
@@ -381,7 +384,10 @@ angular.module('ScheduleApp').directive( @@ -381,7 +384,10 @@ angular.module('ScheduleApp').directive(
381 new_cl2 = undefined; 384 new_cl2 = undefined;
382 } 385 }
383 386
384 - scope[ctrlAs].$$internal_refresh_dsdata_cl(); 387 + form_data_assign_count.cl2 ++;
  388 + if (form_data_assign_count.cl2 > 1) {
  389 + scope[ctrlAs].$$internal_refresh_dsdata_cl();
  390 + }
385 }, 391 },
386 true 392 true
387 ); 393 );
@@ -403,8 +409,11 @@ angular.module('ScheduleApp').directive( @@ -403,8 +409,11 @@ angular.module('ScheduleApp').directive(
403 new_j1 = undefined; 409 new_j1 = undefined;
404 } 410 }
405 411
406 - scope[ctrlAs].$$internal_refresh_dsdata_j();  
407 - scope[ctrlAs].$$internal_refresh_dsdata_s(); 412 + form_data_assign_count.j1 ++;
  413 + if (form_data_assign_count.j1 > 1) {
  414 + scope[ctrlAs].$$internal_refresh_dsdata_j();
  415 + scope[ctrlAs].$$internal_refresh_dsdata_s();
  416 + }
408 }, 417 },
409 true 418 true
410 ); 419 );
@@ -425,8 +434,12 @@ angular.module('ScheduleApp').directive( @@ -425,8 +434,12 @@ angular.module('ScheduleApp').directive(
425 } else { 434 } else {
426 new_s1 = undefined; 435 new_s1 = undefined;
427 } 436 }
428 - scope[ctrlAs].$$internal_refresh_dsdata_j();  
429 - scope[ctrlAs].$$internal_refresh_dsdata_s(); 437 +
  438 + form_data_assign_count.s1 ++;
  439 + if (form_data_assign_count.s1 > 1) {
  440 + scope[ctrlAs].$$internal_refresh_dsdata_j();
  441 + scope[ctrlAs].$$internal_refresh_dsdata_s();
  442 + }
430 }, 443 },
431 true 444 true
432 ); 445 );
@@ -448,8 +461,11 @@ angular.module('ScheduleApp').directive( @@ -448,8 +461,11 @@ angular.module('ScheduleApp').directive(
448 new_j2 = undefined; 461 new_j2 = undefined;
449 } 462 }
450 463
451 - scope[ctrlAs].$$internal_refresh_dsdata_j();  
452 - scope[ctrlAs].$$internal_refresh_dsdata_s(); 464 + form_data_assign_count.j2 ++;
  465 + if (form_data_assign_count.j2 > 1) {
  466 + scope[ctrlAs].$$internal_refresh_dsdata_j();
  467 + scope[ctrlAs].$$internal_refresh_dsdata_s();
  468 + }
453 }, 469 },
454 true 470 true
455 ); 471 );
@@ -471,8 +487,11 @@ angular.module('ScheduleApp').directive( @@ -471,8 +487,11 @@ angular.module('ScheduleApp').directive(
471 new_s2 = undefined; 487 new_s2 = undefined;
472 } 488 }
473 489
474 - scope[ctrlAs].$$internal_refresh_dsdata_j();  
475 - scope[ctrlAs].$$internal_refresh_dsdata_s(); 490 + form_data_assign_count.s2 ++;
  491 + if (form_data_assign_count.s2 > 1) {
  492 + scope[ctrlAs].$$internal_refresh_dsdata_j();
  493 + scope[ctrlAs].$$internal_refresh_dsdata_s();
  494 + }
476 }, 495 },
477 true 496 true
478 ); 497 );
src/main/resources/static/pages/scheduleApp/module/common/prj-common-directive.js
@@ -5544,14 +5544,14 @@ angular.module('ScheduleApp').directive( @@ -5544,14 +5544,14 @@ angular.module('ScheduleApp').directive(
5544 5544
5545 // 表单值,被赋值的次数 5545 // 表单值,被赋值的次数
5546 var form_data_assign_count = { 5546 var form_data_assign_count = {
5547 - cl1 : 1,  
5548 - cl2 : 1,  
5549 - j1 : 1,  
5550 - j2 : 1,  
5551 - j3 : 1,  
5552 - s1 : 1,  
5553 - s2 : 1,  
5554 - s3 : 1 5547 + cl1 : -1,
  5548 + cl2 : -1,
  5549 + j1 : -1,
  5550 + j2 : -1,
  5551 + j3 : -1,
  5552 + s1 : -1,
  5553 + s2 : -1,
  5554 + s3 : -1
5555 }; 5555 };
5556 5556
5557 return { 5557 return {
@@ -5845,7 +5845,10 @@ angular.module('ScheduleApp').directive( @@ -5845,7 +5845,10 @@ angular.module('ScheduleApp').directive(
5845 new_cl1 = undefined; 5845 new_cl1 = undefined;
5846 } 5846 }
5847 5847
5848 - scope[ctrlAs].$$internal_refresh_dsdata_cl(); 5848 + form_data_assign_count.cl1 ++;
  5849 + if (form_data_assign_count.cl1 > 1) {
  5850 + scope[ctrlAs].$$internal_refresh_dsdata_cl();
  5851 + }
5849 }, 5852 },
5850 true 5853 true
5851 ); 5854 );
@@ -5867,7 +5870,10 @@ angular.module('ScheduleApp').directive( @@ -5867,7 +5870,10 @@ angular.module('ScheduleApp').directive(
5867 new_cl2 = undefined; 5870 new_cl2 = undefined;
5868 } 5871 }
5869 5872
5870 - scope[ctrlAs].$$internal_refresh_dsdata_cl(); 5873 + form_data_assign_count.cl2 ++;
  5874 + if (form_data_assign_count.cl2 > 1) {
  5875 + scope[ctrlAs].$$internal_refresh_dsdata_cl();
  5876 + }
5871 }, 5877 },
5872 true 5878 true
5873 ); 5879 );
@@ -5889,8 +5895,11 @@ angular.module('ScheduleApp').directive( @@ -5889,8 +5895,11 @@ angular.module('ScheduleApp').directive(
5889 new_j1 = undefined; 5895 new_j1 = undefined;
5890 } 5896 }
5891 5897
5892 - scope[ctrlAs].$$internal_refresh_dsdata_j();  
5893 - scope[ctrlAs].$$internal_refresh_dsdata_s(); 5898 + form_data_assign_count.j1 ++;
  5899 + if (form_data_assign_count.j1 > 1) {
  5900 + scope[ctrlAs].$$internal_refresh_dsdata_j();
  5901 + scope[ctrlAs].$$internal_refresh_dsdata_s();
  5902 + }
5894 }, 5903 },
5895 true 5904 true
5896 ); 5905 );
@@ -5911,8 +5920,12 @@ angular.module('ScheduleApp').directive( @@ -5911,8 +5920,12 @@ angular.module('ScheduleApp').directive(
5911 } else { 5920 } else {
5912 new_s1 = undefined; 5921 new_s1 = undefined;
5913 } 5922 }
5914 - scope[ctrlAs].$$internal_refresh_dsdata_j();  
5915 - scope[ctrlAs].$$internal_refresh_dsdata_s(); 5923 +
  5924 + form_data_assign_count.s1 ++;
  5925 + if (form_data_assign_count.s1 > 1) {
  5926 + scope[ctrlAs].$$internal_refresh_dsdata_j();
  5927 + scope[ctrlAs].$$internal_refresh_dsdata_s();
  5928 + }
5916 }, 5929 },
5917 true 5930 true
5918 ); 5931 );
@@ -5934,8 +5947,11 @@ angular.module('ScheduleApp').directive( @@ -5934,8 +5947,11 @@ angular.module('ScheduleApp').directive(
5934 new_j2 = undefined; 5947 new_j2 = undefined;
5935 } 5948 }
5936 5949
5937 - scope[ctrlAs].$$internal_refresh_dsdata_j();  
5938 - scope[ctrlAs].$$internal_refresh_dsdata_s(); 5950 + form_data_assign_count.j2 ++;
  5951 + if (form_data_assign_count.j2 > 1) {
  5952 + scope[ctrlAs].$$internal_refresh_dsdata_j();
  5953 + scope[ctrlAs].$$internal_refresh_dsdata_s();
  5954 + }
5939 }, 5955 },
5940 true 5956 true
5941 ); 5957 );
@@ -5957,8 +5973,11 @@ angular.module('ScheduleApp').directive( @@ -5957,8 +5973,11 @@ angular.module('ScheduleApp').directive(
5957 new_s2 = undefined; 5973 new_s2 = undefined;
5958 } 5974 }
5959 5975
5960 - scope[ctrlAs].$$internal_refresh_dsdata_j();  
5961 - scope[ctrlAs].$$internal_refresh_dsdata_s(); 5976 + form_data_assign_count.s2 ++;
  5977 + if (form_data_assign_count.s2 > 1) {
  5978 + scope[ctrlAs].$$internal_refresh_dsdata_j();
  5979 + scope[ctrlAs].$$internal_refresh_dsdata_s();
  5980 + }
5962 }, 5981 },
5963 true 5982 true
5964 ); 5983 );
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/info/module.js
@@ -251,25 +251,17 @@ angular.module("ScheduleApp").controller( @@ -251,25 +251,17 @@ angular.module("ScheduleApp").controller(
251 // 提交方法 251 // 提交方法
252 self.submit = function() { 252 self.submit = function() {
253 // 保存或者更新 253 // 保存或者更新
254 - // 1、修改驾驶员工号问题(去除带-)  
255 - var temp = [];  
256 - var obj = self.schedulePlanInfoForSave;  
257 - if (obj.jGh) {  
258 - temp = obj.jGh.split("-");  
259 - if (temp.length > 1) {  
260 - obj.jGh = temp[1];  
261 - } else {  
262 - obj.jGh = temp[0];  
263 - } 254 +
  255 + // 修正工号,去除前缀(如:05-001122,05就是前缀,用 - 分割)
  256 + var _jGh = self.schedulePlanInfoForSave.jGh;
  257 + if (_jGh) {
  258 + _jGh = _jGh.indexOf("-") != -1 ? _jGh.split("-")[1] : _jGh;
  259 + self.schedulePlanInfoForSave.jGh = _jGh;
264 } 260 }
265 - // 2、修改售票员工号问题(去除带-)  
266 - if (obj.sGh) {  
267 - temp = obj.sGh.split("-");  
268 - if (temp.length > 1) {  
269 - obj.sGh = temp[1];  
270 - } else {  
271 - obj.sGh = temp[0];  
272 - } 261 + var _sGh = self.schedulePlanInfoForSave.sGh;
  262 + if (_sGh) {
  263 + _sGh = _sGh.indexOf("-") != -1 ? _sGh.split("-")[1] : _sGh;
  264 + self.schedulePlanInfoForSave.sGh = _sGh;
273 } 265 }
274 266
275 self.schedulePlanInfoForSave.$save(function() { 267 self.schedulePlanInfoForSave.$save(function() {
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/report/ext/list.html
@@ -71,7 +71,7 @@ @@ -71,7 +71,7 @@
71 </tr> 71 </tr>
72 </thead> 72 </thead>
73 <tbody> 73 <tbody>
74 - <tr ng-repeat="info in ctrl.pageInfo.infos" 74 + <tr ng-repeat="info in ctrl.pageInfo.infos track by info.lpName"
75 ng-class="{odd: true, gradeX: true, info: ctrl.isModify(info), 'row-active': ctrl.isModify(info)}" > 75 ng-class="{odd: true, gradeX: true, info: ctrl.isModify(info), 'row-active': ctrl.isModify(info)}" >
76 <td> 76 <td>
77 <div> 77 <div>
@@ -128,21 +128,21 @@ @@ -128,21 +128,21 @@
128 </div> 128 </div>
129 </td> 129 </td>
130 <td> 130 <td>
131 - <div ng-repeat="clzbh in info.clZbhs"> 131 + <div ng-repeat="clzbh in info.clZbhs track by $index">
132 <a href="#"> 132 <a href="#">
133 {{clzbh}} 133 {{clzbh}}
134 </a> 134 </a>
135 </div> 135 </div>
136 </td> 136 </td>
137 <td> 137 <td>
138 - <div ng-repeat="ccsj in info.ccsjs"> 138 + <div ng-repeat="ccsj in info.ccsjs track by $index">
139 <a href="#"> 139 <a href="#">
140 {{ccsj}} 140 {{ccsj}}
141 </a> 141 </a>
142 </div> 142 </div>
143 </td> 143 </td>
144 <td> 144 <td>
145 - <div ng-repeat="jcsj in info.jcsjs"> 145 + <div ng-repeat="jcsj in info.jcsjs track by $index">
146 <a href="#"> 146 <a href="#">
147 {{jcsj}} 147 {{jcsj}}
148 </a> 148 </a>
@@ -151,7 +151,7 @@ @@ -151,7 +151,7 @@
151 <td class="container-fluid"> 151 <td class="container-fluid">
152 <div class="row"> 152 <div class="row">
153 <div style="padding-right: 0px;" class="col-md-6"> 153 <div style="padding-right: 0px;" class="col-md-6">
154 - <div ng-repeat="jsyname in info.jsyNames"> 154 + <div ng-repeat="jsyname in info.jsyNames track by $index">
155 <a href="#"> 155 <a href="#">
156 <i class="fa fa-bus" aria-hidden="true"></i> 156 <i class="fa fa-bus" aria-hidden="true"></i>
157 {{jsyname}} 157 {{jsyname}}
@@ -159,7 +159,7 @@ @@ -159,7 +159,7 @@
159 </div> 159 </div>
160 </div> 160 </div>
161 <div style="padding-left: 0px;" class="col-md-6"> 161 <div style="padding-left: 0px;" class="col-md-6">
162 - <div ng-repeat="jsygh in info.jsyGhs"> 162 + <div ng-repeat="jsygh in info.jsyGhs track by $index">
163 <a href="#"> 163 <a href="#">
164 {{jsygh}} 164 {{jsygh}}
165 </a> 165 </a>
@@ -170,7 +170,7 @@ @@ -170,7 +170,7 @@
170 <td class="container-fluid"> 170 <td class="container-fluid">
171 <div class="row"> 171 <div class="row">
172 <div style="padding-right: 0px;" class="col-md-6"> 172 <div style="padding-right: 0px;" class="col-md-6">
173 - <div ng-repeat="spyname in info.spyNames"> 173 + <div ng-repeat="spyname in info.spyNames track by $index">
174 <a href="#"> 174 <a href="#">
175 <i class="fa fa-ticket" aria-hidden="true"></i> 175 <i class="fa fa-ticket" aria-hidden="true"></i>
176 {{spyname}} 176 {{spyname}}
@@ -178,7 +178,7 @@ @@ -178,7 +178,7 @@
178 </div> 178 </div>
179 </div> 179 </div>
180 <div style="padding-left: 0px;" class="col-md-6"> 180 <div style="padding-left: 0px;" class="col-md-6">
181 - <div ng-repeat="spygh in info.spyGhs"> 181 + <div ng-repeat="spygh in info.spyGhs track by $index">
182 <a href="#"> 182 <a href="#">
183 {{spygh}} 183 {{spygh}}
184 </a> 184 </a>