From ce06ca62a0dd65d4a8fb57126948449c804ad77e Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 19 五月 2026 19:40:08 +0800
Subject: [PATCH] 提交
---
small-program/unpackage/dist/dev/mp-weixin/shop/pages/revenue-analysis/revenue-analysis.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/small-program/unpackage/dist/dev/mp-weixin/shop/pages/revenue-analysis/revenue-analysis.js b/small-program/unpackage/dist/dev/mp-weixin/shop/pages/revenue-analysis/revenue-analysis.js
index b33b14e..d97507e 100644
--- a/small-program/unpackage/dist/dev/mp-weixin/shop/pages/revenue-analysis/revenue-analysis.js
+++ b/small-program/unpackage/dist/dev/mp-weixin/shop/pages/revenue-analysis/revenue-analysis.js
@@ -1,2 +1,2 @@
-require('../../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["shop/pages/revenue-analysis/revenue-analysis"],{1107:function(e,n,t){"use strict";t.r(n);var r=t(1108),u=t.n(r);for(var a in r)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return r[e]}))}(a);n["default"]=u.a},1108:function(e,n,t){},546:function(e,n,t){"use strict";(function(e,n){var r=t(4);t(30);r(t(25));var u=r(t(547));e.__webpack_require_UNI_MP_PLUGIN__=t,n(u.default)}).call(this,t(1)["default"],t(2)["createPage"])},547:function(e,n,t){"use strict";t.r(n);var r=t(548),u=t(550);for(var a in u)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return u[e]}))}(a);t(1107);var c,i=t(41),o=Object(i["default"])(u["default"],r["render"],r["staticRenderFns"],!1,null,"43e4bd39",null,!1,r["components"],c);o.options.__file="shop/pages/revenue-analysis/revenue-analysis.vue",n["default"]=o.exports},548:function(e,n,t){"use strict";t.r(n);var r=t(549);t.d(n,"render",(function(){return r["render"]})),t.d(n,"staticRenderFns",(function(){return r["staticRenderFns"]})),t.d(n,"recyclableRender",(function(){return r["recyclableRender"]})),t.d(n,"components",(function(){return r["components"]}))},549:function(e,n,t){"use strict";var r;t.r(n),t.d(n,"render",(function(){return u})),t.d(n,"staticRenderFns",(function(){return c})),t.d(n,"recyclableRender",(function(){return a})),t.d(n,"components",(function(){return r}));var u=function(){var e=this,n=e.$createElement;e._self._c;e._isMounted||(e.e0=function(n,t){var r=arguments[arguments.length-1].currentTarget.dataset,u=r.eventParams||r["event-params"];t=u.item;e.currentRange=t.value})},a=!1,c=[];u._withStripped=!0},550:function(e,n,t){"use strict";t.r(n);var r=t(551),u=t.n(r);for(var a in r)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return r[e]}))}(a);n["default"]=u.a},551:function(e,n,t){"use strict";var r=t(4);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var u=r(t(552)),a={data:function(){return{chart:null}},methods:{renderChart:function(e){var n=this;e&&this.$nextTick((function(){var t=document.getElementById("luggage-distribution-chart");t&&(n.chart||(n.chart=u.default.init(t)),n.chart.setOption(JSON.parse(e),!0))}))}}};n.default=a}},[[546,"common/runtime","common/vendor","shop/common/vendor"]]]);
+require('../../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["shop/pages/revenue-analysis/revenue-analysis"],{546:function(t,e,n){"use strict";(function(t,e){var a=n(4);n(30);a(n(25));var i=a(n(547));t.__webpack_require_UNI_MP_PLUGIN__=n,e(i.default)}).call(this,n(1)["default"],n(2)["createPage"])},547:function(t,e,n){"use strict";n.r(e);var a=n(548),i=n(550);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);n(552);var o,s=n(41),c=Object(s["default"])(i["default"],a["render"],a["staticRenderFns"],!1,null,"43e4bd39",null,!1,a["components"],o);c.options.__file="shop/pages/revenue-analysis/revenue-analysis.vue",e["default"]=c.exports},548:function(t,e,n){"use strict";n.r(e);var a=n(549);n.d(e,"render",(function(){return a["render"]})),n.d(e,"staticRenderFns",(function(){return a["staticRenderFns"]})),n.d(e,"recyclableRender",(function(){return a["recyclableRender"]})),n.d(e,"components",(function(){return a["components"]}))},549:function(t,e,n){"use strict";var a;n.r(e),n.d(e,"render",(function(){return i})),n.d(e,"staticRenderFns",(function(){return o})),n.d(e,"recyclableRender",(function(){return r})),n.d(e,"components",(function(){return a}));try{a={uDatetimePicker:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-datetime-picker/u-datetime-picker")]).then(n.bind(null,578))},qiunDataCharts:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts")]).then(n.bind(null,655))}}}catch(s){if(-1===s.message.indexOf("Cannot find module")||-1===s.message.indexOf(".vue"))throw s;console.error(s.message),console.error("1. 鎺掓煡缁勪欢鍚嶇О鎷煎啓鏄惁姝g‘"),console.error("2. 鎺掓煡缁勪欢鏄惁绗﹀悎 easycom 瑙勮寖锛屾枃妗o細https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 鑻ョ粍浠朵笉绗﹀悎 easycom 瑙勮寖锛岄渶鎵嬪姩寮曞叆锛屽苟鍦� components 涓敞鍐岃缁勪欢")}var i=function(){var t=this,e=t.$createElement,n=(t._self._c,"custom"===t.currentRange?t.formatPickerDate(t.startDate)||"寮�濮嬫椂闂�":null),a="custom"===t.currentRange?t.formatPickerDate(t.endDate)||"缁撴潫鏃堕棿":null;t._isMounted||(t.e0=function(e,n){var a=arguments[arguments.length-1].currentTarget.dataset,i=a.eventParams||a["event-params"];n=i.item;t.currentRange=n.value},t.e1=function(e){t.showStartDatePicker=!0},t.e2=function(e){t.showEndDatePicker=!0},t.e3=function(e){t.showStartDatePicker=!1},t.e4=function(e){t.showEndDatePicker=!1}),t.$mp.data=Object.assign({},{$root:{m0:n,m1:a}})},r=!1,o=[];i._withStripped=!0},550:function(t,e,n){"use strict";n.r(e);var a=n(551),i=n.n(a);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);e["default"]=i.a},551:function(t,e,n){"use strict";(function(t){var a=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=a(n(34)),r=a(n(11)),o=a(n(5)),s=a(n(36));function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){(0,r.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var l={data:function(){return{currentRange:"today",startDate:"",endDate:"",showStartDatePicker:!1,showEndDatePicker:!1,minEndDate:"",quickTabs:[{label:"浠婃棩",value:"today"},{label:"杩�7鏃�",value:"7days"},{label:"杩�30鏃�",value:"30days"},{label:"杩戝崐骞�",value:"halfYear"},{label:"鑷畾涔�",value:"custom"}],metrics:[{label:"瀵勫瓨璁㈠崟(涓�)",value:"0",icon:"/shop/static/icon/yingshou_ic_jicun@2x.png"},{label:"瀵勯�佽鍗�(涓�)",value:"0",icon:"/shop/static/icon/yingshou_ic_jisong@2x.png"},{label:"鎬昏鍗�(涓�)",value:"0",icon:"/shop/static/icon/yingshou_ic_zongdingdan@2x.png"},{label:"鎬诲畬鎴愯鍗�(涓�)",value:"0",icon:"/shop/static/icon/yingshou_ic_zongwancheng@2x.png"},{label:"鎬昏惀鏀�(鍏�)",value:"0.00",icon:"/shop/static/icon/yingshou_ic_zongyingshou@2x.png"},{label:"鍒嗗簵鍒嗘垚(鍏�)",value:"0.00",icon:"/shop/static/icon/yingshou_ic_fendian@2x.png"},{label:"閫�娆捐鍗�(涓�)",value:"0",icon:"/shop/static/icon/yingshou_ic_tuikuan@2x.png"},{label:"璐d换鎵f(鍏�)",value:"0.00",icon:"/shop/static/icon/yingshou_ic_koukuan@2x.png"}],luggageDistribution:[],selectedLuggageText:"",chartData:{},opts:{rotate:!1,rotateLock:!1,padding:[5,5,5,5],dataLabel:!1,dataLine:!1,enableScroll:!1,legend:{show:!0,position:"right",lineHeight:25},title:{show:!1,name:""},subtitle:{show:!1,name:""},extra:{ring:{ringWidth:20,activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,border:!0,borderWidth:3,borderColor:"#FFFFFF",linearType:"custom"}}}}},onLoad:function(){this.initDateRange(),this.getDriverKpiData()},watch:{currentRange:function(t){"custom"!==t&&(this.initDateRange(),this.getDriverKpiData())},startDate:function(t){this.minEndDate=t?new Date(t).getTime():""}},methods:{formatDate:function(t){return"".concat(t.getFullYear(),"-").concat(String(t.getMonth()+1).padStart(2,"0"),"-").concat(String(t.getDate()).padStart(2,"0"))},formatPickerDate:function(t){if(!t)return"";if("string"===typeof t){if(/^\d{4}-\d{2}-\d{2}$/.test(t))return t;if(/^\d+$/.test(t)){var e=new Date(Number(t));return Number.isNaN(e.getTime())?"":this.formatDate(e)}return t}var n=new Date(t);return Number.isNaN(n.getTime())?"":this.formatDate(n)},isStartDateAfterEndDate:function(t,e){return!(!t||!e)&&new Date(t).getTime()>new Date(e).getTime()},initDateRange:function(){var t=new Date,e=this.formatDate(t);switch(this.currentRange){case"today":this.startDate=e,this.endDate=e;break;case"7days":var n=new Date;n.setDate(n.getDate()-6),this.startDate=this.formatDate(n),this.endDate=e;break;case"30days":var a=new Date;a.setDate(a.getDate()-29),this.startDate=this.formatDate(a),this.endDate=e;break;case"halfYear":var i=new Date;i.setMonth(i.getMonth()-6),this.startDate=this.formatDate(i),this.endDate=e;break;default:break}},getDriverKpiData:function(){var e=this;return(0,s.default)(i.default.mark((function n(){var a,r,s,c;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if("custom"!==e.currentRange||e.startDate&&e.endDate){n.next=3;break}return t.showToast({title:"璇烽�夋嫨鏃ユ湡鑼冨洿",icon:"none"}),n.abrupt("return");case 3:return t.showLoading({title:"鍔犺浇涓�...",mask:!0}),n.prev=4,n.next=7,Promise.all([e.$u.api.driverKpi({startDate:e.startDate,endDate:e.endDate}),e.$u.api.shopLuggageType({startDate:e.startDate,endDate:e.endDate})]);case 7:a=n.sent,r=(0,o.default)(a,2),s=r[0],c=r[1],200===s.code&&e.processDriverKpiData(s.data),200===c.code&&e.processLuggageTypeData(c.data),n.next=19;break;case 15:n.prev=15,n.t0=n["catch"](4),console.error("鑾峰彇鏁版嵁澶辫触:",n.t0),t.showToast({title:"鑾峰彇鏁版嵁澶辫触",icon:"none"});case 19:return n.prev=19,t.hideLoading(),n.finish(19);case 22:case"end":return n.stop()}}),n,null,[[4,15,19,22]])})))()},processDriverKpiData:function(t){console.log("KPI鏁版嵁:",t);var e=function(t){return"number"!==typeof t?"0.00":(t/100).toFixed(2)};this.metrics=[{label:"瀵勫瓨璁㈠崟(涓�)",value:t.localOrderCount||"0",icon:"/shop/static/icon/yingshou_ic_jicun@2x.png"},{label:"瀵勯�佽鍗�(涓�)",value:t.remoteOrderCount||"0",icon:"/shop/static/icon/yingshou_ic_jisong@2x.png"},{label:"鎬昏鍗�(涓�)",value:t.totalOrderCount||"0",icon:"/shop/static/icon/yingshou_ic_zongdingdan@2x.png"},{label:"鎬诲畬鎴愯鍗�(涓�)",value:t.finishedOrderCount||"0",icon:"/shop/static/icon/yingshou_ic_zongwancheng@2x.png"},{label:"鎬昏惀鏀�(鍏�)",value:e(t.totalRevenue),icon:"/shop/static/icon/yingshou_ic_zongyingshou@2x.png"},{label:"鍒嗗簵鍒嗘垚(鍏�)",value:e(t.shopFeeTotal),icon:"/shop/static/icon/yingshou_ic_fendian@2x.png"},{label:"閫�娆捐鍗�(涓�)",value:t.refundOrderCount||"0",icon:"/shop/static/icon/yingshou_ic_tuikuan@2x.png"},{label:"璐d换鎵f(鍏�)",value:e(t.deductTotal),icon:"/shop/static/icon/yingshou_ic_koukuan@2x.png"}]},processLuggageTypeData:function(t){var e=["#3B82F6","#64D7C7","#FFD15C","#FF8A47","#F54786","#EE6666","#91CB74","#73C0DE","#3CA272"];this.luggageDistribution=t.map((function(n,a){return{name:n.luggageName,value:n.orderCount,count:n.luggageCount,percent:n.orderCount>0?Math.round(n.orderCount/t.reduce((function(t,e){return t+e.orderCount}),0)*100):0,color:e[a%e.length]}})),this.chartData={series:[{data:this.luggageDistribution.map((function(t){return{name:t.name,value:t.value}}))}]},this.selectedLuggageText="",this.opts.title.name="",this.opts.subtitle.name=""},onRingChartClick:function(e){var n=e&&"number"===typeof e.currentIndex?e.currentIndex:-1,a=this.luggageDistribution[n];a&&(this.selectedLuggageText="".concat(a.name,"锛�").concat(a.count||0,"浠讹紝").concat(a.value||0,"鍗�"),this.opts=u(u({},this.opts),{},{title:u(u({},this.opts.title),{},{name:"".concat(a.count||0,"浠�"),fontSize:18,color:"#1f2430"}),subtitle:u(u({},this.opts.subtitle),{},{name:a.name,fontSize:11,color:"#7a828f"})}),t.showToast({title:"".concat(a.name," ").concat(a.count||0,"浠�"),icon:"none"}))},onStartDateConfirm:function(e){var n=this.formatPickerDate(e.value);if(this.isStartDateAfterEndDate(n,this.endDate))return this.startDate="",this.showStartDatePicker=!1,void t.showToast({title:"寮�濮嬫棩鏈熶笉鑳藉ぇ浜庢埅姝㈡棩鏈�",icon:"none"});this.startDate=n,this.showStartDatePicker=!1,this.minEndDate=n?new Date(n).getTime():"",this.endDate&&this.getDriverKpiData()},onEndDateConfirm:function(e){var n=this.formatPickerDate(e.value);if(this.isStartDateAfterEndDate(this.startDate,n))return this.endDate="",this.showEndDatePicker=!1,void t.showToast({title:"鎴鏃ユ湡涓嶈兘灏忎簬寮�濮嬫棩鏈�",icon:"none"});this.endDate=n,this.showEndDatePicker=!1,this.startDate&&this.getDriverKpiData()},confirmDateRange:function(){if(this.startDate&&this.endDate){var e=new Date(this.startDate),n=new Date(this.endDate);if(e>n)t.showToast({title:"寮�濮嬫棩鏈熶笉鑳藉ぇ浜庢埅姝㈡棩鏈�",icon:"none"});else{var a=31536e6;n-e>a?t.showToast({title:"鏃ユ湡鍖洪棿涓嶈兘瓒呰繃涓�骞�",icon:"none"}):(this.showDatePicker=!1,this.getDriverKpiData())}}else t.showToast({title:"璇烽�夋嫨瀹屾暣鐨勬棩鏈熻寖鍥�",icon:"none"})}}};e.default=l}).call(this,n(2)["default"])},552:function(t,e,n){"use strict";n.r(e);var a=n(553),i=n.n(a);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);e["default"]=i.a},553:function(t,e,n){}},[[546,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/shop/pages/revenue-analysis/revenue-analysis.js.map
\ No newline at end of file
--
Gitblit v1.9.3