(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[64],{"38cd":function(t,s,n){"use strict";n("ba15")},"7aef":function(t,s,n){"use strict";n.r(s);var i=function(){var t=this,s=t.$createElement,n=t._self._c||s;return n("q-dialog",{attrs:{maximized:t.$q.platform.is.mobile},on:{"before-hide":t.handleClose},model:{value:t.showVoucherList,callback:function(s){t.showVoucherList=s},expression:"showVoucherList"}},[n("q-card",{staticClass:"voucher-dialog-box"},[n("q-card-section",{staticClass:"voucher-header"},[n("div",{staticClass:"voucher-title"},[t._v(t._s(t.$t("product.voucherPromo")))]),n("q-btn",{staticClass:"voucher-close",attrs:{icon:t.$q.platform.is.mobile?"chevron_left":"close",flat:"",round:"",dense:""},on:{click:t.handleClose}})],1),n("q-card-section",{staticClass:"voucher-body",on:{scroll:function(s){return t.getNewData(s)}}},t._l(t.voucherList,(function(s,i){return n("div",{key:i},["amount"===s.type?n("div",{staticClass:"voucher-item"},[n("div",{staticClass:"discount-price"},[t._v("\n            "+t._s(t.$t("product.DiscountPrice",{val1:t.$n(s.value,"currency",t.PRICETYPE_ID)}))+"\n          ")]),s.minPurchase?n("div",{staticClass:"discount-info"},[t._v("\n            "+t._s(t.$t("product.minPurchaseText"))+"\n            "+t._s(t.$n(s.minPurchase,"currency",t.PRICETYPE_ID))+"\n          ")]):n("div",{staticClass:"discount-info"},[t._v("\n            "+t._s(t.$t("product.noPurchase"))+"\n          ")])]):n("div",{staticClass:"voucher-item"},[n("div",{staticClass:"discount-price"},[t._v("\n            "+t._s(t.$t("product.DiscountPrice",{val1:s.value+"%"}))+"\n            "),s.maxDiscountAmount?n("span",[t._v("(Max\n              "+t._s(t.$n(s.maxDiscountAmount,"currency",t.PRICETYPE_ID))+")")]):t._e()]),s.minPurchase?n("div",{staticClass:"discount-info"},[t._v("\n            "+t._s(t.$t("product.minPurchaseText"))+"\n            "+t._s(t.$n(s.minPurchase,"currency",t.PRICETYPE_ID))+"\n          ")]):n("div",{staticClass:"discount-info"},[t._v("\n            "+t._s(t.$t("product.noPurchase"))+"\n          ")])])])})),0),n("q-inner-loading",{attrs:{showing:t.showLoading}},[n("q-spinner",{attrs:{color:"primary",size:"3em"}})],1)],1)],1)},e=[],o=(n("e9c4"),n("d3b7"),n("159b"),n("99af"),{name:"VoucherList",props:{show:{type:Boolean},allVoucherList:{type:Array}},data:function(){return{showVoucherList:!1,voucherList:[],newList:[],showLoading:!1,num:null}},mounted:function(){this.voucherList=JSON.parse(JSON.stringify(this.allVoucherList)),this.voucherList.length>6&&(this.newList=this.arrTrans(6,this.voucherList),this.voucherList=this.newList[0],this.num=0)},methods:{arrTrans:function(t,s){var n=[];return s.forEach((function(s,i){var e=Math.floor(i/t);n[e]||(n[e]=[]),n[e].push(s)})),n},handleClose:function(){this.$emit("update:show",!1)},getNewData:function(t){var s=this,n=t.target.scrollHeight-t.target.scrollTop-t.target.clientHeight;this.newList.length>1&&0===n&&(this.showLoading=!0,this.num<this.newList.length-1?setTimeout((function(){s.num=s.num+1;var t=s.newList[s.num];s.voucherList=s.voucherList.concat(t),s.showLoading=!1}),1e3):this.showLoading=!1)}},watch:{show:{handler:function(t){this.showVoucherList=t},immediate:!0}}}),c=o,a=(n("38cd"),n("2877")),r=n("24e8"),u=n("f09f"),h=n("a370"),l=n("9c40"),d=n("74f7"),v=n("0d59"),m=n("eebe"),f=n.n(m),p=Object(a["a"])(c,i,e,!1,null,"7065a306",null);s["default"]=p.exports;f()(p,"components",{QDialog:r["a"],QCard:u["a"],QCardSection:h["a"],QBtn:l["a"],QInnerLoading:d["a"],QSpinner:v["a"]})},ba15:function(t,s,n){}}]);