webpackJsonp([49],{"dDt+":function(t,a,n){var e=n("xaZu");"string"==typeof e&&(e=[[t.i,e,""]]),e.locals&&(t.exports=e.locals);n("rjj0")("1d51a0c2",e,!0)},i7MG:function(t,a,n){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var e=n("UVPs"),i={name:"brandList",data:function(){return{loading:!1,params:{pages:1,size:10},tableData:"",selectedData:[],dialogBrandVisible:!1,brandForm:{logo:".."}}},mounted:function(){this.GET_BrandList()},methods:{handleSelectionChange:function(t){this.selectedData=t.map(function(t){return t.brand_id})},uploadSuccess:function(t){this.$set(this.brandForm,"logo",t.url),this.$refs.brandForm.validateField("logo")},delGiftImg:function(){this.fileList=[],this.brandForm.logo=""},handlePageSizeChange:function(t){this.params.size=t,this.GET_BrandList()},handlePageCurrentChange:function(t){this.params.page=t,this.GET_BrandList()},searchEvent:function(t){this.params.page=1,this.params.name=t,t||delete this.params.name,this.GET_BrandList()},GET_BrandList:function(){var t=this;this.loading=!0,e.e(this.params).then(function(a){t.loading=!1,t.tableData=a}).catch(function(){t.loading=!1})},handleAddBrand:function(){this.$router.push({name:"productClassAdd"})},submitBrandForm:function(t){},handleEditBrand:function(t,a){this.$router.push({name:"productClassEdit",params:{id:a.id,type:t}})},handleDeleteBrand:function(t,a){var n=this;this.$confirm("确定要删除这个品牌吗？","提示",{type:"warning"}).then(function(){n.DELETE_Brand(a.id)}).catch(function(){})},DELETE_Brand:function(t){var a=this;e.g(t).then(function(){a.$message.success("删除成功！"),a.GET_BrandList()})}}},s=n("XyMi");var l=function(t){n("dDt+")},o=Object(s.a)(i,function(){var t=this,a=t.$createElement,n=t._self._c||a;return n("div",[n("en-table-layout",{attrs:{tableData:t.tableData.records,loading:t.loading,"selection-change":t.handleSelectionChange}},[n("div",{staticClass:"inner-toolbar",attrs:{slot:"toolbar"},slot:"toolbar"},[n("div",{staticClass:"toolbar-btns"},[t.checkPermission(["brand:add"])?n("el-button",{attrs:{size:"mini",type:"primary",icon:"el-icon-circle-plus-outline"},on:{click:t.handleAddBrand}},[t._v("添加")]):t._e()],1),t._v(" "),n("div",{staticClass:"toolbar-search"},[n("en-table-search",{attrs:{placeholder:"请输入品牌名称"},on:{search:t.searchEvent}})],1)]),t._v(" "),n("template",{slot:"table-columns"},[n("el-table-column",{attrs:{type:"selection",width:"100"}}),t._v(" "),n("el-table-column",{attrs:{prop:"name",label:"组合名称"}}),t._v(" "),n("el-table-column",{attrs:{label:"组合说明",prop:"remark"}}),t._v(" "),n("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(a){return[n("el-button",{attrs:{size:"mini"},on:{click:function(n){return t.handleEditBrand("check",a.row)}}},[t._v("查看")]),t._v(" "),n("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(n){return t.handleEditBrand("edit",a.row)}}},[t._v("编辑")]),t._v(" "),n("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(n){return t.handleDeleteBrand(a.$index,a.row)}}},[t._v("删除")])]}}])})],1),t._v(" "),t.tableData?n("el-pagination",{attrs:{slot:"pagination","current-page":t.tableData.pages,"page-sizes":[10,20,50,100],"page-size":t.tableData.size,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handlePageSizeChange,"current-change":t.handlePageCurrentChange},slot:"pagination"}):t._e()],2)],1)},[],!1,l,"data-v-33dc053f",null);a.default=o.exports},xaZu:function(t,a,n){(t.exports=n("FZ+f")(!1)).push([t.i,"\n[data-v-33dc053f] .el-table td:not(.is-left) {\n  text-align: center;\n}\n.inner-toolbar[data-v-33dc053f] {\n  display: -webkit-box;\n  display: -ms-flexbox;\n  display: flex;\n  width: 100%;\n  -webkit-box-pack: justify;\n      -ms-flex-pack: justify;\n          justify-content: space-between;\n  padding: 0 20px;\n}\n.goods-image[data-v-33dc053f] {\n  max-width: 120px;\n  height: 75px;\n}\n[data-v-33dc053f] .el-select .el-input {\n  width: 100px;\n}\n[data-v-33dc053f] .input-with-select .el-input-group__prepend {\n  background-color: #fff;\n}\n[data-v-33dc053f] .el-form-item__content .edui-editor {\n  line-height: normal;\n}\n",""])}});