index.blade.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. @extends('admin/layout')
  2. <style>
  3. .btn-danger, .btn-primary, .btn-info {
  4. background: #2a94e0 !important;
  5. border-color: #2a94e0 !important;
  6. }
  7. .table-striped > tbody > tr:nth-of-type(odd) {
  8. background: #f8f8f8 !important;
  9. }
  10. .table-striped > tbody > tr .btn {
  11. background: none !important;
  12. }
  13. .table-striped > tbody > tr td {
  14. font-size: 14px !important;
  15. }
  16. .table-striped > tbody > tr:hover {
  17. background: #ffebd8 !important;
  18. }
  19. .table-striped > tbody > tr:hover .btn {
  20. background: #2a94e0 !important;
  21. color: #fff !important;
  22. }
  23. .table-striped > tbody > tr:hover .btn .glyphicon {
  24. color: #fff !important;
  25. }
  26. </style>
  27. @section('content')
  28. <body class="gray-bg">
  29. <div class="wrapper wrapper-content animated fadeInRight">
  30. <div class="row">
  31. <div class="col-sm-12">
  32. <div class="ibox float-e-margins">
  33. <div class="ibox-content">
  34. <form class="row" id="searchForm" onsubmit="units.search();return false;">
  35. <div class="col-md-6 pull-right">
  36. <div class="input-group">
  37. <select name="status" id="status" title="" class="form-control"
  38. style="width: 150px;float: right" onchange="tips.selectPage();">
  39. <option value="">请选择项目状态</option>
  40. @foreach(\App\Http\Models\Site::STATUS_MAP as $key=>$item)
  41. <option value="{{$key}}">{{$item}}</option>
  42. @endforeach
  43. </select>
  44. <select name="traffic_number" id="traffic_number" title="" class="form-control"
  45. style="width: 150px;float: right" onchange="tips.selectPage();">
  46. <option value="">请选择流量范围</option>
  47. <option value="0,100">100以下</option>
  48. <option value="100,200">100-200</option>
  49. <option value="200,500">200-500</option>
  50. <option value="500,1000">500-1000</option>
  51. <option value="1000,1000000">1000以上</option>
  52. </select>
  53. <select name="inquire_number" id="inquire_number" title="" class="form-control"
  54. style="width: 150px;float: right" onchange="tips.selectPage();">
  55. <option value="">请选择询盘范围</option>
  56. <option value="0,10">10以下</option>
  57. <option value="10,20">10-20</option>
  58. <option value="20,50">20-50</option>
  59. <option value="50,100">50-100</option>
  60. <option value="100,1000000">100以上</option>
  61. </select>
  62. <input type="text" placeholder="请输入域名或项目名称" class="input-md form-control"
  63. name="keyword"
  64. id="keyword" style="width: 300px;float: right">
  65. <span class="input-group-btn">
  66. <button type="button" class="btn btn-md btn-primary"
  67. onclick="units.search()"> 搜索</button>
  68. <button type="button" class="btn btn-md btn-primary" style="margin-left: 10px"
  69. name="btnReset"> 重置</button> </span>
  70. </div>
  71. </div>
  72. {{--<div class="col-sm-2 pull-right" style="text-align: right">--}}
  73. {{--<button type="button" class="btn btn-md btn-primary" id="addBtn"> 添加</button>--}}
  74. {{--</div>--}}
  75. </form>
  76. <hr>
  77. <div class="table-responsive">
  78. <table id="table" class="table table-condensed" data-mobile-responsive="true"></table>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. </body>
  86. @endsection
  87. @section('footer')
  88. <script>
  89. var units = {
  90. search: function () {
  91. tips.selectPage();
  92. // var obj = {
  93. // pageNumber: 1,
  94. // size: 1,
  95. // query: {pageNumber: 1, size: 5}
  96. // };
  97. // $('#table').bootstrapTable('refresh');
  98. // $('#table').bootstrapTable('selectPage', 1);
  99. },
  100. getIdsBySelections: function () {
  101. var selections = $("#table").bootstrapTable('getSelections');
  102. var ids = [];
  103. $.each(selections, function (inx, val) {
  104. ids.push(val.id);
  105. });
  106. return ids;
  107. },
  108. edit: function (id) {
  109. var title = '添加';
  110. if (id > 0) {
  111. title = '编辑';
  112. }
  113. layer.open({
  114. type: 2,
  115. content: ['/admin/sites/' + id],
  116. area: ['100%', '100%'],
  117. title: title
  118. });
  119. },
  120. // detail: function (id, title) {
  121. //
  122. // layer.open({
  123. // type: 2,
  124. // content: ['/admin/sites/' + id + '/overview'],
  125. // area: ['100%', '100%'],
  126. // title: '<span style="font-weight: bold;font-size: 16px">' + title + '</span>',
  127. // closeBtn: 1
  128. // });
  129. // },
  130. openDetail: function (id, title) {
  131. // parent.layerLoad();
  132. tips.page('/admin/htPlant/' + id + '/overview', title);
  133. },
  134. payment: function (id) {
  135. layer.open({
  136. type: 2,
  137. content: ['/admin/site/payment/' + id],
  138. area: ['80%', '100%'],
  139. title: '款项节点'
  140. });
  141. },
  142. customer: function (id) {
  143. layer.open({
  144. type: 2,
  145. content: ['/admin/site/' + id + '/customer'],
  146. area: ['100%', '100%'],
  147. title: '客户'
  148. });
  149. },
  150. process: function (id) {
  151. layer.open({
  152. type: 2,
  153. content: ['/admin/process/' + id],
  154. area: ['90%', '100%'],
  155. title: '流程'
  156. });
  157. },
  158. webmaster: function () {
  159. window.open('http://rank.yinqingli.cn/admincp/webmaster/oauth');
  160. },
  161. report: function (identify) {
  162. window.open('http://rank.yinqingli.cn/webmaster/report?projectId=' + identify);
  163. },
  164. afresh: function (identify) {
  165. window.open('http://rank.yinqingli.cn/webmaster/report?projectId=' + identify);
  166. }
  167. };
  168. // 月流量 月询盘 月排名 月软文 项目经理 项目进度
  169. var config = {};
  170. config.url = '/admin/htPlant/index';
  171. config.pageSize = 500;
  172. config.columns = [ //字段
  173. // {checkbox: true},
  174. {
  175. title: '序号', align: 'center', formatter: function (value, item, index) {
  176. return index + 1;
  177. },
  178. width: '10px'
  179. },
  180. {title: '项目状态', field: 'statusTitle', align: 'center', sortable: true, width: '30px'},
  181. {title: '项目名称', field: 'cn_title', align: 'center',width:'200px'},
  182. {title: '域名', field: 'domain', align: 'center'},
  183. {title: '月流量', field: 'traffic', align: 'center', sortable: true},
  184. {title: '询盘总数', field: 'inquire', align: 'center', sortable: true},
  185. {title: '月排名', field: 'top10', align: 'center', sortable: true},
  186. {title: '软文总数', field: 'articles_count', align: 'center'},
  187. {title: '外链条目总数', field: 'link_details_count', align: 'center'},
  188. {title: '外链域总数', field: 'link_details_num', align: 'center'},
  189. {title: '项目经理', field: 'managers_title', align: 'center'},
  190. {title: '下单时间', field: 'order_at', align: 'center', sortable: true},
  191. {title: '上线时间', field: 'online_date', align: 'center'},
  192. {title: '优化时长', field: 'seo_time', align: 'center'},
  193. {title: '达标时长', field: 'reach_time', align: 'center'},
  194. {title: '行业', field: 'business.title', align: 'center'},
  195. {title: '关键词总数', field: 'keyword_num', align: 'center'},
  196. {title: '页面数', field: 'web_count', align: 'center'},
  197. {title: '站内锚文本总数', field: '', align: 'center'},
  198. // {
  199. // title: '操作', field: 'id', align: 'center',
  200. // formatter: function (value, row) {
  201. //
  202. //
  203. // var str = '<button onclick="units.openDetail(' + value + ',\'' + row.cn_title + '\')" class="btn btn-xs"><span class="glyphicon glyphicon-menu-hamburger"></span>详情</button><br>';
  204. //
  205. // if (row.is_google_bid) {
  206. // if (row.bid_status) {
  207. // str += '<span class="glyphicon glyphicon-fire" style="color:red">PPC</span>'
  208. // } else {
  209. // str += '<span class="glyphicon glyphicon-fire" style="color:#C0C0C0">PPC</span>'
  210. // }
  211. // }
  212. //
  213. // return str;
  214. //
  215. // }
  216. // }
  217. ];
  218. tips.bootstrapTable(config);
  219. $(document).on('click', '#allotStaff', function () {
  220. var ids = units.getIdsBySelections();
  221. if (ids.length === 0) {
  222. layer.alert('请先选择您所要操作的对象', {icon: 0});
  223. return;
  224. }
  225. var siteIds = '?';
  226. $.each(ids, function (inx, val) {
  227. siteIds += 'siteIds[]=' + val + '&';
  228. });
  229. layer.open({
  230. type: 2,
  231. content: ['/admin/site/allot' + siteIds],
  232. area: ['50%', '50%'],
  233. title: '修改'
  234. });
  235. });
  236. /**
  237. * 批量删除
  238. */
  239. $(document).on('click', '#batchDelete', function () {
  240. var ids = units.getIdsBySelections();
  241. if (ids.length === 0) {
  242. layer.alert('请先选择您所要操作的对象', {icon: 0});
  243. return;
  244. }
  245. layer.confirm('您确定要删除吗?', {icon: 3, title: '删除信息'}, function (index, layero) {
  246. layer.close(index);
  247. tips.ajax({
  248. url: '/admin/sites',
  249. type: 'delete',
  250. data: {ids: ids},
  251. tableRefresh: '#table'
  252. });
  253. });
  254. });
  255. </script>
  256. @endsection