|
|
@@ -54,19 +54,26 @@
|
|
|
<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>
|
|
|
+ <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"/>
|
|
|
+
|
|
|
+ <!-- <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>
|
|
|
+ <span id="multiBrand"></span> -->
|
|
|
</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="btnSearchBrand"><i class="fa fa-search"></i></button>
|
|
|
- <input type="text" class="w100" name="brandCd" readonly="readonly"/>
|
|
|
+ <!-- <input type="text" class="w100" name="brandCd" readonly="readonly"/> -->
|
|
|
+ <span id="brandText"></span>
|
|
|
+ <input type="hidden" name="brandList"/>
|
|
|
</td>
|
|
|
<th rowspan="4">키워드<em class="required" title="필수"></em></th>
|
|
|
<td rowspan="4">
|
|
|
@@ -549,6 +556,9 @@
|
|
|
$("#searchForm input[type=checkbox]").parent("label").removeClass("checked");
|
|
|
$("#searchForm input[type=radio][checked]").parent("label").addClass("checked");
|
|
|
$("#multiBrand").empty();
|
|
|
+ $('#searchForm input[name=brandList]').val('');
|
|
|
+ $('#searchForm input[name=supplyCompList]').val('');
|
|
|
+ $('#searchForm').find('#brandText').html('');
|
|
|
});
|
|
|
|
|
|
// 조회클릭시
|
|
|
@@ -584,11 +594,11 @@
|
|
|
var searchFlag = false;
|
|
|
var cnt = 0;
|
|
|
|
|
|
- if( !gagajf.isNull($("#searchForm select[name=supplyCompCd]").val())
|
|
|
+ if( !gagajf.isNull($("#searchForm input[name=supplyCompList]").val())
|
|
|
|| !gagajf.isNull($("#searchForm select[name=statSupplyCompCd]").val())
|
|
|
|| !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=brandCd]").val())
|
|
|
+ || !gagajf.isNull($("#searchForm input[name=brandList]").val())
|
|
|
){
|
|
|
searchFlag = true;
|
|
|
}else{
|
|
|
@@ -1074,23 +1084,68 @@
|
|
|
cfnCreateCombo('/renderer/delvFee/list/' + $('#searchForm select[name=statSupplyCompCd]').val(), $('#searchForm select[name=delvFeeCdC]'), "[선택]");
|
|
|
});
|
|
|
|
|
|
+ // 업체 조회 선택시
|
|
|
+ $('#btnSearchSupplyComp').on('click', function() {
|
|
|
+ cfnOpenCompanyListPopup('fnSetSupplyCompInfo', 'M');
|
|
|
+ });
|
|
|
+
|
|
|
+ // 업체 조회 팝업에서 호출
|
|
|
+ var fnSetSupplyCompInfo = function(result) {
|
|
|
+ var arrSupplyComp = [];
|
|
|
+ var supplyCompText = "";
|
|
|
+ var sIndex = 0;
|
|
|
+ $('#searchForm').find('#supplyCompText').html('');
|
|
|
+ $('#searchForm input[name=supplyCompSearchTxt]').val('');
|
|
|
+ result.forEach(function(supplyComp){
|
|
|
+ sIndex++;
|
|
|
+ arrSupplyComp.push(supplyComp.supplyCompCd);
|
|
|
+ });
|
|
|
+
|
|
|
+ // 조회값이 하나일 경우 화면에 코드 노출 그외는 갯수 처리
|
|
|
+ if (sIndex == 1) {
|
|
|
+ $('#searchForm input[name=supplyCompSearchTxt]').val(arrSupplyComp[0]);
|
|
|
+ }else{
|
|
|
+ supplyCompText = sIndex + " 개";
|
|
|
+ $('#searchForm').find('#supplyCompText').html(supplyCompText);
|
|
|
+ }
|
|
|
+ var jsonData = JSON.stringify(arrSupplyComp);
|
|
|
+ $("#searchForm input[name=supplyCompList]").val(jsonData);
|
|
|
+ }
|
|
|
+
|
|
|
// 브랜드 조회 팝업에서 호출
|
|
|
var fnSetBrandInfo = function(result) {
|
|
|
- $("#searchForm input[name=brandCd]").val(result[0].brandCd);
|
|
|
+ var arrbrandCd = [];
|
|
|
+ var brandText = "";
|
|
|
+ var bIndex = 0;
|
|
|
+ $('#searchForm').find('#brandText').html('');
|
|
|
+ $('#searchForm input[name=searchTxt]').val('');
|
|
|
+ result.forEach(function(brand){
|
|
|
+ bIndex++;
|
|
|
+ arrbrandCd.push(brand.brandCd);
|
|
|
+ });
|
|
|
+
|
|
|
+ // 조회값이 하나일 경우 화면에 코드 노출 그외는 갯수 처리
|
|
|
+ if (bIndex == 1) {
|
|
|
+ $('#searchForm input[name=searchTxt]').val(arrbrandCd[0]);
|
|
|
+ }else{
|
|
|
+ brandText = bIndex + " 개";
|
|
|
+ $('#searchForm').find('#brandText').html(brandText);
|
|
|
+ }
|
|
|
+ var jsonData = JSON.stringify(arrbrandCd);
|
|
|
+ $("#searchForm input[name=brandList]").val(jsonData);
|
|
|
}
|
|
|
|
|
|
// 브랜드 조회 선택시
|
|
|
$('#btnSearchBrand').on('click', function() {
|
|
|
-
|
|
|
/* if (gagajf.isNull($("#searchForm input[name=searchTxt]").val())){
|
|
|
mcxDialog.alert('브랜드 검색어를 입력하세요.');
|
|
|
return false;
|
|
|
} */
|
|
|
-
|
|
|
- cfnOpenBrandListPopup('fnSetBrandInfo', 'M', $("#searchForm input[name=searchTxt]").val());
|
|
|
-
|
|
|
+ cfnOpenBrandListPopup('fnSetBrandInfo', 'M');
|
|
|
});
|
|
|
|
|
|
+
|
|
|
+
|
|
|
// 상품이미지 미리보기 레이어에서 창 종료 이벤트
|
|
|
$(document).on("mouseleave","#goodsImgView",function(){
|
|
|
$("#goodsImgView").remove();
|