GoodsDetailForm.html 74 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844
  1. <!DOCTYPE html>
  2. <html lang="ko"
  3. xmlns:th="http://www.thymeleaf.org">
  4. <!--
  5. *******************************************************************************
  6. * @source : GoodsDetailForm.html
  7. * @desc : 상품 상세 팝업
  8. *============================================================================
  9. * STYLE24
  10. * Copyright(C) 2020 TSIT, All rights reserved.
  11. *============================================================================
  12. * VER DATE AUTHOR DESCRIPTION
  13. * === =========== ========== =============================================
  14. * 1.0 2020.10.23 eskim 최초 작성
  15. *******************************************************************************
  16. -->
  17. <div class="modalPopup" data-width="1500"> <!-- data-width="1500" data-height="870" -->
  18. <div class="panelStyle">
  19. <div class="panelTitle">
  20. <h2>상품상세</h2>
  21. <button type="button" class="close" onclick="fnGoodsDetailClose()"><i class="fa fa-times"></i></button>
  22. </div>
  23. <form id="goodsDetailForm" name="goodsDetailForm" action="#" th:method="post">
  24. <input type="hidden" id="mode" name="mode" th:value="${params.mode}"/>
  25. <input type="hidden" id="goodsCd" name="goodsCd" th:value="${params.goodsCd}"/>
  26. <input type="hidden" id="niClsfCd" name="niClsfCd"/>
  27. <input type="hidden" id="selfGoodsYn" name="selfGoodsYn"/>
  28. <input type="hidden" id="notiList" name="notiList" />
  29. <input type="hidden" id="chDataYn" name="chDataYn" />
  30. <input type="hidden" id="chStockDataYn" name="chStockDataYn" />
  31. <input type="hidden" id="chCfrmYn" name="chCfrmYn" />
  32. <input type="hidden" id="goodsImageYn" name="goodsImageYn" />
  33. <input type="hidden" id="niClsfNm" name="niClsfNm" />
  34. <input type="hidden" id="uploadGoodsUrl" name="uploadGoodsUrl" th:value="${@environment.getProperty('upload.goods.view')}"/>
  35. <input type="hidden" id="mainColorCd" name="mainColorCd" />
  36. <input type="hidden" id="goodsType" name="goodsType" />
  37. <input type="hidden" id="goodsComposeList" name="goodsComposeList" />
  38. <input type="hidden" id="costPrice" name="costPrice" />
  39. <div class="panelContent">
  40. <table class="frmStyle">
  41. <colgroup>
  42. <col width="11%"/>
  43. <col/>
  44. <col width="11%"/>
  45. <col width="14%"/>
  46. <col width="11%"/>
  47. <col width="14%"/>
  48. <col width="11%"/>
  49. <col width="14%"/>
  50. </colgroup>
  51. <tr>
  52. <th>브랜드명<em class="required" title="필수"></em></th>
  53. <td colspan="3">
  54. <select name="selSupplyCompCd" id="selSupplyCompCd" disabled="disabled" class="w40p">
  55. <option value="">[선택]</option>
  56. <option th:if="${supplyCompList}" th:each="oneData, status : ${supplyCompList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
  57. </select>
  58. <select name="selBrandCd" id="selBrandCd" disabled="disabled" class="w40p">
  59. <option value="">[선택]</option>
  60. </select>
  61. <input type="hidden" name="supplyCompCd" id="supplyCompCd" />
  62. <input type="hidden" name="brandGrpNm" id="brandGrpNm" />
  63. <input type="hidden" name="brandCd" id="brandCd" />
  64. </td>
  65. <th>상품코드<em class="required" title="필수"></em></th>
  66. <td><div id="goodsCdTxt"></div></td>
  67. <th>원코드</th>
  68. <td><span id="supplyGoodsCdTxt"></span></td>
  69. </tr>
  70. </table>
  71. <!-- TABS SPACE -->
  72. <div class="tabs">
  73. <!-- TABS NAVI -->
  74. <div class="tabsNav">
  75. <ul>
  76. <li class="on"><a href="#goodstab1">기본정보</a></li>
  77. <li><a href="#goodstab2">옵션/재고정보</a></li>
  78. <li><a href="#goodstab3">상품상세정보</a></li>
  79. <li id="goodsNotiTab"><a href="#goodstab4">고시정보</a></li>
  80. <li id="goodsComposeTab" style="display:none;"><a href="#goodstab5">구성상품</a></li>
  81. <li><a href="#goodstab6">변경이력</a></li>
  82. </ul>
  83. </div>
  84. <!-- //TABS NAVI -->
  85. <!-- TABS CONTENTS -->
  86. <ul class="tabsCont" th:with="uxImgUrl=${@environment.getProperty('domain.uximage')}">
  87. <!-- TAB1 : 기본정보 -->
  88. <li class="tab on" id="goodstab1">
  89. <!-- TAB1 CONTENTS AREA -->
  90. <div class="panelStyle">
  91. <table class="frmStyle">
  92. <colgroup>
  93. <col width="10%"/>
  94. <col width="15%"/>
  95. <col width="15%"/>
  96. <col width="15%"/>
  97. <col width="15%"/>
  98. <col width="15%"/>
  99. <col/>
  100. </colgroup>
  101. <tbody>
  102. <tr>
  103. <td rowspan="4" style="text-align:center" th:with="uploadGoodsUrl=${@environment.getProperty('upload.goods.view')}">
  104. <img id="goodsImgUrl" src="" width="100px"/>
  105. <input type="hidden" name="sysImgNm" id="sysImgNm" />
  106. </td>
  107. <th>상품타이틀</th>
  108. <td colspan="5">
  109. <input type="text" class="w80p" id="goodsTnm" name="goodsTnm" maxlength=""></input>
  110. <span class="byteChk"><em class="cBlue" id="goodsTnmLen">0</em>/100 bytes</span>
  111. <input type="hidden" id="goodsTnmOrg" name="goodsTnmOrg"/>
  112. </td>
  113. </tr>
  114. <tr>
  115. <th>상품명<em class="required" title="필수"></em></th>
  116. <td colspan="5">
  117. <input type="text" class="w80p" id="goodsNm" name="goodsNm"></input>
  118. <span class="byteChk"><em class="cBlue" id="goodsNmLen">0</em>/200 bytes</span>
  119. <input type="hidden" id="goodsNmOrg" name="goodsNmOrg"/>
  120. </td>
  121. </tr>
  122. <tr>
  123. <th>사용자검색어</th>
  124. <td colspan="5">
  125. <input type="text" class="w60p" id="goodsSnm1" name="goodsSnm1"></input>
  126. <span class="byteChk"><em class="cBlue" id="goodsSnm1Len">0</em>/200 bytes</span><font class="cBlue padL10"><b>* 여러개설정할경우 ; 구분자 사용 / 공백은 자동삭제처리</b></font>
  127. <input type="hidden" id="goodsSnm1Org" name="goodsSnm1Org"/>
  128. </td>
  129. </tr>
  130. <tr>
  131. <th>검색어</th>
  132. <td colspan="5">
  133. <textarea class="textareaR2 w100p" id="goodsSnmTxt" name="goodsSnmTxt" disabled="disabled"></textarea>
  134. <!-- <input type="text" class="w100p" id="goodsSnmTxt" name="goodsSnmTxt" disabled="disabled"></input> -->
  135. <input type="hidden" id="goodsSnm" name="goodsSnm"></input>
  136. </td>
  137. </tr>
  138. <tr>
  139. <td class="aC cRed" style="font-weight:bold;"><span id="goodsTypeNm"></span></td> <!-- 상품타입노출 -->
  140. <th>정상/이월 구분<em class="required" title="필수"></em></th>
  141. <td>
  142. <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>
  143. <input type="hidden" id="formalGbOrg" name="formalGbOrg"/>
  144. </td>
  145. <th>상품상태<em class="required" title="필수"></em></th>
  146. <td>
  147. <select name="goodsStat" id="goodsStat">
  148. <option value="">[선택]</option>
  149. <option th:if="${goodsStatList}" th:each="oneData, status : ${goodsStatList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
  150. </select>
  151. <input type="hidden" id="goodsStatOrg" name="goodsStatOrg"/>
  152. </td>
  153. <th>자사몰 노출여부<em class="required" title="필수"></em></th>
  154. <td>
  155. <label class="rdoBtn"><input type="radio" name="selfMallYn" id="selfMallYnY" value="Y" />Y</label>
  156. <label class="rdoBtn"><input type="radio" name="selfMallYn" id="selfMallYnN" value="N"/>N</label>
  157. <input type="hidden" id="selfMallYnOrg" name="selfMallYnOrg"/>
  158. </td>
  159. </tr>
  160. <tr>
  161. <td rowspan="11">&nbsp;</td>
  162. <th>시즌<em class="required" title="필수"></em></th>
  163. <td >
  164. <select name="seasonCd" id="seasonCd">
  165. <option value="">[선택]</option>
  166. <option th:if="${seasonList}" th:each="oneData, status : ${seasonList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
  167. </select>
  168. <input type="hidden" id="seasonCdOrg" name="seasonCdOrg"/>
  169. </td>
  170. <th>성별<em class="required" title="필수"></em></th>
  171. <td>
  172. <select name="sexGb" id="sexGb">
  173. <option value="">[선택]</option>
  174. <option th:if="${sexGbList}" th:each="oneData, status : ${sexGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
  175. </select>
  176. <input type="hidden" id="sexGbOrg" name="sexGbOrg"/>
  177. </td>
  178. <th>스타일년도</th>
  179. <td><span id="styleYearTxt"></span></td>
  180. </tr>
  181. <tr id="erplinkarea">
  182. <th>원산지</th>
  183. <td><span id="makeNmTxt"></span></td>
  184. <th>상품구분<em class="required" title="필수"></em></th>
  185. <td>
  186. <select name="goodsGb" id="goodsGb">
  187. <option value="">[선택]</option>
  188. <option th:if="${goodsGbList}" th:each="oneData, status : ${goodsGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
  189. </select>
  190. <input type="hidden" id="goodsGbOrg" name="goodsGbOrg"/>
  191. </td>
  192. <th>유통구분<em class="required" title="필수"></em></th>
  193. <td><select name="distributionGb" id="distributionGb">
  194. <option value="">[선택]</option>
  195. <option th:if="${distributionGbList}" th:each="oneData, status : ${distributionGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
  196. </select>
  197. <input type="hidden" id="distributionGbOrg" name="distributionGbOrg"/>
  198. </td>
  199. </tr>
  200. <tr id="erplinkarea">
  201. <th>상품연령대</th>
  202. <td>
  203. <select name="ageGrpCd" id="ageGrpCd">
  204. <option value="">[선택]</option>
  205. <option th:if="${ageGrpCdList}" th:each="oneData, status : ${ageGrpCdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
  206. </select>
  207. <input type="hidden" id="ageGrpCdOrg" name="ageGrpCdOrg"/>
  208. </td>
  209. <th>선물 주문가능여부<em class="required" title="필수"></em></th>
  210. <td>
  211. <label class="rdoBtn"><input type="radio" name="giftPackYn" id="giftPackYnY" value="Y" />Y</label>
  212. <label class="rdoBtn"><input type="radio" name="giftPackYn" id="giftPackYnN" value="N"/>N</label>
  213. <input type="hidden" id="giftPackYnOrg" name="giftPackYnOrg"/>
  214. </td>
  215. <th>가격변경일</th>
  216. <td><span id="priceUpdDtTxt"></span></td>
  217. </tr>
  218. <tr>
  219. <th>정상가</th>
  220. <td class="aR"><span id="listPriceTxt"></span> 원
  221. <input type="hidden" id="listPrice" name="listPrice"/>
  222. </td>
  223. <th>판매가<em class="required" title="필수"></em></th>
  224. <td><input type="text" class="w80p aR" id="currPrice" name="currPrice" maxlength="10" data-valid-type="numeric"/> 원
  225. <input type="hidden" id="currPriceOrg" name="currPriceOrg"/>
  226. </td>
  227. <th>할인율</th>
  228. <td class="aR" ><span id="dcRateTxt"></span> % <input type="hidden" id="dcRate" name="dcRate"/></td>
  229. </tr>
  230. <tr id="selfGoodsNSellFeeRate">
  231. <th>최초승인일</th>
  232. <td><span id="frstCfrmDtTxt"></span></td>
  233. <th>판매수수료율<em class="required" title="필수"></em></th>
  234. <td><input type="text" class="w80p aR" id="sellFeeRate" name="sellFeeRate" maxlength="10" data-valid-type="numeric"/> %
  235. <input type="hidden" id="sellFeeRateOrg" name="sellFeeRateOrg"/>
  236. </td>
  237. <th>과세구분</th>
  238. <td>
  239. <select name="taxGb" disabled="disabled">
  240. <option value="">[선택]</option>
  241. <option value="10">과세</option>
  242. <option value="20">비과세</option>
  243. </select>
  244. </td>
  245. </tr>
  246. <tr>
  247. <th>품목코드<em class="required" title="필수"></em></th>
  248. <td colspan="5">
  249. <select name="itemkindCd" id="itemkindCd" th:disabled="${sessionInfo.roleCd != 'G001_B000'}">
  250. <option th:if="${itemkindList}" th:each="oneData, status : ${itemkindList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
  251. </select>
  252. <input type="hidden" id="orgItemkindCd" name="orgItemkindCd"/>
  253. <th:block th:if="${sessionInfo.roleCd == 'G001_B000'}">
  254. <button type="button" class="btn btn-success btn-lg" id="btnGoodsItemkindChange">품목변경</button>
  255. </th:block>
  256. </td>
  257. </tr>
  258. <tr>
  259. <th>반품여부<em class="required" title="필수"></em></th>
  260. <td>
  261. <label class="rdoBtn"><input type="radio" name="returnableYn" id="returnableYnY" value="Y" />Y</label>
  262. <label class="rdoBtn"><input type="radio" name="returnableYn" id="returnableYnN" value="N"/>N</label>
  263. <input type="hidden" id="returnableYnOrg" name="returnableYnOrg"/>
  264. </td>
  265. <th>교환여부<em class="required" title="필수"></em></th>
  266. <td>
  267. <label class="rdoBtn"><input type="radio" name="changeableYn" id="changeableYnY" value="Y" />Y</label>
  268. <label class="rdoBtn"><input type="radio" name="changeableYn" id="changeableYnN" value="N"/>N</label>
  269. <input type="hidden" id="changeableYnOrg" name="changeableYnOrg"/>
  270. </td>
  271. <th>신규가입구매가입여부<em class="required" title="필수"></em></th>
  272. <td>
  273. <label class="rdoBtn"><input type="radio" name="newCustOrdYn" id="newCustOrdYnY" value="Y" />Y</label>
  274. <label class="rdoBtn"><input type="radio" name="newCustOrdYn" id="newCustOrdYnN" value="N"/>N</label>
  275. <input type="hidden" id="newCustOrdYnOrg" name="newCustOrdYnOrg"/>
  276. </td>
  277. </tr>
  278. <tr>
  279. <th>배송비정책<em class="required" title="필수"></em></th>
  280. <td>
  281. <select name="delvFeeCd">
  282. </select>
  283. <input type="hidden" id="delvFeeCdOrg" name="delvFeeCdOrg"/>
  284. </td>
  285. <th>기본배송비</th>
  286. <td>
  287. <input type="text" class="w100 aR" id="delvFee" name="delvFee" disabled="disabled"/> 원
  288. </td>
  289. <th>무료배송비기준</th>
  290. <td>
  291. <input type="text" class="w100 aR" id="minOrdAmt" name="minOrdAmt" disabled="disabled"/> 원
  292. </td>
  293. </tr>
  294. <tr>
  295. <th>PC포인트<em class="required" title="필수"></em></th>
  296. <td>
  297. <input type="text" class="w50 aR" id="pntPrate" name="pntPrate" data-valid-type="numeric" maxlength="3"/> % /&nbsp;
  298. <input type="hidden" id="pntPrateOrg" name="pntPrateOrg"/>
  299. <label class="rdoBtn"><input type="radio" name="prePpntUsableYn" id="prePpntUsableYnY" value="Y"/>Y</label>
  300. <label class="rdoBtn"><input type="radio" name="prePpntUsableYn" id="prePpntUsableYnN" value="N"/>N</label>
  301. <input type="hidden" id="prePpntUsableYnOrg" name="prePpntUsableYnOrg"/>
  302. </td>
  303. <th>모바일포인트<em class="required" title="필수"></em></th>
  304. <td>
  305. <input type="text" class="w50 aR" id="pntMrate" name="pntMrate" data-valid-type="numeric" maxlength="3"/> % /&nbsp;
  306. <input type="hidden" id="pntMrateOrg" name="pntMrateOrg"/>
  307. <label class="rdoBtn"><input type="radio" name="preMpntUsableYn" id="preMpntUsableYnY" value="Y"/>Y</label>
  308. <label class="rdoBtn"><input type="radio" name="preMpntUsableYn" id="preMpntUsableYnN" value="N"/>N</label>
  309. <input type="hidden" id="preMpntUsableYnOrg" name="preMpntUsableYnOrg"/>
  310. </td>
  311. <th>성인용품여부<em class="required" title="필수"></em></th>
  312. <td>
  313. <label class="rdoBtn"><input type="radio" name="adultYn" id="adultYnY" value="Y" />Y</label>
  314. <label class="rdoBtn"><input type="radio" name="adultYn" id="adultYnN" value="N"/>N</label>
  315. <input type="hidden" id="adultYnOrg" name="adultYnOrg"/>
  316. </td>
  317. </tr>
  318. <tr>
  319. <th>최소주문수량<em class="required" title="필수"></em></th>
  320. <td>
  321. <input type="text" class="w100 aR" id="minOrdQty" name="minOrdQty" data-valid-type="integer" maxlength="5"/>
  322. <input type="hidden" id="minOrdQtyOrg" name="minOrdQtyOrg"/>
  323. </td>
  324. <th>최대주문수량<em class="required" title="필수"></em></th>
  325. <td>
  326. <input type="text" class="w100 aR" id="maxOrdQty" name="maxOrdQty" data-valid-type="integer" maxlength="5"/>
  327. <input type="hidden" id="maxOrdQtyOrg" name="maxOrdQtyOrg"/>
  328. </td>
  329. <th>ID당1일최대구매수량<em class="required" title="필수"></em></th>
  330. <td>
  331. <input type="text" class="w100 aR" id="dayMaxOrdQty" name="dayMaxOrdQty" data-valid-type="integer" maxlength="5"/>
  332. <input type="hidden" id="dayMaxOrdQtyOrg" name="dayMaxOrdQtyOrg"/>
  333. </td>
  334. </tr>
  335. <tr>
  336. <th>구매등급</th>
  337. <td colspan="5">
  338. <div id="goodsCustGradeList"></div>
  339. </td>
  340. </tr>
  341. </tbody>
  342. </table>
  343. </div>
  344. <!-- //TAB1 CONTENTS AREA -->
  345. </li>
  346. <!-- //TAB1 -->
  347. <!-- TAB2 : 옵셥/재고 -->
  348. <li class="tab" id="goodstab2">
  349. <!-- TAB2 CONTENTS AREA -->
  350. <div class="panelStyle">
  351. <!-- <ul class="notice cBlue">
  352. <li><strong>상품 이미지 사이즈</strong> : <em><strong>600 × 600</strong> px</em></li>
  353. </ul> -->
  354. <div id="sizeStockArea"></div>
  355. </div>
  356. <!-- //TAB2 CONTENTS AREA -->
  357. </li>
  358. <!-- //TAB2 : 이미지/옵셥/재고 -->
  359. <!-- TAB3 : 상품상세 -->
  360. <li class="tab" id="goodstab3">
  361. <!-- TAB3 CONTENTS AREA -->
  362. <div class="panelStyle">
  363. <table class="frmStyle">
  364. <colgroup>
  365. <col width="12%"/>
  366. <col/>
  367. </colgroup>
  368. <tr>
  369. <th>상세설명</th>
  370. <td><label class="chkBox"><input type="checkbox" name="chkDescKeep" checked="checked" value="Y">정보유지<span></span></label>
  371. </td>
  372. </tr>
  373. </table>
  374. <!-- TABS SPACE -->
  375. <div class="tabsJr">
  376. <!-- TABS NAVI -->
  377. <ul class="tabsJrNav">
  378. <li class="on"><a href="#goodstab11">타이틀/내용/특징</a></li>
  379. <li><a href="#goodstab12">상세html</a></li>
  380. </ul>
  381. <!-- //TABS NAVI -->
  382. <!-- TABS CONTENT -->
  383. <ul class="tabsJrCont">
  384. <!-- TAB11 CONTENTS AREA -->
  385. <!-- TAB -->
  386. <li class="tabJr on" id="goodstab11">
  387. <div class="panelStyle">
  388. <!-- TAB11 CONTENTS AREA -->
  389. <table class="frmStyle">
  390. <colgroup>
  391. <col width="12%"/>
  392. <col/>
  393. </colgroup>
  394. <tr>
  395. <th>타이틀</th>
  396. <td><input type="text" class= "w100p" id="goodsTitlesDesc" name="goodsTitlesDesc" maxlength="100" />
  397. </td>
  398. </tr>
  399. <tr>
  400. <th>내용</th>
  401. <td><div class="tabJrContArea">
  402. <textarea class="textareaR3 summernote" name="goodsContentsDesc" id="goodsContentsDesc"></textarea>
  403. </div>
  404. </td>
  405. </tr>
  406. <tr>
  407. <th>상품 특징</th>
  408. <td><div class="tabJrContArea">
  409. <textarea class="textareaR3 summernote" name="goodsCharacterDesc" id="goodsCharacterDesc"></textarea>
  410. </div>
  411. </td>
  412. </tr>
  413. </table>
  414. </div>
  415. </li>
  416. <li class="tabJr" id="goodstab12">
  417. <div class="panelStyle">
  418. <!-- TAB11 CONTENTS AREA -->
  419. <table class="frmStyle">
  420. <colgroup>
  421. <col width="12%"/>
  422. <col/>
  423. </colgroup>
  424. <tr>
  425. <th>상위(PC)</th>
  426. <td><div class="tabJrContArea">
  427. <textarea class="textareaR4 summernote" name="goodsPcTopDesc" id="goodsPcTopDesc"></textarea>
  428. </div>
  429. </td>
  430. </tr>
  431. <tr>
  432. <th>상위(MOBILE)</th>
  433. <td><div class="tabJrContArea">
  434. <textarea class="textareaR4 summernote" name="goodsMobileTopDesc" id="goodsMobileTopDesc"></textarea>
  435. </div>
  436. </td>
  437. </tr>
  438. <tr>
  439. <th>하위(PC)</th>
  440. <td><div class="tabJrContArea">
  441. <textarea class="textareaR4 summernote" name="goodsPcDownDesc" id="goodsPcDownDesc"></textarea>
  442. </div>
  443. </td>
  444. </tr>
  445. <tr>
  446. <th>하위(MOBILE)</th>
  447. <td><div class="tabJrContArea">
  448. <textarea class="textareaR4 summernote" name="goodsMobileDownDesc" id="goodsMobileDownDesc"></textarea>
  449. </div>
  450. </td>
  451. </tr>
  452. </table>
  453. </div>
  454. </li>
  455. <!-- //TAB -->
  456. </ul>
  457. <!-- //TAB CONTENT -->
  458. </div>
  459. <!-- //TABS SPACE -->
  460. </div>
  461. <!-- //TAB3 CONTENTS AREA -->
  462. </li>
  463. <!-- //TAB3 : 상품상세 -->
  464. <!-- TAB4 : 고시정보 -->
  465. <li class="tab" id="goodstab4">
  466. <!-- TAB5 CONTENTS AREA -->
  467. <div class="panelStyle">
  468. <!-- TABS SPACE -->
  469. <table class="frmStyle">
  470. <colgroup>
  471. <col style="width:10%"/>
  472. <col/>
  473. </colgroup>
  474. <tr>
  475. <th>Details (상품상세정보 고시)<em class="required" title="필수"></em></th>
  476. <td>
  477. <select id="selNiClsfCd" name="selNiClsfCd" class="w40p">
  478. <option value="">[선택]</option>
  479. <option th:if="${niClsfCdList}" th:each="oneData, status : ${niClsfCdList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
  480. </select>
  481. <button type="button" class="btn btn-dark btn-lg" id="btnNotinfo">선택</button>
  482. <span class="padL10" id='itemkindNoti'></span>
  483. </td>
  484. </tr>
  485. </table>
  486. <hr/>
  487. <div id="notiArea"></div>
  488. <!-- //TABS SPACE -->
  489. </div>
  490. <!-- //TAB4 CONTENTS AREA -->
  491. </li>
  492. <!-- //TAB4 : 고시정보 -->
  493. <!-- TAB6 : 구성상품 -->
  494. <li class="tab" id="goodstab5">
  495. <!-- TAB6 CONTENTS AREA -->
  496. <div class="panelStyle">
  497. <!-- 내용 삽입 -->
  498. <ul class="panelBar" id="GoodsComposeBtnArea">
  499. <li class="right">
  500. <button type="button" class="btn btn-default btn-lg" onclick="cfnDownloadSampleFile('SF003');">양식다운로드</button>
  501. <button type="button" class="btn btn-success btn-lg" id="btnGoodsDealSearchExcel">엑셀조회</button>
  502. <button type="button" class="btn btn-base btn-lg" onclick="fnOpenGoodsDetailPopup()">상품조회</button>
  503. </li>
  504. </ul>
  505. <div id="gridGoodsComposeList" style="height: 500px;" class="ag-theme-balham lh60"></div>
  506. <!-- 내용 삽입 -->
  507. </div>
  508. <!-- //TAB6 CONTENTS AREA -->
  509. </li>
  510. <!-- //TAB7 : 추가정보 -->
  511. <!-- TAB5 : 이력정보 -->
  512. <li class="tab" id="goodstab6">
  513. <!-- TAB8 CONTENTS AREA -->
  514. <div class="panelStyle">
  515. <!-- 내용 삽입 -->
  516. <div id="gridGoodsHstoryList" style="height: 500px;" class="ag-theme-balham"></div>
  517. <!-- 내용 삽입 -->
  518. </div>
  519. <!-- //TAB5 CONTENTS AREA -->
  520. </li>
  521. <!-- //TAB5 : 추가정보 -->
  522. </ul>
  523. <!-- //TABS CONTENTS -->
  524. <!-- TABS BUTTON AREA -->
  525. <ul class="panelBar marT10">
  526. <li class="left">
  527. <button type="button" class="btn btnLeft btn-base btn-lg" id="btnGoodsDetailPreview">미리보기</button>
  528. </li>
  529. <li class="right">
  530. <th:block th:if="${sessionInfo.roleCd == 'G001_B000'}">
  531. <button type="button" class="btn btnRight btn-success btn-lg" id="btnGoodsDetailSave">저장</button>
  532. </th:block>
  533. </li>
  534. </ul>
  535. <!-- //TABS BUTTON AREA -->
  536. </div>
  537. <!-- //TABS SPACE -->
  538. </div> <!-- class=panelContent -->
  539. </form>
  540. </div> <!-- class=panelStyle -->
  541. </div> <!-- class=modalPopup -->
  542. <script type="text/javascript" src="/ux/plugins/summernote/summernote.js?v=2020103001"></script>
  543. <script type="text/javascript" src="/ux/plugins/gaga/gaga.summernote.js?v=2020103001"></script>
  544. <script th:inline="javascript">
  545. /*<![CDATA[*/
  546. var sessRoleCd = [[${sessionInfo.roleCd}]];
  547. var formalGbList = gagajf.convertToArray([[${formalGbList}]]);
  548. var goodsStatList = gagajf.convertToArray([[${goodsStatList}]]);
  549. var itemkindList = gagajf.convertToArray([[${itemkindList}]]);
  550. var authBrandList = [[${authBrandList}]];
  551. var useYnList = gagajf.convertToArray([[${useYnList}]]);
  552. var goodsTypeList = gagajf.convertToArray([[${goodsTypeList}]]);
  553. var uploadGoodsUrl = [[${@environment.getProperty('upload.goods.view')}]];
  554. // Get a SmartEditor options
  555. //var seOptions = gagaSe.getEditorOptions();
  556. // specify the columns - 상품변경이력
  557. var columnGoodsHstoryDefs = [
  558. {headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
  559. {headerName: "변경일자", field: "regDt", width: 130, cellClass: 'text-center' ,
  560. cellRenderer: function(params) {
  561. return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmm").format("YYYY-MM-DD HH:mm") : '';
  562. }
  563. },
  564. {headerName: "변경자", field: "regNm", width: 100, cellClass: 'text-center'},
  565. {headerName: "판매가", field: "currPrice" , width: 100, cellClass: 'text-right'
  566. ,valueFormatter: function(params) { return Number(params.value).addComma();}
  567. },
  568. {headerName: "변경전판매가", field: "currBprice" , width: 100, cellClass: 'text-right'
  569. ,valueFormatter: function(params) { return Number(params.value).addComma(); }
  570. },
  571. {headerName: "상품상태", field: "goodsStat" , width: 100, cellClass: 'text-center',
  572. cellEditorParams: { values: gagaAgGrid.extractValues(goodsStatList) },
  573. valueFormatter: function (params) { return gagaAgGrid.lookupValue(goodsStatList, params.value); },
  574. valueParser: function (params) { return gagaAgGrid.lookupKey(goodsStatList, params.newValue); }
  575. },
  576. {headerName: "상품명", field: "goodsNm" , width: 180, cellClass: 'text-left'},
  577. {headerName: "상품타이틀", field: "goodsTnm" , width: 180, cellClass: 'text-left'},
  578. /* {headerName: "상품검색어", field: "goodsSnm" , width: 180, cellClass: 'text-left'}, */
  579. {headerName: "정상이월구분", field: "formalGb" , width: 100, cellClass: 'text-center',
  580. cellEditorParams: { values: gagaAgGrid.extractValues(formalGbList) },
  581. valueFormatter: function (params) { return gagaAgGrid.lookupValue(formalGbList, params.value); },
  582. valueParser: function (params) { return gagaAgGrid.lookupKey(formalGbList, params.newValue); }
  583. },
  584. {headerName: "품목", field: "itemkindCd" , width: 180, cellClass: 'text-left',
  585. cellEditorParams: { values: gagaAgGrid.extractValues(itemkindList) },
  586. valueFormatter: function (params) { return gagaAgGrid.lookupValue(itemkindList, params.value); },
  587. valueParser: function (params) { return gagaAgGrid.lookupKey(itemkindList, params.newValue); }
  588. },
  589. {headerName: "최초승인일자", field: "frstCfrmDt", width: 150, cellClass: 'text-center' ,
  590. cellRenderer: function(params) {
  591. return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
  592. }
  593. },
  594. {headerName: "재고연동여부", field: "erpStockLinkYn" , width: 100, cellClass: 'text-center'},
  595. {headerName: "자사몰노출여부", field: "selfMallYn" , width: 120, cellClass: 'text-center'},
  596. {headerName: "판매수수료율", field: "sellFeeRate" , width: 120, cellClass: 'text-right'},
  597. {headerName: "사용자검색어", field: "goodsSnm1" , width: 150, cellClass: 'text-left'},
  598. {headerName: "검색어", field: "goodsSnm" , width: 450, cellClass: 'text-left', tooltipField: "goodsSnm"}
  599. ];
  600. // Get GridOptions
  601. var gridGoodsHstoryOptions = gagaAgGrid.getGridOptions(columnGoodsHstoryDefs);
  602. gridGoodsHstoryOptions.enableBrowserTooltips = true;
  603. // 상품상세 조회
  604. var fnGoodsDeailSearch = function() {
  605. $('#goodsDetailForm').find('.tabs .tabsNav li a').attr("style", "color:#888;"); //탭색 초기화
  606. var params = new Object();
  607. params.mode = $('#goodsDetailForm input[name=mode]').val();
  608. params.goodsCd = $('#goodsDetailForm input[name=goodsCd]').val();
  609. cfnAjaxSubmit("/goods/detail", "json", fnGoodDetailSearchCallback, params);
  610. }
  611. var fnGoodDetailSearchCallback = function(result) {
  612. $('#goodsDetailForm').find(".tabsNav > li").removeClass('on');
  613. $('#goodsDetailForm').find(".tabsNav > li").eq(0).addClass('on');
  614. $('#goodsDetailForm').find(".tabsCont > li").removeClass('on');
  615. $('#goodsDetailForm').find(".tabsCont > li").eq(0).addClass('on');
  616. if (result != null){
  617. //기본정보
  618. $('#goodsDetailForm select[name=selSupplyCompCd]').val(result.supplyCompCd);
  619. $('#goodsDetailForm input[name=supplyCompCd]').val(result.supplyCompCd);
  620. $('#goodsDetailForm input[name=brandCd]').val(result.brandCd);
  621. fnBrand(result.supplyCompCd, result.brandCd);
  622. $('#goodsDetailForm').find('#goodsCdTxt').html(result.goodsCd);
  623. $('#goodsDetailForm').find('#supplyGoodsCdTxt').html(result.supplyGoodsCd);
  624. $("#goodsDetailForm input[name=goodsImageYn]").val(result.goodsImageYn);
  625. $("#goodsDetailForm input[name=niClsfCd]").val(result.niClsfCd);
  626. $("#goodsDetailForm select[name=selNiClsfCd]").val(result.niClsfCd);
  627. $("#goodsDetailForm input[name=selfGoodsYn]").val(result.selfGoodsYn);
  628. $('#goodsDetailForm').find('#goodsNumTxt').html(result.goodsNum);
  629. $('#goodsDetailForm input[name=goodsNum]').val(result.goodsNum);
  630. $('#goodsDetailForm select[name=goodsStat]').val(result.goodsStat);
  631. $("#goodsDetailForm input[name=goodsStatOrg]").val(result.goodsStat);
  632. $('#goodsDetailForm').find('#brandGrpNmTxt').html(result.brandGrpNm);
  633. $('#goodsDetailForm select[name=itemkindCd]').val(result.itemkindCd);
  634. $('#goodsDetailForm input[name=orgItemkindCd]').val(result.itemkindCd);
  635. $('#goodsDetailForm select[name=seasonCd]').val(result.seasonCd);
  636. $('#goodsDetailForm input[name=seasonCdOrg]').val(result.seasonCd);
  637. $('#goodsDetailForm select[name=sexGb]').val(result.sexGb);
  638. $('#goodsDetailForm input[name=sexGbOrg]').val(result.sexGb);
  639. $('#goodsDetailForm').find('#makeNmTxt').html(result.makeNm);
  640. $('#goodsDetailForm').find('#styleYearTxt').html(result.styleYear);
  641. $('#goodsDetailForm select[name=goodsGb]').val(result.goodsGb);
  642. $('#goodsDetailForm input[name=goodsGbOrg]').val(result.goodsGb);
  643. $('#goodsDetailForm input[name=mainColorCd]').val(result.mainColorCd);
  644. $("#goodsDetailForm input[name=goodsNm]").val(result.goodsNm);
  645. $('#goodsDetailForm input[name=goodsNmOrg]').val(result.goodsNm);
  646. fnDataLengthCheck('goodsNm',200);
  647. $("#goodsDetailForm input[name=goodsTnm]").val(result.goodsTnm);
  648. $('#goodsDetailForm input[name=goodsTnmOrg]').val(result.goodsTnm);
  649. fnDataLengthCheck('goodsTnm',100);
  650. $("#goodsDetailForm input[name=goodsSnm1]").val(result.goodsSnm1);
  651. $("#goodsDetailForm input[name=goodsSnm1Org]").val(result.goodsSnm1);
  652. fnDataLengthCheck('goodsSnm1',200);
  653. $("#goodsDetailForm textarea[name=goodsSnmTxt]").val(result.goodsSnm);
  654. $("#goodsDetailForm input[name=goodsSnm]").val(result.goodsSnm);
  655. $('#goodsDetailForm').find('#listPriceTxt').html(result.listPrice.addComma());
  656. $('#goodsDetailForm input[name=listPrice]').val(result.listPrice);
  657. $('#goodsDetailForm input[name=currPrice]').val(result.currPrice.addComma());
  658. $('#goodsDetailForm input[name=currPriceOrg]').val(result.currPrice);
  659. $('#goodsDetailForm input[name=costPrice]').val(result.costPrice);
  660. $('#goodsDetailForm').find('#dcRateTxt').html(result.dcRate);
  661. $('#goodsDetailForm input[name=dcRate]').val(result.dcRate);
  662. $('#goodsDetailForm').find('#priceUpdDtTxt').html(!gagajf.isNull(result.priceUpdDt) ? result.priceUpdDt.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD") : '');
  663. $('#goodsDetailForm').find('#frstCfrmDtTxt').html(!gagajf.isNull(result.frstCfrmDt) ? result.frstCfrmDt.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD") : '');
  664. $('#goodsDetailForm select[name=distributionGb]').val(result.distributionGb);
  665. $("#goodsDetailForm input[name=distributionGbOrg]").val(result.distributionGb);
  666. $('#goodsDetailForm select[name=ageGrpCd]').val(result.ageGrpCd);
  667. $("#goodsDetailForm input[name=ageGrpCdOrg]").val(result.ageGrpCd);
  668. $('#goodsDetailForm select[name=taxGb]').val(result.taxGb);
  669. $("#goodsDetailForm input[type=radio]").parent().removeClass("checked");
  670. $("#goodsDetailForm input[type=radio]").removeAttr('checked');
  671. if (result.formalGb == "G009_20"){
  672. $("#goodsDetailForm input:radio[name=formalGb]:input[value='G009_20']").trigger('click');
  673. }else{
  674. $("#goodsDetailForm input:radio[name=formalGb]:input[value='G009_10']").trigger('click');
  675. }
  676. if (result.erpPriceLinkYn == "Y"){
  677. $("#goodsDetailForm input:radio[name=erpPriceLinkYn]:input[value='Y']").trigger('click');
  678. }else{
  679. $("#goodsDetailForm input:radio[name=erpPriceLinkYn]:input[value='N']").trigger('click');
  680. }
  681. if (result.selfMallYn == "Y"){
  682. $("#goodsDetailForm input:radio[name=selfMallYn]:input[value='Y']").trigger('click');
  683. }else{
  684. $("#goodsDetailForm input:radio[name=selfMallYn]:input[value='N']").trigger('click');
  685. }
  686. if (result.returnableYn == "Y"){
  687. $("#goodsDetailForm input:radio[name=returnableYn]:input[value='Y']").trigger('click');
  688. }else{
  689. $("#goodsDetailForm input:radio[name=returnableYn]:input[value='N']").trigger('click');
  690. }
  691. $('#goodsDetailForm input[name=sellFeeRate]').val(result.sellFeeRate);
  692. $("#goodsDetailForm input[name=sellFeeRateOrg]").val(result.sellFeeRate);
  693. if (result.prePpntUsableYn == "Y"){
  694. $("#goodsDetailForm input:radio[name=prePpntUsableYn]:input[value='Y']").trigger('click');
  695. }else{
  696. $("#goodsDetailForm input:radio[name=prePpntUsableYn]:input[value='N']").trigger('click');
  697. }
  698. if (result.preMpntUsableYn == "Y"){
  699. $("#goodsDetailForm input:radio[name=preMpntUsableYn]:input[value='Y']").trigger('click');
  700. }else{
  701. $("#goodsDetailForm input:radio[name=preMpntUsableYn]:input[value='N']").trigger('click');
  702. }
  703. if (result.changeableYn == "Y"){
  704. $("#goodsDetailForm input:radio[name=changeableYn]:input[value='Y']").trigger('click');
  705. }else{
  706. $("#goodsDetailForm input:radio[name=changeableYn]:input[value='N']").trigger('click');
  707. }
  708. if (result.giftPackYn == "Y"){
  709. $("#goodsDetailForm input:radio[name=giftPackYn]:input[value='Y']").trigger('click');
  710. }else{
  711. $("#goodsDetailForm input:radio[name=giftPackYn]:input[value='N']").trigger('click');
  712. }
  713. if (result.newCustOrdYn == "Y"){
  714. $("#goodsDetailForm input:radio[name=newCustOrdYn]:input[value='Y']").trigger('click');
  715. }else{
  716. $("#goodsDetailForm input:radio[name=newCustOrdYn]:input[value='N']").trigger('click');
  717. }
  718. if (result.adultYn == "Y"){
  719. $("#goodsDetailForm input:radio[name=adultYn]:input[value='Y']").trigger('click');
  720. }else{
  721. $("#goodsDetailForm input:radio[name=adultYn]:input[value='N']").trigger('click');
  722. }
  723. $("#goodsDetailForm input[name=formalGbOrg]").val(result.formalGb);
  724. $("#goodsDetailForm input[name=erpPriceLinkYnOrg]").val(result.erpPriceLinkYn);
  725. $("#goodsDetailForm input[name=selfMallYnOrg]").val(result.selfMallYn);
  726. $("#goodsDetailForm input[name=giftPackYnOrg]").val(result.giftPackYn);
  727. $("#goodsDetailForm input[name=prePpntUsableYnOrg]").val(result.prePpntUsableYn);
  728. $("#goodsDetailForm input[name=preMpntUsableYnOrg]").val(result.preMpntUsableYn);
  729. $("#goodsDetailForm input[name=changeableYnOrg]").val(result.changeableYn);
  730. $("#goodsDetailForm input[name=returnableYnOrg]").val(result.returnableYn);
  731. $("#goodsDetailForm input[name=newCustOrdYnOrg]").val(result.newCustOrdYn);
  732. $("#goodsDetailForm input[name=adultYnOrg]").val(result.adultYn);
  733. $("#goodsDetailForm input[type=radio][checked]").addClass("checked");
  734. //$("#goodsDetailForm input[type=radio][checked]").parent("label").addClass("checked");
  735. //입점상품일 경우
  736. if (result.selfGoodsYn == "N"){
  737. //$('#goodsDetailForm').find('#erplinkarea').hide();
  738. $("#goodsDetailForm").find("#selfGoodsDpTitle").html('원코드');
  739. $("#goodsDetailForm").find("#selfGoodsDpTxt").html('<div id="supplyGoodsCdTxt"></div>');
  740. $('#goodsDetailForm').find('#supplyGoodsCdTxt').html(result.supplyGoodsCd);
  741. $('#goodsDetailForm select[name=distributionGb]').attr('readonly', true);
  742. }
  743. $('#goodsDetailForm input[name=delvFee]').val(result.delvFee.addComma());
  744. $('#goodsDetailForm input[name=pntPrate]').val(result.pntPrate);
  745. $('#goodsDetailForm input[name=pntPrateOrg]').val(result.pntPrate);
  746. $('#goodsDetailForm input[name=pntMrate]').val(result.pntMrate);
  747. $('#goodsDetailForm input[name=pntMrateOrg]').val(result.pntMrate);
  748. $('#goodsDetailForm input[name=minOrdAmt]').val(result.minOrdAmt.addComma());
  749. $('#goodsDetailForm input[name=minOrdQty]').val(result.minOrdQty);
  750. $('#goodsDetailForm input[name=minOrdQtyOrg]').val(result.minOrdQty);
  751. $('#goodsDetailForm input[name=maxOrdQty]').val(result.maxOrdQty);
  752. $('#goodsDetailForm input[name=maxOrdQtyOrg]').val(result.maxOrdQty);
  753. $('#goodsDetailForm input[name=dayMaxOrdQty]').val(result.dayMaxOrdQty);
  754. $('#goodsDetailForm input[name=dayMaxOrdQtyOrg]').val(result.dayMaxOrdQty);
  755. $('#goodsDetailForm input[name=goodsType]').val(result.goodsType);
  756. $("#goodsDetailForm").find("#goodsTypeNm").html(result.goodsTypeNm);
  757. cfnCreateCombo('/renderer/delvFee/list/' + result.supplyCompCd, $('#goodsDetailForm select[name=delvFeeCd]'), "[선택]", result.delvFeeCd);
  758. $('#goodsDetailForm input[name=delvFeeCdOrg]').val(result.delvFeeCd);
  759. //상품상세
  760. $('#goodsDetailForm input[name=goodsTitlesDesc]').val(result.goodsTitlesDesc);
  761. // 공지내용. Summernote에 값 세팅
  762. gagaSn.setContents('#goodsContentsDesc', result.goodsContentsDesc);
  763. gagaSn.setContents('#goodsCharacterDesc', result.goodsCharacterDesc);
  764. gagaSn.setContents('#goodsPcTopDesc', result.goodsPcTopDesc);
  765. gagaSn.setContents('#goodsMobileTopDesc', result.goodsMobileTopDesc);
  766. gagaSn.setContents('#goodsPcDownDesc', result.goodsPcDownDesc);
  767. gagaSn.setContents('#goodsMobileDownDesc', result.goodsMobileDownDesc);
  768. if (!gagajf.isNull(result.niClsfNm)){
  769. $('#goodsDetailForm').find('#itemkindNoti').html('품목기준 고시분류 : ' + result.niClsfNm);
  770. $('#goodsDetailForm input[name=niClsfNm]').val(result.niClsfNm);
  771. var objNotiInfo = $("#goodsDetailForm select[name=selNiClsfCd] option");
  772. for(var i=0;i<objNotiInfo.length; i++ ){
  773. if (objNotiInfo.eq(i).text() == result.niClsfNm){
  774. objNotiInfo.eq(i).prop("selected","true");
  775. }
  776. }
  777. }
  778. $('#goodsDetailForm').find('#goodsImgUrl').attr('src', _goodsUrl + '/'+ result.sysImgNm);
  779. $('#goodsDetailForm input[name=sysImgNm]').val(result.sysImgNm);
  780. $("#goodsDetailForm input[type=checkbox][checked]").parent("label").addClass("checked");
  781. //품목변경 권한 관련 처리
  782. //md권한
  783. if(sessRoleCd == "G001_A101" || sessRoleCd == "G001_B000"){
  784. var roleFlag = "N";
  785. $.each(authBrandList, function(idx, item) {
  786. if (result.brandCd == item.cd ){
  787. roleFlag = "Y";
  788. return false;
  789. }
  790. });
  791. if (roleFlag == "N"){
  792. $('#goodsDetailForm select[name=itemkindCd]').attr('disabled',true);
  793. $('#goodsDetailForm #btnGoodsItemkindChange').addClass('off');
  794. }
  795. }
  796. //상품 구분에 따른 컬럼 사용여부처리 start
  797. //세트
  798. if ("G056_S" == result.goodsType){
  799. //$('#goodsDetailForm #erplinkarea').addClass('off');
  800. if (result.selfGoodsYn == "Y") $('#goodsDetailForm #goodsComposeTab').css('display','block');
  801. $('#goodsDetailForm #goodsNotiTab').css('display','none');
  802. $('#goodsDetailForm input[name=sellFeeRate]').attr('readonly', true);
  803. $('#goodsDetailForm input[name=currPrice]').attr('readonly', true);
  804. }else if ("G056_D" == result.goodsType){
  805. //$('#goodsDetailForm #erplinkarea').addClass('off');
  806. if (result.selfGoodsYn == "Y") $('#goodsDetailForm #goodsComposeTab').css('display','block');
  807. $('#goodsDetailForm #goodsNotiTab').css('display','none');
  808. $('#goodsDetailForm input[name=sellFeeRate]').attr('readonly', true);
  809. }
  810. //상품 구분에 따른 컬럼 사용여부처리 end
  811. var params = new Object();
  812. params.mode = $('#goodsDetailForm input[name=mode]').val();
  813. params.goodsCd = result.goodsCd;
  814. params.brandCd = result.brandCd;
  815. params.supplyCompCd = result.supplyCompCd;
  816. params.niClsfCd = result.niClsfCd;
  817. params.goodsType = result.goodsType;
  818. params.erpPriceLinkYn = result.erpPriceLinkYn;
  819. //옵셥 재고(ajax html)
  820. fnGoodsDetailSizeStockSearch(params);
  821. //정보고시
  822. fnGoodsDetailNotiInfoSearch(params);
  823. //구매등급
  824. fnGoodsDetailOrderGradeSearch(params);
  825. //구성상품
  826. if ("G056_S" == result.goodsType || "G056_D" == result.goodsType){
  827. fnGoodsComposeListSearch(params);
  828. }
  829. //이력
  830. fnGoodsDetailHstSearch();
  831. }
  832. //기본정보탭 변경여부
  833. $('#goodsDetailForm').find('#goodstab1').find("input, select, textarea").on('change', function() {
  834. $('#goodsDetailForm').find('.tabs .tabsNav li:eq(0) a').attr("style", "color:red;");
  835. });
  836. }
  837. //옵셥 재고
  838. var fnGoodsDetailSizeStockSearch = function(params) {
  839. cfnAjaxSubmit("/goods/detail/sizeStock/form", "html", "sizeStockArea", params);
  840. }
  841. //정보고시
  842. var fnGoodsDetailNotiInfoSearch = function(params) {
  843. cfnAjaxSubmit("/goods/detail/notiInfo/list", "json", fnGoodsDetailNotiInfoSearchCallback, params);
  844. }
  845. //구매등급
  846. var fnGoodsDetailOrderGradeSearch = function(params) {
  847. cfnAjaxSubmit("/goods/detail/order/grade/list", "json", fnGoodsDetailOrderGradeSearchCallback, params);
  848. }
  849. //이력
  850. var fnGoodsDetailHstSearch = function() {
  851. gagaAgGrid.fetch("/goods/detail/hst/list?goodsCd=" + $('#goodsDetailForm input[name=goodsCd]').val() , gridGoodsHstoryOptions);
  852. }
  853. //정보고시 콜백
  854. var fnGoodsDetailNotiInfoSearchCallback = function(result) {
  855. if (result == null) return;
  856. var notiHtml = "";
  857. var idx = 0;
  858. $('#goodsDetailForm').find('#notiArea').html('');
  859. notiHtml += '<table class="frmStyle">';
  860. notiHtml += '<colgroup><col style="width:20%"/><col/><col style="width:5%"/><col style="width:5%"/></colgroup>';
  861. notiHtml += '<tbody id="infoContents">\n';
  862. notiHtml += '<tr><th>고시항목</th><th>고시내용</th><th>필수여부</th><th>전시여부</th></tr>';
  863. result.forEach(function(info){
  864. 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>';
  865. notiHtml += '<td><input type="text" name="niContent" value="'+ gagajf.convNull(info.niContent, '') +'"/></td>\n';
  866. notiHtml += '<td class="aC">'+gagajf.convNull(info.reqYn, '')+'<input type="hidden" name="reqYn" value="'+ gagajf.convNull(info.reqYn, '') +'"/></td>\n';
  867. notiHtml += '<td class="aC">'+gagajf.convNull(info.dispYn, '')+'<input type="hidden" name="dispYn" value="'+ gagajf.convNull(info.dispYn, '') +'"/></td>\n';
  868. notiHtml += '</tr>\n';
  869. });
  870. notiHtml += '</tbody></table>';
  871. $('#goodsDetailForm').find('#notiArea').append(notiHtml);
  872. //고시정보탭 변경여부
  873. $('#goodsDetailForm').find('#goodstab4').find("input, select, textarea").on('change', function() {
  874. $('#goodsDetailForm').find('.tabs .tabsNav li:eq(3) a').attr("style", "color:red;");
  875. });
  876. }
  877. //구매등급 콜백
  878. var fnGoodsDetailOrderGradeSearchCallback = function(result) {
  879. if (result == null) return;
  880. result.forEach(function(info){
  881. $("#goodsDetailForm #goodsCustGradeList").find("input").each(function() {
  882. if (info.custGrade == $(this).val() ){
  883. $(this).prop("checked", true);
  884. $(this).parent("label").addClass("checked");
  885. }
  886. });
  887. });
  888. }
  889. //구매등급 변경여부
  890. $('#goodsDetailForm').find('#goodstab5').find("input, select, textarea").on('change', function() {
  891. $('#goodsDetailForm').find('.tabs .tabsNav li:eq(4) a').attr("style", "color:red;");
  892. });
  893. //상품명 길이표시
  894. $("#goodsDetailForm input[name=goodsNm]").bind('focus focusout input keyup keydown paste change', function () {
  895. fnDataLengthCheck('goodsNm',200);
  896. });
  897. //상품타이틀 길이표시
  898. $("#goodsDetailForm input[name=goodsTnm]").bind('focus focusout input keyup keydown paste change', function () {
  899. fnDataLengthCheck('goodsTnm',100);
  900. });
  901. //사용자검색어 길이표시
  902. $("#goodsDetailForm input[name=goodsSnm1]").bind('focus focusout input keyup keydown paste change', function () {
  903. fnDataLengthCheck('goodsSnm1',200);
  904. });
  905. //판매가 변경시 할인율 계산
  906. $("#goodsDetailForm input[name=currPrice]").bind('focusout paste', function () {
  907. fnCurrPriceCheck();
  908. });
  909. //판매가의 할인율 확인
  910. var fnCurrPriceCheck = function(){
  911. var dcRate = 0;
  912. var listPrice = $("#goodsDetailForm input[name=listPrice]").val().removeComma();
  913. var currPrice = $("#goodsDetailForm input[name=currPrice]").val().removeComma();
  914. dcRate = 100 - Math.floor(Number(currPrice) / Number(listPrice) * 100); //절사
  915. $("#goodsDetailForm").find("#dcRateTxt").html(dcRate);
  916. $("#goodsDetailForm input[name=dcRate]").val(dcRate);
  917. }
  918. //판매가의 할인율 확인
  919. /* var fnCurrPriceCheck_org = function(){
  920. var dcRate = 0;
  921. var listPrice = $("#goodsDetailForm input[name=listPrice]").val().removeComma();
  922. var currPrice = $("#goodsDetailForm input[name=currPrice]").val().removeComma();
  923. //dcRate = Math.round(100 - Math.floor((Number(currPrice) / Number(listPrice) * 100)*100)/100);
  924. //dcRate = 100 - (Number((Number(currPrice) / Number(listPrice)).toFixed(2)) *100);
  925. dcRate = 100 - Math.floor(Number(currPrice) / Number(listPrice) * 100);
  926. if (dcRate < 0){
  927. mcxDialog.alert('할인율이 0보다 작습니다.\n판매가를 확인해주세요.', function(){
  928. $("#goodsDetailForm input[name=currPrice]").focus();
  929. });
  930. return false;
  931. }else if (dcRate >= 90){
  932. gagaAlert.confirm("할인율이 90%이상입니다. 계속하시겠습니까?", function(){
  933. $("#goodsDetailForm").find("#dcRateTxt").html(dcRate);
  934. $("#goodsDetailForm input[name=dcRate]").val(dcRate);
  935. return true;
  936. },
  937. function(){
  938. $('#goodsDetailForm input[name=currPrice]').val($('#goodsDetailForm input[name=currPriceOrg]').val().addComma());
  939. return false;
  940. });
  941. }else{
  942. $("#goodsDetailForm").find("#dcRateTxt").html(dcRate);
  943. $("#goodsDetailForm input[name=dcRate]").val(dcRate);
  944. return true;
  945. }
  946. } */
  947. // 브랜드 조회
  948. var fnBrand = function(supplyCompCd, brandCd) {
  949. var actionUrl = '/renderer/supplyCompany/brand/list/' + supplyCompCd;
  950. if(sessRoleCd == "G001_B000"){
  951. actionUrl = '/renderer/brand/AuthBrandlist';
  952. }
  953. $("#goodsDetailForm select[name=selBrandCd] option:gt(0)").remove();
  954. cfnCreateCombo(actionUrl, $('#goodsDetailForm select[name=selBrandCd]'), "[선택]", brandCd);
  955. }
  956. //데이터 길이 확인
  957. var fnDataLengthCheck = function(id , maxByte){
  958. var maximumByte = maxByte;
  959. var strLenEng = $('#goodsDetailForm').find('#'+id).val().length;
  960. var cbyteStr = 0;
  961. var liLenStr = 0;
  962. for (i = 0; i < strLenEng; i++) {
  963. var lsOneChar = $('#goodsDetailForm').find('#'+id).val().charAt(i);
  964. if (lsOneChar == "\n" || lsOneChar == "\'") {
  965. cbyteStr += 5; //엔터면 5를 더한다
  966. } else if (lsOneChar == "\"") {
  967. cbyteStr += 6; //쌍따옴표면 6를 더한다
  968. } else if (escape(lsOneChar).length > 4) {
  969. cbyteStr += 3; //한글이면 3를 더한다
  970. } else {
  971. cbyteStr++; //한글아니면 1을 다한다
  972. }
  973. if (cbyteStr <= maximumByte) {
  974. liLenStr = i + 1;
  975. }
  976. }
  977. // 사용자가 입력한 값이 제한 값을 초과하는지를 검사한다.
  978. if (parseInt(cbyteStr) > parseInt(maximumByte)) {
  979. mcxDialog.alertC('허용된 글자수가 초과되었습니다.\n초과된 부분은 자동으로 삭제됩니다.', {
  980. sureBtnText: "확인",
  981. sureBtnClick: function() {
  982. $('#goodsDetailForm').find('#'+id).focus();
  983. }
  984. });
  985. var str = $('#goodsDetailForm').find('#'+id).val().substr(0, liLenStr);
  986. $('#goodsDetailForm').find('#'+id).val(str);
  987. var cbyteStr = 0;
  988. for (i = 0; i < $('#goodsDetailForm').find('#'+id).val().length; i++) {
  989. var lsOneChar = $('#goodsDetailForm').find('#'+id).val().charAt(i);
  990. if (lsOneChar == "\n" || lsOneChar == "\'") {
  991. cbyteStr += 5; //엔터면 5를 더한다
  992. } else if (lsOneChar == "\"") {
  993. cbyteStr += 6; //쌍따옴표면 6를 더한다
  994. } else if (escape(lsOneChar).length > 4) {
  995. cbyteStr += 3; //한글이면 3를 더한다
  996. } else {
  997. cbyteStr++; //한글아니면 1을 다한다
  998. }
  999. }
  1000. }
  1001. $('#goodsDetailForm').find('#'+id+'Len').text(cbyteStr);
  1002. }
  1003. //상품저장 버튼 클릭 시
  1004. $('#btnGoodsDetailSave').click(function() {
  1005. var optCheck = false;
  1006. var idx = 0;
  1007. //상품상태가 승인대기나 승인 완료일 경우
  1008. if($("#goodsDetailForm select[name=goodsStat]").val() == "G008_40" || $("#goodsDetailForm select[name=goodsStat]").val() == "G008_90"){
  1009. // SUPER관리자, 어드민관리자, 계정관리자. 총괄관리자, MD 를 제외하고 승인처리 할수 없음
  1010. if ($("#goodsDetailForm select[name=goodsStat]").val() == "G008_90" && $("#goodsDetailForm select[name=goodsStatOrg]").val() != "G008_90"){
  1011. mcxDialog.alert(" '승인완료' 상태로 변경할 권한이 없습니다.");
  1012. return false;
  1013. }
  1014. //list가 등록되지 않은 상품은 상태변경 불가
  1015. if(Number($("#goodsDetailForm input[name=listPrice]").val()) == 0){
  1016. mcxDialog.alertC("TAG가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
  1017. sureBtnText: "확인",
  1018. sureBtnClick: function() {
  1019. $("#goodsDetailForm select[name=goodsStat]").focus();
  1020. }
  1021. });
  1022. return false;
  1023. }
  1024. //판매가가 0인 상품은 상태변경 불가
  1025. if((gagajf.isNull($("#goodsDetailForm input[name=currPrice]").val()) || $("#goodsDetailForm input[name=currPrice]").val() == 0)){
  1026. mcxDialog.alertC("판매가가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
  1027. sureBtnText: "확인",
  1028. sureBtnClick: function() {
  1029. $("#goodsDetailForm select[name=goodsStat]").focus();
  1030. }
  1031. });
  1032. return;
  1033. }
  1034. //사이즈정보가 등록되지 않은 상품은 상태변경 불가
  1035. if($("#goodsDetailForm #sizeStockArea").find("#optionList tr").length == 0){
  1036. mcxDialog.alertC("사이즈정보가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
  1037. sureBtnText: "확인",
  1038. sureBtnClick: function() {
  1039. $("#goodsDetailForm select[name=goodsStat]").focus();
  1040. }
  1041. });
  1042. return;
  1043. }
  1044. //이미지가 등록되지 않은 상품은 상태변경 불가
  1045. if($("#goodsDetailForm input[name=goodsImageYn]").val() == "N"){
  1046. mcxDialog.alertC("이미지가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
  1047. sureBtnText: "확인",
  1048. sureBtnClick: function() {
  1049. $("#goodsDetailForm select[name=goodsStat]").focus();
  1050. }
  1051. });
  1052. return;
  1053. }
  1054. //고시정보가 등록되지 않은 상품은 상태변경 불가 - 일반상품만 체크
  1055. if ("G056_N" == $("#goodsDetailForm input[name=goodsType]").val()){
  1056. if($("#goodsDetailForm #notiArea").find("#infoContents tr").length == 0){
  1057. mcxDialog.alertC("고시정보가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
  1058. sureBtnText: "확인",
  1059. sureBtnClick: function() {
  1060. $("#goodsDetailForm select[name=goodsStat]").focus();
  1061. }
  1062. });
  1063. return;
  1064. }
  1065. idx = 0;
  1066. //고시정보 필수나 전시표시값 입력여부 확인
  1067. $("#goodsDetailForm #notiArea").find("#infoContents tr").each(function() {
  1068. if ("Y" == $(this).find("input[name=reqYn]").val() || "Y" == $(this).find("input[name=dispYn]").val()){
  1069. if (gagajf.isNull($(this).find("input[name=niContent]").val())){
  1070. optCheck = true;
  1071. mcxDialog.alertC("고시정보를 입력해주세요.");
  1072. return false;
  1073. }
  1074. }
  1075. idx++;
  1076. });
  1077. }
  1078. // 자사일 경우 대표색상 선택 여부
  1079. if ("Y" == $('#goodsDetailForm input[name=selfGoodsYn]').val()){
  1080. if($("#goodsDetailForm input[name=basicColor]:checked").length == 0) {
  1081. mcxDialog.alert("대표색상을 선택해주세요.")
  1082. return false;
  1083. }
  1084. }
  1085. }
  1086. if(optCheck) {
  1087. return false;
  1088. }
  1089. //상품명
  1090. if(gagajf.isNull($("#goodsDetailForm input[name=goodsNm]").val())){
  1091. mcxDialog.alertC("상품명을 입력해 주세요.", {
  1092. sureBtnText: "확인",
  1093. sureBtnClick: function() {
  1094. $("#goodsDetailForm input[name=goodsNm]").focus();
  1095. }
  1096. });
  1097. return;
  1098. }
  1099. //상품상태
  1100. if(gagajf.isNull($("#goodsDetailForm select[name=goodsStat]").val())){
  1101. mcxDialog.alertC("상품상태를 선택해 주세요.", {
  1102. sureBtnText: "확인",
  1103. sureBtnClick: function() {
  1104. $("#goodsDetailForm select[name=goodsStat]").focus();
  1105. }
  1106. });
  1107. return;
  1108. }
  1109. //시즌
  1110. if(gagajf.isNull($("#goodsDetailForm select[name=seasonCd]").val())){
  1111. mcxDialog.alertC("시즌을 선택해 주세요.", {
  1112. sureBtnText: "확인",
  1113. sureBtnClick: function() {
  1114. $("#goodsDetailForm select[name=seasonCd]").focus();
  1115. }
  1116. });
  1117. return;
  1118. }
  1119. //성별
  1120. if(gagajf.isNull($("#goodsDetailForm select[name=sexGb]").val())){
  1121. mcxDialog.alertC("성별을 선택해 주세요.", {
  1122. sureBtnText: "확인",
  1123. sureBtnClick: function() {
  1124. $("#goodsDetailForm select[name=sexGb]").focus();
  1125. }
  1126. });
  1127. return;
  1128. }
  1129. // 상품구분
  1130. if(gagajf.isNull($("#goodsDetailForm select[name=goodsGb]").val())){
  1131. mcxDialog.alertC("상품구분을 선택해 주세요.", {
  1132. sureBtnText: "확인",
  1133. sureBtnClick: function() {
  1134. $("#goodsDetailForm select[name=goodsGb]").focus();
  1135. }
  1136. });
  1137. return;
  1138. }
  1139. //판매가
  1140. if(gagajf.isNull($("#goodsDetailForm input[name=currPrice]").val())) {
  1141. mcxDialog.alertC("판매가를 올바르게 입력해주세요.", {
  1142. sureBtnText: "확인",
  1143. sureBtnClick: function() {
  1144. $("#goodsDetailForm input[name=currPrice]").focus();
  1145. }
  1146. });
  1147. return false;
  1148. }
  1149. /* if(Number($("#goodsDetailForm input[name=currPrice]").val().removeComma()) < 1000) {
  1150. mcxDialog.alertC("판매가는 1000원 이상을 입력하셔야 합니다.", {
  1151. sureBtnText: "확인",
  1152. sureBtnClick: function() {
  1153. $("#goodsDetailForm input[name=currPrice]").focus();
  1154. }
  1155. });
  1156. } */
  1157. //정상가와 판매가 비교
  1158. if(Number($("#goodsDetailForm input[name=listPrice]").val().removeComma()) < Number($("#goodsDetailForm input[name=currPrice]").val().removeComma())) {
  1159. mcxDialog.alertC("판매가를 올바르게 입력해주세요.", {
  1160. sureBtnText: "확인",
  1161. sureBtnClick: function() {
  1162. $("#goodsDetailForm input[name=currPrice]").focus();
  1163. }
  1164. });
  1165. return false;
  1166. }
  1167. //판매 수수료율
  1168. if ( gagajf.isNull($("#goodsDetailForm input[name=sellFeeRate]").val())) {
  1169. mcxDialog.alertC("판매수수료를 입력해 주세요.", {
  1170. sureBtnText: "확인",
  1171. sureBtnClick: function() {
  1172. $("#goodsDetailForm input[name=sellFeeRate]").focus();
  1173. }
  1174. });
  1175. return false;
  1176. }
  1177. if(Number($("#goodsDetailForm input[name=sellFeeRate]").val()) < 0 || Number($("#goodsDetailForm input[name=sellFeeRate]").val()) > 100) {
  1178. mcxDialog.alertC("판매수수료를 올바르게 입력해주세요.", {
  1179. sureBtnText: "확인",
  1180. sureBtnClick: function() {
  1181. $("#goodsDetailForm input[name=sellFeeRate]").focus();
  1182. }
  1183. });
  1184. return false;
  1185. }
  1186. // 배송비구분
  1187. if(gagajf.isNull($("#goodsDetailForm select[name=delvFeeCd]").val())){
  1188. mcxDialog.alertC("배송비정책을 선택해 주세요.", {
  1189. sureBtnText: "확인",
  1190. sureBtnClick: function() {
  1191. $("#goodsDetailForm select[name=delvFeeCd]").focus();
  1192. }
  1193. });
  1194. return;
  1195. }
  1196. // 포인트
  1197. if ( gagajf.isNull($("#goodsDetailForm input[name=pntPrate]").val())) {
  1198. mcxDialog.alertC("PC 포인트를 입력해 주세요.", {
  1199. sureBtnText: "확인",
  1200. sureBtnClick: function() {
  1201. $("#goodsDetailForm input[name=pntPrate]").focus();
  1202. }
  1203. });
  1204. return false;
  1205. }
  1206. if(Number($("#goodsDetailForm input[name=pntPrate]").val()) < 0 || Number($("#goodsDetailForm input[name=pntPrate]").val()) > 100) {
  1207. mcxDialog.alertC("PC 포인트를 올바르게 입력해주세요.", {
  1208. sureBtnText: "확인",
  1209. sureBtnClick: function() {
  1210. $("#goodsDetailForm input[name=pntPrate]").focus();
  1211. }
  1212. });
  1213. return false;
  1214. }
  1215. if ( gagajf.isNull($("#goodsDetailForm input[name=pntMrate]").val())) {
  1216. mcxDialog.alertC("MOBILE 포인트를 입력해 주세요.", {
  1217. sureBtnText: "확인",
  1218. sureBtnClick: function() {
  1219. $("#goodsDetailForm input[name=pntMrate]").focus();
  1220. }
  1221. });
  1222. return false;
  1223. }
  1224. if(Number($("#goodsDetailForm input[name=pntMrate]").val()) < 0 || Number($("#goodsDetailForm input[name=pntMrate]").val()) > 100) {
  1225. mcxDialog.alertC("MOBILE 포인트를 올바르게 입력해주세요.", {
  1226. sureBtnText: "확인",
  1227. sureBtnClick: function() {
  1228. $("#goodsDetailForm input[name=pntMrate]").focus();
  1229. }
  1230. });
  1231. return false;
  1232. }
  1233. // 주문수량
  1234. if ( gagajf.isNull($("#goodsDetailForm input[name=minOrdQty]").val())) {
  1235. mcxDialog.alertC("최소주문 수량을 입력해 주세요.", {
  1236. sureBtnText: "확인",
  1237. sureBtnClick: function() {
  1238. $("#goodsDetailForm input[name=minOrdQty]").focus();
  1239. }
  1240. });
  1241. return false;
  1242. }
  1243. if (Number($("#goodsDetailForm input[name=minOrdQty]").val()) <= 0) {
  1244. mcxDialog.alertC("최소주문 수량을 입력해 주세요.", {
  1245. sureBtnText: "확인",
  1246. sureBtnClick: function() {
  1247. $("#goodsDetailForm input[name=minOrdQty]").focus();
  1248. }
  1249. });
  1250. return false;
  1251. }
  1252. if ( gagajf.isNull($("#goodsDetailForm input[name=maxOrdQty]").val())) {
  1253. mcxDialog.alertC("최대주문 수량을 입력해 주세요.", {
  1254. sureBtnText: "확인",
  1255. sureBtnClick: function() {
  1256. $("#goodsDetailForm input[name=maxOrdQty]").focus();
  1257. }
  1258. });
  1259. return false;
  1260. }
  1261. if (Number($("#goodsDetailForm input[name=maxOrdQty]").val()) <= 0) {
  1262. mcxDialog.alertC("최대주문 수량을 입력해 주세요.", {
  1263. sureBtnText: "확인",
  1264. sureBtnClick: function() {
  1265. $("#goodsDetailForm input[name=maxOrdQty]").focus();
  1266. }
  1267. });
  1268. return false;
  1269. }
  1270. if ( gagajf.isNull($("#goodsDetailForm input[name=dayMaxOrdQty]").val())) {
  1271. mcxDialog.alertC("ID당1일최대구매 수량을 입력해 주세요.", {
  1272. sureBtnText: "확인",
  1273. sureBtnClick: function() {
  1274. $("#goodsDetailForm input[name=dayMaxOrdQty]").focus();
  1275. }
  1276. });
  1277. return false;
  1278. }
  1279. if (Number($("#goodsDetailForm input[name=dayMaxOrdQty]").val()) <= 0) {
  1280. mcxDialog.alertC("ID당1일최대구매 수량을 입력해 주세요.", {
  1281. sureBtnText: "확인",
  1282. sureBtnClick: function() {
  1283. $("#goodsDetailForm input[name=dayMaxOrdQty]").focus();
  1284. }
  1285. });
  1286. return false;
  1287. }
  1288. if(Number($("#goodsDetailForm input[name=minOrdQty]").val()) > Number($("#goodsDetailForm input[name=maxOrdQty]").val())){
  1289. mcxDialog.alertC("최소주문수량은 최대주문수량보다 클 수 없습니다.", {
  1290. sureBtnText: "확인",
  1291. sureBtnClick: function() {
  1292. $("#goodsDetailForm input[name=minOrdQty]").focus();
  1293. }
  1294. });
  1295. return false;
  1296. }
  1297. if(Number($("#goodsDetailForm input[name=maxOrdQty]").val()) > Number($("#goodsDetailForm input[name=dayMaxOrdQty]").val())){
  1298. mcxDialog.alertC("최대주문수량이 ID당1일최대구매수량보다 클 수 없습니다.", {
  1299. sureBtnText: "확인",
  1300. sureBtnClick: function() {
  1301. $("#goodsDetailForm input[name=maxOrdQty]").focus();
  1302. }
  1303. });
  1304. return false;
  1305. }
  1306. idx = 0;
  1307. //재고 옵션 관련 확인
  1308. $("#goodsDetailForm input[name=chStockDataYn]").val('N');
  1309. $("#optionList tr").each(function() {
  1310. var optCd1 = $(this).find("input[name=optCd1]").val();
  1311. var optCd2 = $(this).find("input[name=optCd2]").val();
  1312. var baseStockQty = $(this).find("input[name=baseStockQty]").val();
  1313. var hidBaseStockQty = $(this).find("input[name=hidBaseStockQty]").val();
  1314. var dispOrd = $(this).find("input[name=dispOrd]").val();
  1315. var hidDispOrd = $(this).find("input[name=hidDispOrd]").val();
  1316. var dispYn = $(this).find("select[name=dispYn]").val();
  1317. var hidDispYn = $(this).find("input[name=hidDispYn]").val();
  1318. var soldoutYn = $(this).find("select[name=soldoutYn]").val();
  1319. var hidSoldoutYn = $(this).find("input[name=hidSoldoutYn]").val();
  1320. var editCurrStockQty = $(this).find("input[name=editCurrStockQty]").val(); // 입점 확인용
  1321. var currStockQty = $(this).find("input[name=currStockQty]").val(); // 입점 확인용 (hidden)
  1322. if(gagajf.isNull(dispOrd)){
  1323. optCheck = true;
  1324. mcxDialog.alertC("우선순위를 입력해주세요", {
  1325. sureBtnText: "확인",
  1326. sureBtnClick: function() {
  1327. $("#optionList tr").find("input[name=dispOrd]").eq(idx).focus();
  1328. }
  1329. });
  1330. return false;
  1331. }
  1332. // 입점만 체크
  1333. if ("N" == $('#goodsDetailForm input[name=selfGoodsYn]').val()){
  1334. if(gagajf.isNull(editCurrStockQty)){
  1335. optCheck = true;
  1336. mcxDialog.alertC("가용재고를 입력해주세요", {
  1337. sureBtnText: "확인",
  1338. sureBtnClick: function() {
  1339. $("#optionList tr").find("input[name=editCurrStockQty]").eq(idx).focus();
  1340. }
  1341. });
  1342. return false;
  1343. }
  1344. }
  1345. if(gagajf.isNull(baseStockQty)){
  1346. optCheck = true;
  1347. mcxDialog.alertC("안전재고를 입력해주세요", {
  1348. sureBtnText: "확인",
  1349. sureBtnClick: function() {
  1350. $("#optionList tr").find("input[name=baseStockQty]").eq(idx).focus();
  1351. }
  1352. });
  1353. return false;
  1354. }
  1355. if (editCurrStockQty != currStockQty){
  1356. $("#goodsDetailForm input[name=chStockDataYn]").val('Y');
  1357. }
  1358. if (baseStockQty != hidBaseStockQty){
  1359. $("#goodsDetailForm input[name=chStockDataYn]").val('Y');
  1360. }
  1361. if (dispOrd != hidDispOrd){
  1362. $("#goodsDetailForm input[name=chStockDataYn]").val('Y');
  1363. }
  1364. if (dispYn != hidDispYn){
  1365. $("#goodsDetailForm input[name=chStockDataYn]").val('Y');
  1366. }
  1367. if (soldoutYn != hidSoldoutYn){
  1368. $("#goodsDetailForm input[name=chStockDataYn]").val('Y');
  1369. }
  1370. idx++;
  1371. });
  1372. if(optCheck) {
  1373. return false;
  1374. }
  1375. var basicColor = $("#goodsDetailForm input[name=basicColor]:checked").val();
  1376. var dcRate = 0;
  1377. var listPrice = $("#goodsDetailForm input[name=listPrice]").val().removeComma();
  1378. var currPrice = $("#goodsDetailForm input[name=currPrice]").val().removeComma();
  1379. dcRate = 100 - Math.floor(Number(currPrice) / Number(listPrice) * 100); //절사
  1380. if (dcRate < 0){
  1381. mcxDialog.alertC('할인율이 0보다 작습니다.\n판매가를 확인해주세요.', {
  1382. sureBtnText: "확인",
  1383. sureBtnClick: function() {
  1384. $("#goodsDetailForm input[name=currPrice]").focus();
  1385. }
  1386. });
  1387. return false;
  1388. }else if (dcRate >= 90){
  1389. mcxDialog.confirmC("할인율이 90%이상입니다. 계속하시겠습니까?", {
  1390. btn: ["아니요","예"],
  1391. btnClick: function(index){
  1392. if (index == 1){
  1393. optCheck = true;
  1394. } else {
  1395. fnSaveCheck();
  1396. }
  1397. }
  1398. });
  1399. }else{
  1400. $("#goodsDetailForm").find("#dcRateTxt").html(dcRate);
  1401. $("#goodsDetailForm input[name=dcRate]").val(dcRate);
  1402. fnSaveCheck();
  1403. }
  1404. if (optCheck) return false;
  1405. });
  1406. //저장 관련 체크
  1407. var fnSaveCheck = function(idx){
  1408. if($("#goodsDetailForm input:checkbox[name=chkDescKeep]").is(':checked')){
  1409. mcxDialog.confirmC("'정보유지' 체크박스가 선택되어 있어 '상품상세설명' 항목이 저장되지 않습니다.<br/>저장을 원하시면 체크를 해제하세요. 계속하시겠습니까?", {
  1410. btn: ["아니요","예"],
  1411. btnClick: function(index){
  1412. if (index == 1){
  1413. optCheck = true;
  1414. } else {
  1415. fnGoodsSave();
  1416. }
  1417. }
  1418. });
  1419. }else{
  1420. fnGoodsSave();
  1421. }
  1422. }
  1423. //저장처리
  1424. var fnGoodsSave = function(){
  1425. mcxDialog.confirm('저장하시겠습니까?', {
  1426. cancelBtnText: "취소",
  1427. sureBtnText: "확인",
  1428. sureBtnClick: function(){
  1429. fnGoodsDeailNotiSave();
  1430. if (fnChangeCheck()){
  1431. $("#goodsDetailForm input[name=chDataYn]").val('Y');
  1432. }else{
  1433. $("#goodsDetailForm input[name=chDataYn]").val('N');
  1434. }
  1435. // 승인여부 확인 - 판매가와 판매수수룔 변경시
  1436. // 판매수수료율
  1437. var chCfrmYn = "N";
  1438. if ($("#goodsDetailForm input[name=sellFeeRateOrg]").val() != $("#goodsDetailForm input[name=sellFeeRate]").val()){
  1439. chCfrmYn = "Y";
  1440. }
  1441. //판매가
  1442. if ($("#goodsDetailForm input[name=currPriceOrg]").val() != $("#goodsDetailForm input[name=currPrice]").val().removeComma()){
  1443. chCfrmYn = "Y";
  1444. }
  1445. $("#goodsDetailForm input[name=chCfrmYn]").val(chCfrmYn);
  1446. $("#goodsDetailForm input[name=mainColorCd]").val($("#goodsDetailForm input[name=basicColor]:checked").val());
  1447. $('#goodsDetailForm input[name=goodsNm]').val($('#goodsDetailForm input[name=goodsNm]').val().trim().replace(/\n|\r/g, "<br/>").replace(/\"/gi, "&quot;").replace(/\'/gi, "&#39;"));
  1448. $('#goodsDetailForm input[name=goodsTnm]').val($('#goodsDetailForm input[name=goodsTnm]').val().trim().replace(/\n|\r/g, "<br/>").replace(/\"/gi, "&quot;").replace(/\'/gi, "&#39;"));
  1449. $('#goodsDetailForm input[name=goodsSnm1]').val($('#goodsDetailForm input[name=goodsSnm1]').val().trim().replace(/\n|\r/g, "<br/>").replace(/\"/gi, "&quot;").replace(/\'/gi, "&#39;"));
  1450. gagajf.ajaxFormSubmit("/goods/detail/save", "#goodsDetailForm", fnGoodsSaveCallBack);
  1451. }
  1452. });
  1453. }
  1454. //미리보기 클릭 시
  1455. $('#btnGoodsDetailPreview').click(function(e) {
  1456. cfnOpenFrontGoodsPopup($('#goodsDetailForm input[name=goodsCd]').val(), $('#goodsDetailForm input[name=siteCd]').val());
  1457. });
  1458. //이미지 클릭 시
  1459. $('#btnGoodsDetailImg').click(function(e) {
  1460. cfnOpenGoodsImagePopup($('#goodsDetailForm input[name=goodsCd]').val());
  1461. });
  1462. //창종료
  1463. var fnGoodsDetailClose = function(){
  1464. uifnPopupClose('popupGoodsDetail');
  1465. }
  1466. //저장후 callback
  1467. var fnGoodsSaveCallBack = function(){
  1468. var goodsCd = $('#goodsDetailForm input[name=goodsCd]').val();
  1469. fnGoodsDetailClose();
  1470. cfnOpenGoodsDetailPopup('U', goodsCd);
  1471. }
  1472. //고시정보 저장을 위한 데이터 처리
  1473. var fnGoodsDeailNotiSave = function(){
  1474. var goodsCd = $('#goodsDetailForm input[name=goodsCd]').val();
  1475. var goodsInfoList = [];
  1476. var index = 0;
  1477. $("#goodsDetailForm").find("#infoContents tr").each(function() {
  1478. if (index > 0){
  1479. var goodsInfo = {goodsCd: goodsCd
  1480. , niClsfCd : $('#goodsDetailForm input[name=niClsfCd]').val()
  1481. , niItemCd : $(this).find("input[name=niItemCd]").val()
  1482. , niContent : $(this).find("input[name=niContent]").val()
  1483. , dispOrd : $(this).find("input[name=dispOrd]").val()
  1484. };
  1485. goodsInfoList.push(goodsInfo);
  1486. }
  1487. index++;
  1488. });
  1489. $("#goodsDetailForm input[name=notiList]").val(JSON.stringify(goodsInfoList));
  1490. }
  1491. //상품기본정보 변경여부 확인
  1492. var fnChangeCheck = function(){
  1493. //상품타이틀
  1494. if ($("#goodsDetailForm input[name=goodsTnmOrg]").val() != $("#goodsDetailForm input[name=goodsTnm]").val()){
  1495. return true;
  1496. }
  1497. //사용자검색어
  1498. if ($("#goodsDetailForm input[name=goodsSnm1Org]").val() != $("#goodsDetailForm input[name=goodsSnm1]").val()){
  1499. return true;
  1500. }
  1501. //상품명
  1502. if ($("#goodsDetailForm input[name=goodsNmOrg]").val() != $("#goodsDetailForm input[name=goodsNm]").val()){
  1503. return true;
  1504. }
  1505. //상품정상이월구분
  1506. if ($("#goodsDetailForm input[name=formalGbOrg]").val() != $("input:radio[name=formalGb]:checked").val()){
  1507. return true;
  1508. }
  1509. //상품구분
  1510. if ($("#goodsDetailForm input[name=goodsGbOrg]").val() != $("#goodsDetailForm select[name=goodsGb]").val()){
  1511. return true;
  1512. }
  1513. //상품상태
  1514. if ($("#goodsDetailForm input[name=goodsStatOrg]").val() != $("#goodsDetailForm select[name=goodsStat]").val()){
  1515. return true;
  1516. }
  1517. //시즌
  1518. if ($("#goodsDetailForm input[name=seasonCdOrg]").val() != $("#goodsDetailForm select[name=seasonCd]").val()){
  1519. return true;
  1520. }
  1521. //성별
  1522. if ($("#goodsDetailForm input[name=sexGbOrg]").val() != $("#goodsDetailForm select[name=sexGb]").val()){
  1523. return true;
  1524. }
  1525. //판매가
  1526. if ($("#goodsDetailForm input[name=currPriceOrg]").val() != $("#goodsDetailForm input[name=currPrice]").val().removeComma()){
  1527. return true;
  1528. }
  1529. //자사 일반상품만
  1530. if($("#goodsDetailForm input[name=selfGoodsYn]").val() == 'Y' && $("#goodsDetailForm input[name=goodType]").val() == 'G056_N'){
  1531. //ERP재고연동여부
  1532. if ($("#goodsDetailForm input[name=erpStockLinkYnOrg]").val() != $("#goodsDetailForm input[name=erpStockLinkYn]:checked").val()){
  1533. return true;
  1534. }
  1535. }
  1536. //자사몰 노출여부
  1537. if ($("#goodsDetailForm input[name=selfMallYnOrg]").val() != $("input[name=selfMallYn]:checked").val()){
  1538. return true;
  1539. }
  1540. //PC포인트
  1541. if ($("#goodsDetailForm input[name=pntPrateOrg]").val() != $("#goodsDetailForm input[name=pntPrate]").val()){
  1542. return true;
  1543. }
  1544. //PC 선포인트 사용여부
  1545. if ($("#goodsDetailForm input[name=prePpntUsableYnOrg]").val() != $("input[name=prePpntUsableYn]:checked").val()){
  1546. return true;
  1547. }
  1548. //MOBILE포인트
  1549. if ($("#goodsDetailForm input[name=pntMrateOrg]").val() != $("#goodsDetailForm input[name=pntMrate]").val()){
  1550. return true;
  1551. }
  1552. //MOBILE 선포인트 사용여부
  1553. if ($("#goodsDetailForm input[name=preMpntUsableYnOrg]").val() != $("input[name=preMpntUsableYn]:checked").val()){
  1554. return true;
  1555. }
  1556. //최소주문수량
  1557. if ($("#goodsDetailForm input[name=minOrdQtyOrg]").val() != $("#goodsDetailForm input[name=minOrdQty]").val()){
  1558. return true;
  1559. }
  1560. //최대주문수량
  1561. if ($("#goodsDetailForm input[name=maxOrdQtyOrg]").val() != $("#goodsDetailForm input[name=maxOrdQty]").val()){
  1562. return true;
  1563. }
  1564. //ID당1일최대구매수량
  1565. if ($("#goodsDetailForm input[name=dayMaxOrdQtyOrg]").val() != $("#goodsDetailForm input[name=dayMaxOrdQty]").val()){
  1566. return true;
  1567. }
  1568. //유통구분
  1569. if ($("#goodsDetailForm input[name=distributionGbOrg]").val() != $("#goodsDetailForm select[name=distributionGb]").val()){
  1570. return true;
  1571. }
  1572. //상품연령대
  1573. if ($("#goodsDetailForm input[name=ageGrpCdOrg]").val() != $("#goodsDetailForm select[name=ageGrpCd]").val()){
  1574. return true;
  1575. }
  1576. // 판매수수료율
  1577. if ($("#goodsDetailForm input[name=sellFeeRateOrg]").val() != $("#goodsDetailForm input[name=sellFeeRate]").val()){
  1578. return true;
  1579. }
  1580. // 메인 색상코드
  1581. if ($("#goodsDetailForm input[name=mainColorCd]").val() != $("#goodsDetailForm input[name=basicColor]:checked").val()){
  1582. return true;
  1583. }
  1584. // 반품가능여부
  1585. if ($("#goodsDetailForm input[name=returnableYnOrg]").val() != $("input[name=returnableYn]:checked").val()){
  1586. return true;
  1587. }
  1588. // 배송비정책
  1589. if ($("#goodsDetailForm input[name=delvFeeCdOrg]").val() != $("#goodsDetailForm select[name=delvFeeCd]").val()){
  1590. return true;
  1591. }
  1592. //선물주문여부
  1593. if ($("#goodsDetailForm input[name=giftPackYnOrg]").val() != $("input[name=giftPackYn]:checked").val()){
  1594. return true;
  1595. }
  1596. // 교환가능여부
  1597. if ($("#goodsDetailForm input[name=changeableYnOrg]").val() != $("input[name=changeableYn]:checked").val()){
  1598. return true;
  1599. }
  1600. // 신규가입구매가능여부
  1601. if ($("#goodsDetailForm input[name=newCustOrdYnOrg]").val() != $("input[name=newCustOrdYn]:checked").val()){
  1602. return true;
  1603. }
  1604. // 성인용품여부
  1605. if ($("#goodsDetailForm input[name=adultYnOrg]").val() != $("input[name=adultYn]:checked").val()){
  1606. return true;
  1607. }
  1608. return false;
  1609. }
  1610. // 상품 고시 선택 버튼 클릭 시
  1611. $('#btnNotinfo').click(function(e) {
  1612. if(gagajf.isNull($("#goodsDetailForm select[name=selNiClsfCd]").val())) {
  1613. mcxDialog.alertC("상품정보제공 고시를 선택해주세요.", {
  1614. sureBtnText: "확인",
  1615. sureBtnClick: function() {
  1616. $("#goodsDetailForm select[name=selNiClsfCd]").focus();
  1617. }
  1618. });
  1619. return false;
  1620. }
  1621. var params = new Object();
  1622. params.supplyCompCd = $("#goodsDetailForm input[name=supplyCompCd]").val();
  1623. params.niClsfCd = $("#goodsDetailForm select[name=selNiClsfCd]").val();
  1624. params.goodsCd = $("#goodsDetailForm input[name=goodsCd]").val();
  1625. cfnAjaxSubmit("/goods/noti/goodsInfo/list", "json", fnGoodsDetailNotiInfoSearchCallback, params);
  1626. });
  1627. // 품목변경
  1628. $("#btnGoodsItemkindChange").on("click", function(){
  1629. if($("#goodsDetailForm select[name=itemkindCd]").val() == $("#goodsDetailForm input[name=orgItemkindCd]").val()){
  1630. mcxDialog.alert("품목코드가 변경되지 않았습니다.");
  1631. return false;
  1632. }
  1633. mcxDialog.confirm('품목변경 하시겠습니까?', {
  1634. cancelBtnText: "취소",
  1635. sureBtnText: "확인",
  1636. sureBtnClick: function(){
  1637. var data = [{ goodsCd : $('#goodsDetailForm input[name=goodsCd]').val()
  1638. , itemkindCd : $("#goodsDetailForm select[name=itemkindCd]").val()
  1639. , supplyCompCd : $("#goodsDetailForm input[name=supplyCompCd]").val()
  1640. }];
  1641. var jsonData = JSON.stringify(data);
  1642. gagajf.ajaxJsonSubmit('/goods/itemKind/change/save', jsonData, fnGoodsDeailSearch);
  1643. }
  1644. });
  1645. });
  1646. // 상품구매등급
  1647. var fnGoodsOrderGrade = function(){
  1648. var code = $('#goodsDetailForm select[name=custGrade]').val();
  1649. var codeText = $("#goodsDetailForm select[name=custGrade] option:selected").text();
  1650. var addHtml = '';
  1651. var addFlag = true;
  1652. $("#goodsDetailForm #goodsCustGradeList").find("input").each(function() {
  1653. if (code == $(this).val() ){
  1654. addFlag = false;
  1655. }
  1656. });
  1657. if (addFlag){
  1658. addHtml = '<span class="memAdd"><input type="hidden" name="goodsOrderGrade" value="'+code+'"/>'+ codeText+' <button type="button" onclick="$(this).parent().remove();return false;">삭제</button></span>';
  1659. $('#goodsCustGradeList').append(addHtml);
  1660. //$('#goodsDetailForm').find('.tabs .tabsNav li:eq(4) a').attr("style", "color:red;");
  1661. }
  1662. }
  1663. //엑셀 상품 조회
  1664. $('#btnGoodsDealSearchExcel').on('click', function() {
  1665. cfnExcelUploadPopup('goodsDetailExcelUpload', 'goodsDetailExcelUpload');
  1666. });
  1667. var goodsDetailExcelUpload = function(result){
  1668. var data = {procJob : result.procJob
  1669. ,excelFileNm : result.excelFileNm
  1670. };
  1671. var jsonData = JSON.stringify(data);
  1672. gagajf.ajaxJsonSubmit('/goods/search/excelupload/save', jsonData, goodsDetailExcelUploadCallBack);
  1673. }
  1674. var goodsDetailExcelUploadCallBack = function(result){
  1675. gagajf.ajaxJsonSubmit('/goods/excel/upload/goods/list', '', fnGoodsDetailSearchExcel);
  1676. }
  1677. var fnGoodsDetailSearchExcel = function(result){
  1678. fnGoodsDetailGoodsDeal(result.goodsExcelList);
  1679. }
  1680. $("img").on("error", function () {
  1681. $(this).attr("src", _uximgUrl+"/image/no.gif");
  1682. });
  1683. $(document).ready(function() {
  1684. cfnCreateCheckbox("/renderer/avail/commonCode/list/G101", $('#goodsCustGradeList'), "goodsOrderGrade");
  1685. gagaAgGrid.createGrid('gridGoodsHstoryList', gridGoodsHstoryOptions);
  1686. //gagaAgGrid.createGrid('gridGoodsComposeList', gridGoodsComposeOptions);
  1687. fnGoodsDeailSearch();
  1688. });
  1689. /*]]>*/
  1690. </script>
  1691. </html>