1
0

extension_report.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. {extend name="public/layout"}
  2. {block name="body"}
  3. <link rel="stylesheet" href="__LAYUI__/layui/css/layui.css" media="all">
  4. <link rel="stylesheet" " href=" /static/css/common.css">
  5. <script src="/static/js/jquery.min.js"></script>
  6. <style>
  7. body{
  8. background-color: #F3F3F3;
  9. padding-bottom: 40px;
  10. }
  11. .message_title{
  12. border: 1px solid #F0F0F0;
  13. background: #FCFCFC;
  14. margin-top: 5px;
  15. margin-bottom: 10px;
  16. position: relative;
  17. min-width: 800px;
  18. padding: 18px;
  19. }
  20. .wdatepicker2 {
  21. width: fit-content;
  22. margin: 50px auto;
  23. position: relative;
  24. }
  25. select {
  26. height: 26px;
  27. line-height: auto;
  28. vertical-align: middle;
  29. box-sizing: content-box;
  30. font-size: 13px;
  31. -webkit-appearance: menulist-button;
  32. border: #CCC solid 1px;
  33. }
  34. .wdatebtn {
  35. width: 84px;
  36. height: 28px;
  37. line-height: 26px;
  38. text-align: center;
  39. border: 1px solid #4479ba;
  40. vertical-align: top;
  41. }
  42. #searchbtn {
  43. vertical-align: top;
  44. }
  45. .btn {
  46. cursor: pointer;
  47. color: #000;
  48. background: url(__STATIC__/img/btn_bg.gif) repeat-x;
  49. border: 1px solid #C0C0C0;
  50. padding: 0 12px;
  51. *padding: 0 6px;
  52. height: 28px;
  53. }
  54. .abouts {
  55. width: 99%;
  56. position: relative;
  57. margin-bottom: 15px;
  58. margin-top: 5px;
  59. }
  60. .wdatepicker {
  61. top: 15px;
  62. right: 69px;
  63. position: absolute;
  64. }
  65. .abouts h1 {
  66. text-align: center;
  67. margin-bottom: 20px;
  68. margin-top: 20px;
  69. letter-spacing: 2px;
  70. font-family: Arial, Helvetica, sans-serif;
  71. }
  72. .tableother {
  73. text-align: center;
  74. }
  75. .maintable{table-layout:fixed;_width:100%;width:100%; border:1px solid #DFDFDF;border-collapse: separate !important;background-color:#FFF; border-right:0; border-bottom:2px solid #DFDFDF;}
  76. .maintable th{ background-color:#F2F3F7; border-right:1px solid #DFDFDF; border-bottom:1px solid #DFDFDF; line-height:25px; padding:5px; text-align:center; font-family:Arial; font-size:12px; letter-spacing:1px; color:#333}
  77. .maintable td{border-right:1px solid #DFDFDF; border-bottom:1px solid #EAEAEC; padding:7px; line-height:25px; font-size:13px; position:relative;}
  78. .tablelist th,.tablelist td{overflow: hidden;white-space: nowrap;text-overflow: ellipsis;word-wrap: break-word;}
  79. .tbcenter td{ text-align:center}
  80. .maintable h2{border-bottom:1px solid #999; margin:0; font-weight:bold; font-size:15px; margin-bottom:10px; margin-top:5px; text-indent:3px; font-family:Arial; letter-spacing:1px;}
  81. .maintable td label{ cursor:pointer}
  82. .baobaonum1{ color:#CCC}
  83. .baobaonum1 a{ color:#CCC}
  84. .fontnormal {
  85. font-weight: normal;
  86. }
  87. .weekday {
  88. position: absolute;
  89. right: 0;
  90. bottom: -5px;
  91. text-decoration: none;
  92. font-size: 8px;
  93. color: #CCC;
  94. font-style: normal;
  95. }
  96. .btnx {
  97. border: none;
  98. width: 98px;
  99. height: 30px;
  100. color: #fff;
  101. font-size: 14px;
  102. font-weight: bold;
  103. text-align: center;
  104. background: url(__STATIC__/img/icon-sub.png) no-repeat;
  105. cursor: pointer;
  106. }
  107. .wleft{float:left;margin-right: 10px;}
  108. .startime{height:36px;line-height:36px; text-align:center; display: block;border: 1px solid #E6E6E6 !important;width: 150px;}
  109. button.btn{height: 36px;line-height: 36px;padding:0 20px;background-size: cover;}
  110. .layui-table-body {
  111. height: calc(100vh - 260px) !important;
  112. }
  113. </style>
  114. <body class="clearfix">
  115. <div class="dailybox">
  116. <div class="message_title " style="margin-bottom:8px;">
  117. <div style=" width:110px; height:40px; position:absolute; top:35px; right:20px;">
  118. <input type="button" value="添加数据" class="btnx" title="添加数据">
  119. </div>
  120. <div style="margin-bottom:10px;">你正在管理您的投放消费明细......</div>
  121. <form method="get" id="seafrom" style="margin:0px;">
  122. <p class="wleft" style="line-height: 36px;">快速检索:</p>
  123. <!-- <select name="source_id" id="source_id">
  124. <option value="">==客户来源==</option>
  125. {volist name="soudata" id="vo"}
  126. <option value="{$vo.id}">{$vo.name}</option>
  127. {/volist}
  128. </select> -->
  129. <div id="source_slt" class="xm-select-demo wleft" style="width: 150px;"></div>
  130. <!-- <select name="level" id="level">
  131. <option value="">==重要级别==</option>
  132. {volist name="fields" id="vo"}
  133. {volist name="vo.select" id="v" }
  134. <option value="{$v.name}">{$v.name}</option>
  135. {/volist}
  136. {/volist}
  137. </select> -->
  138. <input name="dates" class="text wleft startime" type="text" id="startime" value="" size="14" readonly="readonly" placeholder="选择时间">
  139. <button title="搜索" class="btn" lay-submit lay-filter="search" id="searchbtn" type="button" > 搜 索 </button>
  140. </form>
  141. <div style="clear: both;"></div>
  142. </div>
  143. <div class="abouts tablemsgbox" >
  144. <table lay-filter="crmsearchlist" class="maintable" id="crmsearchlist">
  145. </table>
  146. </div>
  147. </div>
  148. </body>
  149. <script src="__STATIC__/layui/layui/lay/modules/xm-select.js" type="text/javascript" charset="utf-8"></script>
  150. <script src="__LAYUI__/layui/layui.js"></script>
  151. {/block}{block name="js"}
  152. <script type="text/html" id="dateox">
  153. <a class="divlayer" title="线索数据明细" lay-event="addtime" href="javascript:void(0)">{{d.addtime}}</a>
  154. <em class="weekday">{{d.week}}</em>
  155. </script>
  156. <script type="text/html" id="source">
  157. {{# if(d.source){ }}
  158. <span>{{d.source.source}}</span>
  159. {{# }else{ }}
  160. <span style="color: #cccccc;">无</span>
  161. {{# } }}
  162. </script>
  163. <script type="text/html" id="editbox">
  164. <a style="display:inline-block;" lay-event="edit" href="javascript:void(0);">编辑</a>
  165. </script>
  166. <script type="text/javascript">
  167. var reload = null, resizefun = null;
  168. layui.config({
  169. base: '__LAYUI__/',
  170. urlbase: '/sys'
  171. }).extend({
  172. index: 'lib/index' //主入口模块
  173. }).use(['table', 'laydate'], function () {
  174. var table = layui.table, laydate = layui.laydate,
  175. $ = layui.$,form = layui.form;
  176. laydate.render({
  177. elem: '#startime', //指定元素
  178. max:0
  179. , trigger: 'click'
  180. });
  181. var field = {};
  182. var source_sltdata = [
  183. {volist name="soudata" id="vo"}
  184. {name: '{$vo.name}', value: {$vo.id}},
  185. {/volist}
  186. ]
  187. var source_slt = xmSelect.render({
  188. el: '#source_slt',
  189. data: source_sltdata
  190. })
  191. form.on('submit(search)', function (data) {
  192. var source_id = source_slt.getValue('value');
  193. var courceId = source_id.length==0?'':source_id;
  194. var level = $('[name=level]').val();
  195. var date = $('#startime').val();
  196. field['source_id'] = courceId;
  197. field['level'] = level;
  198. field['date'] = date;
  199. //执行重载
  200. table.reload('crmsearchlist', {
  201. where: field
  202. , page: { curr: 1}
  203. });
  204. });
  205. table.render({
  206. elem: '#crmsearchlist',
  207. url: '{:url("ManagerEmp/extension_report")}',
  208. cols: [
  209. [
  210. {
  211. title: '日期',
  212. field: 'name',
  213. align: 'center',
  214. minWidth:100,
  215. templet: '#dateox',
  216. },
  217. // {
  218. // title: '公司',
  219. // field: 'company_name',
  220. // align: 'center',
  221. // },
  222. {
  223. title: '来源',
  224. field: 'source',
  225. align: 'center',
  226. templet: '#source',
  227. minWidth:80,
  228. },
  229. {
  230. title: '消费',
  231. field: 'money',
  232. align: 'center',
  233. minWidth:80,
  234. },
  235. {
  236. title: '展现',
  237. field: 'show',
  238. align: 'center',
  239. minWidth:80,
  240. },
  241. {
  242. title: '单展现费用',
  243. field: 'danshow_money',
  244. align: 'center',
  245. minWidth:80,
  246. },
  247. {
  248. title: '点击数',
  249. field: 'click',
  250. align: 'center',
  251. minWidth:80,
  252. },
  253. {
  254. title: '点击率',
  255. field: 'click_percen',
  256. align: 'center',
  257. minWidth:80,
  258. },
  259. {
  260. title: '点击成本',
  261. field: 'click_cost',
  262. align: 'center',
  263. minWidth:80,
  264. },
  265. {
  266. title: '线索量',
  267. field: 'clue_cont',
  268. align: 'center',
  269. minWidth:80,
  270. },
  271. {
  272. title: '转化线索率',
  273. field: 'clue_conversion',
  274. align: 'center',
  275. minWidth:80,
  276. },
  277. {
  278. title: '线索单价',
  279. field: 'clue_money',
  280. align: 'center',
  281. minWidth:80,
  282. },
  283. {
  284. title: '有效线索',
  285. field: 'valid',
  286. align: 'center',
  287. minWidth:80,
  288. },
  289. {
  290. title: '有效线索转化',
  291. field: 'valid_conversion',
  292. align: 'center',
  293. minWidth:80,
  294. },
  295. {
  296. title: '有效率',
  297. field: 'valid_percen',
  298. align: 'center',
  299. minWidth:80,
  300. },
  301. {
  302. title: '有效单价',
  303. field: 'valid_money',
  304. align: 'center',
  305. minWidth:80,
  306. },
  307. {
  308. title: '编辑',
  309. field: 'clue_count',
  310. align: 'center',
  311. fixed: 'right',
  312. templet: '#editbox'
  313. },
  314. ]
  315. ],
  316. page: true,
  317. limits: [17],
  318. limit: 17, //每页默认显示的数量,
  319. height: 'full-120',
  320. text: '对不起,加载出现异常!'
  321. });
  322. $('.btnx').click(function(){
  323. window.parent.openmsg('add_extension.html','extension_report.html')
  324. })
  325. resizefun = function () {
  326. table.resize('crmsearchlist');
  327. };
  328. reload = function () {
  329. table.reload('crmsearchlist', { where: field }, true);
  330. };
  331. table.on('tool(crmsearchlist)', function (result) {
  332. let event = result.event;
  333. let row = result.data;
  334. if (event == "addtime") {
  335. layer.open({
  336. type: 2,
  337. title: '线索数据明细',
  338. shadeClose: true,
  339. scrollbar: false,
  340. shade: 0.8,
  341. area: ['99%', '96%'],
  342. content: "{:url('manager_emp/account_detail')}?date="+ row.addtime +'到'+ row.addtime +'&state=线索'
  343. });
  344. }else if(event == "edit"){
  345. flag = false;
  346. window.parent.openeditmsg(result.data.id,'extension_report.html')
  347. return false;
  348. }
  349. })
  350. })
  351. </script>
  352. {/block}