1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[3],{"+NYS":function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return i}));var s=[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"arrow"},[e("img",{attrs:{src:n("h+BH")}})])}],a={name:"SelectComponent",components:{},model:{prop:"value",event:"input"},props:{value:{type:[Object,String,Number],require:!0,default:function(){return[]}},options:{type:Array,require:!0,default:function(){return[]}}},data:function(){return{}},computed:{inputModel:{get:function(){return this.value},set:function(t){this.$emit("input",t)}},selectedLabel:function(){var t=this.value,e=this.options.filter((function(e){return e.value===t}))[0];return e?e.label:""}},mounted:function(){},beforeDestroy:function(){},methods:{}},o=(n("O1W7"),n("psIG")),i=Object(o.a)(a,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"select-component"},[n("div",{staticClass:"box"},[n("div",{staticClass:"text"},[t._v(t._s(t.selectedLabel))]),t._m(0),n("select",{directives:[{name:"model",rawName:"v-model",value:t.inputModel,expression:"inputModel"}],on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.inputModel=e.target.multiple?n:n[0]}}},t._l(t.options,(function(e,s){return n("option",{key:"option"+(s+1),domProps:{value:e.value}},[t._v(t._s(e.label))])})),0)])])}),s,!1,null,null,null).exports},"1Nsj":function(t,e,n){t.exports=n.p+"assets/img/login/upload-deco.png?0600c70c"},"1vyH":function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return o}));var s={name:"InputComponent",components:{},model:{prop:"value",event:"change"},props:{value:{type:String,default:""}},data:function(){return{}},computed:{inputValue:{get:function(){return this.value},set:function(t){this.$emit("change",t)}}},mounted:function(){},beforeDestroy:function(){},methods:{}},a=(n("GtI6"),n("psIG")),o=Object(a.a)(s,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"input-component"},[n("div",{staticClass:"box"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.inputValue,expression:"inputValue"}],domProps:{value:t.inputValue},on:{input:function(e){e.target.composing||(t.inputValue=e.target.value)}}})])])}),[],!1,null,null,null).exports},"4+YI":function(t,e,n){t.exports=n.p+"assets/img/login/button-submit.png?180a44e9"},"6hmW":function(t,e,n){t.exports=n.p+"assets/img/login/submit-deco.png?a31119a4"},AD5R:function(t,e,n){},BSFq:function(t,e,n){t.exports=n.p+"assets/img/popup/success_title.png?7c19460c"},EWCc:function(t,e,n){},GtI6:function(t,e,n){"use strict";var s=n("b76J");n.n(s).a},LX4u:function(t,e,n){"use strict";var s=n("EWCc");n.n(s).a},O1W7:function(t,e,n){"use strict";var s=n("AD5R");n.n(s).a},POrn:function(t,e,n){t.exports=n.p+"assets/img/login/button-upload.png?36077372"},PbMK:function(t,e,n){},Taur:function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return o}));var s={name:"CheckboxComponent",components:{},model:{prop:"checked",event:"change"},props:{checked:{type:[Array,Boolean],default:!1},disabled:{type:Boolean,default:!1},value:{type:String,default:""}},computed:{inputValue:{get:function(){return this.checked},set:function(t){this.$emit("change",t)}}}},a=(n("LX4u"),n("psIG")),o=Object(a.a)(s,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"checkbox-component"},[n("label",[n("input",{directives:[{name:"model",rawName:"v-model",value:t.inputValue,expression:"inputValue"}],attrs:{type:"checkbox",disabled:t.disabled},domProps:{value:t.value,checked:Array.isArray(t.inputValue)?t._i(t.inputValue,t.value)>-1:t.inputValue},on:{change:function(e){var n=t.inputValue,s=e.target,a=!!s.checked;if(Array.isArray(n)){var o=t.value,i=t._i(n,o);s.checked?i<0&&(t.inputValue=n.concat([o])):i>-1&&(t.inputValue=n.slice(0,i).concat(n.slice(i+1)))}else t.inputValue=a}}}),n("div",{staticClass:"box"}),n("div",{staticClass:"text"},[t._v(t._s(t.value))])])])}),[],!1,null,null,null).exports},YU4U:function(t,e,n){"use strict";var s=n("PbMK");n.n(s).a},b76J:function(t,e,n){},"h+BH":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAARCAYAAAA/mJfHAAAAsUlEQVR42q3MOwrCQABFUUEES5dgQNBdKNhonTVoq2vQVhdi6uwjZUCrQKoUtoKNvtsOJPMtLmEmb84oX2Rb1apfRC0O2IuLBD3BmkRYA3ZOhJ3AJqqOhGocMNpHYjscIKIyECp5b2Ir9fWE2C9NjOjuid1414fNVOcIdeyHMDo6Ygf2NmysKgtUsXPBaGPB1uxcMSp6oIL/vlimPgbEeR6C0dXALtyHYlP1UG++nIf2f1LehpWUF24gAAAAAElFTkSuQmCC"},irZQ:function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return i}));var s=[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"popup-container"},[e("div",{staticClass:"title"},[e("img",{attrs:{src:n("BSFq")}})]),e("div",{staticClass:"massage"},[this._v("如欲查詢"),e("br"),this._v("請點擊下方按鈕"),e("br"),e("span",{staticClass:"highlight"},[this._v("「已登記交易資料」")])])])}],a={name:"LoginPopup",components:{},props:{},data:function(){return{}},computed:{},mounted:function(){},beforeDestroy:function(){},methods:{onClose:function(){this.$emit("close")}}},o=(n("lUVH"),n("psIG")),i=Object(o.a)(a,(function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"login-popup-root flex-center"},[e("div",{staticClass:"popup-body"},[e("div",{staticClass:"inner-wrapper"},[this._m(0),e("div",{staticClass:"button button-close",on:{click:this.onClose}})])])])}),s,!1,null,null,null).exports},lOe7:function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return v}));var s=[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"w-20"},[e("div",{staticClass:"form-label"},[this._v("交易日期")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"w-20"},[e("div",{staticClass:"form-label"},[this._v("交易銀行")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"w-20"},[e("div",{staticClass:"form-label"},[this._v("交易帳號")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"w-20"},[e("div",{staticClass:"form-label"},[this._v("訂單編號")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"submit-deco"},[e("img",{attrs:{src:n("6hmW")}})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"upload-deco"},[e("img",{attrs:{src:n("1Nsj")}})])}],a=n("8VmE"),o=n.n(a),i=n("lOrp"),r=n("9va6"),u=n.n(r),c=n("jTUD"),l=n.n(c),p=n("2MRG"),d=n("+Ov0"),m={components:{SelectComponent:n("+NYS").default,InputComponent:n("1vyH").default,CheckboxComponent:n("Taur").default,LoginPopup:n("irZQ").default},props:{},data:function(){return{isSend:!1,apiResult:[],showPopup:!1,userYear:"",userMonth:"",userDate:"",userAccount:"",userBank:"006",userChecked:!1,userOrderNo:"",banks:d.a}},computed:o()({},i.a.mapState([]),i.a.mapGetters(["LINEID"]),{selectYear:function(){return u.a.range(1911,(new Date).getFullYear()+1,1).map((function(t){return{label:t,value:t}}))},selectMonth:function(){return u.a.range(1,13,1).map((function(t){return{label:u.a.padStart(t,2,0),value:u.a.padStart(t,2,0)}}))},selectDate:function(){var t=this.userYear,e=this.userMonth,n=l()(t+"-"+u.a.padStart(e,2,"0")+"-01").daysInMonth();return u.a.range(1,n+1,1).map((function(t){return{label:u.a.padStart(t,2,0),value:u.a.padStart(t,2,0)}}))},selectBank:function(){return this.banks.map((function(t){return{label:t.code+" "+t.bank,value:t.code}}))}}),mounted:function(){this.LINEID||this.$router.push("/");var t=localStorage.getItem("taiwanpay_account_no");t&&(this.userAccount=t),this.userYear=(new Date).getFullYear(),this.userMonth=u.a.padStart((new Date).getMonth()+1,2,0),this.userDate=u.a.padStart((new Date).getDate(),2,0),this.userAccount=localStorage.getItem("taiwanpay_account_no")||"",localStorage.getItem("taiwanpay_account_no")?this.userChecked=!0:this.userChecked=!1},beforeDestroy:function(){},methods:o()({},i.a.mapMutations(["setLoading","setMessage","setShowPopup"]),i.a.mapActions([]),{openPopup:function(){this.showPopup=!0},closePopup:function(){this.showPopup=!1},onHomeClick:function(){this.$router.push("/")},onLoginClick:function(){this.$router.push("/login")},onDetailClick:function(){this.$router.push("/detail")},onSubmit:function(){var t=this;if(!this.isSend){var e=this.userYear,n=this.userMonth,s=this.userDate,a=this.userBank,o=this.userAccount,i=this.userOrderNo,r=this.userChecked;if(!a||!o||!i)return this.$store.commit("setMessage","請填寫相關欄位"),void this.$store.commit("setShowPopup",!0);this.isSend=!0,this.$store.commit("setLoading",!0),r?localStorage.setItem("taiwanpay_account_no",o):localStorage.getItem("taiwanpay_account_no")&&localStorage.removeItem("taiwanpay_account_no");var u=new FormData;u.append("name","errick"),u.append("order_date",e+"-"+n+"-"+s),u.append("account_bank",a.trim()),u.append("account_no",o.trim()),u.append("order_no",i.trim()),p.a.reqreceipt(u).then((function(e){var n=e.succ;t.$store.commit("setLoading",!1),t.isSend=!1,n&&t.openPopup()})).catch((function(e){t.$store.commit("setLoading",!1),t.$store.commit("setMessage",e.message),t.$store.commit("setShowPopup",!0),t.isSend=!1}))}},onUpload:function(){this.$refs.imgupload.click()},onFileUloaded:function(){var t=this,e=this.$refs.imgupload.files;if(0!==e.length){this.$store.commit("setLoading",!0);var n=new FileReader;n.addEventListener("load",(function(){var e=n.result,s=new FormData;s.append("doc",e),p.a.setdoc(s).then((function(e){var n=e.data;t.userOrderNo=n.order_no,t.userBank=n.account_bank,t.userAccount=n.account_no;var s=new Date(n.order_date);t.userYear=s.getFullYear(),t.userMonth=u.a.padStart(s.getMonth()+1,2,0),t.userDate=u.a.padStart(s.getDate(),2,0),t.$store.commit("setLoading",!1)})).catch((function(e){t.$store.commit("setLoading",!1),t.$store.commit("setMessage",e.message),t.$store.commit("setShowPopup",!0)}))}),!1),n.readAsDataURL(e[0])}}})},f=(n("YU4U"),n("psIG")),v=Object(f.a)(m,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"page-login"},[s("div",{staticClass:"row header"}),s("div",{staticClass:"form"},[s("div",{staticClass:"row flex-between-start"},[t._m(0),s("div",{staticClass:"w-73 flex-between-center"},[s("div",{staticClass:"form-group w-35 flex-around-center"},[s("SelectComponent",{staticClass:"w-65",attrs:{options:t.selectYear},model:{value:t.userYear,callback:function(e){t.userYear=e},expression:"userYear"}}),s("p",[t._v("年")])],1),s("div",{staticClass:"form-group w-30 flex-around-center"},[s("SelectComponent",{staticClass:"w-65",attrs:{options:t.selectMonth},model:{value:t.userMonth,callback:function(e){t.userMonth=e},expression:"userMonth"}}),s("p",[t._v("月")])],1),s("div",{staticClass:"form-group w-30 flex-around-center"},[s("SelectComponent",{staticClass:"w-65",attrs:{options:t.selectDate},model:{value:t.userDate,callback:function(e){t.userDate=e},expression:"userDate"}}),s("p",[t._v("日")])],1)])]),s("div",{staticClass:"row flex-between-start"},[t._m(1),s("div",{staticClass:"w-73"},[s("div",{staticClass:"form-group"},[s("SelectComponent",{attrs:{options:t.selectBank},model:{value:t.userBank,callback:function(e){t.userBank=e},expression:"userBank"}})],1)])]),s("div",{staticClass:"row flex-between-start"},[t._m(2),s("div",{staticClass:"w-73"},[s("div",{staticClass:"form-group"},[s("InputComponent",{model:{value:t.userAccount,callback:function(e){t.userAccount=e},expression:"userAccount"}})],1),s("div",{staticClass:"form-group"},[s("CheckboxComponent",{attrs:{value:"記住我的帳號"},model:{value:t.userChecked,callback:function(e){t.userChecked=e},expression:"userChecked"}})],1)])]),s("div",{staticClass:"row flex-between-start"},[t._m(3),s("div",{staticClass:"w-73"},[s("div",{staticClass:"form-group"},[s("InputComponent",{model:{value:t.userOrderNo,callback:function(e){t.userOrderNo=e},expression:"userOrderNo"}})],1)])])]),s("div",{staticClass:"row"},[s("div",{staticClass:"col button-container flex-center"},[s("div",{staticClass:"button button-submit",on:{click:t.onSubmit}},[s("img",{attrs:{src:n("4+YI")}}),t._m(4)]),s("div",{staticClass:"button button-upload",on:{click:t.onUpload}},[t._m(5),s("img",{attrs:{src:n("POrn")}}),s("input",{ref:"imgupload",staticStyle:{display:"none"},attrs:{type:"file",accept:".png,.jpg,.jpeg"},on:{change:t.onFileUloaded}})])])]),s("div",{staticClass:"row",attrs:{id:"footer"}},[s("div",{staticClass:"col inner-wrapper"},[s("div",{staticClass:"button-container flex-between-end"},[s("div",{staticClass:"button button-login",on:{click:t.onLoginClick}},[s("img",{attrs:{src:n("GOW3")}})]),s("div",{staticClass:"button button-detail",on:{click:t.onDetailClick}},[s("img",{attrs:{src:n("K7tl")}})])]),s("div",{staticClass:"button-container flex-center move-up-30"},[s("div",{staticClass:"button button-home",on:{click:t.onHomeClick}},[s("img",{attrs:{src:n("1yA9")}})])])])]),t.showPopup?s("LoginPopup",{on:{close:t.closePopup}}):t._e()],1)}),s,!1,null,null,null).exports},lUVH:function(t,e,n){"use strict";var s=n("xiXh");n.n(s).a},xiXh:function(t,e,n){}}]);