SaveInvoiceForm.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <!DOCTYPE html>
  2. <html lang="ko"
  3. xmlns:th="http://www.thymeleaf.org">
  4. <!--
  5. *******************************************************************************
  6. * @source : SaveInvoiceForm.html
  7. * @desc : 송장등록/수정 화면
  8. *============================================================================
  9. * ISTYLE24
  10. * Copyright(C) 2021 TSIT, All rights reserved.
  11. *============================================================================
  12. * VER DATE AUTHOR DESCRIPTION
  13. * === =========== ========== =============================================
  14. * 1.0 2021.03.06 moon 최초 작성
  15. *******************************************************************************
  16. -->
  17. <div class="modalPopup" data-width="900" >
  18. <div class="panelStyle">
  19. <div class="panelTitle">
  20. <h2>배송정보</h2>
  21. <button type="button" class="close" onclick="uifnPopupClose('popupChangeInvoice')"><i class="fa fa-times"></i></button>
  22. </div>
  23. <div class="panelContent" style="overflow-y:auto;">
  24. <form id="saveInvoiceForm">
  25. <table class="frmStyle">
  26. <colgroup>
  27. <col style="width:160px;" />
  28. <col />
  29. <col />
  30. <col />
  31. <col />
  32. <col />
  33. <col />
  34. </colgroup>
  35. <tbody>
  36. <tr>
  37. <th>배송업체</th>
  38. <th:block th:if="${shipCompanyList}">
  39. <td>
  40. <select name="shipCompany">
  41. <option value="">[선택하세요]</option>
  42. <option th:if="${shipCompanyList}" th:each="oneData, status : ${shipCompanyList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}" th:selected="${oneData.cd == ordDelivery.shipCompCd}"></option>
  43. </select>
  44. </td>
  45. <th>송장번호</th>
  46. <td><input type="text" name="invoiceNo" th:value="${#strings.defaultString(ordDelivery.invoiceNo,'')}" data-valid-type="numeric" ></td>
  47. </th:block>
  48. <td>
  49. <button type="button" class="btn btn-success" id="saveAccountBtn" onclick="fnSaveAccount();">저장</button>
  50. </td>
  51. </tbody>
  52. </table>
  53. </form>
  54. </div>
  55. </div>
  56. </div>
  57. <script th:inline="javascript">
  58. /*<![CDATA[*/
  59. /* 이벤트 바인딩 관련 */
  60. var ordDtlNo = [[${ordDelivery.ordDtlNo}]];
  61. var ordDtlStat = [[${ordDelivery.ordDtlStat}]];
  62. var orgInvoiceNo = [[${ordDelivery.invoiceNo}]];
  63. var orgShipCompCd = [[${ordDelivery.shipCompCd}]];
  64. /* 환불계좌번호 저장 */
  65. var fnSaveAccount = function(){
  66. var shipCompCd = $("#saveInvoiceForm select[name=shipCompany]").val();
  67. var invoiceNo = $("#saveInvoiceForm input[name=invoiceNo]").val();
  68. if(orgInvoiceNo == invoiceNo && orgShipCompCd == shipCompCd){
  69. mcxDialog.alert('변경된 내역이 없습니다.');
  70. return;
  71. }
  72. if(gagajf.isNull(shipCompCd)) {
  73. mcxDialog.alert('택배사 선택을 해주세요.');
  74. return;
  75. }
  76. if(gagajf.isNull(invoiceNo)) {
  77. mcxDialog.alert('송장번호를 입력해 주세요.');
  78. return;
  79. }
  80. mcxDialog.confirm('송장등록/수정된 내용은 물류시스템에 전송되지 않습니다. <br> 저장 하시겠습니까?', {
  81. cancelBtnText: "취소",
  82. sureBtnText: "확인",
  83. sureBtnClick: function () {
  84. var param = {};
  85. param.shipCompCd = shipCompCd;
  86. param.invoiceNo = invoiceNo;
  87. param.ordDtlNo = ordDtlNo;
  88. param.orgInvoiceNo = orgInvoiceNo;
  89. var jsonData = JSON.stringify([param]);
  90. gagajf.ajaxJsonSubmit('/delivery/orderDetail/save', jsonData, function (result) {
  91. $('#btnSearch').trigger('click');
  92. uifnPopupClose('popupChangeInvoice');
  93. });
  94. }
  95. });
  96. };
  97. $(document).ready(function() {
  98. });
  99. /*]]>*/
  100. </script>
  101. </html>