1
0

chunk-747cf560.0a738c58.js 13 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-747cf560"],{1565:function(t,e,i){"use strict";i.r(e);var a,s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"xq-statistics-page"},[a("mescroll-vue",{ref:"wordListBox",staticClass:"customerBoxmescroll",attrs:{down:t.mescrollDown,up:t.mescrollUp},on:{init:t.mescrollInit}},[a("div",{staticClass:"xq-header-box"},[a("statisticstop",{attrs:{orgName:t.totalObj.org_name,type:t.activeIndex},on:{switchDate:t.switchDate}})],1),a("div",{staticClass:"xq-callup-main"},[a("div",{staticClass:"xq-callup-item mb0 radius10"},[a("div",{staticClass:"xq-measure-total flex align-center justify-between"},[a("div",{staticClass:"xq-total-left flex align-center"},[a("div",{staticClass:"xq-total-icon"},[a("img",{attrs:{src:i("fa60"),width:"100%",height:"100%",alt:""}})]),a("span",{staticClass:"font30 color384855 ml10"},[t._v(t._s(t.storeText))])]),a("div",{staticClass:"xq-total-right flex align-center justify-end"},[a("span",{staticClass:"color2476FE font32 fontw700"},[t._v(t._s(t.storeObj.count))])])]),a("div",{staticClass:"xq-callupall-content"},t._l(t.showFieldArr,(function(e,i){return a("div",{directives:[{name:"show",rawName:"v-show",value:!e.hidden,expression:"!item.hidden"}],key:i,style:{width:e.width}},[a("span",{staticClass:"font36"},[t._v(t._s(t.storeObj[e.field])+t._s(e.unity))]),a("span",{staticClass:"mt10 xq-block ellipsis color89A0B7 font24"},[t._v(t._s(e.name))])])})),0)]),a("div",{staticClass:"xq-filter-box flex align-center"},[a("div",{on:{click:function(e){return t.sortFunc("count")}}},[a("span",{class:{"xq-active-filter":t.countActive}},[t._v("到店量")]),a("div",{staticClass:"flex-column align-center justify-center ml5"},[a("i",{staticClass:"iconfont icon-shixinjiantou-xiangshang upicon",class:{sortActive:"count asc"==t.filterObj.order}}),a("i",{staticClass:"iconfont icon-shixinjiantou-xiangshang-copy downicon",class:{sortActive:"count desc"==t.filterObj.order}})])]),a("div",{on:{click:function(e){return t.sortFunc("wc_count")}}},[a("span",{class:{"xq-active-filter":t.wcCountActive}},[t._v("外场转到店")]),a("div",{staticClass:"flex-column align-center justify-center ml5"},[a("i",{staticClass:"iconfont icon-shixinjiantou-xiangshang upicon",class:{sortActive:"wc_count asc"==t.filterObj.order}}),a("i",{staticClass:"iconfont icon-shixinjiantou-xiangshang-copy downicon",class:{sortActive:"wc_count desc"==t.filterObj.order}})])]),a("div",{on:{click:function(e){return t.sortFunc("qd_count")}}},[a("span",{class:{"xq-active-filter":t.qdCountActive}},[t._v("合同量")]),a("div",{staticClass:"flex-column align-center justify-center ml5"},[a("i",{staticClass:"iconfont icon-shixinjiantou-xiangshang upicon",class:{sortActive:"qd_count asc"==t.filterObj.order}}),a("i",{staticClass:"iconfont icon-shixinjiantou-xiangshang-copy downicon",class:{sortActive:"qd_count desc"==t.filterObj.order}})])])]),t._l(t.orgArr,(function(e,i){return a("div",{key:e.id,staticClass:"xq-callup-item",class:{"xq-active-border":t.activeItem==e.id},on:{click:function(i){return t.jumpStorePage(e,"depart")}}},[a("div",{staticClass:"xq-callupall-header flex align-center justify-between font28 color384855"},[a("div",{staticClass:"flex align-center"},[a("div",{staticClass:"xq-vertical"}),a("span",{staticClass:"ml10 font28"},[t._v(t._s(e.name))]),a("span",{staticClass:"font24 color89A0B7 ml10"},[t._v("总"+t._s(e.employee_count)+"人")])]),a("div",{staticClass:"flex align-center justify-end"},[a("span",{staticClass:"color2476FE font24 fontw600"},[t._v(t._s(t.storeText)+":"+t._s(e.count))]),a("van-icon",{attrs:{name:"arrow",color:"#2476FE",size:"16"}})],1)]),a("div",{staticClass:"xq-callupall-content"},t._l(t.showFieldArr,(function(i,s){return a("div",{directives:[{name:"show",rawName:"v-show",value:!i.hidden,expression:"!f.hidden"}],key:s,style:{width:i.width}},[a("span",{staticClass:"font36"},[t._v(t._s(e[i.field])+t._s(i.unity))]),a("span",{staticClass:"mt10 xq-block ellipsis color89A0B7 font24"},[t._v(t._s(i.name))])])})),0)])})),t._l(t.employeeArr,(function(e,s){return a("div",{key:e.id,staticClass:"xq-callup-item",class:{"xq-active-border":t.activeItem==e.id},on:{click:function(i){return t.jumpStorePage(e,"employee")}}},[a("div",{staticClass:"xq-callupall-header flex align-center justify-between font28 color384855"},[a("div",{staticClass:"flex align-center"},[a("div",{staticClass:"xq-staff-avatar"},[e.user&&e.user.headimgurl?[a("img",{attrs:{src:e.user.headimgurl,width:"100%",height:"100%",alt:""}})]:[a("img",{attrs:{src:i("ee87"),width:"100%",height:"100%",alt:""}})]],2),a("span",[t._v(t._s(e.name))])]),a("div",{staticClass:"flex align-center justify-end"},[a("span",{staticClass:"color2476FE font24 fontw600"},[t._v(t._s(t.storeText)+":"+t._s(e.count))]),a("van-icon",{attrs:{name:"arrow",color:"#2476FE",size:"16"}})],1)]),a("div",{staticClass:"xq-callupall-content"},t._l(t.showFieldArr,(function(i,s){return a("div",{directives:[{name:"show",rawName:"v-show",value:!i.hidden,expression:"!f.hidden"}],key:s,style:{width:i.width}},[a("span",{staticClass:"font36"},[t._v(t._s(e[i.field])+t._s(i.unity))]),a("span",{staticClass:"mt10 xq-block ellipsis color89A0B7 font24"},[t._v(t._s(i.name))])])})),0)])})),a("nonedata",{attrs:{len:t.datalength,datashow:t.datashow}})],2)]),a("van-calendar",{attrs:{"allow-same-day":"","min-date":t.minDate,"max-date":t.maxDate,type:"range",color:"#249EFB","default-date":t.defaultDate},on:{confirm:t.onConfirm,opened:t.calendarOpened},model:{value:t.showCalendar,callback:function(e){t.showCalendar=e},expression:"showCalendar"}}),a("wzhload",{directives:[{name:"show",rawName:"v-show",value:t.loadFlag,expression:"loadFlag"}]})],1)},n=[],o=i("d0afc"),r=i("f3f3"),c=i("fc11"),l=(i("6d73"),i("473d")),d=(i("b0c0"),i("d3b7"),i("159b"),i("b64b"),i("e9c4"),i("3ca3"),i("ddb0"),i("99af"),i("4f8e")),u=i("5a0c"),f=i.n(u),h=i("8d6b"),m=i("a92e"),b=i("5880"),v=i("d0af"),p={components:(a={},Object(c["a"])(a,l["a"].name,l["a"]),Object(c["a"])(a,"MescrollVue",h["a"]),Object(c["a"])(a,"nonedata",m["a"]),Object(c["a"])(a,"statisticstop",v["a"]),a),data:function(){return{showCalendar:!1,loadFlag:!1,datashow:!1,activeIndex:"0",activeItem:null,scrollPosition:0,minDate:new Date(2018,0,1),maxDate:new Date,totalObj:{one:{},two:{},three:{}},orgArr:[],employeeArr:[],filterObj:{org_id:"",order:"",start_time:"",end_time:"",times:""},tab:[{name:"今日",type:"0"},{name:"近一周",type:"1"},{name:"近一月",type:"2"},{name:"其他时间",type:"3"}],mescroll:null,mescrollDown:{},mescrollUp:{auto:!1,callback:this.getFuncList,onScroll:this.onScroll,page:{num:0,size:10},htmlLoading:"",htmlNodata:"",noMoreSize:0}}},computed:Object(r["a"])(Object(r["a"])({},Object(b["mapState"])({jumpNewPage:function(t){return t.jumpNewPage}})),{},{datalength:function(){return this.orgArr.length+this.employeeArr.length},defaultDate:function(){return[new Date(this.filterObj.start_time),new Date(this.filterObj.end_time)]},countActive:function(){return"count asc"==this.filterObj.order||"count desc"==this.filterObj.order},wcCountActive:function(){return"wc_count asc"==this.filterObj.order||"wc_count desc"==this.filterObj.order},qdCountActive:function(){return"qd_count asc"==this.filterObj.order||"qd_count desc"==this.filterObj.order},showFieldArr:function(){return 1==this.$route.query.store?[{name:"平均到店周期(天)",field:"days"},{name:"到店率",field:"lv",unity:"%",hidden:!0},{name:"量房转到店",field:"lf_count"},{name:"内场活动到店",field:"nc_count"},{name:"量房转到店平均周期(天)",field:"lf_days",width:"40%"},{name:"外场转到店",field:"wc_count",width:"20%"},{name:"外场转到店平均周期(天)",field:"wc_days",width:"40%"},{name:"业务邀约",field:"xs_yaoyue"},{name:"业务邀约占比",field:"xs_yaoyue_lv"},{name:"设计邀约",field:"sj_yaoyue"},{name:"设计邀约占比",field:"sj_yaoyue_lv"},{name:"合同",field:"qd_count"}]:(this.$route.query.store,[{name:"平均到店周期(天)",field:"days"},{name:"到店率",field:"lv",unity:"%",hidden:!0},{name:"业务邀约",field:"xs_yaoyue"},{name:"业务邀约占比",field:"xs_yaoyue_lv"},{name:"设计邀约",field:"sj_yaoyue"},{name:"设计邀约占比",field:"sj_yaoyue_lv"},{name:"合同",field:"qd_count"}])},storeObj:function(){return 1==this.$route.query.store?this.totalObj.one:2==this.$route.query.store?this.totalObj.two:this.totalObj.three},storeText:function(){return 1==this.$route.query.store?"一次到店数量":2==this.$route.query.store?"二次到店数量":"三次到店数量"}}),mounted:function(){this.initPageData()},activated:function(){this.initPageData()},methods:Object(r["a"])(Object(r["a"])({},Object(b["mapMutations"])(["setJumpNewPage"])),{},{onScroll:function(t,e,i){this.scrollPosition=e},initPageData:function(){var t=this;this.filterObj=Object(r["a"])(Object(r["a"])({},this.filterObj),{},{start_time:f()(new Date).format("YYYY/MM/DD"),end_time:f()(new Date).format("YYYY/MM/DD")});var e=this.$route.query;this.filterObj.org_id=e.orgid?e.orgid:"",this.filterObj.times=e.store;var i=this.getSessionStorage();this.jumpNewPage?this.$nextTick((function(){t.setJumpNewPage(!1),t.switchDate({type:e.dateType||"0"},"jump",e),t.mescroll.scrollTo(0,0)})):i.orgid?(this.scrollPosition=i.position,this.orgArr=i.orgArr,this.employeeArr=i.employeeArr,this.totalObj=i.totalObj,this.filterObj=i.filterObj,this.activeItem=i.itemId,this.activeIndex=i.dateIndex,this.$nextTick((function(){t.mescroll.scrollTo(parseInt(i.position||0),0)}))):this.mescroll.resetUpScroll()},calendarOpened:function(){var t=document.querySelector(".van-calendar__body").scrollTop;document.querySelector(".van-calendar__body").scrollTop=t-1},switchDate:function(t,e,i){switch(this.activeIndex=t.type,t.type){case"0":this.filterObj=Object(r["a"])(Object(r["a"])({},this.filterObj),{},{start_time:f()(new Date).format("YYYY/MM/DD"),end_time:f()(new Date).format("YYYY/MM/DD")}),this.mescroll.resetUpScroll();break;case"1":this.filterObj=Object(r["a"])(Object(r["a"])({},this.filterObj),{},{start_time:this.utils.getCurrentWeekFirstDay(),end_time:this.utils.getCurrentWeekLastDay()}),this.mescroll.resetUpScroll();break;case"2":this.getMonthDate();this.filterObj=Object(r["a"])(Object(r["a"])({},this.filterObj),{},{start_time:this.utils.getmonthfirstday(),end_time:this.utils.getmonthlastday()}),this.mescroll.resetUpScroll();break;case"3":if("jump"==e){var a=i.start_time,s=i.end_time;this.filterObj=Object(r["a"])(Object(r["a"])({},this.filterObj),{},{start_time:a,end_time:s}),this.mescroll.resetUpScroll()}else this.showCalendar=!0;break;default:this.mescroll.resetUpScroll();break}},getWeekDate:function(){var t=new Date,e=t.getTime()-5184e5,i=f()(new Date(e)).format("YYYY/MM/DD"),a=f()(t).format("YYYY/MM/DD");return{start_time:i,end_time:a}},getMonthDate:function(){var t=new Date,e=t.getTime()-2592e6,i=f()(new Date(e)).format("YYYY/MM/DD"),a=f()(t).format("YYYY/MM/DD");return{start_time:i,end_time:a}},onConfirm:function(t){var e=Object(o["a"])(t,2),i=e[0],a=e[1];this.filterObj=Object(r["a"])(Object(r["a"])({},this.filterObj),{},{start_time:f()(i).format("YYYY/MM/DD"),end_time:f()(a).format("YYYY/MM/DD")}),this.mescroll.resetUpScroll(),this.showCalendar=!1},sortFunc:function(t){this.filterObj.order=="".concat(t," asc")?this.filterObj.order="".concat(t," desc"):this.filterObj.order="".concat(t," asc"),this.mescroll.resetUpScroll()},getArrival:function(){var t=this,e=Object(r["a"])({},this.filterObj);Object.keys(e).forEach((function(t){e[t]||delete e[t]})),Object(d["b"])(e).then((function(e){0==e.data.code&&(t.totalObj=e.data.data)}))},getArrivalOrg:function(){var t=this,e=Object(r["a"])({},this.filterObj);Object.keys(e).forEach((function(t){e[t]||delete e[t]})),Object(d["e"])(e).then((function(e){0==e.data.code&&(t.orgArr=e.data.data)}))},setSessionStorage:function(){var t={position:this.scrollPosition,orgArr:this.orgArr,employeeArr:this.employeeArr,totalObj:this.totalObj,filterObj:this.filterObj,orgid:this.filterObj.org_id||"0",itemId:this.activeItem,dateIndex:this.activeIndex};sessionStorage.setItem("store#".concat(this.filterObj.org_id),JSON.stringify(t))},getSessionStorage:function(){var t=sessionStorage.getItem("store#".concat(this.filterObj.org_id))?JSON.parse(sessionStorage.getItem("store#".concat(this.filterObj.org_id))):{};return t},jumpStorePage:function(t,e){if(this.activeItem=t.id,this.setSessionStorage(),this.setJumpNewPage(!0),"depart"==e){var a=(new Date).getTime();this.$$router.addRoute({path:"/".concat(a),name:"".concat(a),component:function(){return i.e("chunk-116fe8aa").then(i.bind(null,"b186"))},meta:{title:"到店统计|".concat(t.name)}}),this.$router.push({path:"/".concat(a),query:{orgid:t.id,type:"depart",dateType:this.activeIndex,start_time:this.filterObj.start_time,end_time:this.filterObj.end_time,store:this.$route.query.store}})}else this.$router.push({path:"/storeCus",query:{eid:t.id,type:"employee",dateType:this.activeIndex,start_time:this.filterObj.start_time,end_time:this.filterObj.end_time,store:this.$route.query.store,orgName:this.totalObj.org_name}})},mescrollInit:function(t){this.mescroll=t},getFuncList:function(t,e){var i=this,a=this;a.loadFlag=!0,a.datashow=!1;var s=Object(r["a"])({page:t.num,limit:10},this.filterObj);Object.keys(s).forEach((function(t){s[t]||delete s[t]})),this.getArrivalOrg(),this.getArrival(),Object(d["d"])(s).then((function(s){"0"==s.data.code&&(1===t.num&&(i.employeeArr=[]),i.employeeArr=i.employeeArr.concat(s.data.data),a.$nextTick((function(){e.endSuccess(s.data.data.length)}))),a.loadFlag=!1,a.datashow=!0}))}})},j=p,g=(i("487c"),i("2877")),_=Object(g["a"])(j,s,n,!1,null,"0a002dae",null);e["default"]=_.exports},"487c":function(t,e,i){"use strict";i("6afe")},"6afe":function(t,e,i){}}]);