|
|
@@ -3,15 +3,15 @@
|
|
|
xmlns:th="http://www.thymeleaf.org">
|
|
|
<!--
|
|
|
*******************************************************************************
|
|
|
- * @source : GoodsSettleForm.html
|
|
|
- * @desc : 상품정산 Page
|
|
|
+ * @source : ExtmallUsacRegisterForm.html
|
|
|
+ * @desc : 제휴몰정산가격업로드 Page
|
|
|
*============================================================================
|
|
|
* STYLE24
|
|
|
* Copyright(C) 2020 TSIT, All rights reserved.
|
|
|
*============================================================================
|
|
|
* VER DATE AUTHOR DESCRIPTION
|
|
|
* === =========== ========== =============================================
|
|
|
- * 1.0 2020.10.22 gagamel 최초 작성
|
|
|
+ * 1.0 2020.8.02 jmh 최초 작성
|
|
|
*******************************************************************************
|
|
|
-->
|
|
|
<div id="main">
|
|
|
@@ -25,29 +25,45 @@
|
|
|
</div>
|
|
|
<!-- //메뉴 설명 -->
|
|
|
|
|
|
- <form id="searchForm" name="searchForm" action="#" th:action="@{'/ocm/extmall/settle/list'}" onsubmit="$('#btnSearch').trigger('click'); return false;">
|
|
|
+ <form id="searchForm" name="searchForm" action="#" th:action="@{'/ocm/extmall/usac/list'}" onsubmit="$('#btnSearch').trigger('click'); return false;">
|
|
|
<!-- 검색조건 영역 -->
|
|
|
<div class="panelStyle">
|
|
|
+ <div class="panelTitle">
|
|
|
+ <h3><i class="fa fa-info-circle"></i>아래 검색조건 중 상품코드나 등록일을 꼭 입력해 주세요.</h3>
|
|
|
+ <span class="panelControl">
|
|
|
+ <i class="fa fa-chevron-up"></i>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+
|
|
|
<table class="frmStyle" aria-describedby="검색조건">
|
|
|
<colgroup>
|
|
|
<col style="width:10%;"/>
|
|
|
<col/>
|
|
|
<col style="width:10%;"/>
|
|
|
- <col style="width:15%;"/>
|
|
|
- <col style="width:10%;"/>
|
|
|
- <col style="width:15%;"/>
|
|
|
+ <col style="width:25%;"/>
|
|
|
+ <col style="width:8%;"/>
|
|
|
+ <col style="width:12%;"/>
|
|
|
</colgroup>
|
|
|
<tr>
|
|
|
<th>매출기간<i class="required" title="필수" aria-hidden="true"></i></th>
|
|
|
- <td colspan="3" id="terms">
|
|
|
+ <td colspan="3" id="terms"></td>
|
|
|
+ <th rowspan="3">주문번호</th>
|
|
|
+ <td rowspan="3">
|
|
|
+ <!-- <select name="search" id="search">
|
|
|
+ <option value="ordNo">스타일24주문번호</option>
|
|
|
+ <option value="shoplinkerOrderId">샵링커주문번호</option>
|
|
|
+ <option value="mallOrderId">쇼핑몰주문번호</option>
|
|
|
+ </select><br> -->
|
|
|
+ <textarea class="textareaR3 w90p" name="condition" id="condition"></textarea>
|
|
|
</td>
|
|
|
- <th>유통구분</th>
|
|
|
+ <!-- <th>정산등록여부</th>
|
|
|
<td>
|
|
|
- <select name="distributionGb">
|
|
|
+ <select name="usacYn" id="usacYn">
|
|
|
<option value="">[전체]</option>
|
|
|
- <option th:if="${distributionGbList}" th:each="oneData, status : ${distributionGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
+ <option value="Y">Y</option>
|
|
|
+ <option value="N">N</option>
|
|
|
</select>
|
|
|
- </td>
|
|
|
+ </td> -->
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th>벤더/제휴몰</th>
|
|
|
@@ -60,12 +76,17 @@
|
|
|
<option th:if="${extmallList}" th:each="oneData, status : ${extmallList}" th:value="${oneData.extmallId}" th:text="${'[' + oneData.extmallId + '] ' + oneData.extmallNm}"></option>
|
|
|
</select>
|
|
|
</td>
|
|
|
+ <th>유통구분</th>
|
|
|
+ <td>
|
|
|
+ <select name="distributionGb">
|
|
|
+ <option value="">[전체]</option>
|
|
|
+ <option th:if="${distributionGbList}" th:each="oneData, status : ${distributionGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
<th>공급업체</th>
|
|
|
<td>
|
|
|
-<!-- <select name="supplyCompCd"> -->
|
|
|
-<!-- <option value="">[전체]</option> -->
|
|
|
-<!-- <option th:if="${supplyCompList}" th:each="oneData, status : ${supplyCompList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option> -->
|
|
|
-<!-- </select> -->
|
|
|
<input type="text" class="w100" name="supplyCompSearchTxt" id="supplyCompSearchTxt" maxlength="20"/>
|
|
|
<button type="button" class="btn icn" onclick="cfnOpenCompanyListPopup('fnSetSupplyCompInfo', 'M');"><i class="fa fa-search"></i></button>
|
|
|
<span id="supplyCompTxt"></span>
|
|
|
@@ -73,15 +94,12 @@
|
|
|
</td>
|
|
|
<th>브랜드</th>
|
|
|
<td>
|
|
|
-<!-- <select name="brandCd"> -->
|
|
|
-<!-- <option value="">[전체]</option> -->
|
|
|
-<!-- </select> -->
|
|
|
<input type="text" class="w100" name="brandSearchTxt" id="brandSearchTxt" maxlength="20" />
|
|
|
<button type="button" class="btn icn" onclick="cfnOpenBrandListPopup('fnSetBrandInfo', 'M');"><i class="fa fa-search"></i></button>
|
|
|
<!-- <input type="text" class="w100" name="brandCd" readonly="readonly"/> -->
|
|
|
<span id="brandTxt"></span>
|
|
|
<input type="hidden" name="brandList"/>
|
|
|
- </td>
|
|
|
+ </td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
|
|
|
@@ -89,9 +107,10 @@
|
|
|
<li class="center">
|
|
|
<button type="button" class="btn btn-base btn-lg" id="btnSearch">조회</button>
|
|
|
<button type="button" class="btn btn-gray btn-lg" id="btnInit">초기화</button>
|
|
|
+ <button type="button" class="btn btn-primary btn-lg" id="btnUsacUpload">엑셀업로드</button>
|
|
|
</li>
|
|
|
</ul>
|
|
|
-
|
|
|
+ <!-- <p class="dot">엑셀업로드시 <font color="red">엑셀다운로드</font> 받은 후 <font color="red">정산가</font> 부분만 작성 또는 수정 후 업로드해주세요.</p> -->
|
|
|
</div>
|
|
|
<!-- 검색조건 영역 -->
|
|
|
|
|
|
@@ -99,6 +118,7 @@
|
|
|
<div class="panelStyle">
|
|
|
<ul class="panelBar">
|
|
|
<li>
|
|
|
+ <button type="button" class="btn btn-default btn-lg" onclick="cfnDownloadSampleFile('SF024');">엑셀업로드 양식 다운로드</button>
|
|
|
<button type="button" class="btn btn-default btn-lg" onclick="fnExcelDownLoad();">엑셀다운로드</button>
|
|
|
</li>
|
|
|
<li class="right">
|
|
|
@@ -123,7 +143,8 @@
|
|
|
</ul>
|
|
|
</div>
|
|
|
<!-- //리스트 영역 -->
|
|
|
-
|
|
|
+
|
|
|
+ <a href="javascript:void(0);" id="ExcelList" style="display: none;">엑셀다운로드</a>
|
|
|
</form>
|
|
|
</div>
|
|
|
|
|
|
@@ -136,23 +157,42 @@
|
|
|
let distributionGbList = gagajf.convertToArray([[${distributionGbList}]]);
|
|
|
|
|
|
let columnDefs = [
|
|
|
- { headerName: "단품이력일련번호", field: "ordDtlItemHstSq", width: 150, cellClass: 'text-center' },
|
|
|
+ { headerName: "단품이력일련번호", field: "ordDtlItemHstSq", width: 125, cellClass: 'text-center' },
|
|
|
{ headerName: "주문번호", field: "ordNo", width: 100, cellClass: 'text-center' },
|
|
|
{ headerName: "주문상세번호", field: "ordDtlNo", width: 100, cellClass: 'text-center' },
|
|
|
- { headerName: "단품코드", field: "itemCd", width: 100, cellClass: 'text-center' },
|
|
|
{ headerName: "상품코드", field: "goodsCd", width: 120, cellClass: 'text-center' },
|
|
|
- { headerName: "상품명", field: "goodsNm", width: 250 },
|
|
|
+ { headerName: "상품명", field: "goodsNm", width: 200 },
|
|
|
{ headerName: "옵션코드", field: "optCd", width: 100, cellClass: 'text-center' },
|
|
|
{ headerName: "옵션1", field: "optCd1", width: 100, cellClass: 'text-center' },
|
|
|
{ headerName: "옵션2", field: "optCd2", width: 100, cellClass: 'text-center' },
|
|
|
{ headerName: "단품수량", field: "itemQty", width: 100, cellClass: 'text-center' },
|
|
|
- { headerName: "단품단가", field: "itemPrice", width: 100, cellClass: 'text-center' },
|
|
|
- { headerName: "정산가", field: "usacPrice", width: 100, cellClass: 'text-center' },
|
|
|
+ { headerName: "단품단가", field: "itemPrice", width: 100, cellClass: 'text-center'
|
|
|
+ ,valueFormatter: function(params) {return params.value.addComma();},
|
|
|
+ cellEditor: 'textCellEditor',
|
|
|
+ cellEditorParams: { maxlength: 14, validType: 'numeric'}
|
|
|
+ },
|
|
|
+ { headerName: "단품단가", field: "itemPrice", width: 100, cellClass: 'text-center'
|
|
|
+ ,valueFormatter: function(params) {return params.value.addComma();},
|
|
|
+ cellEditor: 'textCellEditor',
|
|
|
+ cellEditorParams: { maxlength: 14, validType: 'numeric'}
|
|
|
+ },
|
|
|
+ { headerName: "정산가", field: "usacPrice", width: 100, cellClass: 'text-center'
|
|
|
+ ,valueFormatter: function(params) {return params.value.addComma();},
|
|
|
+ cellEditor: 'textCellEditor',
|
|
|
+ cellEditorParams: { maxlength: 14, validType: 'numeric'},
|
|
|
+ cellStyle : function(params){
|
|
|
+ return { 'background-color': '#ff96689c'};
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
- {headerName: "등록자", field: "regNm", width: 100, cellClass: 'text-center'},
|
|
|
- {headerName: "등록일", field: "regDt", width: 100, cellClass: 'text-center'},
|
|
|
- {headerName: "수정자", field: "updNm", width: 100, cellClass: 'text-center'},
|
|
|
- {headerName: "수정자", field: "updDt", width: 100, cellClass: 'text-center'},
|
|
|
+ { headerName: "제휴몰명", field: "extmallNm", width: 100, cellClass: 'text-center' },
|
|
|
+ { headerName: "공급업체명", field: "supplyCompNm", width: 100, cellClass: 'text-center' },
|
|
|
+ { headerName: "브랜드명", field: "brandEnm", width: 100, cellClass: 'text-center' },
|
|
|
+ { headerName: "유통구분명", field: "distributionGbNm", width: 100, cellClass: 'text-center' },
|
|
|
+ { headerName: "등록자", field: "regNm", width: 100, cellClass: 'text-center'},
|
|
|
+ { headerName: "등록일", field: "regDt", width: 100, cellClass: 'text-center'},
|
|
|
+ { headerName: "수정자", field: "updNm", width: 100, cellClass: 'text-center'},
|
|
|
+ { headerName: "수정일", field: "updDt", width: 100, cellClass: 'text-center'},
|
|
|
];
|
|
|
|
|
|
let gridOptions = gagaAgGrid.getGridOptions(columnDefs);
|
|
|
@@ -222,14 +262,6 @@
|
|
|
$("#searchForm input[name=brandList]").val(jsonData);
|
|
|
}
|
|
|
|
|
|
- // 검색
|
|
|
- /*$('#btnSearch').on('click', function() {
|
|
|
- // 입력 값 체크
|
|
|
- if (!gagajf.validation($('#searchForm')))
|
|
|
- return false;
|
|
|
-
|
|
|
- gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm');
|
|
|
- }); */
|
|
|
|
|
|
//페이징
|
|
|
$('#searchForm select[name=pageSize]').on('change', function() {
|
|
|
@@ -263,7 +295,7 @@
|
|
|
var cnt = 0;
|
|
|
|
|
|
if( !gagajf.isNull($("#searchForm textarea[name=condition]").val())
|
|
|
- || (!gagajf.isNull($("#searchForm input[name=stDate]").val()) && !gagajf.isNull($("#searchForm input[name=edDate]").val()))
|
|
|
+ || (!gagajf.isNull($("#searchForm input[name=salesStdt]").val()) && !gagajf.isNull($("#searchForm input[name=salesEddt]").val()))
|
|
|
){
|
|
|
searchFlag = true;
|
|
|
}else{
|
|
|
@@ -275,8 +307,8 @@
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- var fromDate = $('#searchForm input[name=stDate]').val();
|
|
|
- var toDate = $('#searchForm input[name=edDate]').val();
|
|
|
+ var fromDate = $('#searchForm input[name=salesStdt]').val();
|
|
|
+ var toDate = $('#searchForm input[name=salesEddt]').val();
|
|
|
|
|
|
if (!gagajf.isNull(fromDate) || !gagajf.isNull(toDate)) {
|
|
|
|
|
|
@@ -284,7 +316,7 @@
|
|
|
mcxDialog.alertC("등록일 조회시 시작일자와 종료일자를 입력하세요.", {
|
|
|
sureBtnText: "확인",
|
|
|
sureBtnClick: function() {
|
|
|
- $('#searchForm input[name=stDate]').focus();
|
|
|
+ $('#searchForm input[name=salesStdt]').focus();
|
|
|
}
|
|
|
});
|
|
|
return false;
|
|
|
@@ -294,7 +326,7 @@
|
|
|
mcxDialog.alertC("등록 시작일자는 종료일자 보다 클 수 없습니다.", {
|
|
|
sureBtnText: "확인",
|
|
|
sureBtnClick: function() {
|
|
|
- $('#searchForm input[name=stDate]').focus();
|
|
|
+ $('#searchForm input[name=salesStdt]').focus();
|
|
|
}
|
|
|
});
|
|
|
return false;
|
|
|
@@ -315,22 +347,76 @@
|
|
|
}
|
|
|
/**************** 검색 // *****************************************************/
|
|
|
|
|
|
- // 초기화 클릭시
|
|
|
+ /**************** 초기화 클릭시 *****************************************************/
|
|
|
$('#btnInit').on('click', function() {
|
|
|
+
|
|
|
+ $('#searchForm')[0].reset();
|
|
|
+ $("#multiBrand").empty();
|
|
|
+ $('#searchForm input[name=brandList]').val('');
|
|
|
+ $('#searchForm input[name=supplyCompList]').val('');
|
|
|
+ $('#searchForm').find('#brandText').html('');
|
|
|
+ $('#searchForm').find('#supplyCompTxt').html(''); //$('#supplyCompTxt').html('');
|
|
|
+ });
|
|
|
+ /**************** 초기화 클릭시 // *****************************************************/
|
|
|
+
|
|
|
+ /**************** 엑셀업로드 ********************************************************/
|
|
|
+ $('#btnUsacUpload').on('click', function() {
|
|
|
+
|
|
|
+ cfnExcelUploadPopup('createExtmallUsac', 'createExtmallUsac');
|
|
|
+ });
|
|
|
+
|
|
|
+ var createExtmallUsac = function(result){
|
|
|
+
|
|
|
+ var data = {procJob : result.procJob
|
|
|
+ ,excelFileNm : result.excelFileNm
|
|
|
+ };
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
+ gagajf.ajaxJsonSubmit('/ocm/extmall/usac/excelupload/save', jsonData, fnExtmallUsacCreateCallBack);
|
|
|
+ }
|
|
|
+
|
|
|
+ var fnExtmallUsacCreateCallBack = function(result){
|
|
|
+ $("#searchForm input[name=pageNo]").val('1');
|
|
|
+ fnGoodsListSearch();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**************** 엑셀업로드 // *****************************************************/
|
|
|
+
|
|
|
+ /**************** 엑셀다운로드 *****************************************************/
|
|
|
+ var fnExcelDownLoad = function(){
|
|
|
+ var formId = '#searchForm';
|
|
|
+ if (gridOptions.api.getDisplayedRowCount() <= 0){
|
|
|
+ mcxDialog.alert("조회된 데이터가 없습니다.<br/>다시 조회 후 다운로드 받으세요.");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ /*
|
|
|
+ var fromDate = parseInt($('#searchForm input[name=salesStdt]').val().replaceAll("-", ""));
|
|
|
+ var toDate =parseInt($('#searchForm input[name=salesEddt]').val().replaceAll("-", ""));
|
|
|
+ if( 4 < (toDate - fromDate)){
|
|
|
+ mcxDialog.alert("3일 이내의 기간으로 설정 후 다운로드해주세요.");
|
|
|
+ return;
|
|
|
+ }*/
|
|
|
+
|
|
|
+ var params = $(formId).serialize();
|
|
|
+ $('#ExcelList').attr({ href : '/ocm/extmall/usac/excel/list?' + params }).get(0).click();
|
|
|
+ }
|
|
|
+ /**************** 엑셀다운로드 // *****************************************************/
|
|
|
+
|
|
|
+ // 초기화 클릭시
|
|
|
+ /* $('#btnInit').on('click', function() {
|
|
|
$('#searchForm')[0].reset();
|
|
|
$('#searchForm input[name=brandList]').val('');
|
|
|
$('#searchForm input[name=supplyCompList]').val('');
|
|
|
$('#brandTxt').html('');
|
|
|
$('#supplyCompTxt').html('');
|
|
|
- });
|
|
|
+ }); */
|
|
|
|
|
|
// 엑셀다운로드
|
|
|
- $('#btnExcel').on('click', function() {
|
|
|
+ /* $('#btnExcel').on('click', function() {
|
|
|
gagaAgGrid.exportToExcel('상품정산 목록', gridOptions);
|
|
|
- });
|
|
|
+ }); */
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
- cfnCreateCalendar('#terms', 'stDate', 'edDate', true, '매출');
|
|
|
+ cfnCreateCalendar('#terms', 'salesStdt', 'salesEddt', true, '매출');
|
|
|
$('.btnToday').trigger('click');
|
|
|
|
|
|
//$('#extmallVendor').hide();
|