index.html 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  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. <span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;可查看条数 :<span class="label label-success" title="">{$fenpei.tiaoshu}</span></span>
  108. <span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;剩余查看点数 :<span class="label label-success" id="points" title="">{$fenpei.points}</span></span>
  109. <else/>
  110. <input class="btn btn-sm btn-primary js-ajax-submit" type="submit" name="export" value="导出信息">
  111. <span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;可查看条数 :<span class="label label-success" title="">{$fenpei.tiaoshu}</span></span>
  112. </if>
  113. </td>
  114. </tr>
  115. </tbody>
  116. <?php }?>
  117. <?php if($qx){ ?>
  118. <!-- <tr>
  119. <td colspan="10">
  120. 选择用户:
  121. <foreach name="users" item="v1">
  122. <input type="checkbox" name="members[]" value="{$v1.id}">&nbsp;{$v1.user_login}&nbsp;&nbsp;
  123. </foreach>
  124. </td>
  125. </tr>
  126. <tr>
  127. <th colspan="10">
  128. <input type="submit" class="btn btn-xs btn-primary" value="分配">
  129. </th>
  130. </tr> -->
  131. <?php } ?>
  132. </table>
  133. </form>
  134. <?php if($qx){ ?>
  135. <div class="pagination">{$lists->render()}</div>
  136. <?php } ?>
  137. </div>
  138. <script src="__STATIC__/js/admin.js"></script>
  139. <script>
  140. $(".mobile").click(function () {
  141. Wind.css('layer');
  142. var getid=$(this).attr("data");
  143. var $_this = this,
  144. $this = $($_this),
  145. href = $this.data('href'),
  146. refresh = $this.data('refresh'),
  147. msg = $this.data('msg');
  148. href = href ? href : $this.attr('href');
  149. art.dialog({
  150. title: false,
  151. icon: 'question',
  152. content: "提示" ? "查看隐藏号码需扣除一次点数,重复查看不扣点数" : '确定要删除吗?',
  153. close: function () {
  154. $_this.focus(); //关闭时让触发弹窗的元素获取焦点
  155. return true;
  156. },
  157. okVal: "确定",
  158. ok: function () {
  159. $.ajax({
  160. url:'tomobile.html',
  161. type:'get',
  162. data:{id:getid},
  163. beforeSend: function (xhr) {
  164. // $('#loading').modal('show');
  165. //加载层
  166. }
  167. ,
  168. success: function (res) {
  169. if(res.code=='1'){
  170. // $("#m"+getid).html('数据获取错误');
  171. $("#m"+getid).html(res.msg.mobile);
  172. $("#points").html(res.msg.points);
  173. console.log(res);
  174. }else{
  175. Wind.use("layer", function () {
  176. layer.msg(res.msg, {icon: 5});
  177. });
  178. }
  179. // $('#loading').modal('hide');
  180. }
  181. });
  182. },
  183. cancelVal: '关闭',
  184. cancel: true
  185. });
  186. });
  187. </script>
  188. <script>
  189. function checkall(f, t) {
  190. var t = t ? t : 1;
  191. for(var i = 0; i < f.elements.length; i++) {
  192. var e = f.elements[i];
  193. if(e.type != 'checkbox') continue;
  194. if(e.name=='msg[]'){
  195. if(t == 1) e.checked = e.checked ? false : true;
  196. if(t == 2) e.checked = true;
  197. if(t == 3) e.checked = false;
  198. }
  199. }
  200. }
  201. </script>
  202. </div>
  203. </body>
  204. </html>