chunk-1e25f366.9f1bed63.js 10 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1e25f366"],{3643:function(t,e,a){},"365c":function(t,e,a){"use strict";a.d(e,"a",(function(){return s})),a.d(e,"c",(function(){return n})),a.d(e,"d",(function(){return r})),a.d(e,"b",(function(){return o}));var i=a("b6bd");function s(t){return Object(i["a"])({url:"home/header",method:"get",params:t})}function n(t){return Object(i["a"])({url:"home/orderChart",method:"get",params:t})}function r(t){return Object(i["a"])({url:"home/staff",method:"get",params:t})}function o(t){return Object(i["a"])({url:"home/operate",method:"get",params:t})}},"65e7":function(t,e,a){"use strict";var i=a("a043"),s=a.n(i);s.a},a043:function(t,e,a){},a584:function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("Row",{staticClass:"ivu-mt",attrs:{type:"flex",align:"middle",gutter:10}},t._l(t.cardLists,(function(e,i){return a("Col",{key:i,staticClass:"ivu-mb",attrs:{xl:e.col,lg:6,md:12,sm:24,xs:24}},[a("Card",{staticClass:"card_cent",attrs:{shadow:"",padding:0}},[a("div",{staticClass:"card_box"},[a("div",{staticClass:"card_box_cir",class:{one:i%5==0,two:i%5==1,three:i%5==2,four:i%5==3,five:i%5==4}},[a("div",{staticClass:"card_box_cir1",class:{one1:i%5==0,two1:i%5==1,three1:i%5==2,four1:i%5==3,five1:i%5==4}},[e.type?a("span",{staticClass:"iconfont",class:e.className}):a("Icon",{attrs:{type:e.className}})],1)]),a("div",{staticClass:"card_box_txt"},[a("span",{staticClass:"sp1",domProps:{textContent:t._s(e.count||0)}}),a("span",{staticClass:"sp2",domProps:{textContent:t._s(e.name)}})])])])],1)})),1)],1)},s=[],n={name:"cards",data:function(){return{}},props:{cardLists:Array},methods:{},created:function(){}},r=n,o=(a("f296"),a("2877")),c=Object(o["a"])(r,i,s,!1,null,"4bbf6041",null);e["a"]=c.exports},f296:function(t,e,a){"use strict";var i=a("3643"),s=a.n(i);s.a},f75a:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"resize",rawName:"v-resize",value:t.handleResize,expression:"handleResize"}],staticClass:"box"},[i("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[i("Form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[i("FormItem",{attrs:{label:"时间筛选:"}},[i("DatePicker",{staticStyle:{width:"250px"},attrs:{editable:!1,clearable:!0,value:t.timeVal,format:"yyyy/MM/dd",type:"datetimerange",placement:"bottom-start",placeholder:"自定义时间",options:t.options},on:{"on-change":t.onchangeTime}})],1)],1)],1),i("cards-data",{attrs:{cardLists:t.cardLists}}),i("Row",{staticClass:"ivu-mt Box",attrs:{gutter:24}},[i("Col",{attrs:{xl:24,lg:24,md:24,sm:24,xs:24}},[i("div",{staticClass:"ivu-pl-8 fonts"},[t._v("营业趋势")]),t.infoList?i("echarts-from",{ref:"visitChart",attrs:{series:t.series,echartsTitle:t.inlie,infoList:t.infoList,yAxisData:t.yAxisData}}):t._e()],1)],1),i("Row",{staticClass:"ivu-mt",attrs:{gutter:24}},[i("Col",{staticClass:"ivu-mb dashboard-console-visit",attrs:{xl:15,lg:12,md:24,sm:24,xs:24}},[i("Card",{staticClass:"tablebox",attrs:{bordered:!1,"dis-hover":""}},[i("div",{staticClass:"ivu-pl-8 fonts"},[t._v("交易数据")]),i("Table",{ref:"selection",attrs:{columns:t.columns2,data:t.tabList2,loading:t.loading,height:"300","no-data-text":"暂无数据","highlight-row":"","no-filtered-data-text":"暂无筛选结果"},scopedSlots:t._u([{key:"avatar",fn:function(t){var e=t.row;t.index;return[e.uid?i("img",{attrs:{src:e.avatar}}):i("img",{attrs:{src:a("586c")}})]}},{key:"nickname",fn:function(e){var a=e.row;e.index;return[i("span",[t._v(t._s(a.uid?a.nickname:"游客"))])]}},{key:"pay_time",fn:function(e){var a=e.row;e.index;return[i("div",[t._v(t._s(t.$moment(1e3*a.pay_time).format("YYYY-MM-DD H:mm:ss")))])]}},{key:"pay_price",fn:function(e){var a=e.row;e.index;return[i("span",{staticClass:"colorred"},[t._v("¥ "+t._s(a.pay_price))])]}}])})],1)],1),i("Col",{attrs:{xl:9,lg:12,md:24,sm:24,xs:24}},[i("Card",{staticClass:"dashboard-console-visit",attrs:{bordered:!1,"dis-hover":""}},[i("div",{attrs:{slot:"title"},slot:"title"},[i("div",{staticClass:"ivu-pl-8 fonts"},[t._v("交易类型")])]),i("echarts-from",{ref:"visitChart",attrs:{infoList:t.infoLists,echartsTitle:t.circle}})],1)],1)],1),i("Card",{staticClass:"ivu-mt box",attrs:{bordered:!1,"dis-hover":""}},[i("div",{staticClass:"fonts"},[t._v("店员业绩")]),i("Table",{ref:"selection",attrs:{columns:t.columns,data:t.tabList,loading:t.loading,"no-data-text":"暂无数据","highlight-row":"","no-filtered-data-text":"暂无筛选结果"}})],1)],1)},s=[],n=a("a34a"),r=a.n(n),o=a("2f62"),c=a("365c"),l=a("61f7"),d=a("9901"),u=a("a584"),f=a("0b65");function h(t,e,a,i,s,n,r){try{var o=t[n](r),c=o.value}catch(l){return void a(l)}o.done?e(c):Promise.resolve(c).then(i,s)}function m(t){return function(){var e=this,a=arguments;return new Promise((function(i,s){var n=t.apply(e,a);function r(t){h(n,i,s,r,o,"next",t)}function o(t){h(n,i,s,r,o,"throw",t)}r(void 0)}))}}function p(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}return a}function v(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?p(a,!0).forEach((function(e){y(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):p(a).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function y(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var b={name:"home",components:{cardsData:u["a"],echartsFrom:d["a"]},data:function(){return{loading:!1,optionData:{},formValidate:{status:"",extract_type:"",nireid:"",data:"thirtyday",page:1,limit:20},timeVal:[],fromList:{title:"选择时间",custom:!0,fromTxt:[{text:"昨天",val:"yesterday"},{text:"今天",val:"today"},{text:"最近7天",val:"sevenday"},{text:"近30天",val:"thirtyday"},{text:"本月",val:"month"},{text:"本年",val:"year"}]},options:f["a"],cardLists:[],extractStatistics:{},series:[],yAxisData:[],infoList:{},infoLists:{},circle:"circle1",inlie:"inlie",columns:[{title:"店员名称",key:"staff_name",minWidth:80},{title:"推广用户数",width:180,key:"spread_count"},{title:"推广用户消费金额",key:"speread_order_price",minWidth:100},{title:"推广付费会员数",key:"vip_count",minWidth:100},{title:"推广付费会员金额",key:"vip_price",minWidth:100}],columns2:[{title:"头像",slot:"avatar",minWidth:50},{title:"用户名称",minWidth:100,slot:"nickname"},{title:"订单号",key:"order_id",minWidth:100},{title:"交易金额",slot:"pay_price",minWidth:100},{title:"成交时间",slot:"pay_time",minWidth:100}],tabList:[],tabList2:[]}},computed:v({},Object(o["e"])("store/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:80},labelPosition:function(){return this.isMobile?"top":"left"}}),created:function(){var t=new Date,e=new Date;e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-29))),this.timeVal=[e,t],this.formValidate.data=Object(l["a"])(e,"yyyy/MM/dd")+"-"+Object(l["a"])(t,"yyyy/MM/dd"),this.cardList(),this.orderchart(),this.staff()},mounted:function(){this.$nextTick((function(){this.trends()}))},methods:{int:function(){this.cardList(),this.orderchart(),this.trends(),this.staff()},trends:function(){var t=this;Object(c["b"])({data:this.formValidate.data}).then(function(){var e=m(r.a.mark((function e(a){return r.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.infoList=a.data||{},t.series=t.infoList.series||[],t.yAxisData=[{type:"value",name:"",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{textStyle:{color:"#7F8B9C"}},splitLine:{show:!0,lineStyle:{color:"#F5F7F9"}}},{type:"value",name:"",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{textStyle:{color:"#7F8B9C"}},splitLine:{show:!0,lineStyle:{color:"#F5F7F9"}}}];case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$Message.error(e.msg)}))},orderchart:function(){var t=this;Object(c["c"])({data:this.formValidate.data}).then((function(e){t.tabList2=e.data.order_list,t.infoLists=e.data}))},staff:function(){var t=this;Object(c["d"])({data:this.formValidate.data}).then((function(e){t.tabList=e.data}))},selectChange:function(t){this.formValidate.page=1,this.formValidate.data=t,this.timeVal=[],this.int()},onchangeTime:function(t){console.log(t,555),this.timeVal=t,this.formValidate.data=this.timeVal[0]?this.timeVal.join("-"):"",""==t[0]&&(this.formValidate.data="thirtyday"),this.formValidate.page=1,this.int()},cardList:function(){var t=this;Object(c["a"])({data:this.formValidate.data}).then((function(e){t.extractStatistics=e.data,t.cardLists=[{col:6,count:t.extractStatistics.store_income,name:"门店订单金额",className:"iconmendiandingdanjine",type:1},{col:6,count:t.extractStatistics.store_use_yue,name:"余额消耗金额",className:"iconyuexiaohaojine",type:1},{col:6,count:t.extractStatistics.recharge_price,name:"用户充值金额",className:"iconmendianxinzengyonghushu",type:1},{col:6,count:t.extractStatistics.cashier_order_price,name:"收银订单金额",className:"iconshouyindingdanjine",type:1},{col:6,count:t.extractStatistics.vip_price,name:"付费会员金额",className:"iconfufeihuiyuanjine",type:1},{col:6,count:t.extractStatistics.store_order_price,name:"分配订单金额",className:"iconfenpeidingdanjine",type:1},{col:6,count:t.extractStatistics.store_writeoff_order_price,name:"核销订单金额",className:"iconhexiaodingdanjine",type:1},{col:6,count:t.extractStatistics.store_user_count,name:"门店新增用户数",className:"iconxinzengyonghushu1",type:1},{col:6,count:t.extractStatistics.store_pay_user_count,name:"门店成交用户数",className:"iconmendianchengjiaoyonghushu",type:1},{col:6,count:t.extractStatistics.card_count,name:"微信会员卡激活数",className:"iconhuiyuankajihuoshu",type:1}]}))},handleResize:function(){this.infoList&&this.$refs.visitChart.handleResize(),this.infoLists&&this.$refs.visitChart.handleResize()}}},x=b,_=(a("65e7"),a("2877")),g=Object(_["a"])(x,i,s,!1,null,"ec849328",null);e["default"]=g.exports}}]);