| | |
| | | <template> |
| | | <TableLayout :permissions="['business:category:query']"> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="名称" prop="name"> |
| | | <el-input v-model="searchForm.name" clearable placeholder="请输入名称" @keypress.enter.native="search"></el-input> |
| | | <el-form-item label="物品名称" prop="name"> |
| | | <el-input v-model="searchForm.name" clearable placeholder="请输入物品名称" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-select v-model="searchForm.status" clearable placeholder="请选择状态" @change="search"> |
| | | <el-option label="正常" :value="0"></el-option> |
| | | <el-option label="停用" :value="1"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">搜索</el-button> |
| | |
| | | </el-form> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar"> |
| | | <li><el-button type="primary" @click="$refs.operaGoodsCategoryEditWindow.open('新建物品分类', null, 2)" icon="el-icon-plus">新建</el-button></li> |
| | | <li><el-button type="primary" @click="$refs.operaGoodsCategoryEditWindow.open('新建物品名称', null, 2)" icon="el-icon-plus">新建</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | :height="tableHeightNew" |
| | |
| | | <el-table-column label="操作" min-width="150" fixed="right"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="handleEdit(row)">编辑</el-button> |
| | | <el-button type="text" @click="deleteById(row.id)">删除</el-button> |
| | | <el-button type="text" style="color: red;" @click="deleteById(row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | }, |
| | | methods: { |
| | | handleEdit (row) { |
| | | this.$refs.operaGoodsCategoryEditWindow.open('编辑物品分类', row, 2) |
| | | this.$refs.operaGoodsCategoryEditWindow.open('编辑物品名称', row, 2) |
| | | }, |
| | | handleStatusChange (val, row) { |
| | | updateStatus({ id: row.id, status: val }).then(res => { |