1 line
13 KiB
JavaScript
1 line
13 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-21251418"],{1075:function(e,t,a){"use strict";var i=a("57e7"),n=a.n(i);n.a},"3bbe":function(e,t,a){var i=a("861d");e.exports=function(e){if(!i(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},"57e7":function(e,t,a){},7156:function(e,t,a){var i=a("861d"),n=a("d2bb");e.exports=function(e,t,a){var o,r;return n&&"function"==typeof(o=t.constructor)&&o!==a&&i(r=o.prototype)&&r!==a.prototype&&n(e,r),e}},a9e3:function(e,t,a){"use strict";var i=a("83ab"),n=a("da84"),o=a("94ca"),r=a("6eeb"),l=a("5135"),s=a("c6b6"),c=a("7156"),u=a("c04e"),d=a("d039"),p=a("7c73"),m=a("241c").f,f=a("06cf").f,h=a("9bf2").f,b=a("58a8").trim,g="Number",v=n[g],y=v.prototype,_=s(p(y))==g,w=function(e){var t,a,i,n,o,r,l,s,c=u(e,!1);if("string"==typeof c&&c.length>2)if(c=b(c),t=c.charCodeAt(0),43===t||45===t){if(a=c.charCodeAt(2),88===a||120===a)return NaN}else if(48===t){switch(c.charCodeAt(1)){case 66:case 98:i=2,n=49;break;case 79:case 111:i=8,n=55;break;default:return+c}for(o=c.slice(2),r=o.length,l=0;l<r;l++)if(s=o.charCodeAt(l),s<48||s>n)return NaN;return parseInt(o,i)}return+c};if(o(g,!v(" 0o1")||!v("0b1")||v("+0x1"))){for(var x,D=function(e){var t=arguments.length<1?0:e,a=this;return a instanceof D&&(_?d((function(){y.valueOf.call(a)})):s(a)!=g)?c(new v(w(t)),a,D):w(t)},I=i?m(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),C=0;I.length>C;C++)l(v,x=I[C])&&!l(D,x)&&h(D,x,f(v,x));D.prototype=y,y.constructor=D,r(n,g,D)}},bc18:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"ba_f outmain"},[e._m(0),a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!1,model:e.form,"label-width":"100px"}},[a("div",{staticClass:"flex ba_f"},[a("el-form-item",{attrs:{label:"选择店铺:"}},[a("div",{},[a("el-select",{attrs:{placeholder:"请选择"},on:{change:e.changeStore},model:{value:e.form.shopValue,callback:function(t){e.$set(e.form,"shopValue",t)},expression:"form.shopValue"}},e._l(e.options,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name+"(ID:"+e.id+")",value:e.id}})})),1)],1)])],1)]),a("div",{staticClass:"main-icon flex t_l mar_t20"},[a("div",{staticClass:"flex-1 t_l pad_20 borderBG mar_r20"},[a("div",{staticClass:"flex-bet flex-y-top"},[a("div",[a("p",{staticClass:"title6 fon_14"},[e._v("商品总数")]),a("p",{staticClass:"fon_30 title35 lh16 pad_tb_20 wei"},[e._v(e._s(e.jeData.allGoods||0))])])])]),a("div",{staticClass:"flex-1 t_l pad_20 borderBG mar_r20"},[a("div",{staticClass:"flex-bet flex-y-top"},[a("div",[a("p",{staticClass:"title6 fon_14"},[e._v("已上架商品")]),a("p",{staticClass:"fon_30 title35 lh16 pad_tb_20 wei"},[e._v(e._s(e.jeData.onGoods||0))])])])]),a("div",{staticClass:"flex-1 t_l pad_20 borderBG mar_r20"},[a("div",{staticClass:"flex-bet flex-y-top"},[a("div",[a("p",{staticClass:"title6 fon_14"},[e._v("已下架商品")]),a("p",{staticClass:"fon_30 title35 lh16 pad_tb_20 wei"},[e._v(e._s(e.jeData.downGoods||0))])])])])])],1),a("div",{staticClass:"mar_t20 ba_f pad_20"},[e._m(1),a("div",{staticClass:"pad_20 flex-bet flex-y-top"},[a("el-form",{staticStyle:{width:"100%"},attrs:{inline:!0,model:e.formInline}},[a("el-form-item",{attrs:{label:"排行类型:"}},[a("el-select",{attrs:{placeholder:"请选择"},on:{change:e.selectType},model:{value:e.formInline.type,callback:function(t){e.$set(e.formInline,"type",t)},expression:"formInline.type"}},e._l(e.lyOptions,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),a("el-form-item",{staticClass:"mar_l20",attrs:{label:"查询日期:"}},[a("div",{staticClass:"flex-bet"},[a("div",[a("el-radio-group",{on:{change:e.selectType},model:{value:e.formInline.timeType,callback:function(t){e.$set(e.formInline,"timeType",t)},expression:"formInline.timeType"}},[a("el-radio-button",{attrs:{label:"1"}},[e._v("今天")]),a("el-radio-button",{attrs:{label:"2"}},[e._v("近七天")]),a("el-radio-button",{attrs:{label:"3"}},[e._v("近十五天")]),a("el-radio-button",{attrs:{label:"4"}},[e._v("自定义时间")])],1),"4"==e.formInline.timeType?a("span",{staticClass:"mar_l20"},[a("el-date-picker",{attrs:{type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期",format:"yyyy年MM月dd日","picker-options":e.pickerOptions},on:{change:e.selectType},model:{value:e.formInline.time,callback:function(t){e.$set(e.formInline,"time",t)},expression:"formInline.time"}})],1):e._e()],1)])]),a("div",{staticClass:"flex ba_f"},[a("el-form-item",{attrs:{label:"商品导出:"}},[a("a",{staticClass:"mar_l10",attrs:{href:e.handelExport()}},[a("el-button",{attrs:{size:"medium",type:"primary"}},[e._v("导出商品")])],1)])],1)],1)],1),a("div",{staticClass:"flex-g-1 mar_r20"},[a("div",{staticClass:"mar_t10 shuju_table"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData2}},[a("el-table-column",{attrs:{type:"index",label:"排名",width:"300"}}),e._v(" > "),a("el-table-column",{attrs:{prop:"categoryName",label:"商品分类"}}),a("el-table-column",{attrs:{prop:"name",label:"商品名称"}}),e._v(" > "),a("el-table-column",{attrs:{prop:"num",label:"销量(件)"}}),a("el-table-column",{attrs:{prop:"money",label:"销售额(元)"}})],1)],1)])])])},n=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"shuju_title"},[a("div",{staticClass:"shuju_title_text"},[a("span",[e._v("商品概况")])])])},function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"shuju_title"},[a("div",{staticClass:"shuju_title_text"},[a("span",[e._v("商品排行")])])])}],o=(a("96cf"),a("1da1")),r=a("5530"),l=a("313e"),s=a.n(l),c=a("48fb"),u=a("ed08"),d=a("2f62"),p=a("365c"),m={mounted:function(){this.bus.$emit("loading",!0),this.init(),window.addEventListener("resize",this.initchart)},created:function(){this.form.shopValue=this.market[0].id,this.options=this.market},data:function(){var e=this;return{formInline:{type:"1",timeType:"1",time:[new Date,new Date],Mtime:""},lyOptions:[{value:"1",label:"按商品销量排行"},{value:"2",label:"按商品销售额排行"}],selectData:"",pickerOptions:{onPick:function(t){var a=t.maxDate,i=t.minDate;e.selectData=i.getTime(),a&&(e.selectData="")},disabledDate:function(t){if(e.isNull(e.selectData))return!1;var a=new Date(e.selectData);return a.getMonth()>new Date(t).getMonth()||a.getMonth()<new Date(t).getMonth()}},page:{total:0,size:20,currentPage:1},zhData:{},jeData:{},jyData:{},form:{shopValue:"",timeType:"1",time:[new Date,new Date],Mtime:""},options:[{value:"1",label:"全部"}],tableData:[],tableData2:[],echarts1_option:{color:["#4284ED","#42CCF0"],tooltip:{trigger:"axis"},legend:{data:["营业额"]},grid:{left:"3%",right:"5%",bottom:"3%",containLabel:!0},xAxis:{type:"category",axisTick:{show:!1,lineStyle:{color:"#ccc",type:"dashed"}},axisLabel:{show:!0,textStyle:{color:"#333",fontSize:"12"}},axisLine:{lineStyle:{color:"#4ECB73",width:2}},data:[]},yAxis:{type:"value",axisTick:{show:!1},axisLine:{show:!1},axisLabel:{show:!0,textStyle:{color:"#333",fontSize:"12"}},splitLine:{lineStyle:{type:"dotted",color:"#DDDDDD"},show:!0}},series:[{name:"营业额",type:"bar",data:[]}]},echarts4_option:{color:["#4284ED","#42CCF0","#1890FF","#2FC25B","#4284ED"],tooltip:{trigger:"axis"},legend:{data:["营业总额","预计收入","有效订单","无效订单"]},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",boundaryGap:!1,axisTick:{show:!1,lineStyle:{color:"#ccc",type:"dashed"}},axisLabel:{show:!0,textStyle:{color:"#333",fontSize:"12"}},axisLine:{lineStyle:{color:"#f7f7f7",width:2}},data:[]},yAxis:{type:"value",axisTick:{show:!1},axisLine:{show:!1},axisLabel:{show:!0,textStyle:{color:"#333",fontSize:"12"}},splitLine:{lineStyle:{type:"dotted",color:"#DDDDDD"},show:!0}},series:[{name:"营业总额",type:"line",stack:"总量",smooth:!0,data:[]},{name:"预计收入",type:"line",stack:"总量",smooth:!0,data:[]},{name:"有效订单",type:"line",stack:"总量",smooth:!0,data:[]},{name:"无效订单",type:"line",stack:"总量",smooth:!0,data:[]}]},echarts32_option:{color:["#5654F5","#4CA8FF","#4EC478","#FBA33F","#EBA675"],tooltip:{trigger:"item"},legend:{orient:"vertical",right:0,data:["微信小程序","支付宝小程序"]},series:[{name:"支付金额",type:"pie",radius:["40%","60%"],avoidLabelOverlap:!1,label:{show:!1,position:"center"},emphasis:{label:{show:!0,fontSize:"20",fontWeight:"bold"},itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},labelLine:{show:!1},data:[{value:35,name:"微信小程序"},{value:20,name:"支付宝小程序"}]}]},echarts33_option:{color:["#5654F5","#4CA8FF","#4EC478","#FBA33F","#EBA675"],tooltip:{trigger:"item"},legend:{orient:"vertical",right:0,data:["外卖订单","外卖自提订单"]},series:[{name:"支付金额",type:"pie",radius:["40%","60%"],avoidLabelOverlap:!1,label:{show:!1,position:"center"},emphasis:{label:{show:!0,fontSize:"20",fontWeight:"bold"},itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},labelLine:{show:!1},data:[{value:35,name:"外卖订单"},{value:20,name:"外卖自提订单"}]}]},echarts34_option:{color:["#5654F5","#4CA8FF","#4EC478","#FBA33F","#EBA675"],tooltip:{trigger:"item"},legend:{orient:"vertical",right:0,data:["微信支付","支付宝支付","余额支付","货到付款"]},series:[{name:"支付金额",type:"pie",radius:["40%","60%"],avoidLabelOverlap:!1,label:{show:!1,position:"center"},emphasis:{label:{show:!0,fontSize:"20",fontWeight:"bold"},itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},labelLine:{show:!1},data:[{value:35,name:"微信支付"},{value:20,name:"支付宝支付"},{value:20,name:"余额支付"},{value:20,name:"货到付款"}]}]}}},computed:Object(r["a"])({},Object(d["d"])(["market"])),methods:{init:function(){this.realRecord()},initchart:function(){var e=s.a.init(document.getElementById("zhentiEch"));e.resize()},realRecord:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var a,i,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a={storeId:e.form.shopValue,type:e.formInline.type,timeType:e.formInline.timeType,startTime:"4"==e.formInline.timeType&&e.formInline.time?Object(u["a"])(e.formInline.time[0]).substr(0,10):"",endTime:"4"==e.formInline.timeType&&e.formInline.time?Object(u["a"])(e.formInline.time[1]).substr(0,10):""},t.next=3,Object(c["I"])(a);case 3:i=t.sent,n=i.data,i.count,n&&(e.jeData=n,e.tableData2=n.payTop,e.bus.$emit("loading",!1));case 7:case"end":return t.stop()}}),t)})))()},mainEch32:function(){var e=s.a.init(document.getElementById("mainEch32"));e.setOption(this.echarts32_option,!0)},mainEch33:function(){var e=s.a.init(document.getElementById("mainEch33"));e.setOption(this.echarts33_option,!0)},mainEch34:function(){var e=s.a.init(document.getElementById("mainEch34"));e.setOption(this.echarts34_option,!0)},selectType:function(){this.init()},isNull:function(e){return!e},changeStore:function(){this.realRecord()},handleCurrentChange:function(e){this.page.currentPage=e,this.realRecord()},handelExport:function(){var e=this.formInline.time?Object(u["a"])(this.formInline.time[0]).substring(0,10):"",t=this.formInline.time?Object(u["a"])(this.formInline.time[1]).substring(0,10):"",a=p["a"].backendPath;return a+"channel/financial/good-export?type="+this.formInline.type+"&goodsType=1&timeType="+this.formInline.timeType+"&storeId="+this.form.shopValue+"&startTime="+e+"&endTime="+t}}},f=m,h=(a("1075"),a("2877")),b=Object(h["a"])(f,i,n,!1,null,"6afa0362",null);t["default"]=b.exports},bf19:function(e,t,a){"use strict";var i=a("23e7");i({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},d2bb:function(e,t,a){var i=a("825a"),n=a("3bbe");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,a={};try{e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,e.call(a,[]),t=a instanceof Array}catch(o){}return function(a,o){return i(a),n(o),t?e.call(a,o):a.__proto__=o,a}}():void 0)},ed08:function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),a.d(t,"b",(function(){return n})),a.d(t,"c",(function(){return o}));a("a9e3"),a("ac1f"),a("5319"),a("bf19");function i(e){var t=new Date(e).toJSON(),a=new Date(+new Date(t)+288e5).toISOString().replace(/T/g," ").replace(/\.[\d]{3}Z/,"");return a}function n(e){var t=new Date(e),a=t.getFullYear(),i=t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1,n=t.getDate()<10?"0"+t.getDate():t.getDate(),o=t.getHours()<10?"0"+t.getHours():t.getHours(),r=t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),l=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds();return a+"-"+i+"-"+n+" "+o+":"+r+":"+l}function o(e){var t=new Date(1e3*Number(e)),a=t.getFullYear()+"-",i=(t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1)+"-",n=(t.getDate()<10?"0"+t.getDate():t.getDate())+" ",o=(t.getHours()<10?"0"+t.getHours():t.getHours())+":",r=(t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes())+":",l=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds(),s=a+i+n+o+r+l;return s}}}]); |