| | |
| | | <div class="top"> |
| | | <SearchCommonView |
| | | :add-title="'新建'" |
| | | :placeholder="'请输入单号'" |
| | | :placeholder="'请输入位置'" |
| | | :amount-view="false" |
| | | :search-task-map="searchTaskMap" |
| | | @addCommonClick="addBtnClick" |
| | |
| | | <div class="table"> |
| | | <TableCommonView ref="tableListRef" :table-list="tableList" :show-checkcol="false"> |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="120" fixed="right"> |
| | | <el-table-column label="操作" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="tableRowClick(scope.row, 'edit')" type="text" size="small">编辑</el-button> |
| | | <el-button type="text" size="small" @click="tableRowClick(scope.row, 'look')">查看</el-button> |
| | | <el-button type="text" size="small" @click.stop="deleteRow(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | |
| | | |
| | | <script> |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | import { getLocationList } from "@/api/warehouseManage/warehouse" |
| | | import { getLocationList,deleteLocation } from "@/api/warehouseManage/warehouse" |
| | | import AddDialog from "@/views/warehouseManage/position/AddDialog" |
| | | import { getDataByType } from "@/api/data" |
| | | export default { |
| | |
| | | delSelectClick() { |
| | | this.type = 0 |
| | | this.getData() |
| | | }, |
| | | |
| | | //删除 |
| | | deleteRow(row){ |
| | | this.$confirm('此操作将永久删除该位置, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then(() => { |
| | | deleteLocation({ |
| | | id: row.id, |
| | | }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '删除成功!', |
| | | }) |
| | | this.getData() |
| | | }else{ |
| | | this.$message.error('删除时出错,请稍后重试或联系管理员...'); |
| | | } |
| | | }) |
| | | }).catch(() => {}) |
| | | } |
| | | } |
| | | } |