fix: 修改

20240912_adapter_z
chenhc 10 months ago
parent 9569c8e54a
commit f1de28664f

@ -84,7 +84,7 @@
type="text" type="text"
size="small" size="small"
@click.stop="true" @click.stop="true"
:disabled="scope.$index == selectedIndex || scope.row.id == null" :disabled=" scope.row.id != null"
@click.native="deleteLevel(scope.$index, scope.row)" @click.native="deleteLevel(scope.$index, scope.row)"
>删除 >删除
</el-button> </el-button>
@ -719,6 +719,7 @@ export default {
this.saveLoading = false this.saveLoading = false
if (res.code == 20000) { if (res.code == 20000) {
this.$message.success("保存成功!"); this.$message.success("保存成功!");
this.selectedIndex = null
if (this.newProductData.id != null) if (this.newProductData.id != null)
this.getDetailList(); this.getDetailList();
} else { } else {
@ -740,6 +741,7 @@ export default {
rowDisabled: false, rowDisabled: false,
isUpDisabled: true isUpDisabled: true
}); });
this.selectedIndex = this.detailList.length -1
}, },
@ -753,25 +755,30 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
let params = {nameCode: row.nameCode}; if (row.id != null){
delDrugLevel(params).then((res) => { let params = {nameCode: row.nameCode};
if (res.code === 20000) { delDrugLevel(params).then((res) => {
this.$message.success("删除成功"); if (res.code === 20000) {
this.getList(); this.$message.success("删除成功");
} this.getDetailList();
}) }
})
} else {
this.detailList.splice(index, 1);
this.$message.success("删除成功");
}
}).catch(() => { }).catch(() => {
}); });
}, },
// //
getDetailList() { getDetailList() {
this.loading = true;
if (this.newProductData.uuid != null) { if (this.newProductData.uuid != null) {
let query = { let query = {
uuid: this.newProductData.uuid, uuid: this.newProductData.uuid,
id: this.newProductData.id id: this.newProductData.id
} }
this.loading = true;
filterByUuid(query) filterByUuid(query)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
@ -836,6 +843,8 @@ export default {
this.status = false this.status = false
} }
this.getDetailList(); this.getDetailList();
}else {
this.selectedIndex = 0
} }
}, },
directives: { directives: {

Loading…
Cancel
Save