Commit 5067ce7e1afea98309275ec50c448184fc69052a

Authored by 潘钊
1 parent d0fd9df5

update..

src/main/resources/static/pages/history_sch/edit/history_sch_maintain.html
... ... @@ -38,6 +38,8 @@
38 38 </div>
39 39 <button class="uk-button">检索</button>
40 40 <a class="add_lp_link" title="先点击检索后再临加路牌"><i class="uk-icon-plus"></i> 临加路牌</a>
  41 + <button id="reCountBtn" class="uk-button uk-button-danger uk-button-mini" style="position: absolute;right: 12px;bottom: 14px;">
  42 + 重新统计</button>
41 43 </fieldset>
42 44 </form>
43 45 </div>
... ... @@ -476,6 +478,41 @@
476 478  
477 479 $('[name=xlBm_eq]', f).on('change', clearLpSelect);
478 480 //clearLpSelect
  481 +
  482 +
  483 + /**
  484 + * 重新统计
  485 + */
  486 + $('#reCountBtn', modal).on('click', function () {
  487 + var lineSelect = $('[name=xlBm_eq]', modal);
  488 + var rq = $('.h-s-time li.uk-active', modal).text(),
  489 + lineName = lineSelect[0].options[lineSelect[0].selectedIndex].text,//$('.h-s-line li.uk-active', modal).text(),
  490 + lineCode = lineSelect.val();
  491 +
  492 + var that = this;
  493 + alt_confirm('确定要重新统计 ' + lineName + '('+rq+')的数据吗?',function () {
  494 + $(that).attr('disabled', 'disabled');
  495 + $(that).prepend('<i class="uk-icon-spinner uk-icon-spin"></i>');
  496 +
  497 +
  498 + var reCountEp = EventProxy.create('ylbUpdate', function () {
  499 + $('i.uk-icon-spin', that).remove();
  500 + $(that).removeAttr('disabled');
  501 + notify_succ('重新统计成功!');
  502 + });
  503 +
  504 + //统计路单 -娄高峰
  505 + /*gb_common.$get('/calcWaybill/generateNew', {date:rq, line: lineCode}, function () {
  506 + reCountEp.emitLater('calcWaybill');
  507 + });*/
  508 +
  509 + //统计油 -廖磊
  510 + gb_common.$post('/ylb/updateHistory', {date:rq, line: lineCode}, function () {
  511 + reCountEp.emitLater('ylbUpdate');
  512 + });
  513 +
  514 + }, '我确定');
  515 + });
479 516 })();
480 517 </script>
481 518 </div>
482 519 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/history_sch_maintain.html
... ... @@ -421,26 +421,26 @@
421 421 * 重新统计
422 422 */
423 423 $('#reCountBtn', modal).on('click', function () {
424   - $(this).attr('disabled', 'disabled');
425   - $(this).prepend('<i class="uk-icon-spinner uk-icon-spin"></i>');
426   -
427 424 var rq = $('.h-s-time li.uk-active', modal).text(),
428 425 lineName = $('.h-s-line li.uk-active', modal).text(),
429 426 lineCode = $('.h-s-line li.uk-active', modal).data('id');
430 427  
431 428 var that = this;
432 429 alt_confirm('确定要重新统计 ' + lineName + '('+rq+')的数据吗?',function () {
  430 + $(that).attr('disabled', 'disabled');
  431 + $(that).prepend('<i class="uk-icon-spinner uk-icon-spin"></i>');
  432 +
433 433  
434   - var reCountEp = EventProxy.create('calcWaybill', 'ylbUpdate', function () {
  434 + var reCountEp = EventProxy.create('ylbUpdate', function () {
435 435 $('i.uk-icon-spin', that).remove();
436   - $(this).removeAttr('disabled');
  436 + $(that).removeAttr('disabled');
437 437 notify_succ('重新统计成功!');
438 438 });
439 439  
440 440 //统计路单 -娄高峰
441   - gb_common.$get('/calcWaybill/generateNew', {date:rq, line: lineCode}, function () {
  441 + /*gb_common.$get('/calcWaybill/generateNew', {date:rq, line: lineCode}, function () {
442 442 reCountEp.emitLater('calcWaybill');
443   - });
  443 + });*/
444 444  
445 445 //统计油 -廖磊
446 446 gb_common.$post('/ylb/updateHistory', {date:rq, line: lineCode}, function () {
... ...