| | |
| | | <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, 4)" icon="el-icon-plus">新建</el-button></li> |
| | | <li><el-button type="primary" @click="$refs.operaGoodsCategoryEditWindow.open('新建行李类型', null, 4)" icon="el-icon-plus">新建</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | :height="tableHeightNew" |
| | |
| | | > |
| | | <el-table-column prop="id" label="ID" min-width="80px"></el-table-column> |
| | | <el-table-column prop="name" label="行李类型" min-width="120px"></el-table-column> |
| | | <el-table-column prop="detail" label="是否特大尺寸" min-width="120px"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.detail == 1? '是' : '否' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remark" label="备注说明" min-width="200px"></el-table-column> |
| | | <el-table-column prop="sortnum" label="排序" min-width="100px"></el-table-column> |
| | | <el-table-column prop="createTime" label="提交时间" min-width="100px"></el-table-column> |
| | |
| | | <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> |
| | |
| | | return { |
| | | searchForm: { |
| | | name: '', |
| | | status:'', |
| | | type: 4 |
| | | } |
| | | } |
| | |
| | | }, |
| | | methods: { |
| | | handleEdit (row) { |
| | | this.$refs.operaGoodsCategoryEditWindow.open('编辑物品等级', row, 4) |
| | | this.$refs.operaGoodsCategoryEditWindow.open('编辑行李类型', row, 4) |
| | | }, |
| | | handleStatusChange (val, row) { |
| | | updateStatus({ id: row.id, status: val }).then(res => { |