(window.webpackJsonp=window.webpackJsonp||[]).push([[39],{597:function(e,t,r){e.exports={}},637:function(e,t,r){"use strict";r(597)},722:function(e,t,r){"use strict";r.r(t);r(39),r(41),r(40),r(62),r(63),r(46),r(11),r(32);var n=r(24);r(64);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var d={name:"DialogSelectAddr",components:{},filters:{},props:{addressDetail:{type:Object,default:function(){return{}}},visible:{type:Boolean,default:!1},addressList:{type:Array,default:function(){return[]}}},data:function(){return{show:!1,selectedId:-1,computedList:[]}},computed:{},watch:{visible:function(){this.show=this.visible,this.visible&&this.generateAddressList()},addressList:function(){this.generateAddressList()}},mounted:function(){},methods:{generateAddressList:function(){this.computedList=this.addressList.map((function(e){return c(c({},e),{},{selected:!1})}))},submit:function(){-1!==this.selectedId?(this.$emit("select-addr",this.selectedId),this.close()):this.$message.error("Please check address before click this button")},close:function(){this.selectedId=-1,this.computedList=[],this.$emit("close",!1)},newAddr:function(){this.$emit("add-new-addr"),this.close()},handleCurrentChange:function(e,t,r){this.selectedId=e.id||-1,this.$refs.table.setCurrentRow(e),this.computedList=this.addressList.map((function(t){return c(c({},t),{},{selected:t.id===e.id})}))}}},l=(r(637),r(22)),component=Object(l.a)(d,(function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"dialogSelectAddr"}},[t("el-dialog",{attrs:{"lock-scroll":!1,title:"Choose a delivery address",visible:e.show,"close-on-click-modal":!1,"close-on-press-escape":!1,"show-close":!0,width:"50%"},on:{"update:visible":function(t){e.show=t},close:e.close}},[t("el-table",{ref:"table",staticStyle:{width:"100%"},attrs:{height:"300",data:e.computedList,"row-class-name":"row-cursor"},on:{"row-click":e.handleCurrentChange}},[t("el-table-column",{attrs:{label:"checked",width:"80px"},scopedSlots:e._u([{key:"default",fn:function(e){return[t("el-checkbox",{attrs:{value:e.row.selected}})]}}])}),e._v(" "),t("el-table-column",{attrs:{label:"address"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n          "+e._s(t.row.name)+" "+e._s(t.row.address)+", "+e._s(t.row.city)+", "+e._s(t.row.post_code)+", "+e._s(t.row.country)+", Phone number: "+e._s(t.row.phone)+"\n        ")]}}])})],1),e._v(" "),t("br"),e._v(" "),t("div",[t("el-button",{attrs:{size:"mini",type:"text",plain:""},on:{click:e.newAddr}},[e._v("Add Shipping Address")])],1),e._v(" "),t("br"),e._v(" "),t("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.submit}},[e._v("Deliver to this address")])],1)],1)}),[],!1,null,"69716650",null);t.default=component.exports}}]);
//# sourceMappingURL=336188e.js.map