暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

comment_index.htm 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. {include file="public/layout" /}
  2. <body class="bodystyle" style="cursor: default; -moz-user-select: inherit;min-width:auto;">
  3. <div id="append_parent"></div>
  4. <div id="ajaxwaitid"></div>
  5. {include file="shop/left" /}
  6. <!-- <div class="page {empty name='$web_shopcomment_switch'}on-off_show{/empty}"> -->
  7. <div class="page min-hg-c-10">
  8. <!--遮罩给上面的class + on-off_show-->
  9. <!-- <div class="on-off_shade">
  10. <div class="on-off_shadeCon">
  11. <span>目前还没有开启商品评价功能,<a href="javascript:void(0);" data-url="{:url('ShopComment/ajax_open_close')}" data-value="{$web_navigation_switch}" onclick="ajax_open_close(this);">我要开启</a></span>
  12. </div>
  13. </div> -->
  14. <!-- <div class="fixed-bar">
  15. <div class="item-title">
  16. <a class="back_xin" href="javascript:history.back();" title="返回"><i class="iconfont e-fanhui"></i></a>
  17. <div class="subject">
  18. <h3>评价列表</h3>
  19. <h5></h5>
  20. </div>
  21. </div>
  22. </div> -->
  23. <div class="flexigrid">
  24. <div class="mDiv pt0">
  25. <div class="ftitle">
  26. <div class="fbutton">
  27. <a href="{:url('ShopComment/comment_add')}" >
  28. <div class="add" title="创建评价">
  29. <span><i class="layui-icon layui-icon-addition"></i>创建评价</span>
  30. </div>
  31. </a>
  32. </div>
  33. </div>
  34. <form class="navbar-form form-inline" id="postForm" action="{:url('ShopComment/comment_index')}" method="get" onsubmit="layer_loading('正在处理');">
  35. {$searchform.hidden|default=''}
  36. <div class="sDiv">
  37. <div class="sDiv2">
  38. <input type="text" size="50" name="order_code" value="{$Request.param.order_code}" class="qsbox" style="width: 200px;" placeholder="搜索订单号..."> <input type="submit" class="btn" value="搜索"> <i class="iconfont e-sousuo"></i>
  39. </div>
  40. <!-- {notempty name='$web_shopcomment_switch'}
  41. &nbsp;<a href="javascript:void(0);" data-url="{:url('ShopComment/ajax_open_close')}" data-value="{$web_shopcomment_switch}" onclick="ajax_open_close(this);">关闭评价</a>
  42. {/notempty} -->
  43. </div>
  44. </form>
  45. </div>
  46. <div class="hDiv">
  47. <div class="hDivBox">
  48. <table cellspacing="0" cellpadding="0" style="width: 100%">
  49. <thead>
  50. <tr>
  51. <th class="sign w40" axis="col0">
  52. <div class="tc"><input type="checkbox" autocomplete="off" class="checkAll"></div>
  53. </th>
  54. <th align="center" abbr="article_title" axis="col3" class="w250">
  55. <div class="text-l10 ">商品信息</div>
  56. </th>
  57. <th abbr="article_title" axis="col3" class="">
  58. <div style="text-align: left; padding-left: 10px;" class="">评价内容</div>
  59. </th>
  60. <th abbr="" axis="col6" class="w80">
  61. <div class="tc">来源</div>
  62. </th>
  63. <th abbr="" axis="col6" class="w120">
  64. <div class="tc">评价评分</div>
  65. </th>
  66. <th abbr="" axis="col6" class="w120">
  67. <div class="tc">用户</div>
  68. </th>
  69. <th abbr="" axis="col6" class="w80">
  70. <div class="tc">审核</div>
  71. </th>
  72. <th abbr="article_time" axis="col6" class="w160">
  73. <div class="tc">评价时间</div>
  74. </th>
  75. <th axis="col1" class="w150">
  76. <div class="tc">操作</div>
  77. </th>
  78. </tr>
  79. </thead>
  80. </table>
  81. </div>
  82. </div>
  83. <div class="bDiv" style="height: auto;">
  84. <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
  85. <table style="width: 100%">
  86. <tbody>
  87. {empty name="Comment"}
  88. <tr>
  89. <td class="no-data" align="center" axis="col0" colspan="50">
  90. <i class="fa fa-exclamation-circle"></i>没有符合条件的记录
  91. </td>
  92. </tr>
  93. {else/}
  94. {volist name="Comment" id="vo"}
  95. <tr>
  96. <td class="sign">
  97. <div class="w40 tc"> <input type="checkbox" autocomplete="off" name="ids[]" value="{$vo.comment_id}"> </div>
  98. </td>
  99. <td class="">
  100. <div class="w250 flex-row">
  101. <a href="{$vo.arcurl}" target="_blank"><img width="60" height="60" src="{$vo.product_img}"></a>
  102. <div>
  103. <a href="{$vo.arcurl}" target="_blank" class="ml5">{$vo.product_name}</a>
  104. </div>
  105. </div>
  106. </td>
  107. <td class="" style="width: 100%;">
  108. <div class="tl text-l10" > {$vo.content} </div>
  109. </td>
  110. <td class=""> <div class="w80 tc"> {eq name="$vo.systemComment" value="1"}后台{else/}客户{/eq} </div> </td>
  111. <td class=""> <div class="w120 tc"> <i class="z_comment-star z_star{$vo.total_score}"></i> </div> </td>
  112. <td class="">
  113. <div class="w120 tc">
  114. <a href="javascript:void(0);" data-href="{:url('Member/users_edit', array('id' => $vo['users_id']))}" onclick="openFullframe(this, '用户资料', '100%', '100%');"> <img style="width: 30px;height: 30px;margin:0px 5px!important;float: unset;margin: auto;border-radius: 100%;" src="{$vo.head_pic}" />{$vo.nickname} </a>
  115. </div>
  116. </td>
  117. <td class="">
  118. <div class="w80 tc">
  119. {eq name="$vo['is_show']" value='1'}
  120. <span class="yes" onClick="changeTableVal('shop_order_comment', 'comment_id', '{$vo.comment_id}', 'is_show', this);"><i class="fa fa-check-circle"></i>是</span>
  121. {else /}
  122. <span class="no" onClick="changeTableVal('shop_order_comment', 'comment_id', '{$vo.comment_id}', 'is_show', this);"><i class="fa fa-ban"></i>否</span>
  123. {/eq}
  124. </div>
  125. </td>
  126. <td class=""> <div class="w160 tc"> {$vo.add_time|MyDate='Y-m-d H:i:s',###} </div> </td>
  127. <td class="operation">
  128. <div class="w150 tc">
  129. <a href="{:url('ShopComment/comment_details', array('comment_id' => $vo['comment_id']))}" class="btn blue">详情</a>
  130. <i></i>
  131. <!-- <a class="btn blue">显示</a> -->
  132. <a href="javascript:void(0);" data-id="{$vo.comment_id}" data-admin_reply="{$vo.admin_reply.adminReply}" data-reply_time="{$vo.admin_reply.replyTime}" onclick="commentAdminReply(this);" class="btn blue">回复{notempty name="$vo.admin_reply.adminReply"}<em class="num">!</em>{/notempty}</a>
  133. <i></i>
  134. <a href="javascript:void(0);" data-url="{:url('ShopComment/comment_del')}" data-id="{$vo.comment_id}" onclick="delfun(this);" class="btn blue">删除</a>
  135. </div>
  136. </td>
  137. </tr>
  138. {/volist}
  139. {/empty}
  140. </tbody>
  141. </table>
  142. </div>
  143. <div class="iDiv" style="display: none;"></div>
  144. </div>
  145. {notempty name="Comment"}
  146. <div class="tDiv">
  147. <div class="tDiv2">
  148. <div class="fbutton checkboxall">
  149. <input type="checkbox" autocomplete="off" class="checkAll">
  150. </div>
  151. <div class="fbutton">
  152. <a onclick="batch_del(this, 'ids');" data-url="{:url('ShopComment/comment_del')}" class="layui-btn layui-btn-primary"><span>批量删除</span></a>
  153. </div>
  154. {include file="public/page" /}
  155. </div>
  156. <div style="clear:both"></div>
  157. </div>
  158. {/notempty}
  159. </div>
  160. </div>
  161. <script type="text/javascript">
  162. try{
  163. if (typeof(eval('is_conceal_1649209614'))=="function" && is_conceal_1649209614()){
  164. $(".page").css("margin-left","");
  165. $(".page").css("min-width","");
  166. }else{
  167. $(".page").css("margin-left","100px");
  168. $(".page").css("min-width","auto");
  169. }
  170. }catch(e){}
  171. $(function(){
  172. $('input[name*=ids]').click(function(){
  173. if ($('input[name*=ids]').length == $('input[name*=ids]:checked').length) {
  174. $('.checkAll').prop('checked','checked');
  175. } else {
  176. $('.checkAll').prop('checked', false);
  177. }
  178. });
  179. $('input[type=checkbox].checkAll').click(function(){
  180. $('input[type=checkbox]').prop('checked',this.checked);
  181. });
  182. });
  183. $(document).ready(function(){
  184. // 表格行点击选中切换
  185. $('#flexigrid > table>tbody >tr').click(function(){
  186. $(this).toggleClass('trSelected');
  187. });
  188. // 点击刷新数据
  189. $('.fa-refresh').click(function(){
  190. location.href = location.href;
  191. });
  192. });
  193. function ajax_open_close(obj, inc_type, name,value) {
  194. $.ajax({
  195. type : 'post',
  196. url : $(obj).attr('data-url'),
  197. data : {value:$(obj).attr('data-value'), _ajax:1},
  198. dataType : 'json',
  199. success : function(res){
  200. if(res.code == 1){
  201. window.location.reload();
  202. }else{
  203. showErrorMsg(res.msg);
  204. }
  205. },
  206. error: function(e){
  207. showErrorAlert(e.responseText);
  208. }
  209. })
  210. }
  211. // 商家快捷回复
  212. function commentAdminReply(obj) {
  213. var commentID = $(obj).attr('data-id') ? $(obj).attr('data-id') : 0;
  214. var reply_time = $(obj).attr('data-reply_time') ? $(obj).attr('data-reply_time') : 0;
  215. var admin_reply = $(obj).attr('data-admin_reply') ? $(obj).attr('data-admin_reply') : '';
  216. layer.prompt({
  217. formType: 2,
  218. shade: layer_shade,
  219. value: admin_reply,
  220. title: '请填写商家回复',
  221. btnAlign:'r',
  222. closeBtn: 3,
  223. id: 'adminReply',
  224. btn: ['确定', '取消'],
  225. area: ['300px', '100px'],
  226. success: function(layero, index) {
  227. $(".layui-layer-content").css('text-align', 'left');
  228. // 回复框字数限制
  229. $("#adminReply").find('textarea').attr('maxlength', '280');
  230. // 回复框标题
  231. $("#adminReply").prepend(msg);
  232. // 回复框更新时间
  233. if (parseInt(reply_time) !== 0) {
  234. var msg = '<br/><span style="color: #999; font-size: 12px;">最后更新:'+reply_time+'</span>';
  235. $("#adminReply").append(msg);
  236. }
  237. }
  238. }, function(adminReply, index, elem) {
  239. // 商家快捷回复
  240. addCommentAdminReply(commentID, adminReply);
  241. layer.close(index);
  242. });
  243. }
  244. // 商家快捷回复
  245. function addCommentAdminReply(commentID, adminReply) {
  246. $.ajax({
  247. type: 'post',
  248. url : "{:url('ShopComment/comment_admin_reply', ['_ajax'=>1])}",
  249. data: {comment_id: commentID, admin_reply: adminReply},
  250. dataType: 'json',
  251. success : function(res) {
  252. if (1 === parseInt(res.code)) {
  253. window.location.reload();
  254. } else {
  255. showErrorMsg(res.msg);
  256. }
  257. },
  258. error: function(e) {
  259. showErrorAlert(e.responseText);
  260. }
  261. });
  262. }
  263. </script>
  264. {include file="public/footer" /}