(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-797ffd6e"],{"14c6":function(o,t,e){"use strict";e.d(t,"p",(function(){return r})),e.d(t,"z",(function(){return d})),e.d(t,"A",(function(){return n})),e.d(t,"w",(function(){return a})),e.d(t,"E",(function(){return i})),e.d(t,"x",(function(){return u})),e.d(t,"F",(function(){return g})),e.d(t,"D",(function(){return c})),e.d(t,"y",(function(){return l})),e.d(t,"B",(function(){return f})),e.d(t,"C",(function(){return p})),e.d(t,"c",(function(){return m})),e.d(t,"g",(function(){return _})),e.d(t,"h",(function(){return h})),e.d(t,"d",(function(){return b})),e.d(t,"e",(function(){return v})),e.d(t,"f",(function(){return y})),e.d(t,"H",(function(){return w})),e.d(t,"K",(function(){return x})),e.d(t,"I",(function(){return k})),e.d(t,"J",(function(){return $})),e.d(t,"G",(function(){return S})),e.d(t,"O",(function(){return j})),e.d(t,"L",(function(){return C})),e.d(t,"M",(function(){return G})),e.d(t,"N",(function(){return q})),e.d(t,"i",(function(){return D})),e.d(t,"n",(function(){return O})),e.d(t,"j",(function(){return T})),e.d(t,"o",(function(){return z})),e.d(t,"k",(function(){return L})),e.d(t,"m",(function(){return B})),e.d(t,"l",(function(){return J})),e.d(t,"P",(function(){return E})),e.d(t,"S",(function(){return M})),e.d(t,"Q",(function(){return N})),e.d(t,"R",(function(){return A})),e.d(t,"t",(function(){return F})),e.d(t,"s",(function(){return H})),e.d(t,"u",(function(){return I})),e.d(t,"v",(function(){return K})),e.d(t,"r",(function(){return P})),e.d(t,"q",(function(){return Q})),e.d(t,"T",(function(){return R})),e.d(t,"U",(function(){return U})),e.d(t,"V",(function(){return V})),e.d(t,"W",(function(){return W})),e.d(t,"a",(function(){return X})),e.d(t,"b",(function(){return Y})),e.d(t,"Y",(function(){return Z})),e.d(t,"X",(function(){return oo}));var s=e("f175");const r=o=>s.a.post("/goods.goods/add",o),d=o=>s.a.post("/goods.goods/edit",o),n=o=>s.a.get("/goods.goods/lists",{params:o}),a=o=>s.a.get("/goods.goods/commonLists",{params:o}),i=o=>s.a.post("/goods.goods/status",o),u=o=>s.a.post("/goods.goods/del",o),g=o=>s.a.post("/goods.goods/changeCategory",o),c=o=>s.a.post("/goods.goods/sort",o),l=o=>s.a.get("/goods.goods/detail",{params:{id:o}}),f=o=>s.a.get("/goods.goods/otherList",{params:o}),p=o=>s.a.post("goods.goods/rename ",o),m=o=>s.a.post("/goods.goods_brand/add",o),_=o=>s.a.get("/goods.goods_brand/lists",{params:o}),h=o=>s.a.post("/goods.goods_brand/status",o),b=o=>s.a.post("/goods.goods_brand/del",o),v=o=>s.a.get("/goods.goods_brand/detail",{params:{id:o}}),y=o=>s.a.post("/goods.goods_brand/edit",o),w=o=>s.a.post("/goods.goods_supplier_category/add",o),x=o=>s.a.get("goods.goods_supplier_category/lists",{params:o}),k=o=>s.a.post("goods.goods_supplier_category/del",{id:o}),$=o=>s.a.post("goods.goods_supplier_category/edit",o),S=o=>s.a.post("/goods.goods_supplier/add",o),j=o=>s.a.get("/goods.goods_supplier/lists",{params:o}),C=o=>s.a.post("goods.goods_supplier/del",{id:o}),G=o=>s.a.get("/goods.goods_supplier/detail",{params:{id:o}}),q=o=>s.a.post("/goods.goods_supplier/edit",o),D=o=>s.a.post("/goods.goods_category/add",o),O=o=>s.a.get("/goods.goods_category/lists",{params:o}),T=o=>s.a.get("/goods.goods_category/commonLists",{params:o}),z=o=>s.a.post("/goods.goods_category/status",o),L=o=>s.a.post("goods.goods_category/del",{id:o}),B=o=>s.a.post("/goods.goods_category/edit",o),J=o=>s.a.get("/goods.goods_category/detail",{params:{id:o}}),E=o=>s.a.post("/goods.goods_unit/add",o),M=o=>s.a.get("/goods.goods_unit/lists",{params:o}),N=o=>s.a.post("goods.goods_unit/del",{id:o}),A=o=>s.a.post("/goods.goods_unit/edit",o),F=o=>s.a.get("goods.goods_comment/lists",{params:o}),H=o=>s.a.post("goods.goods_comment/del",o),I=o=>s.a.post("goods.goods_comment/reply",o),K=o=>s.a.post("/goods.goods_comment/status",o),P=o=>s.a.get("goods.goods_comment_assistant/lists",{params:o}),Q=o=>s.a.post("goods.goods_comment_assistant/add",o),R=o=>s.a.get("goods.goodsServiceGuarantee/lists",o),U=o=>s.a.post("goods.goodsServiceGuarantee/add",o),V=o=>s.a.post("goods.goodsServiceGuarantee/delete",o),W=o=>s.a.post("goods.goodsServiceGuarantee/edit",o),X=()=>s.a.get("goods.GoodsDeliveryTemplate/lists"),Y=o=>s.a.post("goods.GoodsDeliveryTemplate/add",o),Z=o=>s.a.post("goods.GoodsDeliveryTemplate/edit",o),oo=o=>s.a.post("goods.GoodsDeliveryTemplate/delete",o)},"4cef":function(o,t,e){"use strict";e("fc1c")},"5c51":function(o,t,e){"use strict";e.r(t);var s=e("9ab4"),r=e("1b40"),d=e("b3ad"),n=e("14c6");let a=class extends r.e{constructor(){super(...arguments),this.loading=!1,this.form={name:"",image:"",sort:"",is_show:1},this.rules={name:[{required:!0,message:"请输入品牌名称",trigger:["blur","change"]}],image:[{required:!0,message:"请添加品牌图标",trigger:["blur","change"]}]}}handleSave(){this.$refs.form.validate((o,t)=>{if(!o)return!1;if(/[^0-9]/g.test(this.form.sort))return void this.$message.error("排序必须是数字");(this.id?Object(n.f)(this.form):Object(n.c)(this.form)).then(()=>{this.$router.go(-1)})})}getBrandDetail(){this.loading=!0,Object(n.e)(this.id).then(o=>{this.form=o,this.loading=!1})}created(){this.id=this.$route.query.id,this.id&&this.getBrandDetail()}};a=Object(s.a)([Object(r.a)({components:{MaterialSelect:d.a}})],a);var i=a,u=(e("4cef"),e("2877")),g=Object(u.a)(i,(function(){var o=this,t=o.$createElement,e=o._self._c||t;return e("div",{staticClass:"ls-brand-edit"},[e("div",{staticClass:"ls-card ls-brand-edit__header"},[e("el-page-header",{attrs:{content:o.id?"编辑品牌":"新增品牌"},on:{back:function(t){return o.$router.go(-1)}}})],1),e("div",{directives:[{name:"loading",rawName:"v-loading",value:o.loading,expression:"loading"}],staticClass:"ls-card ls-brand-edit__form m-t-10"},[e("el-form",{ref:"form",attrs:{model:o.form,"label-width":"120px",size:"small",rules:o.rules}},[e("el-form-item",{attrs:{label:"品牌名称",required:"",prop:"name"}},[e("el-input",{staticClass:"ls-input",attrs:{maxlength:"8","show-word-limit":"",placeholder:"请输入品牌名称"},model:{value:o.form.name,callback:function(t){o.$set(o.form,"name",t)},expression:"form.name"}})],1),e("el-form-item",{attrs:{label:"品牌图标",required:"",prop:"image"}},[e("material-select",{attrs:{limit:1},model:{value:o.form.image,callback:function(t){o.$set(o.form,"image",t)},expression:"form.image"}}),e("div",{staticClass:"xs muted"},[o._v("建议尺寸:宽80像素*高80像素的jpg,jpeg,png,gif图片")])],1),e("el-form-item",{attrs:{label:"排序"}},[e("el-input",{staticStyle:{width:"220px"},attrs:{placeholder:""},model:{value:o.form.sort,callback:function(t){o.$set(o.form,"sort",t)},expression:"form.sort"}})],1),e("el-form-item",{attrs:{label:"是否显示",required:""}},[e("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:o.form.is_show,callback:function(t){o.$set(o.form,"is_show",t)},expression:"form.is_show"}})],1)],1)],1),e("div",{staticClass:"ls-brand-edit__footer bg-white ls-fixed-footer"},[e("div",{staticClass:"btns row-center flex",staticStyle:{height:"100%"}},[e("el-button",{attrs:{size:"small"},on:{click:function(t){return o.$router.go(-1)}}},[o._v("取消")]),e("el-button",{attrs:{size:"small",type:"primary"},on:{click:o.handleSave}},[o._v("保存")])],1)])])}),[],!1,null,"3cb943d5",null);t.default=g.exports},fc1c:function(o,t,e){}}]);