webpackJsonp([44],{E2ij:function(t,e,s){(t.exports=s("FZ+f")(!0)).push([t.i,"\n.channel-trans-list {\n padding: 20px 0;\n}\n.el-table .cell {\n text-align: center !important;\n}\n","",{version:3,sources:["C:/Users/Administrator/Desktop/后台/admin/src/components/conversionList/squadConversionList.vue"],names:[],mappings:";AACA;EACE,gBAAgB;CACjB;AACD;EACE,8BAA8B;CAC/B",file:"squadConversionList.vue",sourcesContent:["\n.channel-trans-list {\n padding: 20px 0;\n}\n.el-table .cell {\n text-align: center !important;\n}\n"],sourceRoot:""}])},M7X6:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=s("CCn6"),n=s("kmJW"),i=s("+TkF");function r(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}var o={name:"squadConversionList",data:function(){var t,e=this;return r(t={width:0,nowPage:1,total:0,limit:20,list:[],goods_id:null,teacherList:[],goodsList:[],periodList:[]},"total",0),r(t,"today",{text:"今天",onClick:function(){e.searchFrom.payTime=[e.formatTime(new Date)+" 00:00:00",e.formatTime(new Date)+" 23:59:59"]}}),r(t,"yesterday",{text:"昨天",onClick:function(){var t=e.formatTime(new Date((new Date).getTime()-864e5));e.searchFrom.payTime=[t+" 00:00:00",t+" 23:59:59"]}}),r(t,"last30Day",{text:"过去30天",onClick:function(){var t=e.formatTime(new Date((new Date).getTime()-2592e6));e.searchFrom.payTime=[t+" 00:00:00",e.formatTime(new Date)+" 23:59:59"]}}),r(t,"last7Day",{text:"过去7天",onClick:function(){var t=e.formatTime(new Date((new Date).getTime()-6048e5));e.searchFrom.payTime=[t+" 00:00:00",e.formatTime(new Date)+" 23:59:59"]}}),r(t,"propertyList",[]),r(t,"spanArr",[]),r(t,"contentSpanArr",[]),r(t,"searchFrom",{payTime:[],start_at:"",end_at:"",invite_type:"",invite_name:"",watch_num:"",periods_id:"",squad:"",teacher_id:"",periods_title:""}),r(t,"propertyList",[]),r(t,"watchList",[{id:0,title:5},{id:1,title:6},{id:2,title:10},{id:3,title:20}]),t},components:{page:n.a},methods:{sortMethod:function(t){this.searchFrom.sort_key=t.prop,"ascending"==t.order?this.searchFrom.sort_value="asc":this.searchFrom.sort_value="dasc",this.getChannelTransList()},seachData:function(){this.total=0,this.nowPage=1,this.getChannelTransList()},onPeriodChange:function(t){var e="";e=t.length>1?t.join(","):t[0],this.periods_id=e,console.log(e)},objectSpanMethod:function(t){},handleItemChange:function(t){var e=this;getPeriodsApi({goods_id:t[0],limit:100}).then(function(s){s.list.forEach(function(t){t.name=t.title}),e.goodsList.find(function(e){return e.id===t[0]}).children=s.list})},changePeriods:function(t){if(t.length>1){this.goods_id=t[0];var e=this.goodsList.find(function(e){return e.id===t[0]});this.periods=e.children.find(function(e){return e.id===t[1]}),this.searchFrom.periods_id=this.periods.id,this.getChannelTransList()}},changeTeacher:function(t){this.searchFrom.teacher_id=t,this.getChannelTransList()},selectChange:function(t){this.searchFrom.watch_num=this.watchList[t].title,this.getChannelTransList()},formatTime:function(t){var e=t.getFullYear(),s=t.getMonth()+1;s<10&&(s="0"+s);var a=t.getDate();return a<10&&(a="0"+a),e+"-"+s+"-"+a},onPageChange:function(t){this.nowPage=t,this.getChannelTransList()},onSizeChange:function(t){this.nowPage=1,this.limit=t,this.getChannelTransList()},getGoodsList:function(){var t=this;Object(a._59)({page:1,limit:100,goods_type:"1,2"}).then(function(e){e.list.forEach(function(t){t.name="["+t.id+"]["+i.h[t.goods_type]+"]["+t.current_price/100+"元]"+t.name,t.children=[]}),t.goodsList=e.list})},getPeriodsOtherList:function(){var t=this;Object(a._78)({limit:1e3,page:1}).then(function(e){t.periodList=e.list})},getChannelTransList:function(){var t=this,e={limit:this.limit,page:this.nowPage};this.searchFrom.invite_type&&(e.invite_type=this.searchFrom.invite_type),this.searchFrom.sort_value&&(e.sort_value=this.searchFrom.sort_value,e.sort_key=this.searchFrom.sort_key),this.searchFrom.squad&&(e.squad=this.searchFrom.squad),this.searchFrom.watch_num&&(e.watch_num=this.searchFrom.watch_num),this.periods_id&&(e.periods_ids=this.periods_id),this.searchFrom.teacher_id&&(e.teacher_id=this.searchFrom.teacher_id),this.searchFrom.payTime&&this.searchFrom.payTime.length>0&&(this.searchFrom.payTime[0]&&this.searchFrom.payTime[0].length>0&&(this.searchFrom.start_at=this.searchFrom.payTime[0],e.start_at=this.searchFrom.start_at),this.searchFrom.payTime[1]&&this.searchFrom.payTime[1].length>0&&(this.searchFrom.end_at=this.searchFrom.payTime[1],e.end_at=this.searchFrom.end_at)),Object(a._94)(e).then(function(e){if(e){if(e.list&&e.list.length>0){for(var s in t.total=e.total,t.list=e.list.map(function(s,a){s.index=a,0==a?(t.spanArr.push(1),t.pos=0):s.cur_date==e.list[a-1].cur_date?(t.spanArr[t.pos]+=1,t.spanArr.push(0)):(t.spanArr.push(1),t.pos=a),s.squad="T"+s.squad;var n=s.invite_name&&s.invite_name.length>0?"("+s.invite_name+")":"",i=s.goods_id&&s.goods_id>0?"【"+s.goods_id+"】":"",r=s.watch_num&&s.watch_num>0?"【"+s.watch_num+"个课时】":"";return s.invite_type=""+s.invite_type+n,s.goods_name=""+i+s.goods_name+r,s}),t.list[0])t.propertyList.push(s);t.width=document.documentElement.clientWidth-200}e.list&&0===e.list.length&&(t.list=[])}else t.list=[]})}},mounted:function(){this.getChannelTransList(),this.getGoodsList(),this.getPeriodsOtherList()}},l=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"channel-trans-list"},[s("el-form",{ref:"searchFrom",attrs:{model:t.searchFrom,"label-width":"100px",inline:""}},[s("el-form-item",{attrs:{label:"进量日期"}},[s("el-date-picker",{attrs:{type:"datetimerange","range-separator":"至","value-format":"yyyy-MM-dd HH:mm:ss","start-placeholder":"开始日期","end-placeholder":"结束日期","picker-options":{shortcuts:[t.today,t.yesterday,t.last7Day,t.last30Day]},"default-time":["00:00:00","23:59:59"]},on:{change:t.getChannelTransList},model:{value:t.searchFrom.payTime,callback:function(e){t.$set(t.searchFrom,"payTime",e)},expression:"searchFrom.payTime"}})],1),t._v(" "),s("el-form-item",{attrs:{label:"渠道code"}},[s("el-input",{staticStyle:{width:"110px"},model:{value:t.searchFrom.invite_type,callback:function(e){t.$set(t.searchFrom,"invite_type",e)},expression:"searchFrom.invite_type"}})],1),t._v(" "),s("el-form-item",{attrs:{label:"商品课时数"}},[s("el-select",{staticStyle:{width:"150px"},attrs:{filterable:"",clearable:"",placeholder:"请选择"},on:{change:t.selectChange},model:{value:t.searchFrom.watch_num,callback:function(e){t.$set(t.searchFrom,"watch_num",e)},expression:"searchFrom.watch_num"}},t._l(t.watchList,function(t,e){return s("el-option",{key:e,attrs:{label:t.title,value:t.id}})}))],1),t._v(" "),s("el-form-item",{attrs:{label:"期数名称",prop:"periods_title"}},[s("el-select",{attrs:{placeholder:"请选择",multiple:"",filterable:""},on:{change:t.onPeriodChange},model:{value:t.searchFrom.periods_id,callback:function(e){t.$set(t.searchFrom,"periods_id",e)},expression:"searchFrom.periods_id"}},t._l(t.periodList,function(t){return s("el-option",{key:t.id,attrs:{label:t.title,value:t.id}})}))],1),t._v(" "),s("el-form-item",[s("div",{staticClass:"flexRow"},[s("el-button",{attrs:{type:"primary",plain:""},on:{click:t.seachData}},[t._v("搜索")])],1)])],1),t._v(" "),s("el-table",{style:{width:t.width+"px"},attrs:{border:"","span-method":t.objectSpanMethod,data:t.list,fixed:""},on:{"sort-change":t.sortMethod}},[s("el-table-column",{attrs:{prop:"squad",label:"组别"}}),t._v(" "),s("el-table-column",{attrs:{prop:"sum_class_num",label:"到班数",sortable:"custom"}}),t._v(" "),s("el-table-column",{attrs:{prop:"sum_friend_num",label:"好友数",sortable:"custom"}}),t._v(" "),s("el-table-column",{attrs:{prop:"friend_num_except_class_num",label:"好友率",sortable:"custom"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.friend_num_except_class_num)+"%\n ")]}}])}),t._v(" "),s("el-table-column",{attrs:{prop:"sum_come_num",label:"到课数",sortable:"custom"}}),t._v(" "),s("el-table-column",{attrs:{prop:"come_num_except_class_num",label:"到课率",sortable:"custom"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.come_num_except_class_num)+"%\n ")]}}])}),t._v(" "),s("el-table-column",{attrs:{prop:"sum_buy_num",label:"转化人数",sortable:"custom"}}),t._v(" "),s("el-table-column",{attrs:{prop:"sum_buy_num_except_class_num",label:"转化率",sortable:"custom"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.sum_buy_num_except_class_num)+"%\n ")]}}])}),t._v(" "),s("el-table-column",{attrs:{prop:"sum_one_buy_num",label:"一年课购买人数",sortable:"custom"}}),t._v(" "),s("el-table-column",{attrs:{prop:"sum_two_buy_num",label:"两年课购买人数",sortable:"custom"}}),t._v(" "),s("el-table-column",{attrs:{prop:"sum_one_buy_money",label:"一年课转化金额",sortable:"custom"}}),t._v(" "),s("el-table-column",{attrs:{prop:"sum_two_buy_money",label:"两年课转化金额",sortable:"custom"}})],1),t._v(" "),s("page",{attrs:{nowPage:t.nowPage,total:t.total,limit:t.limit},on:{pageChange:t.onPageChange,sizeChange:t.onSizeChange}})],1)};l._withStripped=!0;var c={render:l,staticRenderFns:[]},m=c;var h=!1;var u=s("VU/8")(o,m,!1,function(t){h||s("pgdF")},null,null);u.options.__file="src\\components\\conversionList\\squadConversionList.vue";e.default=u.exports},pgdF:function(t,e,s){var a=s("E2ij");"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);s("rjj0")("11184946",a,!1,{})}});