text: (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-4b4b"],{g6k1:function(t,e,a){},kMvW:function(t,e,a){"use strict";var n=a("g6k1");a.n(n).a},oU4k:function(t,e,a){"use strict";a.d(e,"j",function(){return o}),a.d(e,"l",function(){return r}),a.d(e,"k",function(){return i}),a.d(e,"b",function(){return s}),a.d(e,"h",function(){return d}),a.d(e,"m",function(){return u}),a.d(e,"o",function(){return c}),a.d(e,"i",function(){return p}),a.d(e,"d",function(){return l}),a.d(e,"n",function(){return g}),a.d(e,"f",function(){return b}),a.d(e,"a",function(){return f}),a.d(e,"g",function(){return m}),a.d(e,"c",function(){return h}),a.d(e,"e",function(){return v});var n=a("t3Un");function o(t){return Object(n.c)({url:"/v1/api/goods/list",method:"post",data:t})}function r(t){return Object(n.c)({url:"/v1/api/goods/topClass",method:"post",data:t})}function i(t){return Object(n.c)({url:"/v1/api/goods/secondClass",method:"post",data:t})}function s(t){return Object(n.c)({url:"/v1/api/goods/create",method:"post",data:t})}function d(t){return Object(n.c)({url:"/v1/api/goods/recycle/list",method:"post",data:t})}function u(t){return Object(n.c)({url:"/v1/api/goods/del",method:"post",data:{ids:t}})}function c(t){return Object(n.c)({url:"/v1/api/user/images/upload",method:"post",data:t,headers:{"Content-Type":"multipart/form-data"}})}function p(t){return Object(n.c)({url:"/v1/api/user/images/myImages",method:"post",data:t})}function l(t){return Object(n.c)({url:"/v1/api/goods/recycle/clear",method:"post",data:{ids:t}})}function g(t){return Object(n.c)({url:"/v1/api/goods/recycle/recover",method:"post",data:{ids:t}})}function b(t){return Object(n.c)({url:"/v1/api/goods/edit",method:"post",data:t})}function f(t){return Object(n.c)({url:"/v1/api/brand/add",method:"post",data:t})}function m(t){return Object(n.c)({url:"/v1/api/brand/list",method:"post",data:t})}function h(t){return Object(n.c)({url:"/v1/api/brand/delete",method:"post",data:{ids:t}})}function v(t){return Object(n.c)({url:"/v1/api/brand/edit",method:"post",data:t})}},sNCO:function(t,e,a){"use strict";a.r(e);var n=[{prop:"brandLogo",name:"品牌LOGO",type:"image",editable:!1,sortable:!1},{prop:"brandName",name:"品牌名称",type:"text",editable:!1,sortable:!1,width:"auto"},{prop:"brandWebsiteAddress",name:"品牌网址",type:"text",linkColor:"normal",editable:!1,sortable:!1,width:"auto"},{prop:"brandDescrib",name:"品牌描述",type:"text",editable:!1,sortable:!1,width:"auto"},{prop:"sort",name:"排序",type:"input",editable:!0,sortable:!0,width:"auto"},{prop:"visible",name:"是否显示",type:"switch",editable:!1,sortable:!1,width:"auto"}],o=a("HGfo"),r=a("oU4k"),i=a("t3Un"),s=a("LvDl"),d=a.n(s),u={name:"GoodsBrands",components:{goodsTableCustomTd:o.a},data:function(){return{pageNav:{pageNo:1,pageSize:10,total:0},tableSheme:n,brandsListMapApi:{list:r.g,del:r.c},tableData:[]}},mounted:function(){this.getBrandsList()},methods:{delBrands:function(t){var e=this;this.$confirm("是否确认删除？","",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){e.brandsListMapApi.del([t]).then(function(t){200===t.status&&(e.$message({type:"success",message:"删除成功！"}),e.getBrandsList())})}).catch(function(){e.$message({type:"info",message:"已取消删除"})})},getBrandsList:function(){var t=this;this.brandsListMapApi.list({page:this.pageNav.pageNo,pageSize:this.pageNav.pageSize}).then(function(e){console.log(e),200===e.status&&(t.tableData=d.a.map(e.data.data,function(t){return{id:t.id,brandLogo:i.a+"brands/"+t.logo,brandName:t.name,brandWebsiteAddress:t.site,brandDescrib:t.description,sort:t.order,visible:!!t.active}}),t.pageNav.pageNo=e.data.page,t.pageNav.pageSize=e.data.pageSize,t.pageNav.total=e.data.total)})},handleSizeChange:function(t){this.pageNav.pageSize=t,this.getBrandsList()},handleCurrentChange:function(t){this.pageNav.pageNo=t,this.getBrandsList()}}},c=(a("kMvW"),a("KHd+")),p=Object(c.a)(u,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-main",{staticClass:"contentwrapper"},[a("div",[a("h3",{staticClass:"heading"},[t._v("商品品牌\n      "),a("span",{staticStyle:{float:"right","margin-top":"-3px"}},[a("router-link",{attrs:{to:{name:"goodsBrandsEdit",query:{action:"add"}}}},[a("el-button",{attrs:{type:"default",size:"mini"}},[a("font-awesome-icon",{attrs:{icon:["fas","plus"]}}),t._v("\n            添加商品\n          ")],1)],1)],1)])]),t._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData,"header-row-class-name":"py-table-header",stripe:""}},[t._l(t.tableSheme,function(e){return a("el-table-column",{key:e.prop,attrs:{prop:e.prop,label:e.name,sortable:e.sortable,width:e.width},scopedSlots:t._u([{key:"default",fn:function(t){return[a("goods-table-custom-td",{attrs:{prop:e.prop,name:e.name,"link-color":e.linkColor,type:e.type,data:t.row,"is-row-menu-wrap-cell":e.isRowMenuWrapCell||!1}})]}}])})}),t._v(" "),a("el-table-column",{attrs:{prop:"operate",label:"操作",width:"130"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[a("router-link",{attrs:{to:{name:"goodsBrandsEdit",params:e.row,query:{action:"edit",id:e.row.id}}}},[a("el-button",{attrs:{size:"medium",type:"text",title:"编辑"}},[a("font-awesome-icon",{attrs:{icon:["fas","edit"],size:"lg","fixed-width":""}})],1)],1),t._v(" "),a("el-button",{attrs:{size:"medium",type:"text",title:"删除"},on:{click:function(a){t.delBrands(e.row.id)}}},[a("font-awesome-icon",{staticClass:"py-text-danger",attrs:{icon:["fas","trash-alt"],size:"lg","fixed-width":""}})],1)],1)]}}])})],2),t._v(" "),a("div",{staticClass:"pageNavWrap"},[a("el-pagination",{attrs:{"current-page":t.pageNav.pageNo,"page-sizes":[10,20,50,100],"page-size":t.pageNav.pageSize,total:t.pageNav.total,layout:"total, sizes, prev, pager, next, jumper",background:""},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1),t._v(" "),a("router-view")],1)},[],!1,null,null,null);p.options.__file="goods-brands.vue";e.default=p.exports}}]);