You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3 lines
82 KiB
3 lines
82 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["store"],{"0873":function(e,t,a){},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(r),{rules:[{required:!0,message:"请指定日期"}]}],expression:"[`historysTime${index}`, { 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(r),{rules:[{required:!0}]}],expression:"[`historysContenmt${index}`, { 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,r){return[a.length>20?t("a-tooltip",{key:a,attrs:{title:a}},[t("a-tag",{key:a,attrs:{closable:0!==r},on:{close:function(){return e.handleCloseTag(a)}}},[e._v(" "+e._s("".concat(a.slice(0,20),"..."))+" ")])],1):t("a-tag",{key:a,attrs:{closable:0!==r},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("4de4"),a("d3b7"),a("99af"),a("b64b"),a("d81d"),a("159b"),a("a434"),a("a15b"),a("c1df")),l=a.n(s),c=a("88bc"),d=a.n(c),u=a("3858"),m=a("ca00"),p=a("2af9"),f=(a("bf54"),{components:{SelectImage:p["i"],SelectRegion:p["k"],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(r)]=l()(new Date(a.time))),t["historysContenmt".concat(r)]=a.contenmt,i.push("historysTime".concat(r)),o.push("historysContenmt".concat(r)),e.form.getFieldDecorator("historysTime".concat(r),{initialValue:"",preserve:!0}),e.form.getFieldDecorator("historysContenmt".concat(r),{initialValue:"",preserve:!0})}))),!Object(m["f"])(a.getFieldsValue())&&r((function(){a.setFieldsValue(d()(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;i<e;i++)t+=a.charAt(Math.floor(Math.random()*r));return t},handleRemoveHistory:function(e){var t=this.form,a=t.getFieldValue("historys");0!==a.length&&(a.splice(e,1),t.setFieldsValue({historys:a}))},handleAddHistory:function(){var e=this.form,t=e.getFieldValue("historys"),a=t.concat([{historysTime:"",historysContenmt:"",id:this.generateRandomString(8)}]);e.setFieldsValue({historys:a})},setCoordinate:function(e){var t=this.form,a=this.$nextTick;a((function(){t.setFieldsValue({coordinate:e})}))},handleSubmit:function(e){e.preventDefault();var t=this.form.validateFields,a=this.onFormSubmit;t((function(e,t){!e&&a(t)}))},onFormSubmit:function(e){var t=this,a=Object(o["a"])(Object(o["a"])({},e),{},{remark:this.tags,shop_image_id:e.shop_image_id.join(",")});a.history=a.historys.map((function(e,t){return{time:a["historysTime".concat(t)]&&a["historysTime".concat(t)].format("YYYY-MM-DD"),contenmt:a["historysContenmt".concat(t)]}})),delete a["historys"],this.isLoading=!0,this.isBtnLoading=!0,u["e"]({shopId:this.shopId,form:a}).then((function(e){t.$message.success(e.message,1.5),setTimeout((function(){t.$router.push("./index")}),1500)})).catch((function(){t.isBtnLoading=!1})).finally((function(){return t.isLoading=!1}))}}}),h=f,v=a("2877"),g=Object(v["a"])(h,r,i,!1,null,null,null);t["default"]=g.exports},"1d36":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",{staticClass:"flex flex-x-end"},[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:"id",loading:e.isLoading,columns:e.columns,data:e.loadData,pagination:e.pagination},scopedSlots:e._u([{key:"shop",fn:function(a){return t("span",{},[e._v(e._s(a.shop_name))])}},{key:"clerk",fn:function(a){return t("span",{},[e._v(e._s(a.real_name))])}},{key:"order",fn:function(a){return t("span",{},[e._v(e._s(a.order_no))])}}])})],1)},i=[],o=a("5530"),n=a("b775"),s={list:"/shop.order/list"};function l(e){return Object(n["b"])({url:s.list,method:"get",params:e})}var c=a("3858"),d=a("2af9"),u={name:"Index",components:{STable:d["d"]},data:function(){var e=this;return{queryParam:{},isLoading:!1,columns:[{title:"记录ID",dataIndex:"id"},{title:"核销门店",dataIndex:"shop",scopedSlots:{customRender:"shop"}},{title:"核销员",dataIndex:"clerk",scopedSlots:{customRender:"clerk"}},{title:"订单号",dataIndex:"order",scopedSlots:{customRender:"order"}},{title:"核销时间",dataIndex:"create_time"}],loadData:function(t){return l(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;c["b"]().then((function(t){e.shopList=t.data.list}))},handleRefresh:function(){var e=arguments.length>0&&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(c){return void a(c)}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)}))}}},"35c4":function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var r=a("5c06"),i=new r["a"]([{key:"DELIVERY",name:"配送设置",value:"delivery"},{key:"TRADE",name:"交易设置",value:"trade"},{key:"STORAGE",name:"上传设置",value:"storage"},{key:"PRINTER",name:"小票打印",value:"printer"},{key:"FULL_FREE",name:"满额包邮设置",value:"full_free"},{key:"RECHARGE",name:"充值设置",value:"recharge"},{key:"POINTS",name:"积分设置",value:"points"},{key:"SUBMSG",name:"订阅消息设置",value:"submsg"},{key:"APP_THEME",name:"店铺页面风格",value:"app_theme"},{key:"PAGE_CATEGORY_TEMPLATE",name:"分类页模板",value:"page_category_template"},{key:"RECOMMENDED",name:"商品推荐设置",value:"recommended"},{key:"CUSTOMER",name:"商城客服设置",value:"customer"}])},"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"),c=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)},d=[],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,c,d,!1,null,null,null),h=f.exports,v=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)},g=[],b=a("88bc"),C=a.n(b),_={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(C()(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=_,y=Object(p["a"])(w,v,g,!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 c}));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 c(e){return Object(r["b"])({url:i.delete,method:"post",data:e})}},"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 c}));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 c(e){return Object(r["b"])({url:i.delete,method:"post",data:e})}},"6f08":function(e,t,a){"use strict";a("f8b2")},"89a2":function(e,t,a){"use strict";a.d(t,"d",(function(){return o})),a.d(t,"a",(function(){return n})),a.d(t,"c",(function(){return s})),a.d(t,"b",(function(){return l}));var r=a("b775"),i={list:"/content.article.category/list",add:"/content.article.category/add",edit:"/content.article.category/edit",delete:"/content.article.category/delete"};function o(e){return Object(r["b"])({url:i.list,method:"get",params:e})}function n(e){return Object(r["b"])({url:i.add,method:"post",data:e})}function s(e){return Object(r["b"])({url:i.edit,method:"post",data:e})}function l(e){return Object(r["b"])({url:i.delete,method:"post",data:e})}},"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:"建议尺寸: 300*300"}},[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:"新品首发",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"建议尺寸: 300*300"}},[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:"建议尺寸: 300*300"}},[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:"建议尺寸: 300*300"}},[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("d3b7"),a("a15b"),a("88bc")),s=a.n(n),l=a("33ca"),c=a("2af9"),d={components:{SelectImage:c["i"]},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"]))}))},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&&e.new_product_img_id.join(",")||"",big_brand_img_id:e.big_brand_img_id&&e.big_brand_img_id.join(",")||"",new_people_order_img_id:e.new_people_order_img_id&&e.new_people_order_img_id.join(",")||"",flash_sale_img_id:e.flash_sale_img_id&&e.flash_sale_img_id.join(",")||"",ranking_img_id:e.ranking_img_id&&e.ranking_img_id.join(",")||""};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=d,m=(a("f732"),a("2877")),p=Object(m["a"])(u,r,i,!1,null,"4bc96ee6",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("ac1f"),a("5319"),a("d3b7"),a("ddb0"),a("2b0e")),n=a("a9f5"),s=a.n(n),l=a("2ef0"),c=a("f585"),d=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)}}},v=h,g=(a("9ecf"),a("2877")),b=Object(g["a"])(v,u,m,!1,null,"ca8435fc",null),C=b.exports;o["a"].use(s.a);var _={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:C},data:function(){return{key:d["a"].APP_THEME.value,labelCol:{span:2},wrapperCol:{span:22},isLoading:!1,confirmLoading:!1,themeTemplate:w,record:Object(l["cloneDeep"])(_)}},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,c["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,c["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(g["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(r),{rules:[{required:!0,message:"请指定日期"}]}],expression:"[`historysTime${index}`, { 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(r),{rules:[{required:!0}]}],expression:"[`historysContenmt${index}`, { 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,r){return[a.length>20?t("a-tooltip",{key:a,attrs:{title:a}},[t("a-tag",{key:a,attrs:{closable:0!==r},on:{close:function(){return e.handleCloseTag(a)}}},[e._v(" "+e._s("".concat(a.slice(0,20),"..."))+" ")])],1):t("a-tag",{key:a,attrs:{closable:0!==r},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("4de4"),a("d3b7"),a("99af"),a("a15b"),a("d81d"),a("c1df"),a("3858")),l=a("2af9"),c={components:{SelectImage:l["i"],SelectRegion:l["k"],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;i<e;i++)t+=a.charAt(Math.floor(Math.random()*r));return t},handleRemoveHistory:function(e){var t=this.form,a=t.getFieldValue("historys");if(0!==a.length){var r=a.filter((function(t,a){return a!==e}));t.setFieldsValue({historys:r})}},handleAddHistory:function(){var e=this.form,t=e.getFieldValue("historys"),a=t.concat([{historysTime:"",historysContenmt:"",id:this.generateRandomString(8)}]);e.setFieldsValue({historys:a})},setCoordinate:function(e){var t=this.form,a=this.$nextTick;a((function(){t.setFieldsValue({coordinate:e})}))},handleSubmit:function(e){e.preventDefault();var t=this.form.validateFields,a=this.onFormSubmit;t((function(e,t){!e&&a(t)}))},onFormSubmit:function(e){var t=this,a=Object(o["a"])(Object(o["a"])({},e),{},{remark:this.tags,shop_image_id:e.shop_image_id.join(",")});a.history=a.historys.map((function(e,t){return{time:a["historysTime".concat(t)]&&a["historysTime".concat(t)].format("YYYY-MM-DD"),contenmt:a["historysContenmt".concat(t)]}})),delete a["historys"],this.isLoading=!0,this.isBtnLoading=!0,s["a"]({form:a}).then((function(e){t.$message.success(e.message,1.5),setTimeout((function(){t.$router.push("./index")}),1500)})).catch((function(){t.isBtnLoading=!1})).finally((function(){return t.isLoading=!1}))}}},d=c,u=a("2877"),m=Object(u["a"])(d,r,i,!1,null,null,null);t["default"]=m.exports},c480: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}},[e.$auth("/store/shop/create")?t("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("新增")]):e._e()],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.isCheck,callback:function(t){e.$set(e.queryParam,"isCheck",t)},expression:"queryParam.isCheck"}},[t("a-select-option",{attrs:{value:-1}},[e._v("全部")]),t("a-select-option",{attrs:{value:1}},[e._v("支持")]),t("a-select-option",{attrs:{value:0}},[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:"shop_id",loading:e.isLoading,columns:e.columns,data:e.loadData,pagination:e.pagination},scopedSlots:e._u([{key:"logo_url",fn:function(e){return t("span",{},[t("a",{attrs:{title:"点击查看原图",href:e,target:"_blank"}},[t("img",{attrs:{width:"50",height:"50",src:e,alt:"门店logo"}})])])}},{key:"full_address",fn:function(a){return t("span",{},[t("p",{staticClass:"twoline-hide",staticStyle:{width:"240px"}},[e._v(e._s(a))])])}},{key:"is_check",fn:function(a){return t("span",{},[t("a-tag",{attrs:{color:a?"green":""}},[e._v(e._s(a?"支持":"不支持"))])],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("div",{staticClass:"actions"},[t("a",{on:{click:function(t){return e.handleComment(r)}}},[e._v("评论")]),t("a",{on:{click:function(t){return e.handleParking(r)}}},[e._v("停车场配置")]),e.$auth("/store/shop/update")?t("a",{on:{click:function(t){return e.handleEdit(r)}}},[e._v("编辑")]):e._e(),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(t){return e.handleDelete(r)}}},[e._v("删除")])])}}])}),t("UpdateParking",{ref:"UpdateParking",on:{handleSubmit:e.handleRefresh}}),t("CommentList",{ref:"CommentList"})],1)},i=[],o=a("5530"),n=(a("d3b7"),a("3858")),s=a("2af9"),l=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:1100,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},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:["parking_name"],expression:"['parking_name']"}],attrs:{placeholder:"请输入停车场名称"}})],1),t("a-form-item",{attrs:{label:"停车场描述",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["parking_desc"],expression:"['parking_desc']"}],attrs:{autoSize:{minRows:4}}})],1),t("a-form-item",{attrs:{label:"停车场坐标",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["parking_coordinate"],expression:"['parking_coordinate']"}],attrs:{placeholder:"请选择停车场坐标"}}),t("Getpoint",{on:{setCoordinate:e.setCoordinate}})],1)],1)],1)],1)},c=[],d=(a("a15b"),a("88bc")),u=a.n(d),m={components:{SelectImage:s["i"],Getpoint:s["b"]},data:function(){return{title:"停车场配置",labelCol:{span:3},wrapperCol:{span:20},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),record:{}}},methods:{edit:function(e){this.visible=!0,this.record=e,this.record["parking_coordinate"]=[e.parking_latitude,e.parking_longitude].join(","),this.setFieldsValue()},setFieldsValue:function(){var e=this.record,t=this.form.setFieldsValue;this.$nextTick((function(){t(u()(e,["parking_name","parking_desc","parking_coordinate"]))}))},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["g"]({shopId:this.record.shop_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}))},setCoordinate:function(e){var t=this.form,a=this.$nextTick;a((function(){t.setFieldsValue({parking_coordinate:e})}))}}},p=m,f=a("2877"),h=Object(f["a"])(p,l,c,!1,null,null,null),v=h.exports,g=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:900,visible:e.visible,maskClosable:!1,destroyOnClose:!0,footer:null},on:{cancel:e.handleCancel}},[t("div",{staticClass:"table-operator"},[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("div",{staticClass:"table-wrapper"},[t("s-table",{ref:"table",attrs:{rowKey:"id",loading:e.isLoading,columns:e.columns,data:e.loadData,pagination:e.pagination},scopedSlots:e._u([{key:"image",fn:function(e){return t("span",{},[t("a",{attrs:{title:"点击查看原图",href:e,target:"_blank"}},[t("img",{attrs:{height:"50",src:e,alt:"栏目背景图"}})])])}},{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("删除")])])}}])})],1),t("AddForm",{ref:"AddForm",on:{handleSubmit:e.handleRefresh}}),t("EditForm",{ref:"EditForm",on:{handleSubmit:e.handleRefresh}})],1)},b=[],C=a("b775"),_={list:"/shop.comment/list",add:"/shop.comment/add",edit:"/shop.comment/edit",delete:"/shop.comment/delete"};function w(e){return Object(C["b"])({url:_.list,method:"get",params:e})}function y(e){return Object(C["b"])({url:_.add,method:"post",data:e})}function x(e){return Object(C["b"])({url:_.edit,method:"post",data:e})}function k(e){return Object(C["b"])({url:_.delete,method:"post",data:e})}var q=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:780,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},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("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["image_id",{rules:[{required:!0,message:"请选择评论图片"}]}],expression:"['image_id', { 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:["nickname",{rules:[{required:!0,message:"请输入用户昵称"}]}],expression:"['nickname', { rules: [{ required: true, message: '请输入用户昵称' }] }]"}],attrs:{placeholder:"请输入用户昵称"}})],1),t("a-form-item",{attrs:{label:"评论内容",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["content",{rules:[{required:!0,message:"请输入评论内容"}]}],expression:"['content', { rules: [{ required: true, message: '请输入评论内容' }] }]"}],attrs:{placeholder:"请输入评论内容","auto-size":{minRows:6,maxRows:12}}})],1)],1)],1)],1)},S=[],L={components:{SelectImage:s["i"],SelectGoods:s["h"]},data:function(){return{title:"新增评论",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),shopId:null}},methods:{add:function(e){this.visible=!0,this.shopId=e},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,y({form:Object(o["a"])(Object(o["a"])({},e),{},{shop_id:this.shopId})}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(){return t.confirmLoading=!1}))}}},I=L,F=Object(f["a"])(I,q,S,!1,null,null,null),O=F.exports,T=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:780,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},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("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["image_id",{rules:[{required:!0,message:"请选择评论图片"}]}],expression:"['image_id', { rules: [{ required: true, message: '请选择评论图片' }] }]"}],attrs:{defaultList:e.record.file?[e.record.file]:[]}})],1),t("a-form-item",{attrs:{label:"用户昵称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["nickname",{rules:[{required:!0,message:"请输入用户昵称"}]}],expression:"['nickname', { rules: [{ required: true, message: '请输入用户昵称' }] }]"}],attrs:{placeholder:"请输入用户昵称"}})],1),t("a-form-item",{attrs:{label:"评论内容",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["content",{rules:[{required:!0,message:"请输入评论内容"}]}],expression:"['content', { rules: [{ required: true, message: '请输入评论内容' }] }]"}],attrs:{placeholder:"请输入评论内容","auto-size":{minRows:6,maxRows:12}}})],1)],1)],1)],1)},N=[],$=a("c7eb"),E=a("1da1"),j={components:{SelectImage:s["i"],SelectGoods:s["h"]},data:function(){return{title:"编辑评论",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),record:{}}},methods:{edit:function(e){var t=this;return Object(E["a"])(Object($["a"])().mark((function a(){return Object($["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:t.visible=!0,t.record=e,t.setFieldsValue();case 3:case"end":return a.stop()}}),a)})))()},setFieldsValue:function(){var e=this.record,t=this.form.setFieldsValue;this.$nextTick((function(){t(u()(e,["nickname","content","image_id"]))}))},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(),this.record={}},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,x({commentId:this.record.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}))}}},V=j,R=Object(f["a"])(V,T,N,!1,null,null,null),B=R.exports,D={components:{STable:s["d"],AddForm:O,EditForm:B},data:function(){var e=this;return{title:"评论管理",visible:!1,shopId:null,queryParam:{},isLoading:!1,columns:[{title:"评论ID",dataIndex:"id"},{title:"评论图片",dataIndex:"image",scopedSlots:{customRender:"image"}},{title:"用户昵称",dataIndex:"nickname"},{title:"评论内容",dataIndex:"content"},{title:"创建时间",width:"180px",dataIndex:"create_time"},{title:"更新时间",width:"180px",dataIndex:"update_time"},{title:"操作",dataIndex:"action",width:"120px",scopedSlots:{customRender:"action"}}],loadData:function(t){return w(Object(o["a"])(Object(o["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))}}},methods:{handleAdd:function(){this.$refs.AddForm.add(this.shopId)},handleEdit:function(e){this.$refs.EditForm.edit(e)},handleDelete:function(e){var t=this,a=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return k({commentId:e.id}).then((function(e){t.$message.success(e.message,1.5),t.handleRefresh()})).finally((function(e){return a.destroy()}))}})},visibleComment:function(e){this.visible=!0,this.shopId=e,this.queryParam={shop_id:e}},handleCancel:function(){this.visible=!1},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)}}},P=D,A=(a("6f08"),Object(f["a"])(P,g,b,!1,null,null,null)),H=A.exports,G={name:"Index",components:{STable:s["d"],UpdateParking:v,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)}}},Y=G,M=Object(f["a"])(Y,r,i,!1,null,null,null);t["default"]=M.exports},c7eb:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));a("a4d3"),a("e01a"),a("d3b7"),a("d28b"),a("3ca3"),a("ddb0"),a("b636"),a("944a"),a("0c47"),a("23dc"),a("3410"),a("159b"),a("b0c0"),a("131a"),a("fb6a");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",c=s.asyncIterator||"@@asyncIterator",d=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 C?t:C,o=Object.create(i.prototype),s=new N(r||[]);return n(o,"_invoke",{value:I(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",v="executing",g="completed",b={};function C(){}function _(){}function w(){}var y={};u(y,l,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x($([])));k&&k!==a&&o.call(k,l)&&(y=k);var q=w.prototype=C.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 c=p(e[i],e,n);if("throw"!==c.type){var d=c.arg,u=d.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){d.value=e,s(d)}),(function(e){return a("throw",e,s,l)}))}l(c.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 I(t,a,r){var i=f;return function(o,n){if(i===v)throw new Error("Generator is already running");if(i===g){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=F(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=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=v;var c=p(t,a,r);if("normal"===c.type){if(i=r.done?g:h,c.arg===b)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=g,r.method="throw",r.arg=c.arg)}}}function F(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,F(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 O(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 T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function $(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<t.length;)if(o.call(t,i))return a.value=t[i],a.done=!1,a;return a.value=e,a.done=!0,a};return n.next=n}}throw new TypeError(Object(r["a"])(t)+" is not iterable")}return _.prototype=w,n(q,"constructor",{value:w,configurable:!0}),n(w,"constructor",{value:_,configurable:!0}),_.displayName=u(w,d,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,u(e,d,"GeneratorFunction")),e.prototype=Object.create(q),e},t.awrap=function(e){return{__await:e}},S(L.prototype),u(L.prototype,c,(function(){return this})),t.AsyncIterator=L,t.async=function(e,a,r,i,o){void 0===o&&(o=Promise);var n=new L(m(e,a,r,i),o);return t.isGeneratorFunction(a)?n:n.next().then((function(e){return e.done?e.value:n.next()}))},S(q),u(q,d,"Generator"),u(q,l,(function(){return this})),u(q,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),a=[];for(var r in t)a.push(r);return a.reverse(),function e(){for(;a.length;){var r=a.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=$,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var a in this)"t"===a.charAt(0)&&o.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var a=this;function r(r,i){return s.type="throw",s.arg=t,a.next=r,i&&(a.method="next",a.arg=e),!!i}for(var i=this.tryEntries.length-1;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"),c=o.call(n,"finallyLoc");if(l&&c){if(this.prev<n.catchLoc)return r(n.catchLoc,!0);if(this.prev<n.finallyLoc)return r(n.finallyLoc)}else if(l){if(this.prev<n.catchLoc)return r(n.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return r(n.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var n=i?i.completion:{};return n.type=e,n.arg=t,i?(this.method="next",this.next=i.finallyLoc,b):this.complete(n)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.finallyLoc===e)return this.complete(a.completion,a.afterLoc),T(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;T(a)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,a,r){return this.delegate={iterator:$(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)},c=[],d={components:{SelectRegion:s["k"]},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=d,m=a("2877"),p=Object(m["a"])(u,l,c,!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)},v=[],g=a("88bc"),b=a.n(g),C={components:{SelectRegion:s["k"]},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"])(_,h,v,!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},f585:function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return s}));var r=a("5530"),i=a("b775"),o={detail:"/setting/detail",update:"/setting/update"};function n(e){return Object(i["b"])({url:o.detail,method:"get",params:{key:e}})}function s(e,t){return Object(i["b"])({url:o.update,method:"post",data:Object(r["a"])({key:e},t)})}},f732:function(e,t,a){"use strict";a("0873")},f8b2:function(e,t,a){}}]); |