You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
13 KiB
1 lines
13 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2ef84e92"],{"0a8d":function(t,e,n){"use strict";n("74b9")},"2d45":function(t,e,n){"use strict";n("8c8f")},"74b9":function(t,e,n){},8707:function(t,e,n){"use strict";n.r(e);var r=n("0c9f"),a=n("c4c8"),o=n("217c"),i=n("61f7");function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */s=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,n){return t[e]=n}}function h(t,e,n,r){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),c=new F(r||[]);return a(i,"_invoke",{value:M(t,n,c)}),i}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p="suspendedStart",m="suspendedYield",v="executing",g="completed",y={};function w(){}function D(){}function b(){}var x={};f(x,i,(function(){return this}));var _=Object.getPrototypeOf,L=_&&_(_(P([])));L&&L!==n&&r.call(L,i)&&(x=L);var T=b.prototype=w.prototype=Object.create(x);function k(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function n(a,o,i,s){var u=d(t[a],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==c(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,i,s)}),(function(t){n("throw",t,i,s)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return n("throw",t,i,s)}))}s(u.arg)}var o;a(this,"_invoke",{value:function(t,r){function a(){return new e((function(e,a){n(t,r,e,a)}))}return o=o?o.then(a,a):a()}})}function M(e,n,r){var a=p;return function(o,i){if(a===v)throw Error("Generator is already running");if(a===g){if("throw"===o)throw i;return{value:t,done:!0}}for(r.method=o,r.arg=i;;){var c=r.delegate;if(c){var s=j(c,r);if(s){if(s===y)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===p)throw a=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=v;var u=d(e,n,r);if("normal"===u.type){if(a=r.done?g:m,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(a=g,r.method="throw",r.arg=u.arg)}}}function j(e,n){var r=n.method,a=e.iterator[r];if(a===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,j(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=d(a,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function P(e){if(e||""===e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,o=function n(){for(;++a<e.length;)if(r.call(e,a))return n.value=e[a],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return D.prototype=b,a(T,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:D,configurable:!0}),D.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(T),t},e.awrap=function(t){return{__await:t}},k(E.prototype),f(E.prototype,u,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new E(h(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(T),f(T,l,"Generator"),f(T,i,(function(){return this})),f(T,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=P,F.prototype={constructor:F,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function a(r,a){return c.type="throw",c.arg=e,n.next=r,a&&(n.method="next",n.arg=t),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var a=r.arg;O(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function u(t,e,n,r,a,o,i){try{var c=t[o](i),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,a)}var l={name:"productcatecount",components:{goodsDetail:o.a},data:function(){return{validateFun:this.$validateFun,props:{emitPath:!1,multiple:!0,checkStrictly:!0},cateData:[],options:{shortcuts:[{text:"今天",value:function(){var t=new Date,e=new Date;return e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate())),[e,t]}},{text:"昨天",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),[e,t]}},{text:"最近7天",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-6))),[e,t]}},{text:"最近30天",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-29))),[e,t]}},{text:"上月",value:function(){var t=new Date,e=new Date,n=new Date(e.getFullYear(),e.getMonth(),0).getDate();return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth()-1,1))),t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth()-1,n))),[e,t]}},{text:"本月",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),1))),[e,t]}},{text:"本年",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),0,1))),[e,t]}}]},name:"近30天",timeVal:[],dataTime:"",formValidate:{limit:1e6,page:1,sort:"visit",data:"",cate_id:[]},loading:!1,allpay:"0.00",allshiji:"0.00",allsum:"0",allyouhui:"0.00",tabList:[],total:0,columns4:[{title:"商品分类",key:"cate_name"},{title:"销售数量",key:"pay_num"},{title:"销售总额",key:"sum_price"},{title:"成本总额",key:"cost"}],goodsId:"",isProductBox:!1,list:[{val:"visit",name:"浏览量"},{val:"user",name:"访客数"},{val:"cart",name:"加购件数"},{val:"orders",name:"下单件数"},{val:"price",name:"支付金额"},{val:"profit",name:"毛利率"},{val:"collect",name:"收藏数"},{val:"changes",name:"访客-支付转化率"}]}},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(i.a)(e,"yyyy/MM/dd")+"-"+Object(i.a)(t,"yyyy/MM/dd")},mounted:function(){this.getList(),this.goodsCategory()},methods:{goodsCategory:function(){var t=this;Object(a.h)(1).then((function(e){t.cateData=e.data})).catch((function(e){t.$Message.error(e.msg)}))},onchangeTime:function(t){this.timeVal=t,this.formValidate.data=this.timeVal[0]?this.timeVal.join("-"):"",this.name=this.formValidate.data,this.getList()},changeMenu:function(t){this.formValidate.sort=t,this.getList()},getList:function(){var t=this;this.loading=!0,Object(r.o)(this.formValidate).then(function(){var e,n=(e=s().mark((function e(n){var r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.data,t.tabList=r,t.loading=!1;case 3:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(t){u(o,r,a,i,c,"next",t)}function c(t){u(o,r,a,i,c,"throw",t)}i(void 0)}))});return function(t){return n.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},look:function(t){this.goodsId=t.product_id,this.isProductBox=!0}}},f=(n("0a8d"),n("2d45"),n("2877")),h={name:"catecount",components:{productcatecount:Object(f.a)(l,(function(){var t=this,e=t._self._c;return e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[e("div",{staticClass:"acea-row row-between-wrapper mb20"},[e("div",{staticClass:"header-title"},[t._v("商品分类报表")]),e("div",{staticClass:"acea-row"},[e("div",{staticClass:"acea-row row-middle"},[e("span",{staticClass:"font-sm"},[t._v("商品分类:")]),e("el-cascader",{staticClass:"mr20 width20",attrs:{placeholder:"请选择商品分类",size:"mini",options:t.cateData,props:t.props,filterable:"",clearable:""},on:{change:t.getList},model:{value:t.formValidate.cate_id,callback:function(e){t.$set(t.formValidate,"cate_id",e)},expression:"formValidate.cate_id"}})],1),e("div",{staticClass:"acea-row row-middle"},[e("span",{staticClass:"font-sm"},[t._v("时间筛选:")]),e("DatePicker",{staticClass:"mr20 width20",attrs:{editable:!1,value:t.timeVal,format:"yyyy/MM/dd",type:"datetimerange",placement:"bottom-start",placeholder:"自定义时间",options:t.options},on:{"on-change":t.onchangeTime}})],1),e("div",{staticClass:"acea-row row-middle"},[e("Button",{staticClass:"mr20",attrs:{type:"primary"},on:{click:t.getList}},[t._v("查询")])],1)])]),e("Table",{ref:"selection",attrs:{columns:t.columns4,data:t.tabList,loading:t.loading,"no-data-text":"暂无数据","highlight-row":"","no-filtered-data-text":"暂无筛选结果"},scopedSlots:t._u([{key:"image",fn:function(t){var n=t.row;return[e("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:n.image,expression:"row.image"}],staticClass:"img-add"})])]}},{key:"profit",fn:function(n){var r=n.row;return[e("span",{domProps:{textContent:t._s(t.$tools.accMul(r.profit,100).toFixed(2)+"%")}})]}},{key:"repeats",fn:function(n){var r=n.row;return[e("span",{domProps:{textContent:t._s(t.$tools.accMul(r.repeats,100)+"%")}})]}},{key:"changes",fn:function(n){var r=n.row;return[e("span",[t._v(t._s(t.$tools.accMul(r.changes,100)+"%"))])]}}])}),t.isProductBox?e("div",[e("div",{staticClass:"bg",on:{click:function(e){t.isProductBox=!1}}}),e("goodsDetail",{attrs:{goodsId:t.goodsId}})],1):t._e()],1)}),[],!1,null,"b4424348",null).exports}},d=Object(f.a)(h,(function(){var t=this._self._c;return t("div",[t("productcatecount")],1)}),[],!1,null,"d5cd3c94",null);e.default=d.exports},"8c8f":function(t,e,n){}}]); |