(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesStorehouse/shop/update"],{"2c18":function(e,t,n){"use strict";(function(e){n("6cdc");o(n("4a15"));var t=o(n("ae96"));function o(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("f3be")["createPage"])},"564e":function(e,t,n){"use strict";var o;n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return o}));var i=function(){var e=this,t=e.$createElement;e._self._c},r=[]},"662c":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n("8dd4"),i=function(){n.e("components/plugin/list-cell").then(function(){return resolve(n("1861"))}.bind(null,n)).catch(n.oe)},r=function(){Promise.all([n.e("common/vendor"),n.e("components/module/app-avatar")]).then(function(){return resolve(n("d84d"))}.bind(null,n)).catch(n.oe)},a=function(){Promise.all([n.e("common/vendor"),n.e("components/plugin/simple-address")]).then(function(){return resolve(n("618a"))}.bind(null,n)).catch(n.oe)},s=function(){n.e("components/app-area-sel").then(function(){return resolve(n("62ec"))}.bind(null,n)).catch(n.oe)},u=n("90f4"),c={name:"staff-add",components:{TuiListCell:i,AppAvatarModule:r,SimpleAddress:a,AppAreaSel:s},data:function(){return{form:{shopName:"",province:"",city:"",address:"",floor:"",openTime:"8:00 - 22:00",introduction:"",telephone:"",status:""},showRegion:!1,region:{lat:0,long:0},regionData:[],cityPickerValueDefault:[0,0],statusList:[{value:"01",name:"正常"},{value:"02",name:"停用"}]}},onLoad:function(){},onShow:function(){this.option.id?e.setNavigationBarTitle({title:"修改门店"}):e.setNavigationBarTitle({title:"添加门店"})},methods:{init:function(){this._getDet()},_getDet:function(){var t=this,n=e.getStorageSync("modifyShopB");this.$util.isEmpty(n)||Object.keys(this.form).forEach((function(e,o){t.form[e]=n[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.address,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},radioChange:function(e){for(var t=0;t<this.statusList.length;t++)if(this.statusList[t].value===e.target.value){this.form.status=e.target.value;break}},confirmFn:function(){var t=this,n=this.option.id?o.updateShop:o.addShop;this.option.id&&(this.form.id=this.option.id),n(this.form).then((function(n){var o=t.option.id?"修改成功！":"添加成功！";t.$msg(o),e.removeStorageSync("modifyShopB"),setTimeout((function(){t.$util.pageTo("/admin/shop/list")}),1e3)}))},formSubmit:function(e){var t=[{name:"shopName",rule:["required"],msg:["请输入名称"]},{name:"openTime",rule:["required"],msg:["请输入营业时间"]},{name:"telephone",rule:["required"],msg:["请输入联系电话"]},{name:"province",rule:["required"],msg:["请选择地址"]},{name:"address",rule:["required"],msg:["请填写详细地址"]},{name:"floor",rule:["required"],msg:["请输入门牌号"]},{name:"status",rule:["required"],msg:["请选择状态"]}],n=e.detail.value,o=u.validation(n,t);o?this.$msg(o):this.confirmFn()}}};t.default=c}).call(this,n("f3be")["default"])},"741e":function(e,t,n){},a1dc:function(e,t,n){"use strict";var o=n("741e"),i=n.n(o);i.a},ae96:function(e,t,n){"use strict";n.r(t);var o=n("564e"),i=n("bf70");for(var r in i)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(r);n("a1dc");var a,s=n("0095"),u=Object(s["a"])(i["default"],o["b"],o["c"],!1,null,"142782e9",null,!1,o["a"],a);t["default"]=u.exports},bf70:function(e,t,n){"use strict";n.r(t);var o=n("662c"),i=n.n(o);for(var r in o)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(r);t["default"]=i.a}},[["2c18","common/runtime","common/vendor"]]]);