From f310bae9037704212a5626ed26a32bd4182a3508 Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期三, 08 五月 2024 20:50:21 +0800 Subject: [PATCH] 完成样品管理bug --- src/components/view/b1-sample.vue | 23 +++++++++++++++++------ 1 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/components/view/b1-sample.vue b/src/components/view/b1-sample.vue index f87b81d..d35359e 100644 --- a/src/components/view/b1-sample.vue +++ b/src/components/view/b1-sample.vue @@ -292,7 +292,7 @@ <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" @@ -302,7 +302,7 @@ <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)"> @@ -895,6 +895,12 @@ 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) + } } }) }, @@ -979,6 +985,7 @@ }).then(res => { this.upLoadWarehouse = false; this.warehouseVisible = false + // this.keepVisible = false this.currentEdit = null; if (res.code == 201) { this.$message.error('淇敼澶辫触') @@ -986,6 +993,8 @@ } this.$message.success('淇敼鎴愬姛') this.selectList() + this.name = '' + this.warehouseChange(this.entity.warehouseId) }) }else{ // 鏂板浠撳簱 @@ -1000,10 +1009,10 @@ } this.$message.success('娣诲姞鎴愬姛') this.selectList() + this.name = '' + this.warehouseChange(this.entity.warehouseId) }) } - this.name = '' - this.warehouseChange(this.entity.warehouseId) }, // 娣诲姞/淇敼璐ф灦 confirmShelves() { @@ -1031,11 +1040,12 @@ }).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 ={}; }) @@ -1070,6 +1080,7 @@ }, 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') -- Gitblit v1.9.3