index.html 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  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 } ?>
  44. <th width="40">序号</th>
  45. <th width="150">品牌</th>
  46. <th width="130">新闻</th>
  47. <th width="70">分类</th>
  48. <!--<th width="120">新闻</th>-->
  49. <th width="100">姓名</th>
  50. <th width="80">IP</th>
  51. <!-- <th width="100">所在区域</th>-->
  52. <th width="80">投资额度</th>
  53. <th width="180">电话</th>
  54. <!-- <th width="80">回访时间</th> -->
  55. <th>留言内容</th>
  56. <th width="180">留言时间</th>
  57. <?php if($qx){ ?>
  58. <th width="120">操作</th>
  59. <?php } ?>
  60. </tr>
  61. </thead>
  62. <tbody>
  63. <foreach name="lists" item="vo">
  64. <tr>
  65. <?php if($qx){ ?>
  66. <!-- <td><input type="checkbox" name="msg[]" value="{$vo.id}"></td>-->
  67. <?php } ?>
  68. <td width="40"><?php echo $i=$i+1; ?></td>
  69. <td><a target="_blank" href="/b{$vo.jm_id}">{$vo.jm_title}</a></td>
  70. <?php if($vo['news_id']>0){ ?>
  71. <td><a target="_blank" href="/news{$vo.news_id}">{$vo.news_kw} </td>
  72. <?php }else{ ?>
  73. <td></td>
  74. <?php } ?>
  75. <td>{$vo.catname}</td>
  76. <td>{$vo.name}</td>
  77. <td>{$vo.ip}</td>
  78. <!-- <td>{$vo.area}</td>-->
  79. <td>{$vo.tzed}</td>
  80. <td id="m{$vo.id}" >{$vo.mobile}
  81. <?php if(!$qx and !is_numeric($vo['mobile']) ){ ?>
  82. <if condition="$fenpei.enable==1">
  83. <a class="mobile" data="{$vo.id}" href="javascript:;" > 查看</a>
  84. <span class="label label-success" title="已被查看{$vo.vid}次">{$vo.vid}</span>
  85. </if>
  86. <?php }?>
  87. </td>
  88. <!-- <td>{$vo.lxsj}</td> -->
  89. <td>{$vo.content}</td>
  90. <td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
  91. <?php if($qx){ ?>
  92. <td>
  93. <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('Message/delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
  94. <a class="btn btn-xs btn-primary" href="{:url('Message/edit1',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
  95. </td>
  96. <?php } ?>
  97. </tr>
  98. </foreach>
  99. </tbody>
  100. <?php if(!$qx){ ?>
  101. <tbody><tr>
  102. <td colspan="11">
  103. <if condition="$fenpei.enable==1">
  104. <input class="btn btn-sm btn-primary js-ajax-submit" type="submit" name="export" value="导出已查看信息">
  105. <span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;可查看条数 :<span class="label label-success" title="">{$fenpei.tiaoshu}</span></span>
  106. <span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;剩余查看点数 :<span class="label label-success" id="points" title="">{$fenpei.points}</span></span>
  107. <else/>
  108. <input class="btn btn-sm btn-primary js-ajax-submit" type="submit" name="export" value="导出信息">
  109. <span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;可查看条数 :<span class="label label-success" title="">{$fenpei.tiaoshu}</span></span>
  110. </if>
  111. </td>
  112. </tr>
  113. </tbody>
  114. <?php }?>
  115. <?php if($qx){ ?>
  116. <!-- <tr>
  117. <td colspan="10">
  118. 选择用户:
  119. <foreach name="users" item="v1">
  120. <input type="checkbox" name="members[]" value="{$v1.id}">&nbsp;{$v1.user_login}&nbsp;&nbsp;
  121. </foreach>
  122. </td>
  123. </tr>
  124. <tr>
  125. <th colspan="10">
  126. <input type="submit" class="btn btn-xs btn-primary" value="分配">
  127. </th>
  128. </tr> -->
  129. <?php } ?>
  130. </table>
  131. </form>
  132. <?php if($qx){ ?>
  133. <div class="pagination">{$lists->render()}</div>
  134. <?php } ?>
  135. </div>
  136. <script src="__STATIC__/js/admin.js"></script>
  137. <script>
  138. $(".mobile").click(function () {
  139. Wind.css('layer');
  140. var getid=$(this).attr("data");
  141. var $_this = this,
  142. $this = $($_this),
  143. href = $this.data('href'),
  144. refresh = $this.data('refresh'),
  145. msg = $this.data('msg');
  146. href = href ? href : $this.attr('href');
  147. art.dialog({
  148. title: false,
  149. icon: 'question',
  150. content: "提示" ? "查看隐藏号码需扣除一次点数,重复查看不扣点数" : '确定要删除吗?',
  151. close: function () {
  152. $_this.focus(); //关闭时让触发弹窗的元素获取焦点
  153. return true;
  154. },
  155. okVal: "确定",
  156. ok: function () {
  157. $.ajax({
  158. url:'tomobile.html',
  159. type:'get',
  160. data:{id:getid},
  161. beforeSend: function (xhr) {
  162. // $('#loading').modal('show');
  163. //加载层
  164. }
  165. ,
  166. success: function (res) {
  167. if(res.code=='1'){
  168. // $("#m"+getid).html('数据获取错误');
  169. $("#m"+getid).html(res.msg.mobile);
  170. $("#points").html(res.msg.points);
  171. console.log(res);
  172. }else{
  173. Wind.use("layer", function () {
  174. layer.msg(res.msg, {icon: 5});
  175. });
  176. }
  177. // $('#loading').modal('hide');
  178. }
  179. });
  180. },
  181. cancelVal: '关闭',
  182. cancel: true
  183. });
  184. });
  185. </script>
  186. <script>
  187. function checkall(f, t) {
  188. var t = t ? t : 1;
  189. for(var i = 0; i < f.elements.length; i++) {
  190. var e = f.elements[i];
  191. if(e.type != 'checkbox') continue;
  192. if(e.name=='msg[]'){
  193. if(t == 1) e.checked = e.checked ? false : true;
  194. if(t == 2) e.checked = true;
  195. if(t == 3) e.checked = false;
  196. }
  197. }
  198. }
  199. </script>
  200. </div>
  201. </body>
  202. </html>