fix: แก้ ปุ่มกด เพิ่ม สาาขา
This commit is contained in:
parent
2a911b84b6
commit
d073361a93
1 changed files with 16 additions and 5 deletions
|
|
@ -229,10 +229,13 @@ function triggerCreate(
|
|||
clearData();
|
||||
|
||||
formTypeBranch.value = type;
|
||||
currentHq.value = {
|
||||
id: id ?? '',
|
||||
code: code ?? '',
|
||||
};
|
||||
|
||||
if (type === 'headOffice') {
|
||||
currentHq.value = {
|
||||
id: id ?? '',
|
||||
code: code ?? '',
|
||||
};
|
||||
}
|
||||
|
||||
formType.value = 'create';
|
||||
openDialog();
|
||||
|
|
@ -477,7 +480,15 @@ watch(locale, () => {
|
|||
icon="pixelarticons:plus"
|
||||
height="26"
|
||||
class="color-icon-plus cursor-pointer"
|
||||
@click="triggerCreate('headOffice')"
|
||||
@click="
|
||||
() => {
|
||||
if (!currentHq.id) {
|
||||
triggerCreate('headOffice');
|
||||
} else {
|
||||
triggerCreate('subBranch');
|
||||
}
|
||||
}
|
||||
"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue