|
|
@@ -0,0 +1,198 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="ko"
|
|
|
+ xmlns:th="http://www.thymeleaf.org">
|
|
|
+<!--
|
|
|
+ *******************************************************************************
|
|
|
+ * @source : HansaeSalesUploadForm.html
|
|
|
+ * @desc : 한세ERP매출반영 Page
|
|
|
+ *============================================================================
|
|
|
+ * STYLE24
|
|
|
+ * Copyright(C) 2020 TSIT, All rights reserved.
|
|
|
+ *============================================================================
|
|
|
+ * VER DATE AUTHOR DESCRIPTION
|
|
|
+ * === =========== ========== =============================================
|
|
|
+ * 1.0 2021.11.01 gagamel 최초 작성
|
|
|
+ *******************************************************************************
|
|
|
+ -->
|
|
|
+ <div id="main">
|
|
|
+ <!-- 메인타이틀 영역 -->
|
|
|
+ <div class="main-title">
|
|
|
+ </div>
|
|
|
+ <!-- //메인타이틀 영역 -->
|
|
|
+
|
|
|
+ <!-- 메뉴 설명 -->
|
|
|
+ <div class="infoBox menu-desc">
|
|
|
+ </div>
|
|
|
+ <!-- //메뉴 설명 -->
|
|
|
+
|
|
|
+ <!-- 검색조건 영역 -->
|
|
|
+ <div class="panelStyle">
|
|
|
+ <form id="searchForm" name="searchForm" action="#" th:action="@{'/settle/hansae/sales/upload/list'}" onsubmit="$('#btnSearch').trigger('click'); return false;">
|
|
|
+ <table class="frmStyle" aria-describedby="검색조건">
|
|
|
+ <colgroup>
|
|
|
+ <col style="width:10%;"/>
|
|
|
+ <col style="width:15%;"/>
|
|
|
+ <col style="width:10%;"/>
|
|
|
+ <col/>
|
|
|
+ </colgroup>
|
|
|
+ <tr>
|
|
|
+ <th>ERP구분<i class="required" title="필수" aria-hidden="true"></i></th>
|
|
|
+ <td>
|
|
|
+ <select name="erpGb">
|
|
|
+ <option value="hsmk">[hsmk] 한세MK</option>
|
|
|
+ <option value="hsdr">[hsdr] 한세드림</option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ <th>판매기간<i class="required" title="필수" aria-hidden="true"></i></th>
|
|
|
+ <td id="terms">
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>업로드결과</th>
|
|
|
+ <td colspan="3">
|
|
|
+ <select name="status">
|
|
|
+ <option value="">[전체]</option>
|
|
|
+ <option value="S">[S] 성공</option>
|
|
|
+ <option value="F">[F] 실패</option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+
|
|
|
+ <ul class="panelBar">
|
|
|
+ <li class="center">
|
|
|
+ <button type="button" class="btn btn-base btn-lg" id="btnSearch">조회</button>
|
|
|
+ <button type="button" class="btn btn-gray btn-lg" onclick="$('#searchForm')[0].reset();">초기화</button>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ <!-- 검색조건 영역 -->
|
|
|
+
|
|
|
+ <!-- 리스트 영역 -->
|
|
|
+ <div class="panelStyle">
|
|
|
+ <!-- 버튼 배치 영역 -->
|
|
|
+ <ul class="panelBar">
|
|
|
+ <li>
|
|
|
+ <p>
|
|
|
+<!-- <span class="infoTxt cBlue"><i class="fa fa-info-circle" aria-hidden="true"></i>매출반영이 아직 전송되지 않은 건은 <strong>[미전송건업로드]</strong> 버튼을 클릭해 전송하세요. <u>(전일자 매출은 배치를 통해 자동으로 ERP로 전송됩니다.)</u></span><br/> -->
|
|
|
+ <span class="infoTxt cRed"><i class="fa fa-info-circle" aria-hidden="true"></i>실패건들은 <u>"실패메시지"를 클릭해 옵션을 올바르게 변경</u>하고 그 후 <strong>[실패건업로드]</strong> 버튼을 클릭해 재전송 하세요.</span>
|
|
|
+ </p>
|
|
|
+ </li>
|
|
|
+ <li class="right">
|
|
|
+<!-- <button type="button" class="btn btn-base btn-lg" id="btnSendNoUploadedSales">미전송건업로드</button> -->
|
|
|
+ <button type="button" class="btn btn-warning btn-lg" id="btnResendFailSales">실패건업로드</button>
|
|
|
+ <button type="button" class="btn btn-default btn-lg" id="btnExcel">엑셀다운로드</button>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <!-- //버튼 배치 영역 -->
|
|
|
+
|
|
|
+ <div id="gridList" style="width: 100%; height: 570px" class="ag-theme-balham"></div>
|
|
|
+ </div>
|
|
|
+ <!-- //리스트 영역 -->
|
|
|
+ </div>
|
|
|
+
|
|
|
+<script th:inline="javascript">
|
|
|
+/*<![CDATA[*/
|
|
|
+ let columnDefs = [
|
|
|
+ {
|
|
|
+ width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false,
|
|
|
+ checkboxSelection: function (params) { return !gagajf.isNull(params.data.dsError) ? true : false; }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName: "ERP구분", field: "erpGb", width: 80, cellClass: 'text-center',
|
|
|
+ cellRenderer: function(params) { return params.value == 'hsmk' ? '한세MK' : '한세드림'; }
|
|
|
+ },
|
|
|
+ { headerName: "판매일자", field: "dtSale", width: 100, cellClass: 'text-center' },
|
|
|
+ {
|
|
|
+ headerName: "판매구분", field: "tpSale", width: 80, cellClass: 'text-center',
|
|
|
+ cellRenderer: function(params) { return params.value == '1' ? '판매' : '환불'; }
|
|
|
+ },
|
|
|
+ { headerName: "스타일코드", field: "cdStyle", width: 120, cellClass: 'text-center' },
|
|
|
+ { headerName: "색상코드", field: "cdColor", width: 100, cellClass: 'text-center' },
|
|
|
+ { headerName: "사이즈코드", field: "cdSize", width: 100, cellClass: 'text-center' },
|
|
|
+ {
|
|
|
+ headerName: "판매수량", field: "qtSale", width: 100, cellClass: 'text-center',
|
|
|
+ cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); },
|
|
|
+ cellStyle : function(params) { if (Number(params.value) < 0) return { 'color' : 'red' } }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName: "실판매금액", field: "amAcsale", width: 100, cellClass: 'text-right',
|
|
|
+ cellRenderer: function (params) { return gagaAgGrid.toAddComma(params.value); },
|
|
|
+ cellStyle : function(params) { if (Number(params.value) < 0) return { 'color' : 'red' } }
|
|
|
+ },
|
|
|
+ { headerName: "I/F번호", field: "ifNo", width: 200, cellClass: 'text-center' },
|
|
|
+ { headerName: "판매전표번호", field: "cdSalebill", width: 150, cellClass: 'text-center' },
|
|
|
+ {
|
|
|
+ headerName: "실패메시지", field: "dsError", width: 300,
|
|
|
+ cellRenderer: function(params) { return gagajf.isNull(params.value) ? '' : ('<a href="javascript:void(0);">' + params.value + '</a>'); }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName: "매핑여부", field: "mappingYn", width: 80, cellClass: 'text-center',
|
|
|
+ cellRenderer: function(params) {
|
|
|
+ if (gagajf.isNull(params.data.dsError)) return '';
|
|
|
+ return params.value == 'Y' ? 'Y' : '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ { headerName: "반영일시", field: "regDt", width: 150, cellClass: 'text-center' }
|
|
|
+ ];
|
|
|
+
|
|
|
+ let gridOptions = gagaAgGrid.getGridOptions(columnDefs);
|
|
|
+
|
|
|
+ // 셀 클릭 이벤트
|
|
|
+ gridOptions.onCellClicked = function(event) {
|
|
|
+ if (event.colDef.field != 'dsError')
|
|
|
+ return;
|
|
|
+
|
|
|
+ if (gagajf.isNull(event.data.dsError))
|
|
|
+ return;
|
|
|
+
|
|
|
+ let actionUrl = '/settle/hansae/style/mapping/form'
|
|
|
+ + '?erpGb=' + event.data.erpGb
|
|
|
+ + '&cdStyle=' + encodeURIComponent(event.data.cdStyle)
|
|
|
+ + '&cdColor=' + encodeURIComponent(event.data.cdColor)
|
|
|
+ + '&cdSize=' + encodeURIComponent(event.data.cdSize)
|
|
|
+ + '&dsError=' + encodeURIComponent(event.data.dsError);
|
|
|
+ cfnOpenModalPopup(actionUrl, 'popupHansaeStyleMapping');
|
|
|
+ }
|
|
|
+
|
|
|
+ // 검색
|
|
|
+ $('#btnSearch').on('click', function() {
|
|
|
+ // 입력 값 체크
|
|
|
+ if (!gagajf.validation('#searchForm'))
|
|
|
+ return false;
|
|
|
+
|
|
|
+ gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm');
|
|
|
+ });
|
|
|
+
|
|
|
+ // 미전송건업로드
|
|
|
+ $('#btnSendNoUploadedSales').on('click', function() {
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+ // 실패건업로드
|
|
|
+ $('#btnResendFailSales').on('click', function() {
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+ // 엑셀다운로드
|
|
|
+ $('#btnExcel').on('click', function() {
|
|
|
+ if (gridOptions.api.getDisplayedRowCount() <= 0) {
|
|
|
+ mcxDialog.alert("조회된 데이터가 없습니다. 조회 후 다운로드 하세요.");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ gagaAgGrid.exportToExcel('한세ERP매출반영 목록', gridOptions);
|
|
|
+ });
|
|
|
+
|
|
|
+ $(document).ready(function() {
|
|
|
+ cfnCreateCalendar('#terms', 'startDt', 'endDt', true, '판매');
|
|
|
+ $('.btnToday').trigger('click');
|
|
|
+
|
|
|
+ // Create a agGrid
|
|
|
+ gagaAgGrid.createGrid('gridList', gridOptions);
|
|
|
+ });
|
|
|
+/*]]>*/
|
|
|
+</script>
|
|
|
+
|
|
|
+</html>
|