SupplyCompanyFeeForm.html 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <!DOCTYPE html>
  2. <html lang="ko"
  3. xmlns:th="http://www.thymeleaf.org">
  4. <!--
  5. *******************************************************************************
  6. * @source : SupplyCompanyFeeForm.html
  7. * @desc : 입점업체정산 Page
  8. *============================================================================
  9. * STYLE24
  10. * Copyright(C) 2020 TSIT, All rights reserved.
  11. *============================================================================
  12. * VER DATE AUTHOR DESCRIPTION
  13. * === =========== ========== =============================================
  14. * 1.0 2020.09.02 gagamel 최초 작성
  15. *******************************************************************************
  16. -->
  17. <div id="main">
  18. <!-- 메인타이틀 영역 -->
  19. <div class="main-title">
  20. </div>
  21. <!-- //메인타이틀 영역 -->
  22. <!-- 메뉴 설명 -->
  23. <div class="infoBox menu-desc">
  24. </div>
  25. <!-- //메뉴 설명 -->
  26. <!-- 검색조건 영역 -->
  27. <div class="panelStyle">
  28. <form id="searchForm" name="searchForm" action="#" th:action="@{'/settle/supply/company/fee/list'}" onsubmit="$('#btnSearch').trigger('click'); return false;">
  29. <table class="frmStyle" aria-describedby="검색조건">
  30. <colgroup>
  31. <col style="width:10%;"/>
  32. <col style="width:25%;"/>
  33. <col style="width:10%;"/>
  34. <col/>
  35. </colgroup>
  36. <tr>
  37. <th>정산기준월<i class="required" title="필수" aria-hidden="true"></i></th>
  38. <td>
  39. <input type="text" class="schMonth w60" name="settleYm" id="settleYm" maxlength="7" required="required"/>
  40. <button type="button" class="btn icn schBtn" data-id="settleYm"><i class="fa fa-calendar" aria-hidden="true"></i></button>
  41. </td>
  42. <th>공급업체</th>
  43. <td>
  44. <select name="supplyCompCd">
  45. <option value="">[전체]</option>
  46. <option th:if="${supplyCompList}" th:each="oneData, status : ${supplyCompList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
  47. </select>
  48. </td>
  49. </tr>
  50. </table>
  51. <ul class="panelBar">
  52. <li class="center">
  53. <button type="button" class="btn btn-base btn-lg" id="btnSearch">조회</button>
  54. <button type="button" class="btn btn-gray btn-lg" onclick="$('#searchForm')[0].reset();">초기화</button>
  55. </li>
  56. </ul>
  57. </form>
  58. </div>
  59. <!-- 검색조건 영역 -->
  60. <!-- 리스트 영역 -->
  61. <div class="panelStyle">
  62. <!-- 버튼 배치 영역 -->
  63. <ul class="panelBar">
  64. <li class="left">
  65. <span class="infoTxt cBlue">* 항목 설명</span>
  66. <!-- 아이콘 툴팁 -->
  67. <div class="iconTooltip marL10">
  68. <i class="fa fa-info" aria-hidden="true"></i>
  69. <span class="left" style="width: 600px;">
  70. <strong>1.계산서발행금액</strong>: ROUND(수수료 - (자사쿠폰분담액 + 자사다다익선분담액), 0) (< 0 인 경우 0으로 표기)<br/>
  71. <strong>2.공급가액</strong>: INT(계산서발행금액 / 1.1)<br/>
  72. <strong>3.세액</strong>: 계산서발행금액 - 공급가액<br/>
  73. <strong>4.지급금액</strong>: (상품총액 – 수수료 + 자사쿠폰분담액 + 자사다다익선분담액) + 배송비 - 기타차감<br/>
  74. <strong>5.총지급금액</strong>: 지급금액 - 미수금<br/>
  75. <strong>6.상태</strong>: 전자계약여부 = 'N' then [보류] else 지급금액 < 0 then [미수금] else [정상]
  76. </span>
  77. </div>
  78. <!-- //아이콘 툴팁 -->
  79. </li>
  80. <li class="right">
  81. <button type="button" class="btn btn-warning btn-lg" id="btnDownloadTaxBillExcel">세금계산서용 엑셀다운로드</button>
  82. <a href="javascript:void(0);" id="taxBillExcel" style="display: none;">세금계산서엑셀</a>
  83. <button type="button" class="btn btn-default btn-lg" id="btnExcel">엑셀다운로드</button>
  84. </li>
  85. </ul>
  86. <!-- //버튼 배치 영역 -->
  87. <div id="gridList" style="width: 100%; height: 570px" class="ag-theme-balham"></div>
  88. </div>
  89. <!-- //리스트 영역 -->
  90. </div>
  91. <script th:inline="javascript">
  92. /*<![CDATA[*/
  93. let columnDefs = [
  94. { headerName: "정산연월", field: "usacYm", width: 80, cellClass: 'text-center', hide: true },
  95. { headerName: "공급업체코드", field: "supplyCompCd", width: 100, cellClass: 'text-center', hide: true },
  96. { headerName: "공급업체", field: "supplyCompNm", width: 200 },
  97. {
  98. headerName: "판매수량", field: "sellQty", width: 100, cellClass: 'text-center',
  99. cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); },
  100. cellStyle : function(params) { if (Number(params.value) < 0) return { 'color' : 'red' } }
  101. },
  102. {
  103. headerName: "상품총액", field: "realSellAmt", width: 100, cellClass: 'text-right',
  104. cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); },
  105. cellStyle : function(params) { if (Number(params.value) < 0) return { 'color' : 'red' } }
  106. },
  107. {
  108. headerName: "수수료", field: "sellFeeAmt", width: 100, cellClass: 'text-right',
  109. cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); },
  110. cellStyle : function(params) { if (Number(params.value) < 0) return { 'color' : 'red' } }
  111. },
  112. {
  113. headerName: "공급가액", field: "supplyAmt", width: 100, cellClass: 'text-right',
  114. cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); },
  115. cellStyle : function(params) { if (Number(params.value) < 0) return { 'color' : 'red' } }
  116. },
  117. {
  118. headerName: "세액", field: "taxAmt", width: 100, cellClass: 'text-right',
  119. cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); },
  120. cellStyle : function(params) { if (Number(params.value) < 0) return { 'color' : 'red' } }
  121. },
  122. {
  123. headerName: "쿠폰할인총액", field: "cpnDcAmt", width: 100, cellClass: 'text-right',
  124. cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); },
  125. cellStyle : function(params) { if (Number(params.value) < 0) return { 'color' : 'red' } }
  126. },
  127. {
  128. headerName: "자사쿠폰분담액", field: "selfCpnDcAmt", width: 120, cellClass: 'text-right',
  129. cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); },
  130. cellStyle : function(params) { if (Number(params.value) < 0) return { 'color' : 'red' } }
  131. },
  132. {
  133. headerName: "입점쿠폰분담액", field: "supplyCompCpnDcAmt", width: 120, cellClass: 'text-right',
  134. cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); },
  135. cellStyle : function(params) { if (Number(params.value) < 0) return { 'color' : 'red' } }
  136. },
  137. {
  138. headerName: "다다익선할인총액", field: "tmtbDcAmt", width: 120, cellClass: 'text-right',
  139. cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); },
  140. cellStyle : function(params) { if (Number(params.value) < 0) return { 'color' : 'red' } }
  141. },
  142. {
  143. headerName: "자사다다익선분담액", field: "selfTmtbDcAmt", width: 150, cellClass: 'text-right',
  144. cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); },
  145. cellStyle : function(params) { if (Number(params.value) < 0) return { 'color' : 'red' } }
  146. },
  147. {
  148. headerName: "입점다다익선분담액", field: "supplyCompTmtbDcAmt", width: 150, cellClass: 'text-right',
  149. cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); },
  150. cellStyle : function(params) { if (Number(params.value) < 0) return { 'color' : 'red' } }
  151. },
  152. {
  153. headerName: "계산서발행금액", field: "billAmt", width: 120, cellClass: 'text-right',
  154. cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); },
  155. cellStyle : function(params) { if (Number(params.value) < 0) return { 'color' : 'red' } }
  156. },
  157. {
  158. headerName: "배송비", field: "delvFee", width: 100, cellClass: 'text-right',
  159. cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); },
  160. cellStyle : function(params) { if (Number(params.value) < 0) return { 'color' : 'red' } }
  161. },
  162. {
  163. headerName: "기타차감", field: "etcDeductAmt", width: 100, cellClass: 'text-right',
  164. cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); },
  165. cellStyle: { color: '#B50808', 'background-color': '#FF9AA2' }
  166. },
  167. {
  168. headerName: "지급금액", field: "giveAmt", width: 100, cellClass: 'text-right',
  169. cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); },
  170. cellStyle : function(params) { if (Number(params.value) < 0) return { 'color' : 'red' } }
  171. },
  172. {
  173. headerName: "미수금", field: "receivableAmt", width: 100, cellClass: 'text-right',
  174. editable: true, cellEditor: 'numericCellEditor', cellEditorParams: { maxlength: 12, validType: 'integer', required: true },
  175. cellRenderer: function (params) { return gagaAgGrid.toAddComma(Number(params.value)); },
  176. cellStyle: { color: '#fffff', 'background-color': '#aaaaff' }
  177. },
  178. {
  179. headerName: "총지급금액", field: "totGiveAmt", width: 100, cellClass: 'text-right',
  180. cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); },
  181. cellStyle : function(params) { if (Number(params.value) < 0) return { 'color' : 'red' } }
  182. }
  183. ];
  184. let gridOptions = gagaAgGrid.getGridOptions(columnDefs);
  185. gridOptions.stopEditingWhenGridLosesFocus = true;
  186. // 검색
  187. $('#btnSearch').on('click', function() {
  188. // 입력 값 체크
  189. if (!gagajf.validation('#searchForm'))
  190. return false;
  191. gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm');
  192. });
  193. // 엑셀다운로드
  194. $('#btnExcel').on('click', function() {
  195. if (gridOptions.api.getDisplayedRowCount() <= 0) {
  196. mcxDialog.alert("조회된 데이터가 없습니다. 조회 후 다운로드 하세요.");
  197. return false;
  198. }
  199. gagaAgGrid.exportToExcel('입점업체정산 목록', gridOptions);
  200. });
  201. $(document).ready(function() {
  202. $('#settleYm').val((new Date()).before(0, 1, 0).format("YYYY-MM"));
  203. // Create a agGrid
  204. gagaAgGrid.createGrid('gridList', gridOptions);
  205. });
  206. /*]]>*/
  207. </script>
  208. </html>