index.html 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. {include file="public/header" /}
  2. <div class="page">
  3. <div class="fixed-bar">
  4. <div class="item-title">
  5. <div class="subject">
  6. <h3>{$Think.lang.ds_mall_consult}</h3>
  7. <h5></h5>
  8. </div>
  9. {include file="public/admin_items" /}
  10. </div>
  11. </div>
  12. <form method="get" name="formSearch">
  13. <div class="ds-search-form">
  14. <dl>
  15. <dt>{$Think.lang.ds_member_name}</dt>
  16. <dd><input class="txt" type="text" name="member_name" id="member_name" value="{$Request.get.member_name}" /></dd>
  17. </dl>
  18. <dl>
  19. <dt>{$Think.lang.mallconsulttype_id}</dt>
  20. <dd>
  21. <select name="mctid">
  22. <option value="0">{$Think.lang.ds_all}</option>
  23. {notempty name="type_list"}
  24. {foreach name="type_list" item="val"}
  25. <option {present name="mctid"}{if $mctid == $val.mallconsulttype_id}selected="selected"{/if} {/present}value="{$val.mallconsulttype_id}">{$val.mallconsulttype_name}</option>
  26. {/foreach}
  27. {/notempty}
  28. </select>
  29. </dd>
  30. </dl>
  31. <div class="btn_group">
  32. <a href="javascript:document.formSearch.submit();" class="btn " title="{$Think.lang.ds_query}">{$Think.lang.ds_query}</a>
  33. <a href="{:url('Mallconsult/index')}" class="btn btn-default" title="{$Think.lang.ds_cancel}">{$Think.lang.ds_cancel}</a>
  34. </div>
  35. </div>
  36. </form>
  37. <table class="ds-default-table">
  38. <thead>
  39. <tr class="thead">
  40. <th class="w24"></th>
  41. <th class="align-center">{$Think.lang.mallconsult_content}</th>
  42. <th class="w96 align-center">{$Think.lang.ds_member_name}</th>
  43. <th class="w156 align-center">{$Think.lang.mallconsult_addtime}</th>
  44. <th class="w96 align-center">{$Think.lang.mallconsult_isreply}</th>
  45. <th class="w120 align-center">{$Think.lang.ds_handle} </th>
  46. </tr>
  47. </thead>
  48. <tbody>
  49. {notempty name="consult_list"}
  50. {foreach name="consult_list" item="val"}
  51. <tr class="space">
  52. <td class="w24"><input type="checkbox" class="checkitem" name="id[]" value="{$val.mallconsult_id}" /></td>
  53. <td>{$val.mallconsult_content}</td>
  54. <td class="align-center">{$val.member_name}</td>
  55. <td class="align-center">{$val.mallconsult_addtime|date="Y-m-d H:i:s"}</td>
  56. <td class="align-center">{$state[$val.mallconsult_isreply]}</td>
  57. <td>
  58. <a href="javascript:dsLayerOpen('{:url('Mallconsult/consult_reply',['id'=>$val.mallconsult_id])}','{$Think.lang.ds_handle}')" class="dsui-btn-edit"><i class="iconfont"></i>{if $val.mallconsult_isreply == 0}{$Think.lang.ds_reply}{else }{$Think.lang.ds_edit}{/if}</a>
  59. <a href="javascript:void(0)" onclick="submit_delete({$val.mallconsult_id})" class="dsui-btn-del"><i class="iconfont"></i>{$Think.lang.ds_del}</a>
  60. </td>
  61. </tr>
  62. {/foreach}
  63. {else}
  64. <tr class="no_data">
  65. <td colspan="20">{$Think.lang.ds_no_record}</td>
  66. </tr>
  67. {/notempty}
  68. </tbody>
  69. <tfoot>
  70. {notempty name="consult_list"}
  71. <tr class="tfoot">
  72. <td><input type="checkbox" class="checkall" id="checkallBottom"></td>
  73. <td colspan="16"><label for="checkallBottom">{$Think.lang.ds_select_all}</label>
  74. &nbsp;&nbsp;<a href="JavaScript:void(0);" class="btn btn-small" onclick="submit_delete_batch()"><span>{$Think.lang.ds_del}</span></a>
  75. </td>
  76. </tr>
  77. {/notempty}
  78. </tfoot>
  79. </table>
  80. {$show_page|raw}
  81. </div>
  82. <script type="text/javascript">
  83. function checkForm(){
  84. flag = false;
  85. $.each($("input[name='consult_id[]']"),function(i,n){
  86. if($(n).prop('checked')){
  87. flag = true;
  88. return false;
  89. }
  90. });
  91. if(!flag)layer.alert('{$Think.lang.consulting_del_choose}');
  92. return flag;
  93. }
  94. function submit_delete(ids_str){
  95. _uri = ADMINSITEURL+"/Mallconsult/del_consult.html?mallconsult_id=" + ids_str;
  96. dsLayerConfirm(_uri,'{$Think.lang.ds_ensure_del}');
  97. }
  98. </script>
  99. <script>
  100. (function(){
  101. $('.w').each(function(i){
  102. var o = document.getElementById("hutia_"+i);
  103. var s = o.innerHTML;
  104. var p = document.createElement("span");
  105. var n = document.createElement("a");
  106. p.innerHTML = s.substring(0,50);
  107. n.innerHTML = s.length > 50 ? "{$Think.lang.consulting_index_unfold}" : "";
  108. n.href = "###";
  109. n.onclick = function(){
  110. if (n.innerHTML == "{$Think.lang.consulting_index_unfold}"){
  111. n.innerHTML = "{$Think.lang.consulting_index_retract}";
  112. p.innerHTML = s;
  113. }else{
  114. n.innerHTML = "{$Think.lang.consulting_index_unfold}";
  115. p.innerHTML = s.substring(0,50);
  116. }
  117. }
  118. o.innerHTML = "";
  119. o.appendChild(p);
  120. o.appendChild(n);
  121. });
  122. })();
  123. (function(){
  124. $('.d').each(function(i){
  125. var o = document.getElementById("hutia2_"+i);
  126. var s = o.innerHTML;
  127. var p = document.createElement("span");
  128. var n = document.createElement("a");
  129. p.innerHTML = s.substring(0,50);
  130. n.innerHTML = s.length > 50 ? "{$Think.lang.consulting_index_unfold}" : "";
  131. n.href = "###";
  132. n.onclick = function(){
  133. if (n.innerHTML == "{$Think.lang.consulting_index_unfold}"){
  134. n.innerHTML = "{$Think.lang.consulting_index_retract}";
  135. p.innerHTML = s;
  136. }else{
  137. n.innerHTML = "{$Think.lang.consulting_index_unfold}";
  138. p.innerHTML = s.substring(0,50);
  139. }
  140. }
  141. o.innerHTML = "";
  142. o.appendChild(p);
  143. o.appendChild(n);
  144. });
  145. })();
  146. </script>