|
|
@@ -35,64 +35,62 @@
|
|
|
<div class="panelContent">
|
|
|
<table class="frmStyle">
|
|
|
<colgroup>
|
|
|
- <col width="7%"/>
|
|
|
+ <col width="5%"/>
|
|
|
<col width="18%"/>
|
|
|
- <col width="7%"/>
|
|
|
+ <col width="5%"/>
|
|
|
<col width="18%"/>
|
|
|
<col width="7%"/>
|
|
|
- <col width="18%"/>
|
|
|
+ <col width="22%"/>
|
|
|
<col width="7%"/>
|
|
|
<col/>
|
|
|
</colgroup>
|
|
|
<tr>
|
|
|
- <th>상품코드</th>
|
|
|
+ <th>업체<em class="required" title="필수"></em></th>
|
|
|
<td>
|
|
|
- <input type="text" class="w100" name="goodsCd" id="goodsCd"/>
|
|
|
+ <input type="text" class="w100" name="supplyCompSearchTxt" id="supplyCompSearchTxt" maxlength="20" />
|
|
|
+ <button type="button" class="btn icn" id="btnSearchSupplyComp"><i class="fa fa-search"></i></button>
|
|
|
+ <span id="supplyCompText"></span>
|
|
|
+ <input type="hidden" name="supplyCompList"/>
|
|
|
</td>
|
|
|
- <th>원코드</th>
|
|
|
+ <th>브랜드<em class="required" title="필수"></em></th>
|
|
|
<td>
|
|
|
- <input type="text" class="w100" name="supplyGoodsCd" maxlength="20" required="required" data-valid-name="원코드"/>
|
|
|
+ <input type="text" class="w100" name="searchTxt" id="searchTxt" maxlength="20" />
|
|
|
+ <button type="button" class="btn icn" id="btnSearchBrand"><i class="fa fa-search"></i></button>
|
|
|
+ <span id="brandText"></span>
|
|
|
+ <input type="hidden" name="brandList"/>
|
|
|
</td>
|
|
|
- <th>상품명</th>
|
|
|
+ <th>품목</th>
|
|
|
<td>
|
|
|
- <input type="text" class="w100" name="goodsNm" maxlength="200" required="required" data-valid-name="상품명"/>
|
|
|
+ <div class="multiCheckBox" style="width:300px">
|
|
|
+ <button type="button" class="sltBtn" data-name="[전체]">[전체]</button>
|
|
|
+ <ul style="overflow:auto; height:170px;" id="grpItemkind">
|
|
|
+ <li><label class="chkBox" onclick="uifnAllCheck(this,'grpItemkind')"><input type="checkbox" name="전체선택" >전체선택</label></li>
|
|
|
+ <li th:if="${itemkindList}" th:each="oneData, status : ${itemkindList}"><label class="chkBox" data-group="grpItemkind"><input type="checkbox" name="multiItemkindCd" th:id="${'itemkindCd' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
</td>
|
|
|
- <th>상품상태</th>
|
|
|
- <td>
|
|
|
- <select name="goodsStat">
|
|
|
- <option value=''>[전체]</option>
|
|
|
- <option th:if="${goodsStatList}" th:each="oneData, status : ${goodsStatList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
+ <th rowspan="4">키워드<em class="required" title="필수"></em></th>
|
|
|
+ <td rowspan="4">
|
|
|
+ <select name="search" id="search">
|
|
|
+ <option value="searchGoodsCd">상품코드</option>
|
|
|
+ <option value="searchGoodsNm">상품명</option>
|
|
|
+ <option value="searchGoodsNum">품번</option>
|
|
|
+ <option value="searchSupplyGoodsCd">업체상품코드</option>
|
|
|
</select>
|
|
|
+ <textarea class="textareaR3 w70p" name="condition" id="condition"></textarea>
|
|
|
</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>
|
|
|
- </td>
|
|
|
- <th>담당MD</th>
|
|
|
+ <th>상품상태</th>
|
|
|
<td>
|
|
|
- <select name="mdId">
|
|
|
- <option value=''>[전체]</option>
|
|
|
- <option th:if="${mdIdList}" th:each="oneData, status : ${mdIdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
- </select>
|
|
|
+ <div class="multiCheckBox" style="width:200px">
|
|
|
+ <button type="button" class="sltBtn" data-name="[전체]">[전체]</button>
|
|
|
+ <ul style="overflow:auto; height:170px" id="grpGoodsStat">
|
|
|
+ <li><label class="chkBox" onclick="uifnAllCheck(this,'grpGoodsStat')"><input type="checkbox" name="전체선택" >전체선택</label></li>
|
|
|
+ <li th:if="${goodsStatList}" th:each="oneData, status : ${goodsStatList}"><label class="chkBox" data-group="grpGoodsStat"><input type="checkbox" name="multiGoodsStat" th:id="${'goodsStat' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
</td>
|
|
|
- <th>브랜드/품목</th>
|
|
|
- <td colspan="3">
|
|
|
- <select name="brandCd">
|
|
|
- <option value=''>[전체]</option>
|
|
|
- <!--<option th:if="${brandCdList}" th:each="oneData, status : ${brandCdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>-->
|
|
|
- </select>
|
|
|
- <select name="itemkindCd">
|
|
|
- <option value=''>[전체]</option>
|
|
|
- <option th:if="${itemkindList}" th:each="oneData, status : ${itemkindList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
- </select>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
<th>이월구분</th>
|
|
|
<td>
|
|
|
<select name="formalGb">
|
|
|
@@ -100,65 +98,82 @@
|
|
|
<option th:if="${formalGbList}" th:each="oneData, status : ${formalGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
</select>
|
|
|
</td>
|
|
|
- <th>재고수량</th>
|
|
|
+ <th>년도/시즌</th>
|
|
|
<td>
|
|
|
- <input type="text" class="w100" name="currStockQty" maxlength="11" required="required" data-valid-name="재고수량" data-valid-type="numeric"/>개 이상
|
|
|
+ <div class="multiCheckBox" style="width:140px;">
|
|
|
+ <button type="button" class="sltBtn" data-name="[전체]">[전체]</button>
|
|
|
+ <ul style="overflow:auto; height:140px" id="grpStyle">
|
|
|
+ <li><label class="chkBox" onclick="uifnAllCheck(this,'grpStyle')"><input type="checkbox" name="전체선택" id="multiStyleYear" >전체선택</label></li>
|
|
|
+ <li th:if="${styleYearList}" th:each="oneData, status : ${styleYearList}"><label class="chkBox" data-group="grpStyle"><input type="checkbox" name="multiStyleYear" th:id="${'styleYear' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <div class="multiCheckBox" style="width:170px;">
|
|
|
+ <button type="button" class="sltBtn" data-name="[전체]">[전체]</button>
|
|
|
+ <ul style="overflow:auto; height:170px" id="grpSeason">
|
|
|
+ <li><label class="chkBox" onclick="uifnAllCheck(this,'grpSeason')"><input type="checkbox" name="전체선택" id="multiSeasonCd" >전체선택</label></li>
|
|
|
+ <li th:if="${seasonList}" th:each="oneData, status : ${seasonList}"><label class="chkBox" data-group="grpSeason"><input type="checkbox" name="multiSeasonCd" th:id="${'seasonCd' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
</td>
|
|
|
- <th>년도/시즌</th>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>담당MD</th>
|
|
|
<td>
|
|
|
- <select name="styleYear">
|
|
|
+ <select name="mdId">
|
|
|
<option value=''>[전체]</option>
|
|
|
- <option th:if="${styleYearList}" th:each="oneData, status : ${styleYearList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
+ <option th:if="${mdIdList}" th:each="oneData, status : ${mdIdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
</select>
|
|
|
- <select name="seasonCd">
|
|
|
+ </td>
|
|
|
+ <th>품절여부</th>
|
|
|
+ <td>
|
|
|
+ <select name="soldoutYn">
|
|
|
<option value=''>[전체]</option>
|
|
|
- <option th:if="${seasonList}" th:each="oneData, status : ${seasonList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
+ <option value='Y'>[Y] Yes</option>
|
|
|
+ <option value='N'>[N] No</option>
|
|
|
</select>
|
|
|
</td>
|
|
|
- <th>판매가</th>
|
|
|
+ <th>재고수량</th>
|
|
|
<td>
|
|
|
- <input type="text" class="w60" name="currPriceSt" required="required" data-valid-name="판매가" data-valid-type="integer"/>원 ~
|
|
|
- <input type="text" class="w60" name="currPriceEd" required="required" data-valid-name="판매가" data-valid-type="integer"/>원
|
|
|
+ <input type="text" class="w100" name="stockQtySum" maxlength="11" required="required" data-valid-name="재고수량" data-valid-type="numeric"/>개 이상
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <th>품절여부</th>
|
|
|
+ <th>자사몰노출여부</th>
|
|
|
<td>
|
|
|
- <select name="soldoutYn">
|
|
|
+ <select name="selfMallYn">
|
|
|
<option value=''>[전체]</option>
|
|
|
<option value='Y'>[Y] Yes</option>
|
|
|
<option value='N'>[N] No</option>
|
|
|
</select>
|
|
|
</td>
|
|
|
- <th>반품/교환</th>
|
|
|
- <td colspan='3'>
|
|
|
- <label class="chkBox"><input type="checkbox" name="changeableYn"/>반품불가</label>
|
|
|
- <label class="chkBox"><input type="checkbox" name="returnableYn"/>교환불가</label>
|
|
|
- <label class="chkBox"><input type="checkbox" name="returnFeeFreeYn"/>무료반품</label>
|
|
|
- <label class="chkBox"><input type="checkbox" name="changeFeeFreeYn"/>무료교환</label>
|
|
|
- </td>
|
|
|
<th>할인율(%)</th>
|
|
|
<td>
|
|
|
<input type="text" class="w50" name="dcRateSt" maxlength="3" required="required" data-valid-name="할인율" data-valid-type="numeric"/> ~
|
|
|
<input type="text" class="w50" name="dcRateEd" maxlength="3" required="required" data-valid-name="할인율" data-valid-type="numeric"/>
|
|
|
</td>
|
|
|
+ <th>판매가</th>
|
|
|
+ <td>
|
|
|
+ <input type="text" class="w60" name="currPriceSt" required="required" data-valid-name="판매가" data-valid-type="numeric"/>원 ~
|
|
|
+ <input type="text" class="w60" name="currPriceEd" required="required" data-valid-name="판매가" data-valid-type="numeric"/>원
|
|
|
+ </td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <th>기간</th>
|
|
|
- <td id="sellTerms" colspan='5'></td>
|
|
|
- <th>전시여부</th>
|
|
|
- <td>
|
|
|
- <select name="useYn">
|
|
|
- <option value=''>[전체]</option>
|
|
|
- <option value='Y'>[Y] Yes</option>
|
|
|
- <option value='N'>[N] No</option>
|
|
|
- </select>
|
|
|
+ <th>반품/교환</th>
|
|
|
+ <td colspan='7'>
|
|
|
+ <label class="chkBox"><input type="checkbox" name="changeableYn" id="changeableYn"/>반품불가</label>
|
|
|
+ <label class="chkBox"><input type="checkbox" name="returnableYn" id="returnableYn"/>교환불가</label>
|
|
|
+ <label class="chkBox"><input type="checkbox" name="returnFeeFreeYn" id="returnFeeFreeYn"/>무료반품</label>
|
|
|
+ <label class="chkBox"><input type="checkbox" name="changeFeeFreeYn" id="changeFeeFreeYn"/>무료교환</label>
|
|
|
</td>
|
|
|
</tr>
|
|
|
+ <tr>
|
|
|
+ <th>기간</th>
|
|
|
+ <td id="sellTerms" colspan='7'></td>
|
|
|
+ </tr>
|
|
|
</table>
|
|
|
<ul class="panelBar">
|
|
|
<li class="center">
|
|
|
- <button type="button" class="btn btn-gray btn-lg" onclick="$('#goodsSearchForm')[0].reset();" >초기화</button>
|
|
|
+ <button type="button" class="btn btn-gray btn-lg" id="btnInit" >초기화</button> <!--onclick="$('#goodsSearchForm')[0].reset();"-->
|
|
|
<button type="button" class="btn btn-info btn-lg" id="btnSearch" >조회</button>
|
|
|
</li>
|
|
|
</ul>
|
|
|
@@ -293,29 +308,46 @@
|
|
|
},
|
|
|
{headerName: "이미지", field: "sysImgNm", width: 100, height: 60, cellClass: 'text-center'
|
|
|
,cellRenderer: function(params) {
|
|
|
- return '<img width="60" src="'+ _goodsUrl+ "/" + params.value + '" alt="" onerror="this.src=\'/image/no.png\';"/>';
|
|
|
+ return '<img width="60" src="'+ _goodsUrl+ "/" + params.value + '?RS=60" alt="" onclick="cfnOpenImagePreViewPopup(\'goodsImgView\', \''+ _goodsUrl+ "/" + params.value +'\')" onerror="this.src=\'/image/no.png\';"/>';
|
|
|
}
|
|
|
},
|
|
|
+ {headerName: "브랜드", field: "brandCd", width: 80, cellClass: 'text-center'},
|
|
|
+ {headerName: "브랜드명", field: "brandEnm", width: 130, cellClass: 'text-center'},
|
|
|
{headerName: "상품코드", field: "goodsCd", width: 140, cellClass: 'text-center'},
|
|
|
{headerName: "상품명", field: "goodsNm", width: 350, cellClass: 'text-left'
|
|
|
,cellRenderer: function(params) {
|
|
|
return '<a href="javascript:void(0);">' + params.value + '</a>';
|
|
|
}
|
|
|
},
|
|
|
- {headerName: "재고", field: "currStockQty", width: 80, cellClass: 'text-right',
|
|
|
- valueFormatter: function(params) {return Number(params.value).addComma()}
|
|
|
- },
|
|
|
- {headerName: "할인율", field: "dcRate", width: 80, cellClass: 'text-right'},
|
|
|
- {headerName: "TAG가", field: "tagPrice", width: 80, cellClass: 'text-right',
|
|
|
- valueFormatter: function(params) {return Number(params.value).addComma()}
|
|
|
+ {headerName: "기존품목코드", field: "itemkindCd", width: 150, cellClass: 'text-center' },
|
|
|
+ {headerName: "품목", field: "itemkindNm", width: 150, cellClass: 'text-center'},
|
|
|
+ {headerName: "전시재고", field: "stockQtySum", width: 120, cellClass: 'text-right',
|
|
|
+ valueFormatter: function(params) { return params.value.addComma();},
|
|
|
+ cellStyle : function(params){
|
|
|
+ if ("00" == params.data.goodsStat || "10" == params.data.goodsStat || "20" == params.data.goodsStat || "30" == params.data.goodsStat) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var color = "";
|
|
|
+ if (params.value <= 0){
|
|
|
+ color = '#ff96689c';
|
|
|
+ }
|
|
|
+ return { 'background-color': color};
|
|
|
+ }
|
|
|
},
|
|
|
+ {headerName: "상품타입", field: "goodsType" , width: 100, cellClass: 'text-center'},
|
|
|
+ // {headerName: "년도", field: "styleYear" , width: 80, cellClass: 'text-center'},
|
|
|
+ // {headerName: "시즌", field: "seasonCd" , width: 80, cellClass: 'text-center',
|
|
|
+ // cellEditorParams: { values: gagaAgGrid.extractValues(seasonList) },
|
|
|
+ // valueFormatter: function (params) { return gagaAgGrid.lookupValue(seasonList, params.value); },
|
|
|
+ // valueParser: function (params) { return gagaAgGrid.lookupKey(seasonList, params.newValue); }
|
|
|
+ // },
|
|
|
{headerName: "정상가", field: "listPrice", width: 80, cellClass: 'text-right',
|
|
|
valueFormatter: function(params) {return Number(params.value).addComma()}
|
|
|
},
|
|
|
{headerName: "판매가", field: "currPrice", width: 80, cellClass: 'text-right',
|
|
|
valueFormatter: function(params) {return Number(params.value).addComma()}
|
|
|
},
|
|
|
- {headerName: "상품타입", field: "goodsType", width: 80, cellClass: 'text-center'},
|
|
|
+ {headerName: "할인율", field: "dcRate", width: 80, cellClass: 'text-right'},
|
|
|
{headerName: "포인트적립율(PC)", field: "pntPrate", width: 80, cellClass: 'text-right'},
|
|
|
{headerName: "선포인트사용가능여부(PC)", field: "prePpntUsableYn", width: 80, cellClass: 'text-right'},
|
|
|
{headerName: "포인트적립율(모바일)", field: "pntMrate", width: 80, cellClass: 'text-right'},
|
|
|
@@ -325,10 +357,9 @@
|
|
|
cellEditorParams: { values: gagaAgGrid.extractValues(goodsStatList) },
|
|
|
valueFormatter: function (params) { return gagaAgGrid.lookupValue(goodsStatList, params.value); },
|
|
|
valueParser: function (params) { return gagaAgGrid.lookupKey(goodsStatList, params.newValue); }
|
|
|
- },
|
|
|
+ }
|
|
|
//{headerName: "판매가능재고", field: "currStockQty", width: 100, cellClass: 'text-right'}, // 추후 추가해야함 ㅠㅠ
|
|
|
//{headerName: "품절여부", field: "soldoutYn", width: 80, cellClass: 'text-center'}, // 추후 추가해야함 ㅠㅠ
|
|
|
- {headerName: "기존품목코드", field: "itemkindCd", width: 150, cellClass: 'text-center' }
|
|
|
/*{headerName: "품목명", field: "itemkindNm", width: 250, cellClass: 'text-left'},
|
|
|
{headerName: "기존품목코드", field: "itemkindCd", width: 150, cellClass: 'text-center' },
|
|
|
{headerName: "변경품목코드", field: "itemkindCdNew", width: 150, cellClass: 'text-center', editable : true,
|
|
|
@@ -376,8 +407,135 @@
|
|
|
gagaAgGrid.fetch(actionUrl, gridCategoryOptions);
|
|
|
}
|
|
|
|
|
|
- // 조회
|
|
|
+ // 조회클릭시
|
|
|
$('#btnSearch').on('click', function() {
|
|
|
+ $("#goodsSearchForm input[name=pageNo]").val('1');
|
|
|
+ fnGoodsListSearch('BASIC');
|
|
|
+ });
|
|
|
+
|
|
|
+ // 조회
|
|
|
+ var fnGoodsListSearch = function (gbn){
|
|
|
+ if (typeof(gbn) != 'undefined' && gbn == 'EXCEL'){
|
|
|
+ $("#goodsSearchForm input[name=searchGb]").val("EXCEL");
|
|
|
+ }else{
|
|
|
+ $("#goodsSearchForm input[name=searchGb]").val("BASIC");
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!fnConditionCheck()) return;
|
|
|
+
|
|
|
+ $('#goodsSearchForm input[name=changeableYn]').val($("#changeableYn").prop('checked')? 'N':'');
|
|
|
+ $('#goodsSearchForm input[name=returnableYn]').val($("#returnableYn").prop('checked')? 'N':'');
|
|
|
+ $('#goodsSearchForm input[name=returnFeeFreeYn]').val($("#returnFeeFreeYn").prop('checked')? 'Y':'');
|
|
|
+ $('#goodsSearchForm input[name=changeFeeFreeYn]').val($("#changeFeeFreeYn").prop('checked')? 'Y':'');
|
|
|
+
|
|
|
+ gagaPaging.init('goodsSearchForm', fnSearchCallBack, 'goodsCategoryListPagination', $('#goodsSearchForm').find('#pageSize').val());
|
|
|
+ gagaPaging.load($("#goodsSearchForm input[name=pageNo]").val());
|
|
|
+ }
|
|
|
+
|
|
|
+ //검색 조건 확인
|
|
|
+ var fnConditionCheck = function(){
|
|
|
+ var formId = '#goodsSearchForm';
|
|
|
+ var form = document.goodsSearchForm;
|
|
|
+
|
|
|
+ if (event.keyCode === 13) return false;
|
|
|
+
|
|
|
+ if($("#goodsSearchForm input[name=searchGb]").val() == "EXCEL") return true;
|
|
|
+
|
|
|
+ var searchFlag = false;
|
|
|
+ var cnt = 0;
|
|
|
+
|
|
|
+ if( !gagajf.isNull($("#goodsSearchForm input[name=supplyCompList]").val())
|
|
|
+ || !gagajf.isNull($("#goodsSearchForm textarea[name=condition]").val())
|
|
|
+ || (!gagajf.isNull($("#goodsSearchForm input[name=stDate]").val()) && !gagajf.isNull($("#goodsSearchForm input[name=edDate]").val()))
|
|
|
+ || !gagajf.isNull($("#goodsSearchForm input[name=brandList]").val())
|
|
|
+ ){
|
|
|
+ searchFlag = true;
|
|
|
+ }else{
|
|
|
+ /* for (i = 0; i < form.elements.length; i++ ) {
|
|
|
+ var el = form.elements[i];
|
|
|
+
|
|
|
+ if ($(el).prop("type") == "text" || ($(el).prop("type") == "select-one" && el.name != "search" && el.name != "pageSize")) {
|
|
|
+ if (!(el.value == null || el.value == "")) {
|
|
|
+ cnt++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(cnt > 0) searchFlag = true; */
|
|
|
+ }
|
|
|
+
|
|
|
+ if(searchFlag == false){
|
|
|
+ mcxDialog.alert("검색조건을 입력하세요.");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!gagajf.isNull($("#goodsSearchForm input[name=currPriceSt]").val()) && !gagajf.isNull($("#goodsSearchForm input[name=currPriceEd]").val())){
|
|
|
+ if (Number($("#goodsSearchForm input[name=currPriceSt]").val().removeComma()) > Number($("#goodsSearchForm input[name=currPriceEd]").val().removeComma()) ){
|
|
|
+ mcxDialog.alertC("판매가를 확인해 주세요.", {
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ $("#goodsSearchForm input[name=currPriceEd]").focus();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!gagajf.isNull($("#goodsSearchForm input[name=dcRateSt]").val()) && !gagajf.isNull($("#goodsSearchForm input[name=dcRateEd]").val())){
|
|
|
+ if (Number($("#goodsSearchForm input[name=dcRateSt]").val().removeComma()) > Number($("#goodsSearchForm input[name=dcRateEd]").val().removeComma()) ){
|
|
|
+ mcxDialog.alertC("할인율를 확인해 주세요.", {
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ $("#goodsSearchForm input[name=dcRateEd]").focus();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ var fromDate = $('#goodsSearchForm input[name=stDate]').val();
|
|
|
+ var toDate = $('#goodsSearchForm input[name=edDate]').val();
|
|
|
+
|
|
|
+ if (!gagajf.isNull(fromDate) || !gagajf.isNull(toDate)) {
|
|
|
+
|
|
|
+ if (gagajf.isNull(fromDate) || gagajf.isNull(toDate)) {
|
|
|
+ mcxDialog.alertC("등록일 조회시 시작일자와 종료일자를 입력하세요.", {
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ $('#goodsSearchForm input[name=stDate]').focus();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (fromDate > toDate) {
|
|
|
+ mcxDialog.alertC("등록 시작일자는 종료일자 보다 클 수 없습니다.", {
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ $('#goodsSearchForm input[name=stDate]').focus();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!gagajf.isNull($('#goodsSearchForm textarea[name=condition]').val())){
|
|
|
+ var arrData = $('#goodsSearchForm textarea[name=condition]').val().replace(/\r\n/g,"\n").split("\n");
|
|
|
+ if (arrData.length > 500){
|
|
|
+ mcxDialog.alertC("키워드 조회값을 500 이하로 조회 하세요.", {
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ $('#goodsSearchForm textarea[name=condition]').focus();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 조회
|
|
|
+ $('#btnSearch2').on('click', function() {
|
|
|
if(gagajf.isNull($("#goodsSearchForm select[name=supplyCompCd]").val())
|
|
|
&& gagajf.isNull($("#goodsSearchForm input[name=goodsCd]").val())
|
|
|
&& (gagajf.isNull($("#goodsSearchForm input[name=stDate]").val()) && gagajf.isNull($("#goodsSearchForm input[name=edDate]").val()))){
|
|
|
@@ -607,6 +765,78 @@
|
|
|
fnSearch();
|
|
|
}
|
|
|
|
|
|
+ // 업체 조회 선택시
|
|
|
+ $('#btnSearchSupplyComp').on('click', function() {
|
|
|
+ cfnOpenCompanyListPopup('fnSetSupplyCompInfo', 'M');
|
|
|
+ });
|
|
|
+
|
|
|
+ // 업체 조회 팝업에서 호출
|
|
|
+ var fnSetSupplyCompInfo = function(result) {
|
|
|
+ var arrSupplyComp = [];
|
|
|
+ var supplyCompText = "";
|
|
|
+ var sIndex = 0;
|
|
|
+ $('#goodsSearchForm').find('#supplyCompText').html('');
|
|
|
+ $('#goodsSearchForm input[name=supplyCompSearchTxt]').val('');
|
|
|
+ result.forEach(function(supplyComp){
|
|
|
+ sIndex++;
|
|
|
+ arrSupplyComp.push(supplyComp.supplyCompCd);
|
|
|
+ });
|
|
|
+
|
|
|
+ // 조회값이 하나일 경우 화면에 코드 노출 그외는 갯수 처리
|
|
|
+ if (sIndex == 1) {
|
|
|
+ $('#goodsSearchForm input[name=supplyCompSearchTxt]').val(arrSupplyComp[0]);
|
|
|
+ }else{
|
|
|
+ supplyCompText = sIndex + " 개";
|
|
|
+ $('#goodsSearchForm').find('#supplyCompText').html(supplyCompText);
|
|
|
+ }
|
|
|
+ var jsonData = JSON.stringify(arrSupplyComp);
|
|
|
+ $("#goodsSearchForm input[name=supplyCompList]").val(jsonData);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 브랜드 조회 선택시
|
|
|
+ $('#btnSearchBrand').on('click', function() {
|
|
|
+ cfnOpenBrandListPopup('fnSetBrandInfo', 'M');
|
|
|
+ });
|
|
|
+
|
|
|
+ // 브랜드 조회 팝업에서 호출
|
|
|
+ var fnSetBrandInfo = function(result) {
|
|
|
+ var arrbrandCd = [];
|
|
|
+ var brandText = "";
|
|
|
+ var bIndex = 0;
|
|
|
+ $('#goodsSearchForm').find('#brandText').html('');
|
|
|
+ $('#goodsSearchForm input[name=searchTxt]').val('');
|
|
|
+ result.forEach(function(brand){
|
|
|
+ bIndex++;
|
|
|
+ arrbrandCd.push(brand.brandCd);
|
|
|
+ });
|
|
|
+
|
|
|
+ // 조회값이 하나일 경우 화면에 코드 노출 그외는 갯수 처리
|
|
|
+ if (bIndex == 1) {
|
|
|
+ $('#goodsSearchForm input[name=searchTxt]').val(arrbrandCd[0]);
|
|
|
+ }else{
|
|
|
+ brandText = bIndex + " 개";
|
|
|
+ $('#goodsSearchForm').find('#brandText').html(brandText);
|
|
|
+ }
|
|
|
+ var jsonData = JSON.stringify(arrbrandCd);
|
|
|
+ $("#goodsSearchForm input[name=brandList]").val(jsonData);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 초기화 클릭시
|
|
|
+ $('#btnInit').on('click', function() {
|
|
|
+
|
|
|
+ $('#goodsSearchForm')[0].reset();
|
|
|
+ //$("#searchForm input[type=radio]").removeClass("checked");
|
|
|
+ $("#goodsSearchForm input[type=checkbox]").removeClass("checked");
|
|
|
+ //$("#searchForm input[type=radio]").parent("label").removeClass("checked");
|
|
|
+ $("#goodsSearchForm input[type=checkbox]").parent("label").removeClass("checked");
|
|
|
+ $("#goodsSearchForm input[type=radio][checked]").parent("label").addClass("checked");
|
|
|
+ $("#multiBrand").empty();
|
|
|
+ $('#goodsSearchForm input[name=brandList]').val('');
|
|
|
+ $('#goodsSearchForm input[name=supplyCompList]').val('');
|
|
|
+ $('#goodsSearchForm').find('#brandText').html('');
|
|
|
+ $('#goodsSearchForm').find('#supplyCompText').html('');
|
|
|
+ });
|
|
|
+
|
|
|
$(document).ready(function() {
|
|
|
cfnCreateCalendar('#sellTerms', 'stDate', 'edDate', true, '기간', 'X');
|
|
|
// Create a agGrid
|