| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245 |
- <!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="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>
- <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" /> <!-- 대표상품(딜 가격) -->
- <div class="panelContent">
- <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="goodsComposeTab" style="display:none;"><a href="#goodstab5">구성상품</a></li>
- <li><a href="#goodstab6">변경이력</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">
- <img id="goodsImgUrl" src="" width="100px"/>
- <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>
- <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="12"> </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>과세구분</th>
- <td>
- <select name="taxGb" disabled="disabled">
- <option value="">[선택]</option>
- <option value="10">과세</option>
- <option value="20">비과세</option>
- </select>
- </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="w80p aR" id="costPrice" name="costPrice" maxlength="10" data-valid-type="numeric"/> 원
- <input type="hidden" id="costPriceOrg" name="costPriceOrg"/>
- </td>
- </tr>
- <tr>
- <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>
- <th>교환여부<em class="required" title="필수"></em></th>
- <td>
- <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>
- <th>신규가입구매가능여부<em class="required" title="필수"></em></th>
- <td>
- <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"/>
- </td>
- </tr>
- <tr>
- <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>
- <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>
- <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>
- <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>
- <tr>
- <th>구매등급</th>
- <td colspan="5">
- <div id="goodsCustGradeList"></div>
- </td>
- </tr>
- <tr>
- <th>안전인증번호</th>
- <td colspan="5">
- <input type="text" class="w150" id="certNum" name="certNum" maxlength="20"/>
- <input type="hidden" id="certNumOrg" name="certNumOrg"/>
- <button type="button" class="btn btn-success btn-lg" id="btnGoodsSafetyCertNum">안전인증</button>
- </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><input type="text" class= "w100p" id="goodsTitlesDesc" name="goodsTitlesDesc" maxlength="100" />
- </td>
- </tr>
- <tr>
- <th>내용</th>
- <td><div class="tabJrContArea">
- <textarea class="textareaR3 summernote" name="goodsContentsDesc" id="goodsContentsDesc"></textarea>
- </div>
- </td>
- </tr>
- <tr>
- <th>상품 특징</th>
- <td><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><div class="tabJrContArea">
- <textarea class="textareaR4 summernote" name="goodsDesc" id="goodsDesc"></textarea>
- </div>
- </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>
- </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('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: 600px;" class="ag-theme-balham lh60"></div>
- <!-- 내용 삽입 -->
- </div>
- <!-- //TAB6 CONTENTS AREA -->
- </li>
- <!-- TAB5 : 이력정보 -->
- <li class="tab" id="goodstab6">
- <!-- TAB8 CONTENTS AREA -->
- <div class="panelStyle">
- <!-- 내용 삽입 -->
- <div id="gridGoodsHstoryList" style="height: 600px;" 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 -->
-
- </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=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}]]);
- // 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 + '" alt="" onclick="cfnOpenImagePreViewPopup(\'goodsImgView\', \''+ _goodsUrl+ "/" + params.value +'\')" 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: "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);
- $('#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 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');
- }
-
- $('#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[name=newCustOrdYnOrg]").val(result.newCustOrdYn);
- $("#goodsDetailForm input[name=adultYnOrg]").val(result.adultYn);
-
- $("#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=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);
-
- cfnCreateCombo('/renderer/delvFee/list/' + result.supplyCompCd, $('#goodsDetailForm select[name=delvFeeCd]'), "[선택]", result.delvFeeCd);
- $('#goodsDetailForm input[name=delvFeeCdOrg]').val(result.delvFeeCd);
-
- $('#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);
- gagaSn.setContents('#goodsDesc', result.goodsDesc);
- 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);
- $('#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){
- //$('#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);
- //구매등급
- fnGoodsDetailOrderGradeSearch(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 fnGoodsDetailOrderGradeSearch = function(params) {
- cfnAjaxSubmit("/goods/detail/order/grade/list", "json", fnGoodsDetailOrderGradeSearchCallback, 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);
- }
-
- //이력
- 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/></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';
- });
- 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");
- }
- });
- });
- }
- //상품명 길이표시
- $("#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 input[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 (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=goodsGb]").val())){
- mcxDialog.alertC("상품구분을 선택해 주세요.", {
- sureBtnText: "확인",
- sureBtnClick: function() {
- $("#goodsDetailForm select[name=goodsGb]").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 ($("#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(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;
- }
- 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'일 경우 수정여부 확인
- /* 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(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;
- }
-
- 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 && ($("#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/>저장을 원하시면 체크를 해제하세요. 계속하시겠습니까?", {
- 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){
- 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);
-
- $('#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(){
-
- //상품타이틀
- 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=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=changeableYnOrg]").val() != $("input[name=changeableYn]:checked").val()){
- return true;
- }
- // 신규가입구매가능여부
- if ($("#goodsDetailForm input[name=newCustOrdYnOrg]").val() != $("input[name=newCustOrdYn]:checked").val()){
- return true;
- }
- // 성인용품여부
- if ($("#goodsDetailForm input[name=adultYnOrg]").val() != $("input[name=adultYn]: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);
- }
- });
- });
-
- // 안전인증
- $("#btnGoodsSafetyCertNum").on("click", function(){
- /*
- if($("#goodsDetailForm input[name=certNum]").val() == $("#goodsDetailForm input[name=certNumOrg]").val()){
- mcxDialog.alert("안전인증번호가 변경되지 않았습니다.");
- return false;
- }
- */
- mcxDialog.confirm('안전인증번호를 변경 하시겠습니까?', {
- cancelBtnText: "취소",
- sureBtnText: "확인",
- sureBtnClick: function(){
- var data = { goodsCd : $('#goodsDetailForm input[name=goodsCd]').val()
- , certNum : $("#goodsDetailForm input[name=certNum]").val()
- };
- var jsonData = JSON.stringify(data);
- gagajf.ajaxJsonSubmit('/goods/detail/certNum/save', jsonData ); //, fnGoodsDeailSearch
- }
- });
- });
-
- // 상품구매등급
- 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 != '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
- , 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();
- }
-
- //엑셀 상품 조회
- $('#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() {
-
- cfnCreateCheckbox("/renderer/avail/commonCode/list/G101", $('#goodsCustGradeList'), "goodsOrderGrade");
- gagaAgGrid.createGrid('gridGoodsHstoryList', gridGoodsHstoryOptions);
- gagaAgGrid.createGrid('gridGoodsComposeList', gridGoodsComposeOptions);
- fnGoodsDeailSearch();
-
- });
-
- /*]]>*/
- </script>
- </html>
|