1 |
- webpackJsonp([29],{GcZw:function(t,e,a){(t.exports=a("FZ+f")(!1)).push([t.i,"\n[data-v-fc0910e8] .el-table td:not(.is-left) {\n text-align: center;\n}\n.inner-toolbar[data-v-fc0910e8] {\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-fc0910e8] {\n max-width: 120px;\n height: 75px;\n}\n[data-v-fc0910e8] .el-select .el-input {\n width: 100px;\n}\n[data-v-fc0910e8] .input-with-select .el-input-group__prepend {\n background-color: #fff;\n}\n[data-v-fc0910e8] .el-form-item__content .edui-editor {\n line-height: normal;\n}\n",""])},dj9Y:function(t,e,a){var n=a("GcZw");"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);a("rjj0")("1ad036ba",n,!0)},i7MG:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a("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,n.e(this.params).then(function(e){t.loading=!1,t.tableData=e}).catch(function(){t.loading=!1})},handleAddBrand:function(){this.$router.push({name:"productClassAdd"})},submitBrandForm:function(t){},handleEditBrand:function(t,e){this.$router.push({name:"productClassEdit",params:{id:e.id,type:t}})},handleCheckBrand:function(t,e){this.$router.push({name:"productClassCheck",params:{id:e.id,type:t}})},handleDeleteBrand:function(t,e){var a=this;this.$confirm("确定要删除这个品牌吗?","提示",{type:"warning"}).then(function(){a.DELETE_Brand(e.id)}).catch(function(){})},DELETE_Brand:function(t){var e=this;n.g(t).then(function(){e.$message.success("删除成功!"),e.GET_BrandList()})}}},s=a("XyMi");var r=function(t){a("dj9Y")},o=Object(s.a)(i,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("en-table-layout",{attrs:{tableData:t.tableData.records,loading:t.loading,"selection-change":t.handleSelectionChange}},[a("div",{staticClass:"inner-toolbar",attrs:{slot:"toolbar"},slot:"toolbar"},[a("div",{staticClass:"toolbar-btns"},[t.checkPermission(["productClassAdd"])?a("el-button",{attrs:{size:"mini",type:"primary",icon:"el-icon-circle-plus-outline"},on:{click:t.handleAddBrand}},[t._v("添加")]):t._e()],1),t._v(" "),a("div",{staticClass:"toolbar-search"},[a("en-table-search",{attrs:{placeholder:"请输入品牌名称"},on:{search:t.searchEvent}})],1)]),t._v(" "),a("template",{slot:"table-columns"},[a("el-table-column",{attrs:{type:"selection",width:"100"}}),t._v(" "),a("el-table-column",{attrs:{prop:"name",label:"组合名称"}}),t._v(" "),a("el-table-column",{attrs:{label:"组合说明",prop:"remark"}}),t._v(" "),a("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.checkPermission(["productClassCheck"])?a("el-button",{attrs:{size:"mini"},on:{click:function(a){return t.handleCheckBrand("check",e.row)}}},[t._v("查看")]):t._e(),t._v(" "),t.checkPermission(["productClassEdit"])?a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(a){return t.handleEditBrand("edit",e.row)}}},[t._v("编辑")]):t._e(),t._v(" "),t.checkPermission(["product:remove"])?a("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(a){return t.handleDeleteBrand(e.$index,e.row)}}},[t._v("删除")]):t._e()]}}])})],1),t._v(" "),t.tableData?a("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,r,"data-v-fc0910e8",null);e.default=o.exports}});
|