|
|
@@ -32,31 +32,37 @@
|
|
|
<div class="panelContent">
|
|
|
<table class="frmStyle">
|
|
|
<colgroup>
|
|
|
- <col width="7%"/>
|
|
|
- <col/>
|
|
|
- <col width="7%"/>
|
|
|
- <col width="18%"/>
|
|
|
- <col width="7%"/>
|
|
|
<col width="10%"/>
|
|
|
- <col width="7%"/>
|
|
|
+ <col width="15%"/>
|
|
|
<col width="10%"/>
|
|
|
+ <col width="15%"/>
|
|
|
+ <col width="10%"/>
|
|
|
+ <col width="15%"/>
|
|
|
+ <col width="10%"/>
|
|
|
+ <col />
|
|
|
</colgroup>
|
|
|
<tr>
|
|
|
- <th>업체/브랜드<em class="required" title="필수"></em></th>
|
|
|
+ <th>업체<em class="required" title="필수"></em></th>
|
|
|
<td>
|
|
|
- <select name="supplyCompCd" id="supplyCompCd">
|
|
|
+ <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"/>
|
|
|
+ <!-- <select name="supplyCompCd" id="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>
|
|
|
<select name="brandCd" id="brandCd">
|
|
|
<option value="">[전체]</option>
|
|
|
- </select>
|
|
|
+ </select> -->
|
|
|
</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="searchBrandCd" readonly="readonly"/>
|
|
|
+ <!-- <input type="text" class="w100" name="brandCd" readonly="readonly"/> -->
|
|
|
+ <span id="brandText"></span>
|
|
|
+ <input type="hidden" name="brandList"/>
|
|
|
</td>
|
|
|
<th>상품코드<em class="required" title="필수"></em></th>
|
|
|
<td>
|
|
|
@@ -220,6 +226,10 @@
|
|
|
//$("#goodsPriceHstForm input[type=radio]").parent("label").removeClass("checked");
|
|
|
$("#goodsPriceHstForm input[type=checkbox]").parent("label").removeClass("checked");
|
|
|
$("#goodsPriceHstForm input[type=radio][checked]").parent("label").addClass("checked");
|
|
|
+ $('#goodsPriceHstForm input[name=brandList]').val('');
|
|
|
+ $('#goodsPriceHstForm input[name=supplyCompList]').val('');
|
|
|
+ $('#goodsPriceHstForm').find('#brandText').html('');
|
|
|
+ $('#goodsPriceHstForm').find('#supplyCompText').html('');
|
|
|
}
|
|
|
|
|
|
// 조회클릭시
|
|
|
@@ -253,10 +263,10 @@
|
|
|
var searchFlag = false;
|
|
|
var cnt = 0;
|
|
|
|
|
|
- if( !gagajf.isNull($("#goodsPriceHstForm select[name=supplyCompCd]").val())
|
|
|
+ if( !gagajf.isNull($("#goodsPriceHstForm input[name=supplyCompList]").val())
|
|
|
|| !gagajf.isNull($("#goodsPriceHstForm input[name=goodsCd]").val())
|
|
|
|| (!gagajf.isNull($("#goodsPriceHstForm input[name=stDate]").val()) && !gagajf.isNull($("#goodsPriceHstForm input[name=edDate]").val()))
|
|
|
- || !gagajf.isNull($("#goodsPriceHstForm input[name=searchBrandCd]").val())
|
|
|
+ || !gagajf.isNull($("#goodsPriceHstForm input[name=brandList]").val())
|
|
|
){
|
|
|
searchFlag = true;
|
|
|
}else{
|
|
|
@@ -283,7 +293,7 @@
|
|
|
}
|
|
|
|
|
|
//업체변경시
|
|
|
- $('#goodsPriceHstForm select[name=supplyCompCd]').on('change', function() {
|
|
|
+/* $('#goodsPriceHstForm select[name=supplyCompCd]').on('change', function() {
|
|
|
var actionUrl = '/renderer/supplyCompany/brand/list/' + $(this).val();
|
|
|
|
|
|
if(sessRoleCd == "G001_A1001"){
|
|
|
@@ -293,10 +303,10 @@
|
|
|
|
|
|
cfnCreateCombo(actionUrl, $('#goodsPriceHstForm select[name=brandCd]'), "[전체]", "");
|
|
|
|
|
|
- });
|
|
|
+ }); */
|
|
|
|
|
|
//브랜드 변경시
|
|
|
- $('#goodsPriceHstForm select[name=brandCd]').on('change', function() {
|
|
|
+/* $('#goodsPriceHstForm select[name=brandCd]').on('change', function() {
|
|
|
|
|
|
var supplyCompCd = $('#goodsPriceHstForm select[name=supplyCompCd]').val();
|
|
|
var brandCd = $('#goodsPriceHstForm select[name=brandCd]').val();
|
|
|
@@ -306,8 +316,65 @@
|
|
|
cfnCreateCombo(url, $('#goodsPriceHstForm select[name=sellStoreCd]'), "[전체]", "");
|
|
|
}
|
|
|
|
|
|
+ });
|
|
|
+ */
|
|
|
+ // 업체 조회 선택시
|
|
|
+ $('#btnSearchSupplyComp').on('click', function() {
|
|
|
+ cfnOpenCompanyListPopup('fnSetSupplyCompInfo', 'M');
|
|
|
+ });
|
|
|
+
|
|
|
+ // 업체 조회 팝업에서 호출
|
|
|
+ var fnSetSupplyCompInfo = function(result) {
|
|
|
+ var arrSupplyComp = [];
|
|
|
+ var supplyCompText = "";
|
|
|
+ var sIndex = 0;
|
|
|
+ $('#goodsPriceHstForm').find('#supplyCompText').html('');
|
|
|
+ $('#goodsPriceHstForm input[name=supplyCompSearchTxt]').val('');
|
|
|
+ result.forEach(function(supplyComp){
|
|
|
+ sIndex++;
|
|
|
+ arrSupplyComp.push(supplyComp.supplyCompCd);
|
|
|
+ });
|
|
|
+
|
|
|
+ // 조회값이 하나일 경우 화면에 코드 노출 그외는 갯수 처리
|
|
|
+ if (sIndex == 1) {
|
|
|
+ $('#goodsPriceHstForm input[name=supplyCompSearchTxt]').val(arrSupplyComp[0]);
|
|
|
+ }else{
|
|
|
+ supplyCompText = sIndex + " 개";
|
|
|
+ $('#goodsPriceHstForm').find('#supplyCompText').html(supplyCompText);
|
|
|
+ }
|
|
|
+ var jsonData = JSON.stringify(arrSupplyComp);
|
|
|
+ $("#goodsPriceHstForm input[name=supplyCompList]").val(jsonData);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 브랜드 조회 선택시
|
|
|
+ $('#btnSearchBrand').on('click', function() {
|
|
|
+ cfnOpenBrandListPopup('fnSetBrandInfo', 'M');
|
|
|
});
|
|
|
|
|
|
+ // 브랜드 조회 팝업에서 호출
|
|
|
+ var fnSetBrandInfo = function(result) {
|
|
|
+ var arrbrandCd = [];
|
|
|
+ var brandText = "";
|
|
|
+ var bIndex = 0;
|
|
|
+ $('#goodsPriceHstForm').find('#brandText').html('');
|
|
|
+ $('#goodsPriceHstForm input[name=searchTxt]').val('');
|
|
|
+ result.forEach(function(brand){
|
|
|
+ bIndex++;
|
|
|
+ arrbrandCd.push(brand.brandCd);
|
|
|
+ });
|
|
|
+
|
|
|
+ // 조회값이 하나일 경우 화면에 코드 노출 그외는 갯수 처리
|
|
|
+ if (bIndex == 1) {
|
|
|
+ $('#goodsPriceHstForm input[name=searchTxt]').val(arrbrandCd[0]);
|
|
|
+ }else{
|
|
|
+ brandText = bIndex + " 개";
|
|
|
+ $('#goodsPriceHstForm').find('#brandText').html(brandText);
|
|
|
+ }
|
|
|
+ var jsonData = JSON.stringify(arrbrandCd);
|
|
|
+ $("#goodsPriceHstForm input[name=brandList]").val(jsonData);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
// 승인 클릭 시
|
|
|
$('#btnSaveGoodsPriceConfirm').on('click', function() {
|
|
|
|
|
|
@@ -355,23 +422,6 @@
|
|
|
fnGoodsPriceHstListSearch('N');
|
|
|
}
|
|
|
|
|
|
- // 브랜드 조회 팝업에서 호출
|
|
|
- var fnSetBrandInfo = function(result) {
|
|
|
- $("#goodsPriceHstForm input[name=searchBrandCd]").val(result[0].brandCd);
|
|
|
- }
|
|
|
-
|
|
|
- // 브랜드 조회 선택시
|
|
|
- $('#btnSearchBrand').on('click', function() {
|
|
|
-
|
|
|
- if (gagajf.isNull($("#goodsPriceHstForm input[name=searchTxt]").val())){
|
|
|
- mcxDialog.alert('브랜드 검색어를 입력하세요.');
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- cfnOpenBrandListPopup('fnSetBrandInfo', $("#goodsPriceHstForm input[name=searchTxt]").val());
|
|
|
-
|
|
|
- });
|
|
|
-
|
|
|
$(document).ready(function() {
|
|
|
|
|
|
cfnCreateCalendar('#sellTerms', 'stDate', 'edDate', true, '등록일', 'X');
|