fix: แก้ กด ดูรายละเอียดเเล้ว สาขา แสดง
This commit is contained in:
parent
8358f5fcfb
commit
0bc0c2efa9
1 changed files with 16 additions and 12 deletions
|
|
@ -277,17 +277,18 @@ async function triggerEdit(
|
||||||
code: currentRecord.code,
|
code: currentRecord.code,
|
||||||
};
|
};
|
||||||
|
|
||||||
const currentRecordHead = branchData.value.result.find(
|
if (typeBranch === 'subBranch') {
|
||||||
(x) => x.id === currentRecord.headOfficeId,
|
const currentRecordHead = branchData.value.result.find(
|
||||||
);
|
(x) => x.id === currentRecord.headOfficeId,
|
||||||
|
);
|
||||||
|
|
||||||
if (currentRecordHead) {
|
if (currentRecordHead) {
|
||||||
currentHq.value.id = currentRecordHead.id;
|
currentHq.value.id = currentRecordHead.id;
|
||||||
currentHq.value.code = currentRecordHead.code;
|
currentHq.value.code = currentRecordHead.code;
|
||||||
} else {
|
} else {
|
||||||
currentHq.value = currentEdit.value;
|
currentHq.value = currentEdit.value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
formTypeBranch.value = typeBranch;
|
formTypeBranch.value = typeBranch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -505,7 +506,7 @@ watch(locale, () => {
|
||||||
style="height: 50px; display: flex; align-items: center"
|
style="height: 50px; display: flex; align-items: center"
|
||||||
>
|
>
|
||||||
<Icon icon="flowbite:home-solid" width="24px" class="q-mr-md" />
|
<Icon icon="flowbite:home-solid" width="24px" class="q-mr-md" />
|
||||||
ทั้งหมด
|
{{ $t('all') }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-tree
|
<q-tree
|
||||||
|
|
@ -542,7 +543,7 @@ watch(locale, () => {
|
||||||
<q-list v-close-popup>
|
<q-list v-close-popup>
|
||||||
<q-item
|
<q-item
|
||||||
:id="`view-detail-btn-${node.name}-view`"
|
:id="`view-detail-btn-${node.name}-view`"
|
||||||
@click="
|
@click.stop="
|
||||||
if (node.isHeadOffice) {
|
if (node.isHeadOffice) {
|
||||||
triggerEdit('drawer', node.id, 'headOffice');
|
triggerEdit('drawer', node.id, 'headOffice');
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -790,8 +791,11 @@ watch(locale, () => {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!!currentHq.id && currentHq.id === v.headOfficeId)
|
if (!!currentHq.id && currentHq.id === v.headOfficeId) {
|
||||||
|
console.log('ทำงาน');
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
if (fieldSelectedBranch.value === 'all') return true;
|
if (fieldSelectedBranch.value === 'all') return true;
|
||||||
if (fieldSelectedBranch.value === 'branchHQLabel')
|
if (fieldSelectedBranch.value === 'branchHQLabel')
|
||||||
return v.isHeadOffice;
|
return v.isHeadOffice;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue