VM暫存
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

82 строки
2.9KB

  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. $("#check_point_time").val(moment(new Date()).format("YYYY-MM-DD HH:mm:ss"));
  29. $("#check_point_time").prop("readonly",true);
  30. // 列印電子發票清帳
  31. function set_check_point()
  32. {
  33. var station_no = $("#station_select").val();
  34. var check_point_time = $("#check_point_time").val();
  35. var remarks = $("#check_point_remarks").val();
  36. if (!confirm("確認關帳時間:"+check_point_time+" ?")) return false;
  37. $.ajax
  38. ({
  39. url:APP_URL+"set_check_point",
  40. dataType:"text",
  41. type:"post",
  42. data:
  43. {
  44. "station_no": station_no,
  45. "check_point_time": check_point_time,
  46. "remarks": remarks
  47. },
  48. error:function(xhr, ajaxOptions, thrownError)
  49. {
  50. var error_msg = xhr.responseText ? xhr.responseText : "連線失敗, 請稍候再試";
  51. alertify_msg(error_msg);
  52. console.log("error:"+error_msg+"|"+ajaxOptions+"|"+thrownError);
  53. },
  54. success:function(jdata)
  55. {
  56. if (jdata == "ok")
  57. {
  58. alertify_msg("完成!");
  59. //show_item('check_point', 'check_point');
  60. show_item('check_point_report', 'check_point_report');
  61. $("#check_point_form").submit();
  62. }
  63. else if(jdata == "not_synced")
  64. {
  65. alertify_sync(station_no);
  66. }
  67. else if(jdata == "error_amt")
  68. {
  69. alertify_msg("金額異常,請確認關帳時間");
  70. }
  71. else
  72. {
  73. alertify_msg("操作失敗 !");
  74. }
  75. }
  76. });
  77. }
  78. </script>