From 76d7b41e85ccc6e5eb7a7f236d5a1e7c574dc778 Mon Sep 17 00:00:00 2001 From: wangwei <1610949092@qq.com> Date: Wed, 25 Sep 2024 17:29:35 +0800 Subject: [PATCH] 9/24 1.0 --- src/views/basic/product/drug/drugAdd.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/views/basic/product/drug/drugAdd.vue b/src/views/basic/product/drug/drugAdd.vue index 6324492c..4cd0ec74 100644 --- a/src/views/basic/product/drug/drugAdd.vue +++ b/src/views/basic/product/drug/drugAdd.vue @@ -665,7 +665,7 @@ export default { }, detailList: [ // 初始化一个空对象或包含默认值的对象 - {nameCode: '', packLevel: null, bhxjsl: null, isDisabled: false, isUpDisabled: true, rowDisabled: false} + {productId: null ,nameCode: '', packLevel: null, bhxjsl: null, isDisabled: false, isUpDisabled: true, rowDisabled: false} ], status: false, rowDisabled: false, @@ -837,7 +837,7 @@ export default { //层级保存 levelSave(row) { - console.log("djdjdjjd",row) + if (isBlank(row.nameCode)) { this.$message.error('层级标识不能为空') return @@ -850,6 +850,7 @@ export default { this.$message.error('层级单位不能为空') return } + console.log("djfjfjjf",row.productId) let editQuery = { nameCode: row.nameCode, packLevel: row.packLevel, @@ -859,7 +860,7 @@ export default { bhxjsl: row.bhxjsl, relId: this.newProductData.id, uuid: this.newProductData.uuid, - productId:this.newProductData.productId + productId:row.productId } updateLevelDrug(editQuery).then(res => { this.saveLoading = false @@ -867,9 +868,7 @@ export default { this.isSave = true this.$message.success('保存成功!') this.selectedIndex = null - if (this.newProductData.id != null) { - this.getDetailList() - } + this.getDetailList() } else { this.isSave = true this.$message.error(res.message) @@ -897,6 +896,7 @@ export default { rowChange(index, val) { this.selectedIndex = index + this.isSave = false },