refactor: edit create branch
This commit is contained in:
parent
a0c8a2153e
commit
208649f5bb
1 changed files with 1 additions and 12 deletions
|
|
@ -467,13 +467,6 @@ function triggerCreate(
|
||||||
) {
|
) {
|
||||||
formTypeBranch.value = type;
|
formTypeBranch.value = type;
|
||||||
|
|
||||||
if (type === 'headOffice') {
|
|
||||||
currentHq.value = {
|
|
||||||
id: id ?? '',
|
|
||||||
code: code ?? '',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type === 'subBranch' && id && code) {
|
if (type === 'subBranch' && id && code) {
|
||||||
isSubCreate.value = true;
|
isSubCreate.value = true;
|
||||||
formData.value.headOfficeId = id;
|
formData.value.headOfficeId = id;
|
||||||
|
|
@ -873,11 +866,7 @@ watch(currentHq, () => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="
|
@click="
|
||||||
() => {
|
() => {
|
||||||
if (!currentHq.id) {
|
triggerCreate('headOffice');
|
||||||
triggerCreate('headOffice');
|
|
||||||
} else {
|
|
||||||
modelCreateTypeBranch = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue