|
|
@@ -77,8 +77,8 @@
|
|
|
<li><a href="#goodstab2">옵션/재고정보</a></li>
|
|
|
<li><a href="#goodstab3">상품상세정보</a></li>
|
|
|
<li id="goodsNotiTab"><a href="#goodstab4">고시정보</a></li>
|
|
|
- <!-- <li id="goodsColorTab"><a href="#goodstab5">대표색상</a></li> -->
|
|
|
- <li id="GoodsComposeTab" style="display:none;"><a href="#goodstab6">구성상품</a></li>
|
|
|
+ <li id="goodsGradeTab"><a href="#goodstab5">구매등급</a></li>
|
|
|
+ <li id="goodsComposeTab" style="display:none;"><a href="#goodstab6">구성상품</a></li>
|
|
|
<li><a href="#goodstab7">변경이력</a></li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
@@ -437,13 +437,31 @@
|
|
|
<!-- //TAB4 CONTENTS AREA -->
|
|
|
</li>
|
|
|
<!-- //TAB4 : 고시정보 -->
|
|
|
-
|
|
|
-<!-- <li class="tab" id="goodstab5">
|
|
|
- <div class="panelStyle">
|
|
|
- <div id="gridGoodsNumList" style="height: 480px;" class="ag-theme-balham lh60"></div>
|
|
|
- </div>
|
|
|
- </li> -->
|
|
|
-
|
|
|
+ <!-- 구매등급정보 -->
|
|
|
+ <li class="tab" id="goodstab5">
|
|
|
+ <div class="panelStyle">
|
|
|
+ <table class="frmStyle">
|
|
|
+ <colgroup>
|
|
|
+ <col style="width:10%"/>
|
|
|
+ <col style="width:13%"/>
|
|
|
+ <col/>
|
|
|
+ </colgroup>
|
|
|
+ <tr>
|
|
|
+ <th>구매등급</th>
|
|
|
+ <td>
|
|
|
+ <select id="custGrade" name="custGrade" >
|
|
|
+ <option value="" selected="selected">[선택]</option>
|
|
|
+ <option th:if="${custGradeList}" th:each="oneData, status : ${custGradeList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
|
|
|
+ </select>
|
|
|
+ <button type="button" class="btn btn-default btn-lg" onclick="fnGoodsOrderGrade()">선택</button>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <div class="memAddWrap" id="goodsCustGradeList"></div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
<!-- TAB6 : 구성상품 -->
|
|
|
<li class="tab" id="goodstab6">
|
|
|
<!-- TAB6 CONTENTS AREA -->
|
|
|
@@ -624,7 +642,7 @@
|
|
|
$('#goodsDetailForm').find('#listPriceTxt').html(result.listPrice.addComma());
|
|
|
$('#goodsDetailForm input[name=listPrice]').val(result.listPrice);
|
|
|
$('#goodsDetailForm input[name=currPrice]').val(result.currPrice.addComma());
|
|
|
- $('#goodsDetailForm input[name=currPriceOrg]').val(result.currPrice);debugger;
|
|
|
+ $('#goodsDetailForm input[name=currPriceOrg]').val(result.currPrice);
|
|
|
$('#goodsDetailForm').find('#dcRateTxt').html(result.dcRate);
|
|
|
$('#goodsDetailForm input[name=dcRate]').val(result.dcRate);
|
|
|
$('#goodsDetailForm').find('#priceUpdDtTxt').html(!gagajf.isNull(result.priceUpdDt) ? result.priceUpdDt.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD") : '');
|
|
|
@@ -790,13 +808,13 @@
|
|
|
//세트
|
|
|
if ("G056_S" == result.goodsType){
|
|
|
//$('#goodsDetailForm #erplinkarea').addClass('off');
|
|
|
- if (result.selfGoodsYn == "Y") $('#goodsDetailForm #GoodsComposeTab').css('display','block');
|
|
|
+ if (result.selfGoodsYn == "Y") $('#goodsDetailForm #goodsComposeTab').css('display','block');
|
|
|
$('#goodsDetailForm #goodsNotiTab').css('display','none');
|
|
|
$('#goodsDetailForm input[name=sellFeeRate]').attr('readonly', true);
|
|
|
$('#goodsDetailForm input[name=currPrice]').attr('readonly', true);
|
|
|
}else if ("G056_D" == result.goodsType){
|
|
|
//$('#goodsDetailForm #erplinkarea').addClass('off');
|
|
|
- if (result.selfGoodsYn == "Y") $('#goodsDetailForm #GoodsComposeTab').css('display','block');
|
|
|
+ if (result.selfGoodsYn == "Y") $('#goodsDetailForm #goodsComposeTab').css('display','block');
|
|
|
$('#goodsDetailForm #goodsNotiTab').css('display','none');
|
|
|
$('#goodsDetailForm input[name=sellFeeRate]').attr('readonly', true);
|
|
|
}
|
|
|
@@ -816,6 +834,8 @@
|
|
|
fnGoodsDetailSizeStockSearch(params);
|
|
|
//정보고시
|
|
|
fnGoodsDetailNotiInfoSearch(params);
|
|
|
+ //구매등급
|
|
|
+ fnGoodsDetailOrderGradeSearch(params);
|
|
|
|
|
|
//구성상품
|
|
|
if ("G056_S" == result.goodsType || "G056_D" == result.goodsType){
|
|
|
@@ -842,6 +862,11 @@
|
|
|
cfnAjaxSubmit("/goods/detail/notiInfo/list", "json", fnGoodsDetailNotiInfoSearchCallback, params);
|
|
|
}
|
|
|
|
|
|
+ //구매등급
|
|
|
+ var fnGoodsDetailOrderGradeSearch = function(params) {
|
|
|
+ cfnAjaxSubmit("/goods/detail/order/grade/list", "json", fnGoodsDetailOrderGradeSearchCallback, params);
|
|
|
+ }
|
|
|
+
|
|
|
//이력
|
|
|
var fnGoodsDetailHstSearch = function() {
|
|
|
gagaAgGrid.fetch("/goods/detail/hst/list?goodsCd=" + $('#goodsDetailForm input[name=goodsCd]').val() , gridGoodsHstoryOptions);
|
|
|
@@ -874,7 +899,27 @@
|
|
|
$('#goodsDetailForm').find('.tabs .tabsNav li:eq(3) a').attr("style", "color:red;");
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+ //구매등급 콜백
|
|
|
+ var fnGoodsDetailOrderGradeSearchCallback = function(result) {
|
|
|
+ if (result == null) return;
|
|
|
+
|
|
|
+ var addHtml = "";
|
|
|
+ $('#goodsDetailForm').find('#goodsCustGradeList').html('');
|
|
|
+
|
|
|
+ result.forEach(function(info){
|
|
|
+ addHtml = '<span class="memAdd"><input type="hidden" name="goodsOrderGrade" value="'+info.custGrade+'"/>'+ info.custGradeName+' <button type="button" onclick="$(this).parent().remove();return false;">삭제</button></span>';
|
|
|
+ addHtml += '\n';
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#goodsDetailForm').find('#goodsCustGradeList').append(addHtml);
|
|
|
+ }
|
|
|
|
|
|
+ //구매등급 변경여부
|
|
|
+ $('#goodsDetailForm').find('#goodstab5').find("input, select, textarea").on('change', function() {
|
|
|
+ $('#goodsDetailForm').find('.tabs .tabsNav li:eq(4) a').attr("style", "color:red;");
|
|
|
+ });
|
|
|
+
|
|
|
//상품명 길이표시
|
|
|
$("#goodsDetailForm input[name=goodsNm]").bind('focus focusout input keyup keydown paste change', function () {
|
|
|
fnDataLengthCheck('goodsNm',200);
|
|
|
@@ -1714,7 +1759,25 @@
|
|
|
});
|
|
|
});
|
|
|
|
|
|
-
|
|
|
+ // 상품구매등급
|
|
|
+ var fnGoodsOrderGrade = function(){
|
|
|
+
|
|
|
+ var code = $('#goodsDetailForm select[name=custGrade]').val();
|
|
|
+ var codeText = $("#goodsDetailForm select[name=custGrade] option:selected").text();
|
|
|
+ var addHtml = '';
|
|
|
+
|
|
|
+ var addFlag = true;
|
|
|
+ $("#goodsDetailForm #goodsCustGradeList").find("input").each(function() {
|
|
|
+ if (code == $(this).val() ){
|
|
|
+ addFlag = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (addFlag){
|
|
|
+ addHtml = '<span class="memAdd"><input type="hidden" name="goodsOrderGrade" value="'+code+'"/>'+ codeText+' <button type="button" onclick="$(this).parent().remove();return false;">삭제</button></span>';
|
|
|
+ $('#goodsCustGradeList').append(addHtml);
|
|
|
+ //$('#goodsDetailForm').find('.tabs .tabsNav li:eq(4) a').attr("style", "color:red;");
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
//엑셀 상품 조회
|
|
|
$('#btnGoodsDealSearchExcel').on('click', function() {
|