1 |
- webpackJsonp([92],{Ai0P:function(t,e){},perC:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a("Xxa5"),i=a.n(r),n=a("exGp"),s=a.n(n),o=a("gzej"),l=a("erru"),p=a("McOJ"),d=a("FsX6"),c=a("1zIV"),_=a("la//"),h={name:"orderData",components:{datePicker:o.a,selfChannel:l.a,selfInput:p.a,selfChannelV2:d.a,selfChannelMultiple:c.a},data:function(){return{dataLoading:!1,loading:!1,page:1,pages:0,total:0,page_size:20,default_time:[this.$getDay(0,!1),this.$getDay(0,!1)],height:"",resetFlag:!1,dataInfo_stat:{},trendX:[],trendData:{key:1,dds:[],zfje:[]},desCol:[{prop:"order_id",label:"订单ID",min_width:180,fixed:"left"},{prop:"corp_name",label:"企微主体"},{prop:"user_name",label:"客服"},{prop:"wx_account",label:"公众号"},{prop:"user_id",label:"用户ID",min_width:180},{prop:"ma_user_register_time",label:"小程序注册时间",min_width:160},{prop:"mp_user_register_time",label:"企微用户关注时间",min_width:160},{prop:"first_order_status",label:"是否首充"},{prop:"order_pay_time",label:"支付完成时间",min_width:160},{prop:"pay_money",label:"分成后订单金额"},{prop:"origin_pay_money",label:"用户支付金额"},{prop:"pay_type",label:"支付类型"},{prop:"order_source",label:"订单来源"},{prop:"playlet_name",label:"剧名",min_width:160},{prop:"plat_order_type",label:"推广类型",min_width:160},{prop:"login_account",label:"账号",min_width:160},{prop:"promotion_title",label:"推广链接",min_width:200}],system_enterprise:[],enterpriseList:[],enterprise:{},filter:{time:[],corpid:"",order_source:"",order_id:"",appid:"",account_id:[],plat_order_type:"",is_ad_user:"",order_pay_type:""}}},computed:{isCanExport:function(){return!!this.$store.state.dataBoardAuth.can_export}},created:function(){this.height=document.documentElement.clientHeight-280>400?document.documentElement.clientHeight-280:400,this.filter.time=this.default_time,this.handleInitCorpOptions(),this.init(1),this.init_predata()},methods:{getIncomeSourceDesc:function(t){return(t||0===t)&&_.p[t]||"-"},getLaunchTypeDesc:function(t){return(t||0===t)&&_.u[t]||"-"},headerColor:function(t){t.row,t.column,t.rowIndex,t.columnIndex;return{backgroundColor:"#FFFFFF !important",border:"none!important"}},initCharts:function(){this.$echarts.init(this.$refs.chart).setOption({xAxis:{show:!1,boundaryGap:!1,data:this.trendX},yAxis:{show:!1},grid:{top:0,left:0,right:0,bottom:"1%"},series:[{name:"订单数",type:"line",data:this.trendData.dds,color:"#00B38A"},{name:"支付金额",type:"line",data:this.trendData.zfje,color:"#FF8704"}]})},init_predata:function(){var t=this;return s()(i.a.mark(function e(){var a,r,n,s,o;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.URL.BASEURL+t.URL.charge_pre_data,r={corpid:t.filter.corpid,order_source:t.filter.order_source,start_date:t.filter.time[0],end_date:t.filter.time[1],appid:t.filter.appid,account_id:t.filter.account_id.join(","),plat_order_type:t.filter.plat_order_type,is_ad_user:t.filter.is_ad_user,order_pay_type:t.filter.order_pay_type||0,type:2},e.prev=2,t.dataLoading=!0,e.next=6,t.$axios.post(a,r);case 6:n=e.sent,s=n.data,(o=void 0===s?{}:s)&&0==o.errno?(t.dataInfo_stat=o.rst.data.stat,t.trendX=[],t.trendData.dds=[],t.trendData.zfje=[],o.rst.data.trend.forEach(function(e){t.trendX.push(e.ref_date),t.trendData.dds.push(e.order_count),t.trendData.zfje.push(e.pay_money)}),t.trendData.key+=1):4002!=o.errno&&t.$message({message:o.err,type:"warning"}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),console.log("error => ",e.t0);case 15:return e.prev=15,t.dataLoading=!1,e.finish(15);case 18:case"end":return e.stop()}},e,t,[[2,12,15,18]])}))()},init:function(t,e){var a=this;return s()(i.a.mark(function e(){var r,n,s,o,l;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a.page=t||a.page,a.loading=!0,r=""+a.URL.BASEURL+a.URL.dataBoard_orderData_orderList,n={corpid:a.filter.corpid,order_id:a.filter.order_id,order_source:a.filter.order_source,start_date:a.filter.time[0],end_date:a.filter.time[1],appid:a.filter.appid,account_id:a.filter.account_id.join(","),plat_order_type:a.filter.plat_order_type,is_ad_user:a.filter.is_ad_user,order_pay_type:a.filter.order_pay_type||0,sys_group_id:1==a.$cookie.getCookie("isSuperManage")?sessionStorage.getItem("company_session_defaultCorp_level_1").toString():"",page:a.page,page_size:a.page_size},e.prev=4,e.next=7,a.$axios.get(r,{params:n});case 7:s=e.sent,o=s.data,(l=void 0===o?{}:o)&&0==l.errno?(a.datas=l.rst.data,a.$refs.plxTable.reloadData(a.datas),a.total=l.rst.pageInfo.total,a.pages=l.rst.pageInfo.pages):4002!=l.errno&&a.$message.warning(l.err),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(4),console.log("error => ",e.t0);case 16:return e.prev=16,a.loading=!1,e.finish(16);case 19:case"end":return e.stop()}},e,a,[[4,13,16,19]])}))()},onChangeCorpidSystem:function(t){var e=this;t.length<1?this.enterprise={}:this.enterpriseList.forEach(function(a){a.manage_corp_list.forEach(function(a){a.corpid==t[1]&&(e.enterprise=a)})}),this.filter.corpid=this.enterprise.corpid||"",this.init_predata(),this.init(1)},onChangeCorpid:function(t){if(t){var e=this.enterpriseList.filter(function(e){return e.corpid==t})[0];this.enterprise=e||{}}else this.enterprise={};this.filter.corpid=this.enterprise.corpid||"",this.init_predata(),this.init(1)},handleInitCorpOptions:function(){if(1==this.$cookie.getCookie("isSuperManage")){var t=this.$store.state.authorize_corpList;t.forEach(function(t){t.self_id=t.group_id.toString(),t.self_name=t.group_name,t.manage_corp_list.forEach(function(t){t.self_id=t.corpid,t.self_name=t.corp_name})}),this.enterpriseList=t}else this.enterpriseList=this.$store.state.authorize_corpList},onChangeTime:function(t){!t||t&&0==t.length?this.filter.time=[]:this.filter.time=t,this.init_predata(),this.init(1)},onChangeOrderSource:function(t){this.filter.order_source=t,this.init_predata(),this.init(1)},onInputOrderId:function(t){this.filter.order_id=t,this.init(1)},onChangeOrderId:function(t){this.filter.order_id=t},onChangeAppid:function(t){this.filter.appid=t,this.init(1),this.init_predata()},onChangePlatOrderType:function(t){this.filter.plat_order_type=t,this.init(1),this.init_predata()},onChangeIsAdUser:function(t){this.filter.is_ad_user=t,this.init(1),this.init_predata()},onChangeAccountId:function(t){this.filter.account_id=t,this.init(1),this.init_predata()},onChangeOrderPayType:function(t){this.filter.order_pay_type=t||"",this.init(1),this.init_predata()},handleCurrentChange:function(t){this.init(t)},handleSizeChange:function(t){this.page_size=t,this.init(1)},resetEvent:function(){this.resetFlag=!this.resetFlag,this.system_enterprise=[],this.enterprise={},this.filter.corpid="",this.filter.time=[this.$getDay(-30,!1),this.$getDay(0,!1)],this.filter.order_source="",this.filter.order_id="",this.filter.appid="",this.filter.account_id=[],this.filter.plat_order_type="",this.filter.is_ad_user="",this.filter.order_pay_type="",this.init_predata(),this.init(1)},onClickExport:function(){var t=this;return s()(i.a.mark(function e(){return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$confirm("确定根据当前筛选条件导出报表吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});case 3:t.handleCreateOrderExport(),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.log("error => ",e.t0);case 9:case"end":return e.stop()}},e,t,[[0,6]])}))()},handleCreateOrderExport:function(){var t=this;return s()(i.a.mark(function e(){var a,r,n,s,o;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.loading=!0,a=""+t.URL.BASEURL+t.URL.dataBoard_orderData_orderExportOffline,r={sys_group_id:1==t.$cookie.getCookie("isSuperManage")?sessionStorage.getItem("company_session_defaultCorp_level_1").toString():"",start_date:t.filter.time[0],end_date:t.filter.time[1],corpid:t.filter.corpid,order_id:t.filter.order_id,order_source:t.filter.order_source,app_id:t.filter.appid,plat_order_type:t.filter.plat_order_type,is_ad_user:t.filter.is_ad_user,order_pay_type:t.filter.order_pay_type||0,account_id:t.filter.account_id.join(",")},e.next=6,t.$axios.get(a,{params:r});case 6:n=e.sent,s=n.data,(o=void 0===s?{}:s)&&0==o.errno?t.$alert("导出预约成功,请稍候到【导出列表】下载文件!","提示",{confirmButtonText:"知道了",type:"success"}):4002!=o.errno&&t.$message.warning(o.err||"操作失败"),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),console.log(e.t0);case 15:return e.prev=15,t.loading=!1,e.finish(15);case 18:case"end":return e.stop()}},e,t,[[0,12,15,18]])}))()}}},f={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"screenBox"},[a("div",{staticClass:"flex-align-center",staticStyle:{"flex-wrap":"wrap","margin-right":"60px"}},[a("datePicker",{staticStyle:{"margin-right":"10px"},attrs:{title:"",quickFlag:!0,afferent_time:t.default_time,clearFlag:!1,reset:t.resetFlag},on:{changeTime:t.onChangeTime}}),t._v(" "),a("div",{staticStyle:{"margin-right":"10px"}},[1==t.$cookie.getCookie("isSuperManage")?a("el-cascader",{staticClass:"select-cls cascader",attrs:{size:"small",options:t.enterpriseList,props:{value:"self_id",label:"self_name",children:"manage_corp_list"},clearable:"",placeholder:"企微主体"},on:{change:t.onChangeCorpidSystem},model:{value:t.system_enterprise,callback:function(e){t.system_enterprise=e},expression:"system_enterprise"}}):a("el-select",{staticClass:"select-cls",attrs:{size:"small",placeholder:"企微主体",clearable:""},on:{change:t.onChangeCorpid},model:{value:t.filter.corpid,callback:function(e){t.$set(t.filter,"corpid",e)},expression:"filter.corpid"}},t._l(t.enterpriseList,function(t,e){return a("el-option",{key:e+"enterpriseList",attrs:{label:t.corp_name?t.corp_name:t.corp_full_name?t.corp_full_name:t.corpid,value:t.corpid}})}),1)],1),t._v(" "),a("selfChannel",{staticStyle:{"margin-right":"10px"},attrs:{title:"",type:"orderSource",reset:t.resetFlag,labelWidth:!0},on:{channelDefine:t.onChangeOrderSource}}),t._v(" "),a("selfInput",{staticStyle:{"margin-right":"10px"},attrs:{width:"220px",hasLabel:!1,reset:t.resetFlag,label_name:"订单ID"},on:{inputChange:t.onInputOrderId,onChange:t.onChangeOrderId}}),t._v(" "),a("selfChannel",{staticStyle:{"margin-right":"10px"},attrs:{title:"",type:"thePublic",reset:t.resetFlag,labelWidth:!0},on:{channelDefine:t.onChangeAppid}}),t._v(" "),a("selfChannel",{staticStyle:{"margin-right":"10px"},attrs:{title:"",type:"promotionType",reset:t.resetFlag,labelWidth:!0},on:{channelDefine:t.onChangePlatOrderType}}),t._v(" "),a("selfChannel",{staticStyle:{"margin-right":"10px"},attrs:{title:"",type:"incomeSource",reset:t.resetFlag,labelWidth:!0},on:{channelDefine:t.onChangeIsAdUser}}),t._v(" "),a("selfChannelMultiple",{staticStyle:{"margin-right":"10px"},attrs:{title:"",type:"adqAccount",reset:t.resetFlag,labelWidth:!0},on:{channelDefine:t.onChangeAccountId}}),t._v(" "),a("selfChannelV2",{staticStyle:{"margin-right":"10px"},attrs:{type:"orderPayType",title:"",labelWidth:!0},on:{change:t.onChangeOrderPayType},model:{value:t.filter.order_pay_type,callback:function(e){t.$set(t.filter,"order_pay_type",e)},expression:"filter.order_pay_type"}})],1),t._v(" "),a("div",{staticClass:"reset",on:{click:t.resetEvent}},[t._v("重置")]),t._v(" "),t.isCanExport?a("el-button",{staticClass:"export-btn",attrs:{type:"primary",size:"mini"},on:{click:t.onClickExport}},[t._v("导出Excel")]):t._e()],1),t._v(" "),a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.dataLoading,expression:"dataLoading"}],staticClass:"dataInfoBox"},[a("div",{staticClass:"dataInfoItem"},[t._m(0),t._v(" "),a("div",{staticClass:"dataItem-data"},[t._v("\n "+t._s(t.dataInfo_stat&&t.dataInfo_stat.order_count?t.$formatNum(t.dataInfo_stat.order_count):"-"))])]),t._v(" "),a("div",{staticClass:"dataInfoItem"},[t._m(1),t._v(" "),a("div",{staticClass:"dataItem-data"},[t._v(t._s(t.dataInfo_stat&&t.dataInfo_stat.pay_uv?t.$formatNum(t.dataInfo_stat.pay_uv):"-")+"\n ")])]),t._v(" "),a("div",{staticClass:"dataInfoItem"},[t._m(2),t._v(" "),a("div",{staticClass:"dataItem-data"},[t._v(t._s(t.dataInfo_stat&&t.dataInfo_stat.pay_pv?t.$formatNum(t.dataInfo_stat.pay_pv):"-")+"\n ")])]),t._v(" "),a("div",{staticClass:"dataInfoItem"},[t._m(3),t._v(" "),a("div",{staticClass:"dataItem-data"},[t._v(t._s(t.dataInfo_stat&&t.dataInfo_stat.pay_money?t.$formatNumV2(t.dataInfo_stat.pay_money,{toFixed:!1}):"-"))])]),t._v(" "),a("div",{staticClass:"dataInfoItem"},[t._m(4),t._v(" "),a("div",{staticClass:"dataItem-data"},[t._v(t._s(t.dataInfo_stat&&t.dataInfo_stat.origin_pay_money?t.$formatNum(t.dataInfo_stat.origin_pay_money):"-")+"\n ")])])]),t._v(" "),a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[a("ux-grid",{ref:"plxTable",staticClass:"uxGridBox",attrs:{border:!1,"header-cell-style":t.headerColor,height:t.height,"show-footer-overflow":"tooltip","show-overflow":"tooltip",size:"mini"},on:{"row-click":function(){}}},t._l(t.desCol,function(e){return a("ux-table-column",{key:e.prop,attrs:{resizable:!0,field:e.prop,title:e.label,"min-width":e.min_width?e.min_width:120,fixed:e.fixed?e.fixed:"",align:"center"},scopedSlots:t._u([{key:"header",fn:function(){return[a("div",{staticClass:"flex-align-jus-center"},[t._v(t._s(e.label)+"\n "),e.notes?a("el-tooltip",{attrs:{content:e.notes,placement:"top"}},[a("div",[a("i",{staticClass:"el-icon-question"})])]):t._e()],1)]},proxy:!0},{key:"default",fn:function(r){var i=r.row;return r.$index,["order_id"==e.prop?a("span",[t._v("\n "+t._s(i[e.prop]||0==i[e.prop]?i[e.prop]:"-")+"\n ")]):"user_id"==e.prop?a("span",[t._v("\n "+t._s(i[e.prop]||0==i[e.prop]?i[e.prop]:"-")+"\n ")]):"login_account"==e.prop?a("span",[t._v("\n "+t._s(i[e.prop]||0==i[e.prop]?i[e.prop]:"-")+"\n ")]):"pay_money"==e.prop?a("span",[t._v("\n "+t._s(i[e.prop]||0===i[e.prop]?t.$formatNumV2(i[e.prop],{toFixed:!1}):"-")+"\n ")]):a("span",[t._v(t._s(!i[e.prop]&&0!=i[e.prop]||""==i[e.prop]?"-":t.$formatNum(i[e.prop])))])]}}],null,!0)})}),1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total > 0"}],staticClass:"pagination"},[a("el-pagination",{attrs:{background:"","current-page":t.page,layout:"prev, pager, next, sizes, jumper","page-sizes":[20,50,100],"page-count":Number(t.pages)},on:{"current-change":t.handleCurrentChange,"size-change":t.handleSizeChange}})],1)],1)])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"dataItemTitle"},[e("img",{staticClass:"titleIcon",staticStyle:{height:"14px"},attrs:{src:a("s0AP"),alt:""}}),this._v(" "),e("span",[this._v("订单数")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"dataItemTitle"},[e("img",{staticClass:"titleIcon",staticStyle:{height:"18px"},attrs:{src:a("Wk2b"),alt:""}}),this._v(" "),e("span",[this._v("下单人数")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"dataItemTitle"},[e("img",{staticClass:"titleIcon",attrs:{src:a("Vu/q"),alt:""}}),this._v(" "),e("span",[this._v("支付成功订单数")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"dataItemTitle"},[e("img",{staticClass:"titleIcon",staticStyle:{height:"14px"},attrs:{src:a("mTuD"),alt:""}}),this._v(" "),e("span",[this._v("分成后订单金额")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"dataItemTitle"},[e("img",{staticClass:"titleIcon",staticStyle:{height:"14px"},attrs:{src:a("F4wG"),alt:""}}),this._v(" "),e("span",[this._v("用户支付金额")])])}]};var u=a("VU/8")(h,f,!1,function(t){a("Ai0P")},"data-v-2f31c125",null);e.default=u.exports}});
|