"use strict";(self["webpackChunkvoghion_vue_admin"]=self["webpackChunkvoghion_vue_admin"]||[]).push([[34536],{34536:function(e,t,r){r.r(t),r.d(t,{default:function(){return u}});var l=function(){var e=this,t=e._self._c;return t("div",{staticClass:"g-bg-white g-pa-xl"},[t("div",[e._v("请选择品牌类目以及上传品牌资质。一次只能添加统一品牌下的需要相同资质的类目。")]),t("el-form",{ref:"form",staticClass:"g-mt-md",attrs:{model:e.form,"label-width":"100px"},nativeOn:{submit:function(e){e.preventDefault()}}},[t("el-form-item",{attrs:{label:"类目"}},[t("el-cascader",{staticStyle:{width:"60%"},attrs:{options:e.backendCategory,props:{expandTrigger:"hover",children:"childCategory",label:"name",key:"id",value:"id",emitPath:!1,multiple:!0,checkStrictly:!0},clearable:""},model:{value:e.form.categoryIds,callback:function(t){e.$set(e.form,"categoryIds",t)},expression:"form.categoryIds"}})],1),t("el-form-item",{attrs:{label:"品牌名称"}},[t("el-input",{staticStyle:{width:"256px"},attrs:{clearable:""},model:{value:e.form.title,callback:function(t){e.$set(e.form,"title",t)},expression:"form.title"}})],1),t("el-form-item",{attrs:{label:"品牌标志"}},[t("imgUpload",{attrs:{"up-load-file-url":e.upLoadFileUrl,limit:1},model:{value:e.form.brandLogo,callback:function(t){e.$set(e.form,"brandLogo",t)},expression:"form.brandLogo"}})],1),t("el-form-item",{attrs:{label:"授权书"}},[t("imgUpload",{attrs:{"up-load-file-url":e.upLoadFileUrl,limit:1},model:{value:e.form.imgUrl,callback:function(t){e.$set(e.form,"imgUrl",t)},expression:"form.imgUrl"}})],1),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.confirmOnClick()}}},[e._v("确定")])],1)],1)],1)},o=[],a=r(7896),i=r(39092),n=r(48082),s={components:{imgUpload:i.A},data(){return{upLoadFileUrl:a.Lo,form:{}}},computed:{backendCategory(){return this.$store.state.user.backendCategory}},methods:{confirmOnClick(){console.log(this.form);const e={...this.form};e.brandLogo&&e.brandLogo.length>0?(e.brandLogo=e.brandLogo[0].url,e.imgUrl&&e.imgUrl.length>0?(e.imgUrl=e.imgUrl[0].url,this.$store.dispatch({type:"merchant/brandAdd",payload:e}).then((e=>{e&&(this.form={})}))):n.Message.error("请上传授权书")):n.Message.error("请上传品牌标志")}}},m=s,c=r(81656),d=(0,c.A)(m,l,o,!1,null,null,null),u=d.exports}}]);