(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["store"],{"06cd":function(e,t,a){"use strict";a("36f4")},1708:function(e,t,a){"use strict";a.r(t);a("fb6a");var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("a-spin",{attrs:{spinning:e.isLoading}},[t("a-form",{attrs:{form:e.form},on:{submit:e.handleSubmit}},[t("a-form-item",{attrs:{label:"门店名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["shop_name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['shop_name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}],attrs:{placeholder:"请输入门店名称"}})],1),t("a-form-item",{attrs:{label:"门店Logo",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"建议尺寸: 300*300",required:""}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["logo_image_id",{rules:[{required:!0,message:"请上传门店logo"}]}],expression:"['logo_image_id', { rules: [{ required: true, message: '请上传门店logo' }] }]"}],attrs:{defaultList:e.record.logoImage?[e.record.logoImage]:[]}})],1),t("a-form-item",{attrs:{label:"门店照片",labelCol:e.labelCol,wrapperCol:e.wrapperCol,required:""}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["shop_image_id",{rules:[{required:!0,message:"请上传门店照片"}]}],expression:"['shop_image_id', { rules: [{ required: true, message: '请上传门店照片' }] }]"}],attrs:{multiple:"",defaultList:e.record.shop_image_url||[]}})],1),t("a-form-item",{attrs:{label:"联系人",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["linkman",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['linkman', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}],attrs:{placeholder:"请输入联系人"}})],1),t("a-form-item",{attrs:{label:"联系电话",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["phone",{rules:[{required:!0}]}],expression:"['phone', { rules: [{ required: true }] }]"}],attrs:{placeholder:"请输入联系电话"}})],1),t("a-form-item",{attrs:{label:"营业时间",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"例如:8:30-17:30"}},[t("a-time-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["shop_hours_start",{rules:[{required:!0}]}],expression:"['shop_hours_start', { rules: [{ required: true }] }]"}],attrs:{placeholder:"开始时间",format:"HH:mm",minuteStep:"30",valueFormat:"HH:mm"}}),t("a-time-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["shop_hours_end",{rules:[{required:!0}]}],expression:"['shop_hours_end', { rules: [{ required: true }] }]"}],attrs:{placeholder:"结束时间",format:"HH:mm",minuteStep:"30",valueFormat:"HH:mm"}})],1),t("a-form-item",{attrs:{label:"门店区域",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("SelectRegion",{directives:[{name:"decorator",rawName:"v-decorator",value:["cascader",{rules:[{required:!0,message:"请选择省市区"}]}],expression:"['cascader', { rules: [{ required: true, message: '请选择省市区' }] }]"}],attrs:{placeholder:"请选择省市区"}})],1),t("a-form-item",{attrs:{label:"详细地址",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["address",{rules:[{required:!0}]}],expression:"['address', { rules: [{ required: true }] }]"}],attrs:{placeholder:"请输入详细地址"}})],1),t("a-form-item",{attrs:{label:"门店坐标",labelCol:e.labelCol,wrapperCol:e.wrapperCol,required:""}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["coordinate",{rules:[{required:!0}]}],expression:"['coordinate', { rules: [{ required: true }] }]"}],attrs:{placeholder:"请选择门店坐标"}}),t("Getpoint",{on:{setCoordinate:e.setCoordinate}})],1),t("a-form-item",{attrs:{label:"门店简介",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["summary"],expression:"['summary']"}],attrs:{autoSize:{minRows:4}}})],1),t("a-form-item",{attrs:{label:"自提核销",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["is_check",{initialValue:1,rules:[{required:!0}]}],expression:"['is_check', { initialValue: 1, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:1}},[e._v("支持")]),t("a-radio",{attrs:{value:0}},[e._v("不支持")])],1)],1),t("a-form-item",{attrs:{label:"是否主店",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["is_main",{initialValue:1,rules:[{required:!0}]}],expression:"['is_main', { initialValue: 1, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:0}},[e._v("不是")]),t("a-radio",{attrs:{value:1}},[e._v("是")])],1)],1),e._l(e.form.getFieldValue("historys"),(function(a,r){return t("a-form-item",e._b({key:a.id,attrs:{label:0===r?"门店历史":"",labelCol:e.labelCol,required:""}},"a-form-item",0===r?{wrapperCol:e.wrapperCol}:e.formItemLayoutWithOutLabel,!1),[t("a-date-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["historysTime".concat(a.id),{rules:[{required:!0,message:"请指定日期"}]}],expression:"[`historysTime${k.id}`, { rules: [{ required: true, message: '请指定日期' }] }]"}],staticStyle:{width:"30%","margin-right":"8px"},attrs:{format:"YYYY-MM-DD"}}),t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["historysContenmt".concat(a.id),{rules:[{required:!0}]}],expression:"[`historysContenmt${k.id}`, { rules: [{ required: true }] }]"}],staticStyle:{width:"30%","margin-right":"8px"},attrs:{placeholder:"请输入门店历史"}}),e.form.getFieldValue("historys").length>0?t("a-icon",{staticClass:"dynamic-delete-button",attrs:{type:"minus-circle-o",disabled:1===e.form.getFieldValue("historys").length},on:{click:function(){return e.handleRemoveHistory(r)}}}):e._e()],1)})),t("a-form-item",e._b({},"a-form-item",e.formItemLayoutWithOutLabel,!1),[t("a-button",{staticStyle:{width:"calc(60% + 8px)"},attrs:{type:"dashed"},on:{click:e.handleAddHistory}},[t("a-icon",{attrs:{type:"plus"}}),e._v(" 新增门店历史 ")],1)],1),t("a-form-item",{attrs:{label:"备注",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("div",[e._l(e.tags,(function(a){return[a.length>20?t("a-tooltip",{key:a,attrs:{title:a}},[t("a-tag",{key:a,attrs:{closable:""},on:{close:function(){return e.handleCloseTag(a)}}},[e._v(" "+e._s("".concat(a.slice(0,20),"..."))+" ")])],1):t("a-tag",{key:a,attrs:{closable:""},on:{close:function(){return e.handleCloseTag(a)}}},[e._v(" "+e._s(a)+" ")])]})),e.tagInputVisible?t("a-input",{ref:"input",style:{width:"78px"},attrs:{type:"text",size:"small",value:e.tagInputValue},on:{change:e.handleInputTagChange,blur:e.handleInputTagConfirm}}):t("a-tag",{staticStyle:{background:"#fff",borderstyle:"dashed"},on:{click:e.showTagInput}},[t("a-icon",{attrs:{type:"plus"}}),e._v(" 添加标签 ")],1)],2)]),t("a-form-item",{attrs:{label:"状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:1,rules:[{required:!0}]}],expression:"['status', { initialValue: 1, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:1}},[e._v("启用")]),t("a-radio",{attrs:{value:0}},[e._v("禁用")])],1)],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入排序值"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入排序值' }] }]"}],attrs:{min:0}})],1),t("a-form-item",{staticClass:"mt-20",attrs:{wrapperCol:{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit",loading:e.isBtnLoading}},[e._v("提交")])],1)],2)],1)],1)},i=[],o=a("5530"),n=a("2909"),s=(a("99af"),a("4de4"),a("a15b"),a("d81d"),a("a434"),a("b64b"),a("d3b7"),a("159b"),a("c1df")),l=a.n(s),d=a("88bc"),c=a.n(d),u=a("3858"),m=a("ca00"),p=a("2af9"),f=(a("bf54"),{components:{SelectImage:p["j"],SelectRegion:p["l"],Getpoint:p["b"]},data:function(){return{isLoading:!1,isBtnLoading:!1,labelCol:{span:3},wrapperCol:{span:10},shopId:null,record:{},tags:[],tagInputVisible:!1,tagInputValue:"",formItemLayoutWithOutLabel:{wrapperCol:{span:10,offset:3}}}},beforeCreate:function(){this.form=this.$form.createForm(this),this.form.getFieldDecorator("historys",{initialValue:[],preserve:!0})},created:function(){this.shopId=this.$route.query.shopId,this.getDetail()},methods:{handleCloseTag:function(e){var t=this.tags.filter((function(t){return t!==e}));this.tags=t},showTagInput:function(){this.tagInputVisible=!0,this.$nextTick((function(){this.$refs.input.focus()}))},handleInputTagChange:function(e){this.tagInputValue=e.target.value},handleInputTagConfirm:function(){var e=this.tagInputValue,t=this.tags;e&&-1===t.indexOf(e)&&(t=[].concat(Object(n["a"])(t),[e])),Object.assign(this,{tags:t,tagInputVisible:!1,tagInputValue:""})},getDetail:function(){var e=this,t=this.shopId;this.isLoading=!0,u["d"]({shopId:t}).then((function(t){e.record=t.data.detail,e.setFieldsValue()})).finally((function(){return e.isLoading=!1}))},setFieldsValue:function(){var e=this,t=this.record,a=this.form,r=this.$nextTick,i=[],o=[];t.history&&(t.history=JSON.parse(t.history),t.historys=t.history.map((function(t){return t.id=e.generateRandomString(8),t})),t.historys.forEach((function(a,r){a.time&&(t["historysTime".concat(a.id)]=l()(new Date(a.time))),t["historysContenmt".concat(a.id)]=a.contenmt,i.push("historysTime".concat(a.id)),o.push("historysContenmt".concat(a.id)),e.form.getFieldDecorator("historysTime".concat(a.id),{initialValue:"",preserve:!0}),e.form.getFieldDecorator("historysContenmt".concat(a.id),{initialValue:"",preserve:!0})}))),!Object(m["f"])(a.getFieldsValue())&&r((function(){a.setFieldsValue(c()(t,["shop_name","logo_image_id","linkman","phone","shop_hours","address","summary","cascader","coordinate","sort","is_check","status","is_main","historys","shop_hours_start","shop_hours_end"].concat(i,o)))})),t.remark&&(this.tags=JSON.parse(t.remark))},generateRandomString:function(e){for(var t="",a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=a.length,i=0;i0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)},onSearch:function(){this.handleRefresh(!0)}}},m=u,p=a("2877"),f=Object(p["a"])(m,r,i,!1,null,null,null);t["default"]=f.exports},"1da1":function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));a("d3b7");function r(e,t,a,r,i,o,n){try{var s=e[o](n),l=s.value}catch(e){return void a(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function i(e){return function(){var t=this,a=arguments;return new Promise((function(i,o){var n=e.apply(t,a);function s(e){r(n,i,o,s,l,"next",e)}function l(e){r(n,i,o,s,l,"throw",e)}s(void 0)}))}}},2870:function(e,t,a){},3254:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("content-header",{attrs:{title:"商城列表"}}),t("div",{staticClass:"table-operator"},[t("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:function(t){return e.$refs.createModal.show()}}},[e._v("新增")])],1),t("s-table",{ref:"table",attrs:{size:"default",rowKey:"store_id",columns:e.columns,data:e.loadData,pagination:e.pagination},scopedSlots:e._u([{key:"is_sync_cate",fn:function(a,r){return t("span",{},[e._v(" "+e._s(1==r.is_sync_cate?"是":"否")+" ")])}},{key:"is_provider_data",fn:function(a,r){return t("span",{},[e._v(" "+e._s(1==r.is_provider_data?"是":"否")+" ")])}},{key:"effective_time",fn:function(a,r){return t("span",{},[e._v(e._s(e._f("formatDate")(r.effective_time)))])}},{key:"action",fn:function(a,r){return t("span",{staticClass:"actions"},[t("a",{on:{click:function(t){return e.handleEdit(r)}}},[e._v("编辑")])])}}])}),t("create-form",{ref:"createModal",on:{handleSubmit:e.handleRefresh}}),t("edit-form",{ref:"EditForm",on:{handleSubmit:e.handleRefresh}})],1)},i=[],o=a("8dd4"),n=a("2af9"),s=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:"新增商城",width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"商城版本",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["store_version",{initialValue:0,rules:[{required:!0,message:"请选择商城版本"}]}],expression:"['store_version', { initialValue: 0, rules: [{ required: true, message: '请选择商城版本' }] }]"}]},[t("a-radio",{attrs:{value:0}},[e._v("单商户")])],1)],1),t("a-form-item",{attrs:{label:"商城名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["store_name",{rules:[{required:!0,min:3,message:"请输入至少3个字符"}]}],expression:"['store_name', { rules: [{ required: true, min: 3, message: '请输入至少3个字符' }] }]"}]})],1),t("a-form-item",{attrs:{label:"法人姓名",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["legal_person",{rules:[{required:!0,min:3,message:"请输入法人姓名"}]}],expression:"['legal_person', { rules: [{ required: true, min: 3, message: '请输入法人姓名' }] }]"}]})],1),t("a-form-item",{attrs:{label:"法人手机号",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["legal_person_phone",{rules:[{required:!0,min:3,message:"请输入法人手机号"}]}],expression:"['legal_person_phone', { rules: [{ required: true, min: 3, message: '请输入法人手机号' }] }]"}]})],1),t("a-form-item",{attrs:{label:"法人身份证正面",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["id_card_face_image",{rules:[{required:!0,message:"请上传法人身份证正面"}]}],expression:"['id_card_face_image', { rules: [{ required: true, message: '请上传法人身份证正面' }] }]"}]})],1),t("a-form-item",{attrs:{label:"法人身份证反面",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["id_card_back_image",{rules:[{required:!0,message:"请上传法人身份证反面"}]}],expression:"['id_card_back_image', { rules: [{ required: true, message: '请上传法人身份证反面' }] }]"}]})],1),t("a-form-item",{attrs:{label:"营业执照",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["license_image",{rules:[{required:!0,message:"请上传商营业执照图片"}]}],expression:"['license_image', { rules: [{ required: true, message: '请上传商营业执照图片' }] }]"}]})],1),t("a-form-item",{attrs:{label:"法人手持营业执照",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["legal_person_license_image",{rules:[{required:!0,message:"请上传法人手持营业执照"}]}],expression:"['legal_person_license_image', { rules: [{ required: true, message: '请上传法人手持营业执照' }] }]"}]})],1),t("a-form-item",{attrs:{label:"加价率",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["markup_rate",{rules:[{required:!0,message:"请输入加价率"}]}],expression:"['markup_rate', { rules: [{ required: true, message: '请输入加价率' }] }]"}],attrs:{"addon-after":"%"}}),t("div",{staticClass:"form-item-help"},[t("p",{staticClass:"extra"},[e._v("可输入小数,比如0.5")])])],1),t("a-form-item",{attrs:{label:"商家用户名",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"商家后台登录用户名"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["user_name",{rules:[{required:!0,min:4,message:"请输入至少4个字符"}]}],expression:"['user_name', { rules: [{ required: true, min: 4, message: '请输入至少4个字符' }] }]"}]})],1),t("a-form-item",{attrs:{label:"用户密码",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"商家后台登录密码"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["password",{rules:[{required:!0,min:6,message:"请输入至少6个字符"}]}],expression:"['password', { rules: [{ required: true, min: 6, message: '请输入至少6个字符' }] }]"}],attrs:{type:"password"}})],1),t("a-form-item",{attrs:{label:"确认密码",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["password_confirm",{rules:[{required:!0,message:"请输入确认密码"},{validator:e.compareToFirstPassword}]}],expression:"[\n 'password_confirm',\n { rules: [{ required: true, message: '请输入确认密码' }, { validator: compareToFirstPassword }] },\n ]"}],attrs:{type:"password"}})],1)],1)],1)],1)},l=[],d=(a("d3b7"),{components:{SelectImage:n["j"]},data:function(){return{labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this)}},methods:{show:function(){this.visible=!0,this.form.resetFields()},handleSubmit:function(){var e=this,t=this.form.validateFields;t((function(t,a){!t&&e.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},compareToFirstPassword:function(e,t,a){var r=this.form;return!t||t===r.getFieldValue("password")||new Error("您输入的确认密码不一致")},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,o["j"]({form:e}).then((function(a){t.$message.success(a.message,1.2),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(e){t.confirmLoading=!1}))}}}),c=d,u=(a("5f84"),a("2877")),m=Object(u["a"])(c,s,l,!1,null,"24c59752",null),p=m.exports,f=(a("ca00"),function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:"编辑菜单",width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"法人姓名",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["legal_person",{rules:[{required:!0,min:3,message:"请输入法人姓名"}]}],expression:"['legal_person', { rules: [{ required: true, min: 3, message: '请输入法人姓名' }] }]"}]})],1),t("a-form-item",{attrs:{label:"法人手机号",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["legal_person_phone",{rules:[{required:!0,min:3,message:"请输入法人手机号"}]}],expression:"['legal_person_phone', { rules: [{ required: true, min: 3, message: '请输入法人手机号' }] }]"}]})],1),t("a-form-item",{attrs:{label:"法人身份证正面",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["id_card_face_image",{rules:[{required:!0,message:"请上传法人身份证正面"}]}],expression:"['id_card_face_image', { rules: [{ required: true, message: '请上传法人身份证正面' }] }]"}],attrs:{defaultList:e.record.id_card_face_image_url}})],1),t("a-form-item",{attrs:{label:"法人身份证反面",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["id_card_back_image",{rules:[{required:!0,message:"请上传法人身份证反面"}]}],expression:"['id_card_back_image', { rules: [{ required: true, message: '请上传法人身份证反面' }] }]"}],attrs:{defaultList:e.record.id_card_back_image_url}})],1),t("a-form-item",{attrs:{label:"营业执照",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["license_image",{rules:[{required:!0,message:"请上传商营业执照图片"}]}],expression:"['license_image', { rules: [{ required: true, message: '请上传商营业执照图片' }] }]"}],attrs:{defaultList:e.record.license_image_url}})],1),t("a-form-item",{attrs:{label:"法人手持营业执照",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["legal_person_license_image",{rules:[{required:!0,message:"请上传法人手持营业执照"}]}],expression:"[\n 'legal_person_license_image',\n { rules: [{ required: true, message: '请上传法人手持营业执照' }] },\n ]"}],attrs:{defaultList:e.record.legal_person_license_image_url}})],1),t("a-form-item",{attrs:{label:"加价率",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["markup_rate",{rules:[{required:!0,message:"请输入加价率"}]}],expression:"['markup_rate', { rules: [{ required: true, message: '请输入加价率' }] }]"}],attrs:{"addon-after":"%"}}),t("div",{staticClass:"form-item-help"},[t("p",{staticClass:"extra"},[e._v("可输入小数,比如0.5")])])],1)],1)],1)],1)}),h=[],g=a("c7eb"),v=a("1da1"),b=a("88bc"),_=a.n(b),C=a("c1df"),w=a.n(C),y={components:{SelectImage:n["j"]},props:{},data:function(){return{labelCol:{xs:{span:24},sm:{span:7}},wrapperCol:{xs:{span:24},sm:{span:13}},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),record:{}}},created:function(){},methods:{formatDate:function(e){return e?w()(1e3*e).format("YYYY-MM-DD HH:mm:ss"):"-"},show:function(e){var t=this;return Object(v["a"])(Object(g["a"])().mark((function a(){return Object(g["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:t.visible=!0,e.effective_time=t.formatDate(e.effective_time),t.record=e,e&&(t.record.id_card_face_image_url=[{preview_url:e.id_card_face_image_url}],t.record.id_card_back_image_url=[{preview_url:e.id_card_back_image_url}],t.record.license_image_url=[{preview_url:e.license_image_url}],t.record.legal_person_license_image_url=[{preview_url:e.legal_person_license_image_url}]),t.setFieldsValue();case 5:case"end":return a.stop()}}),a)})))()},setFieldsValue:function(){var e=this;this.$nextTick((function(){e.form.setFieldsValue(_()(e.record,["markup_rate","legal_person","legal_person_phone","id_card_face_image","id_card_back_image","license_image","legal_person_license_image"]))}))},handleSubmit:function(){var e=this,t=this.form.validateFields;this.confirmLoading=!0,t((function(t,a){t?e.confirmLoading=!1:e.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},convertToTimestamp:function(e){return Math.floor(new Date(e).getTime()/1e3)},onFormSubmit:function(e){var t=this;e.effective_time=this.convertToTimestamp(e.effective_time),o["k"]({store_id:this.record["store_id"],form:e}).then((function(a){t.$message.success(a.message),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(e){t.confirmLoading=!1}))}}},x=y,k=(a("659d"),Object(u["a"])(x,f,h,!1,null,"10777b26",null)),q=k.exports,S={components:{ContentHeader:n["a"],STable:n["d"],CreateForm:p,EditForm:q},data:function(){return{queryParam:{},columns:[{title:"商城ID",dataIndex:"store_id"},{title:"商城名称",dataIndex:"store_name"},{title:"加价率",dataIndex:"markup_rate"},{title:"商城版本",dataIndex:"store_version"},{title:"商城到期时间",dataIndex:"effective_time",scopedSlots:{customRender:"effective_time"}},{title:"添加时间",dataIndex:"create_time"},{title:"操作",dataIndex:"action",width:"400px",scopedSlots:{customRender:"action"}}],loadData:function(e){return o["g"]().then((function(e){return e.data.list}))},open:!1,checkedList:[],checkList:[],storeId:null}},filters:{formatDate:function(e){return e?w()(1e3*e).format("YYYY-MM-DD HH:mm:ss"):"-"}},created:function(){},methods:{handleEdit:function(e){this.$refs.EditForm.show(e)},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)}}},L=S,F=Object(u["a"])(L,r,i,!1,null,null,null);t["default"]=F.exports},"36f4":function(e,t,a){},"3d2d":function(e,t,a){},"4a3c":function(e,t,a){"use strict";a.r(t);a("ac1f"),a("841c");var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-row",[t("a-col",{attrs:{span:5}},[t("a-button",{directives:[{name:"action",rawName:"v-action:add",arg:"add"}],attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("新增")])],1),t("a-col",{staticClass:"flex flex-x-end",attrs:{span:11,offset:8}},[t("a-select",{staticStyle:{width:"220px","margin-right":"20px"},attrs:{placeholder:"所属门店"},model:{value:e.queryParam.shop_id,callback:function(t){e.$set(e.queryParam,"shop_id",t)},expression:"queryParam.shop_id"}},[t("a-select-option",{attrs:{value:0}},[e._v("全部")]),e._l(e.shopList,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.shop_id}},[e._v(e._s(a.shop_name))])}))],2),t("a-input-search",{staticStyle:{"max-width":"300px","min-width":"150px"},attrs:{placeholder:"请输入店员姓名/手机号"},on:{search:e.onSearch},model:{value:e.queryParam.search,callback:function(t){e.$set(e.queryParam,"search",t)},expression:"queryParam.search"}})],1)],1)],1),t("s-table",{ref:"table",attrs:{rowKey:"clerk_id",loading:e.isLoading,columns:e.columns,data:e.loadData,pagination:e.pagination},scopedSlots:e._u([{key:"user",fn:function(e){return t("span",{},[t("UserItem",{attrs:{user:e}})],1)}},{key:"shop",fn:function(a){return t("span",{},[t("a-tag",[e._v(e._s(a.shop_name))])],1)}},{key:"status",fn:function(a){return t("span",{},[t("a-tag",{attrs:{color:a?"green":""}},[e._v(e._s(a?"启用":"禁用"))])],1)}},{key:"action",fn:function(a,r){return t("span",{},[t("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],staticStyle:{"margin-right":"8px"},on:{click:function(t){return e.handleEdit(r)}}},[e._v("编辑")]),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(t){return e.handleDelete(r)}}},[e._v("删除")])])}}])}),t("AddForm",{ref:"AddForm",attrs:{shopList:e.shopList},on:{handleSubmit:e.handleRefresh}}),t("EditForm",{ref:"EditForm",attrs:{shopList:e.shopList},on:{handleSubmit:e.handleRefresh}})],1)},i=[],o=a("5530"),n=(a("d3b7"),a("6dd2")),s=a("3858"),l=a("ab09"),d=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"所属门店",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"请选择店员所属的门店,用于核销订单"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["shop_id",{rules:[{required:!0,message:"请选择所属门店"}]}],expression:"['shop_id', { rules: [{ required: true, message: '请选择所属门店'}] }]"}]},e._l(e.shopList,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.shop_id}},[e._v(e._s(a.shop_name))])})),1)],1),t("a-form-item",{attrs:{label:"会员ID",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"请输入店员的会员ID, 确认后不可更改"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["user_id",{rules:[{required:!0,message:"请输入店员的会员ID"}]}],expression:"['user_id', { rules: [{ required: true, message: '请输入店员的会员ID' }] }]"}],attrs:{min:1}})],1),t("a-form-item",{attrs:{label:"店员姓名",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["real_name",{rules:[{required:!0,message:"请输入店员姓名"}]}],expression:"['real_name', { rules: [{ required: true, message: '请输入店员姓名' }] }]"}]})],1),t("a-form-item",{attrs:{label:"手机号",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["mobile",{rules:[{required:!0,message:"请输入手机号"}]}],expression:"['mobile', { rules: [{ required: true, message: '请输入手机号' }] }]"}]})],1),t("a-form-item",{attrs:{label:"状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:1,rules:[{required:!0}]}],expression:"['status', { initialValue: 1, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:1}},[e._v("启用")]),t("a-radio",{attrs:{value:0}},[e._v("禁用")])],1)],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入排序值"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入排序值' }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},c=[],u={components:{},props:{shopList:{type:Array,required:!0}},data:function(){return{title:"新增店员",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this)}},methods:{add:function(){this.visible=!0},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){!e&&t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,n["a"]({form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(){return t.confirmLoading=!1}))}}},m=u,p=a("2877"),f=Object(p["a"])(m,d,c,!1,null,null,null),h=f.exports,g=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"所属门店",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"请选择店员所属的门店,用于核销订单"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["shop_id",{rules:[{required:!0,message:"请选择所属门店"}]}],expression:"['shop_id', { rules: [{ required: true, message: '请选择所属门店'}] }]"}]},e._l(e.shopList,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.shop_id}},[e._v(e._s(a.shop_name))])})),1)],1),t("a-form-item",{attrs:{label:"店员姓名",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["real_name",{rules:[{required:!0,message:"请输入店员姓名"}]}],expression:"['real_name', { rules: [{ required: true, message: '请输入店员姓名' }] }]"}]})],1),t("a-form-item",{attrs:{label:"手机号",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["mobile",{rules:[{required:!0,message:"请输入手机号"}]}],expression:"['mobile', { rules: [{ required: true, message: '请输入手机号' }] }]"}]})],1),t("a-form-item",{attrs:{label:"状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:1,rules:[{required:!0}]}],expression:"['status', { initialValue: 1, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:1}},[e._v("启用")]),t("a-radio",{attrs:{value:0}},[e._v("禁用")])],1)],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入排序值"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入排序值' }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},v=[],b=a("88bc"),_=a.n(b),C={components:{},props:{shopList:{type:Array,required:!0}},data:function(){return{title:"编辑店员",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),record:{}}},methods:{edit:function(e){this.visible=!0,this.record=e,this.setFieldsValue()},setFieldsValue:function(){var e=this.record,t=this.form.setFieldsValue;this.$nextTick((function(){t(_()(e,["shop_id","real_name","mobile","status"]))}))},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){!e&&t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,n["d"]({clerkId:this.record.clerk_id,form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(){return t.confirmLoading=!1}))}}},w=C,y=Object(p["a"])(w,g,v,!1,null,null,null),x=y.exports,k={name:"Index",components:{STable:l["b"],UserItem:l["d"],AddForm:h,EditForm:x},data:function(){var e=this;return{queryParam:{},isLoading:!1,columns:[{title:"店员ID",dataIndex:"clerk_id"},{title:"会员信息",dataIndex:"user",scopedSlots:{customRender:"user"}},{title:"所属门店",dataIndex:"shop",scopedSlots:{customRender:"shop"}},{title:"店员姓名",dataIndex:"real_name"},{title:"手机号",dataIndex:"mobile"},{title:"状态",dataIndex:"status",scopedSlots:{customRender:"status"}},{title:"添加时间",dataIndex:"create_time"},{title:"操作",dataIndex:"action",width:"180px",scopedSlots:{customRender:"action"}}],loadData:function(t){return n["e"](Object(o["a"])(Object(o["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))},shopList:[]}},created:function(){this.getShopList()},methods:{getShopList:function(){var e=this;s["b"]().then((function(t){e.shopList=t.data.list}))},handleAdd:function(){this.$refs.AddForm.add()},handleEdit:function(e){this.$refs.EditForm.edit(e)},handleDelete:function(e){var t=this,a=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return n["c"]({clerkId:e.clerk_id}).then((function(e){t.$message.success(e.message,1.5),t.handleRefresh()})).finally((function(e){return a.destroy()}))}})},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)},onSearch:function(){this.handleRefresh(!0)}}},q=k,S=Object(p["a"])(q,r,i,!1,null,null,null);t["default"]=S.exports},"4d55":function(e,t,a){"use strict";a.d(t,"e",(function(){return o})),a.d(t,"b",(function(){return n})),a.d(t,"a",(function(){return s})),a.d(t,"d",(function(){return l})),a.d(t,"c",(function(){return d}));var r=a("b775"),i={list:"/store.address/list",all:"/store.address/all",add:"/store.address/add",edit:"/store.address/edit",delete:"/store.address/delete"};function o(e){return Object(r["b"])({url:i.list,method:"get",params:e})}function n(e){return Object(r["b"])({url:i.all,method:"get",params:e})}function s(e){return Object(r["b"])({url:i.add,method:"post",data:e})}function l(e){return Object(r["b"])({url:i.edit,method:"post",data:e})}function d(e){return Object(r["b"])({url:i.delete,method:"post",data:e})}},"542b":function(e,t,a){},"5f84":function(e,t,a){"use strict";a("542b")},"659d":function(e,t,a){"use strict";a("2870")},"6dd2":function(e,t,a){"use strict";a.d(t,"e",(function(){return o})),a.d(t,"b",(function(){return n})),a.d(t,"a",(function(){return s})),a.d(t,"d",(function(){return l})),a.d(t,"c",(function(){return d}));var r=a("b775"),i={list:"/shop.clerk/list",all:"/shop.clerk/all",add:"/shop.clerk/add",edit:"/shop.clerk/edit",delete:"/shop.clerk/delete"};function o(e){return Object(r["b"])({url:i.list,method:"get",params:e})}function n(e){return Object(r["b"])({url:i.all,method:"get",params:e})}function s(e){return Object(r["b"])({url:i.add,method:"post",data:e})}function l(e){return Object(r["b"])({url:i.edit,method:"post",data:e})}function d(e){return Object(r["b"])({url:i.delete,method:"post",data:e})}},"6f08":function(e,t,a){"use strict";a("f8b2")},"976c":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("a-spin",{attrs:{spinning:e.isLoading}},[t("a-form",{attrs:{form:e.form},on:{submit:e.handleSubmit}},[t("a-form-item",{attrs:{label:"商城名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["store_name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['store_name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),t("a-form-item",{attrs:{label:"联系方式",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["phone",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['phone', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),t("a-form-item",{attrs:{label:"商城简介",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["describe"],expression:"['describe']"}]})],1),t("a-form-item",{attrs:{label:"商城Logo",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"建议尺寸: 175*25,最大宽度175,最小高度25"}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["logo_image_id"],expression:"['logo_image_id']"}],attrs:{defaultList:e.record.logoImage?[e.record.logoImage]:[]}})],1),t("a-form-item",{attrs:{label:"登录Logo",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"建议尺寸: 132*132,请上传正方形图片"}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["login_img_id"],expression:"['login_img_id']"}],attrs:{defaultList:e.record.loginImg?[e.record.loginImg]:[]}})],1),t("a-form-item",{attrs:{label:"新品首发",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"建议尺寸: 375*326"}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["new_product_img_id"],expression:"['new_product_img_id']"}],attrs:{multiple:"",defaultList:e.record.newProductImg?e.record.newProductImg:[]}})],1),t("a-form-item",{attrs:{label:"大牌正品",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"建议尺寸: 375*200"}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["big_brand_img_id"],expression:"['big_brand_img_id']"}],attrs:{defaultList:e.record.bigBrandImg?e.record.bigBrandImg:[]}})],1),t("a-form-item",{attrs:{label:"秒杀背景图",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"建议尺寸: 375*275"}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["flash_sale_img_id"],expression:"['flash_sale_img_id']"}],attrs:{multiple:"",defaultList:e.record.flashSaleImg?e.record.flashSaleImg:[]}})],1),t("a-form-item",{attrs:{wrapperCol:{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit"}},[e._v("提交")])],1)],1)],1)],1)},i=[],o=a("5530"),n=(a("a15b"),a("d3b7"),a("88bc")),s=a.n(n),l=a("33ca"),d=a("2af9"),c={components:{SelectImage:d["j"]},data:function(){return{labelCol:{span:4},wrapperCol:{span:10},isLoading:!1,form:this.$form.createForm(this),record:{}}},created:function(){this.getDetail()},methods:{getDetail:function(){var e=this;this.isLoading=!0,l["a"]().then((function(t){e.record=t.data.storeInfo,e.setFieldsValue()})).finally((function(){return e.isLoading=!1}))},setFieldsValue:function(){var e=this.record,t=this.form.setFieldsValue;this.$nextTick((function(){t(s()(e,["store_name","describe","logo_image_id","phone","login_img_id"]))}))},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){!e&&t.onFormSubmit(a)}))},onFormSubmit:function(e){var t=this;this.isLoading=!0;var a={new_product_img_id:e.new_product_img_id&&(Array.isArray(e.new_product_img_id)?e.new_product_img_id.join(","):e.new_product_img_id)||"",big_brand_img_id:e.big_brand_img_id&&(Array.isArray(e.big_brand_img_id)?e.big_brand_img_id.join(","):e.big_brand_img_id)||"",new_people_order_img_id:e.new_people_order_img_id&&(Array.isArray(e.new_people_order_img_id)?e.new_people_order_img_id.join(","):e.new_people_order_img_id)||"",flash_sale_img_id:e.flash_sale_img_id&&(Array.isArray(e.flash_sale_img_id)?e.flash_sale_img_id.join(","):e.flash_sale_img_id)||"",ranking_img_id:e.ranking_img_id&&(Array.isArray(e.ranking_img_id)?e.ranking_img_id.join(","):e.ranking_img_id)||""};l["b"]({form:Object(o["a"])(Object(o["a"])({},e),a)}).then((function(e){return t.$message.success(e.message,1.5)})).finally((function(){return t.isLoading=!1}))}}},u=c,m=(a("06cd"),a("2877")),p=Object(m["a"])(u,r,i,!1,null,"76d31873",null);t["default"]=p.exports},"9ecf":function(e,t,a){"use strict";a("3d2d")},a61f:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v("主题风格")]),t("a-spin",{attrs:{spinning:e.isLoading}},[t("div",{staticClass:"container"},[t("div",{staticClass:"form-box"},[t("a-form-model",{ref:"myForm",staticClass:"my-form",attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-form-model-item",{attrs:{label:"主题色系"}},[t("a-radio-group",{model:{value:e.record.mode,callback:function(t){e.$set(e.record,"mode",t)},expression:"record.mode"}},[t("a-radio",{attrs:{value:10}},[e._v("系统推荐")]),t("a-radio",{attrs:{value:20}},[e._v("自定义")])],1)],1),10==e.record.mode?t("a-form-model-item",{attrs:{label:"选择色系"}},[t("div",{staticClass:"color-radio-group"},e._l(e.themeTemplate,(function(a,r){return t("div",{key:r,staticClass:"color-radio-item",style:{backgroundColor:a.mainBg},on:{click:function(t){return e.handleColorRadio(r,a)}}},[e.record.themeTemplateIdx===r?t("a-icon",{attrs:{type:"check"}}):e._e()],1)})),0)]):e._e(),20==e.record.mode?t("div",[t("a-form-model-item",{attrs:{label:"按钮颜色渐变"}},[t("a-radio-group",{on:{change:function(t){return e.onGradualChangeData()}},model:{value:e.record.data.gradualChange,callback:function(t){e.$set(e.record.data,"gradualChange",t)},expression:"record.data.gradualChange"}},[t("a-radio",{attrs:{value:1}},[e._v("开启")]),t("a-radio",{attrs:{value:0}},[e._v("关闭")])],1)],1),t("a-form-model-item",{attrs:{label:"主背景"}},[t("div",{staticClass:"color-picker"},[t("colorPicker",{attrs:{defaultColor:"#fff"},model:{value:e.record.data.mainBg,callback:function(t){e.$set(e.record.data,"mainBg",t)},expression:"record.data.mainBg"}}),e.record.data.gradualChange?t("colorPicker",{attrs:{defaultColor:"#fff"},model:{value:e.record.data.mainBg2,callback:function(t){e.$set(e.record.data,"mainBg2",t)},expression:"record.data.mainBg2"}}):e._e()],1)]),t("a-form-model-item",{attrs:{label:"主文字"}},[t("div",{staticClass:"color-picker"},[t("colorPicker",{attrs:{defaultColor:"#fff"},model:{value:e.record.data.mainText,callback:function(t){e.$set(e.record.data,"mainText",t)},expression:"record.data.mainText"}})],1)]),t("a-form-model-item",{attrs:{label:"副背景"}},[t("div",{staticClass:"color-picker"},[t("colorPicker",{attrs:{defaultColor:"#fff"},model:{value:e.record.data.viceBg,callback:function(t){e.$set(e.record.data,"viceBg",t)},expression:"record.data.viceBg"}}),e.record.data.gradualChange?t("colorPicker",{attrs:{defaultColor:"#fff"},model:{value:e.record.data.viceBg2,callback:function(t){e.$set(e.record.data,"viceBg2",t)},expression:"record.data.viceBg2"}}):e._e()],1)]),t("a-form-model-item",{attrs:{label:"副文字"}},[t("div",{staticClass:"color-picker"},[t("colorPicker",{attrs:{defaultColor:"#fff"},model:{value:e.record.data.viceText,callback:function(t){e.$set(e.record.data,"viceText",t)},expression:"record.data.viceText"}})],1)])],1):e._e(),t("a-form-model-item",{attrs:{wrapperCol:{offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary",loading:e.confirmLoading},on:{click:e.handleSubmit}},[e._v("保存")])],1)],1)],1),t("div",{staticClass:"preview",style:e.appThemeStyle},[t("div",{staticClass:"example-item"},[t("div",{staticClass:"example-item-scale"},[t("img",{staticClass:"bg-image",attrs:{src:"static/img/theme/10.png"}}),t("div",{staticClass:"content"},[t("span",{staticClass:"goods-price"},[t("span",{staticClass:"unit"},[e._v("¥")]),t("span",{staticClass:"value"},[e._v("4969.00")])]),t("div",{staticClass:"btn-wrapper"},[t("div",{staticClass:"btn-item btn-item-deputy"},[t("span",[e._v("加入购物车")])]),t("div",{staticClass:"btn-item btn-item-main"},[t("span",[e._v("立即购买")])])])])])]),t("div",{staticClass:"example-item"},[t("div",{staticClass:"example-item-scale"},[t("img",{staticClass:"bg-image",attrs:{src:"static/img/theme/20.png"}}),t("div",{staticClass:"content"},[t("span",{staticClass:"goods-price"},[t("span",{staticClass:"unit"},[e._v("¥")]),t("span",{staticClass:"value"},[e._v("4969.00")])]),t("div",{staticClass:"item-content"},[t("span",[e._v("墨影灰")])]),t("div",{staticClass:"btn-wrapper"},[t("div",{staticClass:"btn-item btn-item-main"},[t("span",[e._v("立即购买")])])])])])]),t("div",{staticClass:"example-item"},[t("div",{staticClass:"example-item-scale"},[t("img",{staticClass:"bg-image",attrs:{src:"static/img/theme/30.png"}}),t("div",{staticClass:"content"},[t("div",{staticClass:"swiper-tab"},[t("div",{staticClass:"swiper-tab-item"},[e._v("快递配送")])]),t("div",{staticClass:"flow-cont1"},[e._v("¥4969.00")]),t("div",{staticClass:"flow-cont2"},[e._v("¥4969.00")]),t("div",{staticClass:"flow-cont3"},[e._v("+¥0.00")]),t("div",{staticClass:"flow-cont4"},[e._v("¥4969.00")]),t("div",{staticClass:"flow-btn"},[e._v("提交订单")])])])])])])])],1)},i=[],o=(a("d3b7"),a("ac1f"),a("5319"),a("ddb0"),a("2b0e")),n=a("a9f5"),s=a.n(n),l=a("2ef0"),d=a("f585"),c=a("35c4"),u=(a("b0c0"),function(){var e=this,t=e._self._c;return t("a-spin",{attrs:{spinning:e.isLoading}},[t("a-select",{on:{change:e.onChange},model:{value:e.selectedId,callback:function(t){e.selectedId=t},expression:"selectedId"}},[t("a-select-option",{attrs:{value:-1}},[e._v("全部")]),e._l(e.categoryList,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.category_id}},[e._v(e._s(a.name))])}))],2)],1)}),m=[],p=a("4d91"),f=a("89a2"),h={name:"SArticleCate",components:{},model:{prop:"value",event:"change"},props:{value:p["a"].integer.def(-1)},data:function(){return{isLoading:!1,categoryList:[],selectedId:-1}},watch:{value:{immediate:!0,handler:function(e){this.selectedId=e}}},created:function(){this.getCategoryList()},methods:{getCategoryList:function(){var e=this;this.isLoading=!0,f["d"]().then((function(t){e.categoryList=t.data.list})).finally((function(){return e.isLoading=!1}))},onChange:function(e){this.$emit("change",e)}}},g=h,v=(a("9ecf"),a("2877")),b=Object(v["a"])(g,u,m,!1,null,"ca8435fc",null),_=b.exports;o["a"].use(s.a);var C={mode:10,themeTemplateIdx:-1,data:{gradualChange:0,mainBg:"#fa2209",mainBg2:"#ff6335",mainText:"#ffffff",viceBg:"#ffb100",viceBg2:"#ffb900",viceText:"#ffffff"}},w=[{mainBg:"#fa2209",mainBg2:"#ff6335",mainText:"#ffffff",viceBg:"#ffb100",viceBg2:"#ffb900",viceText:"#ffffff",gradualChange:1},{mainBg:"#ff547b",mainBg2:"#ff547b",mainText:"#ffffff",viceBg:"#FFE6E8",viceBg2:"#FFE6E8",viceText:"#ff547b",gradualChange:0},{mainBg:"#63be72",mainBg2:"#63be72",mainText:"#ffffff",viceBg:"#E1F4E3",viceBg2:"#E1F4E3",viceText:"#50be58",gradualChange:0},{mainBg:"#c3a769",mainBg2:"#c3a769",mainText:"#ffffff",viceBg:"#F3EEE1",viceBg2:"#F3EEE1",viceText:"#C3A769",gradualChange:0},{mainBg:"#2f2f34",mainBg2:"#2f2f34",mainText:"#ffffff",viceBg:"#EBECF2",viceBg2:"#EBECF2",viceText:"#2F2F34",gradualChange:0},{mainBg:"#884cff",mainBg2:"#884cff",mainText:"#ffffff",viceBg:"#EFE6FF",viceBg2:"#EFE6FF",viceText:"#884cff",gradualChange:0},{mainBg:"#65c4aa",mainBg2:"#65c4aa",mainText:"#ffffff",viceBg:"#D9F6EF",viceBg2:"#D9F6EF",viceText:"#65c4aa",gradualChange:0},{mainBg:"#FCC600",mainBg2:"#FCC600",mainText:"#ffffff",viceBg:"#1D262E",viceBg2:"#1D262E",viceText:"#ffffff",gradualChange:0},{mainBg:"#4a90e2",mainBg2:"#4a90e2",mainText:"#ffffff",viceBg:"#D6E9FC",viceBg2:"#D6E9FC",viceText:"#0080FF",gradualChange:0}],y=function(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()},x={components:{ColorRadio:_},data:function(){return{key:c["a"].APP_THEME.value,labelCol:{span:2},wrapperCol:{span:22},isLoading:!1,confirmLoading:!1,themeTemplate:w,record:Object(l["cloneDeep"])(C)}},computed:{appThemeStyle:function(){var e=this.record.data,t={};for(var a in e){var r=y(a);t["--".concat(r)]=e[a]}return t}},created:function(){this.getDetail()},methods:{getDetail:function(){var e=this;this.isLoading=!0,d["a"](this.key).then((function(t){return e.record=t.data.values})).finally((function(){return e.isLoading=!1}))},handleColorRadio:function(e,t){this.record.themeTemplateIdx=e,this.record.data=Object(l["cloneDeep"])(t)},onGradualChangeData:function(){this.record.data.gradualChange||(this.record.data.mainBg2=this.record.data.mainBg,this.record.data.viceBg2=this.record.data.viceBg)},handleSubmit:function(e){var t=this;this.confirmLoading=!0,d["b"](this.key,{form:this.record}).then((function(e){return t.$message.success(e.message,1.5)})).finally((function(e){return t.confirmLoading=!1}))}}},k=x,q=(a("bf42"),Object(v["a"])(k,r,i,!1,null,"5a8a70b4",null));t["default"]=q.exports},aad4:function(e,t,a){},bf42:function(e,t,a){"use strict";a("aad4")},bf54:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var r=a("b775"),i={log:"/market.points/log"};function o(e){return Object(r["b"])({url:i.log,method:"get",params:e})}},c0e3:function(e,t,a){"use strict";a.r(t);a("fb6a");var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("a-spin",{attrs:{spinning:e.isLoading}},[t("a-form",{attrs:{form:e.form},on:{submit:e.handleSubmit}},[t("a-form-item",{attrs:{label:"门店名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["shop_name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['shop_name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}],attrs:{placeholder:"请输入门店名称"}})],1),t("a-form-item",{attrs:{label:"门店Logo",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"建议尺寸: 300*300",required:""}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["logo_image_id",{rules:[{required:!0,message:"请上传门店logo"}]}],expression:"['logo_image_id', { rules: [{ required: true, message: '请上传门店logo' }] }]"}]})],1),t("a-form-item",{attrs:{label:"门店照片",labelCol:e.labelCol,wrapperCol:e.wrapperCol,required:""}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["shop_image_id",{rules:[{required:!0,message:"请上传门店照片"}]}],expression:"['shop_image_id', { rules: [{ required: true, message: '请上传门店照片' }] }]"}],attrs:{multiple:""}})],1),t("a-form-item",{attrs:{label:"联系人",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["linkman",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['linkman', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}],attrs:{placeholder:"请输入联系人"}})],1),t("a-form-item",{attrs:{label:"联系电话",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["phone",{rules:[{required:!0}]}],expression:"['phone', { rules: [{ required: true }] }]"}],attrs:{placeholder:"请输入联系电话"}})],1),t("a-form-item",{attrs:{label:"营业时间",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"例如:8:30-17:30"}},[t("a-time-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["shop_hours_start",{rules:[{required:!0}]}],expression:"['shop_hours_start', { rules: [{ required: true }] }]"}],attrs:{placeholder:"开始时间",format:"HH:mm",minuteStep:"30",valueFormat:"HH:mm"}}),t("a-time-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["shop_hours_end",{rules:[{required:!0}]}],expression:"['shop_hours_end', { rules: [{ required: true }] }]"}],attrs:{placeholder:"结束时间",format:"HH:mm",minuteStep:"30",valueFormat:"HH:mm"}})],1),t("a-form-item",{attrs:{label:"门店区域",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("SelectRegion",{directives:[{name:"decorator",rawName:"v-decorator",value:["cascader",{rules:[{required:!0,message:"请选择省市区"}]}],expression:"['cascader', { rules: [{ required: true, message: '请选择省市区' }] }]"}],attrs:{placeholder:"请选择省市区"}})],1),t("a-form-item",{attrs:{label:"详细地址",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["address",{rules:[{required:!0}]}],expression:"['address', { rules: [{ required: true }] }]"}],attrs:{placeholder:"请输入详细地址"}})],1),t("a-form-item",{attrs:{label:"门店坐标",labelCol:e.labelCol,wrapperCol:e.wrapperCol,required:""}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["coordinate",{rules:[{required:!0}]}],expression:"['coordinate', { rules: [{ required: true }] }]"}],attrs:{placeholder:"请选择门店坐标"}}),t("Getpoint",{on:{setCoordinate:e.setCoordinate}})],1),t("a-form-item",{attrs:{label:"门店简介",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["summary"],expression:"['summary']"}],attrs:{autoSize:{minRows:4}}})],1),t("a-form-item",{attrs:{label:"自提核销",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["is_check",{initialValue:1,rules:[{required:!0}]}],expression:"['is_check', { initialValue: 1, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:1}},[e._v("支持")]),t("a-radio",{attrs:{value:0}},[e._v("不支持")])],1)],1),t("a-form-item",{attrs:{label:"是否主店",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["is_main",{initialValue:0,rules:[{required:!0}]}],expression:"['is_main', { initialValue: 0, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:0}},[e._v("不是")]),t("a-radio",{attrs:{value:1}},[e._v("是")])],1)],1),e._l(e.form.getFieldValue("historys"),(function(a,r){return t("a-form-item",e._b({key:a.id,attrs:{label:0===r?"门店历史":"",labelCol:e.labelCol,required:""}},"a-form-item",0===r?{wrapperCol:e.wrapperCol}:e.formItemLayoutWithOutLabel,!1),[t("a-date-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["historysTime".concat(a.id),{rules:[{required:!0,message:"请指定日期"}]}],expression:"[`historysTime${k.id}`, { rules: [{ required: true, message: '请指定日期' }] }]"}],staticStyle:{width:"30%","margin-right":"8px"},attrs:{format:"YYYY-MM-DD"}}),t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["historysContenmt".concat(a.id),{rules:[{required:!0}]}],expression:"[`historysContenmt${k.id}`, { rules: [{ required: true }] }]"}],staticStyle:{width:"30%","margin-right":"8px"},attrs:{placeholder:"请输入门店历史"}}),e.form.getFieldValue("historys").length>0?t("a-icon",{staticClass:"dynamic-delete-button",attrs:{type:"minus-circle-o",disabled:1===e.form.getFieldValue("historys").length},on:{click:function(){return e.handleRemoveHistory(r)}}}):e._e()],1)})),t("a-form-item",e._b({},"a-form-item",e.formItemLayoutWithOutLabel,!1),[t("a-button",{staticStyle:{width:"calc(60% + 8px)"},attrs:{type:"dashed"},on:{click:e.handleAddHistory}},[t("a-icon",{attrs:{type:"plus"}}),e._v(" 新增门店历史 ")],1)],1),t("a-form-item",{attrs:{label:"备注",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("div",[e._l(e.tags,(function(a){return[a.length>20?t("a-tooltip",{key:a,attrs:{title:a}},[t("a-tag",{key:a,attrs:{closable:""},on:{close:function(){return e.handleCloseTag(a)}}},[e._v(" "+e._s("".concat(a.slice(0,20),"..."))+" ")])],1):t("a-tag",{key:a,attrs:{closable:""},on:{close:function(){return e.handleCloseTag(a)}}},[e._v(" "+e._s(a)+" ")])]})),e.tagInputVisible?t("a-input",{ref:"input",style:{width:"78px"},attrs:{type:"text",size:"small",value:e.tagInputValue},on:{change:e.handleInputTagChange,blur:e.handleInputTagConfirm}}):t("a-tag",{staticStyle:{background:"#fff",borderstyle:"dashed"},on:{click:e.showTagInput}},[t("a-icon",{attrs:{type:"plus"}}),e._v(" 添加标签 ")],1)],2)]),t("a-form-item",{attrs:{label:"状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:1,rules:[{required:!0}]}],expression:"['status', { initialValue: 1, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:1}},[e._v("启用")]),t("a-radio",{attrs:{value:0}},[e._v("禁用")])],1)],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入排序值"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入排序值' }] }]"}],attrs:{min:0}})],1),t("a-form-item",{staticClass:"mt-20",attrs:{wrapperCol:{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit",loading:e.isBtnLoading}},[e._v("提交")])],1)],2)],1)],1)},i=[],o=a("5530"),n=a("2909"),s=(a("99af"),a("4de4"),a("a15b"),a("d81d"),a("d3b7"),a("c1df"),a("3858")),l=a("2af9"),d={components:{SelectImage:l["j"],SelectRegion:l["l"],Getpoint:l["b"]},data:function(){return{isLoading:!1,isBtnLoading:!1,labelCol:{span:3},wrapperCol:{span:10},tags:[],tagInputVisible:!1,tagInputValue:"",formItemLayoutWithOutLabel:{wrapperCol:{span:10,offset:3}}}},beforeCreate:function(){this.form=this.$form.createForm(this),this.form.getFieldDecorator("historys",{initialValue:[],preserve:!0})},created:function(){},methods:{handleCloseTag:function(e){var t=this.tags.filter((function(t){return t!==e}));this.tags=t},showTagInput:function(){this.tagInputVisible=!0,this.$nextTick((function(){this.$refs.input.focus()}))},handleInputTagChange:function(e){this.tagInputValue=e.target.value},handleInputTagConfirm:function(){var e=this.tagInputValue,t=this.tags;e&&-1===t.indexOf(e)&&(t=[].concat(Object(n["a"])(t),[e])),Object.assign(this,{tags:t,tagInputVisible:!1,tagInputValue:""})},generateRandomString:function(e){for(var t="",a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=a.length,i=0;i0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)}}},P=R,A=(a("6f08"),Object(f["a"])(P,v,b,!1,null,null,null)),H=A.exports,Y={name:"Index",components:{STable:s["d"],UpdateParking:g,CommentList:H},data:function(){var e=this;return{queryParam:{},isLoading:!1,columns:[{title:"门店ID",dataIndex:"shop_id"},{title:"门店logo",dataIndex:"logo_url",scopedSlots:{customRender:"logo_url"}},{title:"门店名称",dataIndex:"shop_name"},{title:"营业时间",dataIndex:"shop_hours"},{title:"详细地址",dataIndex:"full_address",scopedSlots:{customRender:"full_address"}},{title:"自提核销",dataIndex:"is_check",scopedSlots:{customRender:"is_check"}},{title:"状态",dataIndex:"status",scopedSlots:{customRender:"status"}},{title:"排序",dataIndex:"sort"},{title:"添加时间",dataIndex:"create_time"},{title:"操作",dataIndex:"action",width:"180px",scopedSlots:{customRender:"action"}}],loadData:function(t){return n["f"](Object(o["a"])(Object(o["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))}}},created:function(){},methods:{handleAdd:function(){this.$router.push("./create")},handleEdit:function(e){this.$router.push({path:"./update",query:{shopId:e.shop_id}})},handleDelete:function(e){var t=this,a=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return n["c"]({shopId:e.shop_id}).then((function(e){t.$message.success(e.message,1.5),t.handleRefresh()})).finally((function(e){return a.destroy()}))}})},handleParking:function(e){this.$refs.UpdateParking.edit(e)},handleComment:function(e){this.$refs.CommentList.visibleComment(e.shop_id)},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)},onSearch:function(){this.handleRefresh(!0)}}},M=Y,G=Object(f["a"])(M,r,i,!1,null,null,null);t["default"]=G.exports},c7eb:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));a("a4d3"),a("e01a"),a("b636"),a("d28b"),a("944a"),a("fb6a"),a("b0c0"),a("0c47"),a("23dc"),a("3410"),a("131a"),a("d3b7"),a("3ca3"),a("159b"),a("ddb0");var r=a("53ca");function i(){ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ i=function(){return t};var e,t={},a=Object.prototype,o=a.hasOwnProperty,n=Object.defineProperty||function(e,t,a){e[t]=a.value},s="function"==typeof Symbol?Symbol:{},l=s.iterator||"@@iterator",d=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function u(e,t,a){return Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,a){return e[t]=a}}function m(e,t,a,r){var i=t&&t.prototype instanceof _?t:_,o=Object.create(i.prototype),s=new O(r||[]);return n(o,"_invoke",{value:F(e,a,s)}),o}function p(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(e){return{type:"throw",arg:e}}}t.wrap=m;var f="suspendedStart",h="suspendedYield",g="executing",v="completed",b={};function _(){}function C(){}function w(){}var y={};u(y,l,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(j([])));k&&k!==a&&o.call(k,l)&&(y=k);var q=w.prototype=_.prototype=Object.create(y);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function L(e,t){function a(i,n,s,l){var d=p(e[i],e,n);if("throw"!==d.type){var c=d.arg,u=c.value;return u&&"object"==Object(r["a"])(u)&&o.call(u,"__await")?t.resolve(u.__await).then((function(e){a("next",e,s,l)}),(function(e){a("throw",e,s,l)})):t.resolve(u).then((function(e){c.value=e,s(c)}),(function(e){return a("throw",e,s,l)}))}l(d.arg)}var i;n(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,i){a(e,r,t,i)}))}return i=i?i.then(o,o):o()}})}function F(t,a,r){var i=f;return function(o,n){if(i===g)throw Error("Generator is already running");if(i===v){if("throw"===o)throw n;return{value:e,done:!0}}for(r.method=o,r.arg=n;;){var s=r.delegate;if(s){var l=I(s,r);if(l){if(l===b)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=g;var d=p(t,a,r);if("normal"===d.type){if(i=r.done?v:h,d.arg===b)continue;return{value:d.arg,done:r.done}}"throw"===d.type&&(i=v,r.method="throw",r.arg=d.arg)}}}function I(t,a){var r=a.method,i=t.iterator[r];if(i===e)return a.delegate=null,"throw"===r&&t.iterator["return"]&&(a.method="return",a.arg=e,I(t,a),"throw"===a.method)||"return"!==r&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+r+"' method")),b;var o=p(i,t.iterator,a.arg);if("throw"===o.type)return a.method="throw",a.arg=o.arg,a.delegate=null,b;var n=o.arg;return n?n.done?(a[t.resultName]=n.value,a.next=t.nextLoc,"return"!==a.method&&(a.method="next",a.arg=e),a.delegate=null,b):n:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,b)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function $(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function j(t){if(t||""===t){var a=t[l];if(a)return a.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,n=function a(){for(;++i=0;--i){var n=this.tryEntries[i],s=n.completion;if("root"===n.tryLoc)return r("end");if(n.tryLoc<=this.prev){var l=o.call(n,"catchLoc"),d=o.call(n,"finallyLoc");if(l&&d){if(this.prev=0;--a){var r=this.tryEntries[a];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--t){var a=this.tryEntries[t];if(a.finallyLoc===e)return this.complete(a.completion,a.afterLoc),$(a),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.tryLoc===e){var r=a.completion;if("throw"===r.type){var i=r.arg;$(a)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,a,r){return this.delegate={iterator:j(t),resultName:a,nextLoc:r},"next"===this.method&&(this.arg=e),b}},t}},f30f:function(e,t,a){"use strict";a.r(t);a("ac1f"),a("841c");var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-row",[t("a-col",{attrs:{span:5}},[t("a-button",{directives:[{name:"action",rawName:"v-action:add",arg:"add"}],attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("新增")])],1),t("a-col",{staticClass:"flex flex-x-end",attrs:{span:11,offset:8}},[t("a-select",{staticStyle:{width:"220px","margin-right":"20px"},attrs:{placeholder:"请选择地址类型"},model:{value:e.queryParam.type,callback:function(t){e.$set(e.queryParam,"type",t)},expression:"queryParam.type"}},[t("a-select-option",{attrs:{value:0}},[e._v("全部")]),t("a-select-option",{attrs:{value:10}},[e._v("发货地址")]),t("a-select-option",{attrs:{value:20}},[e._v("退货地址")])],1),t("a-input-search",{staticStyle:{"max-width":"300px","min-width":"150px"},attrs:{placeholder:"请输入姓名/联系电话"},on:{search:e.onSearch},model:{value:e.queryParam.search,callback:function(t){e.$set(e.queryParam,"search",t)},expression:"queryParam.search"}})],1)],1)],1),t("s-table",{ref:"table",attrs:{rowKey:"address_id",loading:e.isLoading,columns:e.columns,data:e.loadData,pagination:e.pagination},scopedSlots:e._u([{key:"full_address",fn:function(a){return t("span",{},[t("p",{staticClass:"twoline-hide",staticStyle:{width:"270px"}},[e._v(e._s(a))])])}},{key:"type",fn:function(a){return t("span",{},[t("a-tag",[e._v(e._s(10==a?"发货地址":"退货地址"))])],1)}},{key:"action",fn:function(a,r){return t("span",{},[t("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],staticStyle:{"margin-right":"8px"},on:{click:function(t){return e.handleEdit(r)}}},[e._v("编辑")]),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(t){return e.handleDelete(r)}}},[e._v("删除")])])}}])}),t("AddForm",{ref:"AddForm",on:{handleSubmit:e.handleRefresh}}),t("EditForm",{ref:"EditForm",on:{handleSubmit:e.handleRefresh}})],1)},i=[],o=a("5530"),n=(a("d3b7"),a("4d55")),s=a("2af9"),l=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"地址类型",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["type",{initialValue:10,rules:[{required:!0}]}],expression:"['type', { initialValue: 10, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:10}},[e._v("发货地址")]),t("a-radio",{attrs:{value:20}},[e._v("退货地址")])],1)],1),t("a-form-item",{attrs:{label:"联系人姓名",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:"请输入联系人姓名"}]}],expression:"['name', { rules: [{ required: true, message: '请输入联系人姓名' }] }]"}]})],1),t("a-form-item",{attrs:{label:"联系电话",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["phone",{rules:[{required:!0,message:"请输入联系电话"}]}],expression:"['phone', { rules: [{ required: true, message: '请输入联系电话' }] }]"}]})],1),t("a-form-item",{attrs:{label:"选择地区",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("SelectRegion",{directives:[{name:"decorator",rawName:"v-decorator",value:["cascader",{rules:[{required:!0,message:"请选择省市区"}]}],expression:"['cascader', { rules: [{ required: true, message: '请选择省市区' }] }]"}],attrs:{placeholder:"请选择省市区"}})],1),t("a-form-item",{attrs:{label:"详细地址",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["detail",{rules:[{required:!0,message:"请输入详细地址"}]}],expression:"['detail', { rules: [{ required: true, message: '请输入详细地址' }] }]"}]})],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入排序值"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入排序值' }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},d=[],c={components:{SelectRegion:s["l"]},data:function(){return{title:"新增地址",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this)}},methods:{add:function(){this.visible=!0},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){!e&&t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,n["a"]({form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(){return t.confirmLoading=!1}))}}},u=c,m=a("2877"),p=Object(m["a"])(u,l,d,!1,null,null,null),f=p.exports,h=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"地址类型",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["type",{initialValue:10,rules:[{required:!0}]}],expression:"['type', { initialValue: 10, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:10}},[e._v("发货地址")]),t("a-radio",{attrs:{value:20}},[e._v("退货地址")])],1)],1),t("a-form-item",{attrs:{label:"联系人姓名",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:"请输入联系人姓名"}]}],expression:"['name', { rules: [{ required: true, message: '请输入联系人姓名' }] }]"}]})],1),t("a-form-item",{attrs:{label:"联系电话",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["phone",{rules:[{required:!0,message:"请输入联系电话"}]}],expression:"['phone', { rules: [{ required: true, message: '请输入联系电话' }] }]"}]})],1),t("a-form-item",{attrs:{label:"选择地区",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("SelectRegion",{directives:[{name:"decorator",rawName:"v-decorator",value:["cascader",{rules:[{required:!0,message:"请选择省市区"}]}],expression:"['cascader', { rules: [{ required: true, message: '请选择省市区' }] }]"}],attrs:{placeholder:"请选择省市区"}})],1),t("a-form-item",{attrs:{label:"详细地址",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["detail",{rules:[{required:!0,message:"请输入详细地址"}]}],expression:"['detail', { rules: [{ required: true, message: '请输入详细地址' }] }]"}]})],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入排序值"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入排序值' }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},g=[],v=a("88bc"),b=a.n(v),_={components:{SelectRegion:s["l"]},data:function(){return{title:"编辑地址",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),record:{}}},methods:{edit:function(e){this.visible=!0,this.record=e,this.setFieldsValue()},setFieldsValue:function(){var e=this.record,t=this.form.setFieldsValue;e.cascader=[e.province_id,e.city_id,e.region_id],this.$nextTick((function(){t(b()(e,["type","name","phone","cascader","detail","sort"]))}))},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){!e&&t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,n["d"]({addressId:this.record.address_id,form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(){return t.confirmLoading=!1}))}}},C=_,w=Object(m["a"])(C,h,g,!1,null,null,null),y=w.exports,x={name:"Index",components:{STable:s["d"],AddForm:f,EditForm:y},data:function(){var e=this;return{queryParam:{},isLoading:!1,columns:[{title:"地址ID",dataIndex:"address_id"},{title:"联系人姓名",dataIndex:"name"},{title:"联系电话",dataIndex:"phone"},{title:"详细地址",dataIndex:"full_address",scopedSlots:{customRender:"full_address"}},{title:"地址类型",dataIndex:"type",scopedSlots:{customRender:"type"}},{title:"排序",dataIndex:"sort"},{title:"添加时间",dataIndex:"create_time"},{title:"操作",dataIndex:"action",width:"180px",scopedSlots:{customRender:"action"}}],loadData:function(t){return n["e"](Object(o["a"])(Object(o["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))}}},created:function(){},methods:{handleAdd:function(){this.$refs.AddForm.add()},handleEdit:function(e){this.$refs.EditForm.edit(e)},handleDelete:function(e){var t=this,a=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return n["c"]({addressId:e.address_id}).then((function(e){t.$message.success(e.message,1.5),t.handleRefresh()})).finally((function(e){return a.destroy()}))}})},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)},onSearch:function(){this.handleRefresh(!0)}}},k=x,q=Object(m["a"])(k,r,i,!1,null,null,null);t["default"]=q.exports},f8b2:function(e,t,a){}}]);