123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502 |
- {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;
- }
- </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;">
- {if $is_manager == 1}
- <select class="left validbox" name="org_id" id="org_id">
- <option value="">==部门==</option>
- {volist name="org_list" id="vo"}
- <option value="{$vo.id}">{$vo.name}</option>
- {/volist}
- </select>
- <select class="left validbox" name="employee_id" id="employee_id">
- <option value="">==业务员==</option>
- {volist name="employee_list" id="vo"}
- <option value="{$vo.id}">{$vo.name}</option>
- {/volist}
- </select>
- {/if}
- <select class="left validbox" name="wuxiao" id="valid">
- <option value="">==包含==</option>
- <option value="1">统计无效</option>
- </select>
- <input name="nowyear" type="text" id="nowyear1" class="wdatebtn left" readonly="readonly" autocomplete="off" 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">
- {if $is_manager == 1}
- <select class="left validbox" name="org_ids" id="org_ids">
- <option value="">==部门==</option>
- {volist name="org_list" id="vo"}
- <option value="{$vo.id}">{$vo.name}</option>
- {/volist}
- </select>
- <select class="left validbox" name="employee_ids" id="employee_ids">
- <option value="">==业务员==</option>
- {volist name="employee_list" id="vo"}
- <option value="{$vo.id}">{$vo.name}</option>
- {/volist}
- </select>
- {/if}
- <select class="left" name="wuxiao" id="wuxiao">
- <option value="">==包含==</option>
- <option value="1">统计无效</option>
- </select>
- <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>
- <a class="lastmonth" href="javascript:void(0)">上个月</a>
- </div>
- </div>
- <div class="abouts tablemsgbox" style="display:none;">
- <h1>{$data.company_name}{if $is_manager neq 1}{$data.empname}{/if}<span class="month"></span>月份日报</h1>
- <table class="maintable tableother">
- <thead>
- <tr>
- <th rowspan="2">日期</th>
- <th colspan="9">基本数据</th>
- <th colspan="3" class="validnumbox" style="display:none;">注销</th>
- </tr>
- <tr>
- <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 fontnormal validnumbox" style="display:none;">无效</th>
- <th class="thtopline fontnormal validnumbox" style="display:none;">有效</th>
- <th class="thtopline fontnormal validnumbox" style="display:none;">见面</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 month = date.getMonth()*1+1;
- let time='', validtype='', employee_id , org_id;
- let todayDate = year+'-'+ (month<10?'0'+month:month);
- laydate.render({
- elem: '#nowyear', //指定元素
- type: 'month',
- value: todayDate,
- min: -90,
- max:0
- ,trigger:'click'
- });
-
- $('.lastmonth').click(function () {
- if (!$('#nowyear').val()) {
- alert('提示:请务必选择统计时间')
- return false;
- }
- validtype = $('#wuxiao').val();
- time = getPreMonth();
- employee_id = $('#employee_ids').val();
- org_id = $('#org_ids').val();
- $('.month').html(time.split('-')[1]);
- laydate.render({
- elem: '#nowyear', //指定元素
- type: 'month',
- value: time,
- min: -90,
- max: 0
- ,trigger:'click'
- });
- laydate.render({
- elem: '#nowyear1', //指定元素
- type: 'month',
- value: time,
- min: -90,
- max: 0
- ,trigger:'click'
- });
- $('.wdatepicker2').hide();
- $('.wdatepicker').show();
- $('.tablemsgbox').show();
- dailyfun(time);
- })
- $('.nowmonth').click(function () {
- if (!$('#nowyear').val()) {
- alert('提示:请务必选择统计时间')
- return false;
- }
- let date = new Date();
- let year = date.getFullYear();
- let month = date.getMonth() * 1 + 1;
- validtype = $('#wuxiao').val();
- employee_id = $('#employee_ids').val();
- org_id = $('#org_ids').val();
- time = year+'-'+ (month<10?'0'+month:month);
- $('.month').html(time.split('-')[1]);
- laydate.render({
- elem: '#nowyear', //指定元素
- type: 'month',
- value: time,
- min: -90,
- max: 0
- ,trigger:'click'
- });
- laydate.render({
- elem: '#nowyear1', //指定元素
- type: 'month',
- value: time,
- min: -90,
- max: 0
- ,trigger:'click'
- });
- $('.wdatepicker2').hide();
- $('.wdatepicker').show();
- $('.tablemsgbox').show();
- dailyfun(time);
- })
- $("#searchbtn1").click(function () {
- if (!$('#nowyear').val()) {
- alert('提示:请务必选择统计时间')
- return false;
- }
- validtype= $('#valid').val();
- time = $('#nowyear1').val();
- employee_id = $('#employee_id').val();
- org_id = $('#org_id').val();
- $('.month').html(time.split('-')[1]);
- laydate.render({
- elem: '#nowyear', //指定元素
- type: 'month',
- value: time,
- min: -90,
- max: 0
- ,trigger:'click'
- });
- $('.wdatepicker2').hide();
- $('.wdatepicker').show();
- $('.tablemsgbox').show();
- dailyfun(time);
- })
- $('#searchbtn').click(function(){
- if(!$('#nowyear').val()){
- alert('提示:请务必选择统计时间')
- return false;
- }
- validtype = $('#wuxiao').val();
- time= $('#nowyear').val();
- employee_id = $('#employee_ids').val();
- org_id = $('#org_ids').val();
- $('.month').html(time.split('-')[1]);
- laydate.render({
- elem: '#nowyear1', //指定元素
- type: 'month',
- value: time,
- min: -90,
- max: 0
- ,trigger:'click'
- });
- $('.wdatepicker2').hide();
- $('.wdatepicker').show();
- $('.tablemsgbox').show();
- dailyfun(time);
- })
- resizefun = function () {
- dailyfun(time);
- };
- reload = function () {
- dailyfun(time);
- };
- function dailyfun(time) {
- $('#loading-mask').show();
- $.ajax({
- url: '{:url("community/daily")}'
- , data: {
- date: time,
- employee_id: employee_id,
- org_id: org_id
- }
- , type: 'post'
- , success: function (res) {
- if (res.code == 0) {
- let str="";
- if(!validtype){
- for(let j=0;j<$('.validnumbox').length;j++){
- $($('.validnumbox')[j]).hide();
- }
- }else{
- for (let j = 0; j < $('.validnumbox').length; j++) {
- $($('.validnumbox')[j]).show();
- }
- }
- for(let i in res.data){
- if(res.data[i].day!='求和'){
- str+=`<tr>
- <td>${res.data[i].day}<em class="weekday">${res.data[i].week}</em></td>
- <td title="信息量" class="${res.data[i].new_cus ? '' : 'baobaonum1'}">${res.data[i].new_cus?('<a class="divlayer" time="' + res.data[i].day +'" empid="'+res.data[i].nowempid+'" orgid="'+res.data[i].noworgid+'" text="addnew" title="' + res.data[i].day + '新增加客户数" href="javascript:void(0)">' + res.data[i].new_cus + '</a>') :res.data[i].new_cus}</td>
- <td title="加微量" class="${res.data[i].jv ? '' : 'baobaonum1'}">${res.data[i].jv}</td>
- <td title="加微率" class="${res.data[i].jv_percen ? '' : 'baobaonum1'}">${res.data[i].jv_percen}</td>
- <td title="进群量" class="${res.data[i].jq ? '' : 'baobaonum1'}">${res.data[i].jq}</td>
- <td title="进群率" class="${res.data[i].jq_percen ? '' : 'baobaonum1'}">${res.data[i].jq_percen}%</td>
- <td title="见面量" class="${res.data[i].meet_cont ? '' : 'baobaonum1'}">${res.data[i].meet_cont? ('<a class="divlayer" time="' + res.data[i].day +'" empid="'+res.data[i].nowempid+'" orgid="'+res.data[i].noworgid+'" text="到访" title="' + res.data[i].day + '见面线索明细" href="javascript:void(0)">' + res.data[i].meet_cont + '</a>') :res.data[i].meet_cont}</td>
- <td title="定金量" class="${res.data[i].deposit_cont ?'':'baobaonum1'}">${res.data[i].deposit_cont? ('<a class="divlayer" time="' + res.data[i].day +'" empid="'+res.data[i].nowempid+'" orgid="'+res.data[i].noworgid+'" text="交定" title="' + res.data[i].day + '定金客户明细" href="javascript:void(0)">' + res.data[i].deposit_cont + '</a>'): res.data[i].deposit_cont}</td>
- <td title="合同量" class="${res.data[i].sign_cont ?'':'baobaonum1'}">${res.data[i].sign_cont?('<a class="divlayer" time="' + res.data[i].day +'" empid="'+res.data[i].nowempid+'" orgid="'+res.data[i].noworgid+'" text="签单" title="' + res.data[i].day + '签单客户明细" href="javascript:void(0)">' + res.data[i].sign_cont + '</a>'): res.data[i].sign_cont}</td>
- <td title="业绩总额" class="${res.data[i].basic_money ?'':'baobaonum1'}">${res.data[i].basic_money}</td>
- <td title="无效线索注销量" class="validnumbox ${res.data[i].invalid_no ?'':'baobaonum1'}">${res.data[i].invalid_no}</td>
- <td title="有效线索注销量" class="validnumbox ${res.data[i].invalid_yes ?'':'baobaonum1'}">${res.data[i].invalid_yes}</td>
- <td title="见面注销量" class="validnumbox ${res.data[i].invalid_meet ?'':'baobaonum1'}">${res.data[i].invalid_meet}</td>
- </tr>`;
- }else{
- str+=`<tr id="totalRow">
- <td>${res.data[i].day}</td>
- <td class="${res.data[i].new_cus ? '' : 'baobaonum1'}">${res.data[i].new_cus}</td>
- <td class="${res.data[i].jv ? '' : 'baobaonum1'}">${res.data[i].jv}</td>
- <td class="${res.data[i].jv_percen ? '' : 'baobaonum1'}">${res.data[i].jv_percen}</td>
- <td class="sum_youxiao ${res.data[i].jq ? '' : 'baobaonum1'}">${res.data[i].jq}</td>
- <td class="sum_youxiao_percent ${res.data[i].jq_percen ? '' : 'baobaonum1'}">${res.data[i].jq_percen}%</td>
- <td class="sum_daofang ${res.data[i].meet_cont ? '' : 'baobaonum1'}">${res.data[i].meet_cont}</td>
- <td class="${res.data[i].deposit_cont ?'':'baobaonum1'}">${res.data[i].deposit_cont}</td>
- <td class="${res.data[i].sign_cont ?'':'baobaonum1'}">${res.data[i].sign_cont}</td>
- <td class="${res.data[i].basic_money ?'':'baobaonum1'}">${res.data[i].basic_money}</td>
- <td class="validnumbox ${res.data[i].invalid_no?'':'baobaonum1'}">${res.data[i].invalid_no}</td>
- <td class="validnumbox ${res.data[i].invalid_yes ?'':'baobaonum1'}">${res.data[i].invalid_yes}</td>
- <td class="validnumbox ${res.data[i].invalid_meet ?'':'baobaonum1'}">${res.data[i].invalid_meet}</td>
- </tr>`;
- }
- }
- $('.tbodybox').html(str);
- if (!validtype) {
- for (let j = 0; j < $('.validnumbox').length; j++) {
- $($('.validnumbox')[j]).hide();
- }
- } else {
- for (let j = 0; j < $('.validnumbox').length; j++) {
- $($('.validnumbox')[j]).show();
- }
- }
- $(".maintable td").mouseover(function () {
- if ($(this).text() == 0 || $(this).text() > 999999999) { $(this).html($(this).text()) }
- if ($(this).children("a").length > 0) { $(this).addClass("ablock2"); }
- }).mouseout(function () { $(this).removeClass("ablock2"); });
- $('.divlayer').on('click', function () {
- // date=>2022-11-14 - 2022-11-24
- let date= $(this).attr('time');
- if(!date){
- date= res.data[res.data.length-2].day +' 到 '+ res.data[0].day;
- }else{
- date= date + ' 到 ' + date;
- }
- layer.open({
- type: 2,
- title: $(this).attr('title'),
- shadeClose: true,
- scrollbar: false,
- shade: 0.8,
- area: ['99%', '96%'],
- content: "{:url('community/new_daily_detail')}?date="+ date +'&empid='+ $(this).attr('empid') +'&state='+ $(this).attr('text') +'&orgid='+ $(this).attr('orgid'),
- });
- });
- }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<10?'0'+month2:month2);
- return preMonth;
- }
- </script>
- {/block}
|