index.html 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. {extend name="default/base/base_seller" /}
  2. {block name="seller_main"}
  3. <form method="get">
  4. <table class="search-form">
  5. <tr>
  6. <td>&nbsp;</td>
  7. <th class="w110">{$Think.lang.member_evaluation_goodsname}</th>
  8. <td class="w160"><input type="text" class="text w150" name="goods_name" value="{$Request.param.goods_name}"/></td>
  9. <th class="w110">{$Think.lang.member_evaluation_frommembertitle}</th>
  10. <td class="w160"><input type="text" class="text w150" name="member_name" value="{$Request.param.member_name}"/></td>
  11. <td class="w70 tc">
  12. <input type="submit" class="submit" value="{$Think.lang.ds_search}" />
  13. </td>
  14. </tr>
  15. </table>
  16. </form>
  17. <table class="dssc-default-table">
  18. <thead>
  19. <tr>
  20. <th class="w10"></th>
  21. <th class="tl">{$Think.lang.evaluation_information}</th>
  22. <th class="w90"> {$Think.lang.ds_search}</th>
  23. </tr>
  24. </thead>
  25. <tbody>
  26. {notempty name="goodsevallist"}
  27. {foreach name="goodsevallist" item="v" key="k" }
  28. <tr>
  29. <th></th>
  30. <th>
  31. <span class="goods-name"><a target="_blank" href=" {:url('Goods/index',['goods_id'=>$v.geval_goodsid])}">{$v.geval_goodsname}</a></span>
  32. <span>{$Think.lang.product_evaluation}:<em class="raty" data-score="{$v.geval_scores}"></em></span>
  33. <span>{$Think.lang.member_evaluation_frommembertitle}:{$v.geval_frommembername} <time>[{$v.geval_addtime|date="Y-m-d H:i:s"}]</time></span>
  34. </th>
  35. <th></th>
  36. </tr>
  37. <tr>
  38. <td rowspan="2"></td>
  39. <td class="tl">
  40. <strong>{$Think.lang.member_evaluation_content}:</strong>
  41. <span>{$v.geval_content}</span>
  42. </td>
  43. <td rowspan="2" class="dscs-table-handle vt">
  44. <span><a dstype="btn_show_explain_dialog" data-geval-id="{$v.geval_id}" data-geval-content="{$v.geval_content}" href="javascript:;" class="btn-acidblue">
  45. <i class="iconfont">&#xe71b;</i>
  46. <p>{$Think.lang.member_evaluation_explain}</p>
  47. </a></span>
  48. </td>
  49. </tr>
  50. <tr class="bd-line" >
  51. <td class="tl" colspan="20">
  52. <div {if empty($v['geval_explain'])}style="display:none;"{/if}>
  53. <strong>{$Think.lang.explain_contents}:</strong>
  54. <span dstype="explain">{$v.geval_explain}</span>
  55. </div>
  56. </td>
  57. </tr>
  58. {/foreach}
  59. {else /}
  60. <tr>
  61. <td colspan="20" class="norecord"><div class="warning-option"><i class="iconfont">&#xe64c;</i><span>{$Think.lang.no_record}</span></div></td>
  62. </tr>
  63. {/notempty}
  64. </tbody>
  65. <tfoot>
  66. <tr>
  67. <td colspan="20">{$show_page|raw}</td>
  68. </tr>
  69. </tfoot>
  70. </table>
  71. <div id="dialog_explain" style="display:none;">
  72. <div class="eject_con">
  73. <div id="warning" class="alert alert-error"></div>
  74. <form id="explain_form">
  75. <input type="hidden" id="geval_id">
  76. <dl>
  77. <dt>{$Think.lang.member_evaluation_content}:</dt>
  78. <dd id="geval_content"></dd>
  79. </dl>
  80. <dl>
  81. <dt><i class="required">*</i>{$Think.lang.explain_contents}:</dt>
  82. <dd>
  83. <textarea id="geval_explain" name="geval_explain" cols="30" rows="10"></textarea>
  84. </dd>
  85. </dl>
  86. <div class="bottom">
  87. <a href="javascript:void(0);" id="btn_explain_submit" class="submit">{$Think.lang.ds_ok}</a>
  88. </div>
  89. </form>
  90. </div>
  91. </div>
  92. <script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/js/jquery.raty/jquery.raty.min.js"></script>
  93. <script type="text/javascript">
  94. $(document).ready(function () {
  95. $('.raty').raty({
  96. path: "{$Think.PLUGINS_SITE_ROOT}/js/jquery.raty/img",
  97. readOnly: true,
  98. score: function () {
  99. return $(this).attr('data-score');
  100. }
  101. });
  102. var $item = {};
  103. $('[dstype="btn_show_explain_dialog"]').on('click', function () {
  104. $item = $(this).parents('tr').next('tr').find('[dstype="explain"]');
  105. var geval_id = $(this).attr('data-geval-id');
  106. var geval_content = $(this).attr('data-geval-content');
  107. $('#geval_id').val(geval_id);
  108. $('#geval_content').text(geval_content);
  109. $('#geval_explain').val('');
  110. $('#dialog_explain').ds_show_dialog({title: '{$Think.lang.explain_evaluation}'});
  111. });
  112. $('#btn_explain_submit').on('click', function () {
  113. if ($('#explain_form').valid()) {
  114. var geval_id = $('#geval_id').val();
  115. var geval_explain = $('#geval_explain').val();
  116. $.post(" {:url('Sellerevaluate/explain_save')}", {
  117. geval_id: geval_id,
  118. geval_explain: geval_explain
  119. }, function (data) {
  120. if (data.result) {
  121. $('#dialog_explain').hide();
  122. $item.text(geval_explain);
  123. $item.parent().show();
  124. layer.msg(data.message);
  125. } else {
  126. layer.msg(data.message);
  127. }
  128. }, 'json');
  129. }
  130. });
  131. $('#explain_form').validate({
  132. errorLabelContainer: $('#warning'),
  133. invalidHandler: function (form, validator) {
  134. var errors = validator.numberOfInvalids();
  135. if (errors)
  136. {
  137. $('#warning').show();
  138. } else
  139. {
  140. $('#warning').hide();
  141. }
  142. },
  143. rules: {
  144. geval_explain: {
  145. required: true
  146. }
  147. },
  148. messages: {
  149. geval_explain: {
  150. required: '<i class="iconfont">&#xe64c;</i>'
  151. }
  152. }
  153. });
  154. });
  155. </script>
  156. {/block}