12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052 |
- {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%;
- 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;}
- xm-select{
- height: 28px;
- min-height: 28px;
- line-height: 28px;
- }
- xm-select .xm-label .scroll .label-content {
- padding: 2px 10px;
- line-height: 22px;
- }
- xm-select .xm-label .xm-label-block{
- height: 22px;
- line-height: 22px;
- margin: 0 5px;
- }
- </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> -->
- <div class="left" style="width: 200px;">
- <div id="rangeDepart1" class="wleft"></div>
- </div>
- <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 data-type="2" class="nowmonth" href="javascript:void(0)">本月度</a>
- <a data-type="2" 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> -->
- <div class="left" style="width: 200px;">
- <div id="rangeDepart" class="wleft"></div>
- </div>
- <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 data-type="1" class="nowmonth" href="javascript:void(0)">本月度</a>
- <a data-type="1" 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">
- <thead>
- <tr>
- <th class="names" rowspan="2" width="180"></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" title="套餐整装或基础合同额">基本金额</th>
- <th class="thtopline" title="软装、电器、定制等合同额">其他金额</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" title="无效线索">有效</th> -->
- <th style="display:none;" class="thtopline fontnormal validnumbox">见面</th>
- <th style="display:none;" class="thtopline fontnormal validnumbox">定金</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>
- <div id="loading-mask">
- <div><img src="__STATIC__/img/large-loading.gif" />
- <p>...加载中...</p>
- </div>
- </div>
- </body>
- <script src="__LAYUI__/layui/layui.js"></script>
- <script src="__STATIC__/layui/layui/lay/modules/xm-select.js" type="text/javascript" charset="utf-8"></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','');
- }
- var departTree = xmSelect.render({
- el: "#rangeDepart",
- name: 'org',
- autoRow: true,
- filterable: true,
- tips: '请选择',
- radio: true,
- tree: {
- show: true,
- showFolderIcon: true,
- showLine: true,
- indent: 20,
- expandedKeys: [ -3 ],
- //是否严格遵守父子模式
- strict: false,
- },
- height: "200px",
- data: [],
- on:function(data){
- let obj= data.arr;
- let org_id = '';
- if(obj.length != 0) org_id = obj[0].value;
- $.ajax({
- url: '{:url("ManagerEmp/seL_emplist")}'
- , data: {
- org_id
- }
- , type: 'post'
- , success: function (res) {
- if(res.code === 0) {
- setHtml(res.data,'')
- setHtml(res.data,'1')
- }else if(res.code == 403){
- $(".exitbtn").trigger("click");
- } else {
-
- }
- }
- })
- }
- });
- var departTree1 = xmSelect.render({
- el: "#rangeDepart1",
- name: 'org',
- autoRow: true,
- filterable: true,
- tips: '请选择',
- radio: true,
- tree: {
- show: true,
- showFolderIcon: true,
- showLine: true,
- indent: 20,
- expandedKeys: [ -3 ],
- //是否严格遵守父子模式
- strict: false,
- },
- height: "200px",
- data: [],
- on:function(data){
- let obj= data.arr;
- let org_id = '';
- if(obj.length != 0) org_id = obj[0].value;
- $.ajax({
- url: '{:url("ManagerEmp/seL_emplist")}'
- , data: {
- org_id
- }
- , type: 'post'
- , success: function (res) {
- if(res.code === 0) {
- setHtml(res.data,1)
- }else if(res.code == 403){
- $(".exitbtn").trigger("click");
- } else {
-
- }
- }
- })
- }
- });
-
- $.ajax({
- url: '{:url("managerEmp/get_person")}',
- type: "post",
- data: {},
- success: function(res) {
- departTree.update({data:res})
- departTree1.update({data:res})
- }
- })
-
- 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);
- }
- $('#employee_id').change(function(){
- $('#employee_id1').val($(this).val());
- });
- $('.lastmonth').click(function (e) {
- let type=e.target.dataset.type;
- if(type==1){
- let obj= departTree.getValue();
- departTree1.setValue(obj)
- if(obj.length == 0) org_id='';
- else org_id = obj[0].value;
- }else{
- org_id = departTree1.getValue('value')[0];
- }
- employee_id=$('#employee_id').val();
- validtype = $('#wuxiao').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
- });
- $('#employee_id1').val(employee_id);
- $('.wdatepicker2').hide();
- $('.wdatepicker').show();
- $('.tablemsgbox').show();
- dailyfun(time);
- })
- $('.nowmonth').click(function (e) {
- let type=e.target.dataset.type;
- if(type==1){
- let obj= departTree.getValue();
- departTree1.setValue(obj)
- if(obj.length == 0) org_id='';
- else org_id = obj[0].value;
- }else{
- org_id = departTree1.getValue('value')[0];
- }
- employee_id=$('#employee_id').val();
- validtype = $('#wuxiao').val();
-
- $('#employee_id1').val(employee_id);
- 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 = departTree1.getValue('value')[0];
- $('.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;
- }
- let obj= departTree.getValue();
- departTree1.setValue(obj)
- validtype = $('#wuxiao').val();
- time= $('#nowyear').val();
- employee_id=$('#employee_id').val();
- org_id = departTree.getValue('value')[0];
- $('#employee_id1').val(employee_id);
- 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'));
- localS();
- },100)
- function apphtml02(this_,htmlbox){
- this_.html('');
- this_.addClass('is_show');
- this_.prepend('<span class="btnbtn5 dsa" data-isshow="1">账户来源</span>');
- 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("Empcrm/fish_total")}'
- , data: {
- date: time,
- source_id:names,
- employee_id:employee_id,
- org_id:org_id&&org_id!='undefined'?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="divlayers" text="飞鱼线索" 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}
- </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" 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" 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" 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);
- 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"); });
- $('.divlayers').on('click', function () {
- var employee_id = $('#employee_id').val();
- var org_id = departTree.getValue('value')[0];
- var employee_id1 = $('#employee_id1').val();
- var org_id1 = departTree1.getValue('value')[0];
- var end_employee_id = employee_id1 > 0 ? employee_id1 : employee_id;
- var end_org_id = org_id1 > 0 ? org_id1 : org_id;
- let date= time;
- layer.open({
- type: 2,
- title: $(this).attr('title'),
- shadeClose: true,
- scrollbar: false,
- shade: 0.8,
- area: ['99%', '96%'],
- content: "{:url('empcrm/fish_detail')}?date="+ date +'&source_id='+$(this).attr('source_id')+'&state='+ $(this).attr('text')+'&employee_id='+ end_employee_id +'&org_id='+ (end_org_id&&end_org_id!='undefined'?end_org_id:''),
- });
- });
- $('.divlayer').on('click', function () {
- var employee_id = $('#employee_id').val();
- var org_id = departTree.getValue('value')[0];
- var employee_id1 = $('#employee_id1').val();
- var org_id1 = departTree1.getValue('value')[0];
- var end_employee_id = employee_id1 > 0 ? employee_id1 : employee_id;
- var end_org_id = org_id1 > 0 ? org_id1 : org_id;
- let date= time;
- var employee_id1 = $('#employee_id1').val();
- layer.open({
- type: 2,
- title: $(this).attr('title'),
- shadeClose: true,
- scrollbar: false,
- shade: 0.8,
- area: ['99%', '96%'],
- content: "{:url('manager_emp/account_detail_fish')}?date="+ date +'&source_id='+$(this).attr('source_id')+'&state='+ $(this).attr('text')+'&employee_id='+ end_employee_id +'&org_id='+(end_org_id&&end_org_id!='undefined'?end_org_id:''),
- });
- });
- } 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}
|