企微助手 ,仓库名 短剧

42.4895acbfed9d99a1e320.js 17KB

1
  1. webpackJsonp([42],{UtNx:function(t,e,a){"use strict";var i={props:{list:{type:Array,required:!0,default:function(){return[]}},maxLength:{type:Number,default:function(){return 5}},width:{type:Number,default:function(){return 200}}}},n={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t.list.length<t.maxLength+1?t._l(t.list,function(e,i){return a("div",{key:i},[t._v("\n "+t._s(e)+"\n ")])}):[a("el-popover",{attrs:{placement:"top-start",width:t.width||200,trigger:"hover"}},[t._l(t.list,function(e,i){return a("div",{key:i},[t._v("\n "+t._s(e)+"\n ")])}),t._v(" "),a("div",{attrs:{slot:"reference"},slot:"reference"},[t._l(t.list,function(e,i){return a("div",{key:i},[i<t.maxLength?a("span",[t._v(t._s(e))]):t._e()])}),t._v(" "),a("div",[t._v(" ... ")])],2)],2)]],2)},staticRenderFns:[]};var r=a("VU/8")(i,n,!1,function(t){a("vCwT")},null,null);e.a=r.exports},XU0O:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("Gu7T"),n=a.n(i),r=a("Dd8w"),o=a.n(r),s=a("//Fk"),l=a.n(s),c=a("d7EF"),d=a.n(c),p=a("Xxa5"),_=a.n(p),f=a("u2KI"),u=a.n(f),h=a("exGp"),m=a.n(h),g=a("gzej"),v=a("erru"),y=a("UtNx"),x=a("KnvP"),C={components:{datePicker:g.a,selfChannel:v.a,colPopover:y.a,inputRange:x.a},data:function(){var t=[this.$getDay(0,!1),this.$getDay(0,!1)];return{default_time:t,reset:!1,pageLoading:!1,height:"",summaryLoading:!1,summaryTableCol:[],detailLoading:!1,detailsTableCol:[],detailsTableColDays:[],pagination:{page:1,page_size:20,pages:0,total:0},filter:{time:t,app_id:"",pitcher_id:"",operator_id:"",closing_date:"",costCover:["",""],sort_field:"paid",sort_type:"desc"},updateTime:"",isShowEmpty:!1}},computed:{isShowMpBtn:function(){return!!this.$store.state.dataBoardAuth.mp_auth},isCanExport:function(){return!!this.$store.state.dataBoardAuth.can_export}},created:function(){this.initTableHeight(),this.handleGetData()},methods:{handleGetData:function(){this.handleGetSummaryList(),this.handleGetList(),this.handleGetUpdateTime()},handleGetList:function(){var t=this;return m()(_.a.mark(function e(){var a,i,n,r,o,s,l,c;return _.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.detailLoading=!0,a={app_id:t.filter.app_id,operator_id:t.filter.operator_id,pitcher_id:t.filter.pitcher_id,start_date:t.filter.time[0],end_date:t.filter.time[1],closing_date:t.filter.closing_date,cost_cover_min:t.filter.costCover[0],cost_cover_max:t.filter.costCover[1],sort_field:t.filter.sort_field,sort_type:t.filter.sort_type,page:t.pagination.page,page_size:t.pagination.page_size},i=""+t.URL.BASEURL+t.URL.dataBoard_officialAccount_list,e.next=6,t.$axios.get(i,{params:a});case 6:if(n=e.sent,r=n.data,!(o=void 0===r?{}:r)||0!=o.errno){e.next=25;break}return o.rst.extra[0].fixed="left",o.rst.extra[1].fixed="left",s=[],l=[],o.rst.extra.forEach(function(t){t.name.includes("DAY")?l.push(t):(t.name&&t.name.length>6&&(t.min_width=25*t.name.length),s.push(t))}),t.detailsTableCol=u()(s),t.detailsTableColDays=u()(l),e.next=19,t.$nextTick();case 19:c=Array.isArray(o.rst.data)?o.rst.data:[],t.$refs.detailsTable.reloadData(c),t.pagination.total=o.rst.pageInfo.total,t.pagination.pages=o.rst.pageInfo.pages,e.next=26;break;case 25:4002!=o.errno&&(t.$message.warning(o.err),t.$refs.detailsTable.reloadData([]),t.pagination.total=0,t.pagination.pages=0);case 26:e.next=34;break;case 28:e.prev=28,e.t0=e.catch(0),console.log(e.t0),t.$refs.detailsTable.reloadData([]),t.pagination.total=0,t.pagination.pages=0;case 34:return e.prev=34,t.detailLoading=!1,e.finish(34);case 37:case"end":return e.stop()}},e,t,[[0,28,34,37]])}))()},handleGetSummaryList:function(){var t=this;return m()(_.a.mark(function e(){var a,i,n,r,o,s,l;return _.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.summaryLoading=!0,a={start_date:t.filter.time[0],end_date:t.filter.time[1],app_id:t.filter.app_id,operator_id:t.filter.operator_id,pitcher_id:t.filter.pitcher_id,closing_date:t.filter.closing_date,cost_cover_min:t.filter.costCover[0],cost_cover_max:t.filter.costCover[1]},i=""+t.URL.BASEURL+t.URL.dataBoard_officialAccount_summary,e.next=6,t.$axios.get(i,{params:a});case 6:if(n=e.sent,r=n.data,!(o=void 0===r?{}:r)||0!=o.errno){e.next=19;break}return s=[],o.rst.header.forEach(function(t){t.name&&t.name.length>6&&(t.min_width=25*t.name.length),s.push(t)}),t.summaryTableCol=u()(s),e.next=15,t.$nextTick();case 15:l=Array.isArray(o.rst.data)?o.rst.data:[o.rst.data],t.$refs.summaryTable.reloadData(l),e.next=20;break;case 19:4002!=o.errno&&(t.$message.warning(o.err),t.$refs.summaryTable.reloadData([]));case 20:e.next=26;break;case 22:e.prev=22,e.t0=e.catch(0),console.log(e.t0),t.$refs.summaryTable.reloadData([]);case 26:return e.prev=26,t.summaryLoading=!1,e.finish(26);case 29:case"end":return e.stop()}},e,t,[[0,22,26,29]])}))()},handleGetUpdateTime:function(){var t=this;return m()(_.a.mark(function e(){var a,i,n,r;return _.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,a={type:"operate_data_trend"},e.next=4,t.$axios.get(""+t.URL.BASEURL+t.URL.dataBoard_uptime,{params:a});case 4:i=e.sent,n=i.data,(r=void 0===n?{}:n)&&0==r.errno?t.updateTime=r.rst.uptime:4002!=r.errno&&(t.$message.warning(r.err),t.updateTime=""),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),t.updateTime="";case 13:case"end":return e.stop()}},e,t,[[0,10]])}))()},onChangeTime:function(t){this.filter.time=Array.isArray(t)?t:[],this.pagination.page=1,this.handleGetData()},onChangeAccountId:function(t){this.filter.app_id=t,this.pagination.page=1,this.handleGetData()},onChangePitcherId:function(t){this.filter.pitcher_id=t,this.pagination.page=1,this.handleGetData()},onChangeOperatorId:function(t){this.filter.operator_id=t,this.pagination.page=1,this.handleGetData()},onChangeClosingDate:function(t){this.filter.closing_date=t||"",this.pagination.page=1,this.handleGetData()},onClickSearch:function(){this.pagination.page=1,this.handleGetData()},onClickSort:function(t,e){this.filter.sort_field===t?this.filter.sort_type===e?(this.filter.sort_field="paid",this.filter.sort_type="desc"):this.filter.sort_type=e:(this.filter.sort_field=t,this.filter.sort_type=e),this.pagination.page=1,this.handleGetData()},handleCurrentChange:function(t){this.pagination.page=t,this.handleGetData()},handleSizeChange:function(t){this.pagination.page_size=t,this.pagination.page=1,this.handleGetData()},onClickReset:function(){this.reset=!this.reset,this.filter.time=this.default_time,this.filter.app_id="",this.filter.pitcher_id="",this.filter.operator_id="",this.filter.closing_date="",this.filter.costCover=["",""],this.filter.sort_field="paid",this.filter.sort_type="desc",this.pagination.page=1,this.handleGetData()},onClickExport:function(){var t=this;return m()(_.a.mark(function e(){var a,i,n,r,s,c,p,f;return _.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.pagination.total){e.next=2;break}return e.abrupt("return",t.$message.warning("暂无数据可导出"));case 2:return e.prev=2,t.pageLoading=!0,a={summary:""+t.URL.BASEURL+t.URL.dataBoard_officialAccount_summary,detail:""+t.URL.BASEURL+t.URL.dataBoard_officialAccount_list},i={start_date:t.filter.time[0],end_date:t.filter.time[1],app_id:t.filter.app_id,operator_id:t.filter.operator_id,pitcher_id:t.filter.pitcher_id,closing_date:t.filter.closing_date,cost_cover_min:t.filter.costCover[0],cost_cover_max:t.filter.costCover[1]},e.next=8,l.a.all([t.$axios.get(a.summary,{params:i}),t.$axios.get(a.detail,{params:o()({},i,{sort_field:t.filter.sort_field,sort_type:t.filter.sort_type,page:1,page_size:t.$store.state.exportNumber})})]);case 8:n=e.sent,r=d()(n,2),s=r[0].data,c=void 0===s?{}:s,p=r[1].data,f=void 0===p?{}:p,c&&0==c.errno&&f&&0==f.errno?t.handleExport({summaryData:c.rst,detailData:f.rst}):4002==c.errno&&4002==f.errno||(t.$message.warning(c.err),t.$message.warning(f.err)),e.next=21;break;case 17:e.prev=17,e.t0=e.catch(2),console.log(e.t0),t.$message.warning("导出失败,请重试");case 21:return e.prev=21,t.pageLoading=!1,e.finish(21);case 24:case"end":return e.stop()}},e,t,[[2,17,21,24]])}))()},handleExport:function(t){var e=t.summaryData,a=void 0===e?{}:e,i=t.detailData,r=void 0===i?{}:i,o=[];o=r.extra.filter(function(t){return t.name.includes("DAY")}),r.data.forEach(function(t){t.pitcher_list=Array.isArray(t.pitcher_list)?t.pitcher_list.join("、"):t.pitcher_list,t.operator_list=Array.isArray(t.operator_list)?t.operator_list.join("、"):t.operator_list,o.forEach(function(e,a){t[e.column]="充: "+(t&&t.day_info&&t.day_info[a]&&(t.day_info[a].pay_money||0==t.day_info[a].pay_money)?t.day_info[a].pay_money:"-")+" 回: "+(t&&t.day_info&&t.day_info[a]&&(t.day_info[a].total_roi||0==t.day_info[a].total_roi)?t.day_info[a].total_roi:"-")+" 增: "+(t&&t.day_info&&t.day_info[a]&&(t.day_info[a].new_roi||0==t.day_info[a].new_roi)?t.day_info[a].new_roi:"-")+" 倍: "+(t&&t.day_info&&t.day_info[a]&&(t.day_info[a].income_times||0==t.day_info[a].income_times)?t.day_info[a].income_times:"-")+" 充值人数: "+(t&&t.day_info&&t.day_info[a]&&(t.day_info[a].charge_user||0==t.day_info[a].charge_user)?t.day_info[a].charge_user:"-")})});var s=[{tHeader:[].concat(n()(a.header.map(function(t){return t.name})),n()(o.map(function(t){return t.name}))),filterVal:[].concat(n()(a.header.map(function(t){return t.column})),n()(o.map(function(t){return t.column}))),tableDatas:[a.data].concat(n()(r.data)),sheetName:""}];this.$exportOrder({excelDatas:s,name:"公众号数据(导出时间:"+this.$getDay(0)+")"})},getHeaderCellStyle:function(){return{backgroundColor:"#FFFFFF !important",border:"none!important"}},initTableHeight:function(){this.height=document.documentElement.clientHeight-240>400?document.documentElement.clientHeight-240:400}}},b={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.pageLoading,expression:"pageLoading"}],staticClass:"officialAccount-wrap"},[a("div",{staticClass:"screenBox"},[a("div",{staticClass:"flex-align-center",staticStyle:{"flex-wrap":"wrap","margin-right":"60px"}},[a("datePicker",{staticStyle:{"margin-right":"30px"},attrs:{title:"自定义",quickFlag:!0,afferent_time:t.default_time,clearFlag:!1,reset:t.reset},on:{changeTime:t.onChangeTime}}),t._v(" "),a("selfChannel",{staticStyle:{"margin-left":"-30px","margin-right":"30px"},attrs:{title:"公众号",type:"officialAccount",placeholder:"请选择",labelWidth:!0,reset:t.reset},on:{channelDefine:t.onChangeAccountId}}),t._v(" "),a("selfChannel",{staticStyle:{"margin-left":"-30px","margin-right":"30px"},attrs:{title:"投手",type:"pitcher",placeholder:"请选择",labelWidth:!0,reset:t.reset},on:{channelDefine:t.onChangePitcherId}}),t._v(" "),a("selfChannel",{staticStyle:{"margin-left":"-30px","margin-right":"30px"},attrs:{title:"运营",type:"circleCreate",placeholder:"请选择",labelWidth:!0,reset:t.reset},on:{channelDefine:t.onChangeOperatorId}}),t._v(" "),a("div",{staticClass:"common-screen-item",staticStyle:{"margin-right":"30px"}},[a("label",{staticClass:"common-screen-label"},[t._v("收益截止日期")]),t._v(" "),a("el-date-picker",{staticStyle:{width:"150px"},attrs:{"value-format":"yyyy-MM-dd",type:"date",placeholder:"选择日期",size:"small"},on:{change:t.onChangeClosingDate},model:{value:t.filter.closing_date,callback:function(e){t.$set(t.filter,"closing_date",e)},expression:"filter.closing_date"}})],1),t._v(" "),a("div",{staticClass:"flex"},[a("inputRange",{staticStyle:{"margin-right":"10px"},attrs:{label:"回本率"},model:{value:t.filter.costCover,callback:function(e){t.$set(t.filter,"costCover",e)},expression:"filter.costCover"}}),t._v(" "),a("el-button",{attrs:{size:"mini",type:"primary",plain:""},on:{click:t.onClickSearch}},[t._v("确定")]),t._v(" "),a("el-button",{attrs:{size:"mini",plain:""},on:{click:t.onClickReset}},[t._v("重置")])],1)],1),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",{staticClass:"update-time"},[a("i",{staticClass:"el-icon-warning-outline"}),t._v("数据更新时间:"+t._s(t.updateTime||"-"))]),t._v(" "),a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.summaryLoading,expression:"summaryLoading"}]},[a("ux-grid",{ref:"summaryTable",staticClass:"summaryTable",attrs:{border:!1,"header-cell-style":t.getHeaderCellStyle,"show-footer-overflow":"tooltip","show-overflow":"tooltip",size:"mini"},on:{"row-click":function(){}}},t._l(t.summaryTableCol,function(e,i){return a("ux-table-column",{key:e.column+e.name,attrs:{resizable:!0,field:e.column,title:e.name,"min-width":e.min_width?e.min_width:160,fixed:e.fixed?e.fixed:"",align:"center"},scopedSlots:t._u([{key:"header",fn:function(){return[a("div",{staticClass:"flex-align-jus-center"},[t._v("\n "+t._s(e.name)+"\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 n=i.row;return[a("span",[t._v(t._s(n[e.column]||0==n[e.column]?t.$formatNum(n[e.column]):"-"))])]}}],null,!0)})}),1)],1),t._v(" "),a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.detailLoading,expression:"detailLoading"}]},[a("ux-grid",{ref:"detailsTable",staticClass:"detailsTable",attrs:{border:!1,"header-cell-style":t.getHeaderCellStyle,"show-footer-overflow":"tooltip","show-overflow":"tooltip",size:"mini",height:t.height},on:{"row-click":function(){}}},[t._l(t.detailsTableCol,function(e,i){return a("ux-table-column",{key:e.column+e.name,attrs:{resizable:!0,field:e.column,title:e.name,"min-width":e.min_width?e.min_width:160,fixed:e.fixed?e.fixed:"",align:"center"},scopedSlots:t._u([{key:"header",fn:function(){return[a("div",{staticClass:"flex-align-jus-center"},[t._v("\n "+t._s(e.name)+"\n "),e.notes?a("el-tooltip",{attrs:{content:e.notes,placement:"top"}},[a("div",[a("i",{staticClass:"el-icon-question"})])]):t._e(),t._v(" "),e.enable_to_sort?a("div",{staticClass:"sort-wrap"},[a("i",{staticClass:"el-icon-caret-top",class:{active:t.filter.sort_field===e.column&&"asc"===t.filter.sort_type},on:{click:function(a){return t.onClickSort(e.column,"asc")}}}),t._v(" "),a("i",{staticClass:"el-icon-caret-bottom",class:{active:t.filter.sort_field===e.column&&"desc"===t.filter.sort_type},on:{click:function(a){return t.onClickSort(e.column,"desc")}}})]):t._e()],1)]},proxy:!0},{key:"default",fn:function(i){var n=i.row;return["pitcher_list"===e.column?a("span",[n.pitcher_list&&n.pitcher_list.length?[a("colPopover",{attrs:{list:n.pitcher_list,maxLength:4}})]:a("span",[t._v(" - ")])],2):"operator_list"===e.column?a("span",[n.operator_list&&n.operator_list.length?[a("colPopover",{attrs:{list:n.operator_list,maxLength:4}})]:a("span",[t._v(" - ")])],2):a("span",[t._v(t._s(n[e.column]||0==n[e.column]?t.$formatNum(n[e.column]):"-"))])]}}],null,!0)})}),t._v(" "),t._l(t.detailsTableColDays,function(e,i){return a("ux-table-column",{key:i+e.name,attrs:{width:"120"},scopedSlots:t._u([{key:"header",fn:function(){return[a("div",{staticClass:"flex-align-jus-center"},[t._v(t._s(e.name)+"\n "),0===i?a("el-tooltip",{attrs:{placement:"top"}},[a("div",{attrs:{slot:"content"},slot:"content"},[t._v("充:这天的充值金额"),a("br"),t._v("回:截止这天的累计金额/当天消耗"),a("br"),t._v("增:这天回收金额/当天消耗"),a("br"),t._v("倍:累计金额/第一天累计金额"),a("br"),t._v("充值人数:充值总人数")]),t._v(" "),a("div",[a("i",{staticClass:"el-icon-question"})])]):t._e()],1)]},proxy:!0},{key:"default",fn:function(e){var n=e.row;return[a("div",{staticClass:"day_class_info"},[a("span",{staticClass:"font",staticStyle:{color:"#2C9841"}},[t._v("充:")]),t._v(" "),a("span",[t._v(t._s(n&&n.day_info&&n.day_info[i]&&n.day_info[i].pay_money?n.day_info[i].pay_money:"-"))])]),t._v(" "),a("div",{staticClass:"day_class_info"},[a("span",{staticClass:"font",staticStyle:{color:"#EB4315"}},[t._v("回:")]),t._v(" "),a("span",[t._v(t._s(n&&n.day_info&&n.day_info[i]&&n.day_info[i].total_roi?n.day_info[i].total_roi:"-"))])]),t._v(" "),a("div",{staticClass:"day_class_info"},[a("span",{staticClass:"font",staticStyle:{color:"#F28544"}},[t._v("增:")]),t._v(" "),a("span",[t._v(t._s(n&&n.day_info&&n.day_info[i]&&n.day_info[i].new_roi?n.day_info[i].new_roi:"-"))])]),t._v(" "),a("div",{staticClass:"day_class_info"},[a("span",{staticClass:"font",staticStyle:{color:"#2983DF"}},[t._v("倍:")]),t._v(" "),a("span",[t._v(t._s(n&&n.day_info&&n.day_info[i]&&n.day_info[i].income_times?n.day_info[i].income_times:"-"))])]),t._v(" "),a("div",{staticClass:"day_class_info"},[a("span",{staticClass:"font",staticStyle:{color:"#7366FF"}},[t._v("充值人数:")]),t._v(" "),a("span",[t._v(t._s(n&&n.day_info&&n.day_info[i]&&n.day_info[i].charge_user?n.day_info[i].charge_user:"-"))])])]}}],null,!0)})})],2),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.pagination.total>0,expression:"pagination.total > 0"}],staticClass:"pagination"},[a("el-pagination",{attrs:{background:"","current-page":t.pagination.page,layout:"prev, pager, next, sizes, jumper","page-sizes":[20,50,100],"page-count":Number(t.pagination.pages)},on:{"current-change":t.handleCurrentChange,"size-change":t.handleSizeChange}})],1)],1)])},staticRenderFns:[]};var w=a("VU/8")(C,b,!1,function(t){a("np2X"),a("jnvx")},"data-v-2b76f456",null);e.default=w.exports},jnvx:function(t,e){},np2X:function(t,e){},vCwT:function(t,e){}});