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