| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["AddressManagement~shop-detail"],{"0ffe":function(e,t,r){"use strict";r("96cf");var n=r("1da1"),a=r("d4ec"),s=r("bee2"),o=r("262e"),i=r("2caf"),u=r("ff2d"),c=r("bc3a"),l=r.n(c),d=r("f121"),p=r.n(d),m=function(e){Object(o["a"])(r,e);var t=Object(i["a"])(r);function r(){var e;return Object(a["a"])(this,r),e=t.call(this),l.a.defaults.baseURL=p.a.HostShop,e}return Object(s["a"])(r,[{key:"getShopToken",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("Host80","/shop/custom/info/loginByCId",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"customBalance",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("HostShop","/custom/balance",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"customLntegralList",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("HostShop","/custom/integral/search/list",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"commodityTypeList",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("HostShop","/commodity/type/search/list",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"commodityList",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("HostShop","/commodity/search/list",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"commoditySingle",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("HostShop","/commodity/search/single",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"orderAdd",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("HostShop","/order/add",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"orderUpdate",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("HostShop","/order/update",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"orderCancel",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("HostShop","/order/cancel",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"orderComplete",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("HostShop","/order/complete",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"orderList",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("HostShop","/order/search/list",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"orderSingle",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("HostShop","/order/search/single",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"addressAdd",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("HostShop","/custom/address/add",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"addressDelete",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("HostShop","/custom/address/delete",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"addressUpdate",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("HostShop","/custom/address/update",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"addressList",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("HostShop","/custom/address/search/list",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}]),r}(u["a"]);t["a"]=new m},"1dff":function(e,t,r){"use strict";r("96cf");var n=r("1da1"),a=r("d4ec"),s=r("bee2"),o=r("262e"),i=r("2caf"),u=r("ff2d"),c=r("bc3a"),l=r.n(c),d=r("f121"),p=r.n(d),m=function(e){Object(o["a"])(r,e);var t=Object(i["a"])(r);function r(){var e;return Object(a["a"])(this,r),e=t.call(this),l.a.defaults.baseURL=p.a.Host80,e}return Object(s["a"])(r,[{key:"Country",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("Host80","/country/get",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"newsAnalysisList",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("Host80","/news/analysis/search/list",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"CustomFileMobile",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.getAll("Host80","/custom/bank/mobile",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"CustomFileMobileFiles",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.getAll("Host80","/custom/file/mobile",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"BankList",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("Host80","/bank/list",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"customBankList",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("Host80","/custom/bank/list",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"customBankAdd",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("Host80","/custom/bank/add",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"customBankUpdate",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("Host80","/custom/bank/update",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"customBankDelete",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("Host80","/custom/bank/delete",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"customFileList",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("Host80","/custom/file/list",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"customUpdatePassword",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("Host80","/custom/update/login/password",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"customUpdateEmail",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("Host80","/custom/update/email",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"customUpdateEmailCode",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("Host80","/custom/update/email/send/code",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"CustomLoginInfo",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("Host80","/custom/info",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"CustomUpdateInfo",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("Host80","/custom/update/info",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"CustomFileList",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("Host80","/custom/file/list",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"customApplyReal",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("Host80","/custom/apply/real",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"customFileDelete",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,r,n=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.postAll("Host80","/custom/file/delete",t);case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}]),r}(u["a"]);t["a"]=new m},5987:function(e,t,r){"use strict";var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"InfoBox",class:{active:e.dialogInfoTradingAdd},attrs:{id:"Drawer"}},[r("div",{staticClass:"header"},[r("div",[r("span",{directives:[{name:"t",rawName:"v-t",value:"Shop.Address.NewMailingAddress",expression:"'Shop.Address.NewMailingAddress'"}],staticClass:"title"})]),r("span",{staticClass:"close crm-cursor",on:{click:e.close}},[r("i",{staticClass:"el-icon-close"})])]),r("el-form",{ref:"form",attrs:{rules:e.rules,model:e.form,"label-position":"top"}},[r("el-form-item",{attrs:{prop:"name",label:e.$t("Shop.Address.Consignee")}},[r("el-input",{attrs:{placeholder:e.$t("placeholder.input")},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),r("el-form-item",{attrs:{prop:"contact",label:e.$t("Shop.Address.MobilePhone")}},[r("el-input",{attrs:{placeholder:e.$t("placeholder.input")},model:{value:e.form.contact,callback:function(t){e.$set(e.form,"contact",t)},expression:"form.contact"}})],1),r("el-form-item",{attrs:{prop:"country",label:e.$t("Shop.Address.DetailedAddress")+"-"+e.$t("PersonalManagement.Label.CountryRegionOfResidence")+":"}},[r("el-select",{staticClass:"crm_search_down crm_select_icon",attrs:{filterable:"",size:"",placeholder:e.$t("placeholder.choose")},on:{change:e.changeCountry},model:{value:e.form.country,callback:function(t){e.$set(e.form,"country",t)},expression:"form.country"}},e._l(e.countries,(function(e,t){return r("el-option",{key:t,attrs:{label:e.enName,value:e.code}})})),1)],1),"CN"==e.form.country?r("el-form-item",{attrs:{prop:"address2",label:e.$t("Shop.Address.DetailedAddress")+"-"+e.$t("PersonalManagement.Label.ProvinceRegion")+":"}},[r("el-select",{staticClass:"crm_search_down crm_select_icon",attrs:{filterable:"",size:"",placeholder:e.$t("placeholder.choose")},on:{change:e.changeState},model:{value:e.form.address2,callback:function(t){e.$set(e.form,"address2",t)},expression:"form.address2"}},e._l(e.states,(function(t,n){return r("el-option",{key:n,attrs:{label:-1!=["cn","zhHant"].indexOf(e.Session.Get("lang"))?t.name:t.enName,value:-1!=["cn","zhHant"].indexOf(e.Session.Get("lang"))?t.name:t.enName}})})),1)],1):e._e(),"CN"==e.form.country?r("el-form-item",{attrs:{prop:"address3",label:e.$t("Shop.Address.DetailedAddress")+"-"+e.$t("PersonalManagement.Label.City")+":"}},[r("el-select",{staticClass:"crm_search_down crm_select_icon",attrs:{filterable:"",size:"",placeholder:e.$t("placeholder.choose")},model:{value:e.form.address3,callback:function(t){e.$set(e.form,"address3",t)},expression:"form.address3"}},e._l(e.cities,(function(t,n){return r("el-option",{key:n,attrs:{label:-1!=["cn","zhHant"].indexOf(e.Session.Get("lang"))?t.name:t.enName,value:-1!=["cn","zhHant"].indexOf(e.Session.Get("lang"))?t.name:t.enName}})})),1)],1):e._e(),e.form.country&&"CN"!=e.form.country?r("el-form-item",{attrs:{prop:"",label:e.$t("Shop.Address.DetailedAddress")+"-"+e.$t("PersonalManagement.Label.ProvinceRegion")+":"}},[r("el-input",{attrs:{placeholder:e.$t("placeholder.input")},model:{value:e.form.address2,callback:function(t){e.$set(e.form,"address2",t)},expression:"form.address2"}})],1):e._e(),e.form.country&&"CN"!=e.form.country?r("el-form-item",{attrs:{prop:"",label:e.$t("Shop.Address.DetailedAddress")+"-"+e.$t("PersonalManagement.Label.City")+":"}},[r("el-input",{attrs:{placeholder:e.$t("placeholder.input")},model:{value:e.form.address3,callback:function(t){e.$set(e.form,"address3",t)},expression:"form.address3"}})],1):e._e(),"CN"==e.form.country?r("el-form-item",{attrs:{prop:"",label:e.$t("Shop.Address.DetailedAddress")+"-"+e.$t("Shop.Address.item")+":"}},[r("el-input",{attrs:{placeholder:e.$t("placeholder.input")},model:{value:e.form.address4,callback:function(t){e.$set(e.form,"address4",t)},expression:"form.address4"}})],1):e._e(),e.form.country&&"CN"!=e.form.country?r("el-form-item",{attrs:{prop:"",label:e.$t("Shop.Address.DetailedAddress")+"-"+e.$t("Shop.Address.item")+":"}},[r("el-input",{attrs:{placeholder:e.$t("placeholder.input")},model:{value:e.form.address4,callback:function(t){e.$set(e.form,"address4",t)},expression:"form.address4"}})],1):e._e(),r("el-form-item",{attrs:{prop:"address5",label:e.$t("Shop.Address.DetailedAddress")+"-"+e.$t("PersonalManagement.Label.DetailedAddress")+":"}},[r("el-input",{attrs:{placeholder:e.$t("placeholder.input")},model:{value:e.form.address5,callback:function(t){e.$set(e.form,"address5",t)},expression:"form.address5"}})],1),"CN"==e.form.country?r("el-form-item",{attrs:{prop:"",label:e.$t("Shop.Address.DetailedAddress")+"-"+e.$t("Shop.Address.item1")+":"}},[r("el-input",{attrs:{placeholder:e.$t("placeholder.input")},model:{value:e.form.address6,callback:function(t){e.$set(e.form,"address6",t)},expression:"form.address6"}})],1):e._e(),e.form.country&&"CN"!=e.form.country?r("el-form-item",{attrs:{prop:"address6",label:e.$t("Shop.Address.DetailedAddress")+"-"+e.$t("Shop.Address.item1")+":"}},[r("el-input",{attrs:{placeholder:e.$t("placeholder.input")},model:{value:e.form.address6,callback:function(t){e.$set(e.form,"address6",t)},expression:"form.address6"}})],1):e._e(),r("el-form-item",{staticClass:"agree",staticStyle:{"margin-top":"10px"},attrs:{prop:""}},[r("el-checkbox",{model:{value:e.form.isDefault,callback:function(t){e.$set(e.form,"isDefault",t)},expression:"form.isDefault"}}),r("span",{directives:[{name:"t",rawName:"v-t",value:"Shop.Address.SetAsDefault",expression:"'Shop.Address.SetAsDefault'"}],staticStyle:{"margin-left":"10px"}})],1)],1),r("span",{staticClass:"btn crm-cursor",on:{click:e.confirm}},[r("span",{directives:[{name:"t",rawName:"v-t",value:"Btn.Confirm",expression:"'Btn.Confirm'"}]})])],1)},a=[],s=(r("4160"),r("c975"),r("b0c0"),r("159b"),r("5530")),o=(r("96cf"),r("1da1")),i=r("0ffe"),u=r("f121"),c=r.n(u),l=r("1dff"),d=c.a.Code,p={name:"Drawer",props:{dialogInfoTradingAdd:{type:Boolean,default:!1},addType:{default:""},editor:{default:""},formInfo:{default:""},information:{default:""}},data:function(){return{flag:!1,pictLoading:!1,form:{name:"",contact:"",address:"",isDefault:!1,address1:"",address2:"",address3:"",address4:"",address5:"",address6:"",country:""},countries:[],states:[],cities:[],pagerInfo:{row:10,current:1,pageTotal:0,rowTotal:0},rules:{name:[{required:!0,message:this.$i18n.t("vaildate.input.empty"),trigger:"blur"}],contact:[{required:!0,message:this.$i18n.t("vaildate.input.empty"),trigger:"blur"}],address:[{required:!0,message:this.$i18n.t("vaildate.input.empty"),trigger:"blur"}],country:[{required:!0,message:this.$i18n.t("vaildate.select.empty"),trigger:"change"}],address2:[{required:!0,message:this.$i18n.t("vaildate.input.empty"),trigger:"change"}],address3:[{required:!0,message:this.$i18n.t("vaildate.input.empty"),trigger:"change"}],address4:[{required:!0,message:this.$i18n.t("vaildate.input.empty"),trigger:"blur"}],address5:[{required:!0,message:this.$i18n.t("vaildate.input.empty"),trigger:"blur"}],address6:[{required:!0,message:this.$i18n.t("vaildate.input.empty"),trigger:"blur"}]}}},computed:{AccessToken:function(){return{"Access-Token":this.Session.Get("access_token")}}},methods:{selectChange:function(){this.$forceUpdate()},close:function(){this.$emit("closeAdd",!1)},confirmToReload:function(){this.$emit("confirmToReload",!0)},confirm:function(){var e=this;this.$refs["form"].validate((function(t){if(!t)return!1;e.toConfirm()}))},toConfirm:function(){this.flag||(this.flag=!0,this.AddressManagement())},AddressManagement:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.form.defaultBank?e.form.defaultBank=1:e.form.defaultBank=0,e.form.address=e.form.address1+" "+e.form.address2+" "+e.form.address3+" "+e.form.address4+" "+e.form.address5+(e.form.address6?" ("+e.form.address6+")":""),t.next=4,i["a"].addressAdd(Object(s["a"])({},e.form));case 4:r=t.sent,r.code==d.StatusOK?(e.confirmToReload(),e.$pigeon.MessageOK(e.$i18n.t("Msg.Success")),e.flag=!1):(e.$pigeon.MessageError(r.msg),e.flag=!1);case 6:case"end":return t.stop()}}),t)})))()},getCountry:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,l["a"].Country({});case 2:r=t.sent,r.code==d.StatusOK?(e.countries=r.data,e.form.country&&e.countries.forEach((function(t){t.code==e.form.country&&e.getState(t.id)}))):e.$pigeon.MessageError(r.msg);case 4:case"end":return t.stop()}}),t)})))()},getState:function(e){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,l["a"].Country({pid:e});case 2:n=r.sent,n.code==d.StatusOK?(t.states=n.data,t.form.address2&&t.states.forEach((function(e){e.name!=t.form.address2&&e.enName!=t.form.address2||t.getCity(e.id)}))):t.$pigeon.MessageError(n.msg);case 4:case"end":return r.stop()}}),r)})))()},getCity:function(e){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,l["a"].Country({pid:e});case 2:n=r.sent,n.code==d.StatusOK?t.cities=n.data:t.$pigeon.MessageError(n.msg);case 4:case"end":return r.stop()}}),r)})))()},changeCountry:function(e){this.form.address2="",this.form.address3="",this.states=[],this.cities=[];var t={};this.countries.forEach((function(r){r.code!=e||(t=r)})),this.form.address1=-1!=["cn","zhHant"].indexOf(this.Session.Get("lang"))?t.name:t.enName,this.getState(t.id)},changeState:function(e){this.form.address3="";var t={};this.states.forEach((function(r){r.name!=e&&r.enName!=e||(t=r)})),this.getCity(t.id)}},mounted:function(){},watch:{dialogInfoTradingAdd:function(e){0==e?this.$refs["form"].resetFields():this.getCountry()},formInfo:function(){this.form=this.formInfo}}},m=p,f=r("2877"),h=Object(f["a"])(m,n,a,!1,null,null,null);t["a"]=h.exports}}]);
|