diff --git a/src/views/basic/product/productEdit.vue b/src/views/basic/product/productEdit.vue index efdc1abc..b550b9dc 100644 --- a/src/views/basic/product/productEdit.vue +++ b/src/views/basic/product/productEdit.vue @@ -1274,6 +1274,7 @@ export default { }, isSave: true, selectedIndex: null, + editRowSwitch: false //产品标识编辑开关 没保存前其他编辑不能按 } @@ -1713,6 +1714,7 @@ export default { this.editQuery = row; }, //层级保存 levelSave(row) { + this.editRowSwitch = false if (isBlank(row.nameCode)) { this.$message.error('层级标识不能为空') return @@ -1767,12 +1769,19 @@ export default { }) }, rowChange(index, val) { + + if(this.editRowSwitch == true ){ + this.$message.error('请先保存当前产品标识编辑') + return + } + console.log("rowChange===",index) this.selectedIndex = index - this.isSave = false + this.editRowSwitch = true }, + deleteLevel(index, row) { this.$confirm('此操作将删除该层级,是否继续?', '提示', { confirmButtonText: '确定',