| | |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:productlabel:create', 'business:productlabel:delete']"> |
| | | <li><el-button type="primary" @click="$refs.operaProductLabelWindow.open('新建商品分类')" icon="el-icon-plus" v-permissions="['business:productlabel:create']">新建</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:productlabel:delete']">删除</el-button></li> |
| | | <li><el-button type="danger" @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:productlabel:delete']">删除</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.operaProductLabelWindow.open('编辑商品分类', row)" icon="el-icon-edit" v-permissions="['business:productlabel:update']">编辑</el-button> |
| | | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:productlabel:delete']">删除</el-button> |
| | | <el-button type="text" style="color: red;" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:productlabel:delete']">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaGoodsLabelsWindow from '@/components/business/OperaGoodsLabelsWindow' |
| | | import {updateStatusById} from "@/api/business/labels"; |
| | | export default { |
| | | name: 'ProductLabel', |
| | | extends: BaseTable, |
| | |
| | | }, |
| | | methods: { |
| | | statusChange (row) { |
| | | this.api.updateById({ id: row.id, status: row.status }) |
| | | this.api.updateStatusById({ id: row.id, status: row.status }) |
| | | .then(() => { |
| | | this.$message.success('操作成功') |
| | | }) |