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 line
14 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["package-packagestat-pages-stat-stat"],{"0922":function(e,t,a){"use strict";a("6a54"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={name:"topnav",props:{title:{type:String,default:""},hasHome:{type:String,default:"home"}},data:function(){return{}},methods:{toback:function(){uni.navigateBack({delta:0})},tohome:function(){this.$emit("tohome")}}};t.default=n},"1b8a":function(e,t,a){"use strict";a.r(t);var n=a("de76"),i=a("db6f");for(var s in i)["default"].indexOf(s)<0&&function(e){a.d(t,e,(function(){return i[e]}))}(s);a("b028");var r=a("828b"),l=Object(r["a"])(i["default"],n["b"],n["c"],!1,null,"f224e720",null,!1,n["a"],void 0);t["default"]=l.exports},"284a":function(e,t,a){"use strict";var n=a("7396"),i=a.n(n);i.a},"333e":function(e,t,a){"use strict";a.r(t);var n=a("caad"),i=a("8e79");for(var s in i)["default"].indexOf(s)<0&&function(e){a.d(t,e,(function(){return i[e]}))}(s);a("7198");var r=a("828b"),l=Object(r["a"])(i["default"],n["b"],n["c"],!1,null,"5c7d9a0b",null,!1,n["a"],void 0);t["default"]=l.exports},3471:function(e,t,a){"use strict";a("6a54"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var a="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=(0,n.default)(e))||t&&e&&"number"===typeof e.length){a&&(e=a);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,o=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return l=e.done,e},e:function(e){o=!0,r=e},f:function(){try{l||null==a["return"]||a["return"]()}finally{if(o)throw r}}}},a("01a2"),a("e39c"),a("bf0f"),a("844d"),a("18f7"),a("de6c"),a("7a76"),a("c9b5");var n=function(e){return e&&e.__esModule?e:{default:e}}(a("5d6b"))},6621:function(e,t,a){var n=a("c86c");t=n(!1),t.push([e.i,"uni-page-body[data-v-5c7d9a0b]{padding-top:%?160?%}.content[data-v-5c7d9a0b]{padding:%?0?% %?31?%}.indexbox[data-v-5c7d9a0b]{margin-top:%?20?%;position:relative}.statBox[data-v-5c7d9a0b]{display:flex;margin-top:%?20?%;flex-wrap:wrap}.statItem[data-v-5c7d9a0b]{display:flex;justify-content:flex-start;flex-direction:column;width:50%}.statItemHeader[data-v-5c7d9a0b]{display:flex;line-height:%?30?%}.statNum[data-v-5c7d9a0b]{margin-top:%?16?%;padding-left:%?24?%}.statItem .statItemTitele[data-v-5c7d9a0b]{font-family:SourceHanSansCN-Normal;font-size:%?24?%;color:#666;margin-left:%?18?%}.statItemCBar[data-v-5c7d9a0b]{background:#fdb030;border:%?2?% solid #fff;border-radius:%?4?%;width:%?6?%;height:%?16?%}.blue[data-v-5c7d9a0b]{background:#3c91f5}.green[data-v-5c7d9a0b]{background:#52d5a6}",""]),e.exports=t},7198:function(e,t,a){"use strict";var n=a("f9d9"),i=a.n(n);i.a},7396:function(e,t,a){var n=a("7a82");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var i=a("967d").default;i("245bb68a",n,!0,{sourceMap:!1,shadowMode:!1})},"7a82":function(e,t,a){var n=a("c86c");t=n(!1),t.push([e.i,".icon-home[data-v-2198d501]{padding-left:%?55?%;font-size:%?42?%}.nav[data-v-2198d501]{height:%?160?%;background-image:linear-gradient(130deg,#52d5a6,#43c9cf);display:flex;align-items:center;padding:%?0?% %?30?%;padding-top:%?48?%;position:fixed;box-sizing:border-box;top:%?0?%;left:0;width:100%;overflow:hidden;z-index:9999;justify-content:space-between}.nav .navLeft[data-v-2198d501]{display:flex}.nav .navTitle[data-v-2198d501]{font-family:SourceHanSansCN-Medium;font-size:%?36?%;color:#fff;letter-spacing:%?0.37?%;line-height:%?50?%;margin-left:%?40?%;font-weight:600}.nav .navLeft .icon-fanhui[data-v-2198d501]{color:#fff;font-size:%?45?%}.navRight[data-v-2198d501]{display:flex;align-items:center}",""]),e.exports=t},"8b7c":function(e,t,a){var n=a("92a5");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var i=a("967d").default;i("4e15a459",n,!0,{sourceMap:!1,shadowMode:!1})},"8e79":function(e,t,a){"use strict";a.r(t);var n=a("ee002"),i=a.n(n);for(var s in n)["default"].indexOf(s)<0&&function(e){a.d(t,e,(function(){return n[e]}))}(s);t["default"]=i.a},9203:function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"c",(function(){return i})),a.d(t,"a",(function(){}));var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-uni-view",[a("v-uni-view",{staticClass:"nav"},[a("v-uni-view",{staticClass:"navLeft"},[a("v-uni-view",{staticClass:"back",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.toback.apply(void 0,arguments)}}},[a("v-uni-text",{staticClass:"iconfont icon-fanhui"})],1),a("v-uni-view",{staticClass:"navTitle"},[e._v(e._s(e.title))])],1),a("v-uni-view",{staticClass:"navRight"},[e._t("default"),"home"==e.hasHome?a("v-uni-text",{staticClass:"iconfont icon-home iconTop",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.tohome.apply(void 0,arguments)}}}):e._e()],2)],1)],1)},i=[]},"92a5":function(e,t,a){var n=a("c86c");t=n(!1),t.push([e.i,".indexheader[data-v-f224e720]{display:flex;justify-content:space-between;padding-bottom:%?22?%;border-bottom:%?2?% solid #f0f0f0;align-items:center;min-height:%?40?%}.indexheader .indexheaderLeft .indexheaderLeftText[data-v-f224e720]{font-family:SourceHanSansCN-Medium;font-size:%?28?%;color:#333;line-height:%?40?%;font-weight:700;position:absolute;z-index:2;bottom:%?-22?%;left:0}.indexheader .indexheaderRight .indexheaderMoreText[data-v-f224e720]{opacity:.6;font-family:SourceHanSansCN-Normal;font-size:%?24?%;color:#666;line-height:%?40?%}.indexheaderLeft[data-v-f224e720]{position:relative;flex:1}.headerBorder[data-v-f224e720]{background-image:linear-gradient(90deg,rgba(91,215,171,.6),hsla(0,0%,93.3%,0));border-radius:%?8?%;width:%?60?%;height:%?16?%;position:absolute;bottom:%?-22?%;left:0;z-index:1}",""]),e.exports=t},ab66:function(e,t,a){"use strict";a.r(t);var n=a("0922"),i=a.n(n);for(var s in n)["default"].indexOf(s)<0&&function(e){a.d(t,e,(function(){return n[e]}))}(s);t["default"]=i.a},b028:function(e,t,a){"use strict";var n=a("8b7c"),i=a.n(n);i.a},c847:function(e,t,a){"use strict";a("6a54"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={name:"boxtitle",props:{title:{type:String,default:""}},data:function(){return{}}};t.default=n},caad:function(e,t,a){"use strict";a.d(t,"b",(function(){return i})),a.d(t,"c",(function(){return s})),a.d(t,"a",(function(){return n}));var n={topnav:a("d8f1").default,boxtitle:a("1b8a").default},i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-uni-view",[a("topnav",{attrs:{title:"统计报表"},on:{tohome:function(t){arguments[0]=t=e.$handleEvent(t),e.tohome.apply(void 0,arguments)}}}),a("v-uni-view",{staticClass:"content"},[e._l(e.info,(function(t,n){return[a("v-uni-view",[a("v-uni-view",{staticClass:"indexbox"},[a("boxtitle",{attrs:{title:t.name}},[a("v-uni-text",[e._v(e._s(null==t.data.recharge?0:t.data.recharge.total))])],1),a("v-uni-view",{staticClass:"statBox",on:{click:function(a){arguments[0]=a=e.$handleEvent(a),e.toinfo(t,"recharge")}}},e._l(e.getRechargeItems(t.data.recharge),(function(t,n){return a("v-uni-view",{key:"recharge-"+n,staticClass:"statItem",staticStyle:{width:"33.33%"}},[a("v-uni-view",{staticClass:"statItemHeader "},[a("v-uni-view",{staticClass:"statItemCBar",class:t.barClass}),a("v-uni-text",{staticClass:"statItemTitele"},[e._v(e._s(t.label))])],1),a("v-uni-view",{staticClass:"statNum mf-26"},[e._v(e._s(t.value))])],1)})),1),a("boxtitle",{attrs:{title:"退款"}},[a("v-uni-text",{staticStyle:{color:"crimson"}},[e._v(e._s(t.data.refund))])],1),a("v-uni-view",{staticClass:"statBox",on:{click:function(a){arguments[0]=a=e.$handleEvent(a),e.toinfo(t,"refund")}}},e._l(e.getRefundItems(t.data.refund_by_methods),(function(t,n){return a("v-uni-view",{key:"refund-"+n,staticClass:"statItem",staticStyle:{width:"33.33%"}},[a("v-uni-view",{staticClass:"statItemHeader "},[a("v-uni-view",{staticClass:"statItemCBar",class:t.barClass}),a("v-uni-text",{staticClass:"statItemTitele"},[e._v(e._s(t.label))])],1),a("v-uni-view",{staticClass:"statNum mf-26"},[e._v(e._s(t.value))])],1)})),1),a("boxtitle",{attrs:{title:"交账"}},[a("v-uni-text",{staticStyle:{color:"blue"}},[e._v(e._s(t.data.budget.total))])],1),a("v-uni-view",{staticClass:"statBox"},e._l(e.getBudgetItems(t.data.budget),(function(t,n){return a("v-uni-view",{key:"budget-"+n,staticClass:"statItem",staticStyle:{width:"33.33%"}},[a("v-uni-view",{staticClass:"statItemHeader "},[a("v-uni-view",{staticClass:"statItemCBar",class:t.barClass}),a("v-uni-text",{staticClass:"statItemTitele"},[e._v(e._s(t.label))])],1),a("v-uni-view",{staticClass:"statNum mf-26"},[e._v(e._s(t.value))])],1)})),1),a("v-uni-view",{staticClass:"lCircle lc_1"}),a("v-uni-view",{staticClass:"lCircle lc_2"})],1)],1)]})),a("v-uni-view",{staticClass:"btnBgWhite",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.backhome.apply(void 0,arguments)}}},[a("v-uni-text",[e._v("返回首页")])],1)],2)],1)},s=[]},d8f1:function(e,t,a){"use strict";a.r(t);var n=a("9203"),i=a("ab66");for(var s in i)["default"].indexOf(s)<0&&function(e){a.d(t,e,(function(){return i[e]}))}(s);a("284a");var r=a("828b"),l=Object(r["a"])(i["default"],n["b"],n["c"],!1,null,"2198d501",null,!1,n["a"],void 0);t["default"]=l.exports},db6f:function(e,t,a){"use strict";a.r(t);var n=a("c847"),i=a.n(n);for(var s in n)["default"].indexOf(s)<0&&function(e){a.d(t,e,(function(){return n[e]}))}(s);t["default"]=i.a},de76:function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"c",(function(){return i})),a.d(t,"a",(function(){}));var n=function(){var e=this.$createElement,t=this._self._c||e;return t("v-uni-view",[t("v-uni-view",{staticClass:"statHeader indexheader"},[t("v-uni-view",{staticClass:"indexheaderLeft"},[t("v-uni-text",{staticClass:"indexheaderLeftText"},[this._v(this._s(this.title))]),t("v-uni-view",{staticClass:"headerBorder"})],1),t("v-uni-view",{staticClass:"indexheaderRight"},[this._t("default")],2)],1)],1)},i=[]},ee002:function(e,t,a){"use strict";a("6a54");var n=a("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a("e838");var i=n(a("3471")),s=a("e0a6"),r={data:function(){return{info:[{type:"today",name:"今日营收",data:{}},{type:"yesterday",name:"昨日营收",data:{}},{type:"this_week",name:"本周营收",data:{}},{type:"this_month",name:"本月营收",data:{}}]}},onShow:function(){var e,t=this,a=0,n=(0,i.default)(t.info);try{for(n.s();!(e=n.n()).done;){var s=e.value;t.loadData(s.type,a,(function(e,a){console.log(e.recharge),e.refund_by_methods=e.refund_by_methods||{},e.recharge=e.recharge||{},e.refund_by_methods.online=t.num(e.refund_by_methods.weixin)+t.num(e.refund_by_methods.alipay),t.info[a].data=e,t.info[a].data.budget={total:e.recharge.total-e.refund,cash:t.num(e.recharge.cash)-t.num(e.refund_by_methods.cash),weixin:t.num(e.recharge.weixin)-t.num(e.refund_by_methods.weixin),alipay:t.num(e.recharge.alipay)-t.num(e.refund_by_methods.alipay),pos:t.num(e.recharge.pos)-t.num(e.refund_by_methods.pos),offline_pos:t.num(e.recharge.offline_pos)-t.num(e.refund_by_methods.offline_pos),offline_qrcode:t.num(e.recharge.offline_qrcode)-t.num(e.refund_by_methods.offline_qrcode),transfer:t.num(e.recharge.transfer)-t.num(e.refund_by_methods.transfer),offline_cash:t.num(e.recharge.offline_cash)-t.num(e.refund_by_methods.offline_cash)}})),a++}}catch(r){n.e(r)}finally{n.f()}},methods:{num:function(e){return parseFloat(e||0)},getRechargeOfflineTotal:function(e){return e=e||{},this.num(e.pos)+this.num(e.transfer)+this.num(e.offline_pos)+this.num(e.offline_qrcode)+this.num(e.offline_cash)},getRefundOfflineTotal:function(e){return e=e||{},this.num(e.pos)+this.num(e.transfer)+this.num(e.offline_pos)+this.num(e.offline_qrcode)+this.num(e.offline_cash)},getRechargeItems:function(e){return e=e||{},[{label:"现金(元)",value:this.num(e.cash),barClass:""},{label:"微信(元)",value:this.num(e.weixin),barClass:"green"},{label:"支付宝(元)",value:this.num(e.alipay),barClass:"blue"},{label:"刷卡(元)",value:this.num(e.pos),barClass:""},{label:"线下POS",value:this.num(e.offline_pos),barClass:"green"},{label:"线下二维码(元)",value:this.num(e.offline_qrcode),barClass:"blue"},{label:"转账(元)",value:this.num(e.transfer),barClass:""},{label:"线下现金(元)",value:this.num(e.offline_cash),barClass:"green"}]},getRefundItems:function(e){return e=e||{},[{label:"现金(元)",value:this.num(e.cash),barClass:""},{label:"微信(元)",value:this.num(e.weixin),barClass:"green"},{label:"支付宝(元)",value:this.num(e.alipay),barClass:"blue"},{label:"刷卡(元)",value:this.num(e.pos),barClass:""},{label:"线下POS",value:this.num(e.offline_pos),barClass:"green"},{label:"线下二维码(元)",value:this.num(e.offline_qrcode),barClass:"blue"},{label:"转账(元)",value:this.num(e.transfer),barClass:""},{label:"线下现金(元)",value:this.num(e.offline_cash),barClass:"green"}]},getBudgetItems:function(e){return e=e||{},[{label:"现金(元)",value:this.num(e.cash),barClass:""},{label:"微信(元)",value:this.num(e.weixin),barClass:"green"},{label:"支付宝(元)",value:this.num(e.alipay),barClass:"blue"},{label:"刷卡(元)",value:this.num(e.pos),barClass:""},{label:"线下POS",value:this.num(e.offline_pos),barClass:"green"},{label:"线下二维码(元)",value:this.num(e.offline_qrcode),barClass:"blue"},{label:"转账(元)",value:this.num(e.transfer),barClass:""},{label:"线下现金(元)",value:this.num(e.offline_cash),barClass:"green"}]},toinfo:function(e,t){uni.navigateTo({url:"../statinfo/statinfo?type="+t+"&from="+e.type})},tohome:function(){uni.navigateTo({url:"../../../../pages/index/index"})},backhome:function(){uni.navigateTo({url:"../../../../pages/index/index"})},loadData:function(e,t,a){var n=uni.getStorageSync("currentProject");s.request({bindThis:this,api:"manager/statistics/by-duration",customLoading:!1,data:{project_id:n.id,duration:e},utilSuccess:function(e){a(e,t)},utilFail:function(e){}})}}};t.default=r},f9d9:function(e,t,a){var n=a("6621");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var i=a("967d").default;i("f630e1fa",n,!0,{sourceMap:!1,shadowMode:!1})}}]);