|
@@ -1,2941 +1,2947 @@
|
|
|
-<!DOCTYPE html>
|
|
|
|
|
-<html lang="ko"
|
|
|
|
|
- xmlns:th="http://www.thymeleaf.org">
|
|
|
|
|
-<!--
|
|
|
|
|
- *******************************************************************************
|
|
|
|
|
- * @source : GoodsDetailForm.html
|
|
|
|
|
- * @desc : 상품 상세 팝업
|
|
|
|
|
- *============================================================================
|
|
|
|
|
- * STYLE24
|
|
|
|
|
- * Copyright(C) 2020 TSIT, All rights reserved.
|
|
|
|
|
- *============================================================================
|
|
|
|
|
- * VER DATE AUTHOR DESCRIPTION
|
|
|
|
|
- * === =========== ========== =============================================
|
|
|
|
|
- * 1.0 2020.10.23 eskim 최초 작성
|
|
|
|
|
- *******************************************************************************
|
|
|
|
|
- -->
|
|
|
|
|
- <div class="modalPopup" data-width="1700" data-height="870"> <!-- data-width="1500" data-height="870" -->
|
|
|
|
|
- <div class="panelStyle">
|
|
|
|
|
- <div class="panelTitle">
|
|
|
|
|
- <h2>상품상세</h2>
|
|
|
|
|
- <button type="button" class="close" onclick="fnGoodsDetailClose()"><i class="fa fa-times"></i></button>
|
|
|
|
|
- </div>
|
|
|
|
|
- <form id="goodsDetailForm" name="goodsDetailForm" action="#" th:method="post">
|
|
|
|
|
- <input type="hidden" id="mode" name="mode" th:value="${params.mode}"/>
|
|
|
|
|
- <input type="hidden" id="goodsCd" name="goodsCd" th:value="${params.goodsCd}"/>
|
|
|
|
|
- <input type="hidden" id="niClsfCd" name="niClsfCd"/>
|
|
|
|
|
- <input type="hidden" id="selfGoodsYn" name="selfGoodsYn"/>
|
|
|
|
|
- <input type="hidden" id="notiList" name="notiList" />
|
|
|
|
|
- <input type="hidden" id="chDataYn" name="chDataYn" />
|
|
|
|
|
- <input type="hidden" id="chStockDataYn" name="chStockDataYn" />
|
|
|
|
|
- <input type="hidden" id="goodsImageYn" name="goodsImageYn" />
|
|
|
|
|
- <input type="hidden" id="niClsfNm" name="niClsfNm" />
|
|
|
|
|
- <input type="hidden" id="uploadGoodsUrl" name="uploadGoodsUrl" th:value="${@environment.getProperty('upload.goods.view')}"/>
|
|
|
|
|
- <input type="hidden" id="mainColorCd" name="mainColorCd" />
|
|
|
|
|
- <input type="hidden" id="goodsType" name="goodsType" />
|
|
|
|
|
- <input type="hidden" id="goodsComposeList" name="goodsComposeList" />
|
|
|
|
|
- <input type="hidden" id="repGoodsCd" name="repGoodsCd" /> <!-- 대표상품(딜 가격) -->
|
|
|
|
|
- <!-- 사용자검색어, 검색어 부분 (사용안함 히든처리) 21.11.22 -->
|
|
|
|
|
- <input type="hidden" class="w60p" id="goodsSnm1" name="goodsSnm1"></input>
|
|
|
|
|
- <input type="hidden" id="goodsSnm1Org" name="goodsSnm1Org"/>
|
|
|
|
|
- <input type="hidden" id="goodsSnm" name="goodsSnm"></input>
|
|
|
|
|
-
|
|
|
|
|
- <div class="panelContent">
|
|
|
|
|
- <table class="frmStyle">
|
|
|
|
|
- <colgroup>
|
|
|
|
|
- <col width="11%"/>
|
|
|
|
|
- <col/>
|
|
|
|
|
- <col width="11%"/>
|
|
|
|
|
- <col width="14%"/>
|
|
|
|
|
- <col width="10%"/>
|
|
|
|
|
- <col width="14%"/>
|
|
|
|
|
- <col width="10%"/>
|
|
|
|
|
- <col width="14%"/>
|
|
|
|
|
- </colgroup>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>브랜드명<em class="required" title="필수"></em></th>
|
|
|
|
|
- <td colspan="3">
|
|
|
|
|
- <select name="selSupplyCompCd" id="selSupplyCompCd" disabled="disabled" class="w40p">
|
|
|
|
|
- <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="selBrandCd" id="selBrandCd" disabled="disabled" class="w40p">
|
|
|
|
|
- <option value="">[선택]</option>
|
|
|
|
|
- </select>
|
|
|
|
|
-
|
|
|
|
|
- <input type="hidden" name="supplyCompCd" id="supplyCompCd" />
|
|
|
|
|
- <input type="hidden" name="brandGrpNm" id="brandGrpNm" />
|
|
|
|
|
- <input type="hidden" name="brandCd" id="brandCd" />
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>상품코드<em class="required" title="필수"></em></th>
|
|
|
|
|
- <td><div id="goodsCdTxt"></div></td>
|
|
|
|
|
- <th>원코드</th>
|
|
|
|
|
- <td><span id="supplyGoodsCdTxt"></span></td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </table>
|
|
|
|
|
- <!-- TABS SPACE -->
|
|
|
|
|
- <div class="tabs">
|
|
|
|
|
- <!-- TABS NAVI -->
|
|
|
|
|
- <div class="tabsNav">
|
|
|
|
|
- <ul>
|
|
|
|
|
- <li class="on"><a href="#goodstab1">기본정보</a></li>
|
|
|
|
|
- <li><a href="#goodstab2">옵션/재고정보</a></li>
|
|
|
|
|
- <li id="goodsDescTab"><a href="#goodstab3">상품상세정보</a></li>
|
|
|
|
|
- <li id="goodsNotiTab"><a href="#goodstab4">고시정보</a></li>
|
|
|
|
|
- <li id="goodsComposeTab" style="display:none;"><a href="#goodstab5">구성상품</a></li>
|
|
|
|
|
- <li id="goodsSafeTab"><a href="#goodstab6">안전인증</a></li>
|
|
|
|
|
- <li><a href="#goodstab7">변경이력</a></li>
|
|
|
|
|
- </ul>
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- //TABS NAVI -->
|
|
|
|
|
- <!-- TABS CONTENTS -->
|
|
|
|
|
- <ul class="tabsCont" th:with="uxImgUrl=${@environment.getProperty('domain.uximage')}">
|
|
|
|
|
- <!-- TAB1 : 기본정보 -->
|
|
|
|
|
- <li class="tab on" id="goodstab1">
|
|
|
|
|
- <!-- TAB1 CONTENTS AREA -->
|
|
|
|
|
- <div class="panelStyle">
|
|
|
|
|
- <table class="frmStyle">
|
|
|
|
|
- <colgroup>
|
|
|
|
|
- <col/>
|
|
|
|
|
- <col width="12%"/>
|
|
|
|
|
- <col width="17%"/>
|
|
|
|
|
- <col width="12%"/>
|
|
|
|
|
- <col width="17%"/>
|
|
|
|
|
- <col width="12%"/>
|
|
|
|
|
- <col width="17%"/>
|
|
|
|
|
- </colgroup>
|
|
|
|
|
- <tbody>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <td rowspan="6" style="text-align:center">
|
|
|
|
|
- <img id="goodsImgUrl" src="" width="130px"/>
|
|
|
|
|
- <input type="hidden" name="sysImgNm" id="sysImgNm" />
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>상품타이틀</th>
|
|
|
|
|
- <td colspan="5">
|
|
|
|
|
- <input type="text" class="w80p" id="goodsTnm" name="goodsTnm" maxlength=""></input>
|
|
|
|
|
- <span class="byteChk"><em class="cBlue" id="goodsTnmLen">0</em>/100 bytes</span>
|
|
|
|
|
- <input type="hidden" id="goodsTnmOrg" name="goodsTnmOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>상품명<em class="required" title="필수"></em></th>
|
|
|
|
|
- <td colspan="5">
|
|
|
|
|
- <input type="text" class="w80p" id="goodsNm" name="goodsNm"></input>
|
|
|
|
|
- <span class="byteChk"><em class="cBlue" id="goodsNmLen">0</em>/200 bytes</span>
|
|
|
|
|
- <input type="hidden" id="goodsNmOrg" name="goodsNmOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <!-- 21.11.22 사용안함으로 변경, 상단 히든으로 정의(기존데이터용)
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>사용자검색어</th>
|
|
|
|
|
- <td colspan="5">
|
|
|
|
|
- <input type="text" class="w60p" id="goodsSnm1" name="goodsSnm1"></input>
|
|
|
|
|
- <span class="byteChk"><em class="cBlue" id="goodsSnm1Len">0</em>/200 bytes</span><font class="cBlue padL10"><b>* 여러개설정할경우 ; 구분자 사용 / 공백은 자동삭제처리</b></font>
|
|
|
|
|
- <input type="hidden" id="goodsSnm1Org" name="goodsSnm1Org"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>검색어</th>
|
|
|
|
|
- <td colspan="5">
|
|
|
|
|
- <textarea class="textareaR2 w100p" id="goodsSnmTxt" name="goodsSnmTxt" disabled="disabled"></textarea>
|
|
|
|
|
- <input type="hidden" id="goodsSnm" name="goodsSnm"></input>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr> -->
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>정상/이월 구분<em class="required" title="필수"></em></th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <label class="rdoBtn" th:if="${formalGbList}" th:each="oneData, status : ${formalGbList}" ><input type="radio" id="formalGb" name="formalGb" th:value="${oneData.cd}" th:text="${oneData.cdNm}" /></label>
|
|
|
|
|
- <input type="hidden" id="formalGbOrg" name="formalGbOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>상품상태<em class="required" title="필수"></em>
|
|
|
|
|
- <!-- 아이콘 툴팁 -->
|
|
|
|
|
- <div class="iconTooltip">
|
|
|
|
|
- <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
- <span class="left aL" style="width:840px;">
|
|
|
|
|
- 승인완료 인 상품만 판매가 진행됩니다. 재고가 없을 시에도 별도로 상태는 변경되지 않으며 품절로 화면에서 노출되고 재고 충족 시 판매가 재개됩니다.
|
|
|
|
|
- <br>일시품절은 강제품절 기능으로 재고가 있더라도 일시품절 상태일 경우 품절로 처리 됩니다. <br>입점상품의 경우 MD 의 최초 승인 이후부터 판매가능상태인 '승인완료'로 변경이 가능합니다.
|
|
|
|
|
- </span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- //아이콘 툴팁 -->
|
|
|
|
|
- </th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <select name="goodsStat" id="goodsStat">
|
|
|
|
|
- <option value="">[선택]</option>
|
|
|
|
|
- <option th:if="${goodsStatList}" th:each="oneData, status : ${goodsStatList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
|
|
- </select>
|
|
|
|
|
- <input type="hidden" id="goodsStatOrg" name="goodsStatOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>자사몰 노출여부<em class="required" title="필수"></em>
|
|
|
|
|
- <!-- 아이콘 툴팁 -->
|
|
|
|
|
- <div class="iconTooltip">
|
|
|
|
|
- <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
- <span class="left aL" style="width:320px;">
|
|
|
|
|
- 판매는 진행하나, 검색/카테고리 등 자동 전시화면에만 <br>노출이 되지 않게 제어할 수 있습니다.
|
|
|
|
|
- </span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- //아이콘 툴팁 -->
|
|
|
|
|
- </th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <label class="rdoBtn"><input type="radio" name="selfMallYn" id="selfMallYnY" value="Y" />Y</label>
|
|
|
|
|
- <label class="rdoBtn"><input type="radio" name="selfMallYn" id="selfMallYnN" value="N"/>N</label>
|
|
|
|
|
- <input type="hidden" id="selfMallYnOrg" name="selfMallYnOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>시즌<em class="required" title="필수"></em></th>
|
|
|
|
|
- <td >
|
|
|
|
|
- <select name="seasonCd" id="seasonCd">
|
|
|
|
|
- <option value="">[선택]</option>
|
|
|
|
|
- <option th:if="${seasonList}" th:each="oneData, status : ${seasonList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
|
|
- </select>
|
|
|
|
|
- <input type="hidden" id="seasonCdOrg" name="seasonCdOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>성별<em class="required" title="필수"></em></th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <select name="sexGb" id="sexGb">
|
|
|
|
|
- <option value="">[선택]</option>
|
|
|
|
|
- <option th:if="${sexGbList}" th:each="oneData, status : ${sexGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
|
|
- </select>
|
|
|
|
|
- <input type="hidden" id="sexGbOrg" name="sexGbOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>스타일년도</th>
|
|
|
|
|
- <td><span id="styleYearTxt"></span></td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr class="chk_deal">
|
|
|
|
|
- <th>원산지</th>
|
|
|
|
|
- <td><span id="makeNmTxt"></span></td>
|
|
|
|
|
- <th>유통구분<em class="required" title="필수"></em></th>
|
|
|
|
|
- <td><select name="distributionGb" id="distributionGb">
|
|
|
|
|
- <option value="">[선택]</option>
|
|
|
|
|
- <option th:if="${distributionGbList}" th:each="oneData, status : ${distributionGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
|
|
- </select>
|
|
|
|
|
- <input type="hidden" id="distributionGbOrg" name="distributionGbOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>상품구분<em class="required" title="필수"></em></th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <select name="goodsGb" id="goodsGb">
|
|
|
|
|
- <option value="">[선택]</option>
|
|
|
|
|
- <option th:if="${goodsGbList}" th:each="oneData, status : ${goodsGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
|
|
- </select>
|
|
|
|
|
- <input type="hidden" id="goodsGbOrg" name="goodsGbOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr class="chk_deal">
|
|
|
|
|
- <th>해외구매대행여부</th>
|
|
|
|
|
- <td><label class="rdoBtn"><input type="radio" name="foreignBuyYn" id="foreignBuyYnY" value="Y" />Y</label>
|
|
|
|
|
- <label class="rdoBtn"><input type="radio" name="foreignBuyYn" id="foreignBuyYnN" value="N"/>N</label>
|
|
|
|
|
- <input type="hidden" id="foreignBuyYnOrg" name="foreignBuyYnOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>병행수입여부</th>
|
|
|
|
|
- <td><label class="rdoBtn"><input type="radio" name="parallelImportYn" id="parallelImportYnY" value="Y" />Y</label>
|
|
|
|
|
- <label class="rdoBtn"><input type="radio" name="parallelImportYn" id="parallelImportYnN" value="N"/>N</label>
|
|
|
|
|
- <input type="hidden" id="parallelImportYnOrg" name="parallelImportYnOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>주문제작여부</th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <label class="rdoBtn"><input type="radio" name="orderMadeYn" id="orderMadeYnY" value="Y" />Y</label>
|
|
|
|
|
- <label class="rdoBtn"><input type="radio" name="orderMadeYn" id="orderMadeYnN" value="N"/>N</label>
|
|
|
|
|
- <input type="hidden" id="orderMadeYnOrg" name="orderMadeYnOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr class="chk_deal">
|
|
|
|
|
- <td class="aC cRed" style="font-weight:bold;"><span id="goodsTypeNm"></span></td> <!-- 상품타입노출 -->
|
|
|
|
|
- <th>상품연령대</th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <select name="ageGrpCd" id="ageGrpCd">
|
|
|
|
|
- <option value="">[선택]</option>
|
|
|
|
|
- <option th:if="${ageGrpCdList}" th:each="oneData, status : ${ageGrpCdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
|
|
- </select>
|
|
|
|
|
- <input type="hidden" id="ageGrpCdOrg" name="ageGrpCdOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>선물 주문가능여부<em class="required" title="필수"></em>
|
|
|
|
|
- <!-- 아이콘 툴팁 -->
|
|
|
|
|
- <div class="iconTooltip">
|
|
|
|
|
- <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
- <span class="left aL" style="width:470px;">
|
|
|
|
|
- 설정 시 모바일 상품 상세 내 선물하기 버튼이 노출되고 선물주문 진행이 가능합니다.
|
|
|
|
|
- </span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- //아이콘 툴팁 -->
|
|
|
|
|
- </th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <label class="rdoBtn"><input type="radio" name="giftPackYn" id="giftPackYnY" value="Y" />Y</label>
|
|
|
|
|
- <label class="rdoBtn"><input type="radio" name="giftPackYn" id="giftPackYnN" value="N"/>N</label>
|
|
|
|
|
- <input type="hidden" id="giftPackYnOrg" name="giftPackYnOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>가격변경일</th>
|
|
|
|
|
- <td><span id="priceUpdDtTxt"></span></td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <td rowspan="12"> </td>
|
|
|
|
|
- <th>정상가<em class="required" title="필수"></em></th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <input type="text" class="w80p aR" id="listPrice" name="listPrice" maxlength="10" data-valid-type="numeric"/> 원
|
|
|
|
|
- <input type="hidden" id="listPriceOrg" name="listPriceOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>판매가<em class="required" title="필수"></em></th>
|
|
|
|
|
- <td><input type="text" class="w80p aR" id="currPrice" name="currPrice" maxlength="10" data-valid-type="numeric"/> 원
|
|
|
|
|
- <input type="hidden" id="currPriceOrg" name="currPriceOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>할인율</th>
|
|
|
|
|
- <td class="aR" ><span id="dcRateTxt"></span> % <input type="hidden" id="dcRate" name="dcRate"/></td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr class="chk_deal" id="selfGoodsNSellFeeRate">
|
|
|
|
|
- <th>최초승인일</th>
|
|
|
|
|
- <td><span id="frstCfrmDtTxt"></span></td>
|
|
|
|
|
- <th>판매수수료율<em class="required" title="필수"></em></th>
|
|
|
|
|
- <td><input type="text" class="w80p aR" id="sellFeeRate" name="sellFeeRate" maxlength="10" data-valid-type="numeric"/> %
|
|
|
|
|
- <input type="hidden" id="sellFeeRateOrg" name="sellFeeRateOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>과세구분</th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <select name="taxGb" disabled="disabled">
|
|
|
|
|
- <option value="">[선택]</option>
|
|
|
|
|
- <option value="10">과세</option>
|
|
|
|
|
- <option value="20">비과세</option>
|
|
|
|
|
- <option value="30">면세</option>
|
|
|
|
|
- </select>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr class="chk_deal">
|
|
|
|
|
- <th>품목코드<em class="required" title="필수"></em></th>
|
|
|
|
|
- <td colspan="3">
|
|
|
|
|
- <select name="itemkindCd" id="itemkindCd" th:disabled="${sessionInfo.roleCd != 'G001_0000' AND sessionInfo.roleCd != 'G001_A000' AND sessionInfo.roleCd != 'G001_A101' AND sessionInfo.roleCd != 'G001_A100' AND sessionInfo.roleCd != 'G001_A001'}">
|
|
|
|
|
- <option th:if="${itemkindList}" th:each="oneData, status : ${itemkindList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
|
|
- </select>
|
|
|
|
|
- <input type="hidden" id="orgItemkindCd" name="orgItemkindCd"/>
|
|
|
|
|
- <th:block th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001' }">
|
|
|
|
|
- <button type="button" class="btn btn-success btn-lg" id="btnGoodsItemkindChange">품목변경</button>
|
|
|
|
|
- </th:block>
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>출고처<em class="required" title="필수"></em></th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <select name="delvLocCd" id="delvLocCd">
|
|
|
|
|
- </select>
|
|
|
|
|
- <input type="hidden" id="delvLocCdOrg" name="delvLocCdOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr class="chk_deal">
|
|
|
|
|
- <th>반품여부<em class="required" title="필수"></em>
|
|
|
|
|
- <!-- 아이콘 툴팁 -->
|
|
|
|
|
- <div class="iconTooltip">
|
|
|
|
|
- <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
- <span class="left aL" style="width:370px;">
|
|
|
|
|
- N으로 설정 시 반품을 사용자가 프론트에서 진행할 수 없습니다.
|
|
|
|
|
- </span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- //아이콘 툴팁 -->
|
|
|
|
|
- </th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <label class="rdoBtn"><input type="radio" name="returnableYn" id="returnableYnY" value="Y" />Y</label>
|
|
|
|
|
- <label class="rdoBtn"><input type="radio" name="returnableYn" id="returnableYnN" value="N"/>N</label>
|
|
|
|
|
- <input type="hidden" id="returnableYnOrg" name="returnableYnOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>교환여부<em class="required" title="필수"></em>
|
|
|
|
|
- <!-- 아이콘 툴팁 -->
|
|
|
|
|
- <div class="iconTooltip">
|
|
|
|
|
- <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
- <span class="left aL" style="width:370px;">
|
|
|
|
|
- N으로 설정 시 교환을 사용자가 프론트에서 진행할 수 없습니다.
|
|
|
|
|
- </span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- //아이콘 툴팁 -->
|
|
|
|
|
- </th>
|
|
|
|
|
- <td colspan="3">
|
|
|
|
|
- <label class="rdoBtn"><input type="radio" name="changeableYn" id="changeableYnY" value="Y" />Y</label>
|
|
|
|
|
- <label class="rdoBtn"><input type="radio" name="changeableYn" id="changeableYnN" value="N"/>N</label>
|
|
|
|
|
- <input type="hidden" id="changeableYnOrg" name="changeableYnOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
-
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr class="chk_deal">
|
|
|
|
|
- <th>신규가입구매가능여부<em class="required" title="필수"></em>
|
|
|
|
|
- <!-- 아이콘 툴팁 -->
|
|
|
|
|
- <div class="iconTooltip">
|
|
|
|
|
- <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
- <span class="left aL" style="width:480px;">
|
|
|
|
|
- 신규 가입자만 구매할 수 있는 상품으로 설정 할 수 있습니다. <br>Y 로 변경 후 기간 설정시, 설정한 기간 동안 가입한 회원에 한하여 구매할 수 있습니다.
|
|
|
|
|
- </span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- //아이콘 툴팁 -->
|
|
|
|
|
- </th>
|
|
|
|
|
- <td colspan="5">
|
|
|
|
|
- <label class="rdoBtn"><input type="radio" name="newCustOrdYn" id="newCustOrdYnY" value="Y" />Y</label>
|
|
|
|
|
- <label class="rdoBtn"><input type="radio" name="newCustOrdYn" id="newCustOrdYnN" value="N"/>N</label>
|
|
|
|
|
- <input type="hidden" id="newCustOrdYnOrg" name="newCustOrdYnOrg"/>
|
|
|
|
|
- <input name="newCustOrdStdt" id="newCustOrdStdt" type="text" class="w80 schDate" maxlength="10" required="required" data-valid-name="판매시작일" />
|
|
|
|
|
- <input type="hidden" id="newCustOrdStdtOrg" name="newCustOrdStdtOrg"/>
|
|
|
|
|
- ~
|
|
|
|
|
- <input name="newCustOrdEddt" id="newCustOrdEddt" type="text" class="w80 schDate" maxlength="10" required="required" data-valid-name="판매 종료일" />
|
|
|
|
|
- <input type="hidden" id="newCustOrdEddtOrg" name="newCustOrdEddtOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr class="chk_deal">
|
|
|
|
|
- <th>배송비정책<em class="required" title="필수"></em></th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <select name="delvFeeCd">
|
|
|
|
|
- </select>
|
|
|
|
|
- <input type="hidden" id="delvFeeCdOrg" name="delvFeeCdOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>기본배송비</th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <input type="text" class="w100 aR" id="delvFee" name="delvFee" disabled="disabled"/> 원
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>무료배송비기준</th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <input type="text" class="w100 aR" id="minOrdAmt" name="minOrdAmt" disabled="disabled"/> 원
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr class="chk_deal">
|
|
|
|
|
- <th>PC포인트<em class="required" title="필수"></em>
|
|
|
|
|
- <!-- 아이콘 툴팁 -->
|
|
|
|
|
- <div class="iconTooltip">
|
|
|
|
|
- <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
- <span class="left aL" style="width:400px;">
|
|
|
|
|
- Y 값을 설정 시 포인트 율 만큼 선포인트 할인을 진행할 수 있습니다.
|
|
|
|
|
- </span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- //아이콘 툴팁 -->
|
|
|
|
|
- </th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <input type="text" class="w50 aR" id="pntPrate" name="pntPrate" data-valid-type="preal" maxlength="3"/> % /
|
|
|
|
|
- <input type="hidden" id="pntPrateOrg" name="pntPrateOrg"/>
|
|
|
|
|
- <label class="rdoBtn"><input type="radio" name="prePpntUsableYn" id="prePpntUsableYnY" value="Y"/>Y</label>
|
|
|
|
|
- <label class="rdoBtn"><input type="radio" name="prePpntUsableYn" id="prePpntUsableYnN" value="N"/>N</label>
|
|
|
|
|
- <input type="hidden" id="prePpntUsableYnOrg" name="prePpntUsableYnOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>모바일포인트<em class="required" title="필수"></em></th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <input type="text" class="w50 aR" id="pntMrate" name="pntMrate" data-valid-type="preal" maxlength="3"/> % /
|
|
|
|
|
- <input type="hidden" id="pntMrateOrg" name="pntMrateOrg"/>
|
|
|
|
|
- <label class="rdoBtn"><input type="radio" name="preMpntUsableYn" id="preMpntUsableYnY" value="Y"/>Y</label>
|
|
|
|
|
- <label class="rdoBtn"><input type="radio" name="preMpntUsableYn" id="preMpntUsableYnN" value="N"/>N</label>
|
|
|
|
|
- <input type="hidden" id="preMpntUsableYnOrg" name="preMpntUsableYnOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>성인용품여부<em class="required" title="필수"></em></th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <label class="rdoBtn"><input type="radio" name="adultYn" id="adultYnY" value="Y" />Y</label>
|
|
|
|
|
- <label class="rdoBtn"><input type="radio" name="adultYn" id="adultYnN" value="N"/>N</label>
|
|
|
|
|
- <input type="hidden" id="adultYnOrg" name="adultYnOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr class="chk_deal">
|
|
|
|
|
- <th>최소주문수량<em class="required" title="필수"></em>
|
|
|
|
|
- <!-- 아이콘 툴팁 -->
|
|
|
|
|
- <div class="iconTooltip">
|
|
|
|
|
- <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
- <span class="left aL" style="width:350px;">
|
|
|
|
|
- 해당 상품을 구매 시 최소한으로 구매해야 하는 수량입니다.
|
|
|
|
|
- </span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- //아이콘 툴팁 -->
|
|
|
|
|
- </th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <input type="text" class="w100 aR" id="minOrdQty" name="minOrdQty" data-valid-type="integer" maxlength="5"/>
|
|
|
|
|
- <input type="hidden" id="minOrdQtyOrg" name="minOrdQtyOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>최대주문수량<em class="required" title="필수"></em>
|
|
|
|
|
- <!-- 아이콘 툴팁 -->
|
|
|
|
|
- <div class="iconTooltip">
|
|
|
|
|
- <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
- <span class="left aL" style="width:330px;">
|
|
|
|
|
- 한 아이디가 한 주문에 구매할수 있는 최대 수량입니다.
|
|
|
|
|
- </span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- //아이콘 툴팁 -->
|
|
|
|
|
- </th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <input type="text" class="w100 aR" id="maxOrdQty" name="maxOrdQty" data-valid-type="integer" maxlength="5"/>
|
|
|
|
|
- <input type="hidden" id="maxOrdQtyOrg" name="maxOrdQtyOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>ID당1일최대구매수량<em class="required" title="필수"></em>
|
|
|
|
|
- <!-- 아이콘 툴팁 -->
|
|
|
|
|
- <div class="iconTooltip">
|
|
|
|
|
- <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
- <span class="left aL" style="width:330px;">
|
|
|
|
|
- 한 아이디가 1일 기준 구매할 수 있는 최대 수량입니다.
|
|
|
|
|
- </span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- //아이콘 툴팁 -->
|
|
|
|
|
- </th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <input type="text" class="w100 aR" id="dayMaxOrdQty" name="dayMaxOrdQty" data-valid-type="integer" maxlength="5"/>
|
|
|
|
|
- <input type="hidden" id="dayMaxOrdQtyOrg" name="dayMaxOrdQtyOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr class="chk_deal">
|
|
|
|
|
- <th>구매등급
|
|
|
|
|
- <!-- 아이콘 툴팁 -->
|
|
|
|
|
- <div class="iconTooltip">
|
|
|
|
|
- <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
- <span class="left aL" style="width:600px;">
|
|
|
|
|
- 설정 시 해당 등급만 구매가 가능하도록 설정할 수 있습니다, 미체크 시 제약없이 전회원 구매가 가능합니다.
|
|
|
|
|
- </span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- //아이콘 툴팁 -->
|
|
|
|
|
- </th>
|
|
|
|
|
- <td colspan="3">
|
|
|
|
|
- <div id="goodsCustGradeList"></div>
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>상세폼신규사용여부
|
|
|
|
|
- <!-- 아이콘 툴팁 -->
|
|
|
|
|
- <div class="iconTooltip">
|
|
|
|
|
- <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
- <span class="left aL" style="width:355px;">
|
|
|
|
|
- 상품 상세의 폼 유형을 변경합니다. 신규사용여부 Y일 경우 <br>이미지 업로드 규칙에 맞춰 생성되는 상품상세폼을 사용합니다.
|
|
|
|
|
- </span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- //아이콘 툴팁 -->
|
|
|
|
|
- </th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <label class="rdoBtn"><input type="radio" name="tobeFormYn" id="tobeFormYnY" value="Y" />Y</label>
|
|
|
|
|
- <label class="rdoBtn"><input type="radio" name="tobeFormYn" id="tobeFormYnN" value="N"/>N</label>
|
|
|
|
|
- <input type="hidden" id="tobeFormYnOrg" name="tobeFormYnOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>판매기간<em class="required" title="필수"></em></th>
|
|
|
|
|
- <td colspan="3">
|
|
|
|
|
- <input name="sellStYMD" id="sellStYMD" type="text" class="w80 schDate" maxlength="10" required="required" data-valid-name="판매시작일" />
|
|
|
|
|
- <select name="sellStHH" id="sellStHH" required="required" data-valid-name="판매 시작시간">
|
|
|
|
|
- <th:block th:each="num, index : ${#numbers.sequence(0,23)}">
|
|
|
|
|
- <option th:value="${#numbers.formatInteger(num,2)}" th:text="|${#numbers.formatInteger(num,2)}시|" >시간</option>
|
|
|
|
|
- </th:block>
|
|
|
|
|
- </select>
|
|
|
|
|
- <input name="sellStdt" id="sellStdt" type="hidden" />
|
|
|
|
|
- ~
|
|
|
|
|
- <input name="sellEdYMD" id="sellEdYMD" type="text" class="w80 schDate" maxlength="10" required="required" data-valid-name="판매 종료일" />
|
|
|
|
|
- <select name="sellEdHH" id="sellEdHH" required="required" data-valid-name="판매 종료시간">
|
|
|
|
|
- <th:block th:each="num: ${#numbers.sequence(0,23)}">
|
|
|
|
|
- <option th:value="${#numbers.formatInteger(num,2)}" th:text="|${#numbers.formatInteger(num,2)}시|" th:selected="${#numbers.formatInteger(num,2)}==23 ? 'true'">시간</option>
|
|
|
|
|
- </th:block>
|
|
|
|
|
- </select>
|
|
|
|
|
- <input name="sellEddt" id="sellEddt" type="hidden" />
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>원가</th>
|
|
|
|
|
- <td><input type="text" class="w80p aR" id="costPrice" name="costPrice" maxlength="10" data-valid-type="numeric"/> 원
|
|
|
|
|
- <input type="hidden" id="costPriceOrg" name="costPriceOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </tbody>
|
|
|
|
|
- </table>
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- //TAB1 CONTENTS AREA -->
|
|
|
|
|
- </li>
|
|
|
|
|
- <!-- //TAB1 -->
|
|
|
|
|
- <!-- TAB2 : 옵셥/재고 -->
|
|
|
|
|
- <li class="tab" id="goodstab2">
|
|
|
|
|
- <!-- TAB2 CONTENTS AREA -->
|
|
|
|
|
- <div class="panelStyle">
|
|
|
|
|
- <!-- <ul class="notice cBlue">
|
|
|
|
|
- <li><strong>상품 이미지 사이즈</strong> : <em><strong>600 × 600</strong> px</em></li>
|
|
|
|
|
- </ul> -->
|
|
|
|
|
- <div id="sizeStockArea"></div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- //TAB2 CONTENTS AREA -->
|
|
|
|
|
- </li>
|
|
|
|
|
- <!-- //TAB2 : 이미지/옵셥/재고 -->
|
|
|
|
|
- <!-- TAB3 : 상품상세 -->
|
|
|
|
|
- <li class="tab" id="goodstab3">
|
|
|
|
|
- <!-- TAB3 CONTENTS AREA -->
|
|
|
|
|
- <div class="panelStyle">
|
|
|
|
|
- <table class="frmStyle">
|
|
|
|
|
- <colgroup>
|
|
|
|
|
- <col width="12%"/>
|
|
|
|
|
- <col/>
|
|
|
|
|
- </colgroup>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>상세설명</th>
|
|
|
|
|
- <td><label class="chkBox"><input type="checkbox" name="chkDescKeep" checked="checked" value="Y">정보유지<span></span></label>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </table>
|
|
|
|
|
- <!-- TABS SPACE -->
|
|
|
|
|
- <div class="tabsJr">
|
|
|
|
|
- <!-- TABS NAVI -->
|
|
|
|
|
- <ul class="tabsJrNav">
|
|
|
|
|
- <li class="on"><a href="#goodstab11">타이틀/내용/특징</a></li>
|
|
|
|
|
- <li><a href="#goodstab12">상세html</a></li>
|
|
|
|
|
- </ul>
|
|
|
|
|
- <!-- //TABS NAVI -->
|
|
|
|
|
- <!-- TABS CONTENT -->
|
|
|
|
|
- <ul class="tabsJrCont">
|
|
|
|
|
- <!-- TAB11 CONTENTS AREA -->
|
|
|
|
|
- <!-- TAB -->
|
|
|
|
|
- <li class="tabJr on" id="goodstab11">
|
|
|
|
|
- <div class="panelStyle">
|
|
|
|
|
- <!-- TAB11 CONTENTS AREA -->
|
|
|
|
|
- <table class="frmStyle">
|
|
|
|
|
- <colgroup>
|
|
|
|
|
- <col width="12%"/>
|
|
|
|
|
- <col/>
|
|
|
|
|
- </colgroup>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>타이틀</th>
|
|
|
|
|
- <td class="padT10"><input type="text" class= "w100p" id="goodsTitlesDesc" name="goodsTitlesDesc" maxlength="100" />
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>내용</th>
|
|
|
|
|
- <td class="padT10"><div class="tabJrContArea">
|
|
|
|
|
- <textarea class="textareaR3 summernote" name="goodsContentsDesc" id="goodsContentsDesc"></textarea>
|
|
|
|
|
- </div>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>상품 특징</th>
|
|
|
|
|
- <td class="padT10"><div class="tabJrContArea">
|
|
|
|
|
- <textarea class="textareaR3 summernote" name="goodsCharacterDesc" id="goodsCharacterDesc"></textarea>
|
|
|
|
|
- </div>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </table>
|
|
|
|
|
- </div>
|
|
|
|
|
- </li>
|
|
|
|
|
- <li class="tabJr" id="goodstab12">
|
|
|
|
|
- <div class="panelStyle">
|
|
|
|
|
- <!-- TAB11 CONTENTS AREA -->
|
|
|
|
|
- <table class="frmStyle">
|
|
|
|
|
- <colgroup>
|
|
|
|
|
- <col width="12%"/>
|
|
|
|
|
- <col/>
|
|
|
|
|
- </colgroup>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>상품상세</th>
|
|
|
|
|
- <td class="padT10"><div class="tabJrContArea">
|
|
|
|
|
- <textarea class="textareaR4 summernote" name="goodsDesc" id="goodsDesc"></textarea>
|
|
|
|
|
- </div>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>상위(PC)</th>
|
|
|
|
|
- <td class="padT10"><div class="tabJrContArea">
|
|
|
|
|
- <textarea class="textareaR4 summernote" name="goodsPcTopDesc" id="goodsPcTopDesc"></textarea>
|
|
|
|
|
- </div>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>상위(MOBILE)</th>
|
|
|
|
|
- <td class="padT10"><div class="tabJrContArea">
|
|
|
|
|
- <textarea class="textareaR4 summernote" name="goodsMobileTopDesc" id="goodsMobileTopDesc"></textarea>
|
|
|
|
|
- </div>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>하위(PC)</th>
|
|
|
|
|
- <td class="padT10"><div class="tabJrContArea">
|
|
|
|
|
- <textarea class="textareaR4 summernote" name="goodsPcDownDesc" id="goodsPcDownDesc"></textarea>
|
|
|
|
|
- </div>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>하위(MOBILE)</th>
|
|
|
|
|
- <td class="padT10"><div class="tabJrContArea">
|
|
|
|
|
- <textarea class="textareaR4 summernote" name="goodsMobileDownDesc" id="goodsMobileDownDesc"></textarea>
|
|
|
|
|
- </div>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </table>
|
|
|
|
|
- </div>
|
|
|
|
|
- </li>
|
|
|
|
|
- <!-- //TAB -->
|
|
|
|
|
- </ul>
|
|
|
|
|
- <!-- //TAB CONTENT -->
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- //TABS SPACE -->
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- //TAB3 CONTENTS AREA -->
|
|
|
|
|
- </li>
|
|
|
|
|
- <!-- //TAB3 : 상품상세 -->
|
|
|
|
|
- <!-- TAB4 : 고시정보 -->
|
|
|
|
|
- <li class="tab" id="goodstab4">
|
|
|
|
|
- <!-- TAB5 CONTENTS AREA -->
|
|
|
|
|
- <div class="panelStyle">
|
|
|
|
|
- <!-- TABS SPACE -->
|
|
|
|
|
- <table class="frmStyle">
|
|
|
|
|
- <colgroup>
|
|
|
|
|
- <col style="width:10%"/>
|
|
|
|
|
- <col/>
|
|
|
|
|
- </colgroup>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>Details (상품상세정보 고시)<em class="required" title="필수"></em></th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <select id="selNiClsfCd" name="selNiClsfCd" class="w40p">
|
|
|
|
|
- <option value="">[선택]</option>
|
|
|
|
|
- <option th:if="${niClsfCdList}" th:each="oneData, status : ${niClsfCdList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
|
|
|
|
|
- </select>
|
|
|
|
|
- <button type="button" class="btn btn-dark btn-lg" id="btnNotinfo">선택</button>
|
|
|
|
|
- <span class="padL10" id='itemkindNoti'></span>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </table>
|
|
|
|
|
- <hr/>
|
|
|
|
|
- <div id="notiArea"></div>
|
|
|
|
|
- <!-- //TABS SPACE -->
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- //TAB4 CONTENTS AREA -->
|
|
|
|
|
- </li>
|
|
|
|
|
- <!-- //TAB4 : 고시정보 -->
|
|
|
|
|
- <!-- 구성상품 -->
|
|
|
|
|
- <li class="tab" id="goodstab5">
|
|
|
|
|
- <!-- TAB6 CONTENTS AREA -->
|
|
|
|
|
- <div class="panelStyle">
|
|
|
|
|
- <!-- 내용 삽입 -->
|
|
|
|
|
- <ul class="panelBar" id="GoodsComposeBtnArea">
|
|
|
|
|
- <li class="right">
|
|
|
|
|
- <button type="button" class="btn btn-default btn-lg" onclick="cfnDownloadSampleFile('SF026');">양식다운로드</button>
|
|
|
|
|
- <button type="button" class="btn btn-success btn-lg" id="btnGoodsDealSearchExcel">엑셀조회</button>
|
|
|
|
|
- <button type="button" class="btn btn-base btn-lg" onclick="fnOpenGoodsDetailPopup()">상품조회</button>
|
|
|
|
|
- </li>
|
|
|
|
|
- </ul>
|
|
|
|
|
- <div id="gridGoodsComposeList" style="height: 600px;" class="ag-theme-balham lh60"></div>
|
|
|
|
|
- <!-- 내용 삽입 -->
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- //TAB6 CONTENTS AREA -->
|
|
|
|
|
- </li>
|
|
|
|
|
- <!-- TAB6 : 안전인증 -->
|
|
|
|
|
- <li class="tab" id="goodstab6">
|
|
|
|
|
- <div class="panelStyle">
|
|
|
|
|
- <table class="frmStyle">
|
|
|
|
|
- <colgroup>
|
|
|
|
|
- <col width="11%"/>
|
|
|
|
|
- <col width="22%"/>
|
|
|
|
|
- <col width="11%"/>
|
|
|
|
|
- <col width="22%"/>
|
|
|
|
|
- <col width="11%"/>
|
|
|
|
|
- <col/>
|
|
|
|
|
- </colgroup>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>인증대상</th>
|
|
|
|
|
- <td colspan="5">
|
|
|
|
|
- <label class="rdoBtn" th:if="${certTargetGbList}" th:each="oneData, status : ${certTargetGbList}">
|
|
|
|
|
- <input type="radio" name="selCertTargetGb" th:value="${oneData.cd}" th:text="${oneData.cdNm}"/>
|
|
|
|
|
- </label>
|
|
|
|
|
- <input type="hidden" id="certTargetGb" name="certTargetGb"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>인증형태</th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <select name="certFormGb" id="certFormGb" >
|
|
|
|
|
- <option value="">[선택]</option>
|
|
|
|
|
- <option th:if="${certFormGbList}" th:each="oneData, status : ${certFormGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
|
|
- </select>
|
|
|
|
|
- <input type="hidden" id="certformGbOrg" name="certformGbOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>인증타입</th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <select name="certType" id="certType" >
|
|
|
|
|
- <option value="">[선택]</option>
|
|
|
|
|
- <option th:if="${certTypeList}" th:each="oneData, status : ${certTypeList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
|
|
- </select>
|
|
|
|
|
- <input type="hidden" id="certTypeOrg" name="certTypeOrg"/>
|
|
|
|
|
- </td>
|
|
|
|
|
- <th>인증번호</th>
|
|
|
|
|
- <td>
|
|
|
|
|
- <input type="text" class="w200" id="certNum" name="certNum" maxlength="50"/>
|
|
|
|
|
- <input type="hidden" id="certNumOrg" name="certNumOrg"/>
|
|
|
|
|
-
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>인증상태</th>
|
|
|
|
|
- <td><span id="certStateTxt"></span></td>
|
|
|
|
|
- <th>인증기관</th>
|
|
|
|
|
- <td><span id="certOrganNameTxt"></span></td>
|
|
|
|
|
- <th>인증일</th>
|
|
|
|
|
- <td><span id="certDtTxt"></span></td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>인증구분</th>
|
|
|
|
|
- <td colspan="5"><span id="certDivTxt"></span></td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </table>
|
|
|
|
|
- <ul class="panelBar marT10">
|
|
|
|
|
- <li class="right">
|
|
|
|
|
- <button type="button" class="btn btn-success btn-lg" id="btnGoodsSafetyCertNum">안전인증</button>
|
|
|
|
|
- </li>
|
|
|
|
|
- </ul>
|
|
|
|
|
- </div>
|
|
|
|
|
- </li>
|
|
|
|
|
- <!-- //TAB7 : 이력정보 -->
|
|
|
|
|
- <li class="tab" id="goodstab7">
|
|
|
|
|
- <!-- TAB8 CONTENTS AREA -->
|
|
|
|
|
- <div class="panelStyle">
|
|
|
|
|
- <!-- 내용 삽입 -->
|
|
|
|
|
- <div id="gridGoodsHstoryList" style="height: 600px;" class="ag-theme-balham"></div>
|
|
|
|
|
- <!-- 내용 삽입 -->
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- //TAB5 CONTENTS AREA -->
|
|
|
|
|
- </li>
|
|
|
|
|
- </ul>
|
|
|
|
|
- <!-- //TABS CONTENTS -->
|
|
|
|
|
- <!-- TABS BUTTON AREA -->
|
|
|
|
|
- <ul class="panelBar marT10">
|
|
|
|
|
- <li class="left">
|
|
|
|
|
- <button type="button" class="btn btnLeft btn-base btn-lg" id="btnGoodsDetailPreview">미리보기</button>
|
|
|
|
|
- <!-- <button type="button" class="btn btnLeft btn-base btn-lg" id="btnGoodsDetailImg">이미지보기</button> -->
|
|
|
|
|
- </li>
|
|
|
|
|
- <li class="right">
|
|
|
|
|
- <th:block th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001'}">
|
|
|
|
|
- <button type="button" class="btn btnRight btn-success btn-lg" id="btnGoodsDetailSave">저장</button>
|
|
|
|
|
- </th:block>
|
|
|
|
|
- </li>
|
|
|
|
|
- </ul>
|
|
|
|
|
- <!-- //TABS BUTTON AREA -->
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- //TABS SPACE -->
|
|
|
|
|
-
|
|
|
|
|
- </div> <!-- class=panelContent -->
|
|
|
|
|
- </form>
|
|
|
|
|
- </div> <!-- class=panelStyle -->
|
|
|
|
|
- </div> <!-- class=modalPopup -->
|
|
|
|
|
-<script type="text/javascript" src="/ux/plugins/summernote/summernote.js?v=2020103001"></script>
|
|
|
|
|
-<script type="text/javascript" src="/ux/plugins/gaga/gaga.summernote.js?v=2021072201"></script>
|
|
|
|
|
-<script th:inline="javascript">
|
|
|
|
|
-/*<![CDATA[*/
|
|
|
|
|
-
|
|
|
|
|
- var sessRoleCd = [[${sessionInfo.roleCd}]];
|
|
|
|
|
- var formalGbList = gagajf.convertToArray([[${formalGbList}]]);
|
|
|
|
|
- var goodsStatList = gagajf.convertToArray([[${goodsStatList}]]);
|
|
|
|
|
- var itemkindList = gagajf.convertToArray([[${itemkindList}]]);
|
|
|
|
|
- var authBrandList = [[${authBrandList}]];
|
|
|
|
|
- var useYnList = gagajf.convertToArray([[${useYnList}]]);
|
|
|
|
|
- var goodsTypeList = gagajf.convertToArray([[${goodsTypeList}]]);
|
|
|
|
|
- // Get a SmartEditor options
|
|
|
|
|
- //var seOptions = gagaSe.getEditorOptions();
|
|
|
|
|
-
|
|
|
|
|
- // specify the columns - 상품변경이력
|
|
|
|
|
- var columnGoodsHstoryDefs = [
|
|
|
|
|
- {headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
|
|
|
|
|
- {headerName: "변경일자", field: "regDt", width: 130, cellClass: 'text-center' ,
|
|
|
|
|
- cellRenderer: function(params) {
|
|
|
|
|
- return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmm").format("YYYY-MM-DD HH:mm") : '';
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- {headerName: "변경자", field: "regNm", width: 100, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "판매가", field: "currPrice" , width: 100, cellClass: 'text-right'
|
|
|
|
|
- ,valueFormatter: function(params) { return Number(params.value).addComma();}
|
|
|
|
|
- },
|
|
|
|
|
- {headerName: "변경전판매가", field: "currBprice" , width: 100, cellClass: 'text-right'
|
|
|
|
|
- ,valueFormatter: function(params) { return Number(params.value).addComma(); }
|
|
|
|
|
- },
|
|
|
|
|
- {headerName: "상품상태", field: "goodsStat" , width: 100, cellClass: 'text-center',
|
|
|
|
|
- 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: "goodsNm" , width: 180, cellClass: 'text-left'},
|
|
|
|
|
- {headerName: "상품타이틀", field: "goodsTnm" , width: 180, cellClass: 'text-left'},
|
|
|
|
|
- /* {headerName: "상품검색어", field: "goodsSnm" , width: 180, cellClass: 'text-left'}, */
|
|
|
|
|
- {headerName: "정상이월구분", field: "formalGb" , width: 100, cellClass: 'text-center',
|
|
|
|
|
- cellEditorParams: { values: gagaAgGrid.extractValues(formalGbList) },
|
|
|
|
|
- valueFormatter: function (params) { return gagaAgGrid.lookupValue(formalGbList, params.value); },
|
|
|
|
|
- valueParser: function (params) { return gagaAgGrid.lookupKey(formalGbList, params.newValue); }
|
|
|
|
|
- },
|
|
|
|
|
- {headerName: "품목", field: "itemkindCd" , width: 180, cellClass: 'text-left',
|
|
|
|
|
- cellEditorParams: { values: gagaAgGrid.extractValues(itemkindList) },
|
|
|
|
|
- valueFormatter: function (params) { return gagaAgGrid.lookupValue(itemkindList, params.value); },
|
|
|
|
|
- valueParser: function (params) { return gagaAgGrid.lookupKey(itemkindList, params.newValue); }
|
|
|
|
|
- },
|
|
|
|
|
- {headerName: "최초승인일자", field: "frstCfrmDt", width: 150, cellClass: 'text-center' ,
|
|
|
|
|
- cellRenderer: function(params) {
|
|
|
|
|
- return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- {headerName: "재고연동여부", field: "erpStockLinkYn" , width: 100, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "자사몰노출여부", field: "selfMallYn" , width: 120, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "선물주문여부", field: "giftPackYn" , width: 120, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "판매수수료율", field: "sellFeeRate" , width: 120, cellClass: 'text-right'},
|
|
|
|
|
- {headerName: "사용자검색어", field: "goodsSnm1" , width: 150, cellClass: 'text-left'},
|
|
|
|
|
- {headerName: "검색어", field: "goodsSnm" , width: 450, cellClass: 'text-left', tooltipField: "goodsSnm"}
|
|
|
|
|
- ];
|
|
|
|
|
-
|
|
|
|
|
- // specify the columns - 구성상품
|
|
|
|
|
- var columnGoodsComposeDefs = [
|
|
|
|
|
- {headerName: "정렬", field: "dispOrd", width: 70 ,hide: false, cellClass: 'text-center', rowDrag: true },
|
|
|
|
|
- {headerName: "CRUD", field: "crud", width: 75, minWidth: 75, hide: true},
|
|
|
|
|
- //{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
|
|
|
|
|
- {headerName: "이미지", field: "sysImgNm", width: 100, height: 60, cellClass: 'text-center'
|
|
|
|
|
- ,cellRenderer: function(params) {
|
|
|
|
|
- return '<img width="60" src="'+ _goodsUrl+ "/" + params.value +'?RS=60" alt="" onclick="cfnOpenImagePreViewPopup(\'goodsImgView\', \''+ _goodsUrl+ "/" + params.value +'?RS=60\')" onerror="this.src=\'/image/no.png\';"/>';
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- {headerName: "상품타입", field: "goodsType" , width: 100, cellClass: 'text-center',
|
|
|
|
|
- cellEditorParams: { values: gagaAgGrid.extractValues(goodsTypeList) },
|
|
|
|
|
- valueFormatter: function (params) { return gagaAgGrid.lookupValue(goodsTypeList, params.value); },
|
|
|
|
|
- valueParser: function (params) { return gagaAgGrid.lookupKey(goodsTypeList, params.newValue); }
|
|
|
|
|
- },
|
|
|
|
|
- {headerName: "구성상품코드", field: "compsGoodsCd" , width: 130, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "구성상품코드명", field: "compsGoodsNm" , width: 200, cellClass: 'text-left'},
|
|
|
|
|
- //{headerName: "순서", field: "dispOrd" , width: 80, cellClass: 'text-right',editable: true, required: true},
|
|
|
|
|
- {headerName: "수량", field: "qty" , width: 80, cellClass: 'text-right'
|
|
|
|
|
- ,valueFormatter: function(params) { return Number(params.value).addComma();}
|
|
|
|
|
- },
|
|
|
|
|
- {headerName: "판매가", field: "currPrice" , width: 100, cellClass: 'text-right'
|
|
|
|
|
- ,valueFormatter: function(params) { return Number(params.value).addComma();}
|
|
|
|
|
- },
|
|
|
|
|
- {headerName: "상품판매가", field: "compsCurrPrice" , width: 100, cellClass: 'text-right'
|
|
|
|
|
- ,valueFormatter: function(params) { return Number(params.value).addComma();}, editable: true, required: true,
|
|
|
|
|
- cellEditor: 'textCellEditor',
|
|
|
|
|
- cellEditorParams: { maxlength: 14, validType: 'numeric'}
|
|
|
|
|
- },
|
|
|
|
|
- {headerName: "상품판매가ORG", field: "compsCurrPriceOrg" , width: 100, cellClass: 'text-right', hide: true},
|
|
|
|
|
- {headerName: "기준여부(품목-카테고리)", field: "baseYn", width: 160, cellClass: 'text-center'
|
|
|
|
|
- },
|
|
|
|
|
- {headerName: "대표여부(가격)", field: "repYn", width: 160, cellClass: 'text-center',editable: true,
|
|
|
|
|
- cellEditor: 'agRichSelectCellEditor',
|
|
|
|
|
- cellEditorParams: { values: gagaAgGrid.extractValues(useYnList), required: true },
|
|
|
|
|
- valueFormatter: function (params) { return gagaAgGrid.lookupValue(useYnList, params.value); },
|
|
|
|
|
- valueParser: function (params) { return gagaAgGrid.lookupKey(useYnList, params.newValue); }
|
|
|
|
|
- },
|
|
|
|
|
- {headerName: "대표상품", field: "repGoodsCd" , width: 100, cellClass: 'text-right', hide: true},
|
|
|
|
|
- {headerName: "전시여부", field: "useYn", width: 100, cellClass: 'text-center',editable: true,
|
|
|
|
|
- cellEditor: 'agRichSelectCellEditor',
|
|
|
|
|
- cellEditorParams: { values: gagaAgGrid.extractValues(useYnList), required: true },
|
|
|
|
|
- valueFormatter: function (params) { return gagaAgGrid.lookupValue(useYnList, params.value); },
|
|
|
|
|
- valueParser: function (params) { return gagaAgGrid.lookupKey(useYnList, params.newValue); }
|
|
|
|
|
- },
|
|
|
|
|
- {headerName: "옵션명(딜상품용)", field: "compsGoodsOptNm" , width: 200, cellClass: 'text-left',editable: true, required: true},
|
|
|
|
|
- {headerName: "상품상태", field: "goodsStat" , width: 100, cellClass: 'text-center',
|
|
|
|
|
- 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: "regDt", width: 140, cellClass: 'text-center' ,
|
|
|
|
|
- cellRenderer: function(params) {
|
|
|
|
|
- return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- {headerName: "등록자", field: "regNm", width: 100, cellClass: 'text-center'},
|
|
|
|
|
- {headerName: "수정일시", field: "updDt", width: 140, cellClass: 'text-center' ,
|
|
|
|
|
- cellRenderer: function(params) {
|
|
|
|
|
- return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- {headerName: "수정자", field: "updNm", width: 100, cellClass: 'text-center'}
|
|
|
|
|
- ];
|
|
|
|
|
-
|
|
|
|
|
- // Get GridOptions
|
|
|
|
|
- var gridGoodsHstoryOptions = gagaAgGrid.getGridOptions(columnGoodsHstoryDefs);
|
|
|
|
|
- gridGoodsHstoryOptions.enableBrowserTooltips = true;
|
|
|
|
|
- var gridGoodsComposeOptions = gagaAgGrid.getGridOptions(columnGoodsComposeDefs);
|
|
|
|
|
- gridGoodsComposeOptions.enableBrowserTooltips = true;
|
|
|
|
|
-
|
|
|
|
|
- // 드래그
|
|
|
|
|
- gridGoodsComposeOptions.suppressRowClickSelection = true;
|
|
|
|
|
- gridGoodsComposeOptions.rowDragManaged = true;
|
|
|
|
|
- gridGoodsComposeOptions.stopEditingWhenGridLosesFocus = true;
|
|
|
|
|
- //gridGoodsComposeOptions.rowDeselection = true;
|
|
|
|
|
- //gridGoodsComposeOptions.enableMultiRowDragging = true;
|
|
|
|
|
- //gridGoodsComposeOptions.rowSelection = 'multiple';
|
|
|
|
|
-
|
|
|
|
|
- gridGoodsComposeOptions.rowHeight = 60; //이미지가 있을경우 높이 지정해야함.
|
|
|
|
|
-
|
|
|
|
|
- //기준여부 표시
|
|
|
|
|
- gridGoodsComposeOptions.getRowStyle = function(params) {
|
|
|
|
|
- if ("Y" == params.data.baseYn) {
|
|
|
|
|
- return { background: '#1ab394' };
|
|
|
|
|
- }else{
|
|
|
|
|
- return { background: '#ffffff' };
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // Row
|
|
|
|
|
- gridGoodsComposeOptions.onCellValueChanged = function(event) {
|
|
|
|
|
- var rowIdx = null;
|
|
|
|
|
- var isChangColor = true;
|
|
|
|
|
- if (event.colDef.field == "baseYn"){
|
|
|
|
|
- if (event.data.baseYn == "Y"){
|
|
|
|
|
- rowIdx = event.rowIndex;
|
|
|
|
|
-
|
|
|
|
|
- //다른 기준여부 'Y'가 존재하는지 확인
|
|
|
|
|
- gridGoodsComposeOptions.api.forEachNode(function(rowNode, index) {
|
|
|
|
|
- if (rowNode.data.baseYn == "Y" && index != rowIdx){
|
|
|
|
|
- event.data.baseYn = event.oldValue;
|
|
|
|
|
- gridGoodsComposeOptions.api.updateRowData({update: [event.data]});
|
|
|
|
|
- isChangColor = false;
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- if (!isChangColor){
|
|
|
|
|
- mcxDialog.alert('다른 구성상품에 기준여부가 선택되어 있습니다.');
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if ($("#goodsDetailForm input[name=goodsType]").val() == "G056_D"){
|
|
|
|
|
- isChangColor = true;
|
|
|
|
|
- if (event.colDef.field == "repYn"){
|
|
|
|
|
- if (event.data.repYn == "Y"){
|
|
|
|
|
- rowIdx = event.rowIndex;
|
|
|
|
|
-
|
|
|
|
|
- //다른 대표여부 'Y'가 존재하는지 확인
|
|
|
|
|
- gridGoodsComposeOptions.api.forEachNode(function(rowNode, index) {
|
|
|
|
|
- if (rowNode.data.repYn == "Y" && index != rowIdx){
|
|
|
|
|
- event.data.repYn = event.oldValue;
|
|
|
|
|
- gridGoodsComposeOptions.api.updateRowData({update: [event.data]});
|
|
|
|
|
- isChangColor = false;
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- if (!isChangColor){
|
|
|
|
|
- mcxDialog.alert('다른 구성상품에 대표여부가 선택되어 있습니다.');
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 상품상세 조회
|
|
|
|
|
- var fnGoodsDeailSearch = function() {
|
|
|
|
|
-
|
|
|
|
|
- $('#goodsDetailForm').find('.tabs .tabsNav li a').attr("style", "color:#888;"); //탭색 초기화
|
|
|
|
|
-
|
|
|
|
|
- var params = new Object();
|
|
|
|
|
- params.mode = $('#goodsDetailForm input[name=mode]').val();
|
|
|
|
|
- params.goodsCd = $('#goodsDetailForm input[name=goodsCd]').val();
|
|
|
|
|
-
|
|
|
|
|
- cfnAjaxSubmit("/goods/detail", "json", fnGoodDetailSearchCallback, params);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- var fnGoodDetailSearchCallback = function(result) {
|
|
|
|
|
-
|
|
|
|
|
- $('#goodsDetailForm').find(".tabsNav > li").removeClass('on');
|
|
|
|
|
- $('#goodsDetailForm').find(".tabsNav > li").eq(0).addClass('on');
|
|
|
|
|
- $('#goodsDetailForm').find(".tabsCont > li").removeClass('on');
|
|
|
|
|
- $('#goodsDetailForm').find(".tabsCont > li").eq(0).addClass('on');
|
|
|
|
|
-
|
|
|
|
|
- if (result != null){
|
|
|
|
|
- //기본정보
|
|
|
|
|
- $('#goodsDetailForm select[name=selSupplyCompCd]').val(result.supplyCompCd);
|
|
|
|
|
- $('#goodsDetailForm input[name=supplyCompCd]').val(result.supplyCompCd);
|
|
|
|
|
- $('#goodsDetailForm input[name=brandCd]').val(result.brandCd);
|
|
|
|
|
- fnBrand(result.supplyCompCd, result.brandCd);
|
|
|
|
|
-
|
|
|
|
|
- $('#goodsDetailForm').find('#goodsCdTxt').html(result.goodsCd + ' (' + result.productCode + ')');
|
|
|
|
|
- $('#goodsDetailForm').find('#supplyGoodsCdTxt').html(result.supplyGoodsCd);
|
|
|
|
|
-
|
|
|
|
|
- $("#goodsDetailForm input[name=goodsImageYn]").val(result.goodsImageYn);
|
|
|
|
|
- $("#goodsDetailForm input[name=niClsfCd]").val(result.niClsfCd); // 품목의 고시분류
|
|
|
|
|
- //$("#goodsDetailForm select[name=selNiClsfCd]").val(result.niClsfCd);
|
|
|
|
|
- $("#goodsDetailForm input[name=selfGoodsYn]").val(result.selfGoodsYn);
|
|
|
|
|
- $('#goodsDetailForm').find('#goodsNumTxt').html(result.goodsNum);
|
|
|
|
|
- $('#goodsDetailForm input[name=goodsNum]').val(result.goodsNum);
|
|
|
|
|
- $('#goodsDetailForm select[name=goodsStat]').val(result.goodsStat);
|
|
|
|
|
- $("#goodsDetailForm input[name=goodsStatOrg]").val(result.goodsStat);
|
|
|
|
|
- $('#goodsDetailForm').find('#brandGrpNmTxt').html(result.brandGrpNm);
|
|
|
|
|
-
|
|
|
|
|
- $('#goodsDetailForm select[name=itemkindCd]').val(result.itemkindCd);
|
|
|
|
|
- $('#goodsDetailForm input[name=orgItemkindCd]').val(result.itemkindCd);
|
|
|
|
|
- $('#goodsDetailForm select[name=seasonCd]').val(result.seasonCd);
|
|
|
|
|
- $('#goodsDetailForm input[name=seasonCdOrg]').val(result.seasonCd);
|
|
|
|
|
- $('#goodsDetailForm select[name=sexGb]').val(result.sexGb);
|
|
|
|
|
- $('#goodsDetailForm input[name=sexGbOrg]').val(result.sexGb);
|
|
|
|
|
- $('#goodsDetailForm').find('#makeNmTxt').html(result.originNm);
|
|
|
|
|
- $('#goodsDetailForm').find('#styleYearTxt').html(result.styleYear);
|
|
|
|
|
- $('#goodsDetailForm select[name=goodsGb]').val(result.goodsGb);
|
|
|
|
|
- $('#goodsDetailForm input[name=goodsGbOrg]').val(result.goodsGb);
|
|
|
|
|
- $('#goodsDetailForm input[name=mainColorCd]').val(result.mainColorCd);
|
|
|
|
|
-
|
|
|
|
|
- $("#goodsDetailForm input[name=goodsNm]").val(result.goodsNm);
|
|
|
|
|
- $('#goodsDetailForm input[name=goodsNmOrg]').val(result.goodsNm);
|
|
|
|
|
- fnDataLengthCheck('goodsNm',200);
|
|
|
|
|
- $("#goodsDetailForm input[name=goodsTnm]").val(result.goodsTnm);
|
|
|
|
|
- $('#goodsDetailForm input[name=goodsTnmOrg]').val(result.goodsTnm);
|
|
|
|
|
- fnDataLengthCheck('goodsTnm',100);
|
|
|
|
|
- $("#goodsDetailForm input[name=goodsSnm1]").val(result.goodsSnm1);
|
|
|
|
|
- $("#goodsDetailForm input[name=goodsSnm1Org]").val(result.goodsSnm1);
|
|
|
|
|
- fnDataLengthCheck('goodsSnm1',200);
|
|
|
|
|
- $("#goodsDetailForm textarea[name=goodsSnmTxt]").val(result.goodsSnm);
|
|
|
|
|
- $("#goodsDetailForm input[name=goodsSnm]").val(result.goodsSnm);
|
|
|
|
|
- $('#goodsDetailForm input[name=listPrice]').val(result.listPrice.addComma());
|
|
|
|
|
- $('#goodsDetailForm input[name=listPriceOrg]').val(result.listPrice);
|
|
|
|
|
- $('#goodsDetailForm input[name=currPrice]').val(result.currPrice.addComma());
|
|
|
|
|
- $('#goodsDetailForm input[name=currPriceOrg]').val(result.currPrice);
|
|
|
|
|
- $('#goodsDetailForm').find('#dcRateTxt').html(result.dcRate);
|
|
|
|
|
- $('#goodsDetailForm input[name=dcRate]').val(result.dcRate);
|
|
|
|
|
- $('#goodsDetailForm input[name=costPrice]').val(result.costPrice.addComma());
|
|
|
|
|
- $('#goodsDetailForm input[name=costPriceOrg]').val(result.costPrice);
|
|
|
|
|
- $('#goodsDetailForm').find('#priceUpdDtTxt').html(!gagajf.isNull(result.priceUpdDt) ? result.priceUpdDt.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD") : '');
|
|
|
|
|
- $('#goodsDetailForm').find('#frstCfrmDtTxt').html(!gagajf.isNull(result.frstCfrmDt) ? result.frstCfrmDt.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD") : '');
|
|
|
|
|
-
|
|
|
|
|
- $('#goodsDetailForm select[name=distributionGb]').val(result.distributionGb);
|
|
|
|
|
- $("#goodsDetailForm input[name=distributionGbOrg]").val(result.distributionGb);
|
|
|
|
|
- $('#goodsDetailForm select[name=ageGrpCd]').val(result.ageGrpCd);
|
|
|
|
|
- $("#goodsDetailForm input[name=ageGrpCdOrg]").val(result.ageGrpCd);
|
|
|
|
|
- $('#goodsDetailForm select[name=taxGb]').val(result.taxGb);
|
|
|
|
|
-
|
|
|
|
|
- $("#goodsDetailForm input[type=radio]").parent().removeClass("checked");
|
|
|
|
|
- $("#goodsDetailForm input[type=radio]").removeAttr('checked');
|
|
|
|
|
-
|
|
|
|
|
- if (result.formalGb == "G009_20"){
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=formalGb]:input[value='G009_20']").trigger('click');
|
|
|
|
|
- }else{
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=formalGb]:input[value='G009_10']").trigger('click');
|
|
|
|
|
- }
|
|
|
|
|
- if (result.erpPriceLinkYn == "Y"){
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=erpPriceLinkYn]:input[value='Y']").trigger('click');
|
|
|
|
|
- }else{
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=erpPriceLinkYn]:input[value='N']").trigger('click');
|
|
|
|
|
- }
|
|
|
|
|
- if (result.selfMallYn == "Y"){
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=selfMallYn]:input[value='Y']").trigger('click');
|
|
|
|
|
- }else{
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=selfMallYn]:input[value='N']").trigger('click');
|
|
|
|
|
- }
|
|
|
|
|
- if (result.giftPackYn == "Y"){
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=giftPackYn]:input[value='Y']").trigger('click');
|
|
|
|
|
- }else{
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=giftPackYn]:input[value='N']").trigger('click');
|
|
|
|
|
- }
|
|
|
|
|
- if (result.returnableYn == "Y"){
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=returnableYn]:input[value='Y']").trigger('click');
|
|
|
|
|
- }else{
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=returnableYn]:input[value='N']").trigger('click');
|
|
|
|
|
- }
|
|
|
|
|
- if (result.changeableYn == "Y"){
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=changeableYn]:input[value='Y']").trigger('click');
|
|
|
|
|
- }else{
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=changeableYn]:input[value='N']").trigger('click');
|
|
|
|
|
- }
|
|
|
|
|
- if (result.newCustOrdYn == "Y"){
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=newCustOrdYn]:input[value='Y']").trigger('click');
|
|
|
|
|
- }else{
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=newCustOrdYn]:input[value='N']").trigger('click');
|
|
|
|
|
- }
|
|
|
|
|
- if (result.adultYn == "Y"){
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=adultYn]:input[value='Y']").trigger('click');
|
|
|
|
|
- }else{
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=adultYn]:input[value='N']").trigger('click');
|
|
|
|
|
- }
|
|
|
|
|
- if (result.foreignBuyYn == "Y"){
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=foreignBuyYn]:input[value='Y']").trigger('click');
|
|
|
|
|
- }else{
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=foreignBuyYn]:input[value='N']").trigger('click');
|
|
|
|
|
- }
|
|
|
|
|
- if (result.parallelImportYn == "Y"){
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=parallelImportYn]:input[value='Y']").trigger('click');
|
|
|
|
|
- }else{
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=parallelImportYn]:input[value='N']").trigger('click');
|
|
|
|
|
- }
|
|
|
|
|
- if (result.orderMadeYn == "Y"){
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=orderMadeYn]:input[value='Y']").trigger('click');
|
|
|
|
|
- }else{
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=orderMadeYn]:input[value='N']").trigger('click');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- $('#goodsDetailForm input[name=sellFeeRate]').val(result.sellFeeRate);
|
|
|
|
|
- $("#goodsDetailForm input[name=sellFeeRateOrg]").val(result.sellFeeRate);
|
|
|
|
|
-
|
|
|
|
|
- if (result.prePpntUsableYn == "Y"){
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=prePpntUsableYn]:input[value='Y']").trigger('click');
|
|
|
|
|
- }else{
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=prePpntUsableYn]:input[value='N']").trigger('click');
|
|
|
|
|
- }
|
|
|
|
|
- if (result.preMpntUsableYn == "Y"){
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=preMpntUsableYn]:input[value='Y']").trigger('click');
|
|
|
|
|
- }else{
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=preMpntUsableYn]:input[value='N']").trigger('click');
|
|
|
|
|
- }
|
|
|
|
|
- if (result.changeableYn == "Y"){
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=changeableYn]:input[value='Y']").trigger('click');
|
|
|
|
|
- }else{
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=changeableYn]:input[value='N']").trigger('click');
|
|
|
|
|
- }
|
|
|
|
|
- if (result.tobeFormYn == "Y"){
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=tobeFormYn]:input[value='Y']").trigger('click');
|
|
|
|
|
- }else{
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=tobeFormYn]:input[value='N']").trigger('click');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- $("#goodsDetailForm input[name=formalGbOrg]").val(result.formalGb);
|
|
|
|
|
- $("#goodsDetailForm input[name=foreignBuyYnOrg]").val(result.foreignBuyYn);
|
|
|
|
|
- $("#goodsDetailForm input[name=parallelImportYnOrg]").val(result.parallelImportYn);
|
|
|
|
|
- $("#goodsDetailForm input[name=orderMadeYnOrg]").val(result.orderMadeYn);
|
|
|
|
|
- $("#goodsDetailForm input[name=erpPriceLinkYnOrg]").val(result.erpPriceLinkYn);
|
|
|
|
|
- $("#goodsDetailForm input[name=selfMallYnOrg]").val(result.selfMallYn);
|
|
|
|
|
- $("#goodsDetailForm input[name=giftPackYnOrg]").val(result.giftPackYn);
|
|
|
|
|
- $("#goodsDetailForm input[name=prePpntUsableYnOrg]").val(result.prePpntUsableYn);
|
|
|
|
|
- $("#goodsDetailForm input[name=preMpntUsableYnOrg]").val(result.preMpntUsableYn);
|
|
|
|
|
- $("#goodsDetailForm input[name=changeableYnOrg]").val(result.changeableYn);
|
|
|
|
|
- $("#goodsDetailForm input[name=returnableYnOrg]").val(result.returnableYn);
|
|
|
|
|
- $("#goodsDetailForm input[name=newCustOrdYnOrg]").val(result.newCustOrdYn);
|
|
|
|
|
-
|
|
|
|
|
- if(!gagajf.isNull(result.newCustOrdStdt)){
|
|
|
|
|
- $('#goodsDetailForm input[name=newCustOrdStdt]').val(result.newCustOrdStdt.toDate("YYYYMMDD").format("YYYY-MM-DD") );
|
|
|
|
|
- $('#goodsDetailForm input[name=newCustOrdEddt]').val(result.newCustOrdEddt.toDate("YYYYMMDD").format("YYYY-MM-DD") );
|
|
|
|
|
- $('#goodsDetailForm input[name=newCustOrdStdtOrg]').val(result.newCustOrdStdt.toDate("YYYYMMDD").format("YYYY-MM-DD") );
|
|
|
|
|
- $('#goodsDetailForm input[name=newCustOrdEddtOrg]').val(result.newCustOrdEddt.toDate("YYYYMMDD").format("YYYY-MM-DD") );
|
|
|
|
|
- }else{
|
|
|
|
|
- $('#goodsDetailForm input[name=newCustOrdStdtOrg]').val('');
|
|
|
|
|
- $('#goodsDetailForm input[name=newCustOrdEddtOrg]').val('');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- $("#goodsDetailForm input[name=adultYnOrg]").val(result.adultYn);
|
|
|
|
|
- $("#goodsDetailForm input[name=tobeFormYnOrg]").val(result.tobeFormYn);
|
|
|
|
|
-
|
|
|
|
|
- $("#goodsDetailForm input[type=radio][checked]").addClass("checked");
|
|
|
|
|
- //$("#goodsDetailForm input[type=radio][checked]").parent("label").addClass("checked");
|
|
|
|
|
-
|
|
|
|
|
- //입점상품일 경우
|
|
|
|
|
- if (result.selfGoodsYn == "N"){
|
|
|
|
|
- $("#goodsDetailForm").find("#selfGoodsDpTitle").html('원코드');
|
|
|
|
|
- $("#goodsDetailForm").find("#selfGoodsDpTxt").html('<div id="supplyGoodsCdTxt"></div>');
|
|
|
|
|
- $('#goodsDetailForm').find('#supplyGoodsCdTxt').html(result.supplyGoodsCd);
|
|
|
|
|
- $('#goodsDetailForm select[name=distributionGb]').attr('readonly', true);
|
|
|
|
|
- }
|
|
|
|
|
- $('#goodsDetailForm input[name=delvFee]').val(result.delvFee.addComma());
|
|
|
|
|
- $('#goodsDetailForm input[name=pntPrate]').val(result.pntPrate);
|
|
|
|
|
- $('#goodsDetailForm input[name=pntPrateOrg]').val(result.pntPrate);
|
|
|
|
|
- $('#goodsDetailForm input[name=pntMrate]').val(result.pntMrate);
|
|
|
|
|
- $('#goodsDetailForm input[name=pntMrateOrg]').val(result.pntMrate);
|
|
|
|
|
- $('#goodsDetailForm input[name=minOrdAmt]').val(result.minOrdAmt.addComma());
|
|
|
|
|
- $('#goodsDetailForm input[name=minOrdQty]').val(result.minOrdQty);
|
|
|
|
|
- $('#goodsDetailForm input[name=minOrdQtyOrg]').val(result.minOrdQty);
|
|
|
|
|
- $('#goodsDetailForm input[name=maxOrdQty]').val(result.maxOrdQty);
|
|
|
|
|
- $('#goodsDetailForm input[name=maxOrdQtyOrg]').val(result.maxOrdQty);
|
|
|
|
|
- $('#goodsDetailForm input[name=dayMaxOrdQty]').val(result.dayMaxOrdQty);
|
|
|
|
|
- $('#goodsDetailForm input[name=dayMaxOrdQtyOrg]').val(result.dayMaxOrdQty);
|
|
|
|
|
- $('#goodsDetailForm input[name=goodsType]').val(result.goodsType);
|
|
|
|
|
- $("#goodsDetailForm").find("#goodsTypeNm").html(result.goodsTypeNm);
|
|
|
|
|
- $('#goodsDetailForm input[name=sellStdt]').val(result.sellStdt);
|
|
|
|
|
- $('#goodsDetailForm input[name=sellStYMD]').val(result.sellStdt.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD") );
|
|
|
|
|
- $('#goodsDetailForm input[name=sellStHH]').val(result.sellStdt.toDate("YYYYMMDDHHmmss").format("HH") );
|
|
|
|
|
- $('#goodsDetailForm input[name=sellEddt]').val(result.sellEddt);
|
|
|
|
|
- $('#goodsDetailForm input[name=sellEdYMD]').val(result.sellEddt.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD") );
|
|
|
|
|
- $('#goodsDetailForm input[name=sellEdHH]').val(result.sellEddt.toDate("YYYYMMDDHHmmss").format("HH") );
|
|
|
|
|
-
|
|
|
|
|
- //cfnCreateCombo('/renderer/delvFee/list/' + result.supplyCompCd, $('#goodsDetailForm select[name=delvFeeCd]'), "[선택]", result.delvFeeCd);
|
|
|
|
|
- cfnCreateDelvPolicyCombo( result.supplyCompCd, $('#goodsDetailForm select[name=delvFeeCd]'), "[선택]", result.delvFeeCd);
|
|
|
|
|
- $('#goodsDetailForm input[name=delvFeeCdOrg]').val(result.delvFeeCd);
|
|
|
|
|
- cfnCreateCombo('/renderer/delvloc/list/' + result.supplyCompCd, $('#goodsDetailForm select[name=delvLocCd]'), "[선택]", result.delvLocCd);
|
|
|
|
|
- $('#goodsDetailForm input[name=delvLocCdOrg]').val(result.delvLocCd);
|
|
|
|
|
-
|
|
|
|
|
- // $('#goodsDetailForm input[name=certNum]').val(result.certNum);
|
|
|
|
|
- // $('#goodsDetailForm input[name=certNumOrg]').val(result.certNum);
|
|
|
|
|
-
|
|
|
|
|
- //상품상세
|
|
|
|
|
- $('#goodsDetailForm input[name=goodsTitlesDesc]').val(result.goodsTitlesDesc);
|
|
|
|
|
- // Summernote에 값 세팅
|
|
|
|
|
- gagaSn.setContents('#goodsContentsDesc', result.goodsContentsDesc);
|
|
|
|
|
- gagaSn.setContents('#goodsCharacterDesc', result.goodsCharacterDesc);
|
|
|
|
|
- gagaSn.setContents('#goodsPcTopDesc', result.goodsPcTopDesc);
|
|
|
|
|
- gagaSn.setContents('#goodsMobileTopDesc', result.goodsMobileTopDesc);
|
|
|
|
|
- gagaSn.setContents('#goodsPcDownDesc', result.goodsPcDownDesc);
|
|
|
|
|
- gagaSn.setContents('#goodsMobileDownDesc', result.goodsMobileDownDesc);
|
|
|
|
|
-
|
|
|
|
|
- // asis html 변경
|
|
|
|
|
- //gagaSn.setContents('#goodsDesc', result.goodsDesc);
|
|
|
|
|
- gagaSn.setContents('#goodsDesc', result.goodsDesc.replaceAll('src="/Upload' , 'src="'+_imgUrl+'/Local'));
|
|
|
|
|
-
|
|
|
|
|
- if (!gagajf.isNull(result.niClsfNm)){
|
|
|
|
|
- $('#goodsDetailForm').find('#itemkindNoti').html('품목기준 고시분류 : ' + result.niClsfNm);
|
|
|
|
|
- // $('#goodsDetailForm input[name=niClsfNm]').val(result.niClsfNm);
|
|
|
|
|
- // var objNotiInfo = $("#goodsDetailForm select[name=selNiClsfCd] option");
|
|
|
|
|
- // for(var i=0;i<objNotiInfo.length; i++ ){
|
|
|
|
|
- // if (objNotiInfo.eq(i).text() == result.niClsfNm){
|
|
|
|
|
- // objNotiInfo.eq(i).prop("selected","true");
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- $('#goodsDetailForm').find('#goodsImgUrl').attr('src', _goodsUrl + '/'+ result.sysImgNm +'?RS=130');
|
|
|
|
|
- $('#goodsDetailForm input[name=sysImgNm]').val(result.sysImgNm);
|
|
|
|
|
- $("#goodsDetailForm input[type=checkbox][checked]").parent("label").addClass("checked");
|
|
|
|
|
-
|
|
|
|
|
- //품목변경 권한 관련 처리
|
|
|
|
|
- //md권한
|
|
|
|
|
- if(sessRoleCd == "G001_A101" || sessRoleCd == "G001_B000"){
|
|
|
|
|
- var roleFlag = "N";
|
|
|
|
|
- $.each(authBrandList, function(idx, item) {
|
|
|
|
|
- if (result.brandCd == item.cd ){
|
|
|
|
|
- roleFlag = "Y";
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- if (roleFlag == "N"){
|
|
|
|
|
- $('#goodsDetailForm select[name=itemkindCd]').attr('disabled',true);
|
|
|
|
|
- $('#goodsDetailForm #btnGoodsItemkindChange').addClass('off');
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //상품 구분에 따른 컬럼 사용여부처리 start
|
|
|
|
|
- //세트
|
|
|
|
|
- if ("G056_S" == result.goodsType){
|
|
|
|
|
- if (result.selfGoodsYn == "Y") $('#goodsDetailForm #goodsComposeTab').css('display','block');
|
|
|
|
|
- $('#goodsDetailForm #goodsNotiTab').css('display','none');
|
|
|
|
|
- $('#goodsDetailForm #goodsSafeTab').css('display','none');
|
|
|
|
|
- $('#goodsDetailForm input[name=sellFeeRate]').attr('readonly', true);
|
|
|
|
|
- $('#goodsDetailForm input[name=listPrice]').attr('readonly', true);
|
|
|
|
|
- $('#goodsDetailForm input[name=currPrice]').attr('readonly', true);
|
|
|
|
|
- }else if ("G056_D" == result.goodsType){
|
|
|
|
|
- $('#goodsDetailForm #goodsComposeTab').css('display','block');
|
|
|
|
|
- $('#goodsDetailForm #goodsDescTab').css('display','none');
|
|
|
|
|
- $('#goodsDetailForm #goodsNotiTab').css('display','none');
|
|
|
|
|
- $('#goodsDetailForm #goodsSafeTab').css('display','none');
|
|
|
|
|
- $('#goodsDetailForm input[name=sellFeeRate]').attr('readonly', true);
|
|
|
|
|
-
|
|
|
|
|
- // 딜상품인 경우 항목 숨김처리
|
|
|
|
|
- $('.chk_deal').hide();
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //상품 구분에 따른 컬럼 사용여부처리 end
|
|
|
|
|
-
|
|
|
|
|
- var params = new Object();
|
|
|
|
|
- params.mode = $('#goodsDetailForm input[name=mode]').val();
|
|
|
|
|
- params.goodsCd = result.goodsCd;
|
|
|
|
|
- params.brandCd = result.brandCd;
|
|
|
|
|
- params.supplyCompCd = result.supplyCompCd;
|
|
|
|
|
- //params.niClsfCd = result.niClsfCd;
|
|
|
|
|
- params.goodsType = result.goodsType;
|
|
|
|
|
- params.erpPriceLinkYn = result.erpPriceLinkYn;
|
|
|
|
|
-
|
|
|
|
|
- //옵셥 재고(ajax html)
|
|
|
|
|
- fnGoodsDetailSizeStockSearch(params);
|
|
|
|
|
- //정보고시
|
|
|
|
|
- fnGoodsDetailNotiInfoSearch(params);
|
|
|
|
|
- //구매등급
|
|
|
|
|
- fnGoodsDetailOrderGradeSearch(params);
|
|
|
|
|
- //안전인증
|
|
|
|
|
- fnGoodsDetailSafeNoSearch();
|
|
|
|
|
- //구성상품
|
|
|
|
|
- if ("G056_S" == result.goodsType || "G056_D" == result.goodsType){
|
|
|
|
|
- fnGoodsComposeListSearch(params);
|
|
|
|
|
- }
|
|
|
|
|
- //이력
|
|
|
|
|
- fnGoodsDetailHstSearch();
|
|
|
|
|
- fnUnEscapeHtml(); //XSS변환
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //기본정보탭 변경여부
|
|
|
|
|
- $('#goodsDetailForm').find('#goodstab1').find("input, select, textarea").on('change', function() {
|
|
|
|
|
- $('#goodsDetailForm').find('.tabs .tabsNav li:eq(0) a').attr("style", "color:red;");
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //옵셥 재고
|
|
|
|
|
- var fnGoodsDetailSizeStockSearch = function(params) {
|
|
|
|
|
- cfnAjaxSubmit("/goods/detail/sizeStock/form", "html", "sizeStockArea", params);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //정보고시
|
|
|
|
|
- var fnGoodsDetailNotiInfoSearch = function(params) {
|
|
|
|
|
- cfnAjaxSubmit("/goods/detail/notiInfo/list", "json", fnGoodsDetailNotiInfoSearchCallback, params);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //구매등급
|
|
|
|
|
- var fnGoodsDetailOrderGradeSearch = function(params) {
|
|
|
|
|
- cfnAjaxSubmit("/goods/detail/order/grade/list", "json", fnGoodsDetailOrderGradeSearchCallback, params);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //안전인증
|
|
|
|
|
- var fnGoodsDetailSafeNoSearch = function() {
|
|
|
|
|
- var params = new Object();
|
|
|
|
|
- params.goodsCd = $('#goodsDetailForm input[name=goodsCd]').val();
|
|
|
|
|
- cfnAjaxSubmit("/goods/detail/safe", "json", fnGoodsDetailSafeNoSearchCallback, params);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //구성상품
|
|
|
|
|
- var fnGoodsComposeListSearch = function(params) {
|
|
|
|
|
- if ("G056_S" == params.goodsType){ //세트
|
|
|
|
|
- gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'currPrice', false);
|
|
|
|
|
- gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'useYn', false);
|
|
|
|
|
- gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'compsGoodsOptNm', false);
|
|
|
|
|
- gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'repYn', false);
|
|
|
|
|
- $('#GoodsComposeBtnArea').addClass("off");
|
|
|
|
|
- }else{ //딜
|
|
|
|
|
- gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'qty', false);
|
|
|
|
|
- gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'compsCurrPrice', false);
|
|
|
|
|
- gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'compsCurrPriceOrg', false);
|
|
|
|
|
- }
|
|
|
|
|
- gagaAgGrid.fetch("/goods/detail/compose/list?goodsCd=" + params.goodsCd , gridGoodsComposeOptions , null, fnGoodsComposeListSearchCallBack);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- var fnGoodsComposeListSearchCallBack = function(){
|
|
|
|
|
- var allData = gagaAgGrid.getAllRowData(gridGoodsComposeOptions);
|
|
|
|
|
- $.each(allData, function(index, item) {
|
|
|
|
|
- if (item.repYn == "Y"){
|
|
|
|
|
- $("#goodsDetailForm input[name=repGoodsCd]").val(item.repGoodsCd); // 대표상품
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- //이력
|
|
|
|
|
- var fnGoodsDetailHstSearch = function() {
|
|
|
|
|
- gagaAgGrid.fetch("/goods/detail/hst/list?goodsCd=" + $('#goodsDetailForm input[name=goodsCd]').val() , gridGoodsHstoryOptions,null,fnChangeGrid);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //정보고시 콜백
|
|
|
|
|
- var fnGoodsDetailNotiInfoSearchCallback = function(result) {
|
|
|
|
|
- if (result == null) return;
|
|
|
|
|
-
|
|
|
|
|
- var notiHtml = "";
|
|
|
|
|
- var idx = 0;
|
|
|
|
|
- $('#goodsDetailForm').find('#notiArea').html('');
|
|
|
|
|
- notiHtml += '<table class="frmStyle">';
|
|
|
|
|
- notiHtml += '<colgroup><col style="width:20%"/><col/></colgroup>';
|
|
|
|
|
- notiHtml += '<tbody id="infoContents">\n';
|
|
|
|
|
- notiHtml += '<tr><th>고시항목</th><th>고시내용</th></tr>';
|
|
|
|
|
- result.forEach(function(info){
|
|
|
|
|
-
|
|
|
|
|
- notiHtml += '<tr><th>'+ gagajf.convNull(info.niItemNm, '') +'<input type="hidden" name="niItemCd" value="'+ gagajf.convNull(info.niItemCd, '') +'" />\n<input type="hidden" name="dispOrd" value="'+ gagajf.convNull(info.dispOrd, '') +'" /></th>';
|
|
|
|
|
- notiHtml += '<td><input type="text" name="niContent" value="'+ gagajf.convNull(info.niContent, '') +'"/></td>\n';
|
|
|
|
|
- notiHtml += '</tr>\n';
|
|
|
|
|
-
|
|
|
|
|
- if (idx == 0){
|
|
|
|
|
- $("#goodsDetailForm select[name=selNiClsfCd]").val(info.niClsfCd);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- idx ++;
|
|
|
|
|
- });
|
|
|
|
|
- notiHtml += '</tbody></table>';
|
|
|
|
|
-
|
|
|
|
|
- $('#goodsDetailForm').find('#notiArea').append(notiHtml);
|
|
|
|
|
-
|
|
|
|
|
- //고시정보탭 변경여부
|
|
|
|
|
- $('#goodsDetailForm').find('#goodstab4').find("input, select, textarea").on('change', function() {
|
|
|
|
|
- $('#goodsDetailForm').find('.tabs .tabsNav li:eq(3) a').attr("style", "color:red;");
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //구매등급 콜백
|
|
|
|
|
- var fnGoodsDetailOrderGradeSearchCallback = function(result) {
|
|
|
|
|
- if (result == null) return;
|
|
|
|
|
-
|
|
|
|
|
- result.forEach(function(info){
|
|
|
|
|
-
|
|
|
|
|
- $("#goodsDetailForm #goodsCustGradeList").find("input").each(function() {
|
|
|
|
|
- if (info.custGrade == $(this).val() ){
|
|
|
|
|
- $(this).prop("checked", true);
|
|
|
|
|
- $(this).parent("label").addClass("checked");
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //안전인증 콜백
|
|
|
|
|
- var fnGoodsDetailSafeNoSearchCallback = function(result){
|
|
|
|
|
- if (result == null) return;
|
|
|
|
|
-
|
|
|
|
|
- if (result.certTargetGb == "G083_1"){
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=selCertTargetGb]:input[value='G083_1']").trigger('click');
|
|
|
|
|
- }else if (result.certTargetGb == "G083_2"){
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=selCertTargetGb]:input[value='G083_2']").trigger('click');
|
|
|
|
|
- }else if (result.certTargetGb == "G083_3"){
|
|
|
|
|
- $("#goodsDetailForm input:radio[name=selCertTargetGb]:input[value='G083_3']").trigger('click');
|
|
|
|
|
- }
|
|
|
|
|
- $("#goodsDetailForm input[name=certTargetGb]").val(result.certTargetGb);
|
|
|
|
|
- $("#goodsDetailForm select[name=certFormGb]").val(result.certFormGb);
|
|
|
|
|
- $("#goodsDetailForm input[name=certFormGbOrg]").val(result.certFormGb);
|
|
|
|
|
- $("#goodsDetailForm select[name=certType]").val(result.certType);
|
|
|
|
|
- $("#goodsDetailForm input[name=certTypeOrg]").val(result.certType);
|
|
|
|
|
- $("#goodsDetailForm input[name=certNum]").val(result.certNum);
|
|
|
|
|
- $("#goodsDetailForm input[name=certNumOrg]").val(result.certNum);
|
|
|
|
|
- $('#goodsDetailForm').find('#certStateTxt').html(result.certState);
|
|
|
|
|
- $('#goodsDetailForm').find('#certOrganNameTxt').html(result.certOrganName);
|
|
|
|
|
- $('#goodsDetailForm').find('#certDivTxt').html(result.certDiv);
|
|
|
|
|
- $('#goodsDetailForm').find('#certDtTxt').html(!gagajf.isNull(result.certDt) ? result.certDt.toDate("YYYYMMDD").format("YYYY-MM-DD") : '');
|
|
|
|
|
-
|
|
|
|
|
- if (!gagajf.isNull($("#goodsDetailForm select[name=selCertTargetGb]").val()) ){
|
|
|
|
|
- if ("G081_1" != $("#goodsDetailForm select[name=certType]").val() && "G081_2" != $("#goodsDetailForm select[name=certType]").val()){
|
|
|
|
|
- $("#goodsDetailForm input[name=certNum]").attr('readonly', true);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 인증대상 변경시
|
|
|
|
|
- $("#goodsDetailForm input[name=selCertTargetGb]").bind('click', function () {
|
|
|
|
|
- var certTargetGb = $(this).val();
|
|
|
|
|
- if (certTargetGb == "G083_1"){
|
|
|
|
|
- $("#goodsDetailForm select[name=certFormGb]").attr('readonly', false);
|
|
|
|
|
- $("#goodsDetailForm select[name=certType]").attr('readonly', false);
|
|
|
|
|
- $("#goodsDetailForm input[name=certNum]").attr('readonly', false);
|
|
|
|
|
- }else{
|
|
|
|
|
- $("#goodsDetailForm select[name=certFormGb]").val('');
|
|
|
|
|
- $("#goodsDetailForm select[name=certType]").val('');
|
|
|
|
|
- $("#goodsDetailForm input[name=certNum]").val('');
|
|
|
|
|
- $("#goodsDetailForm select[name=certFormGb]").attr('readonly', true);
|
|
|
|
|
- $("#goodsDetailForm select[name=certType]").attr('readonly', true);
|
|
|
|
|
- $("#goodsDetailForm input[name=certNum]").attr('readonly', true);
|
|
|
|
|
-
|
|
|
|
|
- $("#goodsDetailForm").find("#certStateTxt").html('');
|
|
|
|
|
- $("#goodsDetailForm").find("#certOrganNameTxt").html('');
|
|
|
|
|
- $("#goodsDetailForm").find("#certDtTxt").html('');
|
|
|
|
|
- $("#goodsDetailForm").find("#certDivTxt").html('');
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- // 인증타입 변경시
|
|
|
|
|
- $("#goodsDetailForm select[name=certType]").bind('click change', function () {
|
|
|
|
|
- var certType = $(this).val();
|
|
|
|
|
- if (certType == "G081_1" || certType == "G081_2"){
|
|
|
|
|
- $("#goodsDetailForm input[name=certNum]").attr('readonly', false);
|
|
|
|
|
- }else{
|
|
|
|
|
- $("#goodsDetailForm input[name=certNum]").val('');
|
|
|
|
|
- $("#goodsDetailForm input[name=certNum]").attr('readonly', true);
|
|
|
|
|
-
|
|
|
|
|
- $("#goodsDetailForm").find("#certStateTxt").html('');
|
|
|
|
|
- $("#goodsDetailForm").find("#certOrganNameTxt").html('');
|
|
|
|
|
- $("#goodsDetailForm").find("#certDtTxt").html('');
|
|
|
|
|
- $("#goodsDetailForm").find("#certDivTxt").html('');
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- //상품명 길이표시
|
|
|
|
|
- $("#goodsDetailForm input[name=goodsNm]").bind('focus focusout input keyup keydown paste change', function () {
|
|
|
|
|
- fnDataLengthCheck('goodsNm',200);
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- //상품타이틀 길이표시
|
|
|
|
|
- $("#goodsDetailForm input[name=goodsTnm]").bind('focus focusout input keyup keydown paste change', function () {
|
|
|
|
|
- fnDataLengthCheck('goodsTnm',100);
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- //사용자검색어 길이표시
|
|
|
|
|
- $("#goodsDetailForm input[name=goodsSnm1]").bind('focus focusout input keyup keydown paste change', function () {
|
|
|
|
|
- fnDataLengthCheck('goodsSnm1',200);
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- //판매가 변경시 할인율 계산
|
|
|
|
|
- $("#goodsDetailForm input[name=currPrice]").bind('focusout paste', function () {
|
|
|
|
|
- fnCurrPriceCheck();
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- //정상가 변경시 할인율 계산
|
|
|
|
|
- $("#goodsDetailForm input[name=listPrice]").bind('focusout paste', function () {
|
|
|
|
|
- fnCurrPriceCheck();
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- //판매가의 할인율 확인
|
|
|
|
|
- var fnCurrPriceCheck = function(){
|
|
|
|
|
- var dcRate = 0;
|
|
|
|
|
-
|
|
|
|
|
- var listPrice = $("#goodsDetailForm input[name=listPrice]").val().removeComma();
|
|
|
|
|
- var currPrice = $("#goodsDetailForm input[name=currPrice]").val().removeComma();
|
|
|
|
|
- dcRate = 100 - Math.floor(Number(currPrice) / Number(listPrice) * 100); //절사
|
|
|
|
|
-
|
|
|
|
|
- $("#goodsDetailForm").find("#dcRateTxt").html(dcRate);
|
|
|
|
|
- $("#goodsDetailForm input[name=dcRate]").val(dcRate);
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //판매가의 할인율 확인
|
|
|
|
|
- /* var fnCurrPriceCheck_org = function(){
|
|
|
|
|
- var dcRate = 0;
|
|
|
|
|
-
|
|
|
|
|
- var listPrice = $("#goodsDetailForm input[name=listPrice]").val().removeComma();
|
|
|
|
|
- var currPrice = $("#goodsDetailForm input[name=currPrice]").val().removeComma();
|
|
|
|
|
- //dcRate = Math.round(100 - Math.floor((Number(currPrice) / Number(listPrice) * 100)*100)/100);
|
|
|
|
|
- //dcRate = 100 - (Number((Number(currPrice) / Number(listPrice)).toFixed(2)) *100);
|
|
|
|
|
- dcRate = 100 - Math.floor(Number(currPrice) / Number(listPrice) * 100);
|
|
|
|
|
-
|
|
|
|
|
- if (dcRate < 0){
|
|
|
|
|
- mcxDialog.alert('할인율이 0보다 작습니다.\n판매가를 확인해주세요.', function(){
|
|
|
|
|
- $("#goodsDetailForm input[name=currPrice]").focus();
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }else if (dcRate >= 90){
|
|
|
|
|
- gagaAlert.confirm("할인율이 90%이상입니다. 계속하시겠습니까?", function(){
|
|
|
|
|
- $("#goodsDetailForm").find("#dcRateTxt").html(dcRate);
|
|
|
|
|
- $("#goodsDetailForm input[name=dcRate]").val(dcRate);
|
|
|
|
|
- return true;
|
|
|
|
|
- },
|
|
|
|
|
- function(){
|
|
|
|
|
- $('#goodsDetailForm input[name=currPrice]').val($('#goodsDetailForm input[name=currPriceOrg]').val().addComma());
|
|
|
|
|
- return false;
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- }else{
|
|
|
|
|
- $("#goodsDetailForm").find("#dcRateTxt").html(dcRate);
|
|
|
|
|
- $("#goodsDetailForm input[name=dcRate]").val(dcRate);
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- } */
|
|
|
|
|
-
|
|
|
|
|
- // 브랜드 조회
|
|
|
|
|
- var fnBrand = function(supplyCompCd, brandCd) {
|
|
|
|
|
- var actionUrl = '/renderer/supplyCompany/brand/list/' + supplyCompCd;
|
|
|
|
|
-
|
|
|
|
|
- if(sessRoleCd == "G001_B000"){
|
|
|
|
|
- actionUrl = '/renderer/brand/AuthBrandlist';
|
|
|
|
|
- }
|
|
|
|
|
- $("#goodsDetailForm select[name=selBrandCd] option:gt(0)").remove();
|
|
|
|
|
-
|
|
|
|
|
- cfnCreateCombo(actionUrl, $('#goodsDetailForm select[name=selBrandCd]'), "[선택]", brandCd);
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //데이터 길이 확인
|
|
|
|
|
- var fnDataLengthCheck = function(id , maxByte){
|
|
|
|
|
- var maximumByte = maxByte;
|
|
|
|
|
- var strLenEng = $('#goodsDetailForm').find('#'+id).val().length;
|
|
|
|
|
- var cbyteStr = 0;
|
|
|
|
|
- var liLenStr = 0;
|
|
|
|
|
- for (i = 0; i < strLenEng; i++) {
|
|
|
|
|
- var lsOneChar = $('#goodsDetailForm').find('#'+id).val().charAt(i);
|
|
|
|
|
- if (lsOneChar == "\n" || lsOneChar == "\'") {
|
|
|
|
|
- cbyteStr += 5; //엔터면 5를 더한다
|
|
|
|
|
- } else if (lsOneChar == "\"") {
|
|
|
|
|
- cbyteStr += 6; //쌍따옴표면 6를 더한다
|
|
|
|
|
- } else if (escape(lsOneChar).length > 4) {
|
|
|
|
|
- cbyteStr += 3; //한글이면 3를 더한다
|
|
|
|
|
- } else {
|
|
|
|
|
- cbyteStr++; //한글아니면 1을 다한다
|
|
|
|
|
- }
|
|
|
|
|
- if (cbyteStr <= maximumByte) {
|
|
|
|
|
- liLenStr = i + 1;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 사용자가 입력한 값이 제한 값을 초과하는지를 검사한다.
|
|
|
|
|
- if (parseInt(cbyteStr) > parseInt(maximumByte)) {
|
|
|
|
|
- mcxDialog.alertC('허용된 글자수가 초과되었습니다.\n초과된 부분은 자동으로 삭제됩니다.', {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $('#goodsDetailForm').find('#'+id).focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- var str = $('#goodsDetailForm').find('#'+id).val().substr(0, liLenStr);
|
|
|
|
|
- $('#goodsDetailForm').find('#'+id).val(str);
|
|
|
|
|
- var cbyteStr = 0;
|
|
|
|
|
- for (i = 0; i < $('#goodsDetailForm').find('#'+id).val().length; i++) {
|
|
|
|
|
- var lsOneChar = $('#goodsDetailForm').find('#'+id).val().charAt(i);
|
|
|
|
|
- if (lsOneChar == "\n" || lsOneChar == "\'") {
|
|
|
|
|
- cbyteStr += 5; //엔터면 5를 더한다
|
|
|
|
|
- } else if (lsOneChar == "\"") {
|
|
|
|
|
- cbyteStr += 6; //쌍따옴표면 6를 더한다
|
|
|
|
|
- } else if (escape(lsOneChar).length > 4) {
|
|
|
|
|
- cbyteStr += 3; //한글이면 3를 더한다
|
|
|
|
|
- } else {
|
|
|
|
|
- cbyteStr++; //한글아니면 1을 다한다
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- $('#goodsDetailForm').find('#'+id+'Len').text(cbyteStr);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //상품저장 버튼 클릭 시
|
|
|
|
|
- $('#btnGoodsDetailSave').click(function() {
|
|
|
|
|
-
|
|
|
|
|
- var optCheck = false;
|
|
|
|
|
- var idx = 0;
|
|
|
|
|
-
|
|
|
|
|
- //상품상태가 승인대기나 승인 완료일 경우
|
|
|
|
|
- if($("#goodsDetailForm select[name=goodsStat]").val() == "G008_40" || $("#goodsDetailForm select[name=goodsStat]").val() == "G008_90"){
|
|
|
|
|
-
|
|
|
|
|
- // SUPER관리자, 어드민관리자, 계정관리자. 총괄관리자, MD 를 제외하고 승인처리 할수 없음
|
|
|
|
|
- if ("G001_0000" != sessRoleCd && "G001_A000" != sessRoleCd && "G001_A001" != sessRoleCd && "G001_A100" != sessRoleCd && "G001_A101" != sessRoleCd ){
|
|
|
|
|
- if ($("#goodsDetailForm select[name=goodsStat]").val() == "G008_90" && $("#goodsDetailForm input[name=goodsStatOrg]").val() != "G008_90"){
|
|
|
|
|
- mcxDialog.alert(" '승인완료' 상태로 변경할 권한이 없습니다.");
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- //list가 등록되지 않은 상품은 상태변경 불가
|
|
|
|
|
- if(Number($("#goodsDetailForm input[name=listPrice]").val()) == 0){
|
|
|
|
|
- mcxDialog.alertC("정상가가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm select[name=goodsStat]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //정상가가 0인 상품은 상태변경 불가
|
|
|
|
|
- if((gagajf.isNull($("#goodsDetailForm input[name=listPrice]").val()) || $("#goodsDetailForm input[name=listPrice]").val() == 0)){
|
|
|
|
|
- mcxDialog.alertC("정상가가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm select[name=goodsStat]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //판매가가 0인 상품은 상태변경 불가
|
|
|
|
|
- if((gagajf.isNull($("#goodsDetailForm input[name=currPrice]").val()) || $("#goodsDetailForm input[name=currPrice]").val() == 0)){
|
|
|
|
|
- mcxDialog.alertC("판매가가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm select[name=goodsStat]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //사이즈정보가 등록되지 않은 상품은 상태변경 불가
|
|
|
|
|
- if($("#goodsDetailForm #sizeStockArea").find("#optionList tr").length == 0){
|
|
|
|
|
- mcxDialog.alertC("사이즈정보가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm select[name=goodsStat]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //이미지가 등록되지 않은 상품은 상태변경 불가
|
|
|
|
|
- /* if($("#goodsDetailForm input[name=goodsImageYn]").val() == "N"){
|
|
|
|
|
- mcxDialog.alertC("이미지가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm select[name=goodsStat]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
- } */
|
|
|
|
|
-
|
|
|
|
|
- //고시정보가 등록되지 않은 상품은 상태변경 불가 - 일반상품만 체크
|
|
|
|
|
- if ("G056_N" == $("#goodsDetailForm input[name=goodsType]").val()){
|
|
|
|
|
- if($("#goodsDetailForm #notiArea").find("#infoContents tr").length == 0){
|
|
|
|
|
- mcxDialog.alertC("고시정보가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm select[name=goodsStat]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- idx = 0;
|
|
|
|
|
-
|
|
|
|
|
- $("#goodsDetailForm #notiArea").find("#infoContents tr").each(function() {
|
|
|
|
|
- if (typeof($(this).find("td input[name=niContent]").val()) != 'undefined' && gagajf.isNull($(this).find("td input[name=niContent]").val())){
|
|
|
|
|
- optCheck = true;
|
|
|
|
|
- mcxDialog.alertC("고시정보를 입력해주세요.");
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- idx++;
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 상품상세 - 입점
|
|
|
|
|
- if ("N" == $("#goodsDetailForm input[name=selfGoodsYn]").val() && $("#goodsDetailForm input[name=goodsType]").val() == "G056_N"){
|
|
|
|
|
- if (gagajf.isNull($("#goodsDetailForm textarea[name=goodsDesc]").val()) || "<p><br></p>" == $("#goodsDetailForm textarea[name=goodsDesc]").val() ){
|
|
|
|
|
- mcxDialog.alert("상품상세정보탭의 상품상세내용을 입력해주세요.");
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 자사일 경우 대표색상 선택 여부
|
|
|
|
|
- if ("Y" == $('#goodsDetailForm input[name=selfGoodsYn]').val()){
|
|
|
|
|
-
|
|
|
|
|
- if($("#goodsDetailForm input[name=basicColor]:checked").length == 0) {
|
|
|
|
|
- mcxDialog.alert("대표색상을 선택해주세요.")
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if(optCheck) {
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //상품명
|
|
|
|
|
- if(gagajf.isNull($("#goodsDetailForm input[name=goodsNm]").val())){
|
|
|
|
|
- mcxDialog.alertC("상품명을 입력해 주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=goodsNm]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //상품상태
|
|
|
|
|
- if(gagajf.isNull($("#goodsDetailForm select[name=goodsStat]").val())){
|
|
|
|
|
- mcxDialog.alertC("상품상태를 선택해 주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm select[name=goodsStat]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //성별
|
|
|
|
|
- if(gagajf.isNull($("#goodsDetailForm select[name=sexGb]").val())){
|
|
|
|
|
- mcxDialog.alertC("성별을 선택해 주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm select[name=sexGb]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 상품구분
|
|
|
|
|
- if(gagajf.isNull($("#goodsDetailForm select[name=goodsGb]").val())){
|
|
|
|
|
- mcxDialog.alertC("상품구분을 선택해 주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm select[name=goodsGb]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- //시즌
|
|
|
|
|
- //if ("Y" == $("#goodsDetailForm input[name=selfGoodsYn]").val()){
|
|
|
|
|
- if(gagajf.isNull($("#goodsDetailForm select[name=seasonCd]").val())){
|
|
|
|
|
- mcxDialog.alertC("시즌을 선택해 주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm select[name=seasonCd]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- //}
|
|
|
|
|
-
|
|
|
|
|
- //정상가
|
|
|
|
|
- if(gagajf.isNull($("#goodsDetailForm input[name=listPrice]").val())) {
|
|
|
|
|
- mcxDialog.alertC("판매가를 올바르게 입력해주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=listPrice]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //판매가
|
|
|
|
|
- if(gagajf.isNull($("#goodsDetailForm input[name=currPrice]").val())) {
|
|
|
|
|
- mcxDialog.alertC("판매가를 올바르게 입력해주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=currPrice]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- /* if(Number($("#goodsDetailForm input[name=currPrice]").val().removeComma()) < 1000) {
|
|
|
|
|
- mcxDialog.alertC("판매가는 1000원 이상을 입력하셔야 합니다.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=currPrice]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- } */
|
|
|
|
|
-
|
|
|
|
|
- //정상가와 판매가 비교
|
|
|
|
|
- if ($("#goodsDetailForm input[name=goodsType]").val() != "G056_D"){
|
|
|
|
|
- if(Number($("#goodsDetailForm input[name=listPrice]").val().removeComma()) < Number($("#goodsDetailForm input[name=currPrice]").val().removeComma())) {
|
|
|
|
|
- mcxDialog.alertC("판매가를 올바르게 입력해주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=currPrice]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //판매 수수료율
|
|
|
|
|
- if ( gagajf.isNull($("#goodsDetailForm input[name=sellFeeRate]").val())) {
|
|
|
|
|
- mcxDialog.alertC("판매수수료를 입력해 주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=sellFeeRate]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- if(Number($("#goodsDetailForm input[name=sellFeeRate]").val()) < 0 || Number($("#goodsDetailForm input[name=sellFeeRate]").val()) > 100) {
|
|
|
|
|
- mcxDialog.alertC("판매수수료를 올바르게 입력해주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=sellFeeRate]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //신규가입기간
|
|
|
|
|
- if ("Y" == $("#goodsDetailForm input[name=newCustOrdYn]:checked").val()){
|
|
|
|
|
- if(isNaN(Date.parse($("#goodsDetailForm input[name=newCustOrdStdt]").val()))){
|
|
|
|
|
- mcxDialog.alertC('날짜형식이 아닙니다.', {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=newCustOrdStdt]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if(isNaN(Date.parse($("#goodsDetailForm input[name=newCustOrdEddt]").val()))){
|
|
|
|
|
- mcxDialog.alertC('날짜형식이 아닙니다.', {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=newCustOrdEddt]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- var fromDate = $('#goodsDetailForm input[name=newCustOrdStdt]').val();
|
|
|
|
|
- var toDate = $('#goodsDetailForm input[name=newCustOrdEddt]').val();
|
|
|
|
|
-
|
|
|
|
|
- if (fromDate > toDate) {
|
|
|
|
|
- mcxDialog.alertC("신규가입일의 시작일자는 종료일자 보다 클 수 없습니다.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $('#goodsDetailForm input[name=newCustOrdStdt]').focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- }else{
|
|
|
|
|
- $('#goodsDetailForm input[name=newCustOrdStdt]').val('');
|
|
|
|
|
- $('#goodsDetailForm input[name=newCustOrdEddt]').val('');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 출고처
|
|
|
|
|
- if(gagajf.isNull($("#goodsDetailForm select[name=delvLocCd]").val())){
|
|
|
|
|
- mcxDialog.alertC("출고처를 선택해 주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm select[name=delvLocCd]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 배송비구분
|
|
|
|
|
- if(gagajf.isNull($("#goodsDetailForm select[name=delvFeeCd]").val())){
|
|
|
|
|
- mcxDialog.alertC("배송비정책을 선택해 주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm select[name=delvFeeCd]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 포인트
|
|
|
|
|
- if ( gagajf.isNull($("#goodsDetailForm input[name=pntPrate]").val())) {
|
|
|
|
|
- mcxDialog.alertC("PC 포인트를 입력해 주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=pntPrate]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- if(Number($("#goodsDetailForm input[name=pntPrate]").val()) < 0 || Number($("#goodsDetailForm input[name=pntPrate]").val()) > 100) {
|
|
|
|
|
- mcxDialog.alertC("PC 포인트를 올바르게 입력해주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=pntPrate]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- if ( gagajf.isNull($("#goodsDetailForm input[name=pntMrate]").val())) {
|
|
|
|
|
- mcxDialog.alertC("MOBILE 포인트를 입력해 주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=pntMrate]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- if(Number($("#goodsDetailForm input[name=pntMrate]").val()) < 0 || Number($("#goodsDetailForm input[name=pntMrate]").val()) > 100) {
|
|
|
|
|
- mcxDialog.alertC("MOBILE 포인트를 올바르게 입력해주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=pntMrate]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 주문수량
|
|
|
|
|
- if ( gagajf.isNull($("#goodsDetailForm input[name=minOrdQty]").val())) {
|
|
|
|
|
- mcxDialog.alertC("최소주문 수량을 입력해 주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=minOrdQty]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- if (Number($("#goodsDetailForm input[name=minOrdQty]").val()) <= 0) {
|
|
|
|
|
- mcxDialog.alertC("최소주문 수량을 입력해 주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=minOrdQty]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- if ( gagajf.isNull($("#goodsDetailForm input[name=maxOrdQty]").val())) {
|
|
|
|
|
- mcxDialog.alertC("최대주문 수량을 입력해 주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=maxOrdQty]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- if (Number($("#goodsDetailForm input[name=maxOrdQty]").val()) <= 0) {
|
|
|
|
|
- mcxDialog.alertC("최대주문 수량을 입력해 주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=maxOrdQty]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- if ( gagajf.isNull($("#goodsDetailForm input[name=dayMaxOrdQty]").val())) {
|
|
|
|
|
- mcxDialog.alertC("ID당1일최대구매 수량을 입력해 주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=dayMaxOrdQty]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- if (Number($("#goodsDetailForm input[name=dayMaxOrdQty]").val()) <= 0) {
|
|
|
|
|
- mcxDialog.alertC("ID당1일최대구매 수량을 입력해 주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=dayMaxOrdQty]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if(Number($("#goodsDetailForm input[name=minOrdQty]").val()) > Number($("#goodsDetailForm input[name=maxOrdQty]").val())){
|
|
|
|
|
- mcxDialog.alertC("최소주문수량은 최대주문수량보다 클 수 없습니다.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=minOrdQty]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if(Number($("#goodsDetailForm input[name=maxOrdQty]").val()) > Number($("#goodsDetailForm input[name=dayMaxOrdQty]").val())){
|
|
|
|
|
- mcxDialog.alertC("최대주문수량이 ID당1일최대구매수량보다 클 수 없습니다.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=maxOrdQty]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //판매기간
|
|
|
|
|
- if(isNaN(Date.parse($("#goodsDetailForm input[name=sellStYMD]").val()))){
|
|
|
|
|
- mcxDialog.alertC('날짜형식이 아닙니다.', {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=sellStYMD]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if(isNaN(Date.parse($("#goodsDetailForm input[name=sellEdYMD]").val()))){
|
|
|
|
|
- mcxDialog.alertC('날짜형식이 아닙니다.', {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=sellEdYMD]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- var fromDate = $("#goodsDetailForm input[name=sellStYMD]").val().replaceAll('-', '')+ $("#goodsDetailForm select[name=sellStHH]").val();
|
|
|
|
|
- var toDate = $("#goodsDetailForm input[name=sellEdYMD]").val().replaceAll('-', '')+ $("#goodsDetailForm select[name=sellEdHH]").val();
|
|
|
|
|
-
|
|
|
|
|
- if (fromDate > toDate) {
|
|
|
|
|
- mcxDialog.alertC("판매기간의 시작일시는 종료일시 보다 클 수 없습니다.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $('#goodsDetailForm input[name=sellStYMD]').focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- idx = 0;
|
|
|
|
|
-
|
|
|
|
|
- //재고 옵션 관련 확인
|
|
|
|
|
- $("#goodsDetailForm input[name=chStockDataYn]").val('N');
|
|
|
|
|
-
|
|
|
|
|
- $("#optionList tr").each(function() {
|
|
|
|
|
- var optCd1 = $(this).find("input[name=optCd1]").val();
|
|
|
|
|
- var optCd2 = $(this).find("input[name=optCd2]").val();
|
|
|
|
|
- //var hidOptCd1 = $(this).find("input[name=hidOptCd1]").val();
|
|
|
|
|
- //var hidOptCd2 = $(this).find("input[name=hidOptCd2]").val();
|
|
|
|
|
- var baseStockQty = $(this).find("input[name=baseStockQty]").val();
|
|
|
|
|
- var hidBaseStockQty = $(this).find("input[name=hidBaseStockQty]").val();
|
|
|
|
|
- var dispOrd = $(this).find("input[name=dispOrd]").val();
|
|
|
|
|
- var hidDispOrd = $(this).find("input[name=hidDispOrd]").val();
|
|
|
|
|
- var dispYn = $(this).find("select[name=dispYn]").val();
|
|
|
|
|
- var hidDispYn = $(this).find("input[name=hidDispYn]").val();
|
|
|
|
|
- var soldoutYn = $(this).find("select[name=soldoutYn]").val();
|
|
|
|
|
- var hidSoldoutYn = $(this).find("input[name=hidSoldoutYn]").val();
|
|
|
|
|
- var addPrice = $(this).find("input[name=addPrice]").val();
|
|
|
|
|
- var hidAddPrice = $(this).find("input[name=hidAddPrice]").val();
|
|
|
|
|
-
|
|
|
|
|
- var editCurrStockQty = $(this).find("input[name=editCurrStockQty]").val(); // 입점 확인용
|
|
|
|
|
- var currStockQty = $(this).find("input[name=currStockQty]").val(); // 입점 확인용 (hidden)
|
|
|
|
|
-
|
|
|
|
|
- if(gagajf.isNull(dispOrd)){
|
|
|
|
|
- optCheck = true;
|
|
|
|
|
- mcxDialog.alertC("우선순위를 입력해주세요", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#optionList tr").find("input[name=dispOrd]").eq(idx).focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //ERP재고연동여부가 'Y'일 경우 수정여부 확인 20210824수정
|
|
|
|
|
- if ( $('#goodsDetailForm input[name=erpStockLinkYn]:checked').val() == "Y"){
|
|
|
|
|
- if (Number(editCurrStockQty) != Number(currStockQty) ){
|
|
|
|
|
- optCheck = true;
|
|
|
|
|
- mcxDialog.alertC("WMS가용재고가 변경되었습니다.<br/>확인해주세요", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#optionList tr").find("input[name=erpStockLinkYn]").eq(idx).focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 입점만 체크
|
|
|
|
|
- if ("N" == $('#goodsDetailForm input[name=selfGoodsYn]').val()){
|
|
|
|
|
-
|
|
|
|
|
- if(gagajf.isNull(editCurrStockQty)){
|
|
|
|
|
- optCheck = true;
|
|
|
|
|
- mcxDialog.alertC("가용재고를 입력해주세요", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#optionList tr").find("input[name=editCurrStockQty]").eq(idx).focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if(gagajf.isNull(addPrice)){
|
|
|
|
|
- optCheck = true;
|
|
|
|
|
- mcxDialog.alertC("추가가격을 입력해주세요", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#optionList tr").find("input[name=addPrice]").eq(idx).focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if(gagajf.isNull(dispOrd)){
|
|
|
|
|
- optCheck = true;
|
|
|
|
|
- mcxDialog.alertC("노출순서를 입력해주세요", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#optionList tr").find("input[name=dispOrd]").eq(idx).focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if(gagajf.isNull(baseStockQty)){
|
|
|
|
|
- optCheck = true;
|
|
|
|
|
- mcxDialog.alertC("안전재고를 입력해주세요", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#optionList tr").find("input[name=baseStockQty]").eq(idx).focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (editCurrStockQty != currStockQty){
|
|
|
|
|
- $("#goodsDetailForm input[name=chStockDataYn]").val('Y');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (baseStockQty != hidBaseStockQty){
|
|
|
|
|
- $("#goodsDetailForm input[name=chStockDataYn]").val('Y');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (dispOrd != hidDispOrd){
|
|
|
|
|
- $("#goodsDetailForm input[name=chStockDataYn]").val('Y');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (dispYn != hidDispYn){
|
|
|
|
|
- $("#goodsDetailForm input[name=chStockDataYn]").val('Y');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (soldoutYn != hidSoldoutYn){
|
|
|
|
|
- $("#goodsDetailForm input[name=chStockDataYn]").val('Y');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (addPrice != hidAddPrice){
|
|
|
|
|
- $("#goodsDetailForm input[name=chStockDataYn]").val('Y');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- idx++;
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- if(optCheck) {
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //안전인증관련
|
|
|
|
|
- if (!fnGoodsSafetyCertNumCheck()) return false;
|
|
|
|
|
-
|
|
|
|
|
- //인증번호 있는데 인증작업 했는지 여부 확인
|
|
|
|
|
- /* if (!gagajf.isNull($("#goodsDetailForm input[name=certNum]").val())){
|
|
|
|
|
-
|
|
|
|
|
- if ("G084_4" == $("#goodsDetailForm select[name=certFormGb]").val() ||
|
|
|
|
|
- "G084_5" == $("#goodsDetailForm select[name=certFormGb]").val() ||
|
|
|
|
|
- "G081_3" == $("#goodsDetailForm select[name=certType]").val()) {
|
|
|
|
|
-
|
|
|
|
|
- }else{
|
|
|
|
|
- if (gagajf.isNull($('#goodsDetailForm').find('#certStateTxt').text())){
|
|
|
|
|
- mcxDialog.alert("안전인증작업을 하거나 인증번호를 확인해주세요.");
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- } */
|
|
|
|
|
-
|
|
|
|
|
- /* if (!gagajf.isNull($("#goodsDetailForm input[name=certNum]").val()) && ($("#goodsDetailForm input[name=certNum]").val() != $("#goodsDetailForm input[name=certNumOrg]").val())){
|
|
|
|
|
- mcxDialog.alert("안전인증작업을 하거나 인증번호를 확인해주세요.");
|
|
|
|
|
- return false;
|
|
|
|
|
- } */
|
|
|
|
|
-
|
|
|
|
|
- var basicColor = $("#goodsDetailForm input[name=basicColor]:checked").val();
|
|
|
|
|
- var dcRate = 0;
|
|
|
|
|
- var listPrice = $("#goodsDetailForm input[name=listPrice]").val().removeComma();
|
|
|
|
|
- var currPrice = $("#goodsDetailForm input[name=currPrice]").val().removeComma();
|
|
|
|
|
- if (listPrice > 0){
|
|
|
|
|
- dcRate = 100 - Math.floor(Number(currPrice) / Number(listPrice) * 100); //절사
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (dcRate < 0 && ($("#goodsDetailForm input[name=goodsType]").val() != "G056_D")){
|
|
|
|
|
- mcxDialog.alertC('할인율이 0보다 작습니다.\n판매가를 확인해주세요.', {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=currPrice]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- /* }else if (dcRate >= 90 && ($("#goodsDetailForm input[name=goodsType]").val() != "G056_D")){
|
|
|
|
|
- mcxDialog.confirmC("할인율이 90%이상입니다. 계속하시겠습니까?", {
|
|
|
|
|
- btn: ["아니요","예"],
|
|
|
|
|
- btnClick: function(index){
|
|
|
|
|
- if (index == 1){
|
|
|
|
|
- optCheck = true;
|
|
|
|
|
- } else {
|
|
|
|
|
- if (!fnGoodsComposeCheck()) return false;
|
|
|
|
|
- fnSaveCheck();
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- */
|
|
|
|
|
- }else{
|
|
|
|
|
- $("#goodsDetailForm").find("#dcRateTxt").html(dcRate);
|
|
|
|
|
- $("#goodsDetailForm input[name=dcRate]").val(dcRate);
|
|
|
|
|
- if (!fnGoodsComposeCheck()) return false;
|
|
|
|
|
- fnSaveCheck();
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (optCheck) return false;
|
|
|
|
|
-
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- //저장 관련 체크
|
|
|
|
|
- var fnSaveCheck = function(idx){
|
|
|
|
|
- if($("#goodsDetailForm input:checkbox[name=chkDescKeep]").is(':checked')){
|
|
|
|
|
- mcxDialog.confirmC("상품상세정보 탭의 정보를 수정하는 경우는 정보유지 체크박스를 체크해제 하신후 저장버튼을 눌러주세요<br>(정보유지에 체크가 되어 있으면 변경사항이 반영되지 않습니다)<br>나머지 다른 탭은 저장버튼 클릭시 변경한 사항이 이상없이 반영됩니다. 계속하시겠습니까?", {
|
|
|
|
|
- btn: ["아니요","예"],
|
|
|
|
|
- btnClick: function(index){
|
|
|
|
|
- if (index == 1){
|
|
|
|
|
- optCheck = true;
|
|
|
|
|
- } else {
|
|
|
|
|
- fnGoodsSave();
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }else{
|
|
|
|
|
- fnGoodsSave();
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 구성 정보 관련 체크
|
|
|
|
|
- var fnGoodsComposeCheck = function(){
|
|
|
|
|
- if ($("#goodsDetailForm input[name=goodsType]").val() == "G056_N"){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- var allData = gagaAgGrid.getAllRowData(gridGoodsComposeOptions);
|
|
|
|
|
- var comSupplyCompCd = '';
|
|
|
|
|
- var comSelfGoodsYn = '';
|
|
|
|
|
- var index = 0;
|
|
|
|
|
- //기준여부 Y 존재하는지 확인
|
|
|
|
|
- var checkBaseYn = false;
|
|
|
|
|
- //대표여부 Y 존재하는지 확인
|
|
|
|
|
- var checkRepYn = false;
|
|
|
|
|
- optCheck = false;
|
|
|
|
|
- $.each(allData, function(index, item) {
|
|
|
|
|
- if (index == 0){
|
|
|
|
|
- comSelfGoodsYn = item.selfGoodsYn;
|
|
|
|
|
- comSupplyCompCd = item.supplyCompCd;
|
|
|
|
|
- $("#goodsDetailForm input[name=repGoodsCd]").val(item.repGoodsCd); // 대표상품
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (item.baseYn == "Y"){
|
|
|
|
|
- checkBaseYn = true;
|
|
|
|
|
- }
|
|
|
|
|
- if (item.repYn == "Y"){
|
|
|
|
|
- checkRepYn = true;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (comSelfGoodsYn != item.selfGoodsYn && "G056_S" == $("#goodsDetailForm input[name=goodsType]").val()){
|
|
|
|
|
- optCheck = true;
|
|
|
|
|
- mcxDialog.alertC("구성상품중 자사/입점상품 구분값이 다릅니다.<br/>확인해 주세요", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- gridGoodsComposeOptions.api.setFocusedCell(index, "goodsCd", null);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- /*
|
|
|
|
|
- }else{
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- if (comSelfGoodsYn == "N" && (comSupplyCompCd != item.supplyCompCd)){
|
|
|
|
|
- optCheck = true;
|
|
|
|
|
- mcxDialog.alertC("구성상품중 입점은 같은 업체 상품만 가능합니다.<br/>확인해 주세요", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- gridGoodsComposeOptions.api.setFocusedCell(index, "goodsCd", null);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- */
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 세트 가격 체크
|
|
|
|
|
- if ($("#goodsDetailForm input[name=goodsType]").val() == "G056_S"){
|
|
|
|
|
- if (item.compsCurrPrice <= 0){
|
|
|
|
|
- optCheck = true;
|
|
|
|
|
- mcxDialog.alertC("구성상품 판매가를 확인해 주세요", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- gridGoodsComposeOptions.api.setFocusedCell(index, "compsCurrPrice", null);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- index++;
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- if(optCheck) {
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (!checkBaseYn){
|
|
|
|
|
- mcxDialog.alert('구성상품중 기준여부를 선택해 주세요.');
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (!checkRepYn && $("#goodsDetailForm input[name=goodsType]").val() == "G056_D"){
|
|
|
|
|
- mcxDialog.alert('구성상품중 대표여부를 선택해 주세요.');
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //저장처리
|
|
|
|
|
- var fnGoodsSave = function(){
|
|
|
|
|
- mcxDialog.confirm('저장하시겠습니까?', {
|
|
|
|
|
- cancelBtnText: "취소",
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function(){
|
|
|
|
|
-
|
|
|
|
|
- fnGoodsDeailNotiSave();
|
|
|
|
|
-
|
|
|
|
|
- if (fnChangeCheck()){
|
|
|
|
|
- $("#goodsDetailForm input[name=chDataYn]").val('Y');
|
|
|
|
|
- }else{
|
|
|
|
|
- $("#goodsDetailForm input[name=chDataYn]").val('N');
|
|
|
|
|
- }
|
|
|
|
|
- $("#goodsDetailForm input[name=mainColorCd]").val($("#goodsDetailForm input[name=basicColor]:checked").val());
|
|
|
|
|
-
|
|
|
|
|
- //구성상품
|
|
|
|
|
- var allData = gagaAgGrid.getAllRowData(gridGoodsComposeOptions);
|
|
|
|
|
- var jsonData = JSON.stringify(allData);
|
|
|
|
|
- $('#goodsDetailForm input[name=goodsComposeList]').val(jsonData);
|
|
|
|
|
-
|
|
|
|
|
- // 2021.12.22 sshong 상품등록시 "를 "로 '를 '로 변환 되어 저장시 화면에 그대로 노출 되어 제거합니다.
|
|
|
|
|
- //$('#goodsDetailForm input[name=goodsNm]').val($('#goodsDetailForm input[name=goodsNm]').val().trim().replace(/\n|\r/g, "<br/>").replace(/\"/gi, """).replace(/\'/gi, "'"));
|
|
|
|
|
- //$('#goodsDetailForm input[name=goodsTnm]').val($('#goodsDetailForm input[name=goodsTnm]').val().trim().replace(/\n|\r/g, "<br/>").replace(/\"/gi, """).replace(/\'/gi, "'"));
|
|
|
|
|
- //$('#goodsDetailForm input[name=goodsSnm1]').val($('#goodsDetailForm input[name=goodsSnm1]').val().trim().replace(/\n|\r/g, "<br/>").replace(/\"/gi, """).replace(/\'/gi, "'"));
|
|
|
|
|
-
|
|
|
|
|
- $('#goodsDetailForm input[name=goodsNm]').val($('#goodsDetailForm input[name=goodsNm]').val().trim().replace(/\n|\r/g, "<br/>"));
|
|
|
|
|
- $('#goodsDetailForm input[name=goodsTnm]').val($('#goodsDetailForm input[name=goodsTnm]').val().trim().replace(/\n|\r/g, "<br/>"));
|
|
|
|
|
- $('#goodsDetailForm input[name=goodsSnm1]').val($('#goodsDetailForm input[name=goodsSnm1]').val().trim().replace(/\n|\r/g, "<br/>"));
|
|
|
|
|
-
|
|
|
|
|
- gagajf.ajaxFormSubmit("/goods/detail/save", "#goodsDetailForm", fnGoodsSaveCallBack);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //미리보기 클릭 시
|
|
|
|
|
- $('#btnGoodsDetailPreview').click(function(e) {
|
|
|
|
|
- cfnOpenFrontGoodsPopup($('#goodsDetailForm input[name=goodsCd]').val(), $('#goodsDetailForm input[name=siteCd]').val());
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- //이미지 클릭 시
|
|
|
|
|
- $('#btnGoodsDetailImg').click(function(e) {
|
|
|
|
|
- cfnOpenGoodsImagePopup($('#goodsDetailForm input[name=goodsCd]').val());
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- //창종료
|
|
|
|
|
- var fnGoodsDetailClose = function(){
|
|
|
|
|
- uifnPopupClose('popupGoodsDetail');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //저장후 callback
|
|
|
|
|
- var fnGoodsSaveCallBack = function(){
|
|
|
|
|
- var goodsCd = $('#goodsDetailForm input[name=goodsCd]').val();
|
|
|
|
|
- fnGoodsDetailClose();
|
|
|
|
|
- cfnOpenGoodsDetailPopup('U', goodsCd);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //고시정보 저장을 위한 데이터 처리
|
|
|
|
|
- var fnGoodsDeailNotiSave = function(){
|
|
|
|
|
-
|
|
|
|
|
- var goodsCd = $('#goodsDetailForm input[name=goodsCd]').val();
|
|
|
|
|
- var goodsInfoList = [];
|
|
|
|
|
-
|
|
|
|
|
- var index = 0;
|
|
|
|
|
- $("#goodsDetailForm").find("#infoContents tr").each(function() {
|
|
|
|
|
- if (index > 0){
|
|
|
|
|
- var goodsInfo = {goodsCd: goodsCd
|
|
|
|
|
- , niClsfCd : $('#goodsDetailForm input[name=niClsfCd]').val()
|
|
|
|
|
- , niItemCd : $(this).find("input[name=niItemCd]").val()
|
|
|
|
|
- , niContent : $(this).find("input[name=niContent]").val()
|
|
|
|
|
- , dispOrd : $(this).find("input[name=dispOrd]").val()
|
|
|
|
|
- };
|
|
|
|
|
- goodsInfoList.push(goodsInfo);
|
|
|
|
|
- }
|
|
|
|
|
- index++;
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- $("#goodsDetailForm input[name=notiList]").val(JSON.stringify(goodsInfoList));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //상품기본정보 변경여부 확인
|
|
|
|
|
- var fnChangeCheck = function(){
|
|
|
|
|
-
|
|
|
|
|
- //상품타이틀
|
|
|
|
|
- if ($("#goodsDetailForm input[name=goodsTnmOrg]").val() != $("#goodsDetailForm input[name=goodsTnm]").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- //사용자검색어
|
|
|
|
|
- if ($("#goodsDetailForm input[name=goodsSnm1Org]").val() != $("#goodsDetailForm input[name=goodsSnm1]").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- //상품명
|
|
|
|
|
- if ($("#goodsDetailForm input[name=goodsNmOrg]").val() != $("#goodsDetailForm input[name=goodsNm]").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- //상품정상이월구분
|
|
|
|
|
- if ($("#goodsDetailForm input[name=formalGbOrg]").val() != $("input:radio[name=formalGb]:checked").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- //상품구분
|
|
|
|
|
- if ($("#goodsDetailForm input[name=goodsGbOrg]").val() != $("#goodsDetailForm select[name=goodsGb]").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- //상품상태
|
|
|
|
|
- if ($("#goodsDetailForm input[name=goodsStatOrg]").val() != $("#goodsDetailForm select[name=goodsStat]").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- //시즌
|
|
|
|
|
- if ($("#goodsDetailForm input[name=seasonCdOrg]").val() != $("#goodsDetailForm select[name=seasonCd]").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- //성별
|
|
|
|
|
- if ($("#goodsDetailForm input[name=sexGbOrg]").val() != $("#goodsDetailForm select[name=sexGb]").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- //정상가
|
|
|
|
|
- if ($("#goodsDetailForm input[name=listPriceOrg]").val() != $("#goodsDetailForm input[name=listPrice]").val().removeComma()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- //판매가
|
|
|
|
|
- if ($("#goodsDetailForm input[name=currPriceOrg]").val() != $("#goodsDetailForm input[name=currPrice]").val().removeComma()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- //원가
|
|
|
|
|
- if ($("#goodsDetailForm input[name=costPriceOrg]").val() != $("#goodsDetailForm input[name=costPrice]").val().removeComma()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //자사 일반상품만
|
|
|
|
|
- if($("#goodsDetailForm input[name=selfGoodsYn]").val() == 'Y' && $("#goodsDetailForm input[name=goodType]").val() == 'G056_N'){
|
|
|
|
|
- //ERP재고연동여부
|
|
|
|
|
- if ($("#goodsDetailForm input[name=erpStockLinkYnOrg]").val() != $("#goodsDetailForm input[name=erpStockLinkYn]:checked").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //자사몰 노출여부
|
|
|
|
|
- if ($("#goodsDetailForm input[name=selfMallYnOrg]").val() != $("input[name=selfMallYn]:checked").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- //선물주문여부
|
|
|
|
|
- if ($("#goodsDetailForm input[name=giftPackYnOrg]").val() != $("input[name=giftPackYn]:checked").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- //PC포인트
|
|
|
|
|
- if ($("#goodsDetailForm input[name=pntPrateOrg]").val() != $("#goodsDetailForm input[name=pntPrate]").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- //PC 선포인트 사용여부
|
|
|
|
|
- if ($("#goodsDetailForm input[name=prePpntUsableYnOrg]").val() != $("input[name=prePpntUsableYn]:checked").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- //MOBILE포인트
|
|
|
|
|
- if ($("#goodsDetailForm input[name=pntMrateOrg]").val() != $("#goodsDetailForm input[name=pntMrate]").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- //MOBILE 선포인트 사용여부
|
|
|
|
|
- if ($("#goodsDetailForm input[name=preMpntUsableYnOrg]").val() != $("input[name=preMpntUsableYn]:checked").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- //최소주문수량
|
|
|
|
|
- if ($("#goodsDetailForm input[name=minOrdQtyOrg]").val() != $("#goodsDetailForm input[name=minOrdQty]").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- //최대주문수량
|
|
|
|
|
- if ($("#goodsDetailForm input[name=maxOrdQtyOrg]").val() != $("#goodsDetailForm input[name=maxOrdQty]").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- //ID당1일최대구매수량
|
|
|
|
|
- if ($("#goodsDetailForm input[name=dayMaxOrdQtyOrg]").val() != $("#goodsDetailForm input[name=dayMaxOrdQty]").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- //유통구분
|
|
|
|
|
- if ($("#goodsDetailForm input[name=distributionGbOrg]").val() != $("#goodsDetailForm select[name=distributionGb]").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- //상품연령대
|
|
|
|
|
- if ($("#goodsDetailForm input[name=ageGrpCdOrg]").val() != $("#goodsDetailForm select[name=ageGrpCd]").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- // 판매수수료율
|
|
|
|
|
- if ($("#goodsDetailForm input[name=sellFeeRateOrg]").val() != $("#goodsDetailForm input[name=sellFeeRate]").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- // 메인 색상코드
|
|
|
|
|
- if ($("#goodsDetailForm input[name=mainColorCd]").val() != $("#goodsDetailForm input[name=basicColor]:checked").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- // 반품가능여부
|
|
|
|
|
- if ($("#goodsDetailForm input[name=returnableYnOrg]").val() != $("input[name=returnableYn]:checked").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- // 배송비정책
|
|
|
|
|
- if ($("#goodsDetailForm input[name=delvFeeCdOrg]").val() != $("#goodsDetailForm select[name=delvFeeCd]").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- // 출고처
|
|
|
|
|
- if ($("#goodsDetailForm input[name=delvLocCdOrg]").val() != $("#goodsDetailForm select[name=delvLocCd]").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- // 교환가능여부
|
|
|
|
|
- if ($("#goodsDetailForm input[name=changeableYnOrg]").val() != $("#goodsDetailForm input[name=changeableYn]:checked").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- // 신규가입구매가능여부
|
|
|
|
|
- if ($("#goodsDetailForm input[name=newCustOrdYnOrg]").val() != $("#goodsDetailForm input[name=newCustOrdYn]:checked").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- // 신규가입기간 시작일
|
|
|
|
|
- if ($("#goodsDetailForm input[name=newCustOrdStdt]").val() != $("#goodsDetailForm input[name=newCustOrdStdtOrg]").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- // 신규가입기간 종료일
|
|
|
|
|
- if ($("#goodsDetailForm input[name=newCustOrdEddt]").val() != $("#goodsDetailForm input[name=newCustOrdEddtOrg]").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 성인용품여부
|
|
|
|
|
- if ($("#goodsDetailForm input[name=adultYnOrg]").val() != $("#goodsDetailForm input[name=adultYn]:checked").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- // 해외구매대행여부
|
|
|
|
|
- if ($("#goodsDetailForm input[name=foreignBuyYnOrg]").val() != $("#goodsDetailForm input[name=foreignBuyYn]:checked").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- // 병행수입여부
|
|
|
|
|
- if ($("#goodsDetailForm input[name=parallelImportYnOrg]").val() != $("#goodsDetailForm input[name=parallelImportYn]:checked").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- // 주문제작여부
|
|
|
|
|
- if ($("#goodsDetailForm input[name=orderMadeYnOrg]").val() != $("#goodsDetailForm input[name=orderMadeYn]:checked").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- // 판매기간 시작일
|
|
|
|
|
- if ($("#goodsDetailForm input[name=sellStdt]").val().toDate("YYYYMMDDHHmmss").format("YYYYMMDDHH") !=
|
|
|
|
|
- ($("#goodsDetailForm input[name=sellStYMD]").val().replaceAll('-', '')+ $("#goodsDetailForm select[name=sellStHH]").val())){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- // 판매기간 종료일
|
|
|
|
|
- if ($("#goodsDetailForm input[name=sellEddt]").val().toDate("YYYYMMDDHHmmss").format("YYYYMMDDHH") !=
|
|
|
|
|
- ($("#goodsDetailForm input[name=sellEdYMD]").val().replaceAll('-', '')+ $("#goodsDetailForm select[name=sellEdHH]").val())){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- // 상품상세신규폼사용여부
|
|
|
|
|
- if ($("#goodsDetailForm input[name=tobeFormYnOrg]").val() != $("#goodsDetailForm input[name=tobeFormYn]:checked").val()){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 상품 고시 선택 버튼 클릭 시
|
|
|
|
|
- $('#btnNotinfo').click(function(e) {
|
|
|
|
|
-
|
|
|
|
|
- if(gagajf.isNull($("#goodsDetailForm select[name=selNiClsfCd]").val())) {
|
|
|
|
|
- mcxDialog.alertC("상품정보제공 고시를 선택해주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm select[name=selNiClsfCd]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- var params = new Object();
|
|
|
|
|
- params.supplyCompCd = $("#goodsDetailForm input[name=supplyCompCd]").val();
|
|
|
|
|
- params.niClsfCd = $("#goodsDetailForm select[name=selNiClsfCd]").val();
|
|
|
|
|
- params.goodsCd = $("#goodsDetailForm input[name=goodsCd]").val();
|
|
|
|
|
- cfnAjaxSubmit("/goods/noti/goodsInfo/list", "json", fnGoodsDetailNotiInfoSearchCallback, params);
|
|
|
|
|
-
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- // 품목변경
|
|
|
|
|
- $("#btnGoodsItemkindChange").on("click", function(){
|
|
|
|
|
-
|
|
|
|
|
- if($("#goodsDetailForm select[name=itemkindCd]").val() == $("#goodsDetailForm input[name=orgItemkindCd]").val()){
|
|
|
|
|
- mcxDialog.alert("품목코드가 변경되지 않았습니다.");
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- mcxDialog.confirm('품목변경 하시겠습니까?', {
|
|
|
|
|
- cancelBtnText: "취소",
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function(){
|
|
|
|
|
- var data = [{ goodsCd : $('#goodsDetailForm input[name=goodsCd]').val()
|
|
|
|
|
- , itemkindCd : $("#goodsDetailForm select[name=itemkindCd]").val()
|
|
|
|
|
- , supplyCompCd : $("#goodsDetailForm input[name=supplyCompCd]").val()
|
|
|
|
|
- }];
|
|
|
|
|
- var jsonData = JSON.stringify(data);
|
|
|
|
|
- gagajf.ajaxJsonSubmit('/goods/itemKind/change/save', jsonData, fnGoodsDeailSearch);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- //배송비정책변경시
|
|
|
|
|
- $('#goodsDetailForm select[name=delvFeeCd]').on('change', function() {
|
|
|
|
|
- var delvFeeCd = $("#goodsDetailForm select[name=delvFeeCd]").val();
|
|
|
|
|
-
|
|
|
|
|
- if (gagajf.isNull(delvFeeCd)){
|
|
|
|
|
- $("#goodsDetailForm input[name=delvFee]").val('');
|
|
|
|
|
- $("#goodsDetailForm input[name=minOrdAmt]").val('');
|
|
|
|
|
- }else{
|
|
|
|
|
-
|
|
|
|
|
- var obj = $('#goodsDetailForm select[name=delvFeeCd] option:selected');
|
|
|
|
|
- $("#goodsDetailForm input[name=delvFee]").val(obj.attr("delvFee").addComma());
|
|
|
|
|
- $("#goodsDetailForm input[name=minOrdAmt]").val(obj.attr("minOrdAmt").addComma());
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- //품목코드변경시
|
|
|
|
|
- $('#goodsDetailForm select[name=itemkindCd]').on('change', function() {
|
|
|
|
|
- var itemkindCd = $("#goodsDetailForm select[name=itemkindCd]").val();
|
|
|
|
|
- var params = new Object();
|
|
|
|
|
- params.itemkindCd = itemkindCd;
|
|
|
|
|
- cfnAjaxSubmit("/goods/itemkind/list", "json", fnItemkindCallback, params);
|
|
|
|
|
-
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- var fnItemkindCallback = function(result){
|
|
|
|
|
- if (result == null) return;
|
|
|
|
|
- $("#goodsDetailForm input[name=niClsfCd]").val(result[0].niClsfCd)
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //신규가입구매가능여부 변경시
|
|
|
|
|
- $('#goodsDetailForm input[name=newCustOrdYn]').on('change', function() {
|
|
|
|
|
- var newCustOrdYn = $("#goodsDetailForm input[name=newCustOrdYn]:checked").val();
|
|
|
|
|
- if ("N" == newCustOrdYn){
|
|
|
|
|
- $("#goodsDetailForm input[name=newCustOrdStdt]").val('');
|
|
|
|
|
- $("#goodsDetailForm input[name=newCustOrdEddt]").val('');
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- // 안전인증
|
|
|
|
|
- $("#btnGoodsSafetyCertNum").on("click", function(){
|
|
|
|
|
-
|
|
|
|
|
- if (gagajf.isNull($("#goodsDetailForm input[name=selCertTargetGb]:checked").val())){
|
|
|
|
|
- mcxDialog.alert("안전인증대상를 선택해 주세요.");
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (!fnGoodsSafetyCertNumCheck()) return false;
|
|
|
|
|
-
|
|
|
|
|
- mcxDialog.confirm('안전인증정보(API)를 변경 하시겠습니까?', {
|
|
|
|
|
- cancelBtnText: "취소",
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function(){
|
|
|
|
|
- var data = { goodsCd : $('#goodsDetailForm input[name=goodsCd]').val()
|
|
|
|
|
- , certTargetGb : $("#goodsDetailForm input[name=selCertTargetGb]:checked").val()
|
|
|
|
|
- , certFormGb : $("#goodsDetailForm select[name=certFormGb]").val()
|
|
|
|
|
- , certType : $("#goodsDetailForm select[name=certType]").val()
|
|
|
|
|
- , certNum : $("#goodsDetailForm input[name=certNum]").val()
|
|
|
|
|
- };
|
|
|
|
|
- var jsonData = JSON.stringify(data);
|
|
|
|
|
- gagajf.ajaxJsonSubmit('/goods/detail/certNum/save', jsonData, fnGoodsDetailSafeNoSearch);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- var fnGoodsSafetyCertNumCheck = function(){
|
|
|
|
|
-
|
|
|
|
|
- if (gagajf.isNull($("#goodsDetailForm input[name=selCertTargetGb]:checked").val())){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- $("#goodsDetailForm input[name=certTargetGb]").val($("#goodsDetailForm input[name=selCertTargetGb]:checked").val());
|
|
|
|
|
-
|
|
|
|
|
- if ((!gagajf.isNull($("#goodsDetailForm input[name=selCertTargetGb]:checked").val()) && "G083_1" != $("#goodsDetailForm input[name=selCertTargetGb]:checked").val())){
|
|
|
|
|
-
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if(gagajf.isNull($("#goodsDetailForm select[name=certFormGb]").val())){
|
|
|
|
|
- mcxDialog.alertC("안전인증형태를 선택해 주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm select[name=certFormGb]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if(gagajf.isNull($("#goodsDetailForm select[name=certType]").val())){
|
|
|
|
|
- mcxDialog.alertC("안전인증타입를 선택해 주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm select[name=certType]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //인증타입이 공급자적합성일 경우 인증번호 미입력
|
|
|
|
|
- if( "G081_1" == $("#goodsDetailForm select[name=certType]").val() || "G081_2" == $("#goodsDetailForm select[name=certType]").val()){
|
|
|
|
|
- if(gagajf.isNull($("#goodsDetailForm input[name=certNum]").val())){
|
|
|
|
|
- mcxDialog.alertC("안전인증번호를 입력해 주세요.", {
|
|
|
|
|
- sureBtnText: "확인",
|
|
|
|
|
- sureBtnClick: function() {
|
|
|
|
|
- $("#goodsDetailForm input[name=certNum]").focus();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- $("#goodsDetailForm input[name=certTargetGb]").val($("#goodsDetailForm input[name=selCertTargetGb]:checked").val());
|
|
|
|
|
-
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 상품구매등급
|
|
|
|
|
- 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;");
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 구성상품 조회 팝업
|
|
|
|
|
- var fnOpenGoodsDetailPopup = function() {
|
|
|
|
|
- cfnOpenGoodsPopup('fnGoodsDetailGoodsDeal');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 구성상품 조회 팝업 - 상품추가
|
|
|
|
|
- var fnGoodsDetailGoodsDeal = function(goodsData) {
|
|
|
|
|
- if (goodsData.length < 1) return;
|
|
|
|
|
-
|
|
|
|
|
- // 기존상품
|
|
|
|
|
- var oldGoodsDealList = gagaAgGrid.getAllRowData(gridGoodsComposeOptions);
|
|
|
|
|
- var idx = oldGoodsDealList.length+1;
|
|
|
|
|
-
|
|
|
|
|
- var isExist = false;
|
|
|
|
|
- goodsData.forEach(function(goods){
|
|
|
|
|
- isExist = false;
|
|
|
|
|
-
|
|
|
|
|
- gridGoodsComposeOptions.api.forEachNode(function(rowNode, index) {
|
|
|
|
|
-
|
|
|
|
|
- if (goods.goodsCd == rowNode.data.extendGoodsCd){
|
|
|
|
|
- isExist = true;
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- if (goods.goodsType != 'G056_N'){
|
|
|
|
|
- isExist = true;
|
|
|
|
|
- }
|
|
|
|
|
- if(!isExist){
|
|
|
|
|
-
|
|
|
|
|
- var data = {
|
|
|
|
|
- goodsCd : $('#goodsDetailForm input[name=goodsCd]').val()
|
|
|
|
|
- , compsGoodsCd: goods.goodsCd
|
|
|
|
|
- , goodsType: $('#goodsDetailForm input[name=goodsType]').val()
|
|
|
|
|
- , dispOrd: idx
|
|
|
|
|
- , qty: 1
|
|
|
|
|
- , compsCurrPrice: goods.currPrice
|
|
|
|
|
- , baseYn: 'N'
|
|
|
|
|
- , repYn: 'N'
|
|
|
|
|
- , goodsStat : goods.goodsStat
|
|
|
|
|
- , useYn: 'Y'
|
|
|
|
|
- , compsGoodsOptNm : goods.goodsNm
|
|
|
|
|
- , compsGoodsNm : goods.goodsNm
|
|
|
|
|
- , currPrice : goods.currPrice
|
|
|
|
|
- , selfGoodsYn : goods.selfGoodsYn
|
|
|
|
|
- , sysImgNm : goods.sysImgNm
|
|
|
|
|
- };
|
|
|
|
|
- gridGoodsComposeOptions.api.updateRowData({add: [data], addIndex: idx});
|
|
|
|
|
-
|
|
|
|
|
- idx++;
|
|
|
|
|
- $('#goodsDetailForm').find('.tabs .tabsNav li:eq(5) a').attr("style", "color:red;");
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- gridGoodsComposeOptions.api.refreshCells();
|
|
|
|
|
- uifnPopupClose('popupGoods');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //엑셀 상품 조회
|
|
|
|
|
- $('#btnGoodsDealSearchExcel').on('click', function() {
|
|
|
|
|
- cfnExcelUploadPopup('goodsDetailExcelUpload', 'goodsDetailExcelUpload');
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- var goodsDetailExcelUpload = function(result){
|
|
|
|
|
- var data = {procJob : result.procJob
|
|
|
|
|
- ,excelFileNm : result.excelFileNm
|
|
|
|
|
- };
|
|
|
|
|
- var jsonData = JSON.stringify(data);
|
|
|
|
|
- gagajf.ajaxJsonSubmit('/goods/search/excelupload/ds_save', jsonData, goodsDetailExcelUploadCallBack);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- var goodsDetailExcelUploadCallBack = function(result){
|
|
|
|
|
- gagajf.ajaxJsonSubmit('/goods/excel/upload/goods/list', '', fnGoodsDetailSearchExcel);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- var fnGoodsDetailSearchExcel = function(result){
|
|
|
|
|
- fnGoodsDetailGoodsDeal(result.goodsExcelList);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- $("img").on("error", function () {
|
|
|
|
|
- $(this).attr("src", _uximgUrl+"/image/no.png");
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- var fnUnEscapeHtml = function(){ //XSS변환
|
|
|
|
|
- $('#goodsDetailForm input[name=goodsTnm]').val($('#goodsDetailForm input[name=goodsTnm]').val().replaceXSS());
|
|
|
|
|
- $('#goodsDetailForm input[name=goodsNm]').val($('#goodsDetailForm input[name=goodsNm]').val().replaceXSS());
|
|
|
|
|
- $('#goodsDetailForm input[name=goodsTitlesDesc]').val($('#goodsDetailForm input[name=goodsTitlesDesc]').val().replaceXSS());
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- var fnChangeGrid = function(){ //XSS 그리드 내 변환
|
|
|
|
|
- var data = gagaAgGrid.getAllRowData(gridGoodsHstoryOptions);
|
|
|
|
|
- let modifyList = [];
|
|
|
|
|
- $.each(data, function(idx, item) {
|
|
|
|
|
- if(item.goodsTnm != null && item.goodsTnm != undefined && item.goodsTnm != ""){
|
|
|
|
|
- let goodsTnm = item.goodsTnm;
|
|
|
|
|
-
|
|
|
|
|
- item.goodsTnm = goodsTnm.replaceXSS();
|
|
|
|
|
- }
|
|
|
|
|
- if(item.goodsSnm != null && item.goodsSnm != undefined && item.goodsSnm != ""){
|
|
|
|
|
- let goodsSnm = item. goodsSnm;
|
|
|
|
|
-
|
|
|
|
|
- item.goodsSnm = goodsSnm.replaceXSS();
|
|
|
|
|
- }
|
|
|
|
|
- modifyList.push(item);
|
|
|
|
|
- });
|
|
|
|
|
- gridGoodsHstoryOptions.api.setRowData(modifyList);
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- $(document).ready(function() {
|
|
|
|
|
-
|
|
|
|
|
- cfnCreateCheckbox("/renderer/avail/commonCode/list/G110", $('#goodsCustGradeList'), "goodsOrderGrade");
|
|
|
|
|
-
|
|
|
|
|
- gagaAgGrid.createGrid('gridGoodsHstoryList', gridGoodsHstoryOptions);
|
|
|
|
|
- gagaAgGrid.createGrid('gridGoodsComposeList', gridGoodsComposeOptions);
|
|
|
|
|
-
|
|
|
|
|
- fnGoodsDeailSearch();
|
|
|
|
|
-
|
|
|
|
|
- // Create a summernote
|
|
|
|
|
- var snOptions1 = gagaSn.getToolbarOptions('media');
|
|
|
|
|
- var snOptions2 = gagaSn.getToolbarOptions('media');
|
|
|
|
|
- var snOptions3 = gagaSn.getToolbarOptions('media');
|
|
|
|
|
- var snOptions4 = gagaSn.getToolbarOptions('media');
|
|
|
|
|
- var snOptions5 = gagaSn.getToolbarOptions('media');
|
|
|
|
|
- var snOptions6 = gagaSn.getToolbarOptions('media');
|
|
|
|
|
- var snOptions7 = gagaSn.getToolbarOptions('media');
|
|
|
|
|
- gagaSn.createSummernote(snOptions1, '#goodsContentsDesc');
|
|
|
|
|
- gagaSn.createSummernote(snOptions2, '#goodsCharacterDesc');
|
|
|
|
|
- gagaSn.createSummernote(snOptions3, '#goodsDesc');
|
|
|
|
|
- gagaSn.createSummernote(snOptions4, '#goodsPcTopDesc');
|
|
|
|
|
- gagaSn.createSummernote(snOptions5, '#goodsMobileTopDesc');
|
|
|
|
|
- gagaSn.createSummernote(snOptions6, '#goodsPcDownDesc');
|
|
|
|
|
- gagaSn.createSummernote(snOptions7, '#goodsMobileDownDesc');
|
|
|
|
|
-
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
-/*]]>*/
|
|
|
|
|
-</script>
|
|
|
|
|
|
|
+<!DOCTYPE html>
|
|
|
|
|
+<html lang="ko"
|
|
|
|
|
+ xmlns:th="http://www.thymeleaf.org">
|
|
|
|
|
+<!--
|
|
|
|
|
+ *******************************************************************************
|
|
|
|
|
+ * @source : GoodsDetailForm.html
|
|
|
|
|
+ * @desc : 상품 상세 팝업
|
|
|
|
|
+ *============================================================================
|
|
|
|
|
+ * STYLE24
|
|
|
|
|
+ * Copyright(C) 2020 TSIT, All rights reserved.
|
|
|
|
|
+ *============================================================================
|
|
|
|
|
+ * VER DATE AUTHOR DESCRIPTION
|
|
|
|
|
+ * === =========== ========== =============================================
|
|
|
|
|
+ * 1.0 2020.10.23 eskim 최초 작성
|
|
|
|
|
+ *******************************************************************************
|
|
|
|
|
+ -->
|
|
|
|
|
+ <div class="modalPopup" data-width="1700" data-height="870"> <!-- data-width="1500" data-height="870" -->
|
|
|
|
|
+ <div class="panelStyle">
|
|
|
|
|
+ <div class="panelTitle">
|
|
|
|
|
+ <h2>상품상세</h2>
|
|
|
|
|
+ <button type="button" class="close" onclick="fnGoodsDetailClose()"><i class="fa fa-times"></i></button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <form id="goodsDetailForm" name="goodsDetailForm" action="#" th:method="post">
|
|
|
|
|
+ <input type="hidden" id="mode" name="mode" th:value="${params.mode}"/>
|
|
|
|
|
+ <input type="hidden" id="goodsCd" name="goodsCd" th:value="${params.goodsCd}"/>
|
|
|
|
|
+ <input type="hidden" id="niClsfCd" name="niClsfCd"/>
|
|
|
|
|
+ <input type="hidden" id="selfGoodsYn" name="selfGoodsYn"/>
|
|
|
|
|
+ <input type="hidden" id="notiList" name="notiList" />
|
|
|
|
|
+ <input type="hidden" id="chDataYn" name="chDataYn" />
|
|
|
|
|
+ <input type="hidden" id="chStockDataYn" name="chStockDataYn" />
|
|
|
|
|
+ <input type="hidden" id="goodsImageYn" name="goodsImageYn" />
|
|
|
|
|
+ <input type="hidden" id="niClsfNm" name="niClsfNm" />
|
|
|
|
|
+ <input type="hidden" id="uploadGoodsUrl" name="uploadGoodsUrl" th:value="${@environment.getProperty('upload.goods.view')}"/>
|
|
|
|
|
+ <input type="hidden" id="mainColorCd" name="mainColorCd" />
|
|
|
|
|
+ <input type="hidden" id="goodsType" name="goodsType" />
|
|
|
|
|
+ <input type="hidden" id="goodsComposeList" name="goodsComposeList" />
|
|
|
|
|
+ <input type="hidden" id="repGoodsCd" name="repGoodsCd" /> <!-- 대표상품(딜 가격) -->
|
|
|
|
|
+ <!-- 사용자검색어, 검색어 부분 (사용안함 히든처리) 21.11.22 -->
|
|
|
|
|
+ <input type="hidden" class="w60p" id="goodsSnm1" name="goodsSnm1"></input>
|
|
|
|
|
+ <input type="hidden" id="goodsSnm1Org" name="goodsSnm1Org"/>
|
|
|
|
|
+ <input type="hidden" id="goodsSnm" name="goodsSnm"></input>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="panelContent">
|
|
|
|
|
+ <table class="frmStyle">
|
|
|
|
|
+ <colgroup>
|
|
|
|
|
+ <col width="11%"/>
|
|
|
|
|
+ <col/>
|
|
|
|
|
+ <col width="11%"/>
|
|
|
|
|
+ <col width="14%"/>
|
|
|
|
|
+ <col width="10%"/>
|
|
|
|
|
+ <col width="14%"/>
|
|
|
|
|
+ <col width="10%"/>
|
|
|
|
|
+ <col width="14%"/>
|
|
|
|
|
+ </colgroup>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>브랜드명<em class="required" title="필수"></em></th>
|
|
|
|
|
+ <td colspan="3">
|
|
|
|
|
+ <select name="selSupplyCompCd" id="selSupplyCompCd" disabled="disabled" class="w40p">
|
|
|
|
|
+ <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="selBrandCd" id="selBrandCd" disabled="disabled" class="w40p">
|
|
|
|
|
+ <option value="">[선택]</option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <input type="hidden" name="supplyCompCd" id="supplyCompCd" />
|
|
|
|
|
+ <input type="hidden" name="brandGrpNm" id="brandGrpNm" />
|
|
|
|
|
+ <input type="hidden" name="brandCd" id="brandCd" />
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>상품코드<em class="required" title="필수"></em></th>
|
|
|
|
|
+ <td><div id="goodsCdTxt"></div></td>
|
|
|
|
|
+ <th>원코드</th>
|
|
|
|
|
+ <td><span id="supplyGoodsCdTxt"></span></td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </table>
|
|
|
|
|
+ <!-- TABS SPACE -->
|
|
|
|
|
+ <div class="tabs">
|
|
|
|
|
+ <!-- TABS NAVI -->
|
|
|
|
|
+ <div class="tabsNav">
|
|
|
|
|
+ <ul>
|
|
|
|
|
+ <li class="on"><a href="#goodstab1">기본정보</a></li>
|
|
|
|
|
+ <li><a href="#goodstab2">옵션/재고정보</a></li>
|
|
|
|
|
+ <li id="goodsDescTab"><a href="#goodstab3">상품상세정보</a></li>
|
|
|
|
|
+ <li id="goodsNotiTab"><a href="#goodstab4">고시정보</a></li>
|
|
|
|
|
+ <li id="goodsComposeTab" style="display:none;"><a href="#goodstab5">구성상품</a></li>
|
|
|
|
|
+ <li id="goodsSafeTab"><a href="#goodstab6">안전인증</a></li>
|
|
|
|
|
+ <li><a href="#goodstab7">변경이력</a></li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //TABS NAVI -->
|
|
|
|
|
+ <!-- TABS CONTENTS -->
|
|
|
|
|
+ <ul class="tabsCont" th:with="uxImgUrl=${@environment.getProperty('domain.uximage')}">
|
|
|
|
|
+ <!-- TAB1 : 기본정보 -->
|
|
|
|
|
+ <li class="tab on" id="goodstab1">
|
|
|
|
|
+ <!-- TAB1 CONTENTS AREA -->
|
|
|
|
|
+ <div class="panelStyle">
|
|
|
|
|
+ <table class="frmStyle">
|
|
|
|
|
+ <colgroup>
|
|
|
|
|
+ <col/>
|
|
|
|
|
+ <col width="12%"/>
|
|
|
|
|
+ <col width="17%"/>
|
|
|
|
|
+ <col width="12%"/>
|
|
|
|
|
+ <col width="17%"/>
|
|
|
|
|
+ <col width="12%"/>
|
|
|
|
|
+ <col width="17%"/>
|
|
|
|
|
+ </colgroup>
|
|
|
|
|
+ <tbody>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td rowspan="6" style="text-align:center">
|
|
|
|
|
+ <img id="goodsImgUrl" src="" width="130px"/>
|
|
|
|
|
+ <input type="hidden" name="sysImgNm" id="sysImgNm" />
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>상품타이틀</th>
|
|
|
|
|
+ <td colspan="5">
|
|
|
|
|
+ <input type="text" class="w80p" id="goodsTnm" name="goodsTnm" maxlength=""></input>
|
|
|
|
|
+ <span class="byteChk"><em class="cBlue" id="goodsTnmLen">0</em>/100 bytes</span>
|
|
|
|
|
+ <input type="hidden" id="goodsTnmOrg" name="goodsTnmOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>상품명<em class="required" title="필수"></em></th>
|
|
|
|
|
+ <td colspan="5">
|
|
|
|
|
+ <input type="text" class="w80p" id="goodsNm" name="goodsNm"></input>
|
|
|
|
|
+ <span class="byteChk"><em class="cBlue" id="goodsNmLen">0</em>/200 bytes</span>
|
|
|
|
|
+ <input type="hidden" id="goodsNmOrg" name="goodsNmOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <!-- 21.11.22 사용안함으로 변경, 상단 히든으로 정의(기존데이터용)
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>사용자검색어</th>
|
|
|
|
|
+ <td colspan="5">
|
|
|
|
|
+ <input type="text" class="w60p" id="goodsSnm1" name="goodsSnm1"></input>
|
|
|
|
|
+ <span class="byteChk"><em class="cBlue" id="goodsSnm1Len">0</em>/200 bytes</span><font class="cBlue padL10"><b>* 여러개설정할경우 ; 구분자 사용 / 공백은 자동삭제처리</b></font>
|
|
|
|
|
+ <input type="hidden" id="goodsSnm1Org" name="goodsSnm1Org"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>검색어</th>
|
|
|
|
|
+ <td colspan="5">
|
|
|
|
|
+ <textarea class="textareaR2 w100p" id="goodsSnmTxt" name="goodsSnmTxt" disabled="disabled"></textarea>
|
|
|
|
|
+ <input type="hidden" id="goodsSnm" name="goodsSnm"></input>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr> -->
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>정상/이월 구분<em class="required" title="필수"></em></th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <label class="rdoBtn" th:if="${formalGbList}" th:each="oneData, status : ${formalGbList}" ><input type="radio" id="formalGb" name="formalGb" th:value="${oneData.cd}" th:text="${oneData.cdNm}" /></label>
|
|
|
|
|
+ <input type="hidden" id="formalGbOrg" name="formalGbOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>상품상태<em class="required" title="필수"></em>
|
|
|
|
|
+ <!-- 아이콘 툴팁 -->
|
|
|
|
|
+ <div class="iconTooltip">
|
|
|
|
|
+ <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
+ <span class="left aL" style="width:840px;">
|
|
|
|
|
+ 승인완료 인 상품만 판매가 진행됩니다. 재고가 없을 시에도 별도로 상태는 변경되지 않으며 품절로 화면에서 노출되고 재고 충족 시 판매가 재개됩니다.
|
|
|
|
|
+ <br>일시품절은 강제품절 기능으로 재고가 있더라도 일시품절 상태일 경우 품절로 처리 됩니다. <br>입점상품의 경우 MD 의 최초 승인 이후부터 판매가능상태인 '승인완료'로 변경이 가능합니다.
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //아이콘 툴팁 -->
|
|
|
|
|
+ </th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <select name="goodsStat" id="goodsStat">
|
|
|
|
|
+ <option value="">[선택]</option>
|
|
|
|
|
+ <option th:if="${goodsStatList}" th:each="oneData, status : ${goodsStatList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <input type="hidden" id="goodsStatOrg" name="goodsStatOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>자사몰 노출여부<em class="required" title="필수"></em>
|
|
|
|
|
+ <!-- 아이콘 툴팁 -->
|
|
|
|
|
+ <div class="iconTooltip">
|
|
|
|
|
+ <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
+ <span class="left aL" style="width:320px;">
|
|
|
|
|
+ 판매는 진행하나, 검색/카테고리 등 자동 전시화면에만 <br>노출이 되지 않게 제어할 수 있습니다.
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //아이콘 툴팁 -->
|
|
|
|
|
+ </th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <label class="rdoBtn"><input type="radio" name="selfMallYn" id="selfMallYnY" value="Y" />Y</label>
|
|
|
|
|
+ <label class="rdoBtn"><input type="radio" name="selfMallYn" id="selfMallYnN" value="N"/>N</label>
|
|
|
|
|
+ <input type="hidden" id="selfMallYnOrg" name="selfMallYnOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>시즌<em class="required" title="필수"></em></th>
|
|
|
|
|
+ <td >
|
|
|
|
|
+ <select name="seasonCd" id="seasonCd">
|
|
|
|
|
+ <option value="">[선택]</option>
|
|
|
|
|
+ <option th:if="${seasonList}" th:each="oneData, status : ${seasonList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <input type="hidden" id="seasonCdOrg" name="seasonCdOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>성별<em class="required" title="필수"></em></th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <select name="sexGb" id="sexGb">
|
|
|
|
|
+ <option value="">[선택]</option>
|
|
|
|
|
+ <option th:if="${sexGbList}" th:each="oneData, status : ${sexGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <input type="hidden" id="sexGbOrg" name="sexGbOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>스타일년도</th>
|
|
|
|
|
+ <td><span id="styleYearTxt"></span></td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr class="chk_deal">
|
|
|
|
|
+ <th>원산지</th>
|
|
|
|
|
+ <td><span id="makeNmTxt"></span></td>
|
|
|
|
|
+ <th>유통구분<em class="required" title="필수"></em></th>
|
|
|
|
|
+ <td><select name="distributionGb" id="distributionGb">
|
|
|
|
|
+ <option value="">[선택]</option>
|
|
|
|
|
+ <option th:if="${distributionGbList}" th:each="oneData, status : ${distributionGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <input type="hidden" id="distributionGbOrg" name="distributionGbOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>상품구분<em class="required" title="필수"></em></th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <select name="goodsGb" id="goodsGb">
|
|
|
|
|
+ <option value="">[선택]</option>
|
|
|
|
|
+ <option th:if="${goodsGbList}" th:each="oneData, status : ${goodsGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <input type="hidden" id="goodsGbOrg" name="goodsGbOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr class="chk_deal">
|
|
|
|
|
+ <th>해외구매대행여부</th>
|
|
|
|
|
+ <td><label class="rdoBtn"><input type="radio" name="foreignBuyYn" id="foreignBuyYnY" value="Y" />Y</label>
|
|
|
|
|
+ <label class="rdoBtn"><input type="radio" name="foreignBuyYn" id="foreignBuyYnN" value="N"/>N</label>
|
|
|
|
|
+ <input type="hidden" id="foreignBuyYnOrg" name="foreignBuyYnOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>병행수입여부</th>
|
|
|
|
|
+ <td><label class="rdoBtn"><input type="radio" name="parallelImportYn" id="parallelImportYnY" value="Y" />Y</label>
|
|
|
|
|
+ <label class="rdoBtn"><input type="radio" name="parallelImportYn" id="parallelImportYnN" value="N"/>N</label>
|
|
|
|
|
+ <input type="hidden" id="parallelImportYnOrg" name="parallelImportYnOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>주문제작여부</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <label class="rdoBtn"><input type="radio" name="orderMadeYn" id="orderMadeYnY" value="Y" />Y</label>
|
|
|
|
|
+ <label class="rdoBtn"><input type="radio" name="orderMadeYn" id="orderMadeYnN" value="N"/>N</label>
|
|
|
|
|
+ <input type="hidden" id="orderMadeYnOrg" name="orderMadeYnOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr class="chk_deal">
|
|
|
|
|
+ <td class="aC cRed" style="font-weight:bold;"><span id="goodsTypeNm"></span></td> <!-- 상품타입노출 -->
|
|
|
|
|
+ <th>상품연령대</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <select name="ageGrpCd" id="ageGrpCd">
|
|
|
|
|
+ <option value="">[선택]</option>
|
|
|
|
|
+ <option th:if="${ageGrpCdList}" th:each="oneData, status : ${ageGrpCdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <input type="hidden" id="ageGrpCdOrg" name="ageGrpCdOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>선물 주문가능여부<em class="required" title="필수"></em>
|
|
|
|
|
+ <!-- 아이콘 툴팁 -->
|
|
|
|
|
+ <div class="iconTooltip">
|
|
|
|
|
+ <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
+ <span class="left aL" style="width:470px;">
|
|
|
|
|
+ 설정 시 모바일 상품 상세 내 선물하기 버튼이 노출되고 선물주문 진행이 가능합니다.
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //아이콘 툴팁 -->
|
|
|
|
|
+ </th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <label class="rdoBtn"><input type="radio" name="giftPackYn" id="giftPackYnY" value="Y" />Y</label>
|
|
|
|
|
+ <label class="rdoBtn"><input type="radio" name="giftPackYn" id="giftPackYnN" value="N"/>N</label>
|
|
|
|
|
+ <input type="hidden" id="giftPackYnOrg" name="giftPackYnOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>가격변경일</th>
|
|
|
|
|
+ <td><span id="priceUpdDtTxt"></span></td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td class="chk_deal" rowspan="12"> </td>
|
|
|
|
|
+ <th>정상가<em class="required" title="필수"></em></th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <input type="text" class="w80p aR" id="listPrice" name="listPrice" maxlength="10" data-valid-type="numeric"/> 원
|
|
|
|
|
+ <input type="hidden" id="listPriceOrg" name="listPriceOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>판매가<em class="required" title="필수"></em></th>
|
|
|
|
|
+ <td><input type="text" class="w80p aR" id="currPrice" name="currPrice" maxlength="10" data-valid-type="numeric"/> 원
|
|
|
|
|
+ <input type="hidden" id="currPriceOrg" name="currPriceOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>할인율</th>
|
|
|
|
|
+ <td class="aR" ><span id="dcRateTxt"></span> % <input type="hidden" id="dcRate" name="dcRate"/></td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr class="chk_deal" id="selfGoodsNSellFeeRate">
|
|
|
|
|
+ <th>최초승인일</th>
|
|
|
|
|
+ <td><span id="frstCfrmDtTxt"></span></td>
|
|
|
|
|
+ <th>판매수수료율<em class="required" title="필수"></em></th>
|
|
|
|
|
+ <td><input type="text" class="w80p aR" id="sellFeeRate" name="sellFeeRate" maxlength="10" data-valid-type="numeric"/> %
|
|
|
|
|
+ <input type="hidden" id="sellFeeRateOrg" name="sellFeeRateOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>과세구분</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <select name="taxGb" disabled="disabled">
|
|
|
|
|
+ <option value="">[선택]</option>
|
|
|
|
|
+ <option value="10">과세</option>
|
|
|
|
|
+ <option value="20">비과세</option>
|
|
|
|
|
+ <option value="30">면세</option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr class="chk_deal">
|
|
|
|
|
+ <th>품목코드<em class="required" title="필수"></em></th>
|
|
|
|
|
+ <td colspan="3">
|
|
|
|
|
+ <select name="itemkindCd" id="itemkindCd" th:disabled="${sessionInfo.roleCd != 'G001_0000' AND sessionInfo.roleCd != 'G001_A000' AND sessionInfo.roleCd != 'G001_A101' AND sessionInfo.roleCd != 'G001_A100' AND sessionInfo.roleCd != 'G001_A001'}">
|
|
|
|
|
+ <option th:if="${itemkindList}" th:each="oneData, status : ${itemkindList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <input type="hidden" id="orgItemkindCd" name="orgItemkindCd"/>
|
|
|
|
|
+ <th:block th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001' }">
|
|
|
|
|
+ <button type="button" class="btn btn-success btn-lg" id="btnGoodsItemkindChange">품목변경</button>
|
|
|
|
|
+ </th:block>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>출고처<em class="required" title="필수"></em></th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <select name="delvLocCd" id="delvLocCd">
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <input type="hidden" id="delvLocCdOrg" name="delvLocCdOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr class="chk_deal">
|
|
|
|
|
+ <th>반품여부<em class="required" title="필수"></em>
|
|
|
|
|
+ <!-- 아이콘 툴팁 -->
|
|
|
|
|
+ <div class="iconTooltip">
|
|
|
|
|
+ <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
+ <span class="left aL" style="width:370px;">
|
|
|
|
|
+ N으로 설정 시 반품을 사용자가 프론트에서 진행할 수 없습니다.
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //아이콘 툴팁 -->
|
|
|
|
|
+ </th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <label class="rdoBtn"><input type="radio" name="returnableYn" id="returnableYnY" value="Y" />Y</label>
|
|
|
|
|
+ <label class="rdoBtn"><input type="radio" name="returnableYn" id="returnableYnN" value="N"/>N</label>
|
|
|
|
|
+ <input type="hidden" id="returnableYnOrg" name="returnableYnOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>교환여부<em class="required" title="필수"></em>
|
|
|
|
|
+ <!-- 아이콘 툴팁 -->
|
|
|
|
|
+ <div class="iconTooltip">
|
|
|
|
|
+ <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
+ <span class="left aL" style="width:370px;">
|
|
|
|
|
+ N으로 설정 시 교환을 사용자가 프론트에서 진행할 수 없습니다.
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //아이콘 툴팁 -->
|
|
|
|
|
+ </th>
|
|
|
|
|
+ <td colspan="3">
|
|
|
|
|
+ <label class="rdoBtn"><input type="radio" name="changeableYn" id="changeableYnY" value="Y" />Y</label>
|
|
|
|
|
+ <label class="rdoBtn"><input type="radio" name="changeableYn" id="changeableYnN" value="N"/>N</label>
|
|
|
|
|
+ <input type="hidden" id="changeableYnOrg" name="changeableYnOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr class="chk_deal">
|
|
|
|
|
+ <th>신규가입구매가능여부<em class="required" title="필수"></em>
|
|
|
|
|
+ <!-- 아이콘 툴팁 -->
|
|
|
|
|
+ <div class="iconTooltip">
|
|
|
|
|
+ <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
+ <span class="left aL" style="width:480px;">
|
|
|
|
|
+ 신규 가입자만 구매할 수 있는 상품으로 설정 할 수 있습니다. <br>Y 로 변경 후 기간 설정시, 설정한 기간 동안 가입한 회원에 한하여 구매할 수 있습니다.
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //아이콘 툴팁 -->
|
|
|
|
|
+ </th>
|
|
|
|
|
+ <td colspan="5">
|
|
|
|
|
+ <label class="rdoBtn"><input type="radio" name="newCustOrdYn" id="newCustOrdYnY" value="Y" />Y</label>
|
|
|
|
|
+ <label class="rdoBtn"><input type="radio" name="newCustOrdYn" id="newCustOrdYnN" value="N"/>N</label>
|
|
|
|
|
+ <input type="hidden" id="newCustOrdYnOrg" name="newCustOrdYnOrg"/>
|
|
|
|
|
+ <input name="newCustOrdStdt" id="newCustOrdStdt" type="text" class="w80 schDate" maxlength="10" required="required" data-valid-name="판매시작일" />
|
|
|
|
|
+ <input type="hidden" id="newCustOrdStdtOrg" name="newCustOrdStdtOrg"/>
|
|
|
|
|
+ ~
|
|
|
|
|
+ <input name="newCustOrdEddt" id="newCustOrdEddt" type="text" class="w80 schDate" maxlength="10" required="required" data-valid-name="판매 종료일" />
|
|
|
|
|
+ <input type="hidden" id="newCustOrdEddtOrg" name="newCustOrdEddtOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr class="chk_deal">
|
|
|
|
|
+ <th>배송비정책<em class="required" title="필수"></em></th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <select name="delvFeeCd">
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <input type="hidden" id="delvFeeCdOrg" name="delvFeeCdOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>기본배송비</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <input type="text" class="w100 aR" id="delvFee" name="delvFee" disabled="disabled"/> 원
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>무료배송비기준</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <input type="text" class="w100 aR" id="minOrdAmt" name="minOrdAmt" disabled="disabled"/> 원
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr class="chk_deal">
|
|
|
|
|
+ <th>PC포인트<em class="required" title="필수"></em>
|
|
|
|
|
+ <!-- 아이콘 툴팁 -->
|
|
|
|
|
+ <div class="iconTooltip">
|
|
|
|
|
+ <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
+ <span class="left aL" style="width:400px;">
|
|
|
|
|
+ Y 값을 설정 시 포인트 율 만큼 선포인트 할인을 진행할 수 있습니다.
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //아이콘 툴팁 -->
|
|
|
|
|
+ </th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <input type="text" class="w50 aR" id="pntPrate" name="pntPrate" data-valid-type="preal" maxlength="3"/> % /
|
|
|
|
|
+ <input type="hidden" id="pntPrateOrg" name="pntPrateOrg"/>
|
|
|
|
|
+ <label class="rdoBtn"><input type="radio" name="prePpntUsableYn" id="prePpntUsableYnY" value="Y"/>Y</label>
|
|
|
|
|
+ <label class="rdoBtn"><input type="radio" name="prePpntUsableYn" id="prePpntUsableYnN" value="N"/>N</label>
|
|
|
|
|
+ <input type="hidden" id="prePpntUsableYnOrg" name="prePpntUsableYnOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>모바일포인트<em class="required" title="필수"></em></th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <input type="text" class="w50 aR" id="pntMrate" name="pntMrate" data-valid-type="preal" maxlength="3"/> % /
|
|
|
|
|
+ <input type="hidden" id="pntMrateOrg" name="pntMrateOrg"/>
|
|
|
|
|
+ <label class="rdoBtn"><input type="radio" name="preMpntUsableYn" id="preMpntUsableYnY" value="Y"/>Y</label>
|
|
|
|
|
+ <label class="rdoBtn"><input type="radio" name="preMpntUsableYn" id="preMpntUsableYnN" value="N"/>N</label>
|
|
|
|
|
+ <input type="hidden" id="preMpntUsableYnOrg" name="preMpntUsableYnOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>성인용품여부<em class="required" title="필수"></em></th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <label class="rdoBtn"><input type="radio" name="adultYn" id="adultYnY" value="Y" />Y</label>
|
|
|
|
|
+ <label class="rdoBtn"><input type="radio" name="adultYn" id="adultYnN" value="N"/>N</label>
|
|
|
|
|
+ <input type="hidden" id="adultYnOrg" name="adultYnOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr class="chk_deal">
|
|
|
|
|
+ <th>최소주문수량<em class="required" title="필수"></em>
|
|
|
|
|
+ <!-- 아이콘 툴팁 -->
|
|
|
|
|
+ <div class="iconTooltip">
|
|
|
|
|
+ <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
+ <span class="left aL" style="width:350px;">
|
|
|
|
|
+ 해당 상품을 구매 시 최소한으로 구매해야 하는 수량입니다.
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //아이콘 툴팁 -->
|
|
|
|
|
+ </th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <input type="text" class="w100 aR" id="minOrdQty" name="minOrdQty" data-valid-type="integer" maxlength="5"/>
|
|
|
|
|
+ <input type="hidden" id="minOrdQtyOrg" name="minOrdQtyOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>최대주문수량<em class="required" title="필수"></em>
|
|
|
|
|
+ <!-- 아이콘 툴팁 -->
|
|
|
|
|
+ <div class="iconTooltip">
|
|
|
|
|
+ <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
+ <span class="left aL" style="width:330px;">
|
|
|
|
|
+ 한 아이디가 한 주문에 구매할수 있는 최대 수량입니다.
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //아이콘 툴팁 -->
|
|
|
|
|
+ </th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <input type="text" class="w100 aR" id="maxOrdQty" name="maxOrdQty" data-valid-type="integer" maxlength="5"/>
|
|
|
|
|
+ <input type="hidden" id="maxOrdQtyOrg" name="maxOrdQtyOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>ID당1일최대구매수량<em class="required" title="필수"></em>
|
|
|
|
|
+ <!-- 아이콘 툴팁 -->
|
|
|
|
|
+ <div class="iconTooltip">
|
|
|
|
|
+ <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
+ <span class="left aL" style="width:330px;">
|
|
|
|
|
+ 한 아이디가 1일 기준 구매할 수 있는 최대 수량입니다.
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //아이콘 툴팁 -->
|
|
|
|
|
+ </th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <input type="text" class="w100 aR" id="dayMaxOrdQty" name="dayMaxOrdQty" data-valid-type="integer" maxlength="5"/>
|
|
|
|
|
+ <input type="hidden" id="dayMaxOrdQtyOrg" name="dayMaxOrdQtyOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr class="chk_deal">
|
|
|
|
|
+ <th>구매등급
|
|
|
|
|
+ <!-- 아이콘 툴팁 -->
|
|
|
|
|
+ <div class="iconTooltip">
|
|
|
|
|
+ <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
+ <span class="left aL" style="width:600px;">
|
|
|
|
|
+ 설정 시 해당 등급만 구매가 가능하도록 설정할 수 있습니다, 미체크 시 제약없이 전회원 구매가 가능합니다.
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //아이콘 툴팁 -->
|
|
|
|
|
+ </th>
|
|
|
|
|
+ <td colspan="3">
|
|
|
|
|
+ <div id="goodsCustGradeList"></div>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>상세폼신규사용여부
|
|
|
|
|
+ <!-- 아이콘 툴팁 -->
|
|
|
|
|
+ <div class="iconTooltip">
|
|
|
|
|
+ <i class="fa fa-info" aria-hidden="true"></i>
|
|
|
|
|
+ <span class="left aL" style="width:355px;">
|
|
|
|
|
+ 상품 상세의 폼 유형을 변경합니다. 신규사용여부 Y일 경우 <br>이미지 업로드 규칙에 맞춰 생성되는 상품상세폼을 사용합니다.
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //아이콘 툴팁 -->
|
|
|
|
|
+ </th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <label class="rdoBtn"><input type="radio" name="tobeFormYn" id="tobeFormYnY" value="Y" />Y</label>
|
|
|
|
|
+ <label class="rdoBtn"><input type="radio" name="tobeFormYn" id="tobeFormYnN" value="N"/>N</label>
|
|
|
|
|
+ <input type="hidden" id="tobeFormYnOrg" name="tobeFormYnOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>판매기간<em class="required" title="필수"></em></th>
|
|
|
|
|
+ <td colspan="3">
|
|
|
|
|
+ <input name="sellStYMD" id="sellStYMD" type="text" class="w80 schDate" maxlength="10" required="required" data-valid-name="판매시작일" />
|
|
|
|
|
+ <select name="sellStHH" id="sellStHH" required="required" data-valid-name="판매 시작시간">
|
|
|
|
|
+ <th:block th:each="num, index : ${#numbers.sequence(0,23)}">
|
|
|
|
|
+ <option th:value="${#numbers.formatInteger(num,2)}" th:text="|${#numbers.formatInteger(num,2)}시|" >시간</option>
|
|
|
|
|
+ </th:block>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <input name="sellStdt" id="sellStdt" type="hidden" />
|
|
|
|
|
+ ~
|
|
|
|
|
+ <input name="sellEdYMD" id="sellEdYMD" type="text" class="w80 schDate" maxlength="10" required="required" data-valid-name="판매 종료일" />
|
|
|
|
|
+ <select name="sellEdHH" id="sellEdHH" required="required" data-valid-name="판매 종료시간">
|
|
|
|
|
+ <th:block th:each="num: ${#numbers.sequence(0,23)}">
|
|
|
|
|
+ <option th:value="${#numbers.formatInteger(num,2)}" th:text="|${#numbers.formatInteger(num,2)}시|" th:selected="${#numbers.formatInteger(num,2)}==23 ? 'true'">시간</option>
|
|
|
|
|
+ </th:block>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <input name="sellEddt" id="sellEddt" type="hidden" />
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>원가</th>
|
|
|
|
|
+ <td><input type="text" class="w80p aR" id="costPrice" name="costPrice" maxlength="10" data-valid-type="numeric"/> 원
|
|
|
|
|
+ <input type="hidden" id="costPriceOrg" name="costPriceOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td class="aC cRed" style="font-weight:bold;"><span id="goodsTypeNm2"></span></td> <!-- 상품타입노출 -->
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </tbody>
|
|
|
|
|
+ </table>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //TAB1 CONTENTS AREA -->
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <!-- //TAB1 -->
|
|
|
|
|
+ <!-- TAB2 : 옵셥/재고 -->
|
|
|
|
|
+ <li class="tab" id="goodstab2">
|
|
|
|
|
+ <!-- TAB2 CONTENTS AREA -->
|
|
|
|
|
+ <div class="panelStyle">
|
|
|
|
|
+ <!-- <ul class="notice cBlue">
|
|
|
|
|
+ <li><strong>상품 이미지 사이즈</strong> : <em><strong>600 × 600</strong> px</em></li>
|
|
|
|
|
+ </ul> -->
|
|
|
|
|
+ <div id="sizeStockArea"></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //TAB2 CONTENTS AREA -->
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <!-- //TAB2 : 이미지/옵셥/재고 -->
|
|
|
|
|
+ <!-- TAB3 : 상품상세 -->
|
|
|
|
|
+ <li class="tab" id="goodstab3">
|
|
|
|
|
+ <!-- TAB3 CONTENTS AREA -->
|
|
|
|
|
+ <div class="panelStyle">
|
|
|
|
|
+ <table class="frmStyle">
|
|
|
|
|
+ <colgroup>
|
|
|
|
|
+ <col width="12%"/>
|
|
|
|
|
+ <col/>
|
|
|
|
|
+ </colgroup>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>상세설명</th>
|
|
|
|
|
+ <td><label class="chkBox"><input type="checkbox" name="chkDescKeep" checked="checked" value="Y">정보유지<span></span></label>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </table>
|
|
|
|
|
+ <!-- TABS SPACE -->
|
|
|
|
|
+ <div class="tabsJr">
|
|
|
|
|
+ <!-- TABS NAVI -->
|
|
|
|
|
+ <ul class="tabsJrNav">
|
|
|
|
|
+ <li class="on"><a href="#goodstab11">타이틀/내용/특징</a></li>
|
|
|
|
|
+ <li><a href="#goodstab12">상세html</a></li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ <!-- //TABS NAVI -->
|
|
|
|
|
+ <!-- TABS CONTENT -->
|
|
|
|
|
+ <ul class="tabsJrCont">
|
|
|
|
|
+ <!-- TAB11 CONTENTS AREA -->
|
|
|
|
|
+ <!-- TAB -->
|
|
|
|
|
+ <li class="tabJr on" id="goodstab11">
|
|
|
|
|
+ <div class="panelStyle">
|
|
|
|
|
+ <!-- TAB11 CONTENTS AREA -->
|
|
|
|
|
+ <table class="frmStyle">
|
|
|
|
|
+ <colgroup>
|
|
|
|
|
+ <col width="12%"/>
|
|
|
|
|
+ <col/>
|
|
|
|
|
+ </colgroup>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>타이틀</th>
|
|
|
|
|
+ <td class="padT10"><input type="text" class= "w100p" id="goodsTitlesDesc" name="goodsTitlesDesc" maxlength="100" />
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>내용</th>
|
|
|
|
|
+ <td class="padT10"><div class="tabJrContArea">
|
|
|
|
|
+ <textarea class="textareaR3 summernote" name="goodsContentsDesc" id="goodsContentsDesc"></textarea>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>상품 특징</th>
|
|
|
|
|
+ <td class="padT10"><div class="tabJrContArea">
|
|
|
|
|
+ <textarea class="textareaR3 summernote" name="goodsCharacterDesc" id="goodsCharacterDesc"></textarea>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </table>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <li class="tabJr" id="goodstab12">
|
|
|
|
|
+ <div class="panelStyle">
|
|
|
|
|
+ <!-- TAB11 CONTENTS AREA -->
|
|
|
|
|
+ <table class="frmStyle">
|
|
|
|
|
+ <colgroup>
|
|
|
|
|
+ <col width="12%"/>
|
|
|
|
|
+ <col/>
|
|
|
|
|
+ </colgroup>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>상품상세</th>
|
|
|
|
|
+ <td class="padT10"><div class="tabJrContArea">
|
|
|
|
|
+ <textarea class="textareaR4 summernote" name="goodsDesc" id="goodsDesc"></textarea>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>상위(PC)</th>
|
|
|
|
|
+ <td class="padT10"><div class="tabJrContArea">
|
|
|
|
|
+ <textarea class="textareaR4 summernote" name="goodsPcTopDesc" id="goodsPcTopDesc"></textarea>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>상위(MOBILE)</th>
|
|
|
|
|
+ <td class="padT10"><div class="tabJrContArea">
|
|
|
|
|
+ <textarea class="textareaR4 summernote" name="goodsMobileTopDesc" id="goodsMobileTopDesc"></textarea>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>하위(PC)</th>
|
|
|
|
|
+ <td class="padT10"><div class="tabJrContArea">
|
|
|
|
|
+ <textarea class="textareaR4 summernote" name="goodsPcDownDesc" id="goodsPcDownDesc"></textarea>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>하위(MOBILE)</th>
|
|
|
|
|
+ <td class="padT10"><div class="tabJrContArea">
|
|
|
|
|
+ <textarea class="textareaR4 summernote" name="goodsMobileDownDesc" id="goodsMobileDownDesc"></textarea>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </table>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <!-- //TAB -->
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ <!-- //TAB CONTENT -->
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //TABS SPACE -->
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //TAB3 CONTENTS AREA -->
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <!-- //TAB3 : 상품상세 -->
|
|
|
|
|
+ <!-- TAB4 : 고시정보 -->
|
|
|
|
|
+ <li class="tab" id="goodstab4">
|
|
|
|
|
+ <!-- TAB5 CONTENTS AREA -->
|
|
|
|
|
+ <div class="panelStyle">
|
|
|
|
|
+ <!-- TABS SPACE -->
|
|
|
|
|
+ <table class="frmStyle">
|
|
|
|
|
+ <colgroup>
|
|
|
|
|
+ <col style="width:10%"/>
|
|
|
|
|
+ <col/>
|
|
|
|
|
+ </colgroup>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>Details (상품상세정보 고시)<em class="required" title="필수"></em></th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <select id="selNiClsfCd" name="selNiClsfCd" class="w40p">
|
|
|
|
|
+ <option value="">[선택]</option>
|
|
|
|
|
+ <option th:if="${niClsfCdList}" th:each="oneData, status : ${niClsfCdList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <button type="button" class="btn btn-dark btn-lg" id="btnNotinfo">선택</button>
|
|
|
|
|
+ <span class="padL10" id='itemkindNoti'></span>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </table>
|
|
|
|
|
+ <hr/>
|
|
|
|
|
+ <div id="notiArea"></div>
|
|
|
|
|
+ <!-- //TABS SPACE -->
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //TAB4 CONTENTS AREA -->
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <!-- //TAB4 : 고시정보 -->
|
|
|
|
|
+ <!-- 구성상품 -->
|
|
|
|
|
+ <li class="tab" id="goodstab5">
|
|
|
|
|
+ <!-- TAB6 CONTENTS AREA -->
|
|
|
|
|
+ <div class="panelStyle">
|
|
|
|
|
+ <!-- 내용 삽입 -->
|
|
|
|
|
+ <ul class="panelBar" id="GoodsComposeBtnArea">
|
|
|
|
|
+ <li class="right">
|
|
|
|
|
+ <button type="button" class="btn btn-default btn-lg" onclick="cfnDownloadSampleFile('SF026');">양식다운로드</button>
|
|
|
|
|
+ <button type="button" class="btn btn-success btn-lg" id="btnGoodsDealSearchExcel">엑셀조회</button>
|
|
|
|
|
+ <button type="button" class="btn btn-base btn-lg" onclick="fnOpenGoodsDetailPopup()">상품조회</button>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ <div id="gridGoodsComposeList" style="height: 600px;" class="ag-theme-balham lh60"></div>
|
|
|
|
|
+ <!-- 내용 삽입 -->
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //TAB6 CONTENTS AREA -->
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <!-- TAB6 : 안전인증 -->
|
|
|
|
|
+ <li class="tab" id="goodstab6">
|
|
|
|
|
+ <div class="panelStyle">
|
|
|
|
|
+ <table class="frmStyle">
|
|
|
|
|
+ <colgroup>
|
|
|
|
|
+ <col width="11%"/>
|
|
|
|
|
+ <col width="22%"/>
|
|
|
|
|
+ <col width="11%"/>
|
|
|
|
|
+ <col width="22%"/>
|
|
|
|
|
+ <col width="11%"/>
|
|
|
|
|
+ <col/>
|
|
|
|
|
+ </colgroup>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>인증대상</th>
|
|
|
|
|
+ <td colspan="5">
|
|
|
|
|
+ <label class="rdoBtn" th:if="${certTargetGbList}" th:each="oneData, status : ${certTargetGbList}">
|
|
|
|
|
+ <input type="radio" name="selCertTargetGb" th:value="${oneData.cd}" th:text="${oneData.cdNm}"/>
|
|
|
|
|
+ </label>
|
|
|
|
|
+ <input type="hidden" id="certTargetGb" name="certTargetGb"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>인증형태</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <select name="certFormGb" id="certFormGb" >
|
|
|
|
|
+ <option value="">[선택]</option>
|
|
|
|
|
+ <option th:if="${certFormGbList}" th:each="oneData, status : ${certFormGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <input type="hidden" id="certformGbOrg" name="certformGbOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>인증타입</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <select name="certType" id="certType" >
|
|
|
|
|
+ <option value="">[선택]</option>
|
|
|
|
|
+ <option th:if="${certTypeList}" th:each="oneData, status : ${certTypeList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <input type="hidden" id="certTypeOrg" name="certTypeOrg"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <th>인증번호</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <input type="text" class="w200" id="certNum" name="certNum" maxlength="50"/>
|
|
|
|
|
+ <input type="hidden" id="certNumOrg" name="certNumOrg"/>
|
|
|
|
|
+
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>인증상태</th>
|
|
|
|
|
+ <td><span id="certStateTxt"></span></td>
|
|
|
|
|
+ <th>인증기관</th>
|
|
|
|
|
+ <td><span id="certOrganNameTxt"></span></td>
|
|
|
|
|
+ <th>인증일</th>
|
|
|
|
|
+ <td><span id="certDtTxt"></span></td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>인증구분</th>
|
|
|
|
|
+ <td colspan="5"><span id="certDivTxt"></span></td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </table>
|
|
|
|
|
+ <ul class="panelBar marT10">
|
|
|
|
|
+ <li class="right">
|
|
|
|
|
+ <button type="button" class="btn btn-success btn-lg" id="btnGoodsSafetyCertNum">안전인증</button>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <!-- //TAB7 : 이력정보 -->
|
|
|
|
|
+ <li class="tab" id="goodstab7">
|
|
|
|
|
+ <!-- TAB8 CONTENTS AREA -->
|
|
|
|
|
+ <div class="panelStyle">
|
|
|
|
|
+ <!-- 내용 삽입 -->
|
|
|
|
|
+ <div id="gridGoodsHstoryList" style="height: 600px;" class="ag-theme-balham"></div>
|
|
|
|
|
+ <!-- 내용 삽입 -->
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //TAB5 CONTENTS AREA -->
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ <!-- //TABS CONTENTS -->
|
|
|
|
|
+ <!-- TABS BUTTON AREA -->
|
|
|
|
|
+ <ul class="panelBar marT10">
|
|
|
|
|
+ <li class="left">
|
|
|
|
|
+ <button type="button" class="btn btnLeft btn-base btn-lg" id="btnGoodsDetailPreview">미리보기</button>
|
|
|
|
|
+ <!-- <button type="button" class="btn btnLeft btn-base btn-lg" id="btnGoodsDetailImg">이미지보기</button> -->
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <li class="right">
|
|
|
|
|
+ <th:block th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001'}">
|
|
|
|
|
+ <button type="button" class="btn btnRight btn-success btn-lg" id="btnGoodsDetailSave">저장</button>
|
|
|
|
|
+ </th:block>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ <!-- //TABS BUTTON AREA -->
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- //TABS SPACE -->
|
|
|
|
|
+
|
|
|
|
|
+ </div> <!-- class=panelContent -->
|
|
|
|
|
+ </form>
|
|
|
|
|
+ </div> <!-- class=panelStyle -->
|
|
|
|
|
+ </div> <!-- class=modalPopup -->
|
|
|
|
|
+<script type="text/javascript" src="/ux/plugins/summernote/summernote.js?v=2020103001"></script>
|
|
|
|
|
+<script type="text/javascript" src="/ux/plugins/gaga/gaga.summernote.js?v=2021072201"></script>
|
|
|
|
|
+<script th:inline="javascript">
|
|
|
|
|
+/*<![CDATA[*/
|
|
|
|
|
+
|
|
|
|
|
+ var sessRoleCd = [[${sessionInfo.roleCd}]];
|
|
|
|
|
+ var formalGbList = gagajf.convertToArray([[${formalGbList}]]);
|
|
|
|
|
+ var goodsStatList = gagajf.convertToArray([[${goodsStatList}]]);
|
|
|
|
|
+ var itemkindList = gagajf.convertToArray([[${itemkindList}]]);
|
|
|
|
|
+ var authBrandList = [[${authBrandList}]];
|
|
|
|
|
+ var useYnList = gagajf.convertToArray([[${useYnList}]]);
|
|
|
|
|
+ var goodsTypeList = gagajf.convertToArray([[${goodsTypeList}]]);
|
|
|
|
|
+ // Get a SmartEditor options
|
|
|
|
|
+ //var seOptions = gagaSe.getEditorOptions();
|
|
|
|
|
+
|
|
|
|
|
+ // specify the columns - 상품변경이력
|
|
|
|
|
+ var columnGoodsHstoryDefs = [
|
|
|
|
|
+ {headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
|
|
|
|
|
+ {headerName: "변경일자", field: "regDt", width: 130, cellClass: 'text-center' ,
|
|
|
|
|
+ cellRenderer: function(params) {
|
|
|
|
|
+ return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmm").format("YYYY-MM-DD HH:mm") : '';
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "변경자", field: "regNm", width: 100, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "판매가", field: "currPrice" , width: 100, cellClass: 'text-right'
|
|
|
|
|
+ ,valueFormatter: function(params) { return Number(params.value).addComma();}
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "변경전판매가", field: "currBprice" , width: 100, cellClass: 'text-right'
|
|
|
|
|
+ ,valueFormatter: function(params) { return Number(params.value).addComma(); }
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "상품상태", field: "goodsStat" , width: 100, cellClass: 'text-center',
|
|
|
|
|
+ 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: "goodsNm" , width: 180, cellClass: 'text-left'},
|
|
|
|
|
+ {headerName: "상품타이틀", field: "goodsTnm" , width: 180, cellClass: 'text-left'},
|
|
|
|
|
+ /* {headerName: "상품검색어", field: "goodsSnm" , width: 180, cellClass: 'text-left'}, */
|
|
|
|
|
+ {headerName: "정상이월구분", field: "formalGb" , width: 100, cellClass: 'text-center',
|
|
|
|
|
+ cellEditorParams: { values: gagaAgGrid.extractValues(formalGbList) },
|
|
|
|
|
+ valueFormatter: function (params) { return gagaAgGrid.lookupValue(formalGbList, params.value); },
|
|
|
|
|
+ valueParser: function (params) { return gagaAgGrid.lookupKey(formalGbList, params.newValue); }
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "품목", field: "itemkindCd" , width: 180, cellClass: 'text-left',
|
|
|
|
|
+ cellEditorParams: { values: gagaAgGrid.extractValues(itemkindList) },
|
|
|
|
|
+ valueFormatter: function (params) { return gagaAgGrid.lookupValue(itemkindList, params.value); },
|
|
|
|
|
+ valueParser: function (params) { return gagaAgGrid.lookupKey(itemkindList, params.newValue); }
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "최초승인일자", field: "frstCfrmDt", width: 150, cellClass: 'text-center' ,
|
|
|
|
|
+ cellRenderer: function(params) {
|
|
|
|
|
+ return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "재고연동여부", field: "erpStockLinkYn" , width: 100, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "자사몰노출여부", field: "selfMallYn" , width: 120, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "선물주문여부", field: "giftPackYn" , width: 120, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "판매수수료율", field: "sellFeeRate" , width: 120, cellClass: 'text-right'},
|
|
|
|
|
+ {headerName: "사용자검색어", field: "goodsSnm1" , width: 150, cellClass: 'text-left'},
|
|
|
|
|
+ {headerName: "검색어", field: "goodsSnm" , width: 450, cellClass: 'text-left', tooltipField: "goodsSnm"}
|
|
|
|
|
+ ];
|
|
|
|
|
+
|
|
|
|
|
+ // specify the columns - 구성상품
|
|
|
|
|
+ var columnGoodsComposeDefs = [
|
|
|
|
|
+ {headerName: "정렬", field: "dispOrd", width: 70 ,hide: false, cellClass: 'text-center', rowDrag: true },
|
|
|
|
|
+ {headerName: "CRUD", field: "crud", width: 75, minWidth: 75, hide: true},
|
|
|
|
|
+ //{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
|
|
|
|
|
+ {headerName: "이미지", field: "sysImgNm", width: 100, height: 60, cellClass: 'text-center'
|
|
|
|
|
+ ,cellRenderer: function(params) {
|
|
|
|
|
+ return '<img width="60" src="'+ _goodsUrl+ "/" + params.value +'?RS=60" alt="" onclick="cfnOpenImagePreViewPopup(\'goodsImgView\', \''+ _goodsUrl+ "/" + params.value +'?RS=60\')" onerror="this.src=\'/image/no.png\';"/>';
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "상품타입", field: "goodsType" , width: 100, cellClass: 'text-center',
|
|
|
|
|
+ cellEditorParams: { values: gagaAgGrid.extractValues(goodsTypeList) },
|
|
|
|
|
+ valueFormatter: function (params) { return gagaAgGrid.lookupValue(goodsTypeList, params.value); },
|
|
|
|
|
+ valueParser: function (params) { return gagaAgGrid.lookupKey(goodsTypeList, params.newValue); }
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "구성상품코드", field: "compsGoodsCd" , width: 130, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "구성상품코드명", field: "compsGoodsNm" , width: 200, cellClass: 'text-left'},
|
|
|
|
|
+ //{headerName: "순서", field: "dispOrd" , width: 80, cellClass: 'text-right',editable: true, required: true},
|
|
|
|
|
+ {headerName: "수량", field: "qty" , width: 80, cellClass: 'text-right'
|
|
|
|
|
+ ,valueFormatter: function(params) { return Number(params.value).addComma();}
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "판매가", field: "currPrice" , width: 100, cellClass: 'text-right'
|
|
|
|
|
+ ,valueFormatter: function(params) { return Number(params.value).addComma();}
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "상품판매가", field: "compsCurrPrice" , width: 100, cellClass: 'text-right'
|
|
|
|
|
+ ,valueFormatter: function(params) { return Number(params.value).addComma();}, editable: true, required: true,
|
|
|
|
|
+ cellEditor: 'textCellEditor',
|
|
|
|
|
+ cellEditorParams: { maxlength: 14, validType: 'numeric'}
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "상품판매가ORG", field: "compsCurrPriceOrg" , width: 100, cellClass: 'text-right', hide: true},
|
|
|
|
|
+ {headerName: "기준여부(품목-카테고리)", field: "baseYn", width: 160, cellClass: 'text-center'
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "대표여부(가격)", field: "repYn", width: 160, cellClass: 'text-center',editable: true,
|
|
|
|
|
+ cellEditor: 'agRichSelectCellEditor',
|
|
|
|
|
+ cellEditorParams: { values: gagaAgGrid.extractValues(useYnList), required: true },
|
|
|
|
|
+ valueFormatter: function (params) { return gagaAgGrid.lookupValue(useYnList, params.value); },
|
|
|
|
|
+ valueParser: function (params) { return gagaAgGrid.lookupKey(useYnList, params.newValue); }
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "대표상품", field: "repGoodsCd" , width: 100, cellClass: 'text-right', hide: true},
|
|
|
|
|
+ {headerName: "전시여부", field: "useYn", width: 100, cellClass: 'text-center',editable: true,
|
|
|
|
|
+ cellEditor: 'agRichSelectCellEditor',
|
|
|
|
|
+ cellEditorParams: { values: gagaAgGrid.extractValues(useYnList), required: true },
|
|
|
|
|
+ valueFormatter: function (params) { return gagaAgGrid.lookupValue(useYnList, params.value); },
|
|
|
|
|
+ valueParser: function (params) { return gagaAgGrid.lookupKey(useYnList, params.newValue); }
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "옵션명(딜상품용)", field: "compsGoodsOptNm" , width: 200, cellClass: 'text-left',editable: true, required: true},
|
|
|
|
|
+ {headerName: "상품상태", field: "goodsStat" , width: 100, cellClass: 'text-center',
|
|
|
|
|
+ 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: "regDt", width: 140, cellClass: 'text-center' ,
|
|
|
|
|
+ cellRenderer: function(params) {
|
|
|
|
|
+ return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "등록자", field: "regNm", width: 100, cellClass: 'text-center'},
|
|
|
|
|
+ {headerName: "수정일시", field: "updDt", width: 140, cellClass: 'text-center' ,
|
|
|
|
|
+ cellRenderer: function(params) {
|
|
|
|
|
+ return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {headerName: "수정자", field: "updNm", width: 100, cellClass: 'text-center'}
|
|
|
|
|
+ ];
|
|
|
|
|
+
|
|
|
|
|
+ // Get GridOptions
|
|
|
|
|
+ var gridGoodsHstoryOptions = gagaAgGrid.getGridOptions(columnGoodsHstoryDefs);
|
|
|
|
|
+ gridGoodsHstoryOptions.enableBrowserTooltips = true;
|
|
|
|
|
+ var gridGoodsComposeOptions = gagaAgGrid.getGridOptions(columnGoodsComposeDefs);
|
|
|
|
|
+ gridGoodsComposeOptions.enableBrowserTooltips = true;
|
|
|
|
|
+
|
|
|
|
|
+ // 드래그
|
|
|
|
|
+ gridGoodsComposeOptions.suppressRowClickSelection = true;
|
|
|
|
|
+ gridGoodsComposeOptions.rowDragManaged = true;
|
|
|
|
|
+ gridGoodsComposeOptions.stopEditingWhenGridLosesFocus = true;
|
|
|
|
|
+ //gridGoodsComposeOptions.rowDeselection = true;
|
|
|
|
|
+ //gridGoodsComposeOptions.enableMultiRowDragging = true;
|
|
|
|
|
+ //gridGoodsComposeOptions.rowSelection = 'multiple';
|
|
|
|
|
+
|
|
|
|
|
+ gridGoodsComposeOptions.rowHeight = 60; //이미지가 있을경우 높이 지정해야함.
|
|
|
|
|
+
|
|
|
|
|
+ //기준여부 표시
|
|
|
|
|
+ gridGoodsComposeOptions.getRowStyle = function(params) {
|
|
|
|
|
+ if ("Y" == params.data.baseYn) {
|
|
|
|
|
+ return { background: '#1ab394' };
|
|
|
|
|
+ }else{
|
|
|
|
|
+ return { background: '#ffffff' };
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // Row
|
|
|
|
|
+ gridGoodsComposeOptions.onCellValueChanged = function(event) {
|
|
|
|
|
+ var rowIdx = null;
|
|
|
|
|
+ var isChangColor = true;
|
|
|
|
|
+ if (event.colDef.field == "baseYn"){
|
|
|
|
|
+ if (event.data.baseYn == "Y"){
|
|
|
|
|
+ rowIdx = event.rowIndex;
|
|
|
|
|
+
|
|
|
|
|
+ //다른 기준여부 'Y'가 존재하는지 확인
|
|
|
|
|
+ gridGoodsComposeOptions.api.forEachNode(function(rowNode, index) {
|
|
|
|
|
+ if (rowNode.data.baseYn == "Y" && index != rowIdx){
|
|
|
|
|
+ event.data.baseYn = event.oldValue;
|
|
|
|
|
+ gridGoodsComposeOptions.api.updateRowData({update: [event.data]});
|
|
|
|
|
+ isChangColor = false;
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ if (!isChangColor){
|
|
|
|
|
+ mcxDialog.alert('다른 구성상품에 기준여부가 선택되어 있습니다.');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=goodsType]").val() == "G056_D"){
|
|
|
|
|
+ isChangColor = true;
|
|
|
|
|
+ if (event.colDef.field == "repYn"){
|
|
|
|
|
+ if (event.data.repYn == "Y"){
|
|
|
|
|
+ rowIdx = event.rowIndex;
|
|
|
|
|
+
|
|
|
|
|
+ //다른 대표여부 'Y'가 존재하는지 확인
|
|
|
|
|
+ gridGoodsComposeOptions.api.forEachNode(function(rowNode, index) {
|
|
|
|
|
+ if (rowNode.data.repYn == "Y" && index != rowIdx){
|
|
|
|
|
+ event.data.repYn = event.oldValue;
|
|
|
|
|
+ gridGoodsComposeOptions.api.updateRowData({update: [event.data]});
|
|
|
|
|
+ isChangColor = false;
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ if (!isChangColor){
|
|
|
|
|
+ mcxDialog.alert('다른 구성상품에 대표여부가 선택되어 있습니다.');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 상품상세 조회
|
|
|
|
|
+ var fnGoodsDeailSearch = function() {
|
|
|
|
|
+
|
|
|
|
|
+ $('#goodsDetailForm').find('.tabs .tabsNav li a').attr("style", "color:#888;"); //탭색 초기화
|
|
|
|
|
+
|
|
|
|
|
+ var params = new Object();
|
|
|
|
|
+ params.mode = $('#goodsDetailForm input[name=mode]').val();
|
|
|
|
|
+ params.goodsCd = $('#goodsDetailForm input[name=goodsCd]').val();
|
|
|
|
|
+
|
|
|
|
|
+ cfnAjaxSubmit("/goods/detail", "json", fnGoodDetailSearchCallback, params);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ var fnGoodDetailSearchCallback = function(result) {
|
|
|
|
|
+
|
|
|
|
|
+ $('#goodsDetailForm').find(".tabsNav > li").removeClass('on');
|
|
|
|
|
+ $('#goodsDetailForm').find(".tabsNav > li").eq(0).addClass('on');
|
|
|
|
|
+ $('#goodsDetailForm').find(".tabsCont > li").removeClass('on');
|
|
|
|
|
+ $('#goodsDetailForm').find(".tabsCont > li").eq(0).addClass('on');
|
|
|
|
|
+
|
|
|
|
|
+ if (result != null){
|
|
|
|
|
+ //기본정보
|
|
|
|
|
+ $('#goodsDetailForm select[name=selSupplyCompCd]').val(result.supplyCompCd);
|
|
|
|
|
+ $('#goodsDetailForm input[name=supplyCompCd]').val(result.supplyCompCd);
|
|
|
|
|
+ $('#goodsDetailForm input[name=brandCd]').val(result.brandCd);
|
|
|
|
|
+ fnBrand(result.supplyCompCd, result.brandCd);
|
|
|
|
|
+
|
|
|
|
|
+ $('#goodsDetailForm').find('#goodsCdTxt').html(result.goodsCd + ' (' + result.productCode + ')');
|
|
|
|
|
+ $('#goodsDetailForm').find('#supplyGoodsCdTxt').html(result.supplyGoodsCd);
|
|
|
|
|
+
|
|
|
|
|
+ $("#goodsDetailForm input[name=goodsImageYn]").val(result.goodsImageYn);
|
|
|
|
|
+ $("#goodsDetailForm input[name=niClsfCd]").val(result.niClsfCd); // 품목의 고시분류
|
|
|
|
|
+ //$("#goodsDetailForm select[name=selNiClsfCd]").val(result.niClsfCd);
|
|
|
|
|
+ $("#goodsDetailForm input[name=selfGoodsYn]").val(result.selfGoodsYn);
|
|
|
|
|
+ $('#goodsDetailForm').find('#goodsNumTxt').html(result.goodsNum);
|
|
|
|
|
+ $('#goodsDetailForm input[name=goodsNum]').val(result.goodsNum);
|
|
|
|
|
+ $('#goodsDetailForm select[name=goodsStat]').val(result.goodsStat);
|
|
|
|
|
+ $("#goodsDetailForm input[name=goodsStatOrg]").val(result.goodsStat);
|
|
|
|
|
+ $('#goodsDetailForm').find('#brandGrpNmTxt').html(result.brandGrpNm);
|
|
|
|
|
+
|
|
|
|
|
+ $('#goodsDetailForm select[name=itemkindCd]').val(result.itemkindCd);
|
|
|
|
|
+ $('#goodsDetailForm input[name=orgItemkindCd]').val(result.itemkindCd);
|
|
|
|
|
+ $('#goodsDetailForm select[name=seasonCd]').val(result.seasonCd);
|
|
|
|
|
+ $('#goodsDetailForm input[name=seasonCdOrg]').val(result.seasonCd);
|
|
|
|
|
+ $('#goodsDetailForm select[name=sexGb]').val(result.sexGb);
|
|
|
|
|
+ $('#goodsDetailForm input[name=sexGbOrg]').val(result.sexGb);
|
|
|
|
|
+ $('#goodsDetailForm').find('#makeNmTxt').html(result.originNm);
|
|
|
|
|
+ $('#goodsDetailForm').find('#styleYearTxt').html(result.styleYear);
|
|
|
|
|
+ $('#goodsDetailForm select[name=goodsGb]').val(result.goodsGb);
|
|
|
|
|
+ $('#goodsDetailForm input[name=goodsGbOrg]').val(result.goodsGb);
|
|
|
|
|
+ $('#goodsDetailForm input[name=mainColorCd]').val(result.mainColorCd);
|
|
|
|
|
+
|
|
|
|
|
+ $("#goodsDetailForm input[name=goodsNm]").val(result.goodsNm);
|
|
|
|
|
+ $('#goodsDetailForm input[name=goodsNmOrg]').val(result.goodsNm);
|
|
|
|
|
+ fnDataLengthCheck('goodsNm',200);
|
|
|
|
|
+ $("#goodsDetailForm input[name=goodsTnm]").val(result.goodsTnm);
|
|
|
|
|
+ $('#goodsDetailForm input[name=goodsTnmOrg]').val(result.goodsTnm);
|
|
|
|
|
+ fnDataLengthCheck('goodsTnm',100);
|
|
|
|
|
+ $("#goodsDetailForm input[name=goodsSnm1]").val(result.goodsSnm1);
|
|
|
|
|
+ $("#goodsDetailForm input[name=goodsSnm1Org]").val(result.goodsSnm1);
|
|
|
|
|
+ fnDataLengthCheck('goodsSnm1',200);
|
|
|
|
|
+ $("#goodsDetailForm textarea[name=goodsSnmTxt]").val(result.goodsSnm);
|
|
|
|
|
+ $("#goodsDetailForm input[name=goodsSnm]").val(result.goodsSnm);
|
|
|
|
|
+ $('#goodsDetailForm input[name=listPrice]').val(result.listPrice.addComma());
|
|
|
|
|
+ $('#goodsDetailForm input[name=listPriceOrg]').val(result.listPrice);
|
|
|
|
|
+ $('#goodsDetailForm input[name=currPrice]').val(result.currPrice.addComma());
|
|
|
|
|
+ $('#goodsDetailForm input[name=currPriceOrg]').val(result.currPrice);
|
|
|
|
|
+ $('#goodsDetailForm').find('#dcRateTxt').html(result.dcRate);
|
|
|
|
|
+ $('#goodsDetailForm input[name=dcRate]').val(result.dcRate);
|
|
|
|
|
+ $('#goodsDetailForm input[name=costPrice]').val(result.costPrice.addComma());
|
|
|
|
|
+ $('#goodsDetailForm input[name=costPriceOrg]').val(result.costPrice);
|
|
|
|
|
+ $('#goodsDetailForm').find('#priceUpdDtTxt').html(!gagajf.isNull(result.priceUpdDt) ? result.priceUpdDt.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD") : '');
|
|
|
|
|
+ $('#goodsDetailForm').find('#frstCfrmDtTxt').html(!gagajf.isNull(result.frstCfrmDt) ? result.frstCfrmDt.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD") : '');
|
|
|
|
|
+
|
|
|
|
|
+ $('#goodsDetailForm select[name=distributionGb]').val(result.distributionGb);
|
|
|
|
|
+ $("#goodsDetailForm input[name=distributionGbOrg]").val(result.distributionGb);
|
|
|
|
|
+ $('#goodsDetailForm select[name=ageGrpCd]').val(result.ageGrpCd);
|
|
|
|
|
+ $("#goodsDetailForm input[name=ageGrpCdOrg]").val(result.ageGrpCd);
|
|
|
|
|
+ $('#goodsDetailForm select[name=taxGb]').val(result.taxGb);
|
|
|
|
|
+
|
|
|
|
|
+ $("#goodsDetailForm input[type=radio]").parent().removeClass("checked");
|
|
|
|
|
+ $("#goodsDetailForm input[type=radio]").removeAttr('checked');
|
|
|
|
|
+
|
|
|
|
|
+ if (result.formalGb == "G009_20"){
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=formalGb]:input[value='G009_20']").trigger('click');
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=formalGb]:input[value='G009_10']").trigger('click');
|
|
|
|
|
+ }
|
|
|
|
|
+ if (result.erpPriceLinkYn == "Y"){
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=erpPriceLinkYn]:input[value='Y']").trigger('click');
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=erpPriceLinkYn]:input[value='N']").trigger('click');
|
|
|
|
|
+ }
|
|
|
|
|
+ if (result.selfMallYn == "Y"){
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=selfMallYn]:input[value='Y']").trigger('click');
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=selfMallYn]:input[value='N']").trigger('click');
|
|
|
|
|
+ }
|
|
|
|
|
+ if (result.giftPackYn == "Y"){
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=giftPackYn]:input[value='Y']").trigger('click');
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=giftPackYn]:input[value='N']").trigger('click');
|
|
|
|
|
+ }
|
|
|
|
|
+ if (result.returnableYn == "Y"){
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=returnableYn]:input[value='Y']").trigger('click');
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=returnableYn]:input[value='N']").trigger('click');
|
|
|
|
|
+ }
|
|
|
|
|
+ if (result.changeableYn == "Y"){
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=changeableYn]:input[value='Y']").trigger('click');
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=changeableYn]:input[value='N']").trigger('click');
|
|
|
|
|
+ }
|
|
|
|
|
+ if (result.newCustOrdYn == "Y"){
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=newCustOrdYn]:input[value='Y']").trigger('click');
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=newCustOrdYn]:input[value='N']").trigger('click');
|
|
|
|
|
+ }
|
|
|
|
|
+ if (result.adultYn == "Y"){
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=adultYn]:input[value='Y']").trigger('click');
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=adultYn]:input[value='N']").trigger('click');
|
|
|
|
|
+ }
|
|
|
|
|
+ if (result.foreignBuyYn == "Y"){
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=foreignBuyYn]:input[value='Y']").trigger('click');
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=foreignBuyYn]:input[value='N']").trigger('click');
|
|
|
|
|
+ }
|
|
|
|
|
+ if (result.parallelImportYn == "Y"){
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=parallelImportYn]:input[value='Y']").trigger('click');
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=parallelImportYn]:input[value='N']").trigger('click');
|
|
|
|
|
+ }
|
|
|
|
|
+ if (result.orderMadeYn == "Y"){
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=orderMadeYn]:input[value='Y']").trigger('click');
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=orderMadeYn]:input[value='N']").trigger('click');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ $('#goodsDetailForm input[name=sellFeeRate]').val(result.sellFeeRate);
|
|
|
|
|
+ $("#goodsDetailForm input[name=sellFeeRateOrg]").val(result.sellFeeRate);
|
|
|
|
|
+
|
|
|
|
|
+ if (result.prePpntUsableYn == "Y"){
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=prePpntUsableYn]:input[value='Y']").trigger('click');
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=prePpntUsableYn]:input[value='N']").trigger('click');
|
|
|
|
|
+ }
|
|
|
|
|
+ if (result.preMpntUsableYn == "Y"){
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=preMpntUsableYn]:input[value='Y']").trigger('click');
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=preMpntUsableYn]:input[value='N']").trigger('click');
|
|
|
|
|
+ }
|
|
|
|
|
+ if (result.changeableYn == "Y"){
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=changeableYn]:input[value='Y']").trigger('click');
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=changeableYn]:input[value='N']").trigger('click');
|
|
|
|
|
+ }
|
|
|
|
|
+ if (result.tobeFormYn == "Y"){
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=tobeFormYn]:input[value='Y']").trigger('click');
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=tobeFormYn]:input[value='N']").trigger('click');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ $("#goodsDetailForm input[name=formalGbOrg]").val(result.formalGb);
|
|
|
|
|
+ $("#goodsDetailForm input[name=foreignBuyYnOrg]").val(result.foreignBuyYn);
|
|
|
|
|
+ $("#goodsDetailForm input[name=parallelImportYnOrg]").val(result.parallelImportYn);
|
|
|
|
|
+ $("#goodsDetailForm input[name=orderMadeYnOrg]").val(result.orderMadeYn);
|
|
|
|
|
+ $("#goodsDetailForm input[name=erpPriceLinkYnOrg]").val(result.erpPriceLinkYn);
|
|
|
|
|
+ $("#goodsDetailForm input[name=selfMallYnOrg]").val(result.selfMallYn);
|
|
|
|
|
+ $("#goodsDetailForm input[name=giftPackYnOrg]").val(result.giftPackYn);
|
|
|
|
|
+ $("#goodsDetailForm input[name=prePpntUsableYnOrg]").val(result.prePpntUsableYn);
|
|
|
|
|
+ $("#goodsDetailForm input[name=preMpntUsableYnOrg]").val(result.preMpntUsableYn);
|
|
|
|
|
+ $("#goodsDetailForm input[name=changeableYnOrg]").val(result.changeableYn);
|
|
|
|
|
+ $("#goodsDetailForm input[name=returnableYnOrg]").val(result.returnableYn);
|
|
|
|
|
+ $("#goodsDetailForm input[name=newCustOrdYnOrg]").val(result.newCustOrdYn);
|
|
|
|
|
+
|
|
|
|
|
+ if(!gagajf.isNull(result.newCustOrdStdt)){
|
|
|
|
|
+ $('#goodsDetailForm input[name=newCustOrdStdt]').val(result.newCustOrdStdt.toDate("YYYYMMDD").format("YYYY-MM-DD") );
|
|
|
|
|
+ $('#goodsDetailForm input[name=newCustOrdEddt]').val(result.newCustOrdEddt.toDate("YYYYMMDD").format("YYYY-MM-DD") );
|
|
|
|
|
+ $('#goodsDetailForm input[name=newCustOrdStdtOrg]').val(result.newCustOrdStdt.toDate("YYYYMMDD").format("YYYY-MM-DD") );
|
|
|
|
|
+ $('#goodsDetailForm input[name=newCustOrdEddtOrg]').val(result.newCustOrdEddt.toDate("YYYYMMDD").format("YYYY-MM-DD") );
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $('#goodsDetailForm input[name=newCustOrdStdtOrg]').val('');
|
|
|
|
|
+ $('#goodsDetailForm input[name=newCustOrdEddtOrg]').val('');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ $("#goodsDetailForm input[name=adultYnOrg]").val(result.adultYn);
|
|
|
|
|
+ $("#goodsDetailForm input[name=tobeFormYnOrg]").val(result.tobeFormYn);
|
|
|
|
|
+
|
|
|
|
|
+ $("#goodsDetailForm input[type=radio][checked]").addClass("checked");
|
|
|
|
|
+ //$("#goodsDetailForm input[type=radio][checked]").parent("label").addClass("checked");
|
|
|
|
|
+
|
|
|
|
|
+ //입점상품일 경우
|
|
|
|
|
+ if (result.selfGoodsYn == "N"){
|
|
|
|
|
+ $("#goodsDetailForm").find("#selfGoodsDpTitle").html('원코드');
|
|
|
|
|
+ $("#goodsDetailForm").find("#selfGoodsDpTxt").html('<div id="supplyGoodsCdTxt"></div>');
|
|
|
|
|
+ $('#goodsDetailForm').find('#supplyGoodsCdTxt').html(result.supplyGoodsCd);
|
|
|
|
|
+ $('#goodsDetailForm select[name=distributionGb]').attr('readonly', true);
|
|
|
|
|
+ }
|
|
|
|
|
+ $('#goodsDetailForm input[name=delvFee]').val(result.delvFee.addComma());
|
|
|
|
|
+ $('#goodsDetailForm input[name=pntPrate]').val(result.pntPrate);
|
|
|
|
|
+ $('#goodsDetailForm input[name=pntPrateOrg]').val(result.pntPrate);
|
|
|
|
|
+ $('#goodsDetailForm input[name=pntMrate]').val(result.pntMrate);
|
|
|
|
|
+ $('#goodsDetailForm input[name=pntMrateOrg]').val(result.pntMrate);
|
|
|
|
|
+ $('#goodsDetailForm input[name=minOrdAmt]').val(result.minOrdAmt.addComma());
|
|
|
|
|
+ $('#goodsDetailForm input[name=minOrdQty]').val(result.minOrdQty);
|
|
|
|
|
+ $('#goodsDetailForm input[name=minOrdQtyOrg]').val(result.minOrdQty);
|
|
|
|
|
+ $('#goodsDetailForm input[name=maxOrdQty]').val(result.maxOrdQty);
|
|
|
|
|
+ $('#goodsDetailForm input[name=maxOrdQtyOrg]').val(result.maxOrdQty);
|
|
|
|
|
+ $('#goodsDetailForm input[name=dayMaxOrdQty]').val(result.dayMaxOrdQty);
|
|
|
|
|
+ $('#goodsDetailForm input[name=dayMaxOrdQtyOrg]').val(result.dayMaxOrdQty);
|
|
|
|
|
+ $('#goodsDetailForm input[name=goodsType]').val(result.goodsType);
|
|
|
|
|
+ $("#goodsDetailForm").find("#goodsTypeNm").html(result.goodsTypeNm);
|
|
|
|
|
+ if ("G056_D" == result.goodsType){
|
|
|
|
|
+ $("#goodsDetailForm").find("#goodsTypeNm2").html(result.goodsTypeNm);
|
|
|
|
|
+ }
|
|
|
|
|
+ $('#goodsDetailForm input[name=sellStdt]').val(result.sellStdt);
|
|
|
|
|
+ $('#goodsDetailForm input[name=sellStYMD]').val(result.sellStdt.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD") );
|
|
|
|
|
+ $('#goodsDetailForm input[name=sellStHH]').val(result.sellStdt.toDate("YYYYMMDDHHmmss").format("HH") );
|
|
|
|
|
+ $('#goodsDetailForm input[name=sellEddt]').val(result.sellEddt);
|
|
|
|
|
+ $('#goodsDetailForm input[name=sellEdYMD]').val(result.sellEddt.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD") );
|
|
|
|
|
+ $('#goodsDetailForm input[name=sellEdHH]').val(result.sellEddt.toDate("YYYYMMDDHHmmss").format("HH") );
|
|
|
|
|
+
|
|
|
|
|
+ //cfnCreateCombo('/renderer/delvFee/list/' + result.supplyCompCd, $('#goodsDetailForm select[name=delvFeeCd]'), "[선택]", result.delvFeeCd);
|
|
|
|
|
+ cfnCreateDelvPolicyCombo( result.supplyCompCd, $('#goodsDetailForm select[name=delvFeeCd]'), "[선택]", result.delvFeeCd);
|
|
|
|
|
+ $('#goodsDetailForm input[name=delvFeeCdOrg]').val(result.delvFeeCd);
|
|
|
|
|
+ cfnCreateCombo('/renderer/delvloc/list/' + result.supplyCompCd, $('#goodsDetailForm select[name=delvLocCd]'), "[선택]", result.delvLocCd);
|
|
|
|
|
+ $('#goodsDetailForm input[name=delvLocCdOrg]').val(result.delvLocCd);
|
|
|
|
|
+
|
|
|
|
|
+ // $('#goodsDetailForm input[name=certNum]').val(result.certNum);
|
|
|
|
|
+ // $('#goodsDetailForm input[name=certNumOrg]').val(result.certNum);
|
|
|
|
|
+
|
|
|
|
|
+ //상품상세
|
|
|
|
|
+ $('#goodsDetailForm input[name=goodsTitlesDesc]').val(result.goodsTitlesDesc);
|
|
|
|
|
+ // Summernote에 값 세팅
|
|
|
|
|
+ gagaSn.setContents('#goodsContentsDesc', result.goodsContentsDesc);
|
|
|
|
|
+ gagaSn.setContents('#goodsCharacterDesc', result.goodsCharacterDesc);
|
|
|
|
|
+ gagaSn.setContents('#goodsPcTopDesc', result.goodsPcTopDesc);
|
|
|
|
|
+ gagaSn.setContents('#goodsMobileTopDesc', result.goodsMobileTopDesc);
|
|
|
|
|
+ gagaSn.setContents('#goodsPcDownDesc', result.goodsPcDownDesc);
|
|
|
|
|
+ gagaSn.setContents('#goodsMobileDownDesc', result.goodsMobileDownDesc);
|
|
|
|
|
+
|
|
|
|
|
+ // asis html 변경
|
|
|
|
|
+ //gagaSn.setContents('#goodsDesc', result.goodsDesc);
|
|
|
|
|
+ gagaSn.setContents('#goodsDesc', result.goodsDesc.replaceAll('src="/Upload' , 'src="'+_imgUrl+'/Local'));
|
|
|
|
|
+
|
|
|
|
|
+ if (!gagajf.isNull(result.niClsfNm)){
|
|
|
|
|
+ $('#goodsDetailForm').find('#itemkindNoti').html('품목기준 고시분류 : ' + result.niClsfNm);
|
|
|
|
|
+ // $('#goodsDetailForm input[name=niClsfNm]').val(result.niClsfNm);
|
|
|
|
|
+ // var objNotiInfo = $("#goodsDetailForm select[name=selNiClsfCd] option");
|
|
|
|
|
+ // for(var i=0;i<objNotiInfo.length; i++ ){
|
|
|
|
|
+ // if (objNotiInfo.eq(i).text() == result.niClsfNm){
|
|
|
|
|
+ // objNotiInfo.eq(i).prop("selected","true");
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ $('#goodsDetailForm').find('#goodsImgUrl').attr('src', _goodsUrl + '/'+ result.sysImgNm +'?RS=130');
|
|
|
|
|
+ $('#goodsDetailForm input[name=sysImgNm]').val(result.sysImgNm);
|
|
|
|
|
+ $("#goodsDetailForm input[type=checkbox][checked]").parent("label").addClass("checked");
|
|
|
|
|
+
|
|
|
|
|
+ //품목변경 권한 관련 처리
|
|
|
|
|
+ //md권한
|
|
|
|
|
+ if(sessRoleCd == "G001_A101" || sessRoleCd == "G001_B000"){
|
|
|
|
|
+ var roleFlag = "N";
|
|
|
|
|
+ $.each(authBrandList, function(idx, item) {
|
|
|
|
|
+ if (result.brandCd == item.cd ){
|
|
|
|
|
+ roleFlag = "Y";
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ if (roleFlag == "N"){
|
|
|
|
|
+ $('#goodsDetailForm select[name=itemkindCd]').attr('disabled',true);
|
|
|
|
|
+ $('#goodsDetailForm #btnGoodsItemkindChange').addClass('off');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //상품 구분에 따른 컬럼 사용여부처리 start
|
|
|
|
|
+ //세트
|
|
|
|
|
+ if ("G056_S" == result.goodsType){
|
|
|
|
|
+ if (result.selfGoodsYn == "Y") $('#goodsDetailForm #goodsComposeTab').css('display','block');
|
|
|
|
|
+ $('#goodsDetailForm #goodsNotiTab').css('display','none');
|
|
|
|
|
+ $('#goodsDetailForm #goodsSafeTab').css('display','none');
|
|
|
|
|
+ $('#goodsDetailForm input[name=sellFeeRate]').attr('readonly', true);
|
|
|
|
|
+ $('#goodsDetailForm input[name=listPrice]').attr('readonly', true);
|
|
|
|
|
+ $('#goodsDetailForm input[name=currPrice]').attr('readonly', true);
|
|
|
|
|
+ }else if ("G056_D" == result.goodsType){
|
|
|
|
|
+ $('#goodsDetailForm #goodsComposeTab').css('display','block');
|
|
|
|
|
+ $('#goodsDetailForm #goodsDescTab').css('display','none');
|
|
|
|
|
+ $('#goodsDetailForm #goodsNotiTab').css('display','none');
|
|
|
|
|
+ $('#goodsDetailForm #goodsSafeTab').css('display','none');
|
|
|
|
|
+ $('#goodsDetailForm input[name=sellFeeRate]').attr('readonly', true);
|
|
|
|
|
+
|
|
|
|
|
+ // 딜상품인 경우 항목 숨김처리
|
|
|
|
|
+ $('.chk_deal').hide();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //상품 구분에 따른 컬럼 사용여부처리 end
|
|
|
|
|
+
|
|
|
|
|
+ var params = new Object();
|
|
|
|
|
+ params.mode = $('#goodsDetailForm input[name=mode]').val();
|
|
|
|
|
+ params.goodsCd = result.goodsCd;
|
|
|
|
|
+ params.brandCd = result.brandCd;
|
|
|
|
|
+ params.supplyCompCd = result.supplyCompCd;
|
|
|
|
|
+ //params.niClsfCd = result.niClsfCd;
|
|
|
|
|
+ params.goodsType = result.goodsType;
|
|
|
|
|
+ params.erpPriceLinkYn = result.erpPriceLinkYn;
|
|
|
|
|
+
|
|
|
|
|
+ //옵셥 재고(ajax html)
|
|
|
|
|
+ fnGoodsDetailSizeStockSearch(params);
|
|
|
|
|
+ //정보고시
|
|
|
|
|
+ fnGoodsDetailNotiInfoSearch(params);
|
|
|
|
|
+ //구매등급
|
|
|
|
|
+ fnGoodsDetailOrderGradeSearch(params);
|
|
|
|
|
+ //안전인증
|
|
|
|
|
+ fnGoodsDetailSafeNoSearch();
|
|
|
|
|
+ //구성상품
|
|
|
|
|
+ if ("G056_S" == result.goodsType || "G056_D" == result.goodsType){
|
|
|
|
|
+ fnGoodsComposeListSearch(params);
|
|
|
|
|
+ }
|
|
|
|
|
+ //이력
|
|
|
|
|
+ fnGoodsDetailHstSearch();
|
|
|
|
|
+ fnUnEscapeHtml(); //XSS변환
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //기본정보탭 변경여부
|
|
|
|
|
+ $('#goodsDetailForm').find('#goodstab1').find("input, select, textarea").on('change', function() {
|
|
|
|
|
+ $('#goodsDetailForm').find('.tabs .tabsNav li:eq(0) a').attr("style", "color:red;");
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //옵셥 재고
|
|
|
|
|
+ var fnGoodsDetailSizeStockSearch = function(params) {
|
|
|
|
|
+ cfnAjaxSubmit("/goods/detail/sizeStock/form", "html", "sizeStockArea", params);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //정보고시
|
|
|
|
|
+ var fnGoodsDetailNotiInfoSearch = function(params) {
|
|
|
|
|
+ cfnAjaxSubmit("/goods/detail/notiInfo/list", "json", fnGoodsDetailNotiInfoSearchCallback, params);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //구매등급
|
|
|
|
|
+ var fnGoodsDetailOrderGradeSearch = function(params) {
|
|
|
|
|
+ cfnAjaxSubmit("/goods/detail/order/grade/list", "json", fnGoodsDetailOrderGradeSearchCallback, params);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //안전인증
|
|
|
|
|
+ var fnGoodsDetailSafeNoSearch = function() {
|
|
|
|
|
+ var params = new Object();
|
|
|
|
|
+ params.goodsCd = $('#goodsDetailForm input[name=goodsCd]').val();
|
|
|
|
|
+ cfnAjaxSubmit("/goods/detail/safe", "json", fnGoodsDetailSafeNoSearchCallback, params);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //구성상품
|
|
|
|
|
+ var fnGoodsComposeListSearch = function(params) {
|
|
|
|
|
+ if ("G056_S" == params.goodsType){ //세트
|
|
|
|
|
+ gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'currPrice', false);
|
|
|
|
|
+ gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'useYn', false);
|
|
|
|
|
+ gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'compsGoodsOptNm', false);
|
|
|
|
|
+ gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'repYn', false);
|
|
|
|
|
+ $('#GoodsComposeBtnArea').addClass("off");
|
|
|
|
|
+ }else{ //딜
|
|
|
|
|
+ gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'qty', false);
|
|
|
|
|
+ gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'compsCurrPrice', false);
|
|
|
|
|
+ gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'compsCurrPriceOrg', false);
|
|
|
|
|
+ }
|
|
|
|
|
+ gagaAgGrid.fetch("/goods/detail/compose/list?goodsCd=" + params.goodsCd , gridGoodsComposeOptions , null, fnGoodsComposeListSearchCallBack);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ var fnGoodsComposeListSearchCallBack = function(){
|
|
|
|
|
+ var allData = gagaAgGrid.getAllRowData(gridGoodsComposeOptions);
|
|
|
|
|
+ $.each(allData, function(index, item) {
|
|
|
|
|
+ if (item.repYn == "Y"){
|
|
|
|
|
+ $("#goodsDetailForm input[name=repGoodsCd]").val(item.repGoodsCd); // 대표상품
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ //이력
|
|
|
|
|
+ var fnGoodsDetailHstSearch = function() {
|
|
|
|
|
+ gagaAgGrid.fetch("/goods/detail/hst/list?goodsCd=" + $('#goodsDetailForm input[name=goodsCd]').val() , gridGoodsHstoryOptions,null,fnChangeGrid);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //정보고시 콜백
|
|
|
|
|
+ var fnGoodsDetailNotiInfoSearchCallback = function(result) {
|
|
|
|
|
+ if (result == null) return;
|
|
|
|
|
+
|
|
|
|
|
+ var notiHtml = "";
|
|
|
|
|
+ var idx = 0;
|
|
|
|
|
+ $('#goodsDetailForm').find('#notiArea').html('');
|
|
|
|
|
+ notiHtml += '<table class="frmStyle">';
|
|
|
|
|
+ notiHtml += '<colgroup><col style="width:20%"/><col/></colgroup>';
|
|
|
|
|
+ notiHtml += '<tbody id="infoContents">\n';
|
|
|
|
|
+ notiHtml += '<tr><th>고시항목</th><th>고시내용</th></tr>';
|
|
|
|
|
+ result.forEach(function(info){
|
|
|
|
|
+
|
|
|
|
|
+ notiHtml += '<tr><th>'+ gagajf.convNull(info.niItemNm, '') +'<input type="hidden" name="niItemCd" value="'+ gagajf.convNull(info.niItemCd, '') +'" />\n<input type="hidden" name="dispOrd" value="'+ gagajf.convNull(info.dispOrd, '') +'" /></th>';
|
|
|
|
|
+ notiHtml += '<td><input type="text" name="niContent" value="'+ gagajf.convNull(info.niContent, '') +'"/></td>\n';
|
|
|
|
|
+ notiHtml += '</tr>\n';
|
|
|
|
|
+
|
|
|
|
|
+ if (idx == 0){
|
|
|
|
|
+ $("#goodsDetailForm select[name=selNiClsfCd]").val(info.niClsfCd);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ idx ++;
|
|
|
|
|
+ });
|
|
|
|
|
+ notiHtml += '</tbody></table>';
|
|
|
|
|
+
|
|
|
|
|
+ $('#goodsDetailForm').find('#notiArea').append(notiHtml);
|
|
|
|
|
+
|
|
|
|
|
+ //고시정보탭 변경여부
|
|
|
|
|
+ $('#goodsDetailForm').find('#goodstab4').find("input, select, textarea").on('change', function() {
|
|
|
|
|
+ $('#goodsDetailForm').find('.tabs .tabsNav li:eq(3) a').attr("style", "color:red;");
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //구매등급 콜백
|
|
|
|
|
+ var fnGoodsDetailOrderGradeSearchCallback = function(result) {
|
|
|
|
|
+ if (result == null) return;
|
|
|
|
|
+
|
|
|
|
|
+ result.forEach(function(info){
|
|
|
|
|
+
|
|
|
|
|
+ $("#goodsDetailForm #goodsCustGradeList").find("input").each(function() {
|
|
|
|
|
+ if (info.custGrade == $(this).val() ){
|
|
|
|
|
+ $(this).prop("checked", true);
|
|
|
|
|
+ $(this).parent("label").addClass("checked");
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //안전인증 콜백
|
|
|
|
|
+ var fnGoodsDetailSafeNoSearchCallback = function(result){
|
|
|
|
|
+ if (result == null) return;
|
|
|
|
|
+
|
|
|
|
|
+ if (result.certTargetGb == "G083_1"){
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=selCertTargetGb]:input[value='G083_1']").trigger('click');
|
|
|
|
|
+ }else if (result.certTargetGb == "G083_2"){
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=selCertTargetGb]:input[value='G083_2']").trigger('click');
|
|
|
|
|
+ }else if (result.certTargetGb == "G083_3"){
|
|
|
|
|
+ $("#goodsDetailForm input:radio[name=selCertTargetGb]:input[value='G083_3']").trigger('click');
|
|
|
|
|
+ }
|
|
|
|
|
+ $("#goodsDetailForm input[name=certTargetGb]").val(result.certTargetGb);
|
|
|
|
|
+ $("#goodsDetailForm select[name=certFormGb]").val(result.certFormGb);
|
|
|
|
|
+ $("#goodsDetailForm input[name=certFormGbOrg]").val(result.certFormGb);
|
|
|
|
|
+ $("#goodsDetailForm select[name=certType]").val(result.certType);
|
|
|
|
|
+ $("#goodsDetailForm input[name=certTypeOrg]").val(result.certType);
|
|
|
|
|
+ $("#goodsDetailForm input[name=certNum]").val(result.certNum);
|
|
|
|
|
+ $("#goodsDetailForm input[name=certNumOrg]").val(result.certNum);
|
|
|
|
|
+ $('#goodsDetailForm').find('#certStateTxt').html(result.certState);
|
|
|
|
|
+ $('#goodsDetailForm').find('#certOrganNameTxt').html(result.certOrganName);
|
|
|
|
|
+ $('#goodsDetailForm').find('#certDivTxt').html(result.certDiv);
|
|
|
|
|
+ $('#goodsDetailForm').find('#certDtTxt').html(!gagajf.isNull(result.certDt) ? result.certDt.toDate("YYYYMMDD").format("YYYY-MM-DD") : '');
|
|
|
|
|
+
|
|
|
|
|
+ if (!gagajf.isNull($("#goodsDetailForm select[name=selCertTargetGb]").val()) ){
|
|
|
|
|
+ if ("G081_1" != $("#goodsDetailForm select[name=certType]").val() && "G081_2" != $("#goodsDetailForm select[name=certType]").val()){
|
|
|
|
|
+ $("#goodsDetailForm input[name=certNum]").attr('readonly', true);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 인증대상 변경시
|
|
|
|
|
+ $("#goodsDetailForm input[name=selCertTargetGb]").bind('click', function () {
|
|
|
|
|
+ var certTargetGb = $(this).val();
|
|
|
|
|
+ if (certTargetGb == "G083_1"){
|
|
|
|
|
+ $("#goodsDetailForm select[name=certFormGb]").attr('readonly', false);
|
|
|
|
|
+ $("#goodsDetailForm select[name=certType]").attr('readonly', false);
|
|
|
|
|
+ $("#goodsDetailForm input[name=certNum]").attr('readonly', false);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $("#goodsDetailForm select[name=certFormGb]").val('');
|
|
|
|
|
+ $("#goodsDetailForm select[name=certType]").val('');
|
|
|
|
|
+ $("#goodsDetailForm input[name=certNum]").val('');
|
|
|
|
|
+ $("#goodsDetailForm select[name=certFormGb]").attr('readonly', true);
|
|
|
|
|
+ $("#goodsDetailForm select[name=certType]").attr('readonly', true);
|
|
|
|
|
+ $("#goodsDetailForm input[name=certNum]").attr('readonly', true);
|
|
|
|
|
+
|
|
|
|
|
+ $("#goodsDetailForm").find("#certStateTxt").html('');
|
|
|
|
|
+ $("#goodsDetailForm").find("#certOrganNameTxt").html('');
|
|
|
|
|
+ $("#goodsDetailForm").find("#certDtTxt").html('');
|
|
|
|
|
+ $("#goodsDetailForm").find("#certDivTxt").html('');
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // 인증타입 변경시
|
|
|
|
|
+ $("#goodsDetailForm select[name=certType]").bind('click change', function () {
|
|
|
|
|
+ var certType = $(this).val();
|
|
|
|
|
+ if (certType == "G081_1" || certType == "G081_2"){
|
|
|
|
|
+ $("#goodsDetailForm input[name=certNum]").attr('readonly', false);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $("#goodsDetailForm input[name=certNum]").val('');
|
|
|
|
|
+ $("#goodsDetailForm input[name=certNum]").attr('readonly', true);
|
|
|
|
|
+
|
|
|
|
|
+ $("#goodsDetailForm").find("#certStateTxt").html('');
|
|
|
|
|
+ $("#goodsDetailForm").find("#certOrganNameTxt").html('');
|
|
|
|
|
+ $("#goodsDetailForm").find("#certDtTxt").html('');
|
|
|
|
|
+ $("#goodsDetailForm").find("#certDivTxt").html('');
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ //상품명 길이표시
|
|
|
|
|
+ $("#goodsDetailForm input[name=goodsNm]").bind('focus focusout input keyup keydown paste change', function () {
|
|
|
|
|
+ fnDataLengthCheck('goodsNm',200);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ //상품타이틀 길이표시
|
|
|
|
|
+ $("#goodsDetailForm input[name=goodsTnm]").bind('focus focusout input keyup keydown paste change', function () {
|
|
|
|
|
+ fnDataLengthCheck('goodsTnm',100);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ //사용자검색어 길이표시
|
|
|
|
|
+ $("#goodsDetailForm input[name=goodsSnm1]").bind('focus focusout input keyup keydown paste change', function () {
|
|
|
|
|
+ fnDataLengthCheck('goodsSnm1',200);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ //판매가 변경시 할인율 계산
|
|
|
|
|
+ $("#goodsDetailForm input[name=currPrice]").bind('focusout paste', function () {
|
|
|
|
|
+ fnCurrPriceCheck();
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ //정상가 변경시 할인율 계산
|
|
|
|
|
+ $("#goodsDetailForm input[name=listPrice]").bind('focusout paste', function () {
|
|
|
|
|
+ fnCurrPriceCheck();
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ //판매가의 할인율 확인
|
|
|
|
|
+ var fnCurrPriceCheck = function(){
|
|
|
|
|
+ var dcRate = 0;
|
|
|
|
|
+
|
|
|
|
|
+ var listPrice = $("#goodsDetailForm input[name=listPrice]").val().removeComma();
|
|
|
|
|
+ var currPrice = $("#goodsDetailForm input[name=currPrice]").val().removeComma();
|
|
|
|
|
+ dcRate = 100 - Math.floor(Number(currPrice) / Number(listPrice) * 100); //절사
|
|
|
|
|
+
|
|
|
|
|
+ $("#goodsDetailForm").find("#dcRateTxt").html(dcRate);
|
|
|
|
|
+ $("#goodsDetailForm input[name=dcRate]").val(dcRate);
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //판매가의 할인율 확인
|
|
|
|
|
+ /* var fnCurrPriceCheck_org = function(){
|
|
|
|
|
+ var dcRate = 0;
|
|
|
|
|
+
|
|
|
|
|
+ var listPrice = $("#goodsDetailForm input[name=listPrice]").val().removeComma();
|
|
|
|
|
+ var currPrice = $("#goodsDetailForm input[name=currPrice]").val().removeComma();
|
|
|
|
|
+ //dcRate = Math.round(100 - Math.floor((Number(currPrice) / Number(listPrice) * 100)*100)/100);
|
|
|
|
|
+ //dcRate = 100 - (Number((Number(currPrice) / Number(listPrice)).toFixed(2)) *100);
|
|
|
|
|
+ dcRate = 100 - Math.floor(Number(currPrice) / Number(listPrice) * 100);
|
|
|
|
|
+
|
|
|
|
|
+ if (dcRate < 0){
|
|
|
|
|
+ mcxDialog.alert('할인율이 0보다 작습니다.\n판매가를 확인해주세요.', function(){
|
|
|
|
|
+ $("#goodsDetailForm input[name=currPrice]").focus();
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }else if (dcRate >= 90){
|
|
|
|
|
+ gagaAlert.confirm("할인율이 90%이상입니다. 계속하시겠습니까?", function(){
|
|
|
|
|
+ $("#goodsDetailForm").find("#dcRateTxt").html(dcRate);
|
|
|
|
|
+ $("#goodsDetailForm input[name=dcRate]").val(dcRate);
|
|
|
|
|
+ return true;
|
|
|
|
|
+ },
|
|
|
|
|
+ function(){
|
|
|
|
|
+ $('#goodsDetailForm input[name=currPrice]').val($('#goodsDetailForm input[name=currPriceOrg]').val().addComma());
|
|
|
|
|
+ return false;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $("#goodsDetailForm").find("#dcRateTxt").html(dcRate);
|
|
|
|
|
+ $("#goodsDetailForm input[name=dcRate]").val(dcRate);
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ } */
|
|
|
|
|
+
|
|
|
|
|
+ // 브랜드 조회
|
|
|
|
|
+ var fnBrand = function(supplyCompCd, brandCd) {
|
|
|
|
|
+ var actionUrl = '/renderer/supplyCompany/brand/list/' + supplyCompCd;
|
|
|
|
|
+
|
|
|
|
|
+ if(sessRoleCd == "G001_B000"){
|
|
|
|
|
+ actionUrl = '/renderer/brand/AuthBrandlist';
|
|
|
|
|
+ }
|
|
|
|
|
+ $("#goodsDetailForm select[name=selBrandCd] option:gt(0)").remove();
|
|
|
|
|
+
|
|
|
|
|
+ cfnCreateCombo(actionUrl, $('#goodsDetailForm select[name=selBrandCd]'), "[선택]", brandCd);
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //데이터 길이 확인
|
|
|
|
|
+ var fnDataLengthCheck = function(id , maxByte){
|
|
|
|
|
+ var maximumByte = maxByte;
|
|
|
|
|
+ var strLenEng = $('#goodsDetailForm').find('#'+id).val().length;
|
|
|
|
|
+ var cbyteStr = 0;
|
|
|
|
|
+ var liLenStr = 0;
|
|
|
|
|
+ for (i = 0; i < strLenEng; i++) {
|
|
|
|
|
+ var lsOneChar = $('#goodsDetailForm').find('#'+id).val().charAt(i);
|
|
|
|
|
+ if (lsOneChar == "\n" || lsOneChar == "\'") {
|
|
|
|
|
+ cbyteStr += 5; //엔터면 5를 더한다
|
|
|
|
|
+ } else if (lsOneChar == "\"") {
|
|
|
|
|
+ cbyteStr += 6; //쌍따옴표면 6를 더한다
|
|
|
|
|
+ } else if (escape(lsOneChar).length > 4) {
|
|
|
|
|
+ cbyteStr += 3; //한글이면 3를 더한다
|
|
|
|
|
+ } else {
|
|
|
|
|
+ cbyteStr++; //한글아니면 1을 다한다
|
|
|
|
|
+ }
|
|
|
|
|
+ if (cbyteStr <= maximumByte) {
|
|
|
|
|
+ liLenStr = i + 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 사용자가 입력한 값이 제한 값을 초과하는지를 검사한다.
|
|
|
|
|
+ if (parseInt(cbyteStr) > parseInt(maximumByte)) {
|
|
|
|
|
+ mcxDialog.alertC('허용된 글자수가 초과되었습니다.\n초과된 부분은 자동으로 삭제됩니다.', {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $('#goodsDetailForm').find('#'+id).focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ var str = $('#goodsDetailForm').find('#'+id).val().substr(0, liLenStr);
|
|
|
|
|
+ $('#goodsDetailForm').find('#'+id).val(str);
|
|
|
|
|
+ var cbyteStr = 0;
|
|
|
|
|
+ for (i = 0; i < $('#goodsDetailForm').find('#'+id).val().length; i++) {
|
|
|
|
|
+ var lsOneChar = $('#goodsDetailForm').find('#'+id).val().charAt(i);
|
|
|
|
|
+ if (lsOneChar == "\n" || lsOneChar == "\'") {
|
|
|
|
|
+ cbyteStr += 5; //엔터면 5를 더한다
|
|
|
|
|
+ } else if (lsOneChar == "\"") {
|
|
|
|
|
+ cbyteStr += 6; //쌍따옴표면 6를 더한다
|
|
|
|
|
+ } else if (escape(lsOneChar).length > 4) {
|
|
|
|
|
+ cbyteStr += 3; //한글이면 3를 더한다
|
|
|
|
|
+ } else {
|
|
|
|
|
+ cbyteStr++; //한글아니면 1을 다한다
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ $('#goodsDetailForm').find('#'+id+'Len').text(cbyteStr);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //상품저장 버튼 클릭 시
|
|
|
|
|
+ $('#btnGoodsDetailSave').click(function() {
|
|
|
|
|
+
|
|
|
|
|
+ var optCheck = false;
|
|
|
|
|
+ var idx = 0;
|
|
|
|
|
+
|
|
|
|
|
+ //상품상태가 승인대기나 승인 완료일 경우
|
|
|
|
|
+ if($("#goodsDetailForm select[name=goodsStat]").val() == "G008_40" || $("#goodsDetailForm select[name=goodsStat]").val() == "G008_90"){
|
|
|
|
|
+
|
|
|
|
|
+ // SUPER관리자, 어드민관리자, 계정관리자. 총괄관리자, MD 를 제외하고 승인처리 할수 없음
|
|
|
|
|
+ if ("G001_0000" != sessRoleCd && "G001_A000" != sessRoleCd && "G001_A001" != sessRoleCd && "G001_A100" != sessRoleCd && "G001_A101" != sessRoleCd ){
|
|
|
|
|
+ if ($("#goodsDetailForm select[name=goodsStat]").val() == "G008_90" && $("#goodsDetailForm input[name=goodsStatOrg]").val() != "G008_90"){
|
|
|
|
|
+ mcxDialog.alert(" '승인완료' 상태로 변경할 권한이 없습니다.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ //list가 등록되지 않은 상품은 상태변경 불가
|
|
|
|
|
+ if(Number($("#goodsDetailForm input[name=listPrice]").val()) == 0){
|
|
|
|
|
+ mcxDialog.alertC("정상가가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm select[name=goodsStat]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //정상가가 0인 상품은 상태변경 불가
|
|
|
|
|
+ if((gagajf.isNull($("#goodsDetailForm input[name=listPrice]").val()) || $("#goodsDetailForm input[name=listPrice]").val() == 0)){
|
|
|
|
|
+ mcxDialog.alertC("정상가가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm select[name=goodsStat]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //판매가가 0인 상품은 상태변경 불가
|
|
|
|
|
+ if((gagajf.isNull($("#goodsDetailForm input[name=currPrice]").val()) || $("#goodsDetailForm input[name=currPrice]").val() == 0)){
|
|
|
|
|
+ mcxDialog.alertC("판매가가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm select[name=goodsStat]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //사이즈정보가 등록되지 않은 상품은 상태변경 불가
|
|
|
|
|
+ if($("#goodsDetailForm #sizeStockArea").find("#optionList tr").length == 0){
|
|
|
|
|
+ mcxDialog.alertC("사이즈정보가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm select[name=goodsStat]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //이미지가 등록되지 않은 상품은 상태변경 불가
|
|
|
|
|
+ /* if($("#goodsDetailForm input[name=goodsImageYn]").val() == "N"){
|
|
|
|
|
+ mcxDialog.alertC("이미지가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm select[name=goodsStat]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ } */
|
|
|
|
|
+
|
|
|
|
|
+ //고시정보가 등록되지 않은 상품은 상태변경 불가 - 일반상품만 체크
|
|
|
|
|
+ if ("G056_N" == $("#goodsDetailForm input[name=goodsType]").val()){
|
|
|
|
|
+ if($("#goodsDetailForm #notiArea").find("#infoContents tr").length == 0){
|
|
|
|
|
+ mcxDialog.alertC("고시정보가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm select[name=goodsStat]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ idx = 0;
|
|
|
|
|
+
|
|
|
|
|
+ $("#goodsDetailForm #notiArea").find("#infoContents tr").each(function() {
|
|
|
|
|
+ if (typeof($(this).find("td input[name=niContent]").val()) != 'undefined' && gagajf.isNull($(this).find("td input[name=niContent]").val())){
|
|
|
|
|
+ optCheck = true;
|
|
|
|
|
+ mcxDialog.alertC("고시정보를 입력해주세요.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ idx++;
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 상품상세 - 입점
|
|
|
|
|
+ if ("N" == $("#goodsDetailForm input[name=selfGoodsYn]").val() && $("#goodsDetailForm input[name=goodsType]").val() == "G056_N"){
|
|
|
|
|
+ if (gagajf.isNull($("#goodsDetailForm textarea[name=goodsDesc]").val()) || "<p><br></p>" == $("#goodsDetailForm textarea[name=goodsDesc]").val() ){
|
|
|
|
|
+ mcxDialog.alert("상품상세정보탭의 상품상세내용을 입력해주세요.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 자사일 경우 대표색상 선택 여부
|
|
|
|
|
+ if ("Y" == $('#goodsDetailForm input[name=selfGoodsYn]').val()){
|
|
|
|
|
+
|
|
|
|
|
+ if($("#goodsDetailForm input[name=basicColor]:checked").length == 0) {
|
|
|
|
|
+ mcxDialog.alert("대표색상을 선택해주세요.")
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(optCheck) {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //상품명
|
|
|
|
|
+ if(gagajf.isNull($("#goodsDetailForm input[name=goodsNm]").val())){
|
|
|
|
|
+ mcxDialog.alertC("상품명을 입력해 주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=goodsNm]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //상품상태
|
|
|
|
|
+ if(gagajf.isNull($("#goodsDetailForm select[name=goodsStat]").val())){
|
|
|
|
|
+ mcxDialog.alertC("상품상태를 선택해 주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm select[name=goodsStat]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //성별
|
|
|
|
|
+ if(gagajf.isNull($("#goodsDetailForm select[name=sexGb]").val())){
|
|
|
|
|
+ mcxDialog.alertC("성별을 선택해 주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm select[name=sexGb]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 상품구분
|
|
|
|
|
+ if(gagajf.isNull($("#goodsDetailForm select[name=goodsGb]").val())){
|
|
|
|
|
+ mcxDialog.alertC("상품구분을 선택해 주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm select[name=goodsGb]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ //시즌
|
|
|
|
|
+ //if ("Y" == $("#goodsDetailForm input[name=selfGoodsYn]").val()){
|
|
|
|
|
+ if(gagajf.isNull($("#goodsDetailForm select[name=seasonCd]").val())){
|
|
|
|
|
+ mcxDialog.alertC("시즌을 선택해 주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm select[name=seasonCd]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ //}
|
|
|
|
|
+
|
|
|
|
|
+ //정상가
|
|
|
|
|
+ if(gagajf.isNull($("#goodsDetailForm input[name=listPrice]").val())) {
|
|
|
|
|
+ mcxDialog.alertC("판매가를 올바르게 입력해주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=listPrice]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //판매가
|
|
|
|
|
+ if(gagajf.isNull($("#goodsDetailForm input[name=currPrice]").val())) {
|
|
|
|
|
+ mcxDialog.alertC("판매가를 올바르게 입력해주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=currPrice]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /* if(Number($("#goodsDetailForm input[name=currPrice]").val().removeComma()) < 1000) {
|
|
|
|
|
+ mcxDialog.alertC("판매가는 1000원 이상을 입력하셔야 합니다.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=currPrice]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ } */
|
|
|
|
|
+
|
|
|
|
|
+ //정상가와 판매가 비교
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=goodsType]").val() != "G056_D"){
|
|
|
|
|
+ if(Number($("#goodsDetailForm input[name=listPrice]").val().removeComma()) < Number($("#goodsDetailForm input[name=currPrice]").val().removeComma())) {
|
|
|
|
|
+ mcxDialog.alertC("판매가를 올바르게 입력해주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=currPrice]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //판매 수수료율
|
|
|
|
|
+ if ( gagajf.isNull($("#goodsDetailForm input[name=sellFeeRate]").val())) {
|
|
|
|
|
+ mcxDialog.alertC("판매수수료를 입력해 주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=sellFeeRate]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(Number($("#goodsDetailForm input[name=sellFeeRate]").val()) < 0 || Number($("#goodsDetailForm input[name=sellFeeRate]").val()) > 100) {
|
|
|
|
|
+ mcxDialog.alertC("판매수수료를 올바르게 입력해주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=sellFeeRate]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //신규가입기간
|
|
|
|
|
+ if ("Y" == $("#goodsDetailForm input[name=newCustOrdYn]:checked").val()){
|
|
|
|
|
+ if(isNaN(Date.parse($("#goodsDetailForm input[name=newCustOrdStdt]").val()))){
|
|
|
|
|
+ mcxDialog.alertC('날짜형식이 아닙니다.', {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=newCustOrdStdt]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(isNaN(Date.parse($("#goodsDetailForm input[name=newCustOrdEddt]").val()))){
|
|
|
|
|
+ mcxDialog.alertC('날짜형식이 아닙니다.', {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=newCustOrdEddt]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ var fromDate = $('#goodsDetailForm input[name=newCustOrdStdt]').val();
|
|
|
|
|
+ var toDate = $('#goodsDetailForm input[name=newCustOrdEddt]').val();
|
|
|
|
|
+
|
|
|
|
|
+ if (fromDate > toDate) {
|
|
|
|
|
+ mcxDialog.alertC("신규가입일의 시작일자는 종료일자 보다 클 수 없습니다.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $('#goodsDetailForm input[name=newCustOrdStdt]').focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $('#goodsDetailForm input[name=newCustOrdStdt]').val('');
|
|
|
|
|
+ $('#goodsDetailForm input[name=newCustOrdEddt]').val('');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 출고처
|
|
|
|
|
+ if(gagajf.isNull($("#goodsDetailForm select[name=delvLocCd]").val())){
|
|
|
|
|
+ mcxDialog.alertC("출고처를 선택해 주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm select[name=delvLocCd]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 배송비구분
|
|
|
|
|
+ if(gagajf.isNull($("#goodsDetailForm select[name=delvFeeCd]").val())){
|
|
|
|
|
+ mcxDialog.alertC("배송비정책을 선택해 주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm select[name=delvFeeCd]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 포인트
|
|
|
|
|
+ if ( gagajf.isNull($("#goodsDetailForm input[name=pntPrate]").val())) {
|
|
|
|
|
+ mcxDialog.alertC("PC 포인트를 입력해 주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=pntPrate]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(Number($("#goodsDetailForm input[name=pntPrate]").val()) < 0 || Number($("#goodsDetailForm input[name=pntPrate]").val()) > 100) {
|
|
|
|
|
+ mcxDialog.alertC("PC 포인트를 올바르게 입력해주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=pntPrate]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if ( gagajf.isNull($("#goodsDetailForm input[name=pntMrate]").val())) {
|
|
|
|
|
+ mcxDialog.alertC("MOBILE 포인트를 입력해 주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=pntMrate]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(Number($("#goodsDetailForm input[name=pntMrate]").val()) < 0 || Number($("#goodsDetailForm input[name=pntMrate]").val()) > 100) {
|
|
|
|
|
+ mcxDialog.alertC("MOBILE 포인트를 올바르게 입력해주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=pntMrate]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 주문수량
|
|
|
|
|
+ if ( gagajf.isNull($("#goodsDetailForm input[name=minOrdQty]").val())) {
|
|
|
|
|
+ mcxDialog.alertC("최소주문 수량을 입력해 주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=minOrdQty]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (Number($("#goodsDetailForm input[name=minOrdQty]").val()) <= 0) {
|
|
|
|
|
+ mcxDialog.alertC("최소주문 수량을 입력해 주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=minOrdQty]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if ( gagajf.isNull($("#goodsDetailForm input[name=maxOrdQty]").val())) {
|
|
|
|
|
+ mcxDialog.alertC("최대주문 수량을 입력해 주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=maxOrdQty]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (Number($("#goodsDetailForm input[name=maxOrdQty]").val()) <= 0) {
|
|
|
|
|
+ mcxDialog.alertC("최대주문 수량을 입력해 주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=maxOrdQty]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if ( gagajf.isNull($("#goodsDetailForm input[name=dayMaxOrdQty]").val())) {
|
|
|
|
|
+ mcxDialog.alertC("ID당1일최대구매 수량을 입력해 주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=dayMaxOrdQty]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (Number($("#goodsDetailForm input[name=dayMaxOrdQty]").val()) <= 0) {
|
|
|
|
|
+ mcxDialog.alertC("ID당1일최대구매 수량을 입력해 주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=dayMaxOrdQty]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(Number($("#goodsDetailForm input[name=minOrdQty]").val()) > Number($("#goodsDetailForm input[name=maxOrdQty]").val())){
|
|
|
|
|
+ mcxDialog.alertC("최소주문수량은 최대주문수량보다 클 수 없습니다.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=minOrdQty]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(Number($("#goodsDetailForm input[name=maxOrdQty]").val()) > Number($("#goodsDetailForm input[name=dayMaxOrdQty]").val())){
|
|
|
|
|
+ mcxDialog.alertC("최대주문수량이 ID당1일최대구매수량보다 클 수 없습니다.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=maxOrdQty]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //판매기간
|
|
|
|
|
+ if(isNaN(Date.parse($("#goodsDetailForm input[name=sellStYMD]").val()))){
|
|
|
|
|
+ mcxDialog.alertC('날짜형식이 아닙니다.', {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=sellStYMD]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(isNaN(Date.parse($("#goodsDetailForm input[name=sellEdYMD]").val()))){
|
|
|
|
|
+ mcxDialog.alertC('날짜형식이 아닙니다.', {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=sellEdYMD]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ var fromDate = $("#goodsDetailForm input[name=sellStYMD]").val().replaceAll('-', '')+ $("#goodsDetailForm select[name=sellStHH]").val();
|
|
|
|
|
+ var toDate = $("#goodsDetailForm input[name=sellEdYMD]").val().replaceAll('-', '')+ $("#goodsDetailForm select[name=sellEdHH]").val();
|
|
|
|
|
+
|
|
|
|
|
+ if (fromDate > toDate) {
|
|
|
|
|
+ mcxDialog.alertC("판매기간의 시작일시는 종료일시 보다 클 수 없습니다.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $('#goodsDetailForm input[name=sellStYMD]').focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ idx = 0;
|
|
|
|
|
+
|
|
|
|
|
+ //재고 옵션 관련 확인
|
|
|
|
|
+ $("#goodsDetailForm input[name=chStockDataYn]").val('N');
|
|
|
|
|
+
|
|
|
|
|
+ $("#optionList tr").each(function() {
|
|
|
|
|
+ var optCd1 = $(this).find("input[name=optCd1]").val();
|
|
|
|
|
+ var optCd2 = $(this).find("input[name=optCd2]").val();
|
|
|
|
|
+ //var hidOptCd1 = $(this).find("input[name=hidOptCd1]").val();
|
|
|
|
|
+ //var hidOptCd2 = $(this).find("input[name=hidOptCd2]").val();
|
|
|
|
|
+ var baseStockQty = $(this).find("input[name=baseStockQty]").val();
|
|
|
|
|
+ var hidBaseStockQty = $(this).find("input[name=hidBaseStockQty]").val();
|
|
|
|
|
+ var dispOrd = $(this).find("input[name=dispOrd]").val();
|
|
|
|
|
+ var hidDispOrd = $(this).find("input[name=hidDispOrd]").val();
|
|
|
|
|
+ var dispYn = $(this).find("select[name=dispYn]").val();
|
|
|
|
|
+ var hidDispYn = $(this).find("input[name=hidDispYn]").val();
|
|
|
|
|
+ var soldoutYn = $(this).find("select[name=soldoutYn]").val();
|
|
|
|
|
+ var hidSoldoutYn = $(this).find("input[name=hidSoldoutYn]").val();
|
|
|
|
|
+ var addPrice = $(this).find("input[name=addPrice]").val();
|
|
|
|
|
+ var hidAddPrice = $(this).find("input[name=hidAddPrice]").val();
|
|
|
|
|
+
|
|
|
|
|
+ var editCurrStockQty = $(this).find("input[name=editCurrStockQty]").val(); // 입점 확인용
|
|
|
|
|
+ var currStockQty = $(this).find("input[name=currStockQty]").val(); // 입점 확인용 (hidden)
|
|
|
|
|
+
|
|
|
|
|
+ if(gagajf.isNull(dispOrd)){
|
|
|
|
|
+ optCheck = true;
|
|
|
|
|
+ mcxDialog.alertC("우선순위를 입력해주세요", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#optionList tr").find("input[name=dispOrd]").eq(idx).focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //ERP재고연동여부가 'Y'일 경우 수정여부 확인 20210824수정
|
|
|
|
|
+ if ( $('#goodsDetailForm input[name=erpStockLinkYn]:checked').val() == "Y"){
|
|
|
|
|
+ if (Number(editCurrStockQty) != Number(currStockQty) ){
|
|
|
|
|
+ optCheck = true;
|
|
|
|
|
+ mcxDialog.alertC("WMS가용재고가 변경되었습니다.<br/>확인해주세요", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#optionList tr").find("input[name=erpStockLinkYn]").eq(idx).focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 입점만 체크
|
|
|
|
|
+ if ("N" == $('#goodsDetailForm input[name=selfGoodsYn]').val()){
|
|
|
|
|
+
|
|
|
|
|
+ if(gagajf.isNull(editCurrStockQty)){
|
|
|
|
|
+ optCheck = true;
|
|
|
|
|
+ mcxDialog.alertC("가용재고를 입력해주세요", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#optionList tr").find("input[name=editCurrStockQty]").eq(idx).focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(gagajf.isNull(addPrice)){
|
|
|
|
|
+ optCheck = true;
|
|
|
|
|
+ mcxDialog.alertC("추가가격을 입력해주세요", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#optionList tr").find("input[name=addPrice]").eq(idx).focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(gagajf.isNull(dispOrd)){
|
|
|
|
|
+ optCheck = true;
|
|
|
|
|
+ mcxDialog.alertC("노출순서를 입력해주세요", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#optionList tr").find("input[name=dispOrd]").eq(idx).focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(gagajf.isNull(baseStockQty)){
|
|
|
|
|
+ optCheck = true;
|
|
|
|
|
+ mcxDialog.alertC("안전재고를 입력해주세요", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#optionList tr").find("input[name=baseStockQty]").eq(idx).focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (editCurrStockQty != currStockQty){
|
|
|
|
|
+ $("#goodsDetailForm input[name=chStockDataYn]").val('Y');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (baseStockQty != hidBaseStockQty){
|
|
|
|
|
+ $("#goodsDetailForm input[name=chStockDataYn]").val('Y');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (dispOrd != hidDispOrd){
|
|
|
|
|
+ $("#goodsDetailForm input[name=chStockDataYn]").val('Y');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (dispYn != hidDispYn){
|
|
|
|
|
+ $("#goodsDetailForm input[name=chStockDataYn]").val('Y');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (soldoutYn != hidSoldoutYn){
|
|
|
|
|
+ $("#goodsDetailForm input[name=chStockDataYn]").val('Y');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (addPrice != hidAddPrice){
|
|
|
|
|
+ $("#goodsDetailForm input[name=chStockDataYn]").val('Y');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ idx++;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ if(optCheck) {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //안전인증관련
|
|
|
|
|
+ if (!fnGoodsSafetyCertNumCheck()) return false;
|
|
|
|
|
+
|
|
|
|
|
+ //인증번호 있는데 인증작업 했는지 여부 확인
|
|
|
|
|
+ /* if (!gagajf.isNull($("#goodsDetailForm input[name=certNum]").val())){
|
|
|
|
|
+
|
|
|
|
|
+ if ("G084_4" == $("#goodsDetailForm select[name=certFormGb]").val() ||
|
|
|
|
|
+ "G084_5" == $("#goodsDetailForm select[name=certFormGb]").val() ||
|
|
|
|
|
+ "G081_3" == $("#goodsDetailForm select[name=certType]").val()) {
|
|
|
|
|
+
|
|
|
|
|
+ }else{
|
|
|
|
|
+ if (gagajf.isNull($('#goodsDetailForm').find('#certStateTxt').text())){
|
|
|
|
|
+ mcxDialog.alert("안전인증작업을 하거나 인증번호를 확인해주세요.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ } */
|
|
|
|
|
+
|
|
|
|
|
+ /* if (!gagajf.isNull($("#goodsDetailForm input[name=certNum]").val()) && ($("#goodsDetailForm input[name=certNum]").val() != $("#goodsDetailForm input[name=certNumOrg]").val())){
|
|
|
|
|
+ mcxDialog.alert("안전인증작업을 하거나 인증번호를 확인해주세요.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ } */
|
|
|
|
|
+
|
|
|
|
|
+ var basicColor = $("#goodsDetailForm input[name=basicColor]:checked").val();
|
|
|
|
|
+ var dcRate = 0;
|
|
|
|
|
+ var listPrice = $("#goodsDetailForm input[name=listPrice]").val().removeComma();
|
|
|
|
|
+ var currPrice = $("#goodsDetailForm input[name=currPrice]").val().removeComma();
|
|
|
|
|
+ if (listPrice > 0){
|
|
|
|
|
+ dcRate = 100 - Math.floor(Number(currPrice) / Number(listPrice) * 100); //절사
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (dcRate < 0 && ($("#goodsDetailForm input[name=goodsType]").val() != "G056_D")){
|
|
|
|
|
+ mcxDialog.alertC('할인율이 0보다 작습니다.\n판매가를 확인해주세요.', {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=currPrice]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ /* }else if (dcRate >= 90 && ($("#goodsDetailForm input[name=goodsType]").val() != "G056_D")){
|
|
|
|
|
+ mcxDialog.confirmC("할인율이 90%이상입니다. 계속하시겠습니까?", {
|
|
|
|
|
+ btn: ["아니요","예"],
|
|
|
|
|
+ btnClick: function(index){
|
|
|
|
|
+ if (index == 1){
|
|
|
|
|
+ optCheck = true;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (!fnGoodsComposeCheck()) return false;
|
|
|
|
|
+ fnSaveCheck();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ */
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $("#goodsDetailForm").find("#dcRateTxt").html(dcRate);
|
|
|
|
|
+ $("#goodsDetailForm input[name=dcRate]").val(dcRate);
|
|
|
|
|
+ if (!fnGoodsComposeCheck()) return false;
|
|
|
|
|
+ fnSaveCheck();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (optCheck) return false;
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ //저장 관련 체크
|
|
|
|
|
+ var fnSaveCheck = function(idx){
|
|
|
|
|
+ if($("#goodsDetailForm input:checkbox[name=chkDescKeep]").is(':checked')){
|
|
|
|
|
+ mcxDialog.confirmC("상품상세정보 탭의 정보를 수정하는 경우는 정보유지 체크박스를 체크해제 하신후 저장버튼을 눌러주세요<br>(정보유지에 체크가 되어 있으면 변경사항이 반영되지 않습니다)<br>나머지 다른 탭은 저장버튼 클릭시 변경한 사항이 이상없이 반영됩니다. 계속하시겠습니까?", {
|
|
|
|
|
+ btn: ["아니요","예"],
|
|
|
|
|
+ btnClick: function(index){
|
|
|
|
|
+ if (index == 1){
|
|
|
|
|
+ optCheck = true;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ fnGoodsSave();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }else{
|
|
|
|
|
+ fnGoodsSave();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 구성 정보 관련 체크
|
|
|
|
|
+ var fnGoodsComposeCheck = function(){
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=goodsType]").val() == "G056_N"){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ var allData = gagaAgGrid.getAllRowData(gridGoodsComposeOptions);
|
|
|
|
|
+ var comSupplyCompCd = '';
|
|
|
|
|
+ var comSelfGoodsYn = '';
|
|
|
|
|
+ var index = 0;
|
|
|
|
|
+ //기준여부 Y 존재하는지 확인
|
|
|
|
|
+ var checkBaseYn = false;
|
|
|
|
|
+ //대표여부 Y 존재하는지 확인
|
|
|
|
|
+ var checkRepYn = false;
|
|
|
|
|
+ optCheck = false;
|
|
|
|
|
+ $.each(allData, function(index, item) {
|
|
|
|
|
+ if (index == 0){
|
|
|
|
|
+ comSelfGoodsYn = item.selfGoodsYn;
|
|
|
|
|
+ comSupplyCompCd = item.supplyCompCd;
|
|
|
|
|
+ $("#goodsDetailForm input[name=repGoodsCd]").val(item.repGoodsCd); // 대표상품
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (item.baseYn == "Y"){
|
|
|
|
|
+ checkBaseYn = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (item.repYn == "Y"){
|
|
|
|
|
+ checkRepYn = true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (comSelfGoodsYn != item.selfGoodsYn && "G056_S" == $("#goodsDetailForm input[name=goodsType]").val()){
|
|
|
|
|
+ optCheck = true;
|
|
|
|
|
+ mcxDialog.alertC("구성상품중 자사/입점상품 구분값이 다릅니다.<br/>확인해 주세요", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ gridGoodsComposeOptions.api.setFocusedCell(index, "goodsCd", null);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ /*
|
|
|
|
|
+ }else{
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ if (comSelfGoodsYn == "N" && (comSupplyCompCd != item.supplyCompCd)){
|
|
|
|
|
+ optCheck = true;
|
|
|
|
|
+ mcxDialog.alertC("구성상품중 입점은 같은 업체 상품만 가능합니다.<br/>확인해 주세요", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ gridGoodsComposeOptions.api.setFocusedCell(index, "goodsCd", null);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ */
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 세트 가격 체크
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=goodsType]").val() == "G056_S"){
|
|
|
|
|
+ if (item.compsCurrPrice <= 0){
|
|
|
|
|
+ optCheck = true;
|
|
|
|
|
+ mcxDialog.alertC("구성상품 판매가를 확인해 주세요", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ gridGoodsComposeOptions.api.setFocusedCell(index, "compsCurrPrice", null);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ index++;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ if(optCheck) {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (!checkBaseYn){
|
|
|
|
|
+ mcxDialog.alert('구성상품중 기준여부를 선택해 주세요.');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (!checkRepYn && $("#goodsDetailForm input[name=goodsType]").val() == "G056_D"){
|
|
|
|
|
+ mcxDialog.alert('구성상품중 대표여부를 선택해 주세요.');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //저장처리
|
|
|
|
|
+ var fnGoodsSave = function(){
|
|
|
|
|
+ mcxDialog.confirm('저장하시겠습니까?', {
|
|
|
|
|
+ cancelBtnText: "취소",
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function(){
|
|
|
|
|
+
|
|
|
|
|
+ fnGoodsDeailNotiSave();
|
|
|
|
|
+
|
|
|
|
|
+ if (fnChangeCheck()){
|
|
|
|
|
+ $("#goodsDetailForm input[name=chDataYn]").val('Y');
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $("#goodsDetailForm input[name=chDataYn]").val('N');
|
|
|
|
|
+ }
|
|
|
|
|
+ $("#goodsDetailForm input[name=mainColorCd]").val($("#goodsDetailForm input[name=basicColor]:checked").val());
|
|
|
|
|
+
|
|
|
|
|
+ //구성상품
|
|
|
|
|
+ var allData = gagaAgGrid.getAllRowData(gridGoodsComposeOptions);
|
|
|
|
|
+ var jsonData = JSON.stringify(allData);
|
|
|
|
|
+ $('#goodsDetailForm input[name=goodsComposeList]').val(jsonData);
|
|
|
|
|
+
|
|
|
|
|
+ // 2021.12.22 sshong 상품등록시 "를 "로 '를 '로 변환 되어 저장시 화면에 그대로 노출 되어 제거합니다.
|
|
|
|
|
+ //$('#goodsDetailForm input[name=goodsNm]').val($('#goodsDetailForm input[name=goodsNm]').val().trim().replace(/\n|\r/g, "<br/>").replace(/\"/gi, """).replace(/\'/gi, "'"));
|
|
|
|
|
+ //$('#goodsDetailForm input[name=goodsTnm]').val($('#goodsDetailForm input[name=goodsTnm]').val().trim().replace(/\n|\r/g, "<br/>").replace(/\"/gi, """).replace(/\'/gi, "'"));
|
|
|
|
|
+ //$('#goodsDetailForm input[name=goodsSnm1]').val($('#goodsDetailForm input[name=goodsSnm1]').val().trim().replace(/\n|\r/g, "<br/>").replace(/\"/gi, """).replace(/\'/gi, "'"));
|
|
|
|
|
+
|
|
|
|
|
+ $('#goodsDetailForm input[name=goodsNm]').val($('#goodsDetailForm input[name=goodsNm]').val().trim().replace(/\n|\r/g, "<br/>"));
|
|
|
|
|
+ $('#goodsDetailForm input[name=goodsTnm]').val($('#goodsDetailForm input[name=goodsTnm]').val().trim().replace(/\n|\r/g, "<br/>"));
|
|
|
|
|
+ $('#goodsDetailForm input[name=goodsSnm1]').val($('#goodsDetailForm input[name=goodsSnm1]').val().trim().replace(/\n|\r/g, "<br/>"));
|
|
|
|
|
+
|
|
|
|
|
+ gagajf.ajaxFormSubmit("/goods/detail/save", "#goodsDetailForm", fnGoodsSaveCallBack);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //미리보기 클릭 시
|
|
|
|
|
+ $('#btnGoodsDetailPreview').click(function(e) {
|
|
|
|
|
+ cfnOpenFrontGoodsPopup($('#goodsDetailForm input[name=goodsCd]').val(), $('#goodsDetailForm input[name=siteCd]').val());
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ //이미지 클릭 시
|
|
|
|
|
+ $('#btnGoodsDetailImg').click(function(e) {
|
|
|
|
|
+ cfnOpenGoodsImagePopup($('#goodsDetailForm input[name=goodsCd]').val());
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ //창종료
|
|
|
|
|
+ var fnGoodsDetailClose = function(){
|
|
|
|
|
+ uifnPopupClose('popupGoodsDetail');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //저장후 callback
|
|
|
|
|
+ var fnGoodsSaveCallBack = function(){
|
|
|
|
|
+ var goodsCd = $('#goodsDetailForm input[name=goodsCd]').val();
|
|
|
|
|
+ fnGoodsDetailClose();
|
|
|
|
|
+ cfnOpenGoodsDetailPopup('U', goodsCd);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //고시정보 저장을 위한 데이터 처리
|
|
|
|
|
+ var fnGoodsDeailNotiSave = function(){
|
|
|
|
|
+
|
|
|
|
|
+ var goodsCd = $('#goodsDetailForm input[name=goodsCd]').val();
|
|
|
|
|
+ var goodsInfoList = [];
|
|
|
|
|
+
|
|
|
|
|
+ var index = 0;
|
|
|
|
|
+ $("#goodsDetailForm").find("#infoContents tr").each(function() {
|
|
|
|
|
+ if (index > 0){
|
|
|
|
|
+ var goodsInfo = {goodsCd: goodsCd
|
|
|
|
|
+ , niClsfCd : $('#goodsDetailForm input[name=niClsfCd]').val()
|
|
|
|
|
+ , niItemCd : $(this).find("input[name=niItemCd]").val()
|
|
|
|
|
+ , niContent : $(this).find("input[name=niContent]").val()
|
|
|
|
|
+ , dispOrd : $(this).find("input[name=dispOrd]").val()
|
|
|
|
|
+ };
|
|
|
|
|
+ goodsInfoList.push(goodsInfo);
|
|
|
|
|
+ }
|
|
|
|
|
+ index++;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ $("#goodsDetailForm input[name=notiList]").val(JSON.stringify(goodsInfoList));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //상품기본정보 변경여부 확인
|
|
|
|
|
+ var fnChangeCheck = function(){
|
|
|
|
|
+
|
|
|
|
|
+ //상품타이틀
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=goodsTnmOrg]").val() != $("#goodsDetailForm input[name=goodsTnm]").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ //사용자검색어
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=goodsSnm1Org]").val() != $("#goodsDetailForm input[name=goodsSnm1]").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ //상품명
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=goodsNmOrg]").val() != $("#goodsDetailForm input[name=goodsNm]").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ //상품정상이월구분
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=formalGbOrg]").val() != $("input:radio[name=formalGb]:checked").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ //상품구분
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=goodsGbOrg]").val() != $("#goodsDetailForm select[name=goodsGb]").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ //상품상태
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=goodsStatOrg]").val() != $("#goodsDetailForm select[name=goodsStat]").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ //시즌
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=seasonCdOrg]").val() != $("#goodsDetailForm select[name=seasonCd]").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ //성별
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=sexGbOrg]").val() != $("#goodsDetailForm select[name=sexGb]").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ //정상가
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=listPriceOrg]").val() != $("#goodsDetailForm input[name=listPrice]").val().removeComma()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ //판매가
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=currPriceOrg]").val() != $("#goodsDetailForm input[name=currPrice]").val().removeComma()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ //원가
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=costPriceOrg]").val() != $("#goodsDetailForm input[name=costPrice]").val().removeComma()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //자사 일반상품만
|
|
|
|
|
+ if($("#goodsDetailForm input[name=selfGoodsYn]").val() == 'Y' && $("#goodsDetailForm input[name=goodType]").val() == 'G056_N'){
|
|
|
|
|
+ //ERP재고연동여부
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=erpStockLinkYnOrg]").val() != $("#goodsDetailForm input[name=erpStockLinkYn]:checked").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //자사몰 노출여부
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=selfMallYnOrg]").val() != $("input[name=selfMallYn]:checked").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ //선물주문여부
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=giftPackYnOrg]").val() != $("input[name=giftPackYn]:checked").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ //PC포인트
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=pntPrateOrg]").val() != $("#goodsDetailForm input[name=pntPrate]").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ //PC 선포인트 사용여부
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=prePpntUsableYnOrg]").val() != $("input[name=prePpntUsableYn]:checked").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ //MOBILE포인트
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=pntMrateOrg]").val() != $("#goodsDetailForm input[name=pntMrate]").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ //MOBILE 선포인트 사용여부
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=preMpntUsableYnOrg]").val() != $("input[name=preMpntUsableYn]:checked").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ //최소주문수량
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=minOrdQtyOrg]").val() != $("#goodsDetailForm input[name=minOrdQty]").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ //최대주문수량
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=maxOrdQtyOrg]").val() != $("#goodsDetailForm input[name=maxOrdQty]").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ //ID당1일최대구매수량
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=dayMaxOrdQtyOrg]").val() != $("#goodsDetailForm input[name=dayMaxOrdQty]").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ //유통구분
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=distributionGbOrg]").val() != $("#goodsDetailForm select[name=distributionGb]").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ //상품연령대
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=ageGrpCdOrg]").val() != $("#goodsDetailForm select[name=ageGrpCd]").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 판매수수료율
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=sellFeeRateOrg]").val() != $("#goodsDetailForm input[name=sellFeeRate]").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 메인 색상코드
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=mainColorCd]").val() != $("#goodsDetailForm input[name=basicColor]:checked").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 반품가능여부
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=returnableYnOrg]").val() != $("input[name=returnableYn]:checked").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 배송비정책
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=delvFeeCdOrg]").val() != $("#goodsDetailForm select[name=delvFeeCd]").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 출고처
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=delvLocCdOrg]").val() != $("#goodsDetailForm select[name=delvLocCd]").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 교환가능여부
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=changeableYnOrg]").val() != $("#goodsDetailForm input[name=changeableYn]:checked").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 신규가입구매가능여부
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=newCustOrdYnOrg]").val() != $("#goodsDetailForm input[name=newCustOrdYn]:checked").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 신규가입기간 시작일
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=newCustOrdStdt]").val() != $("#goodsDetailForm input[name=newCustOrdStdtOrg]").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 신규가입기간 종료일
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=newCustOrdEddt]").val() != $("#goodsDetailForm input[name=newCustOrdEddtOrg]").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 성인용품여부
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=adultYnOrg]").val() != $("#goodsDetailForm input[name=adultYn]:checked").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 해외구매대행여부
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=foreignBuyYnOrg]").val() != $("#goodsDetailForm input[name=foreignBuyYn]:checked").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 병행수입여부
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=parallelImportYnOrg]").val() != $("#goodsDetailForm input[name=parallelImportYn]:checked").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 주문제작여부
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=orderMadeYnOrg]").val() != $("#goodsDetailForm input[name=orderMadeYn]:checked").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 판매기간 시작일
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=sellStdt]").val().toDate("YYYYMMDDHHmmss").format("YYYYMMDDHH") !=
|
|
|
|
|
+ ($("#goodsDetailForm input[name=sellStYMD]").val().replaceAll('-', '')+ $("#goodsDetailForm select[name=sellStHH]").val())){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 판매기간 종료일
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=sellEddt]").val().toDate("YYYYMMDDHHmmss").format("YYYYMMDDHH") !=
|
|
|
|
|
+ ($("#goodsDetailForm input[name=sellEdYMD]").val().replaceAll('-', '')+ $("#goodsDetailForm select[name=sellEdHH]").val())){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 상품상세신규폼사용여부
|
|
|
|
|
+ if ($("#goodsDetailForm input[name=tobeFormYnOrg]").val() != $("#goodsDetailForm input[name=tobeFormYn]:checked").val()){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 상품 고시 선택 버튼 클릭 시
|
|
|
|
|
+ $('#btnNotinfo').click(function(e) {
|
|
|
|
|
+
|
|
|
|
|
+ if(gagajf.isNull($("#goodsDetailForm select[name=selNiClsfCd]").val())) {
|
|
|
|
|
+ mcxDialog.alertC("상품정보제공 고시를 선택해주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm select[name=selNiClsfCd]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ var params = new Object();
|
|
|
|
|
+ params.supplyCompCd = $("#goodsDetailForm input[name=supplyCompCd]").val();
|
|
|
|
|
+ params.niClsfCd = $("#goodsDetailForm select[name=selNiClsfCd]").val();
|
|
|
|
|
+ params.goodsCd = $("#goodsDetailForm input[name=goodsCd]").val();
|
|
|
|
|
+ cfnAjaxSubmit("/goods/noti/goodsInfo/list", "json", fnGoodsDetailNotiInfoSearchCallback, params);
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // 품목변경
|
|
|
|
|
+ $("#btnGoodsItemkindChange").on("click", function(){
|
|
|
|
|
+
|
|
|
|
|
+ if($("#goodsDetailForm select[name=itemkindCd]").val() == $("#goodsDetailForm input[name=orgItemkindCd]").val()){
|
|
|
|
|
+ mcxDialog.alert("품목코드가 변경되지 않았습니다.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ mcxDialog.confirm('품목변경 하시겠습니까?', {
|
|
|
|
|
+ cancelBtnText: "취소",
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function(){
|
|
|
|
|
+ var data = [{ goodsCd : $('#goodsDetailForm input[name=goodsCd]').val()
|
|
|
|
|
+ , itemkindCd : $("#goodsDetailForm select[name=itemkindCd]").val()
|
|
|
|
|
+ , supplyCompCd : $("#goodsDetailForm input[name=supplyCompCd]").val()
|
|
|
|
|
+ }];
|
|
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
|
|
+ gagajf.ajaxJsonSubmit('/goods/itemKind/change/save', jsonData, fnGoodsDeailSearch);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ //배송비정책변경시
|
|
|
|
|
+ $('#goodsDetailForm select[name=delvFeeCd]').on('change', function() {
|
|
|
|
|
+ var delvFeeCd = $("#goodsDetailForm select[name=delvFeeCd]").val();
|
|
|
|
|
+
|
|
|
|
|
+ if (gagajf.isNull(delvFeeCd)){
|
|
|
|
|
+ $("#goodsDetailForm input[name=delvFee]").val('');
|
|
|
|
|
+ $("#goodsDetailForm input[name=minOrdAmt]").val('');
|
|
|
|
|
+ }else{
|
|
|
|
|
+
|
|
|
|
|
+ var obj = $('#goodsDetailForm select[name=delvFeeCd] option:selected');
|
|
|
|
|
+ $("#goodsDetailForm input[name=delvFee]").val(obj.attr("delvFee").addComma());
|
|
|
|
|
+ $("#goodsDetailForm input[name=minOrdAmt]").val(obj.attr("minOrdAmt").addComma());
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ //품목코드변경시
|
|
|
|
|
+ $('#goodsDetailForm select[name=itemkindCd]').on('change', function() {
|
|
|
|
|
+ var itemkindCd = $("#goodsDetailForm select[name=itemkindCd]").val();
|
|
|
|
|
+ var params = new Object();
|
|
|
|
|
+ params.itemkindCd = itemkindCd;
|
|
|
|
|
+ cfnAjaxSubmit("/goods/itemkind/list", "json", fnItemkindCallback, params);
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ var fnItemkindCallback = function(result){
|
|
|
|
|
+ if (result == null) return;
|
|
|
|
|
+ $("#goodsDetailForm input[name=niClsfCd]").val(result[0].niClsfCd)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //신규가입구매가능여부 변경시
|
|
|
|
|
+ $('#goodsDetailForm input[name=newCustOrdYn]').on('change', function() {
|
|
|
|
|
+ var newCustOrdYn = $("#goodsDetailForm input[name=newCustOrdYn]:checked").val();
|
|
|
|
|
+ if ("N" == newCustOrdYn){
|
|
|
|
|
+ $("#goodsDetailForm input[name=newCustOrdStdt]").val('');
|
|
|
|
|
+ $("#goodsDetailForm input[name=newCustOrdEddt]").val('');
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // 안전인증
|
|
|
|
|
+ $("#btnGoodsSafetyCertNum").on("click", function(){
|
|
|
|
|
+
|
|
|
|
|
+ if (gagajf.isNull($("#goodsDetailForm input[name=selCertTargetGb]:checked").val())){
|
|
|
|
|
+ mcxDialog.alert("안전인증대상를 선택해 주세요.");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (!fnGoodsSafetyCertNumCheck()) return false;
|
|
|
|
|
+
|
|
|
|
|
+ mcxDialog.confirm('안전인증정보(API)를 변경 하시겠습니까?', {
|
|
|
|
|
+ cancelBtnText: "취소",
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function(){
|
|
|
|
|
+ var data = { goodsCd : $('#goodsDetailForm input[name=goodsCd]').val()
|
|
|
|
|
+ , certTargetGb : $("#goodsDetailForm input[name=selCertTargetGb]:checked").val()
|
|
|
|
|
+ , certFormGb : $("#goodsDetailForm select[name=certFormGb]").val()
|
|
|
|
|
+ , certType : $("#goodsDetailForm select[name=certType]").val()
|
|
|
|
|
+ , certNum : $("#goodsDetailForm input[name=certNum]").val()
|
|
|
|
|
+ };
|
|
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
|
|
+ gagajf.ajaxJsonSubmit('/goods/detail/certNum/save', jsonData, fnGoodsDetailSafeNoSearch);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ var fnGoodsSafetyCertNumCheck = function(){
|
|
|
|
|
+
|
|
|
|
|
+ if (gagajf.isNull($("#goodsDetailForm input[name=selCertTargetGb]:checked").val())){
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ $("#goodsDetailForm input[name=certTargetGb]").val($("#goodsDetailForm input[name=selCertTargetGb]:checked").val());
|
|
|
|
|
+
|
|
|
|
|
+ if ((!gagajf.isNull($("#goodsDetailForm input[name=selCertTargetGb]:checked").val()) && "G083_1" != $("#goodsDetailForm input[name=selCertTargetGb]:checked").val())){
|
|
|
|
|
+
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(gagajf.isNull($("#goodsDetailForm select[name=certFormGb]").val())){
|
|
|
|
|
+ mcxDialog.alertC("안전인증형태를 선택해 주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm select[name=certFormGb]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(gagajf.isNull($("#goodsDetailForm select[name=certType]").val())){
|
|
|
|
|
+ mcxDialog.alertC("안전인증타입를 선택해 주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm select[name=certType]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //인증타입이 공급자적합성일 경우 인증번호 미입력
|
|
|
|
|
+ if( "G081_1" == $("#goodsDetailForm select[name=certType]").val() || "G081_2" == $("#goodsDetailForm select[name=certType]").val()){
|
|
|
|
|
+ if(gagajf.isNull($("#goodsDetailForm input[name=certNum]").val())){
|
|
|
|
|
+ mcxDialog.alertC("안전인증번호를 입력해 주세요.", {
|
|
|
|
|
+ sureBtnText: "확인",
|
|
|
|
|
+ sureBtnClick: function() {
|
|
|
|
|
+ $("#goodsDetailForm input[name=certNum]").focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ $("#goodsDetailForm input[name=certTargetGb]").val($("#goodsDetailForm input[name=selCertTargetGb]:checked").val());
|
|
|
|
|
+
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 상품구매등급
|
|
|
|
|
+ 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;");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 구성상품 조회 팝업
|
|
|
|
|
+ var fnOpenGoodsDetailPopup = function() {
|
|
|
|
|
+ cfnOpenGoodsPopup('fnGoodsDetailGoodsDeal');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 구성상품 조회 팝업 - 상품추가
|
|
|
|
|
+ var fnGoodsDetailGoodsDeal = function(goodsData) {
|
|
|
|
|
+ if (goodsData.length < 1) return;
|
|
|
|
|
+
|
|
|
|
|
+ // 기존상품
|
|
|
|
|
+ var oldGoodsDealList = gagaAgGrid.getAllRowData(gridGoodsComposeOptions);
|
|
|
|
|
+ var idx = oldGoodsDealList.length+1;
|
|
|
|
|
+
|
|
|
|
|
+ var isExist = false;
|
|
|
|
|
+ goodsData.forEach(function(goods){
|
|
|
|
|
+ isExist = false;
|
|
|
|
|
+
|
|
|
|
|
+ gridGoodsComposeOptions.api.forEachNode(function(rowNode, index) {
|
|
|
|
|
+
|
|
|
|
|
+ if (goods.goodsCd == rowNode.data.extendGoodsCd){
|
|
|
|
|
+ isExist = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ if (goods.goodsType != 'G056_N'){
|
|
|
|
|
+ isExist = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(!isExist){
|
|
|
|
|
+
|
|
|
|
|
+ var data = {
|
|
|
|
|
+ goodsCd : $('#goodsDetailForm input[name=goodsCd]').val()
|
|
|
|
|
+ , compsGoodsCd: goods.goodsCd
|
|
|
|
|
+ , goodsType: $('#goodsDetailForm input[name=goodsType]').val()
|
|
|
|
|
+ , dispOrd: idx
|
|
|
|
|
+ , qty: 1
|
|
|
|
|
+ , compsCurrPrice: goods.currPrice
|
|
|
|
|
+ , baseYn: 'N'
|
|
|
|
|
+ , repYn: 'N'
|
|
|
|
|
+ , goodsStat : goods.goodsStat
|
|
|
|
|
+ , useYn: 'Y'
|
|
|
|
|
+ , compsGoodsOptNm : goods.goodsNm
|
|
|
|
|
+ , compsGoodsNm : goods.goodsNm
|
|
|
|
|
+ , currPrice : goods.currPrice
|
|
|
|
|
+ , selfGoodsYn : goods.selfGoodsYn
|
|
|
|
|
+ , sysImgNm : goods.sysImgNm
|
|
|
|
|
+ };
|
|
|
|
|
+ gridGoodsComposeOptions.api.updateRowData({add: [data], addIndex: idx});
|
|
|
|
|
+
|
|
|
|
|
+ idx++;
|
|
|
|
|
+ $('#goodsDetailForm').find('.tabs .tabsNav li:eq(5) a').attr("style", "color:red;");
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ gridGoodsComposeOptions.api.refreshCells();
|
|
|
|
|
+ uifnPopupClose('popupGoods');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //엑셀 상품 조회
|
|
|
|
|
+ $('#btnGoodsDealSearchExcel').on('click', function() {
|
|
|
|
|
+ cfnExcelUploadPopup('goodsDetailExcelUpload', 'goodsDetailExcelUpload');
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ var goodsDetailExcelUpload = function(result){
|
|
|
|
|
+ var data = {procJob : result.procJob
|
|
|
|
|
+ ,excelFileNm : result.excelFileNm
|
|
|
|
|
+ };
|
|
|
|
|
+ var jsonData = JSON.stringify(data);
|
|
|
|
|
+ gagajf.ajaxJsonSubmit('/goods/search/excelupload/ds_save', jsonData, goodsDetailExcelUploadCallBack);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ var goodsDetailExcelUploadCallBack = function(result){
|
|
|
|
|
+ gagajf.ajaxJsonSubmit('/goods/excel/upload/goods/list', '', fnGoodsDetailSearchExcel);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ var fnGoodsDetailSearchExcel = function(result){
|
|
|
|
|
+ fnGoodsDetailGoodsDeal(result.goodsExcelList);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ $("img").on("error", function () {
|
|
|
|
|
+ $(this).attr("src", _uximgUrl+"/image/no.png");
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ var fnUnEscapeHtml = function(){ //XSS변환
|
|
|
|
|
+ $('#goodsDetailForm input[name=goodsTnm]').val($('#goodsDetailForm input[name=goodsTnm]').val().replaceXSS());
|
|
|
|
|
+ $('#goodsDetailForm input[name=goodsNm]').val($('#goodsDetailForm input[name=goodsNm]').val().replaceXSS());
|
|
|
|
|
+ $('#goodsDetailForm input[name=goodsTitlesDesc]').val($('#goodsDetailForm input[name=goodsTitlesDesc]').val().replaceXSS());
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ var fnChangeGrid = function(){ //XSS 그리드 내 변환
|
|
|
|
|
+ var data = gagaAgGrid.getAllRowData(gridGoodsHstoryOptions);
|
|
|
|
|
+ let modifyList = [];
|
|
|
|
|
+ $.each(data, function(idx, item) {
|
|
|
|
|
+ if(item.goodsTnm != null && item.goodsTnm != undefined && item.goodsTnm != ""){
|
|
|
|
|
+ let goodsTnm = item.goodsTnm;
|
|
|
|
|
+
|
|
|
|
|
+ item.goodsTnm = goodsTnm.replaceXSS();
|
|
|
|
|
+ }
|
|
|
|
|
+ if(item.goodsSnm != null && item.goodsSnm != undefined && item.goodsSnm != ""){
|
|
|
|
|
+ let goodsSnm = item. goodsSnm;
|
|
|
|
|
+
|
|
|
|
|
+ item.goodsSnm = goodsSnm.replaceXSS();
|
|
|
|
|
+ }
|
|
|
|
|
+ modifyList.push(item);
|
|
|
|
|
+ });
|
|
|
|
|
+ gridGoodsHstoryOptions.api.setRowData(modifyList);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ $(document).ready(function() {
|
|
|
|
|
+
|
|
|
|
|
+ cfnCreateCheckbox("/renderer/avail/commonCode/list/G110", $('#goodsCustGradeList'), "goodsOrderGrade");
|
|
|
|
|
+
|
|
|
|
|
+ gagaAgGrid.createGrid('gridGoodsHstoryList', gridGoodsHstoryOptions);
|
|
|
|
|
+ gagaAgGrid.createGrid('gridGoodsComposeList', gridGoodsComposeOptions);
|
|
|
|
|
+
|
|
|
|
|
+ fnGoodsDeailSearch();
|
|
|
|
|
+
|
|
|
|
|
+ // Create a summernote
|
|
|
|
|
+ var snOptions1 = gagaSn.getToolbarOptions('media');
|
|
|
|
|
+ var snOptions2 = gagaSn.getToolbarOptions('media');
|
|
|
|
|
+ var snOptions3 = gagaSn.getToolbarOptions('media');
|
|
|
|
|
+ var snOptions4 = gagaSn.getToolbarOptions('media');
|
|
|
|
|
+ var snOptions5 = gagaSn.getToolbarOptions('media');
|
|
|
|
|
+ var snOptions6 = gagaSn.getToolbarOptions('media');
|
|
|
|
|
+ var snOptions7 = gagaSn.getToolbarOptions('media');
|
|
|
|
|
+ gagaSn.createSummernote(snOptions1, '#goodsContentsDesc');
|
|
|
|
|
+ gagaSn.createSummernote(snOptions2, '#goodsCharacterDesc');
|
|
|
|
|
+ gagaSn.createSummernote(snOptions3, '#goodsDesc');
|
|
|
|
|
+ gagaSn.createSummernote(snOptions4, '#goodsPcTopDesc');
|
|
|
|
|
+ gagaSn.createSummernote(snOptions5, '#goodsMobileTopDesc');
|
|
|
|
|
+ gagaSn.createSummernote(snOptions6, '#goodsPcDownDesc');
|
|
|
|
|
+ gagaSn.createSummernote(snOptions7, '#goodsMobileDownDesc');
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+/*]]>*/
|
|
|
|
|
+</script>
|
|
|
</html>
|
|
</html>
|