community_report.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652
  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. padding-bottom: 40px;
  9. }
  10. .searchtitlebox {
  11. display: block;
  12. padding: 15px 10px;
  13. border: 1px solid #F0F0F0;
  14. background: #FCFCFC;
  15. margin-top: 5px;
  16. margin-bottom: 10px;
  17. position: relative;
  18. min-width: 800px;
  19. }
  20. .searchbox {
  21. display: block;
  22. margin-top: 8px;
  23. text-align: center;
  24. }
  25. .searchbox input {
  26. display: inline-block;
  27. height: 26px;
  28. line-height: 26px;
  29. padding-left: 3px;
  30. vertical-align: middle;
  31. }
  32. body {
  33. font-size: 12px;
  34. font-family: "宋体";
  35. }
  36. .selectbox {
  37. float: left;
  38. }
  39. .leftselect {
  40. float: left;
  41. height: 26px;
  42. line-height: 26px;
  43. }
  44. .selectbox select {
  45. float: left;
  46. height: 26px;
  47. }
  48. .searchtext {
  49. border: 1px solid #ccc;
  50. background: #fff url(__STATIC__/img/icon071402.png) no-repeat;
  51. padding: 1px 2px;
  52. height: 24px;
  53. line-height: 24px;
  54. vertical-align: middle;
  55. text-indent: 3px;
  56. margin-left: 4px;
  57. }
  58. .searchbtn1 {
  59. margin-left: 4px;
  60. cursor: pointer;
  61. color: #000;
  62. background: url(__STATIC__/img/btn_bg.gif) repeat-x;
  63. border: 1px solid #C0C0C0;
  64. padding: 0 12px;
  65. *padding: 0 6px;
  66. height: 26px;
  67. }
  68. .layui-table td,
  69. .layui-table th {
  70. font-size: 12px;
  71. }
  72. .layui-table th {
  73. font-weight: bold;
  74. }
  75. .dingjingorder {
  76. height: 25px;
  77. width: 40px;
  78. background-color: #65c001;
  79. color: #FFF;
  80. text-align: center;
  81. line-height: 25px;
  82. z-index: 100;
  83. display: block;
  84. position: absolute;
  85. top: 1px;
  86. right: 3px;
  87. border-radius: 11px;
  88. font-size: 12px;
  89. }
  90. .addvx {
  91. position: absolute;
  92. top: -5px;
  93. right: 1px;
  94. height: 14px;
  95. line-height: 14px;
  96. font-size: 16px;
  97. color: #666;
  98. font-family: "宋体";
  99. }
  100. .statebox {
  101. width: 40px;
  102. text-align: center;
  103. z-index: 100;
  104. display: block;
  105. position: absolute;
  106. font-size: 12px;
  107. top: -5px;
  108. right: 0px;
  109. border-radius: 0px;
  110. background: #4285f4;
  111. color: #efefef;
  112. height: 20px;
  113. line-height: 20px;
  114. }
  115. .layui-table-cell {
  116. overflow: initial;
  117. }
  118. #customer_detail {
  119. display: block;
  120. width: 435px;
  121. height: 100%;
  122. position: absolute;
  123. top: 0;
  124. left: 0;
  125. }
  126. .rightbox {
  127. display: block;
  128. width: calc(100% - 435px);
  129. margin-left: 435px;
  130. }
  131. .unstatusbox {
  132. display: block;
  133. position: absolute;
  134. top: -5px;
  135. left: 0;
  136. width: 100%;
  137. height: 37px;
  138. background-color: #FF6600;
  139. text-align: center;
  140. color: #FFF;
  141. }
  142. .statusbox {
  143. position: absolute;
  144. top: 0px;
  145. right: 0px;
  146. color: #666;
  147. text-align: right;
  148. z-index: 100;
  149. display: block;
  150. font-size: 12px;
  151. }
  152. .layui-table-view .layui-form-checkbox {
  153. width: 16px;
  154. height: 16px;
  155. line-height: 16px;
  156. padding-right: 0;
  157. }
  158. .layui-table-view .layui-form-checkbox i {
  159. height: 16px;
  160. width: 16px;
  161. font-size: 14px;
  162. }
  163. .novisitlog {
  164. background-color: #9139db !important;
  165. color: #FFF;
  166. }
  167. .novisitlog a {
  168. color: #FFF;
  169. }
  170. .crmsearchlist {
  171. cursor: pointer;
  172. }
  173. .tablebox .layui-form.layui-border-box.layui-table-view {
  174. max-height: 400px !important;
  175. height: auto !important;
  176. }
  177. .searchbox .layui-form-select {
  178. float: left;
  179. width: 130px;
  180. }
  181. .searchbox input {
  182. border: 1px solid #e6e6e6 !important;
  183. }
  184. .layui-table-body {
  185. /* max-height: 400px !important; */
  186. height: auto !important;
  187. }
  188. .layui-table-view .layui-table td {
  189. cursor: pointer;
  190. overflow: hidden;
  191. }
  192. .layui-form-checked {
  193. background-color: #37AF6E;
  194. }
  195. .layui-table-view .layui-form-checked i {
  196. color: #fff;
  197. }
  198. .summary_report h1 {
  199. text-align: center;
  200. margin-bottom: 20px;
  201. margin-top: 20px;
  202. letter-spacing: 2px;
  203. font-family: Arial, Helvetica, sans-serif;
  204. }
  205. .employee_reportbox,.searchbox1{
  206. visibility: hidden;
  207. }
  208. .selectbox2{
  209. width: 610px;
  210. margin:100px auto 0;
  211. float: none!important;
  212. }
  213. .clickElement {
  214. display: inline-block;
  215. width: 100%;
  216. height: 100%;
  217. color: #249DFA;
  218. }
  219. .clickElement:hover {
  220. background-color: #d0af4c;
  221. }
  222. </style>
  223. <body class="clearfix">
  224. <iframe id="customer_detail" style="display: none;" src=""></iframe>
  225. <div class="crmbox summary_report">
  226. <div class="searchtitlebox">
  227. <form class="layui-form" lay-filter="val-filter1">
  228. <div style="margin-bottom:8px;">您当前的操作 · <b class="toptitle">各账户报表</b>
  229. <div class="searchbox clearfix searchbox1" style="float: right;margin-top: 0;">
  230. <div class="selectbox" style="float: right;">
  231. <select name="employee_id" id="departElement" lay-search>
  232. <option value="">==所有部门==</option>
  233. {volist name="employee" id="vo"}
  234. <option value="{$vo.id}">{$vo.name}</option>
  235. {/volist}
  236. </select>
  237. <select name="invalid" id="invalidElement" lay-search>
  238. <option value="">==包含==</option>
  239. <option value="1">统计无效</option>
  240. </select>
  241. <input style="width:160px" type="text" lay-verify="required" class="left searchtext"
  242. autocomplete="off" style="border-color: #ccc;" name="date" id="visitime"
  243. placeholder="选择时间" readonly />
  244. <button class="left searchbtn1" type="button" lay-submit lay-filter="search">查看</button>
  245. </div>
  246. </div>
  247. </div>
  248. </form>
  249. </div>
  250. <form class="layui-form selectboxout2">
  251. <div class="searchbox clearfix" style="margin-top: 0 auto;">
  252. <div class="selectbox selectbox2" style="float: right;">
  253. <select name="employee_id" lay-search>
  254. <option value="">==客服专员==</option>
  255. {volist name="employee" id="vo"}
  256. <option value="{$vo.id}">{$vo.name}</option>
  257. {/volist}
  258. </select>
  259. <select name="invalid" lay-search>
  260. <option value="">==包含==</option>
  261. <option value="1">统计无效</option>
  262. </select>
  263. <input style="width:160px" type="text" lay-verify="required" class="left searchtext"
  264. autocomplete="off" style="border-color: #ccc;" name="date" id="visitime1" placeholder="选择时间"
  265. readonly />
  266. <button class="left searchbtn1" type="button" lay-submit lay-filter="search2">查看</button>
  267. </div>
  268. </div>
  269. </form>
  270. <div class="employee_reportbox">
  271. <h1>各重点楼盘小区报表</h1>
  272. <div class="crmsearchlist">
  273. <table lay-filter="crmsearchlist" id="crmsearchlist"></table>
  274. </div>
  275. </div>
  276. <div style="margin: 0 auto;">
  277. <div style="color: #999;text-align: right;">
  278. <p>注:</p>
  279. <p>1、基本数据:线索是根据信息录入的报名认时间统计。</p>
  280. <p>2、基本数据:加微是根据信息录入的时报名时间统计。</p>
  281. <p>3、基本数据:见面到访是根据首次洽谈的时间统计。</p>
  282. <p>4、基本数据:预定合同是根据定金时间统计,和报名、见面到访时间无关。</p>
  283. <p>5、基本数据:施工合同是根据合同时间统计,和报名、见面到访时间无关。</p>
  284. <p>6、注销:线索是根据变更线索无效的默认时间统计,和线索报名无关。</p>
  285. <p>7、注销:见面到访是根据首次洽谈时间统计,和线索报名时间无关。</p>
  286. </div>
  287. </div>
  288. </div>
  289. </body>
  290. <script src="__LAYUI__/layui/layui.js"></script>
  291. {/block}{block name="js"}
  292. <script type="text/html" id="messageElement">
  293. {{# if(d.name=='求和'){ }}
  294. <span>{{d.count}}</span>
  295. {{# }else{ }}
  296. <span class="clickElement" lay-event="countAlink">{{d.count}}</span>
  297. {{# } }}
  298. </script>
  299. <script type="text/html" id="visitElement">
  300. {{# if(d.name=='求和'){ }}
  301. <span>{{d.visit}}</span>
  302. {{# }else{ }}
  303. <span class="clickElement" lay-event="visitAlink">{{d.visit}}</span>
  304. {{# } }}
  305. </script>
  306. <script type="text/html" id="depositElement">
  307. {{# if(d.name=='求和'){ }}
  308. <span>{{d.deposit}}</span>
  309. {{# }else{ }}
  310. <span class="clickElement" lay-event="depositAlink">{{d.deposit}}</span>
  311. {{# } }}
  312. </script>
  313. <script type="text/html" id="signedElement">
  314. {{# if(d.name=='求和'){ }}
  315. <span>{{d.signed}}</span>
  316. {{# }else{ }}
  317. <span class="clickElement" lay-event="signedAlink">{{d.signed}}</span>
  318. {{# } }}
  319. </script>
  320. <script type="text/javascript">
  321. var reload = null,
  322. resizefun = null;
  323. layui.config({
  324. base: '__LAYUI__/',
  325. urlbase: '/sys'
  326. }).extend({
  327. index: 'lib/index' //主入口模块
  328. }).use(['table', 'laydate'], function() {
  329. var table = layui.table,
  330. laydate = layui.laydate,
  331. $ = layui.$;
  332. form = layui.form;
  333. var field = {};
  334. laydate.render({
  335. elem: '#visitime',
  336. max: 0,
  337. trigger: 'click',
  338. range: true
  339. });
  340. laydate.render({
  341. elem: '#visitime1',
  342. max: 0,
  343. trigger: 'click',
  344. range: true
  345. });
  346. form.on('submit(search)', function(data) {
  347. Object.assign(field, data.field);
  348. //执行重载
  349. $('.crmsearchlist').empty();
  350. $('.crmsearchlist').append('<table lay-filter="crmsearchlist" id="crmsearchlist"></table>');
  351. table.render({
  352. elem: '#crmsearchlist',
  353. url: '{:url("community/community_report")}',
  354. data: [],
  355. page:false,
  356. where:field,
  357. limit: Number.MAX_VALUE,
  358. //even: true,
  359. cols: getCol(data.field.invalid),
  360. // page: true,
  361. // limits: [10],
  362. // limit: 10, //每页默认显示的数量,
  363. // height: 'full-120',
  364. text: '对不起,加载出现异常!'
  365. });
  366. });
  367. form.on('submit(search2)', function(data) {
  368. Object.assign(field, data.field);
  369. //执行重载
  370. form.val('val-filter1',data.field);
  371. $('.employee_reportbox').css('visibility','unset')
  372. $('.searchbox1').css('visibility','unset')
  373. $('.selectboxout2').css('display','none');
  374. form.render();
  375. $('.crmsearchlist').empty();
  376. $('.crmsearchlist').append('<table lay-filter="crmsearchlist" id="crmsearchlist"></table>');
  377. table.render({
  378. elem: '#crmsearchlist',
  379. url: '{:url("community/community_report")}',
  380. data: [],
  381. where:field,
  382. page:false,
  383. limit: Number.MAX_VALUE,
  384. //even: true,
  385. cols: getCol(data.field.invalid),
  386. // page: true,
  387. // limits: [10],
  388. // limit: 10, //每页默认显示的数量,
  389. // height: 'full-120',
  390. text: '对不起,加载出现异常!'
  391. });
  392. });
  393. table.render({
  394. elem: '#crmsearchlist',
  395. url: '',
  396. data: [],
  397. page:false,
  398. // limit: Number.MAX_VALUE,
  399. //even: true,
  400. cols: getCol(),
  401. height: 'full-120',
  402. text: '对不起,加载出现异常!'
  403. });
  404. table.on('tool(crmsearchlist)', function (result) {
  405. let event = result.event;
  406. let row = result.data;
  407. flag = true;
  408. if (event === "countAlink") {
  409. let date = $("#visitime").val();
  410. let depart = $("#departElement").val();
  411. let invalid = $("#invalidElement").val();
  412. layer.open({
  413. type: 2,
  414. title: $(this).attr('title'),
  415. shadeClose: true,
  416. scrollbar: false,
  417. shade: 0.8,
  418. area: ['99%', '96%'],
  419. content: "{:url('community/open')}?date="+ date +'&employee_id='+ depart +'&module=community&type=customer&community_id='+row.id,
  420. });
  421. } else if (event === "visitAlink") {
  422. let date = $("#visitime").val();
  423. let depart = $("#departElement").val();
  424. let invalid = $("#invalidElement").val();
  425. layer.open({
  426. type: 2,
  427. title: $(this).attr('title'),
  428. shadeClose: true,
  429. scrollbar: false,
  430. shade: 0.8,
  431. area: ['99%', '96%'],
  432. content: "{:url('community/open')}?date="+ date +'&employee_id='+ depart +'&module=community&type=visit&community_id='+row.id,
  433. });
  434. } else if (event === "depositAlink") {
  435. let date = $("#visitime").val();
  436. let depart = $("#departElement").val();
  437. let invalid = $("#invalidElement").val();
  438. layer.open({
  439. type: 2,
  440. title: $(this).attr('title'),
  441. shadeClose: true,
  442. scrollbar: false,
  443. shade: 0.8,
  444. area: ['99%', '96%'],
  445. content: "{:url('community/open')}?date="+ date +'&employee_id='+ depart +'&module=community&type=deposit&community_id='+row.id,
  446. });
  447. } else if (event === "signedAlink") {
  448. let date = $("#visitime").val();
  449. let depart = $("#departElement").val();
  450. let invalid = $("#invalidElement").val();
  451. layer.open({
  452. type: 2,
  453. title: $(this).attr('title'),
  454. shadeClose: true,
  455. scrollbar: false,
  456. shade: 0.8,
  457. area: ['99%', '96%'],
  458. content: "{:url('community/open')}?date="+ date +'&employee_id='+ depart +'&module=community&type=signed&community_id='+row.id,
  459. });
  460. }
  461. })
  462. resizefun = function() {
  463. table.resize('crmsearchlist');
  464. };
  465. window.resizefun2 = function() {
  466. table.resize('crmsearchlist');
  467. };
  468. reload = function() {
  469. table.reload('crmsearchlist', {
  470. url: '{:url("community/community_report")}',
  471. where: field
  472. }, true);
  473. };
  474. })
  475. function getCol(invalid) {
  476. var arr = [
  477. [{
  478. title: '重点楼盘 ',
  479. field: 'name',
  480. align: 'center',
  481. rowspan: 2,
  482. },
  483. {
  484. title: '基本数据',
  485. field: 'community_name',
  486. align: 'center',
  487. colspan: 12,
  488. },
  489. ],
  490. [
  491. {
  492. title: '楼盘户数',
  493. field: 'households',
  494. align: 'center',
  495. },
  496. {
  497. title: '信息量',
  498. field: 'count',
  499. align: 'center',
  500. templet: "#messageElement"
  501. },
  502. {
  503. title: '加微量',
  504. field: 'wechat',
  505. align: 'center',
  506. },
  507. {
  508. title: '加微率',
  509. field: 'wechat_lv',
  510. align: 'center',
  511. },
  512. {
  513. title: '进群量',
  514. field: 'into_group',
  515. align: 'center',
  516. },
  517. {
  518. title: '进群率',
  519. field: 'into_group_lv',
  520. align: 'center',
  521. },
  522. {
  523. title: '见面量',
  524. field: 'visit',
  525. align: 'center',
  526. templet: "#visitElement"
  527. },
  528. {
  529. title: '见面率',
  530. field: 'visit_lv',
  531. align: 'center',
  532. },
  533. {
  534. title: '定金量',
  535. field: 'deposit',
  536. align: 'center',
  537. templet: "#depositElement"
  538. },
  539. {
  540. title: '成单率',
  541. field: 'deposit_lv',
  542. align: 'center',
  543. },
  544. {
  545. title: '合同量',
  546. field: 'signed',
  547. align: 'center',
  548. templet: "#signedElement"
  549. },
  550. {
  551. title: '业绩总额',
  552. field: 'signed_money',
  553. align: 'center',
  554. },
  555. ]
  556. ];
  557. if (invalid == 1) {
  558. arr[0].push({
  559. title: '注销',
  560. field: 'square',
  561. align: 'center',
  562. colspan: 3,
  563. });
  564. arr[1].push({
  565. title: '有效线索',
  566. field: 'invalid_valid',
  567. align: 'center',
  568. })
  569. arr[1].push({
  570. title: '见面',
  571. field: 'invalid_visit',
  572. align: 'center',
  573. })
  574. arr[1].push({
  575. title: '定金',
  576. field: 'invalid_deposit',
  577. align: 'center',
  578. })
  579. }
  580. return arr;
  581. }
  582. function removealog(params) {
  583. $('#customer_detail').hide();
  584. $('.crmbox').removeClass('rightbox');
  585. }
  586. </script>
  587. {/block}