chunk-9aa550ee.6dfe4f1a.js 16 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9aa550ee","chunk-2d229b68"],{1491:function(t,e,r){"use strict";r.d(e,"B",(function(){return a})),r.d(e,"z",(function(){return i})),r.d(e,"g",(function(){return s})),r.d(e,"C",(function(){return o})),r.d(e,"y",(function(){return c})),r.d(e,"l",(function(){return u})),r.d(e,"r",(function(){return l})),r.d(e,"c",(function(){return d})),r.d(e,"D",(function(){return f})),r.d(e,"a",(function(){return m})),r.d(e,"b",(function(){return p})),r.d(e,"o",(function(){return h})),r.d(e,"p",(function(){return g})),r.d(e,"t",(function(){return y})),r.d(e,"x",(function(){return b})),r.d(e,"w",(function(){return v})),r.d(e,"d",(function(){return C})),r.d(e,"e",(function(){return _})),r.d(e,"n",(function(){return F})),r.d(e,"v",(function(){return x})),r.d(e,"j",(function(){return O})),r.d(e,"s",(function(){return w})),r.d(e,"k",(function(){return j})),r.d(e,"i",(function(){return I})),r.d(e,"h",(function(){return L})),r.d(e,"m",(function(){return k})),r.d(e,"q",(function(){return A})),r.d(e,"A",(function(){return U})),r.d(e,"f",(function(){return S})),r.d(e,"u",(function(){return Q}));var n=r("b775");function a(t){return Object(n["a"])({url:"/orders/get_agent_gift_bag",method:"get",params:t})}function i(t){return Object(n["a"])({url:"/orders/add_list_tag",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/orders/BatchAddTag",method:"post",data:t})}function o(t){return Object(n["a"])({url:"/orders/export_list",method:"get",params:t})}function c(){return Object(n["a"])({url:"/activity/getactivityinfo",method:"get"})}function u(t){return Object(n["a"])({url:"/orders/GetActivityLimit",method:"get",params:t})}function l(t){return Object(n["a"])({url:"/UserImg/GetUserInfo",method:"get",params:t})}function d(t){return Object(n["a"])({url:"/UserImg/AddUserImgInfo",method:"post",data:t})}function f(t){return Object(n["a"])({url:"/UserImg/uploadImage",method:"post",data:t})}function m(t){return Object(n["a"])({url:"/UserImg/AddUpdateImg",method:"get",params:t})}function p(t){return Object(n["a"])({url:"/UserImg/AddUpdateImgB",method:"get",params:t})}function h(t){return Object(n["a"])({url:"/UserImg/GetImgStatus",method:"get",params:t})}function g(t){return Object(n["a"])({url:"/UserImg/GetImgStatusB",method:"get",params:t})}function y(t){return Object(n["a"])({url:"/UserImg/GetUserList",method:"get",params:t})}function b(t){return Object(n["a"])({url:"/UserImg/UpdateUserImgInfoB ",method:"post",data:t})}function v(t){return Object(n["a"])({url:"/UserImg/UpdateUserImgInfo",method:"post",data:t})}function C(t){return Object(n["a"])({url:"/UserImg/AgainCreateImg",method:"get",params:t})}function _(t){return Object(n["a"])({url:"/UserImg/AgainCreateImgB",method:"get",params:t})}function F(t){return Object(n["a"])({url:"/UserImg/GetCrownInfo",method:"get",params:t})}function x(t){return Object(n["a"])({url:"/UserImg/UpdateCrownImgInfo",method:"post",data:t})}function O(t){return Object(n["a"])({url:"/UserImg/DeleteUserImg",method:"get",params:t})}function w(t){return Object(n["a"])({url:"/UserImg/GetUserInfos",method:"get",params:t})}function j(t){return Object(n["a"])({url:"/UserImg/ExportAddress",method:"get",params:t})}function I(t){return Object(n["a"])({url:"/CrownBigGiftInfo",method:"get",params:t})}function L(t){return Object(n["a"])({url:"/BigGiftInfo",method:"get",params:t})}function k(t){return Object(n["a"])({url:"/BigGift/GetApplyList",method:"get",params:t})}function A(t){return Object(n["a"])({url:"/BigGift/GetUserInfo",method:"get",params:t})}function U(t){return Object(n["a"])({url:"/BigGift/editBelongToUser",method:"post",data:t})}function S(t){return Object(n["a"])({url:"/BigGift/ApplySuccess",method:"post",data:t})}function Q(t){return Object(n["a"])({url:"/BigGift/UpdateApply",method:"post",data:t})}},"2f21":function(t,e,r){"use strict";var n=r("79e5");t.exports=function(t,e){return!!t&&n((function(){e?t.call(null,(function(){}),1):t.call(null)}))}},"55dd":function(t,e,r){"use strict";var n=r("5ca1"),a=r("d8e8"),i=r("4bf8"),s=r("79e5"),o=[].sort,c=[1,2,3];n(n.P+n.F*(s((function(){c.sort(void 0)}))||!s((function(){c.sort(null)}))||!r("2f21")(o)),"Array",{sort:function(t){return void 0===t?o.call(i(this)):o.call(i(this),a(t))}})},8329:function(t,e,r){},"891b":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"app-container"},[r("div",{directives:[{name:"loading",rawName:"v-loading.fullscreen.lock",value:t.loadingFull,expression:"loadingFull",modifiers:{fullscreen:!0,lock:!0}}]}),t._v(" "),r("div",{staticClass:"search-container"},[r("el-select",{staticClass:"mr15",staticStyle:{width:"400px"},attrs:{filterable:"",placeholder:"请输入客户姓名",size:"big"},model:{value:t.listQuery.search_name,callback:function(e){t.$set(t.listQuery,"search_name",e)},expression:"listQuery.search_name"}},t._l(t.crownList,(function(t){return r("el-option",{key:t.id,attrs:{label:t.name,value:t.name.match(/\d{11}/)[0]}})})),1),t._v(" "),r("el-input",{staticClass:"mr15",staticStyle:{width:"250px"},attrs:{type:"text",size:"big",placeholder:"收货人姓名/手机号"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList(e)}},model:{value:t.listQuery.name,callback:function(e){t.$set(t.listQuery,"name",e)},expression:"listQuery.name"}}),t._v(" "),r("el-cascader",{staticClass:"mr15",staticStyle:{width:"300px"},attrs:{options:t.provinces,props:{checkStrictly:!0},placeholder:"请选择地区查询",size:"big",clearable:""},on:{change:t.changeCity},model:{value:t.areaAll,callback:function(e){t.areaAll=e},expression:"areaAll"}}),t._v(" "),r("el-date-picker",{staticClass:"mr15",attrs:{type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"yyyy-MM-dd HH:mm",format:"yyyy-MM-dd HH:mm",size:"big"},model:{value:t.listQuery.time,callback:function(e){t.$set(t.listQuery,"time",e)},expression:"listQuery.time"}}),t._v(" "),r("el-select",{staticClass:"mr15",staticStyle:{width:"230px"},attrs:{size:"big"},model:{value:t.listQuery.activity_id,callback:function(e){t.$set(t.listQuery,"activity_id",e)},expression:"listQuery.activity_id"}},[r("el-option",{attrs:{label:"全部",value:""}}),t._v(" "),t._l(t.statusList,(function(t){return r("el-option",{key:t.id,attrs:{label:t.title,value:t.id}})}))],2),t._v(" "),r("el-select",{staticClass:"mr15",attrs:{size:"big"},model:{value:t.listQuery.type,callback:function(e){t.$set(t.listQuery,"type",e)},expression:"listQuery.type"}},[r("el-option",{attrs:{label:"种类",value:"3"}}),t._v(" "),r("el-option",{attrs:{label:"款式",value:"2"}}),t._v(" "),r("el-option",{attrs:{label:"尺码",value:"1"}})],1),t._v(" "),r("el-button",{staticClass:"mr15",attrs:{type:"primary",size:"big"},on:{click:t.getList}},[t._v("搜索")]),t._v(" "),r("el-button",{staticClass:"mr15",attrs:{type:"primary",size:"big"},on:{click:t.toExport}},[t._v("导出")])],1),t._v(" "),r("div",{staticClass:"echart-container"},[r("report-chart",{attrs:{id:"report-chart",seriesdata:t.pieList}}),t._v(" "),r("div",{staticClass:"report-list"},t._l(t.seriesdata,(function(e,n){return r("div",{key:n,staticClass:"echart_list"},[r("span",{staticClass:"color",style:"background-color:"+t.colorList[n%t.colorList.length]}),t._v(" "),r("span",{staticClass:"title"},[t._v(t._s(e.name))]),t._v(" "),r("span",{staticClass:"num"},[t._v("销量: "+t._s(e.value))]),t._v(" "),r("span",{staticClass:"price"},[t._v("销售金额: "+t._s(t._f("parseMoney")(e.price)))])])})),0)],1),t._v(" "),r("el-table",{attrs:{data:t.limitTable,"header-cell-style":{background:"#f8fbfc"},border:"",stripe:""}},[r("el-table-column",{attrs:{prop:"name",label:"商品名"}}),t._v(" "),r("el-table-column",{attrs:{prop:"value",label:"销量"}}),t._v(" "),r("el-table-column",{attrs:{prop:"price",label:"销售金额"},scopedSlots:t._u([{key:"header",fn:function(e){var r=e.column;return[t._v("\n "+t._s(r.label)+"("+t._s(t._f("parseMoney")(t.limitTable.reduce((function(t,e){return t+Number(e.price)}),0)))+"元)\n ")]}},{key:"default",fn:function(e){var r=e.row;return[t._v("\n "+t._s(t._f("parseMoney")(r.price))+"\n ")]}}])})],1)],1)},a=[],i=(r("456d"),r("7514"),r("55dd"),r("7f7f"),r("ac6a"),r("20d6"),r("c7eb")),s=(r("96cf"),r("1da1")),o=(r("c5f6"),r("b775"));function c(t){return Object(o["a"])({url:"/data/rank_type2",method:"get",params:t})}function u(t){return Object(o["a"])({url:"/statistical/GetCrownMoney",method:"get",params:t})}var l=r("df2b"),d=r("ed08"),f=r("1491"),m=r("313e"),p=r("02c6"),h=r("2e8e"),g={components:{ReportChart:l["default"]},filters:{parseMoney:d["g"]},data:function(){return{areaAll:[],loadingFull:!1,provinces:p["a"],search_name:"",crownMoneyList:[],listQuery:{time:[],order_status:"",page_index:1,page_size:10,search_name:"",name:"",provice:"",city:"",area:"",type:"3",activity_id:""},arrTitle:["暂无活动"],arrMoney:[0],statusList:[],dataList:{},seriesdata:[],colorList:["#f7797d","#99CC99","#99CCFF","#66CC00","#FF99CC","#66CCFF","#CCCCFF","#FF9966","#FF6666","#CC99CC","#FF9999","#FFCCCC","#66CC66","#66CCCC","#FFCCCC","#FF7373","#33CCCC","#FFB273","#FF9640","#39E639","#717DD7","#35D4A4","#FF9000","#408DD2","#679FD2"],crownList:[],pieList:[]}},computed:{limitTable:function(){var t=this.listQuery,e=t.page_index,r=t.page_size;return this.seriesdata.slice((Number(e)-1)*Number(r),(Number(e)-1)*Number(r)+r)}},watch:{dataList:function(t,e){this.seriesdata=this.changeEchartData()},seriesdata:{handler:function(t,e){this.pieList=t.filter((function(t){return t.value}))},deep:!0}},created:function(){var t=Object(s["a"])(Object(i["a"])().mark((function t(){var e=this;return Object(i["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:this.activityList((function(){e.getList()}));case 1:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),mounted:function(){this.provinces=Object(h["b"])(p["a"])},methods:{changeCity:function(){var t=this.areaAll.length;this.listQuery.provice=t>0?this.areaAll[0]:"",this.listQuery.city=t>1?this.areaAll[1]:"",this.listQuery.area=t>2?this.areaAll[2]:""},getName:function(){var t=this,e=this.crownList.findIndex((function(e){return e.mobile===t.search_name})),r=this.crownList[e].id;this.GetCrownMoneyList(r)},GetCrownMoneyList:function(t){var e=this;u({id:t}).then((function(t){if(e.loadingFull=!1,200===t.code){var r=t.data,n=[],a=[];r.forEach((function(t){n.push(t.title),a.push(t.money)})),e.arrTitle=n,e.arrMoney=a,e.drawLine()}})).catch((function(t){e.loadingFull=!1}))},drawLine:function(){this.charts=m["init"](document.getElementById("main")),this.charts.setOption({tooltip:{trigger:"axis",title:"批发商活动订货金额",formatter:function(t){for(var e=t[0].name,r=0,n=t.length;r<n;r++)e+="<br/>"+t[r].marker+t[r].seriesName+" : "+Object(d["g"])(t[r].value)+"元";return e}},toolbox:{feature:{dataView:{show:!0,readOnly:!1},magicType:{show:!0,type:["line","bar"]},restore:{show:!0},saveAsImage:{show:!0}}},xAxis:{type:"category",show:!0,axisLabel:{interval:0,formatter:function(t){var e="",r=12,n=t.length,a=Math.ceil(n/r);if(a>1){for(var i=0;i<a;i++){var s="",o=i*r,c=o+r;s=t.substring(o,c)+"\n",e+=s}return e}return t}},boundaryGap:!1,data:this.arrTitle,axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null}},yAxis:{name:"订货金额(元)",type:"value",nameTextStyle:{fontSize:16,color:"#505050",fontWeight:600},splitLine:{color:"#f30"},axisLabel:{formatter:"¥{value}",textStyle:{fontSize:16,color:"#505050",fontWeight:500}},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{width:2,color:"#AAAAAD"}}},series:[{name:"订货金额",type:"line",smooth:!0,symbolSize:10,itemStyle:{normal:{color:"#5875D0",label:{show:!0,position:"top",formatter:function(t){return Object(d["g"])(t.data)},textStyle:{color:"#3550A6",fontSize:16}},lineStyle:{width:3,color:"#5875D0"}}},data:this.arrMoney}]})},activityList:function(){var t=Object(s["a"])(Object(i["a"])().mark((function t(e){var r=this;return Object(i["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.loadingFull=!0,t.next=3,Object(f["y"])().then((function(t){r.loadingFull=!1,200===t.code&&(r.statusList=t.data,t.data.map((function(t){1===t.is_ing&&(r.listQuery.activity_id=t.id)}))),e&&e()})).catch((function(t){r.loadingFull=!1,e&&e()}));case 3:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),getList:function(){var t=Object(s["a"])(Object(i["a"])().mark((function t(){var e,r,n,a,s,o,u,l,d,f=this;return Object(i["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.loadingFull=!0,e=this.listQuery,r=e.time,n=e.search_name,a=e.name,s=e.provice,o=e.city,u=e.area,l=e.type,d=e.activity_id,t.next=4,c({start_time:r&&r.length>0?r[0]:"",end_time:r&&r.length>0?r[1]:"",order_status:"",search_name:n,name:a,provice:s,city:o,area:u,activity_id:d,type:l}).then((function(t){f.loadingFull=!1,200===t.code?(t.data.sort(f.sortBy("total")),f.dataList=t.data):f.$message.error(t.message)})).catch((function(t){f.loadingFull=!1}));case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),sortBy:function(t){return function(e,r){return r[t]-e[t]}},changeEchartData:function(){var t=[];return this.dataList.map((function(e){var r={name:"".concat(e.main_attr).concat(e.sec_attr?"("+e.sec_attr+")":"").concat(e.size?"("+e.size+")":""),value:e.total?e.total:0,price:e.account};t.push(r)})),t},changePagination:function(t){var e=t.page,r=t.limit;this.listQuery.page_size=r,this.listQuery.page_index=e},toExport:function(){var t=this;console.log(this.statusList),0===this.dataList.length&&this.$message.error("没有可导出数据");var e=this.listQuery,n=e.time,a=e.search_name,i=e.name,s=e.provice,o=e.city,c=e.area,u=e.type,l=e.activity_id,d=this.dataList.map((function(e){return{"下单人信息":a,"收件人信息":i,"地址":"".concat(s).concat(o).concat(c),"开始时间":"".concat(n[0]||""),"结束时间":"".concat(n[1]||""),"分类":"".concat(3===+u?"种类":2===+u?"款式":"尺码"),"活动名称":""===l?"":t.statusList.find((function(t){return t.id===l})).title,"商品名":"".concat(e.main_attr).concat(e.sec_attr?"("+e.sec_attr+")":"").concat(e.size?"("+e.size+")":"")||0,"销量":e.total||0,"销售金额":e.account||0}}));Promise.all([r.e("chunk-5bdd67a2"),r.e("chunk-2c21b5a5")]).then(r.bind(null,"4bf8d")).then((function(t){t.export_json_to_excel({header:Object.keys(d[0]),data:d.map((function(t){return Object.keys(d[0]).map((function(e){return t[e]}))})),filename:"".concat((new Date).toLocaleDateString(),"活动数据"),bookType:"xlsx"})}))}}},y=g,b=(r("f929"),r("2877")),v=Object(b["a"])(y,n,a,!1,null,"392f701c",null);e["default"]=v.exports},df2b:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{class:t.className,style:{height:t.height,width:t.width},attrs:{id:t.id}})},a=[],i=(r("7f7f"),r("313e")),s={props:{className:{type:String,default:"chart"},id:{type:String,default:"chart"},width:{type:String,default:"600px"},height:{type:String,default:"350px"},seriesdata:{type:Array,default:function(){return[]}}},data:function(){return{chart:null,colorList:["#f7797d","#99CC99","#99CCFF","#66CC00","#FF99CC","#66CCFF","#CCCCFF","#FF9966","#FF6666","#CC99CC","#FF9999","#FFCCCC","#66CC66","#66CCCC","#FFCCCC","#FF7373","#33CCCC","#FFB273","#FF9640","#39E639","#717DD7","#35D4A4","#FF9000","#408DD2","#679FD2"]}},watch:{seriesdata:{handler:function(t,e){this.initChart()},deep:!0}},mounted:function(){this.initChart()},beforeDestroy:function(){this.chart&&(this.chart.dispose(),this.chart=null)},methods:{initChart:function(){var t=this;this.$nextTick((function(){t.chart=i["init"](document.getElementById(t.id)),t.chart.clear(),t.chart.setOption({color:t.colorList,tooltip:{trigger:"item",formatter:function(t){return t.data.name+"<br />数量: "+t.data.value+"<br />金额: "+t.data.price}},series:[{name:"订单种类",type:"pie",radius:"80%",center:["50%","50%"],data:t.seriesdata.map((function(e,r){return e.label={color:t.colorList[r]},e})),itemStyle:{color:function(e){var r=e.dataIndex;return t.colorList[r]},normal:{label:{textStyle:{fontSize:16}}}}}]})}))}}},o=s,c=r("2877"),u=Object(c["a"])(o,n,a,!1,null,null,null);e["default"]=u.exports},f929:function(t,e,r){"use strict";r("8329")}}]);