123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017 |
- {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: 180px;
- 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;
- z-index:99;
- }
- .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%;
- 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;
- position: relative;
- }
- .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;
- }
- .wdatefast {
- width: 290px;
- height: 35px;
- line-height: 35px;
- top: 38px;
- right: 48px;
- position: absolute;
- background-color: #FCFCFC;
- text-indent: 20px;
- font-family: Arial;
- }
- .wdatefast a {
- padding-left: 6px;
- padding-right: 6px;
- }
-
- .psinput{top:73px;left:0;width:236px;background: #fff;z-index: 999;position: absolute;box-shadow: 0 1px 10px #999;display: none;border-radius: 6px;overflow: visible;padding-top: 10px;}
- .dsa{width:100%;height: 100%;display:block;}
- .pdl12{padding-left:12px;}
- .search_btns{margin-top:11px;border-top:1px solid #ccc;}
- .search_btns div.button_{display: flex;width:80%;overflow: hidden;margin:0 auto;justify-content:space-between;padding: 5px 0;}
- .search_btns div.button_ a{cursor:pointer;}
- .scroll_body{overflow-x:auto;width:calc(100% - -17px)}
- .layui-table-body{overflow: visible;}
- .layui-form-select dl{z-index: 100;}
- .kwovsint{width:90%;height: 40px;display: block;border:1px solid #409EFF;border-radius: 6px;margin: 0 auto 6px;}
- .checkbox{width:20px;height: 20px;margin-top:15px;display: block;float:left;}
- .checkdeta{width:20px;height: 20px;margin-top:15px;display: block;float:left;}
- .psinput .layui-form-checkbox{display:block;float:left;width:20px;height: 20px;padding:0;}
- .psinput .layui-form-checkbox .layui-icon{display:block;float:left;width:20px !important;height: 20px !important;border: 1px solid #d2d2d2 !important;top:1px;position: unset !important;}
- .psinput .layui-form-checkbox .layui-icon::before{position: absolute;top:-4px;left:3px;font-size:14px;}
- .check_ul_list{max-height: 300px;overflow-y: auto;}
- .check_li{width:90%;margin:0 auto;overflow: hidden;}
- .check_li li{overflow: hidden;margin-bottom: 15px;}
- .check_name{float:left;line-height: 20px;font-size: 14px;margin-left:8px;}
- .dsnone .layui-form-checkbox{position: absolute;width: 25px;height: 28px;margin-top: 8px;visibility: hidden;}
- .button_ a{position:relative;}
- .triangle{width: 0; height: 0;float: left;border-bottom: 10px solid #fff;border-left: 10px solid transparent;border-right: 10px solid transparent;position: absolute;top: -10px;left: 14%;margin-left: -10px;}
- .psinput02{width:330px !important;margin-left: -165px !important;}
- .psinput02 .selecstDateBox{position: inherit !important;box-shadow:none;margin-top:5px;height: 80px !important;}
- .mapps{position: absolute;right:3%;top:13px;width:16px;}
- .checkAlls,.nocheckAlls,.btnbtn5,.mapps{cursor: pointer;}
- .mapps{position: absolute;right:3%;top:15px;width:12px;}
- ::-webkit-scrollbar {
- width: 4px;
- height: auto;
- }
-
- ::-webkit-scrollbar-thumb {
- border-radius: 1px;
- -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
- background: #DFDFDF;
- }
-
- ::-webkit-scrollbar-track {
- -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
- border-radius: 1px;
- background: #f5f5f5;
- }
- /* #fixedHeader {
- position: sticky;
- top: 0px !important;
- background-color: #F2F3F7 !important;
- z-index: 9999;
- } */
- .tableBoxStyle {
- width: 100%;
- height: calc(100vh - 300px);
- overflow-y: auto;
- position: relative;
- margin-top: -75px;
- }
- .fixedTopPosition {
- position: absolute !important;
- top: 0px !important;
- }
- </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;">
- <select class="left validbox" name="org_id1" id="org_id1" >
- <option value="">==部门==</option>
- {volist name="org_list" id="vo"}
- <option value="{$vo.id}">{$vo.name}</option>
- {/volist}
- </select>
- <select class="left" name="employee_id" id="employee_id1">
- <option value="">==业务员==</option>
- {volist name="emplist" id="vo"}
- <option value="{$vo.id}">{$vo.name}</option>
- {/volist}
- </select>
- <select class="left validbox" name="wuxiao" id="valid">
- <option value="">==包含==</option>
- <option value="1">统计无效</option>
- <option value="2">统计推广</option>
- </select>
- <input name="nowyear" type="text" id="nowyear1" class="wdatebtn left" readonly="readonly" placeholder="开始时间 到 结束时间">
- <button id="searchbtn1" class="btn left" type="button">查 看</button>
- <div class="wdatefast">
- 推荐检索:
- <a class="nowmonth" href="javascript:void(0)">本月度</a>
- <a class="lastmonth" href="javascript:void(0)">上个月</a>
- </div>
- </div>
- </div>
- <div class="wdatepicker2 tcenter">
- <div id="seafrom" class="inline-block clearfix" style="margin:0px">
- <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" name="employee_id" id="employee_id" lay-search>
- <option value="">==业务员==</option>
- {volist name="emplist" id="vo"}
- <option value="{$vo.id}">{$vo.name}</option>
- {/volist}
- </select>
- <select class="left" name="wuxiao" id="wuxiao">
- <option value="">==包含==</option>
- <option value="1">统计无效</option>
- <option value="2">统计推广</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}各客户来源报表</h1>
- <table class="maintable tableother" style="position: relative;z-index: 999;padding-right: 4px !important;">
- <thead id="fixedHeader1">
- <tr>
- <th class="names" rowspan="2" width="70"></th>
- <th rowspan="2">推广<br>消费</th>
- <th class="extendbox" colspan="4" style="display:none;">推广数据</th>
- <th colspan="13">基本数据</th>
- <th rowspan="2" width="65" class="hidetd">ROI</th>
- <th colspan="3" class="validnumbox" style="display:none;">注销</th>
- </tr>
- <tr>
- <th style="display:none;" class="thtopline extendbox">展现</th>
- <th style="display:none;" class="thtopline extendbox">点击</th>
- <th style="display:none;" class="thtopline extendbox">点击率</th>
- <th style="display:none;" class="thtopline extendbox" 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">业绩总额</th>
- <th class="thtopline">均单值</th>
- <th style="display:none;" class="thtopline fontnormal validnumbox" title="有效线索">无效</th>
- <th style="display:none;" class="thtopline fontnormal validnumbox">见面</th>
- <th style="display:none;" class="thtopline fontnormal validnumbox">定金</th>
- </tr>
- </thead>
- <tbody id="tbodybox1" style="display: none;">
-
- </tbody>
- </table>
- <div class="tableBoxStyle">
- <table class="maintable tableother">
- <thead id="fixedHeader">
- <tr>
- <th class="names" rowspan="2" width="70"></th>
- <th rowspan="2">推广<br>消费</th>
- <th class="extendbox" colspan="4" style="display:none;">推广数据</th>
- <th colspan="13">基本数据</th>
- <th rowspan="2" width="65" class="hidetd">ROI</th>
- <th colspan="3" class="validnumbox" style="display:none;">注销</th>
- </tr>
- <tr>
- <th style="display:none;" class="thtopline extendbox">展现</th>
- <th style="display:none;" class="thtopline extendbox">点击</th>
- <th style="display:none;" class="thtopline extendbox">点击率</th>
- <th style="display:none;" class="thtopline extendbox" 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">业绩总额</th>
- <th class="thtopline">均单值</th>
- <th style="display:none;" class="thtopline fontnormal validnumbox" title="有效线索">无效</th>
- <th style="display:none;" class="thtopline fontnormal validnumbox">见面</th>
- <th style="display:none;" class="thtopline fontnormal validnumbox">定金</th>
- </tr>
- </thead>
- <tbody id="tbodybox">
-
- </tbody>
- </table>
- </div>
- </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',"form"], function () {
- var table = layui.table, laydate = layui.laydate,
- form=layui.form,$ = layui.$;
- let date=new Date();
- let year=date.getFullYear();
- let month = date.getMonth()*1+1;
- let time='', validtype='',employee_id='',org_id='';
- var field = {
- 'names' : ''
- };
- laydate.render({
- elem: '#nowyear' //指定元素
- , type: 'date'
- , range: '到'
- , trigger: 'click'//呼出事件改成click
- , max:0
- });
-
- if (window.performance) {
- localStorage.setItem('data','');
- }
-
- $('.nowyearbtn').click(function () {
- let date = new Date();
- let year = date.getFullYear();
- time = year + '-1-1' + ' 到 ' + year+'-12-31';
- employee_id=$('#employee_id').val();
- validtype = $('#wuxiao').val();
- org_id = $('#orgid').val();
- laydate.render({
- elem: '#nowyear1'
- , type: 'date'
- , range: '到'
- , trigger: 'click'//呼出事件改成click
- , value: time
- , max:0
- });
- $('.wdatepicker2').hide();
- $('.wdatepicker').show();
- $('.tablemsgbox').show();
- dailyfun(time);
- })
- //监听部门选项
- $('#org_id1').change(function(){
- let org_id = $(this).val();
- $.ajax({
- url: '{:url("ManagerEmp/seL_emplist")}'
- , data: {
- org_id: org_id
- }
- , type: 'post'
- , success: function (res) {
- if(res.code === 0) {
- setHtml(res.data,1)
- }else if(res.code == 403){
- $(".exitbtn").trigger("click");
- } else {
-
- }
- }
- })
- });
- //监听部门选项
- $('#org_id').change(function(){
- let org_id = $(this).val();
- $.ajax({
- url: '{:url("ManagerEmp/seL_emplist")}'
- , data: {
- org_id: org_id
- }
- , type: 'post'
- , success: function (res) {
- if(res.code === 0) {
- setHtml(res.data,'')
- }else if(res.code == 403){
- $(".exitbtn").trigger("click");
- } else {
-
- }
- }
- })
- });
- function setHtml(emplist,type)
- {
- $("#employee_id"+type).empty();
- let html = '<option value="">==业务员==</option>';
- emplist.map((v, i) => {
- html+=`<option value="${v.id}">${v.name}</option>`;
- })
- $("#employee_id"+type).append(html);
- }
- $('.lastmonth').click(function () {
- employee_id=$('#employee_id').val();
- validtype = $('#wuxiao').val();
- org_id = $("#org_id").val();
- const getLastMonthLast = () => {
- const date = new Date()
- // 获取上个月的最后一天是几号day
- const day = new Date(date.getFullYear(), date.getMonth(), 0).getDate()
- const enddate = new Date(date.getFullYear(), date.getMonth() - 1, day)
- return enddate
- }
- $('.wdatefast').show();
- time = getPreMonth()+'-1 到 '+ getPreMonth()+'-'+ getLastMonthLast().getDate();
-
- laydate.render({
- elem: '#nowyear1' //指定元素
- , type: 'date'
- , range: '到'
- , trigger: 'click'//呼出事件改成click
- , value: time
- , max:0
- });
- $('.wdatepicker2').hide();
- $('.wdatepicker').show();
- $('.tablemsgbox').show();
- dailyfun(time);
- })
- $('.nowmonth').click(function () {
- employee_id=$('#employee_id').val();
- validtype = $('#wuxiao').val();
- org_id = $("#org_id").val();
- let date = new Date();
- let year = date.getFullYear();
- let month = date.getMonth() * 1 + 1;
- time = year+'-'+ month+'-1'+ ' 到 ' + getLastDay();
- laydate.render({
- elem: '#nowyear1' //指定元素
- , type: 'date'
- , range: '到'
- , value: time
- , trigger: 'click'//呼出事件改成click
- , max:0
- });
- $('.wdatepicker2').hide();
- $('.wdatepicker').show();
- $('.tablemsgbox').show();
- dailyfun(time);
- })
- $("#searchbtn1").click(function () {
- if (!$('#nowyear1').val()) {
- alert('提示:请务必选择统计时间')
- return false;
- }
- validtype= $('#valid').val();
- time = $('#nowyear1').val();
- employee_id=$('#employee_id1').val();
- org_id = $('#org_id1').val();
- $('.month').html(time.split('-')[1]);
- laydate.render({
- elem: '#nowyear1' //指定元素
- , type: 'date'
- , range: '到'
- , value: time
- , trigger: 'click'//呼出事件改成click
- , max:0
- });
- $('.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_id').val();
- org_id = $('#org_id').val();
- laydate.render({
- elem: '#nowyear1' //指定元素
- , type: 'date'
- , range: '到'
- , value: time
- , trigger: 'click'//呼出事件改成click
- , max:0
- });
- $('.wdatepicker2').hide();
- $('.wdatepicker').show();
- $('.tablemsgbox').show();
- dailyfun(time);
- })
- resizefun = function () {
- dailyfun(time);
- };
- reload = function () {
- dailyfun(time);
- };
-
-
-
- // select
- var selHtml = `<div class="wpsa psinput">
- <div class="triangle"></div>
- <form class="layui-form">
- <input class="pdl12 kwovsint" id="select_check" placeholder="输入关键字....." type="text" id=""/>
- <div class="check_li">
- <div style="overflow:hidden;padding-bottom:5px;text-align: left;">
- <span class="checkAlls href">全选</span>
- <span style="margin:0 10px;">/</span>
- <span class="nocheckAlls href">清除</span>
- </div>
- <ul class="check_ul_list">
- {volist name="source_list" id="vo"}
- <li class="check_li_">
- <input class="checkbox" type="checkbox" name="check_m" lay-filter="checkall02" value="{$vo.id}">
- <p class="check_name">{$vo.source}</p>
- </li>
- {/volist}
- </ul>
- </div>
- <div class="search_btns">
- <div class="button_">
- <a class="submitbtn">确定</a>
- <a class="dsnonebtn">取消</a>
- </div>
- </div>
- </form>
- </div>`;
- function localS(){
- if(localStorage.getItem('data')){
- var bodyjson = JSON.parse(localStorage.getItem('data'));
- if(bodyjson){
- if(bodyjson['names']){
- $('.names').find('img.mapps').attr('src','__STATIC__/img/search_ico02.png');
- var checkarrs = bodyjson['names'].split(',');
- $.each(checkarrs,function(iiii,vvvv){
- $('.names').find('.check_ul_list li').each(function(ii,vvv){
- if(vvvv==$(this).find('input').val()){
- $('.names').find('.check_ul_list li').eq(ii).find('input[type="checkbox"]').prop('checked',true)
- }
- })
- })
- }else{
- $('.names').find('img.mapps').attr('src','__STATIC__/img/search_ico01.png');
- }
- }
- form.render('checkbox');
- }
- }
-
-
- function searchHtmlBody(){
- setTimeout(function(){
- apphtml02($('.names'),selHtml);
- localS();
- },100)
- function apphtml02(this_,htmlbox){
- this_.html('');
- this_.addClass('is_show');
- this_.prepend('<span class="btnbtn5 dsa" data-isshow="1">客户<br>来源</span><img class="mapps" src="__STATIC__/img/search_ico01.png"/>');
- this_.append(htmlbox);
- form.render();
- setTimeout(function(){
- var search_input = this_.find("#select_check"),
- search_content =this_.find(".check_li_");
- $(search_input).on("keyup", function() {
- this_.find(".check_li_").hide().filter(":contains("+ search_input.val().trim() +")").show();
- });
- function stopPropagation(e) {
- if (e.stopPropagation)
- e.stopPropagation();
- else
- e.cancelBubble = true;
- }
-
- this_.find('.dsnonebtn').on('click',function(){
- this_.find('.psinput').hide();
- this_.find('.btnbtn5').attr('data-isshow',1);
- this_.find('input').val('');
- })
-
- var isradio = 1;
- this_.find('.btnbtn5,.mapps').on('click',function(e){
- $('.is_show').find('.psinput').hide();
- if($(this).attr('data-isshow')==1){
- $(this).siblings('.psinput').show();
- $(this).attr('data-isshow',0)
- }else{
- $(this).siblings('.psinput').hide();
- $(this).attr('data-isshow',1)
- }
- })
-
-
- this_.find('.checkAlls').on('click',function(){
- this_.find('.checkbox').each(function (index, item) {
- this_.find('.checkbox').eq(index).prop('checked','checked')
- });
- form.render('checkbox');
- })
- this_.find('.nocheckAlls').on('click',function(){
- this_.find('.checkbox').each(function (index, item) {
- this_.find('.checkbox').eq(index).prop('checked','')
- });
- form.render('checkbox');
- })
- this_.find('.submitbtn').on('click',function(){
- var arr = new Array();
- this_.find("input:checkbox:checked").each(function(i){
- arr[i] = $(this).val();
- });
- var datastr = arr.join(",");
- field['names'] = datastr;
- dailyfun(time,datastr);
- if (this_.find('input.kwovsint').val() && !field['names']) {
- layer.msg('请选择内容', {anim: 1000,time: 1000,});
- return;
- }
- var datas=JSON.stringify(field);
- localStorage.setItem('data',datas);
- localS();
- $(this).parents('.psinput').hide();
- this_.find('.btnbtn5').attr('data-isshow',1);
- })
- // $(document).bind('click',function(){
- // this_.find('.psinput').hide();
- // this_.find('.btnbtn5').attr('data-isshow',1);
- // });
- this_.find('th').on('click',function(e){
- stopPropagation(e);
- })
- },100)
- }
- }
- // select
-
-
-
-
-
- function dailyfun(time,names) {
- $('#loading-mask').show();
- $.ajax({
- url: '{:url("ManagerEmp/account_report")}'
- , data: {
- date: time,
- source_id:names,
- employee_id:employee_id,
- org_id:org_id
- }
- , type: 'post'
- , success: function (res) {
- if (res.code == 0) {
- let str="";
- if(validtype==1){
- for (let j = 0; j < $('.validnumbox').length; j++) {
- $($('.validnumbox')[j]).show();
- }
- for (let j = 0; j < $('.extendbox').length; j++) {
- $($('.extendbox')[j]).hide();
- }
- }else if(validtype==2){
- for(let j=0;j<$('.validnumbox').length;j++){
- $($('.validnumbox')[j]).hide();
- }
- for (let j = 0; j < $('.extendbox').length; j++) {
- $($('.extendbox')[j]).show();
- }
- }else{
- for(let j=0;j<$('.validnumbox').length;j++){
- $($('.validnumbox')[j]).hide();
- }
- for (let j = 0; j < $('.extendbox').length; j++) {
- $($('.extendbox')[j]).hide();
- }
- }
- for(let i in res.data){
- if(res.data[i].name!='求和'){
- str+=`<tr>
- <td>${res.data[i].name}</td>
- <td title="推广消费" class="${res.data[i].exten_money?'':'baobaonum1'}">${res.data[i].exten_money}</td>
-
- <td style="display:none;" title="展现量" class="${res.data[i].exten_show?'':'baobaonum1'} extendbox">${res.data[i].exten_show}</td>
- <td style="display:none;" title="点击量" class="${res.data[i].exten_click?'':'baobaonum1'} extendbox">${res.data[i].exten_click}</td>
- <td style="display:none;" title="点击率" class="${res.data[i].click_percen?'':'baobaonum1'} extendbox">${res.data[i].click_percen}</td>
- <td style="display:none;" title="点击转化比例" class="${res.data[i].clue_conversion?'':'baobaonum1'} extendbox">${res.data[i].clue_conversion}</td>
-
- <td title="线索量" class="${res.data[i].clue_cont?'':'baobaonum1'}">
- ${res.data[i].clue_cont?'<a class="divlayer" text="线索" org_id="'+res.data[i].org_id+'" employee_id="'+res.data[i].employee_id+'" source_id="'+res.data[i].id+'" title="'+time+'客户线索明细" href="javascript:void(0)" >'+res.data[i].clue_cont+'</a>':'0'}
- </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?'<a class="divlayer" text="有效" org_id="'+res.data[i].org_id+'" employee_id="'+res.data[i].employee_id+'" source_id="'+res.data[i].id+'" title="'+time+'有效线索明细" href="javascript:void(0)" >'+res.data[i].valid_cont+'</a>':'0'}
- </td>
- <td title="有效单价" class="${res.data[i].valid_money?'':'baobaonum1'}">${res.data[i].valid_money}</td>
- <td title="有效率" class="${res.data[i].valid_percen?'':'baobaonum1'} youxiao_percent">${res.data[i].valid_percen}%</td>
- <td title="见面量" class="${res.data[i].meet_cont?'':'baobaonum1'}">
- ${res.data[i].meet_cont?'<a class="divlayer" org_id="'+res.data[i].org_id+'" employee_id="'+res.data[i].employee_id+'" source_id="'+res.data[i].id+'" text="到访" title="'+time+'见面线索客户明细" href="javascript:void(0)" >'+res.data[i].meet_cont+'</a>':'0'}
- </td>
- <td title="见面率" class="${res.data[i].meet_percen?'':'baobaonum1'} jianmian_percent">${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?'<a class="divlayer" org_id="'+res.data[i].org_id+'" employee_id="'+res.data[i].employee_id+'" source_id="'+res.data[i].id+'" text="交定" title="'+time+'定金客户明细" href="javascript:void(0)" >'+res.data[i].deposit_cont+'</a>':'0'}
- </td>
- <td title="成单率" class="${res.data[i].deposit_percen?'':'baobaonum1'} chengdan_percent">${res.data[i].deposit_percen}%</td>
- <td title="施工合同量" class="${res.data[i].sign_cont?'':'baobaonum1'}">
- ${res.data[i].sign_cont?'<a class="divlayer" org_id="'+res.data[i].org_id+'" employee_id="'+res.data[i].employee_id+'" source_id="'+res.data[i].id+'" text="签单" title="'+time+'签单客户明细" href="javascript:void(0)" >'+res.data[i].sign_cont+'</a>':'0'}
- </td>
- <td class="${res.data[i].basic_money?'':'baobaonum1'}" title="业绩总额">${res.data[i].basic_money}</td>
- <td class="${res.data[i].sign_agv_money?'':'baobaonum1'}" title="均单值">${res.data[i].sign_agv_money}</td>
- <td title="ROI" class="hidetd ${res.data[i].ROI?'':'baobaonum1'}">${res.data[i].ROI}%</td>
- <td style="display:none;" class="validnumbox ${res.data[i].invalid_no?'':'baobaonum1'}" title="无效注销量" >${res.data[i].invalid_no}</td>
- <td style="display:none;" class="validnumbox ${res.data[i].invalid_meet?'':'baobaonum1'}" title="见面注销量" >${res.data[i].invalid_meet}</td>
- <td style="display:none;" class="validnumbox ${res.data[i].invalid_deposit?'':'baobaonum1'}" title="定金注销量" >${res.data[i].invalid_deposit}</td>
- </tr>`;
- }else{
- str+=`<tr>
- <td >${res.data[i].name}</td>
- <td title="推广消费" class="${res.data[i].invalid_meet?'':'exten_money'}">${res.data[i].exten_money}</td>
-
- <td style="display:none;" title="展现量" class="${res.data[i].exten_show?'':'exten_money'} extendbox">${res.data[i].exten_show}</td>
- <td style="display:none;" title="点击量" class="${res.data[i].exten_click?'':'exten_money'} extendbox">${res.data[i].exten_click}</td>
- <td style="display:none;" title="点击率" class="${res.data[i].click_percen?'':'exten_money'} extendbox">${res.data[i].click_percen}</td>
- <td style="display:none;" title="点击转化比例" class="${res.data[i].clue_conversion?'':'exten_money'} extendbox">${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="hidetd ${res.data[i].ROI?'':'baobaonum1'}">${res.data[i].ROI}%</td>
- <td style="display:none;" class="validnumbox ${res.data[i].invalid_no?'':'baobaonum1'}" title="无效注销量">${res.data[i].invalid_no}</td>
- <td style="display:none;" class="validnumbox ${res.data[i].invalid_meet?'':'baobaonum1'}" title="见面注销量">${res.data[i].invalid_meet}</td>
- <td style="display:none;" class="validnumbox ${res.data[i].invalid_deposit?'':'baobaonum1'}" title="定金注销量">${res.data[i].invalid_deposit}</td>
- </tr>`;
- }
- }
- $('#tbodybox').html(str);
- $('#tbodybox1').html(str);
- searchHtmlBody();
- if(validtype==1){
- for (let j = 0; j < $('.validnumbox').length; j++) {
- $($('.validnumbox')[j]).show();
- }
- for (let j = 0; j < $('.extendbox').length; j++) {
- $($('.extendbox')[j]).hide();
- }
- }else if(validtype==2){
- for(let j=0;j<$('.validnumbox').length;j++){
- $($('.validnumbox')[j]).hide();
- }
- for (let j = 0; j < $('.extendbox').length; j++) {
- $($('.extendbox')[j]).show();
- }
- }else{
- for(let j=0;j<$('.validnumbox').length;j++){
- $($('.validnumbox')[j]).hide();
- }
- for (let j = 0; j < $('.extendbox').length; j++) {
- $($('.extendbox')[j]).hide();
- }
- }
- $(".maintable td").mouseover(function () {
- //if ($(this).text() == 0 || $(this).text() > 500) { $(this).html($(this).text()) }
- if ($(this).children("a").length > 0) { $(this).addClass("ablock2"); }
- }).mouseout(function () { $(this).removeClass("ablock2"); });
- $('.divlayer').on('click', function () {
- let date= time;
- layer.open({
- type: 2,
- title: $(this).attr('title'),
- shadeClose: true,
- scrollbar: false,
- shade: 0.8,
- area: ['99%', '96%'],
- content: "{:url('manager_emp/account_detail')}?date="+ date +'&source_id='+$(this).attr('source_id')+'&state='+ $(this).attr('text')+'&employee_id='+ $(this).attr('employee_id')+'&org_id='+$(this).attr('org_id'),
- });
- });
- }else if(res.code == 403){
- $(".exitbtn").trigger("click");
- } else {
- alert(res.msg)
- }
- $('#loading-mask').hide();
- }
- });
- }
-
- })
- // 本月最后一天
- function getLastDay() {
- var y = new Date().getFullYear(); //获取年份
- var m = new Date().getMonth() + 1; //获取月份
- var d = new Date(y, m, 0).getDate(); //获取当月最后一日
- m = m < 10 ? '0' + m : m; //月份补 0
- d = d < 10 ? '0' + d : d; //日数补 0
- return [y, m, d].join("-")
- }
- 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}
|