VM暫存
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

invoice_reprint.php 3.2KB

pirms 8 gadiem
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <!-- ----- 電子發票補印(限當日)作業 ----- -->
  2. <div data-items="invoice_reprint" 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>
  10. <label>統編&nbsp;&nbsp;</label>
  11. <label class="radio-inline"><input type="radio" name="invoice_reprint_company_no" value="<?=$company_no?>" checked />本場站</label>
  12. <label class="radio-inline"><input type="radio" name="invoice_reprint_company_no" value="<?=$hq_company_no?>" />總公司</label>
  13. </div>
  14. <div class="form-group">
  15. <label>發票號碼</label>
  16. <input id="invoice_reprint_invoice_no" type="text" class="form-control text-uppercase" />
  17. </div>
  18. <div class="form-group">
  19. <label>下方訊息</label>
  20. <input id="invoice_reprint_message" type="text" class="form-control" />
  21. </div>
  22. <div class="checkbox">
  23. <label><input id="invoice_reprint_force" type="checkbox" />印出[補印]字樣</label>
  24. </div>
  25. <div class="form-group">
  26. <button type="button" class="btn btn-large btn-success pull-left" onclick="invoice_reprint();">補印</button>
  27. </div>
  28. </div><!-- end of col-lg-6 (nested) -->
  29. </div><!-- end of row (nested) -->
  30. </div><!-- end of panel-body -->
  31. </div><!-- end of panel -->
  32. </div><!-- end of col-lg-12 -->
  33. </div><!-- data-items -->
  34. <!-- ----- 電子發票補印作業(結束) ----- -->
  35. <script>
  36. // 補印電子發票
  37. function invoice_reprint()
  38. {
  39. var invoice_reprint_invoice_no = $("#invoice_reprint_invoice_no").val().toUpperCase();
  40. if (invoice_reprint_invoice_no == "")
  41. {
  42. alert("發票號碼欄位必填 !");
  43. return false;
  44. }
  45. if (!confirm("確認補印電子發票:"+invoice_reprint_invoice_no+" ?")) return false;
  46. $.ajax
  47. ({
  48. url:"http://localhost:60134/",
  49. async:false,
  50. timeout:1500,
  51. type:"post",
  52. dataType:"json",
  53. data:
  54. {
  55. "cmd":"rePrintInvoice",
  56. "company_no":$("input:radio:checked[name='invoice_reprint_company_no']").val(),
  57. "vINVOICE_NO":invoice_reprint_invoice_no,
  58. "vTAIL_MESSAGE":$("#invoice_reprint_message").val(),
  59. "vFORCE_FLG":$("#invoice_reprint_force").prop("checked") ? "N": "Y"
  60. },
  61. error:function(xhr, ajaxOptions, thrownError)
  62. {
  63. console.log("error:"+xhr.responseText+"|"+ajaxOptions+"|"+thrownError);
  64. },
  65. success:function(jdata)
  66. {
  67. if (jdata["Result"] == "000")
  68. {
  69. alert("補印完成, 日期: "+jdata["W_TODAY"]);
  70. }
  71. else
  72. {
  73. alert("補印失敗:["+jdata["Result"]+"]"+jdata["W_TODAY"]+jdata["Message"]);
  74. }
  75. $("#invoice_reprint_invoice_no").val("");
  76. $("#invoice_reprint_message").val("");
  77. $("#invoice_reprint_force").prop("checked", false);
  78. }
  79. });
  80. }
  81. </script>