From 05779c760c1e3d56fb82489f36dccd340c854f1c Mon Sep 17 00:00:00 2001 From: puriphatt Date: Fri, 4 Oct 2024 09:45:05 +0700 Subject: [PATCH] fix: quotation select --- src/components/05_quotation/FormAbout.vue | 21 ++++++++++++--------- src/components/DialogForm.vue | 2 +- src/components/DrawerInfo.vue | 2 +- src/components/shared/SelectInput.vue | 3 +++ src/pages/05_quotation/MainPage.vue | 1 + 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/components/05_quotation/FormAbout.vue b/src/components/05_quotation/FormAbout.vue index 0d7a5dac..af6309bc 100644 --- a/src/components/05_quotation/FormAbout.vue +++ b/src/components/05_quotation/FormAbout.vue @@ -17,13 +17,15 @@ const agentPrice = defineModel('agentPrice'); const branchOption = ref(); const customerOption = ref(); -defineProps<{ +const props = defineProps<{ outlined?: boolean; readonly?: boolean; separator?: boolean; employee?: boolean; title?: string; inputOnly?: boolean; + + onCreate?: boolean; }>(); defineEmits<{ @@ -83,14 +85,14 @@ onMounted(async () => { await init('', 'customer'); }); -// watch( -// () => branchId.value, -// async (v) => { -// if (v) { -// customerBranchId.value = ''; -// } -// }, -// ); +watch( + () => branchId.value, + async (v) => { + if (v && props.onCreate) { + customerBranchId.value = ''; + } + }, +);