(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["ChannelSales"],{"25f0":function(t,e,a){"use strict";var i=a("6eeb"),n=a("825a"),r=a("d039"),s=a("ad6d"),o="toString",c=RegExp.prototype,l=c[o],u=r((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),m=l.name!=o;(u||m)&&i(RegExp.prototype,o,(function(){var t=n(this),e=String(t.source),a=t.flags,i=String(void 0===a&&t instanceof RegExp&&!("flags"in c)?s.call(t):a);return"/"+e+"/"+i}),{unsafe:!0})},"2fcf":function(t,e,a){"use strict";a("7271")},"376c":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"ant-card",attrs:{id:"course_category"}},[t.$route.meta.isShow?a("a-spin",{attrs:{spinning:t.spinning,size:"large"}},[a("div",{staticClass:"ant-card-body"},[a("a-alert",{staticStyle:{"margin-bottom":"30px"},attrs:{message:"销售数据汇总支持查询当日到2小时前的数据。",type:"warning","show-icon":""}}),a("div",{staticClass:"head-box"},[a("div",{staticClass:"table-operator"},[a("Treeselect",{staticClass:"margin_right20",staticStyle:{width:"210px"},attrs:{isDateShow:t.isDateShow},on:{treeDataChange:t.treeDataChange}}),a("a-input",{staticClass:"margin_right20",staticStyle:{width:"210px"},attrs:{placeholder:"课程/商品关键字"},model:{value:t.form.curriculum,callback:function(e){t.$set(t.form,"curriculum",e)},expression:"form.curriculum"}}),a("a-range-picker",{staticClass:"margin_right20",staticStyle:{width:"210px"},on:{change:t.onChangeDate},model:{value:t.form.dateVal,callback:function(e){t.$set(t.form,"dateVal",e)},expression:"form.dateVal"}}),a("a-button",{staticClass:"margin_right20",attrs:{type:"primary"},on:{click:t.resetClick}},[t._v("重置")]),a("a-button",{staticClass:"margin_right20",attrs:{type:"primary"},on:{click:t.init}},[t._v("导出")])],1)])],1),a("div",{staticStyle:{"margin-top":"220px"}},[a("a-empty",{attrs:{description:"点击导出按钮可直接导出数据"}})],1)]):t._e(),a("router-view")],1)},n=[],r=(a("d3b7"),a("25f0"),a("3ca3"),a("ddb0"),a("2b3d"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"treeselect"},[a("treeselect",{attrs:{placeholder:"请选择用户归属",flat:!0,multiple:!0,options:t.options,normalizer:t.normalizer},on:{input:t.treeselectChange},model:{value:t.treeselectArr,callback:function(e){t.treeselectArr=e},expression:"treeselectArr"}})],1)}),s=[],o=a("ca17"),c=a.n(o),l=(a("542c"),a("425c")),u={components:{Treeselect:c.a},props:{isDateShow:{type:Boolean,default:!0}},data:function(){return{options:[],treeselectArr:[],normalizer:function(t){return{id:t.code,label:t.agentName,children:t.childs}}}},watch:{isDateShow:function(t){this.treeselectChange(),this.treeselectArr=[]}},created:function(){var t=this;Object(l["a"])({}).then((function(e){200===e.code&&(t.options=e.data.lists)}))},methods:{treeselectChange:function(t){this.$emit("treeDataChange",t)}}},m=u,d=a("2877"),h=Object(d["a"])(m,r,s,!1,null,"6f794d76",null),f=h.exports,p=a("bc3a"),g=a.n(p),b=a("f121"),v={components:{Treeselect:f},data:function(){return{spinning:!1,tableLoading:!1,isDateShow:!0,form:{channel:[],curriculum:"",startTime:"",endTime:"",dateVal:[]}}},mounted:function(){},methods:{resetClick:function(){this.form.channel=[],this.form.curriculum="",this.form.startTime="",this.form.endTime="",this.form.dateVal=[],this.isDateShow=!1},treeDataChange:function(t){this.form.channel=t,this.isDateShow=!0},init:function(){var t=this,e=localStorage.getItem("token");this.tableLoading=!0;var a=b["a"];"https://test.shenyiedu.com/"!=a&&(a="https://admin.shenyiedu.com/");var i="".concat(a,"adminv2/usercenter/agentSales"),n={codes:this.form.channel.toString(),businessName:this.form.curriculum,startTime:this.form.startTime,endTime:this.form.endTime};g.a.post(i,n,{responseType:"blob",headers:{accesstoken:e,authorization:e}}).then((function(e){t.tableLoading=!1;var a=e.data,i=document.createElement("a");a=new Blob([a],{type:"application/x-excel"}),i.style.display="none",i.href=URL.createObjectURL(a),i.download="渠道销售数据.xls",document.body.appendChild(i),i.click(),document.body.removeChild(i)}))},onChangeDate:function(t,e){""!=e[0]?(this.form.startTime=e[0],this.form.endTime=e[1]):(this.form.startTime="",this.form.endTime="")}}},y=v,C=(a("2fcf"),Object(d["a"])(y,i,n,!1,null,"c798fec2",null));e["default"]=C.exports},7271:function(t,e,a){},ad6d:function(t,e,a){"use strict";var i=a("825a");t.exports=function(){var t=i(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}}}]); //# sourceMappingURL=ChannelSales.9eaf3514.js.map