fix(04): group tree action
This commit is contained in:
parent
3c30d70246
commit
2da804f17e
1 changed files with 7 additions and 4 deletions
|
|
@ -466,6 +466,7 @@ const currentIdGrop = ref<string>('');
|
|||
const currentIdType = ref<string>('');
|
||||
const currentIdService = ref<string>('');
|
||||
const currentIdProduct = ref<string>('');
|
||||
const currentIdGropTree = ref<string>('');
|
||||
|
||||
const currentStatusGroupType = ref<Status>('CREATED');
|
||||
const currentIdGroupType = ref('');
|
||||
|
|
@ -1144,7 +1145,9 @@ async function submitProduct() {
|
|||
|
||||
async function submitGroup() {
|
||||
if (drawerInfo.value) {
|
||||
await editProductService(currentIdGrop.value, formDataGroup.value);
|
||||
if (currentIdGropTree.value)
|
||||
await editProductService(currentIdGropTree.value, formDataGroup.value);
|
||||
else await editProductService(currentIdGrop.value, formDataGroup.value);
|
||||
} else {
|
||||
const res = await createProductService(formDataGroup.value);
|
||||
|
||||
|
|
@ -1153,6 +1156,7 @@ async function submitGroup() {
|
|||
}
|
||||
}
|
||||
|
||||
currentIdGropTree.value = '';
|
||||
drawerInfo.value = false;
|
||||
await fetchListGroups();
|
||||
clearFormGroup();
|
||||
|
|
@ -1587,7 +1591,7 @@ watch(
|
|||
clearFormGroup();
|
||||
assignFormDataGroup(v);
|
||||
isEdit = false;
|
||||
currentIdGrop = v.id;
|
||||
currentIdGropTree = v.id;
|
||||
drawerInfo = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -1606,8 +1610,7 @@ watch(
|
|||
clearFormGroup();
|
||||
assignFormDataGroup(v);
|
||||
isEdit = true;
|
||||
currentIdGrop = v.id;
|
||||
|
||||
currentIdGropTree = v.id;
|
||||
drawerInfo = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue