VM暫存
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

88 řádky
3.0KB

  1. <!-- ----- 電子發票清帳作業 ----- -->
  2. <div data-items="check_point" class="row" style="display:none;">
  3. <div class="col-lg-12">
  4. <div class="panel panel-default">
  5. <div class="panel-heading">關帳(手動)</div><!-- 資料顯示區灰色小表頭 -->
  6. <div class="panel-body">
  7. <div data-rows class="row">
  8. <div class="col-lg-6">
  9. <div class="form-group">
  10. <label style="font-size:16px;">本次關帳時間</label>
  11. <input id="check_point_time" type="datetime" class="form-control" style="font-size:20px;"/>
  12. </div>
  13. <div class="form-group">
  14. <label style="font-size:16px;">備註(選填)</label>
  15. <input id="check_point_remarks" type="text" class="form-control" style="font-size:20px;" placeholder="補充說明" />
  16. </div>
  17. <div class="form-group">
  18. <button type="button" class="btn btn-large btn-success pull-left" onclick="set_check_point();">關帳</button>
  19. </div>
  20. </div><!-- end of col-lg-6 (nested) -->
  21. </div><!-- end of row (nested) -->
  22. </div><!-- end of panel-body -->
  23. </div><!-- end of panel -->
  24. </div><!-- end of col-lg-12 -->
  25. </div><!-- data-items -->
  26. <!-- ----- 電子發票清帳作業(結束) ----- -->
  27. <script>
  28. // 載入
  29. function reload_check_point()
  30. {
  31. $("#check_point_time").val(moment(new Date()).format("YYYY-MM-DD HH:mm:ss"));
  32. $("#check_point_time").prop("readonly",true);
  33. $("#check_point_remarks").val("");
  34. }
  35. // 列印電子發票清帳
  36. function set_check_point()
  37. {
  38. var station_no = $("#station_select").val();
  39. var check_point_time = $("#check_point_time").val();
  40. var remarks = $("#check_point_remarks").val();
  41. if (!confirm("確認關帳時間:"+check_point_time+" ?")) return false;
  42. $.ajax
  43. ({
  44. url:APP_URL+"set_check_point",
  45. dataType:"text",
  46. type:"post",
  47. data:
  48. {
  49. "station_no": station_no,
  50. "check_point_time": check_point_time,
  51. "remarks": remarks
  52. },
  53. error:function(xhr, ajaxOptions, thrownError)
  54. {
  55. var error_msg = xhr.responseText ? xhr.responseText : "連線失敗, 請稍候再試";
  56. alertify_msg(error_msg);
  57. console.log("error:"+error_msg+"|"+ajaxOptions+"|"+thrownError);
  58. },
  59. success:function(jdata)
  60. {
  61. if (jdata == "ok")
  62. {
  63. alertify_msg("完成!");
  64. //show_item('check_point', 'check_point');
  65. show_item('check_point_report', 'check_point_report');
  66. $("#check_point_form").submit();
  67. }
  68. else if(jdata == "not_synced")
  69. {
  70. alertify_sync(station_no);
  71. }
  72. else if(jdata == "error_amt")
  73. {
  74. alertify_msg("金額異常,請確認關帳時間");
  75. }
  76. else
  77. {
  78. alertify_msg("操作失敗 !");
  79. }
  80. }
  81. });
  82. }
  83. </script>