2021-02-07 21:21:12 +08:00

1 line
10 KiB
JavaScript

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/everdayRenven/index"],{"1f8c":function(t,e,i){"use strict";i.r(e);var n=i("bab0"),o=i("c305");for(var r in o)"default"!==r&&function(t){i.d(e,t,(function(){return o[t]}))}(r);i("9f1d");var a,s=i("f0c5"),u=Object(s["a"])(o["default"],n["b"],n["c"],!1,null,"7b0d8e38",null,!1,n["a"],a);e["default"]=u.exports},"9f1d":function(t,e,i){"use strict";var n=i("d64b"),o=i.n(n);o.a},bab0:function(t,e,i){"use strict";var n;i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){return n}));var o=function(){var t=this,e=t.$createElement,i=(t._self._c,t.showPage&&1020==t.theRequest.GroupType?t.__map(t.regionList,(function(e,i){var n=t.__get_orig(e),o=t.$util.fmoney(e.CASHPAY,2),r=e.TOTAL_COUNT>0?t.$util.fmoney(e.UPLOAD_COUNT/e.TOTAL_COUNT*100,2):null;return{$orig:n,g0:o,g1:r}})):null),n=t.showPage&&1020!=t.theRequest.GroupType&&1e3==t.theRequest.GroupType?t.__map(t.regionList[0],(function(e,i){var n=t.__get_orig(e),o=t.$util.fmoney(e.CASHPAY,2),r=e.TOTAL_COUNT>0?t.$util.fmoney(e.UPLOAD_COUNT/e.TOTAL_COUNT*100,2):null,a=t.__map(e.ServerpartList,(function(e,i){var n=t.__get_orig(e),o=t.$util.fmoney(e.CASHPAY,2);return{$orig:n,g4:o}}));return{$orig:n,g2:o,g3:r,l1:a}})):null,o=t.showPage&&1020!=t.theRequest.GroupType&&1e3==t.theRequest.GroupType?t.__map(t.regionList[1],(function(e,i){var n=t.__get_orig(e),o=t.$util.fmoney(e.CASHPAY,2),r=t.$util.fmoney(e.UPLOAD_COUNT/e.TOTAL_COUNT*100,2);return{$orig:n,g5:o,g6:r}})):null,r=t.showPage?t.__map(t.wechatPushSalesList[t.nowRank],(function(e,i){var n=t.__get_orig(e),o=t.$util.fmoney(e.TOTALPRICE);return{$orig:n,g7:o}})):null;t._isMounted||(t.e0=function(e){t.regionShow1=!t.regionShow1},t.e1=function(e){t.regionShow2=!t.regionShow2}),t.$mp.data=Object.assign({},{$root:{l0:i,l2:n,l3:o,l4:r}})},r=[]},c07d:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i("2f62"),o=r(i("0098"));function r(t){return t&&t.__esModule?t:{default:t}}function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function s(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?a(Object(i),!0).forEach((function(e){u(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function u(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var c,h=function(){i.e("pages/everdayRenven/components/listUnit").then(function(){return resolve(i("edea"))}.bind(null,i)).catch(i.oe)},d={},f={data:function(){var e=this.$util.cutDate(new Date,"YYYY/MM/DD",-1),i=this.$util.cutDate(new Date,"MM月DD日");return{customBarH:this.CustomBar,statusBarH:this.StatusBar,fixedY:-t.upx2px(232),opacity:1,isLoading:!0,timeMoney:"",noDataText:"您暂无"+e+"营收数据",theRequest:{},lastDay:e,nowDay:i,showPage:!1,pageMsg:{},headMsg:{},today:{},regionList:[],nowTab:1,nowRank:1e3,regionShow1:!0,regionShow2:!1,wechatPushSalesList:{},regionProgress:[],tradeType:[],areaProgress:[]}},computed:s({},(0,n.mapGetters)({user:"getUser"})),components:{shopCell:h},methods:{showFixed:function(e){var i=e.detail,n=t.upx2px(232),o=0,r=t.upx2px(232);i.scrollTop>o&&i.scrollTop<n?(this.fixedY=-r+(i.scrollTop-o),this.opacity=(i.scrollTop-o)/r):i.scrollTop>n?(this.fixedY=0,this.opacity=1):(this.fixedY=0-r,this.opacity=0)},toDetail:function(t,e){var i=this.theRequest.time||this.lastDay,n=this.user.PushAuthority.find((function(t){return t.ProvinceCode==e}));n&&1==n.ShopAnalysisType?this.$util.toNextRoute("navigateTo","/pages/everdayRenven/serviceIndex?ServerpartIds="+t.SERVERPART_ID+"&time="+i+"&ProvinceCode="+e):this.$util.toNextRoute("navigateTo","/pages/everdayRenven/detail?id="+t.SERVERPART_ID+"&time="+i+"&provinceId="+e),t.visited=!0,this.$forceUpdate()},selectTab:function(t,e){this[t]=e},toggleRegion:function(t){t.show=!t.show,this.$forceUpdate()},touchPie:function(t,e){d[e].showToolTip(t,{format:function(t){return t.name+":"+t.data}})},todayAmount:function(){var t=this,e=this;this.$request.$get("getCurRevenue",{pushProvinceCode:this.theRequest.ProvinceCode,serverPartId:this.theRequest.ServerpartIds}).then((function(i){if(100==i.ResultCode){var n=i.Data.TOTALTICKET&&i.Data.TOTALPRICE?i.Data.TOTALPRICE/i.Data.TOTALTICKET:0;e.today={timeMoney:t.$util.fmoney(i.Data.TOTALPRICE,2),totalTicketCount:i.Data.TOTALTICKET,avrticketCount:t.$util.fmoney(n,2)},e.$forceUpdate()}}))},getRankmMap:function(t){var e=this,i={};return t.map((function(t,n){0==n&&(e.nowRank=t.DATA_TYPE),i[t.DATA_TYPE]=t.GoodsList})),i},getData:function(){var e=this,i=this,n=i.theRequest,o=i.theRequest.ProvinceCode,r=i.theRequest.GroupType,a={groupType:n.GroupType,Direction_IDS:n.ServerpartIds,pushProvinceCode:n.ProvinceCode,Statistics_Date:i.theRequest.time||this.lastDay};this.$request.$get("getRevenuePush",a).then((function(n){if(i.isLoading=!1,100==n.ResultCode){var a=n.Data;i.pageMsg=a,"330000"==o&&"1000"==r?(e.getheadMsg(a[o],a["451200"]),i.regionList=[a[o].RegionList,a["451200"].RegionList],i.wechatPushSalesList=e.getRankmMap(a[o].WechatPushSalesList),i.operationFn(a[o])):(e.getheadMsg(a),1010!=r&&(i.regionList=1e3!=r?a.RegionList[0].ServerpartList:[a.RegionList],i.operationFn(a)),i.wechatPushSalesList=e.getRankmMap(a.WechatPushSalesList)),t.hideLoading(),i.showPage=!0}else t.hideLoading()}))},getheadMsg:function(t,e){var i=this,n={};n.totalMoney=this.$util.fmoney(t.CASHPAY+(e?e.CASHPAY:0),2),n.name=t.USER_NAME,n.dayOfShow=this.$util.cutDate(t.STATISTICS_DATE,"MM月DD日");var o=["CASHPAY","DIFFERENT_PRICE_MORE","DIFFERENT_PRICE_LESS","TICKETCOUNT","MOBILEPAYMENT","COMMODITY_COUNT","TOTALOFFAMOUNT"];if(o.forEach((function(o){n[o]=t[o]+(e?e[o]:0),"TICKETCOUNT"!==o&&"COMMODITY_COUNT"!==o&&"CASHPAY"!==o&&(n[o]=i.$util.fmoney(n[o]))})),n.TICKETAVE=n.TICKETCOUNT>0?this.$util.fmoney(n.CASHPAY/n.TICKETCOUNT,2):0,n.COMMODITYAVE=n.COMMODITY_COUNT>0?this.$util.fmoney(n.CASHPAY/n.COMMODITY_COUNT,2):0,e)var r=t.UPLOADSTATE.split("/"),a=e.UPLOADSTATE.split("/"),s=Number(r[0])+Number(a[0]),u=Number(r[1])+Number(a[1]);n.uploadState=e?s+"/"+u:t.UPLOADSTATE,this.headMsg=n},operationFn:function(t,e){var i=this;if(1==t.SHOWBUSINESSTRADE){var n=["#5E67B4","#4E5699","#75B7AD","#AFB7E6"],o=[["MARKET_REVENUE","商超营收"],["RESTAURANT_REVENUE","餐饮营收"],["SNACK_REVENUE","小吃营收"],["OTHER_REVENUE","其他营收"]],r=i.operationBusniess(o,t);this.regionProgress=r[1],i.showPie({id:"businessCont",data:r[0],colors:n})}if(1==t.SHOWTRADETYPE){var a=["#7886E3","#70D598","#9BC8FB","#ADE5EE","#6B75B8","#6FEBC3"],s=[["COMPREHENSIVE_REVENUE","综合服务区"],["THEME_REVENUE","主题服务区"],["STANDARD_REVENUE","标配服务区"],["PAKINGZONE_REVENUE","其他停车区"]],u=i.operationBusniess(s,t);this.tradeType=u[1],i.showPie({id:"typeCont",data:u[0],colors:a})}if(1==t.SHOWREGIONREVENUE){var c=["#f7f5f6","#FFAC37","#d8ece9","#e0e3f7","#F4B27A","#F3B1C9","#b2b7e3"],h=i.operationArea(t.RegionList,t.CASHPAY);this.areaProgress=h[1],i.showPie({id:"areaCont",data:h[0],colors:c})}},operationArea:function(t,e){var i=[],n=[],o=this;return t.forEach((function(t,r){i.push({name:t.TYPE_NAME,data:t.CASHPAY,textColor:"#999",format:function(e){return[t.TYPE_NAME,(100*e).toFixed(2)+"%"]}}),n.push({name:t.TYPE_NAME,num:t.CASHPAY,data:o.$util.fmoney(t.CASHPAY),bili:o.$util.fmoney(t.CASHPAY/e*100,2)})})),i.sort((function(t,e){return e.data-t.data})),n.sort((function(t,e){return e.num-t.num})),[i,n]},operationBusniess:function(t,e){var i=[],n=[],o=this;return t.forEach((function(t,r){if(e[t[0]]>0){var a=Number(e[t[0]]);i.push({name:t[1],textColor:"#999",data:e[t[0]],format:function(e){return[t[1],(100*e).toFixed(2)+"%"]}}),n.push({name:t[1],num:a,data:o.$util.fmoney(e[t[0]]),bili:o.$util.fmoney(a/e.CASHPAY*100,2)})}})),i.sort((function(t,e){return e.data-t.data})),n.sort((function(t,e){return e.num-t.num})),[i,n]},showPie:function(e){var i={series:[]};i.series=i.series.concat(e.data),d[e.id]=new o.default({$this:c,canvasId:e.id,colors:e.colors,type:"ring",fontSize:12,padding:[15,15,25,15],legend:{show:!1,padding:5,lineHeight:11,margin:0},background:"#FFFFFF",pixelRatio:1,series:i.series,animation:!1,width:t.upx2px(686),height:t.upx2px(510),dataLabel:!0,extra:{pie:{ringWidth:40,labelWidth:30,border:!0,borderWidth:1,borderColor:"#fff"}}})},getDetail:function(t){var e=this,i=this;this.$request.$get("getShopRevenueList",{serverpartID:t.ServerpartIds,pushProvinceCode:t.ProvinceCode,StartDate:t.time||this.lastDay,EndDate:t.time||this.lastDay}).then((function(t){100==t.ResultCode&&(t.Data.List.map((function(t){t.show=!1,t.detail=e.getListDetail(t)})),i.regionList=t.Data.List)}))},getListDetail:function(t){var e=[],i={SHOWMORE_SIGN:{1:"【长款】",2:"【异常长款】"},SHOWLESS_SIGN:{1:"【短款】",2:"【异常短款】"},SHOWABNORMAL_SIGN:{1:"【异常校验】"},SHOWSCAN_SIGN:{1:"【扫】"},SHOWSSUPPLY_SIGN:{1:"【补】"},SHOWCHECK_SIGN:{1:"【稽核检查】"},INTERFACE_SIGN:{1:"【接口传输】"}},n=["SHOWABNORMAL_SIGN","SHOWCHECK_SIGN","SHOWMORE_SIGN","SHOWLESS_SIGN","SHOWSCAN_SIGN","SHOWSSUPPLY_SIGN","INTERFACE_SIGN"];return n.map((function(n){i[n][t[n]]&&e.push(i[n][t[n]])})),e},toggleShow:function(t){var e=this.regionList[t];e.show=!e.show,this.$forceUpdate()},backPage:function(){this.$util.toNextRoute("switchTab","/pages/index/index")}},onUnload:function(){this.$util.addUserBehavior()},onLoad:function(e){c=this,t.showLoading({title:"正在加载..."}),e.ProvinceCode?(this.theRequest=e,this.getData()):this.user.PushAuthority.length>0?(this.theRequest=this.user.PushAuthority[0]||{},this.getData()):(t.hideLoading(),this.theRequest={},this.isLoading=!1,this.showPage=!1,this.noDataText="您暂无营收数据"),this.todayAmount(),1010==this.theRequest.GroupType&&this.getDetail(this.theRequest)}};e.default=f}).call(this,i("543d")["default"])},c305:function(t,e,i){"use strict";i.r(e);var n=i("c07d"),o=i.n(n);for(var r in n)"default"!==r&&function(t){i.d(e,t,(function(){return n[t]}))}(r);e["default"]=o.a},d49e:function(t,e,i){"use strict";(function(t){i("40da");n(i("66fd"));var e=n(i("1f8c"));function n(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,i("543d")["createPage"])},d64b:function(t,e,i){}},[["d49e","common/runtime","common/vendor"]]]);