GoodsDetailReviewFormWeb.html 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661
  1. <!DOCTYPE html>
  2. <html lang="ko"
  3. xmlns:th="http://www.thymeleaf.org">
  4. <!--
  5. *******************************************************************************
  6. * @source : GoodsDetailReviewFormWeb.html
  7. * @desc : 상품평 Page
  8. *============================================================================
  9. * STYLE24
  10. * Copyright(C) 2020 TSIT, All rights reserved.
  11. *============================================================================
  12. * VER DATE AUTHOR DESCRIPTION
  13. * === =========== ========== =============================================
  14. * 1.0 2021.03.26 eskim 최초 작성
  15. *******************************************************************************
  16. -->
  17. <!-- 상품리뷰 리스트 내용 -->
  18. <div class="pd_review" th:with="imgGoodsUrl=${@environment.getProperty('upload.goods.view')}, uxImgUrl=${@environment.getProperty('domain.uximage')}, imgUrl=${@environment.getProperty('upload.image.view')}">
  19. <!-- 등록리뷰 없을 시 -->
  20. <div class="area_rv_empty" th:if="${reviewList == null or reviewList.empty}">
  21. <div class="txt_box">
  22. <p>
  23. 지금 첫 리뷰를 작성하고<br>
  24. <span class="c_primary">스타일포인트 적립</span> 받으세요!
  25. </p>
  26. <dl>
  27. <div>
  28. <dt>일반리뷰</dt>
  29. <dd th:text="|${#numbers.formatInteger(reviewPoint.textReviewPoint, 0,'COMMA')}P|">0P</dd>
  30. </div>
  31. <div>
  32. <dt>포토/영상 리뷰</dt>
  33. <dd th:text="|${#numbers.formatInteger(reviewPoint.photoReviewPoint, 0,'COMMA')}P|">0P</dd>
  34. </div>
  35. <div>
  36. <dt>베스트 리뷰</dt>
  37. <dd th:text="|${#numbers.formatInteger(reviewPoint.bestReviewPoint, 0,'COMMA')}P|">0P</dd>
  38. </div>
  39. </dl>
  40. </div>
  41. <div class="btn_box">
  42. <button type="button" class="btn btn_dark" onclick="cfnGoToMypageReview();"><span>지금 리뷰 작성하기</span></button>
  43. </div>
  44. </div>
  45. <!-- //등록리뷰 없을 시 -->
  46. <!-- 등록리뷰 있을 시 -->
  47. <div class="area_rv_average" th:if="${reviewList != null and !reviewList.empty}">
  48. <h6 class="sr-only">구매평점</h6>
  49. <div class="star_score">
  50. <span class="tit">구매평점</span>
  51. <span class="score" th:text="${goodsInfo.score}">4.3</span>
  52. <span class="star" th:with="starScore=${#numbers.formatDecimal((goodsInfo.score*100/5), 0,0)}">
  53. <em class="progbar" th:style="${'width:'+starScore+'%;' }"></em> <!-- 평점 style로 표기 -->
  54. </span>
  55. </div>
  56. <!-- 착용정보 있을 시 노출 -->
  57. <th:block th:if="${not #strings.isEmpty(goodsInfo.sizeGb)}">
  58. <div class="average">
  59. <div class="part_average">
  60. <span class="tit">사이즈</span>
  61. <dl th:with="scoreSize1=${#numbers.formatDecimal((goodsInfo.scoreSize1*100/goodsInfo.reviewRegCnt), 0,0)}
  62. , scoreSize2=${#numbers.formatDecimal((goodsInfo.scoreSize2*100/goodsInfo.reviewRegCnt), 0,0)}
  63. , scoreSize3=${#numbers.formatDecimal((goodsInfo.scoreSize3*100/goodsInfo.reviewRegCnt), 0,0)}">
  64. <div th:class="${(scoreSize1 >= scoreSize2 and scoreSize1 >= scoreSize3) ? 'on' : ''}">
  65. <dt>작음</dt>
  66. <dd>
  67. <span class="ratio">
  68. <em class="progbar"></em>
  69. </span>
  70. <span class="percent"><th:block th:text="${scoreSize1}"></th:block>%</span>
  71. </dd>
  72. </div>
  73. <div th:class="${(scoreSize2 >= scoreSize1 and scoreSize2 >= scoreSize3) ? 'on' : ''}">
  74. <dt>딱맞음</dt>
  75. <dd>
  76. <span class="ratio">
  77. <em class="progbar"></em>
  78. </span>
  79. <span class="percent"><th:block th:text="${scoreSize2}"></th:block>%</span>
  80. </dd>
  81. </div>
  82. <div th:class="${(scoreSize3 >= scoreSize1 and scoreSize3 >= scoreSize2) ? 'on' : ''}">
  83. <dt>큼</dt>
  84. <dd>
  85. <span class="ratio">
  86. <em class="progbar"></em>
  87. </span>
  88. <span class="percent"><th:block th:text="${scoreSize3}"></th:block>%</span>
  89. </dd>
  90. </div>
  91. </dl>
  92. </div>
  93. <div class="part_average">
  94. <span class="tit">컬러</span>
  95. <dl th:with="scoreColor1=${#numbers.formatDecimal((goodsInfo.scoreColor1*100/goodsInfo.reviewRegCnt), 0,0)}
  96. , scoreColor2=${#numbers.formatDecimal((goodsInfo.scoreColor2*100/goodsInfo.reviewRegCnt), 0,0)}
  97. , scoreColor3=${#numbers.formatDecimal((goodsInfo.scoreColor3*100/goodsInfo.reviewRegCnt), 0,0)}">
  98. <div th:class="${(scoreColor1 >= scoreColor2 and scoreColor1 >= scoreColor3) ? 'on' : ''}">
  99. <dt>밝음</dt>
  100. <dd>
  101. <span class="ratio">
  102. <em class="progbar"></em>
  103. </span>
  104. <span class="percent"><th:block th:text="${scoreColor1}"></th:block>%</span>
  105. </dd>
  106. </div>
  107. <div th:class="${(scoreColor2 >= scoreColor1 and scoreColor2 >= scoreColor3) ? 'on' : ''}">
  108. <dt>똑같음</dt>
  109. <dd>
  110. <span class="ratio">
  111. <em class="progbar"></em>
  112. </span>
  113. <span class="percent"><th:block th:text="${scoreColor2}"></th:block>%</span>
  114. </dd>
  115. </div>
  116. <div th:class="${(scoreColor3 >= scoreColor1 and scoreColor3 >= scoreColor2) ? 'on' : ''}">
  117. <dt>어두움</dt>
  118. <dd>
  119. <span class="ratio">
  120. <em class="progbar"></em>
  121. </span>
  122. <span class="percent"><th:block th:text="${scoreColor3}"></th:block>%</span>
  123. </dd>
  124. </div>
  125. </dl>
  126. </div>
  127. <th:block th:if="${goodsInfo.sizeGb == 'T' or goodsInfo.sizeGb == 'B'}">
  128. <div class="part_average">
  129. <span class="tit">핏</span>
  130. <dl th:with="scoreFit1=${#numbers.formatDecimal((goodsInfo.scoreFit1*100/goodsInfo.reviewRegCnt), 0,0)}
  131. , scoreFit2=${#numbers.formatDecimal((goodsInfo.scoreFit2*100/goodsInfo.reviewRegCnt), 0,0)}
  132. , scoreFit3=${#numbers.formatDecimal((goodsInfo.scoreFit3*100/goodsInfo.reviewRegCnt), 0,0)}">
  133. <div th:class="${(scoreFit1 >= scoreFit2 and scoreFit1 >= scoreFit3) ? 'on' : ''}">
  134. <dt>슬림</dt>
  135. <dd>
  136. <span class="ratio">
  137. <em class="progbar"></em>
  138. </span>
  139. <span class="percent"><th:block th:text="${scoreFit1}"></th:block>%</span>
  140. </dd>
  141. </div>
  142. <div th:class="${(scoreFit2 >= scoreFit1 and scoreFit2 >= scoreFit3) ? 'on' : ''}">
  143. <dt>레귤러</dt>
  144. <dd>
  145. <span class="ratio">
  146. <em class="progbar"></em>
  147. </span>
  148. <span class="percent"><th:block th:text="${scoreFit2}"></th:block>%</span>
  149. </dd>
  150. </div>
  151. <div th:class="${(scoreFit3 >= scoreFit1 and scoreFit3 >= scoreFit2) ? 'on' : ''}">
  152. <dt>오버</dt>
  153. <dd>
  154. <span class="ratio">
  155. <em class="progbar"></em>
  156. </span>
  157. <span class="percent"><th:block th:text="${scoreFit3}"></th:block>%</span>
  158. </dd>
  159. </div>
  160. </dl>
  161. </div>
  162. <div class="part_average">
  163. <span class="tit">두께감</span>
  164. <dl th:with="scoreThick1=${#numbers.formatDecimal((goodsInfo.scoreThick1*100/goodsInfo.reviewRegCnt), 0,0)}
  165. , scoreThick2=${#numbers.formatDecimal((goodsInfo.scoreThick2*100/goodsInfo.reviewRegCnt), 0,0)}
  166. , scoreThick3=${#numbers.formatDecimal((goodsInfo.scoreThick3*100/goodsInfo.reviewRegCnt), 0,0)}">
  167. <div th:class="${(scoreThick1 >= scoreThick2 and scoreThick1 >= scoreThick3) ? 'on' : ''}">
  168. <dt>얇음</dt>
  169. <dd>
  170. <span class="ratio">
  171. <em class="progbar"></em>
  172. </span>
  173. <span class="percent"><th:block th:text="${scoreThick1}"></th:block>%</span>
  174. </dd>
  175. </div>
  176. <div th:class="${(scoreThick2 >= scoreThick1 and scoreThick2 >= scoreThick3) ? 'on' : ''}">
  177. <dt>적당함</dt>
  178. <dd>
  179. <span class="ratio">
  180. <em class="progbar"></em>
  181. </span>
  182. <span class="percent"><th:block th:text="${scoreThick2}"></th:block>%</span>
  183. </dd>
  184. </div>
  185. <div th:class="${(scoreThick3 >= scoreThick1 and scoreThick3 >= scoreThick2) ? 'on' : ''}">
  186. <dt>도톰함</dt>
  187. <dd>
  188. <span class="ratio">
  189. <em class="progbar"></em>
  190. </span>
  191. <span class="percent"><th:block th:text="${scoreThick3}"></th:block>%</span>
  192. </dd>
  193. </div>
  194. </dl>
  195. </div>
  196. </th:block>
  197. <th:block th:if="${goodsInfo.sizeGb == 'S'}">
  198. <div class="part_average">
  199. <span class="tit">무게감</span>
  200. <dl th:with="scoreWeight1=${#numbers.formatDecimal((goodsInfo.scoreWeight1*100/goodsInfo.reviewRegCnt), 0,0)}
  201. , scoreWeight2=${#numbers.formatDecimal((goodsInfo.scoreWeight2*100/goodsInfo.reviewRegCnt), 0,0)}
  202. , scoreWeight3=${#numbers.formatDecimal((goodsInfo.scoreWeight3*100/goodsInfo.reviewRegCnt), 0,0)}">
  203. <div th:class="${(scoreWeight1 >= scoreWeight2 and scoreWeight1 >= scoreWeight3) ? 'on' : ''}">
  204. <dt>가벼움</dt>
  205. <dd>
  206. <span class="ratio">
  207. <em class="progbar"></em>
  208. </span>
  209. <span class="percent"><th:block th:text="${scoreWeight1}"></th:block>%</span>
  210. </dd>
  211. </div>
  212. <div th:class="${(scoreWeight2 >= scoreWeight1 and scoreWeight2 >= scoreWeight3) ? 'on' : ''}">
  213. <dt>적당함</dt>
  214. <dd>
  215. <span class="ratio">
  216. <em class="progbar"></em>
  217. </span>
  218. <span class="percent"><th:block th:text="${scoreWeight2}"></th:block>%</span>
  219. </dd>
  220. </div>
  221. <div th:class="${(scoreWeight3 >= scoreWeight1 and scoreWeight3 >= scoreWeight2) ? 'on' : ''}">
  222. <dt>무거움</dt>
  223. <dd>
  224. <span class="ratio">
  225. <em class="progbar"></em>
  226. </span>
  227. <span class="percent"><th:block th:text="${scoreWeight3}"></th:block>%</span>
  228. </dd>
  229. </div>
  230. </dl>
  231. </div>
  232. <div class="part_average">
  233. <span class="tit">볼너비</span>
  234. <dl th:with="scoreBall1=${#numbers.formatDecimal((goodsInfo.scoreBall1*100/goodsInfo.reviewRegCnt), 0,0)}
  235. , scoreBall2=${#numbers.formatDecimal((goodsInfo.scoreBall2*100/goodsInfo.reviewRegCnt), 0,0)}
  236. , scoreBall3=${#numbers.formatDecimal((goodsInfo.scoreBall3*100/goodsInfo.reviewRegCnt), 0,0)}">
  237. <div th:class="${(scoreBall1 >= scoreBall2 and scoreBall1 >= scoreBall3) ? 'on' : ''}">
  238. <dt>작음</dt>
  239. <dd>
  240. <span class="ratio">
  241. <em class="progbar"></em>
  242. </span>
  243. <span class="percent"><th:block th:text="${scoreBall1}"></th:block>%</span>
  244. </dd>
  245. </div>
  246. <div th:class="${(scoreBall2 >= scoreBall1 and scoreBall2 >= scoreBall3) ? 'on' : ''}">
  247. <dt>딱맞음</dt>
  248. <dd>
  249. <span class="ratio">
  250. <em class="progbar"></em>
  251. </span>
  252. <span class="percent"><th:block th:text="${scoreBall2}"></th:block>%</span>
  253. </dd>
  254. </div>
  255. <div th:class="${(scoreBall3 >= scoreBall1 and scoreBall3 >= scoreBall2) ? 'on' : ''}">
  256. <dt>큼</dt>
  257. <dd>
  258. <span class="ratio">
  259. <em class="progbar"></em>
  260. </span>
  261. <span class="percent"><th:block th:text="${scoreBall3}"></th:block>%</span>
  262. </dd>
  263. </div>
  264. </dl>
  265. </div>
  266. </th:block>
  267. </div>
  268. </th:block>
  269. <!-- //착용정보 있을 시 노출 -->
  270. <div class="info_review">
  271. <p>
  272. <i class="ico_point"></i>상품 리뷰 작성 시 <span>스타일포인트 추가 적립!</span>
  273. </p>
  274. <dl>
  275. <div>
  276. <dt>일반리뷰</dt>
  277. <dd th:text="|${#numbers.formatInteger(reviewPoint.textReviewPoint, 0,'COMMA')}P|">0P</dd>
  278. </div>
  279. <div>
  280. <dt>포토/영상 리뷰</dt>
  281. <dd th:text="|${#numbers.formatInteger(reviewPoint.photoReviewPoint, 0,'COMMA')}P|">0P</dd>
  282. </div>
  283. <div>
  284. <dt>베스트 리뷰</dt>
  285. <dd th:text="|${#numbers.formatInteger(reviewPoint.bestReviewPoint, 0,'COMMA')}P|">0P</dd>
  286. </div>
  287. </dl>
  288. </div>
  289. </div>
  290. <div class="area_rv_best" th:if="${bestReviewList != null and !bestReviewList.empty}">
  291. <h6>베스트 리뷰</h6>
  292. <div class="btn_arrow">
  293. <div class="swiper-button-prev"></div>
  294. <div class="swiper-button-next"></div>
  295. </div>
  296. <div class="swiper-container">
  297. <div class="swiper-wrapper">
  298. <div class="swiper-slide" th:each="bestReview, status : ${bestReviewList}" >
  299. <div class="best_review">
  300. <a href="javascript:void(0);" th:onclick="cfGoodsReviewDetail([[${goodsInfo.goodsCd}]], 'Y', '', [[${bestReview.reviewSq}]])" >
  301. <div class="pic" th:if="${bestReview.reviewAttachList != null and !bestReview.reviewAttachList.empty}">
  302. <th:block th:each="reviewAttach, attachStatus : ${bestReview.reviewAttachList}">
  303. <span class="thumb" th:classAppend="${(reviewAttach.fileGb == 'M') ? 'mov' :''}" th:style="${'background-image:url('+imgUrl+ reviewAttach.sysFileNm+');'}"></span><!-- 동영상의 썸네일일 경우 mov 클래스 추가 -->
  304. </th:block>
  305. </div>
  306. <div class="pic" th:unless="${bestReview.reviewAttachList != null and !bestReview.reviewAttachList.empty}">
  307. <span class="thumb" th:style="${'background-image:url('+imgGoodsUrl+ '/'+goodsInfo.sysImgNm+'?RS=365);'}">
  308. </span>
  309. </div>
  310. <div class="star_score" th:with="starScore=${#numbers.formatDecimal((bestReview.iscore*100/5), 0,0)}">
  311. <span class="star">
  312. <em class="progbar" th:style="${'width:'+starScore+'%;' }"></em> <!-- 평점 style로 표기 -->
  313. </span>
  314. <em class="ico ico_besttag"></em>
  315. </div>
  316. <div class="txt_best_review">
  317. <p th:text="${bestReview.reviewContent}">옷</p>
  318. </div>
  319. </a>
  320. </div>
  321. </div>
  322. </div>
  323. <div class="swiper-pagination"></div>
  324. </div>
  325. </div>
  326. <div class="area_rv_photo" th:if="${photoReviewList != null and !photoReviewList.empty}">
  327. <h6>포토/영상 리뷰</h6>
  328. <div class="photo_list">
  329. <ul>
  330. <li th:each="photoReview, status : ${photoReviewList}" >
  331. <th:block th:if="${photoReview.reviewAttachList != null and !photoReview.reviewAttachList.empty}">
  332. <th:block th:each="reviewAttach, attachStatus : ${photoReview.reviewAttachList}" th:if="${attachStatus.first}">
  333. <a href="javascript:void(0);" th:onclick="cfGoodsReviewDetail([[${goodsInfo.goodsCd}]], '', 'Y', [[${photoReview.reviewSq}]])">
  334. <div class="pic">
  335. <span class="thumb" th:classAppend="${(reviewAttach.fileGb == 'M') ? 'mov' :''}" th:style="${'background-image:url('+imgUrl+ reviewAttach.sysFileNm+');'}"></span><!-- 동영상의 썸네일일 경우 mov 클래스 추가 -->
  336. </div>
  337. </a>
  338. </th:block>
  339. </th:block>
  340. </li>
  341. </ul>
  342. <!-- 포토영상 게시글 최대 7개 & 버튼노출 -->
  343. <th:block th:if="${#lists.size(photoReviewList) >= 8}"> <!-- 나중에 8로 수정 -->
  344. <button type="button" id="btn_more_photoreview" th:onclick="cfGoodsReviewPhoto([[${goodsInfo.goodsCd}]])" ><span>더 보기</span></button>
  345. <!-- //포토영상 게시글 최대 7개 & 버튼노출 -->
  346. </th:block>
  347. </div>
  348. </div>
  349. <div class="area_rv_all">
  350. <form id="goodsReviewForm" name="goodsReviewForm" action="#" th:action="@{'/goods/review/list'}">
  351. <input type="hidden" name="pageNo" value ="1"/>
  352. <input type="hidden" name="pageSize" value ="20"/>
  353. <input type="hidden" name="goodsCd" th:value ="${goodsInfo.goodsCd}"/>
  354. <input type="hidden" name="goodsType" th:value ="${goodsInfo.goodsType}"/>
  355. <input type="hidden" name="selfGoodsYn" th:value ="${goodsInfo.selfGoodsYn}"/>
  356. <input type="hidden" name="reviewScore" />
  357. <input type="hidden" name="reviewOption" />
  358. <input type="hidden" name="reviewHeight" />
  359. <input type="hidden" name="reviewWeight" />
  360. <h6>전체리뷰<span>(<span id="reviewCount" th:text="${(reviewCount <= 9999) ? #numbers.formatInteger(reviewCount, 0,'COMMA') : '9,999+'}">9,999+</span>)</span></h6>
  361. <div class="selection">
  362. <div class="form_field">
  363. <div class="select_custom sort_opt1">
  364. <div class="combo">
  365. <div class="select">평점 전체<input type="hidden" name="selScore" value=""/></div>
  366. <ul class="list" onclick="fnReviewSearch();" >
  367. <!-- 선택처리 class="selected" -->
  368. <li class="selected" >평점 전체<input type="hidden" name="selScore" value=""/></li>
  369. <li>5점&nbsp;&starf;&starf;&starf;&starf;&starf;<input type="hidden" name="selScore" value="5"/></li>
  370. <li>4점&nbsp;&starf;&starf;&starf;&starf;<input type="hidden" name="selScore" value="4" scoreId="4"/></li>
  371. <li>3점&nbsp;&starf;&starf;&starf;<input type="hidden" name="selScore" value="3"/></li>
  372. <li>2점&nbsp;&starf;&starf;<input type="hidden" name="selScore" value="2"/></li>
  373. <li>1점&nbsp;&starf;<input type="hidden" name="selScore" value="1"/></li>
  374. </ul>
  375. </div>
  376. </div>
  377. <div class="select_custom sort_opt2" th:if="${reviewOptionList != null and !reviewOptionList.empty}">
  378. <div class="combo">
  379. <th:block th:if="${(goodsInfo.selfGoodsYn == 'Y')}">
  380. <div class="select">사이즈 전체<input type="hidden" name="selOption" value=""/></div>
  381. </th:block>
  382. <th:block th:unless="${(goodsInfo.selfGoodsYn == 'Y')}">
  383. <div class="select">옵션 전체<input type="hidden" name="selOption" value=""/></div>
  384. </th:block>
  385. <ul class="list" onclick="fnReviewSearch();">
  386. <!-- 선택처리 class="selected" -->
  387. <li class="selected" th:text="${(goodsInfo.selfGoodsYn == 'Y')? '사이즈 전체' :'옵션 전체'}">사이즈 전체</li>
  388. <li th:each="reviewOption, status : ${reviewOptionList}" >
  389. <th:block th:text="${reviewOption.optCd}"></th:block>
  390. <input type="hidden" name="selOption" th:value="${reviewOption.optCd}"/>
  391. </li>
  392. </ul>
  393. </div>
  394. </div>
  395. <div class="select_custom sort_opt3" th:if="${reviewHeightList != null and !reviewHeightList.empty}">
  396. <div class="combo">
  397. <div class="select">키 전체<input type="hidden" name="selHeight" value=""/></div>
  398. <ul class="list" onclick="fnReviewSearch();">
  399. <!-- 선택처리 class="selected" -->
  400. <li class="selected">키 전체<input type="hidden" name="selHeight" value=""/></li>
  401. <li th:each="reviewHeight, status : ${reviewHeightList}" >
  402. <th:block th:text="${reviewHeight.cdNm}"></th:block>
  403. <input type="hidden" name="selHeight" th:value="${reviewHeight.cd}"/>
  404. </li>
  405. </ul>
  406. </div>
  407. </div>
  408. <div class="select_custom sort_opt4" th:if="${reviewWeightList != null and !reviewWeightList.empty}">
  409. <div class="combo">
  410. <div class="select">몸무게 전체<input type="hidden" name="selWeight" value=""/></div>
  411. <ul class="list" onclick="fnReviewSearch();">
  412. <!-- 선택처리 class="selected" -->
  413. <li class="selected">몸무게 전체<input type="hidden" name="selWeight" value=""/></li>
  414. <li th:each="reviewWeight, status : ${reviewWeightList}" >
  415. <th:block th:text="${reviewWeight.cdNm}"></th:block>
  416. <input type="hidden" name="selWeight" th:value="${reviewWeight.cd}"/>
  417. </li>
  418. </ul>
  419. </div>
  420. </div>
  421. </div>
  422. </div>
  423. <!-- 나열조건결과 있을 때 노출 내용 -->
  424. <div class="review_list">
  425. <ul id="ulGoodsReview">
  426. </ul>
  427. </div>
  428. <div class="ui_row">
  429. <ul class="pageNav" id="pageNav">
  430. </ul>
  431. </div>
  432. <!-- //나열조건결과 있을 때 노출 내용 -->
  433. <!-- 나열조건결과 없을 때 노출 내용 -->
  434. <div class="nodata" style="display:none;">
  435. <div class="txt_box">
  436. <p>
  437. 선택하신 조건에 맞는 리뷰가 없습니다.<br>
  438. 조건을 변경해 보세요.
  439. </p>
  440. </div>
  441. <div class="btn_box" th:if="${reviewCount> 0}">
  442. <button type="button" class="btn btn_default" onclick="fnReviewSearchInit();"><span>선택한 조건 초기화</span></button>
  443. </div>
  444. </div>
  445. <!-- //나열조건결과 없을 때 노출 내용 -->
  446. </form>
  447. </div>
  448. <!-- //등록리뷰 있을 시 -->
  449. </div>
  450. <script src="/ux/plugins/gaga/gaga.paging.js"></script>
  451. <script th:inline="javascript">
  452. /*<![CDATA[*/
  453. var fnGetList = function() {
  454. /* $('#goodsReviewForm input[name="secretYn"]').val('');
  455. if ($("#goodsReviewForm input:checkbox[name=except_secret]").is(':checked')){
  456. $('#goodsReviewForm input[name="secretYn"]').val('N');
  457. } */
  458. // Initialize a pagination
  459. gagaPaging.init('goodsReviewForm', fnGetListCallback, 'pageNav', 20);
  460. // Load data
  461. gagaPaging.load(1);
  462. }
  463. var fnGetListCallback = function(result) {
  464. $('#ulGoodsReview').html('');
  465. $('#goodsReviewForm').find('.nodata').hide();
  466. $('#goodsReviewForm').find('.ui_row').show();
  467. // 목록
  468. if (result.dataList != null && result.dataList.length > 0) {
  469. $.each(result.dataList, function(idx, item) {
  470. let tag = '<li>\n';
  471. tag += '<div class="review">\n';
  472. tag += ' <div class="info_box">\n';
  473. tag += ' <div class="star_score">\n';
  474. tag += ' <span class="star">\n';
  475. tag += ' <em class="progbar" style="width:'+(item.score*20)+'%;"></em>\n'; //<!-- 평점 style로 표기 -->
  476. tag += ' </span>\n';
  477. tag += ' </div>\n';
  478. tag += ' <div class="writer">\n';
  479. tag += ' <span class="wr_id">'+ item.maskingCustId +'</span>\n';
  480. tag += ' <span class="wr_date">' + item.regDt + '</span>\n';
  481. tag += ' </div>\n';
  482. tag += ' </div>\n';
  483. tag += ' <div class="response_box">\n';
  484. tag += ' <div>\n';
  485. tag += ' <dl>\n';
  486. tag += ' <div>\n';
  487. tag += ' <dt>구매옵션</dt>\n';
  488. if (item.goodsOptionList != null && item.goodsOptionList.length > 0){
  489. $.each(item.goodsOptionList, function(gIdx, goodsOption){
  490. tag += ' <dd>'+ goodsOption.optCd1 +' / '+ goodsOption.optCd2 +'</dd>\n';
  491. });
  492. }
  493. tag += ' </div>\n';
  494. tag += ' </dl>\n';
  495. tag += ' </div>\n';
  496. tag += ' <div>\n';
  497. tag += ' <dl>\n';
  498. tag += ' <div>\n';
  499. tag += ' <dt>키/몸무게</dt>\n';
  500. tag += ' <dd>'+ item.height +'cm/'+ item.weight +'kg</dd>\n';
  501. tag += ' </div>\n';
  502. if (!gagajf.isNull(item.sizeGb) ){ // 사이즈구분값이 있을경우 노출
  503. tag += ' <div>\n';
  504. tag += ' <dt>사이즈</dt>\n';
  505. tag += ' <dd>'+ item.scoreSizeNm +'</dd>\n';
  506. tag += ' </div>\n';
  507. tag += ' <div>\n';
  508. tag += ' <dt>컬러</dt>\n';
  509. tag += ' <dd>'+ item.scoreColorNm +'</dd>\n';
  510. tag += ' </div>\n';
  511. if (item.sizeGb == 'T' || item.sizeGb == 'B'){
  512. tag += ' <div>\n';
  513. tag += ' <dt>핏</dt>\n';
  514. tag += ' <dd>'+ item.scoreFitNm +'</dd>\n';
  515. tag += ' </div>\n';
  516. tag += ' <div>\n';
  517. tag += ' <dt>두께감</dt>\n';
  518. tag += ' <dd>'+ item.scoreThickNm +'</dd>\n';
  519. tag += ' </div>\n';
  520. }
  521. if (item.sizeGb == 'S' ){
  522. tag += ' <div>\n';
  523. tag += ' <dt>무게감</dt>\n';
  524. tag += ' <dd>'+ item.scoreWeightNm +'</dd>\n';
  525. tag += ' </div>\n';
  526. tag += ' <div>\n';
  527. tag += ' <dt>볼너비</dt>\n';
  528. tag += ' <dd>'+ item.scoreBallNm +'</dd>\n';
  529. tag += ' </div>\n';
  530. }
  531. }
  532. tag += ' </dl>\n';
  533. tag += ' </div>\n';
  534. tag += ' </div>\n';
  535. tag += ' <div class="photo_box">\n';
  536. tag += ' <div class="photo_list">\n';
  537. tag += ' <ul>\n';
  538. if (item.reviewAttachList != null && item.reviewAttachList.length > 0){
  539. var fileGbClass = '';
  540. $.each(item.reviewAttachList, function(aIdx, reviewAttach){
  541. fileGbClass = '';
  542. if (reviewAttach == "M") fileGbClass = "mov";
  543. tag += ' <li>\n';
  544. tag += ' <a href="javascript:void();" onclick="cfGoodsReviewDetail(\''+item.goodsCd+'\',\'\', \'Y\',\''+item.reviewSq+'\');">\n';
  545. tag += ' <div class="pic">\n';
  546. tag += ' <span class="thumb '+ fileGbClass +'" style="background-image:url('+ _imgUrl + reviewAttach.sysFileNm +');"></span>\n'; //<!-- 동영상의 썸네일일 경우 mov 클래스 추가 -->
  547. tag += ' </div>\n';
  548. tag += ' </a>\n';
  549. tag += ' </li>\n';
  550. });
  551. }
  552. tag += ' </ul>\n';
  553. tag += ' </div>\n';
  554. tag += ' </div>\n';
  555. tag += ' <div class="txt_review_box">\n';
  556. tag += ' <p>' + item.reviewContent +'</p>\n';
  557. tag += ' </div>\n';
  558. if (!gagajf.isNull(item.admRpl)){
  559. tag += ' <div class="reply_box">\n';
  560. tag += ' <div class="reply">\n';
  561. tag += ' <div class="reply_writer">\n';
  562. tag += ' <span class="wr_name">관리자</span>\n';
  563. tag += ' <span class="wr_date">'+item.admRplDt+'</span>\n';
  564. tag += ' </div>\n';
  565. tag += ' <div class="reply_txt">\n';
  566. tag += ' <p>' + item.admRpl+'</p>\n';
  567. tag += ' </div>\n';
  568. tag += ' </div>\n';
  569. tag += ' </div>\n';
  570. }
  571. tag += '</div>\n';
  572. tag += '</li>\n';
  573. $('#ulGoodsReview').append(tag);
  574. });
  575. } else {
  576. if ([[${reviewCount}]] > 0){
  577. $('#goodsReviewForm').find('.nodata').show();
  578. }
  579. $('#goodsReviewForm').find('.ui_row').hide();
  580. }
  581. // Create pagination
  582. gagaPaging.createPagination(result.paging.pageable);
  583. }
  584. // 상품평 검색조건 클릭시
  585. var fnReviewSearch = function(){
  586. let reviewScore = $('#goodsReviewForm').find('.select_custom.sort_opt1').find('.select input[name=selScore]').val();
  587. let reviewOption = $('#goodsReviewForm').find('.select_custom.sort_opt2').find('.select input[name=selOption]').val();
  588. let reviewHeight = $('#goodsReviewForm').find('.select_custom.sort_opt3').find('.select input[name=selHeight]').val();
  589. let reviewWeight = $('#goodsReviewForm').find('.select_custom.sort_opt4').find('.select input[name=selWeight]').val();
  590. let changFlag = false;
  591. if ($('#goodsReviewForm input[name=reviewScore]').val() != reviewScore){
  592. changFlag = true;
  593. }else if ($('#goodsReviewForm input[name=reviewOption]').val() != reviewOption){
  594. changFlag = true;
  595. }else if ($('#goodsReviewForm input[name=reviewHeight]').val() != reviewHeight){
  596. changFlag = true;
  597. }else if ($('#goodsReviewForm input[name=reviewWeight]').val() != reviewWeight){
  598. changFlag = true;
  599. }
  600. $('#goodsReviewForm input[name=reviewScore]').val(reviewScore);
  601. $('#goodsReviewForm input[name=reviewOption]').val(reviewOption);
  602. $('#goodsReviewForm input[name=reviewHeight]').val(reviewHeight);
  603. $('#goodsReviewForm input[name=reviewWeight]').val(reviewWeight);
  604. if (changFlag) fnGetList();
  605. }
  606. // 상품평 초기화
  607. var fnReviewSearchInit = function(){
  608. $('#goodsReviewForm').find('.select_custom.sort_opt1').find('.list li').eq(0).trigger('click')
  609. $('#goodsReviewForm').find('.select_custom.sort_opt2').find('.list li').eq(0).trigger('click')
  610. $('#goodsReviewForm').find('.select_custom.sort_opt3').find('.list li').eq(0).trigger('click')
  611. $('#goodsReviewForm').find('.select_custom.sort_opt4').find('.list li').eq(0).trigger('click')
  612. $('#goodsReviewForm input[name=reviewScore]').val('');
  613. $('#goodsReviewForm input[name=reviewOption]').val('');
  614. $('#goodsReviewForm input[name=reviewHeight]').val('');
  615. $('#goodsReviewForm input[name=reviewWeight]').val('');
  616. fnGetList();
  617. }
  618. $(document).ready( function() {
  619. var sort_selecter01 = new sCombo('.area_rv_all .selection .select_custom.sort_opt1');
  620. var sort_selecter02 = new sCombo('.area_rv_all .selection .select_custom.sort_opt2');
  621. var sort_selecter03 = new sCombo('.area_rv_all .selection .select_custom.sort_opt3');
  622. var sort_selecter04 = new sCombo('.area_rv_all .selection .select_custom.sort_opt4');
  623. //착용정보 통계
  624. $('.average .part_average .percent').each(function(){
  625. var reviewRatio = $(this).text();
  626. if (reviewRatio == '0%'){
  627. $(this).parents('div dl dd').find('.ratio .progbar').attr('style', 'width:0; margin-left:-8px');
  628. } else {
  629. $(this).parents('div dl dd').find('.ratio .progbar').attr('style', 'width:' + reviewRatio);
  630. }
  631. });
  632. fnGetList();
  633. });
  634. /*]]>*/
  635. </script>
  636. </html>