employee_report.html 15 KB

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