|
|
@@ -27,7 +27,7 @@
|
|
|
<input type="hidden" id="goodsPriceYn" name="goodsPriceYn" value="Y"/> <!-- 즉시할인판매가 조회 -->
|
|
|
<div class="panelContent">
|
|
|
<ul class="notice">
|
|
|
- <li>아래 검색조건 중 <font color="red">업체, 키워드, 발생일</font>중 하나를 꼭 입력해 주세요.</li>
|
|
|
+ <li>아래 검색조건 중 <font color="red">업체, 브랜드, 키워드, 발생일</font>중 하나를 꼭 입력해 주세요.</li>
|
|
|
</ul>
|
|
|
<table class="frmStyle">
|
|
|
<colgroup>
|
|
|
@@ -41,22 +41,28 @@
|
|
|
<col/>
|
|
|
</colgroup>
|
|
|
<tr>
|
|
|
- <th>업체/브랜드<em class="required" title="필수"></em></th>
|
|
|
- <td colspan="3">
|
|
|
- <label class="rdoBtn"><input type="radio" name="selfYn" id="selfYnY" value="Y" checked/>자사</label>
|
|
|
- <label class="rdoBtn"><input type="radio" name="selfYn" id="selfYnN" value="N"/>입점</label>
|
|
|
- <select name="supplyCompCd" id="supplyCompCd">
|
|
|
- <option value="" th:if="${sessionInfo.roleCd} != 'G001_B000'">[전체]</option>
|
|
|
- <option th:if="${supplyCompList}" th:each="oneData, status : ${supplyCompList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
- </select>
|
|
|
- <span id="multiBrand"></span>
|
|
|
+ <th>업체<em class="required" title="필수"></em></th>
|
|
|
+ <td>
|
|
|
+ <input type="text" class="w100" name="supplyCompSearchTxt" id="supplyCompSearchTxt" maxlength="20" />
|
|
|
+ <button type="button" class="btn icn" id="btnPopupSearchSupplyComp"><i class="fa fa-search"></i></button>
|
|
|
+ <span id="supplyCompText"></span>
|
|
|
+ <input type="hidden" name="supplyCompList"/>
|
|
|
</td>
|
|
|
<th>브랜드<em class="required" title="필수"></em></th>
|
|
|
- <td>
|
|
|
- <input type="text" class="w100" name="searchTxt" id="searchTxt" maxlength="20" />
|
|
|
- <button type="button" class="btn icn" id="btnPopupSearchBrand"><i class="fa fa-search"></i></button>
|
|
|
- <input type="text" class="w100" name="brandCd" readonly="readonly"/>
|
|
|
- </td>
|
|
|
+ <td>
|
|
|
+ <input type="text" class="w100" name="searchTxt" id="searchTxt" maxlength="20" />
|
|
|
+ <button type="button" class="btn icn" id="btnPopupSearchBrand"><i class="fa fa-search"></i></button>
|
|
|
+ <!-- <input type="text" class="w100" name="brandCd" readonly="readonly"/> -->
|
|
|
+ <span id="brandText"></span>
|
|
|
+ <input type="hidden" name="brandList"/>
|
|
|
+ </td>
|
|
|
+ <th>상품타입</th>
|
|
|
+ <td>
|
|
|
+ <select name="goodsType" id="goodsType">
|
|
|
+ <option value="">[전체]</option>
|
|
|
+ <option th:if="${goodsTypeList}" th:each="oneData, status : ${goodsTypeList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
<th rowspan="4">키워드<em class="required" title="필수"></em></th>
|
|
|
<td rowspan="4">
|
|
|
<select name="search" id="search">
|
|
|
@@ -193,14 +199,7 @@
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th>발생일<em class="required" title="필수"></em></th>
|
|
|
- <td colspan="5" id="sellTermsP"></td>
|
|
|
- <th>상품타입</th>
|
|
|
- <td>
|
|
|
- <select name="goodsType" id="goodsType">
|
|
|
- <option value="">[전체]</option>
|
|
|
- <option th:if="${goodsTypeList}" th:each="oneData, status : ${goodsTypeList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
- </select>
|
|
|
- </td>
|
|
|
+ <td colspan="7" id="sellTermsP"></td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
<ul class="panelBar">
|
|
|
@@ -342,6 +341,10 @@
|
|
|
//$("#goodsPopupForm input[type=radio]").parent("label").removeClass("checked");
|
|
|
$("#goodsPopupForm input[type=checkbox]").parent("label").removeClass("checked");
|
|
|
$("#goodsPopupForm input[type=radio][checked]").parent("label").addClass("checked");
|
|
|
+ $('#goodsPopupForm input[name=brandList]').val('');
|
|
|
+ $('#goodsPopupForm input[name=supplyCompList]').val('');
|
|
|
+ $('#goodsPopupForm').find('#brandText').html('');
|
|
|
+ $('#goodsPopupForm').find('#supplyCompText').html('');
|
|
|
});
|
|
|
|
|
|
// 조회클릭시
|
|
|
@@ -381,10 +384,10 @@
|
|
|
var searchFlag = false;
|
|
|
var cnt = 0;
|
|
|
|
|
|
- if( !gagajf.isNull($("#goodsPopupForm select[name=supplyCompCd]").val())
|
|
|
+ if( !gagajf.isNull($("#goodsPopupForm input[name=supplyCompList]").val())
|
|
|
|| !gagajf.isNull($("#goodsPopupForm textarea[name=condition]").val())
|
|
|
|| (!gagajf.isNull($("#goodsPopupForm input[name=stDate]").val()) && !gagajf.isNull($("#goodsPopupForm input[name=edDate]").val())
|
|
|
- || !gagajf.isNull($("#goodsPopupForm input[name=brandCd]").val())
|
|
|
+ || !gagajf.isNull($("#goodsPopupForm input[name=brandList]").val())
|
|
|
|
|
|
)
|
|
|
){
|
|
|
@@ -532,20 +535,66 @@
|
|
|
|
|
|
});
|
|
|
|
|
|
+ // 업체 조회 선택시
|
|
|
+ $('#btnPopupSearchSupplyComp').on('click', function() {
|
|
|
+ cfnOpenCompanyListPopup('fnSetPopupSupplyCompInfo', 'M');
|
|
|
+ });
|
|
|
+
|
|
|
+ // 업체 조회 팝업에서 호출
|
|
|
+ var fnSetPopupSupplyCompInfo = function(result) {
|
|
|
+ var arrSupplyComp = [];
|
|
|
+ var supplyCompText = "";
|
|
|
+ var sIndex = 0;
|
|
|
+ $('#goodsPopupForm').find('#supplyCompText').html('');
|
|
|
+ $('#goodsPopupForm input[name=supplyCompSearchTxt]').val('');
|
|
|
+ result.forEach(function(supplyComp){
|
|
|
+ sIndex++;
|
|
|
+ arrSupplyComp.push(supplyComp.supplyCompCd);
|
|
|
+ });
|
|
|
+
|
|
|
+ // 조회값이 하나일 경우 화면에 코드 노출 그외는 갯수 처리
|
|
|
+ if (sIndex == 1) {
|
|
|
+ $('#goodsPopupForm input[name=supplyCompSearchTxt]').val(arrSupplyComp[0]);
|
|
|
+ }else{
|
|
|
+ supplyCompText = sIndex + " 개";
|
|
|
+ $('#goodsPopupForm').find('#supplyCompText').html(supplyCompText);
|
|
|
+ }
|
|
|
+ var jsonData = JSON.stringify(arrSupplyComp);
|
|
|
+ $("#goodsPopupForm input[name=supplyCompList]").val(jsonData);
|
|
|
+ }
|
|
|
+
|
|
|
// 브랜드 조회 팝업에서 호출
|
|
|
var fnSetPopupBrandInfo = function(result) {
|
|
|
- $("#goodsPopupForm input[name=brandCd]").val(result[0].brandCd);
|
|
|
+ var arrbrandCd = [];
|
|
|
+ var brandText = "";
|
|
|
+ var bIndex = 0;
|
|
|
+ $('#goodsPopupForm').find('#brandText').html('');
|
|
|
+ $('#goodsPopupForm input[name=searchTxt]').val('');
|
|
|
+ result.forEach(function(brand){
|
|
|
+ bIndex++;
|
|
|
+ arrbrandCd.push(brand.brandCd);
|
|
|
+ });
|
|
|
+
|
|
|
+ // 조회값이 하나일 경우 화면에 코드 노출 그외는 갯수 처리
|
|
|
+ if (bIndex == 1) {
|
|
|
+ $('#goodsPopupForm input[name=searchTxt]').val(arrbrandCd[0]);
|
|
|
+ }else{
|
|
|
+ brandText = bIndex + " 개";
|
|
|
+ $('#goodsPopupForm').find('#brandText').html(brandText);
|
|
|
+ }
|
|
|
+ var jsonData = JSON.stringify(arrbrandCd);
|
|
|
+ $("#goodsPopupForm input[name=brandList]").val(jsonData);
|
|
|
}
|
|
|
|
|
|
// 브랜드 조회 선택시
|
|
|
$('#btnPopupSearchBrand').on('click', function() {
|
|
|
|
|
|
- if (gagajf.isNull($("#goodsPopupForm input[name=searchTxt]").val())){
|
|
|
+ /* if (gagajf.isNull($("#goodsPopupForm input[name=searchTxt]").val())){
|
|
|
mcxDialog.alert('브랜드 검색어를 입력하세요.');
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
- cfnOpenBrandListPopup('fnSetPopupBrandInfo', $("#goodsPopupForm input[name=searchTxt]").val());
|
|
|
+ */
|
|
|
+ cfnOpenBrandListPopup('fnSetPopupBrandInfo', 'M');
|
|
|
|
|
|
});
|
|
|
|