text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0a5489"],{3850:function(t,e,o){},5015:function(t,e,o){"use strict";var a=o("3850"),s=o.n(a);s.a},"73f5":function(t,e,o){"use strict";var a=o("365c");e["a"]={queryStore:function(t){return a["a"].get("/admin/queryStore",t)},saveOrUpdateStore:function(t){return a["a"].post("/admin/saveOrUpdateStore",t)},queryReserveWashList:function(t){return a["a"].post("/admin/queryReserveWashList",t)},finishReserveWash:function(t){return a["a"].post("/admin/finishReserveWash",t)},insertOrder:function(t){return a["a"].post("/admin/store/insertOrder",t)},queryList:function(t){return a["a"].post("/admin/store/queryList",t)}}},9466:function(t,e,o){"use strict";var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("el-upload",{directives:[{name:"loading",rawName:"v-loading",value:t.uploadLoading,expression:"uploadLoading"}],attrs:{accept:"image/*",action:t.uploadUrl,"show-file-list":!1,"on-success":t.handleUploadSuccess,"before-upload":t.handleBeforeUpload}},[t.value?o("el-image",{staticClass:"u-upload__image",style:{width:t.size+"px",height:t.size+"px"},attrs:{src:t._f("fmtWebp")(t.value),fit:"fill",lazy:"",webp:""}}):o("div",{staticClass:"u-upload__placeholder",style:{width:t.size+"px",height:t.size+"px"}},[o("i",{staticClass:"el-icon-upload"})]),t._v(" "),t.tip?o("div",{staticClass:"u-upload__tip"},[t._v(t._s(t.tip))]):t._e()],1)},s=[],i=(o("c5f6"),{name:"YcUpload",props:{value:String,tip:String,size:{type:Number,default:100}},data:function(){return{uploadLoading:!1}},methods:{handleUploadSuccess:function(t,e){this.uploadLoading=!1,this.$emit("input",t.data)},handleBeforeUpload:function(){return this.uploadLoading=!1,!0}}}),r=i,l=(o("5015"),o("2877")),n=Object(l["a"])(r,a,s,!1,null,"5395658e",null);e["a"]=n.exports},b4b4:function(t,e,o){"use strict";var a=o("b8ce"),s=o.n(a);s.a},b8ce:function(t,e,o){},d5ed:function(t,e,o){"use strict";o.r(e);var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"u-userCenter"},[o("div",{staticClass:"u-header"}),t._v(" "),o("div",{staticClass:"u-body p-2"},[o("h3",[t._v("我的店铺")]),t._v(" "),o("div",{staticClass:"u-store"},[t._l(t.storeList,(function(e){return o("div",{key:e.id,staticClass:"u-store__item",on:{click:function(o){return t.setCurrentStore(e)}}},[o("img",{staticClass:"u-store__logo",attrs:{src:e.logo,alt:""}}),t._v(" "),o("div",{staticClass:"u-store__name"},[t._v(t._s(e.storeName))]),t._v(" "),0===e.storeState?o("el-tag",{staticClass:"u-store__status",attrs:{type:"success"}},[t._v("营业中")]):o("el-tag",{staticClass:"u-store__status",attrs:{type:"info"}},[t._v("休息中")]),t._v(" "),o("i",{staticClass:"el-icon-edit-outline",on:{click:function(o){return o.stopPropagation(),t.doUpdate(e)}}})],1)})),t._v(" "),o("div",{staticClass:"u-store__item align-center justify-center",on:{click:t.doAdd}},[o("i",{staticClass:"el-icon-plus font-weight-bold"})])],2)]),t._v(" "),o("el-dialog",{attrs:{width:"800px",title:t.editText,visible:t.dialogFormVisible},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[o("el-form",{attrs:{model:t.form,"label-width":"120px",size:"small"}},[o("el-form-item",{attrs:{label:"LOGO"}},[o("yc-upload",{model:{value:t.form.logo,callback:function(e){t.$set(t.form,"logo",e)},expression:"form.logo"}})],1),t._v(" "),o("el-form-item",{attrs:{label:"门店名称"}},[o("el-input",{attrs:{autocomplete:"off"},model:{value:t.form.storeName,callback:function(e){t.$set(t.form,"storeName","string"===typeof e?e.trim():e)},expression:"form.storeName"}})],1),t._v(" "),o("el-form-item",{attrs:{label:"联系电话"}},[o("el-input",{attrs:{autocomplete:"off"},model:{value:t.form.mobile,callback:function(e){t.$set(t.form,"mobile","string"===typeof e?e.trim():e)},expression:"form.mobile"}})],1),t._v(" "),o("el-form-item",{attrs:{label:"小程序二维码"}},[o("el-input",{attrs:{autocomplete:"off"},model:{value:t.form.qrCode,callback:function(e){t.$set(t.form,"qrCode","string"===typeof e?e.trim():e)},expression:"form.qrCode"}})],1),t._v(" "),o("el-form-item",{attrs:{label:"地址"}},[o("el-cascader",{staticStyle:{width:"250px"},attrs:{options:t.regionData,placeholder:"请选择地址"},model:{value:t.form.addressList,callback:function(e){t.$set(t.form,"addressList",e)},expression:"form.addressList"}})],1),t._v(" "),o("el-form-item",{attrs:{label:"地址详情"}},[o("el-input",{attrs:{autocomplete:"off"},model:{value:t.form.detail,callback:function(e){t.$set(t.form,"detail","string"===typeof e?e.trim():e)},expression:"form.detail"}})],1),t._v(" "),o("el-form-item",{attrs:{label:"经度"}},[o("el-input",{attrs:{autocomplete:"off"},model:{value:t.form.lon,callback:function(e){t.$set(t.form,"lon","string"===typeof e?e.trim():e)},expression:"form.lon"}})],1),t._v(" "),o("el-form-item",{attrs:{label:"纬度"}},[o("el-input",{attrs:{autocomplete:"off"},model:{value:t.form.lat,callback:function(e){t.$set(t.form,"lat","string"===typeof e?e.trim():e)},expression:"form.lat"}})],1),t._v(" "),o("el-form-item",{attrs:{label:"工作时间"}},[o("el-input",{attrs:{autocomplete:"off"},model:{value:t.form.workTime,callback:function(e){t.$set(t.form,"workTime","string"===typeof e?e.trim():e)},expression:"form.workTime"}})],1),t._v(" "),o("el-form-item",{attrs:{label:"营业状态"}},[o("el-radio-group",{model:{value:t.form.storeState,callback:function(e){t.$set(t.form,"storeState",e)},expression:"form.storeState"}},[o("el-radio",{attrs:{label:0}},[t._v("营业")]),t._v(" "),o("el-radio",{attrs:{label:1}},[t._v("休息")])],1)],1)],1),t._v(" "),o("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:function(e){t.dialogFormVisible=!1}}},[t._v("取 消")]),t._v(" "),o("el-button",{attrs:{type:"primary"},on:{click:t.doSubmitAdd}},[t._v("确 定")])],1)],1)],1)},s=[],i=o("db72"),r=o("2ef0"),l=o.n(r),n=o("73f5"),c=o("ef6c"),d=o("9466"),u={components:{YcUpload:d["a"]},data:function(){return{regionData:c["regionData"],storeList:[],dialogFormVisible:!1,uploadLoading:!1,form:{storeName:"",lon:"",lat:"",mobile:"",logo:"",workTime:"",storeState:0,addressList:[]}}},computed:{editText:function(){return this.form.id?"编辑门店":"新增门店"}},created:function(){this.load()},methods:{setCurrentStore:function(t){this.$store.dispatch("store/setCurrentStore",t),this.$router.push("/")},load:function(){var t=this;n["a"].queryStore({pageNo:1,pageSize:999}).then((function(e){t.storeList=e.data})).finally((function(){}))},doAdd:function(){this.form={id:"",storeName:"",lon:"",lat:"",mobile:"",logo:"",workTime:"",storeState:0},this.dialogFormVisible=!0},doUpdate:function(t){var e=[l.a.get(c["TextToCode"],"[".concat(t.province,"].code")),l.a.get(c["TextToCode"],"[".concat(t.province,"][").concat(t.city,"].code")),l.a.get(c["TextToCode"],"[".concat(t.province,"][").concat(t.city,"][").concat(t.area,"].code"))];this.form=Object(i["a"])({},t,{addressList:e}),this.dialogFormVisible=!0},doSubmitAdd:function(){var t=this;this.form.province=c["CodeToText"][this.form.addressList[0]],this.form.city=c["CodeToText"][this.form.addressList[1]],this.form.area=c["CodeToText"][this.form.addressList[2]],n["a"].saveOrUpdateStore(this.form).then((function(){t.dialogFormVisible=!1,t.form.id?t.$message.success("修改成功"):t.$message("添加成功"),t.load()})).catch((function(){}))}}},f=u,m=(o("b4b4"),o("2877")),p=Object(m["a"])(f,a,s,!1,null,"0a2721cf",null);e["default"]=p.exports}}]);