(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["admin/shop/add"],{"41df":function(e,n,t){"use strict";(function(e){t("6cdc");o(t("4a15"));var n=o(t("d044"));function o(e){return e&&e.__esModule?e:{default:e}}e(n.default)}).call(this,t("f3be")["createPage"])},"4e37":function(e,n,t){},5294:function(e,n,t){"use strict";t.r(n);var o=t("e027"),i=t.n(o);for(var r in o)["default"].indexOf(r)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(r);n["default"]=i.a},"79bc":function(e,n,t){"use strict";var o=t("4e37"),i=t.n(o);i.a},d044:function(e,n,t){"use strict";t.r(n);var o=t("eb6c"),i=t("5294");for(var r in i)["default"].indexOf(r)<0&&function(e){t.d(n,e,(function(){return i[e]}))}(r);t("79bc");var c,a=t("0095"),s=Object(a["a"])(i["default"],o["b"],o["c"],!1,null,"6696db66",null,!1,o["a"],c);n["default"]=s.exports},e027:function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=t("8dd4"),i=t("7736");function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function c(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r(Object(t),!0).forEach((function(n){a(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var s=function(){t.e("components/plugin/list-cell").then(function(){return resolve(t("1861"))}.bind(null,t)).catch(t.oe)},u=function(){Promise.all([t.e("common/vendor"),t.e("components/module/app-avatar")]).then(function(){return resolve(t("d84d"))}.bind(null,t)).catch(t.oe)},l=function(){Promise.all([t.e("common/vendor"),t.e("components/plugin/simple-address")]).then(function(){return resolve(t("618a"))}.bind(null,t)).catch(t.oe)},f=function(){t.e("components/app-area-sel").then(function(){return resolve(t("62ec"))}.bind(null,t)).catch(t.oe)},d=function(){Promise.all([t.e("common/vendor"),t.e("components/app-uploader")]).then(function(){return resolve(t("f4e1"))}.bind(null,t)).catch(t.oe)},m=t("90f4"),p={name:"staff-add",components:{TuiListCell:s,AppAvatarModule:u,SimpleAddress:l,AppAreaSel:f,AppUploader:d},data:function(){return{form:{shopName:"",province:"",city:"",address:"",floor:"",openTime:"8:00 - 22:00",introduction:"",mobile:"",img:[]},showRegion:!1,region:{lat:0,long:0},regionData:[],cityPickerValueDefault:[0,0]}},onLoad:function(){},onShow:function(){this.option.id?e.setNavigationBarTitle({title:"修改门店"}):e.setNavigationBarTitle({title:"添加门店"})},methods:c(c({},(0,i.mapActions)(["setUserShopAll"])),{},{init:function(){this._getDet()},_resultData:function(e){console.log(e),this.form.img=e},_getDet:function(){var n=this,t=e.getStorageSync("modifyShopB");this.$util.isEmpty(t)||Object.keys(this.form).forEach((function(e,o){n.form[e]=t[e]}))},selRegionFn:function(){if(!this.form.city)return this.$msg("请先选择城市！"),!1;this.showRegion=!0},changeAreaFn:function(e){console.log("changeAreaFn",e),this.form.address=e.title,this.region.lat=e.location.lat,this.region.long=e.location.lng},openAddres:function(){this.$refs.simpleAddress.open()},onCityConfirm:function(e){this.form.province=e.provinceName,this.form.city=e.cityName,this.form.address="",this.region.lat=0,this.region.long=0},confirmFn:function(){var n=this,t=this.option.id?o.updateShop:o.addShop;this.option.id&&(this.form.id=this.option.id),this.form=c(c({},this.form),this.region),t(this.form).then((function(t){n.setUserShopAll();var o=n.option.id?"修改成功！":"添加成功！";n.$msg(o),e.removeStorageSync("modifyShopB"),setTimeout((function(){n.$util.pageTo(1)}),1e3)}))},formSubmit:function(e){var n=[{name:"shopName",rule:["required"],msg:["请输入名称"]},{name:"openTime",rule:["required"],msg:["请输入营业时间"]},{name:"mobile",rule:["required"],msg:["请输入手机号"]},{name:"province",rule:["required"],msg:["请选择地址"]},{name:"address",rule:["required"],msg:["请填写详细地址"]}],t=e.detail.value,o=m.validation(t,n);o?this.$msg(o):this.confirmFn()}})};n.default=p}).call(this,t("f3be")["default"])},eb6c:function(e,n,t){"use strict";var o;t.d(n,"b",(function(){return i})),t.d(n,"c",(function(){return r})),t.d(n,"a",(function(){return o}));var i=function(){var e=this,n=e.$createElement;e._self._c},r=[]}},[["41df","common/runtime","common/vendor"]]]);