|
|
@@ -0,0 +1,1979 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="ko"
|
|
|
+ xmlns:th="http://www.thymeleaf.org">
|
|
|
+<!--
|
|
|
+ *******************************************************************************
|
|
|
+ * @source : GoodsDetailForm.html
|
|
|
+ * @desc : 상품 상세 팝업
|
|
|
+ *============================================================================
|
|
|
+ * SISUNChDataYn
|
|
|
+ * Copyright(C) 2020 TSIT, All rights reserved.
|
|
|
+ *============================================================================
|
|
|
+ * VER DATE AUTHOR DESCRIPTION
|
|
|
+ * === =========== ========== =============================================
|
|
|
+ * 1.0 2020.10.23 eskim 최초 작성
|
|
|
+ *******************************************************************************
|
|
|
+ -->
|
|
|
+ <div class="modalPopup" data-width="1500"> <!-- 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>
|
|
|
+ <div class="panelContent">
|
|
|
+ <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" />
|
|
|
+ <table class="frmStyle">
|
|
|
+ <colgroup>
|
|
|
+ <col width="11%"/>
|
|
|
+ <col/>
|
|
|
+ <col width="11%"/>
|
|
|
+ <col width="14%"/>
|
|
|
+ <col width="11%"/>
|
|
|
+ <col width="14%"/>
|
|
|
+ <col width="11%"/>
|
|
|
+ <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><a href="#goodstab3">상품상세정보</a></li>
|
|
|
+ <li id="goodsNotiTab"><a href="#goodstab4">고시정보</a></li>
|
|
|
+ <!-- <li id="goodsColorTab"><a href="#goodstab5">대표색상</a></li> -->
|
|
|
+ <li id="GoodsComposeTab" style="display:none;"><a href="#goodstab6">구성상품</a></li>
|
|
|
+ <li><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 width="10%"/>
|
|
|
+ <col width="15%"/>
|
|
|
+ <col width="15%"/>
|
|
|
+ <col width="15%"/>
|
|
|
+ <col width="15%"/>
|
|
|
+ <col width="15%"/>
|
|
|
+ <col/>
|
|
|
+ </colgroup>
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td rowspan="4" style="text-align:center" th:with="uploadGoodsUrl=${@environment.getProperty('upload.goods.view')}">
|
|
|
+ <img id="goodsImgUrl" src="" width="100px"/>
|
|
|
+ <input type="hidden" name="imgPath1" id="imgPath1" />
|
|
|
+ </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>
|
|
|
+ <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="text" class="w100p" id="goodsSnmTxt" name="goodsSnmTxt" disabled="disabled"></input> -->
|
|
|
+ <input type="hidden" id="goodsSnm" name="goodsSnm"></input>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="aC cRed" style="font-weight:bold;"><span id="goodsTypeNm"></span></td> <!-- 상품타입노출 -->
|
|
|
+ <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></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></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>
|
|
|
+ <td rowspan="11"> </td>
|
|
|
+ <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 id="erplinkarea">
|
|
|
+ <th>원산지</th>
|
|
|
+ <td><span id="makeNmTxt"></span></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>
|
|
|
+ <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>
|
|
|
+ </tr>
|
|
|
+ <tr id="erplinkarea">
|
|
|
+ <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></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>
|
|
|
+ <th>정상가</th>
|
|
|
+ <td class="aR"><span id="listPriceTxt"></span> 원
|
|
|
+ <input type="hidden" id="listPrice" name="listPrice"/>
|
|
|
+ </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 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>반품여부<em class="required" title="필수"></em></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>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <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>기본배송비</th>
|
|
|
+ <td>
|
|
|
+ <input type="text" class="w100 aR" id="delvFee" name="delvFee" disabled="disabled"/> 원
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>PC포인트<em class="required" title="필수"></em></th>
|
|
|
+ <td>
|
|
|
+ <input type="text" class="w50 aR" id="pntPrate" name="pntPrate" data-valid-type="numeric" 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="numeric" 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>
|
|
|
+ <input type="text" class="w100 aR" id="minOrdAmt" name="minOrdAmt" data-valid-type="numeric" maxlength="10"/> 원
|
|
|
+ <input type="hidden" id="minOrdAmtOrg" name="minOrdAmtOrg"/>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>최소주문수량<em class="required" title="필수"></em></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></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></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>
|
|
|
+ </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">
|
|
|
+ <!-- TABS SPACE -->
|
|
|
+ <div class="tabsJr">
|
|
|
+ <!-- TABS CONTENT -->
|
|
|
+ <ul class="tabsJrCont">
|
|
|
+ <!-- TAB -->
|
|
|
+ <li class="tabJr on" id="goodstab11">
|
|
|
+ <!-- TAB11 CONTENTS AREA -->
|
|
|
+ <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>
|
|
|
+ <tr>
|
|
|
+ <th>상위(PC)</th>
|
|
|
+ <td><div class="tabJrContArea">
|
|
|
+ <textarea class="textareaR4 summernote" name="goodsPcTopDesc" id="goodsPcTopDesc"></textarea>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>상위(MOBILE)</th>
|
|
|
+ <td><div class="tabJrContArea">
|
|
|
+ <textarea class="textareaR4 summernote" name="goodsMobileTopDesc" id="goodsMobileTopDesc"></textarea>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>하위(PC)</th>
|
|
|
+ <td><div class="tabJrContArea">
|
|
|
+ <textarea class="textareaR4 summernote" name="goodsPcDownDesc" id="goodsPcDownDesc"></textarea>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>하위(MOBILE)</th>
|
|
|
+ <td><div class="tabJrContArea">
|
|
|
+ <textarea class="textareaR4 summernote" name="goodsMobileDownDesc" id="goodsMobileDownDesc"></textarea>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </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">
|
|
|
+ <div class="panelStyle">
|
|
|
+ <div id="gridGoodsNumList" style="height: 480px;" class="ag-theme-balham lh60"></div>
|
|
|
+ </div>
|
|
|
+ </li> -->
|
|
|
+
|
|
|
+ <!-- TAB6 : 구성상품 -->
|
|
|
+ <li class="tab" id="goodstab6">
|
|
|
+ <!-- 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('SF003');">양식다운로드</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: 500px;" class="ag-theme-balham lh60"></div>
|
|
|
+ <!-- 내용 삽입 -->
|
|
|
+ </div>
|
|
|
+ <!-- //TAB6 CONTENTS AREA -->
|
|
|
+ </li>
|
|
|
+ <!-- //TAB7 : 추가정보 -->
|
|
|
+ <!-- TAB5 : 이력정보 -->
|
|
|
+ <li class="tab" id="goodstab7">
|
|
|
+ <!-- TAB8 CONTENTS AREA -->
|
|
|
+ <div class="panelStyle">
|
|
|
+ <!-- 내용 삽입 -->
|
|
|
+ <div id="gridGoodsHstoryList" style="height: 500px;" class="ag-theme-balham"></div>
|
|
|
+ <!-- 내용 삽입 -->
|
|
|
+ </div>
|
|
|
+ <!-- //TAB5 CONTENTS AREA -->
|
|
|
+ </li>
|
|
|
+ <!-- //TAB5 : 추가정보 -->
|
|
|
+ </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 -->
|
|
|
+ </form>
|
|
|
+ </div> <!-- class=panelContent -->
|
|
|
+ </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=2020103001"></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}]]);
|
|
|
+ var uploadGoodsUrl = [[${@environment.getProperty('upload.goods.view')}]];
|
|
|
+ // 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: "imgPath1", width: 100, height: 60, cellClass: 'text-center'
|
|
|
+ ,cellRenderer: function(params) {
|
|
|
+ if (params.data.imgType == "G030_A"){
|
|
|
+ if(!gagajf.isNull(params.data.imgPath6)){
|
|
|
+ return '<img width="60" src="'+ params.data.imgPath1 + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
|
|
|
+ }else{
|
|
|
+ return '<img width="60" src="'+ params.value + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
|
|
|
+ }
|
|
|
+
|
|
|
+ }else{
|
|
|
+ if(!gagajf.isNull(params.data.imgPath6)){
|
|
|
+ return '<img width="60" src="'+ uploadGoodsUrl+params.data.imgPath6 + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
|
|
|
+ }else{
|
|
|
+ return '<img width="60" src="'+ uploadGoodsUrl+params.value + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {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: "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' };
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 상품상세 조회
|
|
|
+ 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);
|
|
|
+ $('#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.makeNm);
|
|
|
+ $('#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').find('#listPriceTxt').html(result.listPrice.addComma());
|
|
|
+ $('#goodsDetailForm input[name=listPrice]').val(result.listPrice);
|
|
|
+ $('#goodsDetailForm input[name=currPrice]').val(result.currPrice.addComma());
|
|
|
+ $('#goodsDetailForm input[name=currPriceOrg]').val(result.currPrice);
|
|
|
+ $('#goodsDetailForm').find('#dcRateTxt').html(result.dcRate);
|
|
|
+ $('#goodsDetailForm input[name=dcRate]').val(result.dcRate);
|
|
|
+ $('#goodsDetailForm').find('#priceUpdDtTxt').html(!gagajf.isNull(result.priceUpdDt) ? result.priceUpdDt.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD") : '');
|
|
|
+ $('#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 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');
|
|
|
+ }
|
|
|
+
|
|
|
+ $('#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');
|
|
|
+ }
|
|
|
+
|
|
|
+ $("#goodsDetailForm input[name=formalGbOrg]").val(result.formalGb);
|
|
|
+ $("#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[type=radio][checked]").addClass("checked");
|
|
|
+ //$("#goodsDetailForm input[type=radio][checked]").parent("label").addClass("checked");
|
|
|
+
|
|
|
+ //입점상품일 경우
|
|
|
+ if (result.selfGoodsYn == "N"){
|
|
|
+ //$('#goodsDetailForm').find('#erplinkarea').hide();
|
|
|
+ $("#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=minOrdAmtOrg]').val(result.minOrdAmt);
|
|
|
+ $('#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);
|
|
|
+
|
|
|
+ //상품상세
|
|
|
+ // 공지내용. Summernote에 값 세팅
|
|
|
+ gagaSn.setContents('#goodsPcTopDesc', result.goodsPcTopDesc);
|
|
|
+ gagaSn.setContents('#goodsMobileTopDesc', result.goodsMobileTopDesc);
|
|
|
+ gagaSn.setContents('#goodsPcDownDesc', result.goodsPcDownDesc);
|
|
|
+ gagaSn.setContents('#goodsMobileDownDesc', result.goodsMobileDownDesc);
|
|
|
+
|
|
|
+ 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");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ var goodsImg = "";
|
|
|
+ var goodsImgPath1 = "";
|
|
|
+ if (result.imgType == "G030_A"){
|
|
|
+ if (!gagajf.isNull(result.imgPath6)){
|
|
|
+ goodsImg = result.imgPath6;
|
|
|
+ goodsImgPath1 = result.imgPath6;
|
|
|
+ }else{
|
|
|
+ goodsImg = result.imgPath1;
|
|
|
+ goodsImgPath1 = result.imgPath1;
|
|
|
+ }
|
|
|
+
|
|
|
+ }else{
|
|
|
+ if (!gagajf.isNull(result.imgPath6)){
|
|
|
+ goodsImg = uploadGoodsUrl+result.imgPath6;
|
|
|
+ goodsImgPath1 = result.imgPath6;
|
|
|
+ }else{
|
|
|
+ goodsImg = uploadGoodsUrl+result.imgPath1;
|
|
|
+ goodsImgPath1 = result.imgPath1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $('#goodsDetailForm').find('#goodsImgUrl').attr('src',goodsImg);
|
|
|
+ $('#goodsDetailForm input[name=imgPath1]').val(goodsImgPath1);
|
|
|
+ $("#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){
|
|
|
+ //$('#goodsDetailForm #erplinkarea').addClass('off');
|
|
|
+ if (result.selfGoodsYn == "Y") $('#goodsDetailForm #GoodsComposeTab').css('display','block');
|
|
|
+ $('#goodsDetailForm #goodsNotiTab').css('display','none');
|
|
|
+ $('#goodsDetailForm input[name=sellFeeRate]').attr('readonly', true);
|
|
|
+ $('#goodsDetailForm input[name=currPrice]').attr('readonly', true);
|
|
|
+ }else if ("G056_D" == result.goodsType){
|
|
|
+ //$('#goodsDetailForm #erplinkarea').addClass('off');
|
|
|
+ if (result.selfGoodsYn == "Y") $('#goodsDetailForm #GoodsComposeTab').css('display','block');
|
|
|
+ $('#goodsDetailForm #goodsNotiTab').css('display','none');
|
|
|
+ $('#goodsDetailForm input[name=sellFeeRate]').attr('readonly', true);
|
|
|
+ }
|
|
|
+
|
|
|
+ //상품 구분에 따른 컬럼 사용여부처리 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);
|
|
|
+
|
|
|
+ //구성상품
|
|
|
+ if ("G056_S" == result.goodsType || "G056_D" == result.goodsType){
|
|
|
+ fnGoodsComposeListSearch(params);
|
|
|
+ }
|
|
|
+ //이력
|
|
|
+ fnGoodsDetailHstSearch();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ //기본정보탭 변경여부
|
|
|
+ $('#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 fnGoodsComposeListSearch = function(params) {
|
|
|
+ if ("G056_S" == params.goodsType){ //세트
|
|
|
+ gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'currPrice', false);
|
|
|
+ gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'useYn', false);
|
|
|
+ gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'compsGoodsOptNm', 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);
|
|
|
+ }
|
|
|
+
|
|
|
+ //이력
|
|
|
+ var fnGoodsDetailHstSearch = function() {
|
|
|
+ gagaAgGrid.fetch("/goods/detail/hst/list?goodsCd=" + $('#goodsDetailForm input[name=goodsCd]').val() , gridGoodsHstoryOptions);
|
|
|
+ }
|
|
|
+
|
|
|
+ //정보고시 콜백
|
|
|
+ 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/><col style="width:5%"/><col style="width:5%"/></colgroup>';
|
|
|
+ notiHtml += '<tbody id="infoContents">\n';
|
|
|
+ notiHtml += '<tr><th>고시항목</th><th>고시내용</th><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 += '<td class="aC">'+gagajf.convNull(info.reqYn, '')+'<input type="hidden" name="reqYn" value="'+ gagajf.convNull(info.reqYn, '') +'"/></td>\n';
|
|
|
+ notiHtml += '<td class="aC">'+gagajf.convNull(info.dispYn, '')+'<input type="hidden" name="dispYn" value="'+ gagajf.convNull(info.dispYn, '') +'"/></td>\n';
|
|
|
+ notiHtml += '</tr>\n';
|
|
|
+ });
|
|
|
+ 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;");
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ //상품명 길이표시
|
|
|
+ $("#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();
|
|
|
+ });
|
|
|
+
|
|
|
+ //판매가의 할인율 확인
|
|
|
+ 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 select[name=goodsStatOrg]").val() != "G008_90"){
|
|
|
+ mcxDialog.alert(" '승인완료' 상태로 변경할 권한이 없습니다.");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ //list가 등록되지 않은 상품은 상태변경 불가
|
|
|
+ if(Number($("#goodsDetailForm input[name=listPrice]").val()) == 0){
|
|
|
+ mcxDialog.alertC("TAG가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ $("#goodsDetailForm select[name=goodsStat]").focus();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ //판매가가 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 ("Y" == $(this).find("input[name=reqYn]").val() || "Y" == $(this).find("input[name=dispYn]").val()){
|
|
|
+ if (gagajf.isNull($(this).find("input[name=niContent]").val())){
|
|
|
+ optCheck = true;
|
|
|
+ mcxDialog.alertC("고시정보를 입력해주세요.");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ idx++;
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 자사일 경우 대표색상 선택 여부
|
|
|
+ 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=seasonCd]").val())){
|
|
|
+ mcxDialog.alertC("시즌을 선택해 주세요.", {
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ $("#goodsDetailForm select[name=seasonCd]").focus();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ //판매가
|
|
|
+ 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(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 ( 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 ( gagajf.isNull($("#goodsDetailForm input[name=minOrdAmt]").val())) {
|
|
|
+ mcxDialog.alertC("무료 배송 금액을 입력해 주세요.", {
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ $("#goodsDetailForm input[name=minOrdAmt]").focus();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (Number($("#goodsDetailForm input[name=minOrdAmt]").val().removeComma()) <= 0) {
|
|
|
+ mcxDialog.alertC("무료 배송 금액을 입력해 주세요.", {
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ $("#goodsDetailForm input[name=minOrdAmt]").focus();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ //if (optCheck) 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 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'일 경우 수정여부 확인
|
|
|
+ /* if ( $('#goodsDetailForm input[name=erpStockLinkYn]:checked').val() == "Y"){
|
|
|
+ if (Number(editCurrStockQty) != Number(currStockQty) ){
|
|
|
+ optCheck = true;
|
|
|
+ mcxDialog.alertC("ERP가용재고가 변경되었습니다.<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(baseStockQty)){
|
|
|
+ optCheck = true;
|
|
|
+ mcxDialog.alertC("안전재고를 입력해주세요", {
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ $("#optionList tr").find("input[name=baseStockQty]").eq(idx).focus();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (optCd1 != hidOptCd1){
|
|
|
+ $("#goodsDetailForm input[name=chStockDataYn]").val('Y');
|
|
|
+ }
|
|
|
+
|
|
|
+ if (optCd2 != hidOptCd2){
|
|
|
+ $("#goodsDetailForm input[name=chStockDataYn]").val('Y');
|
|
|
+ }
|
|
|
+
|
|
|
+ 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');
|
|
|
+ }
|
|
|
+
|
|
|
+ idx++;
|
|
|
+ });
|
|
|
+
|
|
|
+ if(optCheck) {
|
|
|
+ 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();
|
|
|
+ dcRate = 100 - Math.floor(Number(currPrice) / Number(listPrice) * 100); //절사
|
|
|
+
|
|
|
+ if (dcRate < 0){
|
|
|
+ mcxDialog.alertC('할인율이 0보다 작습니다.\n판매가를 확인해주세요.', {
|
|
|
+ sureBtnText: "확인",
|
|
|
+ sureBtnClick: function() {
|
|
|
+ $("#goodsDetailForm input[name=currPrice]").focus();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }else if (dcRate >= 90){
|
|
|
+ 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/>저장을 원하시면 체크를 해제하세요. 계속하시겠습니까?", {
|
|
|
+ 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 = '';
|
|
|
+ //기준여부 Y 존재하는지 확인
|
|
|
+ var checkBaseYn = false;
|
|
|
+ optCheck = false;
|
|
|
+ $.each(allData, function(index, item) {
|
|
|
+ if (index == 0){
|
|
|
+ comSelfGoodsYn = item.selfGoodsYn;
|
|
|
+ comSupplyCompCd = item.supplyCompCd;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (item.baseYn == "Y"){
|
|
|
+ checkBaseYn = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (comSelfGoodsYn != item.selfGoodsYn){
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+ if(optCheck) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!checkBaseYn){
|
|
|
+ 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);
|
|
|
+
|
|
|
+ $('#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, "'"));
|
|
|
+
|
|
|
+ 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(){debugger;
|
|
|
+
|
|
|
+ //상품타이틀
|
|
|
+ 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=currPriceOrg]").val() != $("#goodsDetailForm input[name=currPrice]").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=minOrdAmtOrg]").val() != $("#goodsDetailForm input[name=minOrdAmt]").val().removeComma()){
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 고시정보 수정은 맘대로 할수 있음 20200821 신현장 부장 확인
|
|
|
+ /* if ($("#goodsDetailForm input[name=niClsfCd]").val() != $("#goodsDetailForm select[name=selNiClsfCd]").val()){
|
|
|
+ mcxDialog.alertC("상품의 고시분류는 [" + $("#goodsDetailForm input[name=niClsfNm]").val() +"] 입니다." , {
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ // 구성상품 조회 팝업
|
|
|
+ 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 != 'N'){
|
|
|
+ isExist = true;
|
|
|
+ }
|
|
|
+ if(!isExist){
|
|
|
+
|
|
|
+ var data = {
|
|
|
+ goodsCd : $('#goodsDetailForm input[name=goodsCd]').val()
|
|
|
+ , extendGoodsCd: goods.goodsCd
|
|
|
+ , goodsType: $('#goodsDetailForm input[name=goodsType]').val()
|
|
|
+ , dispOrd: idx
|
|
|
+ , qty: 1
|
|
|
+ , compsCurrPrice: goods.currPrice
|
|
|
+ , extendStaffCurrPrice: goods.currPrice
|
|
|
+ , baseYn: 'N'
|
|
|
+ , goodsStat : goods.goodsStat
|
|
|
+ , useYn: 'Y'
|
|
|
+ , extendGoodsOptNm : goods.goodsNm
|
|
|
+ , extendGoodsCdNm : goods.goodsNm
|
|
|
+ , currPrice : goods.currPrice
|
|
|
+ , selfGoodsYn : goods.selfGoodsYn
|
|
|
+ , imgType : goods.imgType
|
|
|
+ , imgPath1 : goods.imgPath1
|
|
|
+ , imgPath6 : goods.imgPath6
|
|
|
+ };
|
|
|
+ gridGoodsComposeOptions.api.updateRowData({add: [data], addIndex: idx});
|
|
|
+
|
|
|
+ idx++;
|
|
|
+ $('#goodsDetailForm').find('.tabs .tabsNav li:eq(5) a').attr("style", "color:red;");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ gridGoodsComposeOptions.api.refreshCells();
|
|
|
+ }
|
|
|
+
|
|
|
+ //엑셀 상품 조회
|
|
|
+ $('#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/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.gif");
|
|
|
+ });
|
|
|
+
|
|
|
+ $(document).ready(function() {
|
|
|
+
|
|
|
+ gagaAgGrid.createGrid('gridGoodsHstoryList', gridGoodsHstoryOptions);
|
|
|
+ gagaAgGrid.createGrid('gridGoodsComposeList', gridGoodsComposeOptions);
|
|
|
+
|
|
|
+ fnGoodsDeailSearch();
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+/*]]>*/
|
|
|
+</script>
|
|
|
+</html>
|