| | |
| | | <el-button type="primary" @click="confirmExport" :loading="upLoadExport">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="库位维护" :visible.sync="keepVisible" width="350px"> |
| | | <el-dialog title="库位维护" :visible.sync="keepVisible" width="350px" :append-to-body="true"> |
| | | <el-tree :data="warehouse" ref="tree" :props="{ children: 'warehouseShelfList', label: 'name' }" node-key="id" |
| | | :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current @node-expand="nodeOpen" |
| | | @node-collapse="nodeClose" :default-expanded-keys="expandedKeys" v-if="keepVisible" |
| | |
| | | <el-col :span="20"> |
| | | <span><i |
| | | :class="`node_i ${node.level<2 ? 'el-icon-folder-opened': 'el-icon-tickets'}`"></i> |
| | | {{ data.name }}{{ node.level }}</span> |
| | | {{ data.name }}</span> |
| | | </el-col> |
| | | <el-col :span="4" v-if="node.level<3"> |
| | | <el-button type="text" size="mini" icon="el-icon-edit" @click.stop="handleEdit(data,node.level)"> |
| | |
| | | this.entity.shelfId = this.shelf[0].id |
| | | this.handleShelf(this.entity.shelfId) |
| | | } |
| | | }else if(this.warehouse.length>0){ |
| | | this.warehouseChange(this.entity.warehouseId) |
| | | if(this.shelf.length>0){ |
| | | this.entity.shelfId = this.shelf[0].id |
| | | this.handleShelf(this.entity.shelfId) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | |
| | | }).then(res => { |
| | | this.upLoadWarehouse = false; |
| | | this.warehouseVisible = false |
| | | // this.keepVisible = false |
| | | this.currentEdit = null; |
| | | if (res.code == 201) { |
| | | this.$message.error('修改失败') |
| | |
| | | } |
| | | this.$message.success('修改成功') |
| | | this.selectList() |
| | | this.name = '' |
| | | this.warehouseChange(this.entity.warehouseId) |
| | | }) |
| | | }else{ |
| | | // 新增仓库 |
| | |
| | | } |
| | | this.$message.success('添加成功') |
| | | this.selectList() |
| | | this.name = '' |
| | | this.warehouseChange(this.entity.warehouseId) |
| | | }) |
| | | } |
| | | this.name = '' |
| | | this.warehouseChange(this.entity.warehouseId) |
| | | }, |
| | | // 添加/修改货架 |
| | | confirmShelves() { |
| | |
| | | }).then(res => { |
| | | this.upLoadShelves = false; |
| | | this.shelvesVisible = false |
| | | // this.keepVisible = false |
| | | if (res.code == 201) { |
| | | this.$message.error('添加失败') |
| | | this.$message.error('修改失败') |
| | | return |
| | | } |
| | | this.$message.success('添加成功') |
| | | this.$message.success('修改成功') |
| | | this.selectList() |
| | | this.currentEdit ={}; |
| | | }) |
| | |
| | | }, |
| | | nodeOpen(data, node, el) { |
| | | $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder-opened') |
| | | this.selectTree[node.level-1] = data.id; |
| | | }, |
| | | nodeClose(data, node, el) { |
| | | $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder') |