(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1dff0580"],{"0145":function(t,e,s){},d59f:function(t,e,s){"use strict";s("0145")},e0ce:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",t._l(t.listFilted,(function(s,i){return e("div",{key:i,staticClass:"summary-box"},t._l(s,(function(s,i){return e("div",{key:i,staticClass:"summary-item"},[e("svg-icon",{staticClass:"icon",attrs:{name:s.icon}}),e("p",[t._v(t._s(s.columnName))]),e("p",[t._v(t._s(s.total))])],1)})),0)})),0)},a=[],n=(s("14d9"),s("e9f5"),s("910d"),s("7d54"),s("9ab4")),c=s("60a3");let l=class extends c["f"]{constructor(){super(...arguments),this.SLIDE_TYPE={left:"left",right:"right"},this.currentOffset=[0,0],this.scrollWidth=document.body.scrollWidth,this.slideWidth=220,this.FLAG={total:0,cash:10,pos:30,wx:60,ali:70,bank:80,oneCard:201,sCardMoney:202},this.FLAG_ONE_CARD={oneCardRecharge:1,oneCardRefund:2},this.FLAG_CARD_TYPE={oneCard:1,sCardMoney:2,sCardTimes:3,sCardWeekly:4},this.FLAG_SPORT={badminton:1,basketball:2,football:7},this.FLAG_GOODS={},this.FLAG_COMMON={},this.totalObj=[{columnName:"合计",flag:0,icon:"payment-cash"},{columnName:"合计",flag:0,icon:"payment-cash"}],this.isEndOfList=[],this.isHeadOfList=[]}getList(t){this.type&&this.handleData(t,this.type),this.list.forEach((t,e)=>{Object.assign(this.totalObj[e],t.filter(t=>0===t.flag)[0])})}mounted(){this.getIsEndOfList(),this.getIsHeadOfList()}get listFilted(){const t=[];return this.list.forEach((e,s)=>{const i=e.filter(t=>0!==t.flag);t.push(i)}),t}get slideSize(){return Math.floor(this.scrollWidth/220)-2||1}getIsEndOfList(){this.isEndOfList=[],this.list.forEach((t,e)=>{this.isEndOfList.push(this.currentOffset[e]<=-1*this.slideWidth*(t.length-this.slideSize))})}getIsHeadOfList(){this.isHeadOfList=[],this.currentOffset.forEach((t,e)=>{this.isHeadOfList.push(0===t)})}handleData(t,e){t.forEach(t=>{if(1===e)switch(t.flag){case this.FLAG.total:t.icon="payment-total";break;case this.FLAG.cash:t.icon="payment-cash";break;case this.FLAG.pos:t.icon="payment-pos";break;case this.FLAG.wx:t.icon="payment-wx";break;case this.FLAG.ali:t.icon="payment-ali";break;case this.FLAG.bank:t.icon="payment-gift";break;case this.FLAG.oneCard:t.icon="payment-card";break;case this.FLAG.sCardMoney:t.icon="payment-card-price";break;default:t.icon="payment-default-2";break}else if(2===e)switch(t.flag){case this.FLAG.total:t.icon="payment-total";break;case this.FLAG_CARD_TYPE.oneCard:t.icon="payment-card";break;case this.FLAG_CARD_TYPE.sCardMoney:t.icon="payment-card-price";break;case this.FLAG_CARD_TYPE.sCardTimes:t.icon="payment-card-times";break;case this.FLAG_CARD_TYPE.sCardWeekly:t.icon="payment-card-weekly";break;default:t.icon="payment-default-2";break}else if(3===e)switch(t.flag){case this.FLAG.total:t.icon="payment-total";break;case this.FLAG_ONE_CARD.oneCardRecharge:t.icon="payment-recharge";break;case this.FLAG_ONE_CARD.oneCardRefund:t.icon="payment-refund";break;default:t.icon="payment-default-2";break}else if(4===e)switch(t.flag){case this.FLAG.total:t.icon="payment-total";break;case this.FLAG_SPORT.basketball:t.icon="sport-basketball";break;case this.FLAG_SPORT.football:t.icon="sport-football";break;case this.FLAG_SPORT.badminton:t.icon="sport-badminton";break;default:t.icon="sport-default";break}else if(5===e)switch(t.flag){case this.FLAG.total:t.icon="payment-total";break;default:t.icon="payment-default-2";break}else switch(t.flag){case this.FLAG.total:t.icon="payment-total";break;default:t.icon="payment-common-in";break}}),this.sortByPayment(t)}slide(t,e,s,i){switch(t){case this.SLIDE_TYPE.left:s||(this.currentOffset[i]+=this.slideWidth*this.slideSize);break;case this.SLIDE_TYPE.right:e||(this.currentOffset[i]-=this.slideWidth*this.slideSize);break}this.$forceUpdate(),this.getIsEndOfList(),this.getIsHeadOfList()}sortByPayment(t){if(t.length>4){const e=t.findIndex(t=>t.flag===this.FLAG.wx),s=t.findIndex(t=>t.flag===this.FLAG.ali);-1!==e&&3!==e&&this.exchange(e,3),-1!==s&&4!==s&&this.exchange(s,4)}else{const e=t.findIndex(t=>t.flag===this.FLAG.wx),s=t.findIndex(t=>t.flag===this.FLAG.ali);-1!==e&&3!==e&&this.exchange(e,3),-1!==s&&2!==s&&this.exchange(s,2)}}exchange(t,e){const s=this.listFilted[t];this.listFilted[t]=this.listFilted[e],this.listFilted[e]=s}};Object(n["a"])([Object(c["c"])({required:!0,type:Array})],l.prototype,"list",void 0),Object(n["a"])([Object(c["c"])({required:!1,type:Number})],l.prototype,"type",void 0),Object(n["a"])([Object(c["g"])("list",{immediate:!0})],l.prototype,"getList",null),l=Object(n["a"])([c["a"]],l);var o=l,r=o,h=(s("d59f"),s("2877")),d=Object(h["a"])(r,i,a,!1,null,"5408461b",null);e["default"]=d.exports}}]);
//# sourceMappingURL=chunk-1dff0580.027dfb5a.js.map