123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395 |
- {extend name="public/layout"}
- {block name="body"}
- <link rel="stylesheet" href="__LAYUI__/layui/css/layui.css" media="all">
- <link rel="stylesheet" " href=" /static/css/common.css">
- <script src="/static/js/jquery.min.js"></script>
- <style>
- body{
- background-color: #F3F3F3;
- padding-bottom: 40px;
- }
- .message_title{
- border: 1px solid #F0F0F0;
- background: #FCFCFC;
- margin-top: 5px;
- margin-bottom: 10px;
- position: relative;
- min-width: 800px;
- padding: 18px;
- }
- .wdatepicker2 {
- width: fit-content;
- margin: 50px auto;
- position: relative;
- }
- select {
- height: 26px;
- line-height: auto;
- vertical-align: middle;
- box-sizing: content-box;
- font-size: 13px;
- -webkit-appearance: menulist-button;
- border: #CCC solid 1px;
- }
- .wdatebtn {
- width: 84px;
- height: 28px;
- line-height: 26px;
- text-align: center;
- border: 1px solid #4479ba;
- vertical-align: top;
- }
- #searchbtn,#searchbtn1 {
- vertical-align: top;
- }
- .btn {
- cursor: pointer;
- color: #000;
- background: url(__STATIC__/img/btn_bg.gif) repeat-x;
- border: 1px solid #C0C0C0;
- padding: 0 12px;
- *padding: 0 6px;
- height: 28px;
- }
- .abouts {
- width: 99%;
- position: relative;
- margin-bottom: 15px;
- margin-top: 5px;
- }
- .wdatepicker {
- top: 15px;
- right: 69px;
- position: absolute;
- }
- .abouts h1 {
- text-align: center;
- margin-bottom: 20px;
- margin-top: 20px;
- letter-spacing: 2px;
- font-family: Arial, Helvetica, sans-serif;
- }
- .tableother {
- text-align: center;
- }
- .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;}
- .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}
- .maintable td{border-right:1px solid #DFDFDF; border-bottom:1px solid #EAEAEC; padding:7px; line-height:25px; font-size:13px; position:relative;}
- .tablelist th,.tablelist td{overflow: hidden;white-space: nowrap;text-overflow: ellipsis;word-wrap: break-word;}
- .tbcenter td{ text-align:center}
- .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;}
- .maintable td label{ cursor:pointer}
- .baobaonum1{ color:#CCC}
- .baobaonum1 a{ color:#CCC}
- .fontnormal {
- font-weight: normal;
- }
- .ablock td a{ width:100%; height:28px; display:block;}
- .ablock2{ background-color:#d0af4c; font-weight:bold;}
- .ablock2 a{ width:100%; height:100%; display:block;text-decoration:none}
- .ablock2 a:hover{ color:#0000FF; text-decoration:underline}
- #loading-mask{position: fixed;top: 0;left: 0; width: 100%;height: 100%;background: rgba(0, 0, 0, 0.7);z-index: 15000; display:none}
- #loading-mask div{
- width: 25%;
- height: 179px;
- position: absolute;
- top: 40%;
- left: 50%;
- -webkit-transform: translate(-50%, -50%);
- transform: translate(-50%, -50%);
- border-radius: 10px;
- background-color:#FFFFFF;
- text-align:center
- }
- #loading-mask div img{ padding-top:40px;}
- #loading-mask div p{ padding-top:25px; color:#006600}
- .weekday {
- position: absolute;
- right: 0;
- bottom: -5px;
- text-decoration: none;
- font-size: 8px;
- color: #CCC;
- font-style: normal;
- }
- .wdatefast2 a {
- padding-left: 6px;
- padding-right: 6px;
- color: #0033CC;
- }
- table{table-layout:fixed;word-break:break-all;}
- td{word-wrap:break-word}
- </style>
- <body class="clearfix">
- <div class="dailybox">
- <div class="message_title " style="margin-bottom:8px;">
- 您当前的操作 · <b><span class="red2">{$data.company_name}各月份报表</span></b>
- <div class="wdatepicker" style="display:none;">
- <input name="nowyear" type="text" id="nowyear1" class="wdatebtn left" readonly="readonly" placeholder="选择年份">
- <button id="searchbtn1" class="btn left" type="button">查 看</button>
- </div>
- </div>
- <div class="wdatepicker2 tcenter">
- <div id="seafrom" class="inline-block clearfix" style="margin:0px">
- <input name="nowyear" type="text" id="nowyear" class="wdatebtn left" readonly="readonly" placeholder="选择年份">
- <button id="searchbtn" class="btn left" type="button">查 看</button>
- </div>
-
- <div class="wdatefast2">
- 推荐检索:
- <a class="nowmonth" href="javascript:void(0)"></a>
- </div>
- </div>
- <div class="abouts tablemsgbox" style="display:none;">
- <h1>{$data.company_name}各月份报表</h1>
- <table class="maintable tableother">
- <thead>
- <tr>
- <th rowspan="2" width="50">月份</th>
- <th rowspan="2" width='100'>推广<br>消费</th>
- <th colspan="4">推广数据</th>
- <th colspan="13">基本数据</th>
- <th rowspan="2">ROI</th>
- <th colspan="2">注销</th>
- </tr>
- <tr>
- <th class="thtopline">展现</th>
- <th class="thtopline">点击</th>
- <th class="thtopline">点击率</th>
- <th class="thtopline" title="线索转化比">转化比</th>
- <th class="thtopline">线索量</th>
- <th class="thtopline">线索单价</th>
- <th class="thtopline">有效量</th>
- <th class="thtopline">有效单价</th>
- <th class="thtopline">有效率</th>
- <th class="thtopline">见面量</th>
- <th class="thtopline">见面率</th>
- <th class="thtopline">见面单价</th>
- <th class="thtopline">预定合同</th>
- <th class="thtopline">成单率</th>
- <th class="thtopline">施工合同</th>
- <!-- <th class="thtopline" title="套餐整装或基础合同额">基本金额</th>
- <th class="thtopline" title="软装、电器、定制等合同额">其他金额</th> -->
- <th class="thtopline">业绩总额</th>
- <th class="thtopline">均单值</th>
- <th class="thtopline fontnormal">见面</th>
- <th class="thtopline fontnormal">定金</th>
- </tr>
- </thead>
- <tbody class="tbodybox">
-
- </tbody>
- </table>
- </div>
- <div class="abouts" style="text-align:right; color:#999; padding-bottom:15px; line-height:23px;">
- 注:<br>
- 1、基本数据:线索是根据信息录入的报名认时间统计。<br>
- 2、基本数据:加微是根据信息录入的时报名时间统计。<br>
- 3、基本数据:见面到访是根据首次洽谈的时间统计。<br>
- 4、基本数据:预定合同是根据定金时间统计,和报名、见面到访时间无关。<br>
- 5、基本数据:施工合同是根据签单时间统计,和报名、见面到访时间无关。<br>
- 6、注销:线索是根据变更线索无效的默认时间统计,和线索报名无关。<br>
- 7、注销:见面到访是根据首次洽谈时间统计,和线索报名时间无关。
- </div>
- </div>
- <div id="loading-mask">
- <div><img src="__STATIC__/img/large-loading.gif" />
- <p>...加载中...</p>
- </div>
- </div>
- </body>
- <script src="__LAYUI__/layui/layui.js"></script>
- {/block}{block name="js"}
- <script type="text/html" id="designer_name">
- {{# if(d.designer){ }}
- <span>{{d.designer.name}}</span>
- {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# } }}
- </script>
- <script type="text/javascript">
- var reload = null, resizefun = null;
- layui.config({
- base: '__LAYUI__/',
- urlbase: '/sys'
- }).extend({
- index: 'lib/index' //主入口模块
- }).use(['table', 'laydate'], function () {
- var table = layui.table, laydate = layui.laydate,
- $ = layui.$;
- let date=new Date();
- let year=date.getFullYear();
- let time='', validtype='', employee_id='';
- laydate.render({
- elem: '#nowyear', //指定元素
- type: 'year',
- value: year,
- max:0
- , trigger: 'click'
- });
- laydate.render({
- elem: '#nowyear1', //指定元素
- type: 'year',
- value: year,
- trigger: 'click'
- });
- $('.nowmonth').html(year+'年');
-
- $('.nowmonth').click(function () {
- if (!$('#nowyear').val()) {
- alert('提示:请务必选择统计时间')
- return false;
- }
- let date = new Date();
- let year = date.getFullYear();
- $('.wdatepicker2').hide();
- $('.wdatepicker').show();
- $('.tablemsgbox').show();
- time = year;
- dailyfun();
- })
- $("#searchbtn1").click(function () {
- if (!$('#nowyear').val()) {
- alert('提示:请务必选择统计时间')
- return false;
- }
- time = $('#nowyear1').val();
- $('.wdatepicker2').hide();
- $('.wdatepicker').show();
- $('.tablemsgbox').show();
- dailyfun();
- })
- $('#searchbtn').click(function(){
- if(!$('#nowyear').val()){
- alert('提示:请务必选择统计时间')
- return false;
- }
- time= $('#nowyear').val();
- laydate.render({
- elem: '#nowyear1', //指定元素
- type: 'year',
- value: time,
- trigger: 'click'
- });
- $('.wdatepicker2').hide();
- $('.wdatepicker').show();
- $('.tablemsgbox').show();
- dailyfun();
- })
- resizefun = function () {
- dailyfun();
- };
- reload = function () {
- dailyfun();
- };
- function dailyfun() {
- $('#loading-mask').show();
- $.ajax({
- url: '{:url("ManagerEmp/year_report")}'
- , data: {
- date: time
- }
- , type: 'post'
- , success: function (res) {
- if (res.code == 0) {
- let str="";
- for(let i in res.data){
- if(res.data[i].month!='求和'){
- if(!isNaN(res.data[i].exten_money)){
- numberflt = res.data[i].exten_money;
- }else{
- numberflt = res.data[i].exten_money.toFixed(2);
- }
- str+=`<tr>
- <td>${res.data[i].month=='求和'?res.data[i].month:(res.data[i].month+'月')}</td>
- <td title="推广消费" class="${res.data[i].exten_money ? '' : 'baobaonum1'}">${numberflt}</td>
- <td title="展现量" class="${res.data[i].exten_show ? '' : 'baobaonum1'}">${res.data[i].exten_show}</td>
- <td title="点击数" class="${res.data[i].exten_click ? '' : 'baobaonum1'}">${res.data[i].exten_click}</td>
- <td title="点击率" class="${res.data[i].click_percen ? '' : 'baobaonum1'}">${res.data[i].click_percen}</td>
- <td title="点击转化比例" class="${res.data[i].clue_conversion ? '' : 'baobaonum1'}">${res.data[i].clue_conversion}</td>
- <td title="线索量" class="${res.data[i].clue_cont ? '' : 'baobaonum1'}">${res.data[i].clue_cont}</td>
- <td title="线索单价" class="${res.data[i].clue_money ? '' : 'baobaonum1'}">${res.data[i].clue_money}</td>
- <td title="有效量" class="${res.data[i].valid_cont ? '' : 'baobaonum1'}">${res.data[i].valid_cont}</td>
- <td title="有效单价" class="${res.data[i].valid_money ? '' : 'baobaonum1'}">${res.data[i].valid_money}</td>
- <td title="有效率" class="youxiao_percent ${res.data[i].valid_percen ? '' : 'baobaonum1'}">${res.data[i].valid_percen}%</td>
- <td title="见面量" class="${res.data[i].meet_cont ? '' : 'baobaonum1'}">${res.data[i].meet_cont}</td>
- <td title="见面率" class="jianmian_percent ${res.data[i].meet_percen ? '' : 'baobaonum1'}">${res.data[i].meet_percen}%</td>
- <td title="见面单价" class="${res.data[i].meet_money ? '' : 'baobaonum1'}">${res.data[i].meet_money}</td>
- <td title="预定合同量" class="${res.data[i].deposit_cont ? '' : 'baobaonum1'}">${res.data[i].deposit_cont}</td>
- <td title="成单率" class="chengdan_percent ${res.data[i].deposit_percen ? '' : 'baobaonum1'}">${res.data[i].deposit_percen}%</td>
- <td title="施工合同量" class="${res.data[i].sign_cont ? '' : 'baobaonum1'}">${res.data[i].sign_cont}</td>
- <td title="业绩总额" class="${res.data[i].basic_money ? '' : 'baobaonum1'}">${res.data[i].basic_money}</td>
- <td title="均单值" class="${res.data[i].sign_agv_money ? '' : 'baobaonum1'}">${res.data[i].sign_agv_money}</td>
- <td title="ROI" class="${res.data[i].ROI ? '' : 'baobaonum1'}">${res.data[i].ROI}</td>
- <td title="见面注销量" class="${res.data[i].invalid_meet ? '' : 'baobaonum1'}">${res.data[i].invalid_meet}</td>
- <td title="定金注销量" class="${res.data[i].invalid_deposit ? '' : 'baobaonum1'}">${res.data[i].invalid_deposit}</td>
- </tr>`;
- }else{
- str+=`<tr>
- <td>${res.data[i].month}</td>
- <td title="推广消费" class="${res.data[i].exten_money ? '' : 'baobaonum1'}">${res.data[i].exten_money}</td>
- <td title="展现量" class="${res.data[i].exten_show ? '' : 'baobaonum1'}">${res.data[i].exten_show}</td>
- <td title="点击数" class="${res.data[i].exten_click ? '' : 'baobaonum1'}">${res.data[i].exten_click}</td>
- <td title="点击率" class="${res.data[i].click_percen ? '' : 'baobaonum1'}">${res.data[i].click_percen}</td>
- <td title="点击转化比例" class="${res.data[i].clue_conversion ? '' : 'baobaonum1'}">${res.data[i].clue_conversion}</td>
- <td title="线索量" class="${res.data[i].clue_cont ? '' : 'baobaonum1'}">${res.data[i].clue_cont}</td>
- <td title="线索单价" class="${res.data[i].clue_money ? '' : 'baobaonum1'}">${res.data[i].clue_money}</td>
- <td title="有效量" class="${res.data[i].valid_cont ? '' : 'baobaonum1'}">${res.data[i].valid_cont}</td>
- <td title="有效单价" class="${res.data[i].valid_money ? '' : 'baobaonum1'}">${res.data[i].valid_money}</td>
- <td title="有效率" class="youxiao_percent ${res.data[i].valid_percen ? '' : 'baobaonum1'}">${res.data[i].valid_percen}%</td>
- <td title="见面量" class="${res.data[i].meet_cont ? '' : 'baobaonum1'}">${res.data[i].meet_cont}</td>
- <td title="见面率" class="jianmian_percent ${res.data[i].meet_percen ? '' : 'baobaonum1'}">${res.data[i].meet_percen}%</td>
- <td title="见面单价" class="${res.data[i].meet_money ? '' : 'baobaonum1'}">${res.data[i].meet_money}</td>
- <td title="预定合同量" class="${res.data[i].deposit_cont ? '' : 'baobaonum1'}">${res.data[i].deposit_cont}</td>
- <td title="成单率" class="chengdan_percent ${res.data[i].deposit_percen ? '' : 'baobaonum1'}">${res.data[i].deposit_percen}%</td>
- <td title="施工合同量" class="${res.data[i].sign_cont ? '' : 'baobaonum1'}">${res.data[i].sign_cont}</td>
- <td title="业绩总额" class="${res.data[i].all_money ? '' : 'baobaonum1'}">${res.data[i].all_money}</td>
- <td title="均单值" class="${res.data[i].sign_agv_money ? '' : 'baobaonum1'}">${res.data[i].sign_agv_money}</td>
- <td title="ROI" class="${res.data[i].ROI ? '' : 'baobaonum1'}">${res.data[i].ROI}</td>
- <td title="见面注销量" class="${res.data[i].invalid_meet ? '' : 'baobaonum1'}">${res.data[i].invalid_meet}</td>
- <td title="定金注销量" class="${res.data[i].invalid_deposit ? '' : 'baobaonum1'}">${res.data[i].invalid_deposit}</td>
- </tr>`;
- }
- }
- $('.tbodybox').html(str);
-
- }else if(res.code == 403){
- $(".exitbtn").trigger("click");
- } else {
- alert(res.msg)
- }
- $('#loading-mask').hide();
- }
- });
- }
-
- })
- function getNowMonth() {
- var date = new Date();
- var year = date.getFullYear();
- var month = date.getMonth() + 1;
- month = month > 9 ? month : "0" + month;
- var nowMonth = year + "-" + month;
- return nowMonth;
- }
- /**获取上一个月 */
- function getPreMonth() {
- var arr = getNowMonth().split("-");
- var year = arr[0]; //获取当前日期的年份
- var month = arr[1]; //获取当前日期的月份
- var year2 = year;
- var month2 = parseInt(month) - 1;
- if (month2 == 0) {
- //1月的上一月是前一年的12月
- year2 = parseInt(year2) - 1;
- month2 = 12;
- }
- var preMonth = year2 + "-" + month2;
- return preMonth;
- }
- </script>
- {/block}
|