1 |
- webpackJsonp([82],{mUj6:function(t,e){},sdiL:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("Xxa5"),r=a.n(i),n=a("exGp"),s=a.n(n),o=a("mvHQ"),p=a.n(o),d=a("VULP"),l=a("gzej"),c=a("erru"),_=a("McOJ"),h=a("la//"),u=a("FsX6"),g=a("lFm0"),m={name:"charge",components:{datePicker:l.a,selfChannel:c.a,selfInput:_.a,detial:d.a,selfChannelV2:u.a,selfSelectCorp:g.a},data:function(){return{time:[],userRegTime:[],pickerOptions:{},chargePay_val:"",paySource_val:"",id_val:"",dataLoading:!1,drawerSize:"60%",detialDrawer:!1,rowPro:{},loading:!1,page:1,pages:0,total:0,page_size:20,sort_field:"charge_total",dataInfo_stat:{},default_time:[this.$getDay(-30,!1),this.$getDay(0,!1)],user_id:"",drama_id:"",gl_loading:!1,desCol:[{prop:"order_id",label:"订单ID",min_width:180,fixed:"left"},{prop:"wx_account",label:"公众号"},{prop:"name",label:"用户昵称",min_width:160},{prop:"mp_user_register_time",label:"用户注册时间",min_width:160},{prop:"pay_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:"order_type",label:"投放类型",min_width:160},{prop:"launch_account",label:"投放账号",min_width:160},{prop:"plat_order_type",label:"推广类型",min_width:160},{prop:"is_ad_user",label:"收入来源",min_width:160},{prop:"ad_report_order_rules",label:"回传规则",min_width:260},{prop:"ad_report_action_type",label:"回传类型"},{prop:"ad_report_order_status",label:"下单回传结果"},{prop:"ad_report_purchase_status",label:"付费回传结果"},{prop:"actionBtn",label:"操作",fixed:"right"}],height:"",trendX:[],trendData:{key:1,dds:[],zfje:[]},resetFlag:!1,appid:"",account_id:"",order_type:"",plat_order_type:"",is_ad_user:"",order_pay_type:"",ad_report_action_type:"",corp_id:""}},created:function(){this.height=document.documentElement.clientHeight-280>400?document.documentElement.clientHeight-280:400;var t=this.$route.query.account,e=void 0===t?"":t;e&&(this.account_id=e,this.default_time=[this.$getDay(0,!1),this.$getDay(0,!1)],this.userRegTime=[this.$getDay(0,!1)+" 00:00:00",this.$getDay(0,!1)+" 23:59:59"])},mounted:function(){this.corp_id=this.$route.query.corpid||"",this.time=this.default_time,this.init(1),this.init_predata()},methods:{getPromotionTypeDesc:function(t){return(t||0===t)&&h.I[t]||"-"},getIncomeSourceDesc:function(t){return(t||0===t)&&h.p[t]||"-"},getLaunchTypeDesc:function(t){return(t||0===t)&&h.u[t]||"-"},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"}]})},changeDrawerSize:function(){this.drawerSize="100%"==this.drawerSize?"60%":"100%",4==this.$refs.detial.acIdx&&"charge"==this.$route.name&&this.$refs.detial.init_orderCharge()},closeDrawer:function(){this.detialDrawer=!1},showDetial:function(t,e){var a=this;t.customer_id?(this.rowPro=t,this.rowPro.self_index=e,this.drawerSize="60%",this.detialDrawer=!0,this.$nextTick(function(){a.$refs.detial.acIdx=0,a.$refs.detial.init()})):this.$message({message:"无客户id,无法进入详情哦~",type:"warning"})},resetEvent:function(){this.resetFlag=!this.resetFlag,this.default_time=[this.$getDay(-30,!1),this.$getDay(0,!1)],this.time=this.default_time,this.userRegTime=[],this.chargePay_val="",this.paySource_val="",this.appid="",this.account_id="",this.id_val="",this.order_type="",this.plat_order_type="",this.is_ad_user="",this.order_pay_type="",this.ad_report_action_type="",this.corp_id="",this.$route.query.account&&this.$router.replace({query:{}}),this.init_predata(),this.init(1)},headerColor:function(t){t.row,t.column,t.rowIndex,t.columnIndex;return{backgroundColor:"#FFFFFF !important",border:"none!important"}},changeTime:function(t){!t||t&&0==t.length?this.time=[]:this.time=t,this.init_predata(),this.init(1)},changeTimeUserReg:function(t){!t||t&&0==t.length?this.userRegTime=[]:this.userRegTime=t,this.init_predata(),this.init(1)},onChangeOrderPayType:function(t){this.order_pay_type=t||"",this.init_predata(),this.init(1)},onChangeAdReportActionType:function(t){this.ad_report_action_type=t||"",this.init_predata(),this.init(1)},onChangeCorpid:function(t){this.corp_id=t?t.corpid:"",this.init_predata(),this.init(1)},init_predata:function(){var t=this;this.dataLoading=!0,this.$axios.post(this.URL.BASEURL+this.URL.charge_pre_data,{order_source:this.paySource_val,start_date:this.time[0],end_date:this.time[1],user_reg_st:this.userRegTime[0]||"",user_reg_et:this.userRegTime[1]||"",appid:this.appid,account_id:this.account_id,order_type:this.order_type,plat_order_type:this.plat_order_type,is_ad_user:this.is_ad_user,order_pay_type:this.order_pay_type||0,ad_report_action_type:this.ad_report_action_type||0,type:1,corp_id:this.corp_id||""}).then(function(e){e=e.data;t.dataLoading=!1,e&&0==e.errno?(t.dataInfo_stat=e.rst.data.stat,t.trendX=[],t.trendData.dds=[],t.trendData.zfje=[],e.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!=e.errno&&t.$message({message:e.err,type:"warning"})}).catch(function(e){t.dataLoading=!1})},init:function(t,e){var a=this;if("export"!=e)this.page=t||this.page;else if(0==this.total)return void this.$message({message:"暂无数据可导出",type:"warning"});this.loading=!0,this.$axios.post(this.URL.BASEURL+this.URL.charge_list,{order_type:this.order_type,plat_order_type:this.plat_order_type,is_ad_user:this.is_ad_user,order_pay_type:this.order_pay_type||0,ad_report_action_type:this.ad_report_action_type||0,appid:this.appid,account_id:this.account_id,order_source:this.paySource_val,order_id:this.id_val,start_date:this.time[0],end_date:this.time[1],user_reg_st:this.userRegTime[0]||"",user_reg_et:this.userRegTime[1]||"",pay_status:this.chargePay_val,corp_id:this.corp_id||"",page:"export"==e?1:this.page,page_size:"export"==e?this.$store.state.exportNumber:this.page_size}).then(function(t){t=t.data;a.loading=!1,t&&0==t.errno?"export"==e?a.exportEvent(t.rst.data):(a.datas=t.rst.data,a.$refs.plxTable.reloadData(a.datas),a.total=t.rst.pageInfo.total,a.pages=t.rst.pageInfo.pages):4002!=t.errno&&a.$message({message:t.err,type:"warning"})}).catch(function(t){a.loading=!1})},handleCurrentChange:function(t){this.init(t)},sortFieldEvent:function(t){this.sort_field=t,this.init(1)},exportEvent:function(t){var e=this,a=JSON.parse(p()(t));a.forEach(function(t){t.pay_status=t.pay_status?1==t.pay_status?"已付款":"未付款":"-",t.order_type=e.getLaunchTypeDesc(t.order_type),t.plat_order_type=e.getPromotionTypeDesc(t.plat_order_type),t.is_ad_user=e.getIncomeSourceDesc(t.is_ad_user)});var i=[{tHeader:this.desCol.map(function(t){return t.label}),filterVal:this.desCol.map(function(t){return t.prop}),tableDatas:a,sheetName:""}];this.$exportOrder({excelDatas:i,name:"充值订单数据(导出时间:"+this.$getDay(0)+")"})},onClickReport:function(t){var e=this;return s()(r.a.mark(function a(){return r.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,e.$confirm("订单ID【"+t.order_id+"】,确定手动回传吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});case 3:e.handleReport(t),a.next=9;break;case 6:a.prev=6,a.t0=a.catch(0),console.log(a.t0);case 9:case"end":return a.stop()}},a,e,[[0,6]])}))()},handleReport:function(t){var e=this,a=t.order_id,i=t.id;return s()(r.a.mark(function t(){var n,s,o,p,d;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e.loading=!0,n=""+e.URL.BASEURL+e.URL.charge_actionUpload,s={order_id:a,order_data_id:i},t.next=6,e.$axios.post(n,s);case 6:o=t.sent,p=o.data,(d=void 0===p?{}:p)&&0==d.errno?(e.$message.success("操作成功"),e.init()):4002!=d.errno&&e.$message.warning(d.err||"操作失败"),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(0),console.log(t.t0);case 15:return t.prev=15,e.loading=!1,t.finish(15);case 18:case"end":return t.stop()}},t,e,[[0,12,15,18]])}))()}}},f={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.gl_loading,expression:"gl_loading"}],staticClass:"screenBox"},[a("div",{staticClass:"flex-align-center",staticStyle:{"flex-wrap":"wrap","margin-right":"60px"}},[a("date-picker",{staticStyle:{"margin-right":"10px"},attrs:{title:"",quickFlag:!0,afferent_time:t.default_time,clearFlag:!1,reset:t.resetFlag},on:{changeTime:t.changeTime}}),t._v(" "),a("self-channel",{staticStyle:{"margin-right":"10px"},attrs:{title:"",type:"chargePay",reset:t.resetFlag,labelWidth:!0},on:{channelDefine:function(e){t.chargePay_val=e,t.init_predata(),t.init(1)}}}),t._v(" "),a("self-channel",{staticStyle:{"margin-right":"10px"},attrs:{title:"",type:"orderSource",reset:t.resetFlag,labelWidth:!0},on:{channelDefine:function(e){t.paySource_val=e,t.init_predata(),t.init(1)}}}),t._v(" "),a("self-input",{staticStyle:{"margin-right":"10px"},attrs:{width:"220px",hasLabel:!1,reset:t.resetFlag,label_name:"订单ID"},on:{inputChange:function(e){t.id_val=e,t.init(1)}}}),t._v(" "),a("self-channel",{staticStyle:{"margin-right":"10px"},attrs:{title:"",type:"thePublic",reset:t.resetFlag,labelWidth:!0},on:{channelDefine:function(e){t.appid=e,t.init(1),t.init_predata()}}}),t._v(" "),a("self-channel",{staticStyle:{"margin-right":"10px"},attrs:{title:"",type:"launchType",reset:t.resetFlag,labelWidth:!0},on:{channelDefine:function(e){t.order_type=e,t.init(1),t.init_predata()}}}),t._v(" "),a("self-channel",{staticStyle:{"margin-right":"10px"},attrs:{title:"",type:"promotionType",reset:t.resetFlag,labelWidth:!0},on:{channelDefine:function(e){t.plat_order_type=e,t.init(1),t.init_predata()}}}),t._v(" "),a("self-channel",{staticStyle:{"margin-right":"10px"},attrs:{title:"",type:"incomeSource",reset:t.resetFlag,labelWidth:!0},on:{channelDefine:function(e){t.is_ad_user=e,t.init(1),t.init_predata()}}}),t._v(" "),a("selfChannelV2",{staticStyle:{"margin-right":"10px"},attrs:{type:"adqAccount",title:"",labelWidth:!0},on:{change:function(e){t.account_id=e,t.init(1),t.init_predata()}},model:{value:t.account_id,callback:function(e){t.account_id=e},expression:"account_id"}}),t._v(" "),a("date-picker",{staticStyle:{"margin-right":"10px"},attrs:{title:"",quickFlag:!1,clearFlag:!0,timeFlag:!0,reset:t.resetFlag,placeholder:"用户注册时间",defaultTime:["00:00:00","23:59:59"],pickerOptions:t.pickerOptions,afferent_time:t.userRegTime},on:{changeTime:t.changeTimeUserReg}}),t._v(" "),a("selfChannelV2",{staticStyle:{"margin-right":"10px"},attrs:{type:"orderPayType",title:"",labelWidth:!0},on:{change:t.onChangeOrderPayType},model:{value:t.order_pay_type,callback:function(e){t.order_pay_type=e},expression:"order_pay_type"}}),t._v(" "),a("selfChannelV2",{staticStyle:{"margin-right":"10px"},attrs:{type:"adReportType",title:"",labelWidth:!0},on:{change:t.onChangeAdReportActionType},model:{value:t.ad_report_action_type,callback:function(e){t.ad_report_action_type=e},expression:"ad_report_action_type"}}),t._v(" "),a("selfSelectCorp",{staticStyle:{"margin-right":"10px"},attrs:{labelName:"",placeholder:"企微主体"},on:{change:t.onChangeCorpid},model:{value:t.corp_id,callback:function(e){t.corp_id=e},expression:"corp_id"}})],1),t._v(" "),a("div",{staticClass:"reset",on:{click:t.resetEvent}},[t._v("重置")]),t._v(" "),a("el-button",{staticClass:"export-btn",attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.init(1,"export")}}},[t._v("导出Excel")])],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(i){var r=i.row,n=i.$index;return["detial"==e.prop?a("span",{staticClass:"c-00B38A pointer fWeight600",on:{click:function(e){return t.showDetial(r,n)}}},[t._v("用户详情")]):t._e(),t._v(" "),"actionBtn"==e.prop?a("div",[[1==r.ad_report_status?a("span",{staticClass:"c-A5A5A5 pointer fWeight600 disabled"},[t._v("已回传")]):a("span",{staticClass:"c-00B38A pointer fWeight600",on:{click:function(e){return t.onClickReport(r)}}},[t._v("回传")])]],2):"name"==e.prop?a("span",[t._v("\n "+t._s(r[e.prop]?r[e.prop]:"-")+"\n ")]):"order_id"==e.prop?a("span",[t._v("\n "+t._s(r[e.prop]||0==r[e.prop]?r[e.prop]:"-")+"\n ")]):"pay_status"==e.prop?a("span",[t._v("\n "+t._s(r[e.prop]?1==r[e.prop]?"已付款":"未付款":"-")+"\n ")]):"pay_money"==e.prop?a("span",[t._v("\n "+t._s(r[e.prop]||0===r[e.prop]?t.$formatNumV2(r[e.prop],{toFixed:!1}):"-")+"\n ")]):"order_type"==e.prop?a("span",[t._v("\n "+t._s(t.getLaunchTypeDesc(r[e.prop]))+"\n ")]):"launch_account"==e.prop?a("span",[t._v("\n "+t._s(r[e.prop]||"-")+"\n ")]):"plat_order_type"==e.prop?a("span",[t._v("\n "+t._s(t.getPromotionTypeDesc(r[e.prop]))+"\n ")]):"is_ad_user"==e.prop?a("span",[t._v("\n "+t._s(t.getIncomeSourceDesc(r[e.prop]))+"\n ")]):a("span",[t._v(t._s(!r[e.prop]&&0!=r[e.prop]||""==r[e.prop]?"-":t.$formatNum(r[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","page-count":Number(t.pages)},on:{"current-change":t.handleCurrentChange}})],1)],1),t._v(" "),a("el-drawer",{attrs:{size:t.drawerSize,visible:t.detialDrawer,"with-header":!1},on:{"update:visible":function(e){t.detialDrawer=e}}},[a("detial",{ref:"detial",attrs:{rowProp:{customer_id:t.rowPro.customer_id,unionid:t.rowPro.unionid}},on:{changeDrawerSize:t.changeDrawerSize,closeDrawer:t.closeDrawer}})],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 y=a("VU/8")(m,f,!1,function(t){a("mUj6")},"data-v-7cda223a",null);e.default=y.exports}});
|