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();
|
clearData();
|
||||||
|
|
||||||
formTypeBranch.value = type;
|
formTypeBranch.value = type;
|
||||||
currentHq.value = {
|
|
||||||
id: id ?? '',
|
if (type === 'headOffice') {
|
||||||
code: code ?? '',
|
currentHq.value = {
|
||||||
};
|
id: id ?? '',
|
||||||
|
code: code ?? '',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
formType.value = 'create';
|
formType.value = 'create';
|
||||||
openDialog();
|
openDialog();
|
||||||
|
|
@ -477,7 +480,15 @@ watch(locale, () => {
|
||||||
icon="pixelarticons:plus"
|
icon="pixelarticons:plus"
|
||||||
height="26"
|
height="26"
|
||||||
class="color-icon-plus cursor-pointer"
|
class="color-icon-plus cursor-pointer"
|
||||||
@click="triggerCreate('headOffice')"
|
@click="
|
||||||
|
() => {
|
||||||
|
if (!currentHq.id) {
|
||||||
|
triggerCreate('headOffice');
|
||||||
|
} else {
|
||||||
|
triggerCreate('subBranch');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue