1 line
13 KiB
JavaScript
1 line
13 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f95bc6f4"],{"25c1":function(t,e,a){"use strict";var i=a("7bd8"),n=a.n(i);n.a},"3bbe":function(t,e,a){var i=a("861d");t.exports=function(t){if(!i(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},7156:function(t,e,a){var i=a("861d"),n=a("d2bb");t.exports=function(t,e,a){var o,l;return n&&"function"==typeof(o=e.constructor)&&o!==a&&i(l=o.prototype)&&l!==a.prototype&&n(t,l),t}},"7bd8":function(t,e,a){},a9e3:function(t,e,a){"use strict";var i=a("83ab"),n=a("da84"),o=a("94ca"),l=a("6eeb"),s=a("5135"),r=a("c6b6"),c=a("7156"),u=a("c04e"),d=a("d039"),p=a("7c73"),f=a("241c").f,m=a("06cf").f,h=a("9bf2").f,b=a("58a8").trim,v="Number",_=n[v],g=_.prototype,y=r(p(g))==v,w=function(t){var e,a,i,n,o,l,s,r,c=u(t,!1);if("string"==typeof c&&c.length>2)if(c=b(c),e=c.charCodeAt(0),43===e||45===e){if(a=c.charCodeAt(2),88===a||120===a)return NaN}else if(48===e){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),l=o.length,s=0;s<l;s++)if(r=o.charCodeAt(s),r<48||r>n)return NaN;return parseInt(o,i)}return+c};if(o(v,!_(" 0o1")||!_("0b1")||_("+0x1"))){for(var x,D=function(t){var e=arguments.length<1?0:t,a=this;return a instanceof D&&(y?d((function(){g.valueOf.call(a)})):r(a)!=v)?c(new _(w(e)),a,D):w(e)},I=i?f(_):"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++)s(_,x=I[C])&&!s(D,x)&&h(D,x,m(_,x));D.prototype=g,g.constructor=D,l(n,v,D)}},bf19:function(t,e,a){"use strict";var i=a("23e7");i({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},d2ba:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"ba_f outmain"},[t._m(0),a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!1,model:t.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:t.changeStore},model:{value:t.form.shopValue,callback:function(e){t.$set(t.form,"shopValue",e)},expression:"form.shopValue"}},t._l(t.options,(function(t){return a("el-option",{key:t.id,attrs:{label:t.name+"(ID:"+t.id+")",value:t.id}})})),1)],1)])],1)])],1),a("div",{staticClass:"mar_t20 ba_f outmain"},[t._m(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"},[t._v("商品总数")]),a("p",{staticClass:"fon_30 title35 lh16 pad_tb_20 wei"},[t._v(t._s(t.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"},[t._v("已上架商品")]),a("p",{staticClass:"fon_30 title35 lh16 pad_tb_20 wei"},[t._v(t._s(t.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"},[t._v("已下架商品")]),a("p",{staticClass:"fon_30 title35 lh16 pad_tb_20 wei"},[t._v(t._s(t.jeData.downGoods||0))])])])])])]),a("div",{staticClass:"mar_t20 ba_f pad_20"},[t._m(2),a("div",{staticClass:"pad_20 flex-bet flex-y-top"},[a("el-form",{staticStyle:{width:"100%"},attrs:{inline:!0,model:t.formInline}},[a("el-form-item",{attrs:{label:"排行类型:"}},[a("el-select",{attrs:{placeholder:"请选择"},on:{change:t.selectType},model:{value:t.formInline.type,callback:function(e){t.$set(t.formInline,"type",e)},expression:"formInline.type"}},t._l(t.lyOptions,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.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:t.selectType},model:{value:t.formInline.timeType,callback:function(e){t.$set(t.formInline,"timeType",e)},expression:"formInline.timeType"}},[a("el-radio-button",{attrs:{label:"1"}},[t._v("今天")]),a("el-radio-button",{attrs:{label:"2"}},[t._v("近七天")]),a("el-radio-button",{attrs:{label:"3"}},[t._v("近十五天")]),a("el-radio-button",{attrs:{label:"4"}},[t._v("自定义时间")])],1),"4"==t.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":t.pickerOptions},on:{change:t.selectType},model:{value:t.formInline.time,callback:function(e){t.$set(t.formInline,"time",e)},expression:"formInline.time"}})],1):t._e()],1)])]),a("div",{staticClass:"flex ba_f"},[a("el-form-item",{attrs:{label:"商品导出:"}},[a("a",{staticClass:"mar_l10",attrs:{href:t.handelExport()}},[a("el-button",{attrs:{size:"medium",type:"primary"}},[t._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:t.tableData2}},[a("el-table-column",{attrs:{type:"index",label:"排名",width:"300"}}),t._v(" > "),a("el-table-column",{attrs:{prop:"categoryName",label:"商品分类"}}),a("el-table-column",{attrs:{prop:"name",label:"商品名称"}}),t._v(" > "),t._v(" > "),a("el-table-column",{attrs:{prop:"num",label:"销量(件)"}}),a("el-table-column",{attrs:{prop:"money",label:"销售额(元)"}})],1)],1)])])])},n=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"shuju_title"},[a("div",{staticClass:"shuju_title_text"},[a("span",[t._v("商品概况")])])])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"shuju_title"},[a("div",{staticClass:"shuju_title_text"},[a("span",[t._v("商品概况")])])])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"shuju_title"},[a("div",{staticClass:"shuju_title_text"},[a("span",[t._v("商品排行")])])])}],o=(a("96cf"),a("1da1")),l=a("5530"),s=a("313e"),r=a.n(s),c=a("48fb"),u=a("ed08"),d=a("2f62"),p=a("365c"),f={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 t=this;return{formInline:{type:"1",timeType:"1",time:[new Date,new Date],Mtime:""},lyOptions:[{value:"1",label:"按商品销量排行"},{value:"2",label:"按商品销售额排行"}],selectData:"",pickerOptions:{onPick:function(e){var a=e.maxDate,i=e.minDate;t.selectData=i.getTime(),a&&(t.selectData="")},disabledDate:function(e){if(t.isNull(t.selectData))return!1;var a=new Date(t.selectData);return a.getMonth()>new Date(e).getMonth()||a.getMonth()<new Date(e).getMonth()}},page:{total:0,size:10,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(l["a"])({},Object(d["d"])(["market"])),methods:{init:function(){this.realRecord()},initchart:function(){var t=r.a.init(document.getElementById("zhentiEch"));t.resize()},realRecord:function(){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function e(){var a,i,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a={storeId:t.form.shopValue,type:t.formInline.type,timeType:t.formInline.timeType,startTime:"4"==t.formInline.timeType&&t.formInline.time?Object(u["a"])(t.formInline.time[0]).substr(0,10):"",endTime:"4"==t.formInline.timeType&&t.formInline.time?Object(u["a"])(t.formInline.time[1]).substr(0,10):""},e.next=3,Object(c["v"])(a);case 3:i=e.sent,n=i.data,n&&(t.jeData=n,t.tableData2=n.payTop,t.bus.$emit("loading",!1));case 6:case"end":return e.stop()}}),e)})))()},mainEch32:function(){var t=r.a.init(document.getElementById("mainEch32"));t.setOption(this.echarts32_option,!0)},mainEch33:function(){var t=r.a.init(document.getElementById("mainEch33"));t.setOption(this.echarts33_option,!0)},mainEch34:function(){var t=r.a.init(document.getElementById("mainEch34"));t.setOption(this.echarts34_option,!0)},zhentiEch2:function(){var t=r.a.init(document.getElementById("zhentiEch2"));t.setOption(this.echarts4_option,!0)},changeStore:function(){this.realRecord()},selectType:function(){this.init()},isNull:function(t){return!t},handelExport:function(){var t=this.formInline.time?Object(u["a"])(this.formInline.time[0]).substring(0,10):"",e=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=2&timeType="+this.formInline.timeType+"&storeId="+this.form.shopValue+"&startTime="+t+"&endTime="+e}}},m=f,h=(a("25c1"),a("2877")),b=Object(h["a"])(m,i,n,!1,null,"34fbffc2",null);e["default"]=b.exports},d2bb:function(t,e,a){var i=a("825a"),n=a("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,a={};try{t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,t.call(a,[]),e=a instanceof Array}catch(o){}return function(a,o){return i(a),n(o),e?t.call(a,o):a.__proto__=o,a}}():void 0)},ed08:function(t,e,a){"use strict";a.d(e,"a",(function(){return i})),a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return o}));a("a9e3"),a("ac1f"),a("5319"),a("bf19");function i(t){var e=new Date(t).toJSON(),a=new Date(+new Date(e)+288e5).toISOString().replace(/T/g," ").replace(/\.[\d]{3}Z/,"");return a}function n(t){var e=new Date(t),a=e.getFullYear(),i=e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1,n=e.getDate()<10?"0"+e.getDate():e.getDate(),o=e.getHours()<10?"0"+e.getHours():e.getHours(),l=e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes(),s=e.getSeconds()<10?"0"+e.getSeconds():e.getSeconds();return a+"-"+i+"-"+n+" "+o+":"+l+":"+s}function o(t){var e=new Date(1e3*Number(t)),a=e.getFullYear()+"-",i=(e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1)+"-",n=(e.getDate()<10?"0"+e.getDate():e.getDate())+" ",o=(e.getHours()<10?"0"+e.getHours():e.getHours())+":",l=(e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes())+":",s=e.getSeconds()<10?"0"+e.getSeconds():e.getSeconds(),r=a+i+n+o+l+s;return r}}}]); |