index.html 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. <include file="public@header" />
  2. </head>
  3. <body>
  4. <div class="wrap js-check-wrap">
  5. <ul class="nav nav-tabs">
  6. <li class="active"><a href="{:url('Message/index')}">加盟咨询</a></li>
  7. <if condition="$qx"><li><a href="{:url('Message/add')}">添加咨询</a></li></if>
  8. </ul>
  9. <if condition="$qx">
  10. <!--树选择数据-->
  11. <include file="public/category_data_tree" />
  12. <script>
  13. var setting = {
  14. data: {
  15. simpleData: {
  16. enable: true,
  17. pIdKey:'parent_id',
  18. }
  19. },
  20. callback: {
  21. onClick: onClick
  22. }
  23. };
  24. var data_list={$cate_tree};
  25. $.fn.zTree.init($("#treeUl"), setting, data_list);
  26. var treeObj = $.fn.zTree.getZTreeObj("treeUl");
  27. var nodes = treeObj.getNodes();
  28. var node = treeObj.getNodeByParam("id", {$catid});
  29. treeObj.selectNode(node);
  30. treeObj.expandNode(node);
  31. function onClick(event, treeId, treeNode, clickFlag) {
  32. window.location.href="{:url('Message/index')}"+'?catid='+treeNode.id;
  33. }
  34. </script>
  35. </if>
  36. <div style="float:left; width:80%;">
  37. <form method="post" action="{:url('Message/export')}" class="form-horizontal js-ajax-form margin-top-20">
  38. <table class="table table-hover table-bordered">
  39. <thead>
  40. <tr>
  41. <?php if($qx){ ?>
  42. <th width="40"><input type="checkbox" onclick="checkall(this.form);"></th>
  43. <?php }else{ ?>
  44. <th width="40">序号</th>
  45. <?php }?>
  46. <th width="150">品牌</th>
  47. <th width="130">新闻</th>
  48. <th width="70">分类</th>
  49. <!--<th width="120">新闻</th>-->
  50. <th width="100">姓名</th>
  51. <th width="80">IP</th>
  52. <th width="100">所在区域</th>
  53. <th width="80">投资额度</th>
  54. <th width="180">电话</th>
  55. <!-- <th width="80">回访时间</th> -->
  56. <th>留言内容</th>
  57. <th width="180">留言时间</th>
  58. <?php if($qx){ ?>
  59. <th width="120">操作</th>
  60. <?php } ?>
  61. </tr>
  62. </thead>
  63. <tbody>
  64. <foreach name="lists" item="vo">
  65. <tr>
  66. <?php if($qx){ ?>
  67. <td><input type="checkbox" name="msg[]" value="{$vo.id}"></td>
  68. <?php }else{ ?>
  69. <td width="40"><?php echo $i=$i+1; ?></td>
  70. <?php }?>
  71. <td><a target="_blank" href="/b{$vo.jm_id}">{$vo.jm_title}</a></td>
  72. <?php if($vo['news_id']>0){ ?>
  73. <td><a target="_blank" href="/news{$vo.news_id}">{$vo.news_kw} </td>
  74. <?php }else{ ?>
  75. <td></td>
  76. <?php } ?>
  77. <td>{$vo.catname}</td>
  78. <td>{$vo.name}</td>
  79. <td>{$vo.ip}</td>
  80. <td>{$vo.area}</td>
  81. <td>{$vo.tzed}</td>
  82. <td id="m{$vo.id}" >{$vo.mobile}
  83. <?php if(!$qx){ ?>
  84. <if condition="$fenpei.enable==1">
  85. <a class="mobile" data="{$vo.id}" href="javascript:;" > 查看</a>
  86. <span class="label label-success" title="已被查看{$vo.vid}次">{$vo.vid}</span>
  87. </if>
  88. <?php }?>
  89. </td>
  90. <!-- <td>{$vo.lxsj}</td> -->
  91. <td>{$vo.content}</td>
  92. <td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
  93. <?php if($qx){ ?>
  94. <td>
  95. <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('Message/delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
  96. <a class="btn btn-xs btn-primary" href="{:url('Message/edit1',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
  97. </td>
  98. <?php } ?>
  99. </tr>
  100. </foreach>
  101. </tbody>
  102. <?php if(!$qx){ ?>
  103. <tbody><tr>
  104. <td colspan="11">
  105. <if condition="$fenpei.enable==1">
  106. <input class="btn btn-sm btn-primary js-ajax-submit" type="submit" name="export" value="导出已查看信息">
  107. <else/>
  108. <input class="btn btn-sm btn-primary js-ajax-submit" type="submit" name="export" value="导出信息">
  109. </if>
  110. </td>
  111. </tr>
  112. </tbody>
  113. <?php }?>
  114. <?php if($qx){ ?>
  115. <!-- <tr>
  116. <td colspan="10">
  117. 选择用户:
  118. <foreach name="users" item="v1">
  119. <input type="checkbox" name="members[]" value="{$v1.id}">&nbsp;{$v1.user_login}&nbsp;&nbsp;
  120. </foreach>
  121. </td>
  122. </tr>
  123. <tr>
  124. <th colspan="10">
  125. <input type="submit" class="btn btn-xs btn-primary" value="分配">
  126. </th>
  127. </tr> -->
  128. <?php } ?>
  129. </table>
  130. </form>
  131. <?php if($qx){ ?>
  132. <div class="pagination">{$lists->render()}</div>
  133. <?php } ?>
  134. </div>
  135. <script src="__STATIC__/js/admin.js"></script>
  136. <script>
  137. $(".mobile").click(function () {
  138. Wind.css('layer');
  139. var getid=$(this).attr("data");
  140. var $_this = this,
  141. $this = $($_this),
  142. href = $this.data('href'),
  143. refresh = $this.data('refresh'),
  144. msg = $this.data('msg');
  145. href = href ? href : $this.attr('href');
  146. art.dialog({
  147. title: false,
  148. icon: 'question',
  149. content: "提示" ? "查看隐藏号码需扣除一次点数,重复查看不扣点数" : '确定要删除吗?',
  150. close: function () {
  151. $_this.focus(); //关闭时让触发弹窗的元素获取焦点
  152. return true;
  153. },
  154. okVal: "确定",
  155. ok: function () {
  156. $.ajax({
  157. url:'tomobile.html',
  158. type:'get',
  159. data:{id:getid},
  160. beforeSend: function (xhr) {
  161. // $('#loading').modal('show');
  162. //加载层
  163. }
  164. ,
  165. success: function (res) {
  166. if(res.code=='1'){
  167. // $("#m"+getid).html('数据获取错误');
  168. $("#m"+getid).html(res.msg);
  169. console.log(res);
  170. }else{
  171. Wind.use("layer", function () {
  172. layer.msg(res.msg, {icon: 5});
  173. });
  174. }
  175. // $('#loading').modal('hide');
  176. }
  177. });
  178. },
  179. cancelVal: '关闭',
  180. cancel: true
  181. });
  182. });
  183. </script>
  184. <script>
  185. function checkall(f, t) {
  186. var t = t ? t : 1;
  187. for(var i = 0; i < f.elements.length; i++) {
  188. var e = f.elements[i];
  189. if(e.type != 'checkbox') continue;
  190. if(e.name=='msg[]'){
  191. if(t == 1) e.checked = e.checked ? false : true;
  192. if(t == 2) e.checked = true;
  193. if(t == 3) e.checked = false;
  194. }
  195. }
  196. }
  197. </script>
  198. </div>
  199. </body>
  200. </html>