fix: แก้ให้ นิติบุคคล กับ บุคธรรมดาใช้ด้วยกันได้

This commit is contained in:
Net 2024-06-06 17:09:59 +07:00
parent 32dc0cf28a
commit f389961a98
2 changed files with 87 additions and 38 deletions

View file

@ -1,7 +1,9 @@
<script setup lang="ts">
import { ref } from 'vue';
const thaiName = ref<string>('');
const EngName = ref<string>('');
const customerName = defineModel<string>('customerName');
const customerNameEn = defineModel<string>('customerNameEn');
const taxNo = defineModel<string | null | undefined>('taxNo');
const employerID = defineModel<string>('employerID');
defineProps<{
title?: string;
@ -9,6 +11,7 @@ defineProps<{
outlined?: boolean;
readonly?: boolean;
separator?: boolean;
typeCustomer?: string;
}>();
</script>
@ -17,6 +20,29 @@ defineProps<{
{{ $t(`formDialogTitleInformation`) }}
</div>
<div class="col-9 row q-col-gutter-md">
<q-input
v-if="typeCustomer === 'customerNaturalPerson'"
:dense="dense"
:outlined="!readonly"
:readonly="true"
:borderless="readonly"
hide-bottom-space
class="col-6"
:label="$t('formDialogEmployerID')"
v-model="employerID"
/>
<q-input
v-if="typeCustomer === 'customerNaturalPerson'"
:dense="dense"
:outlined="!readonly"
:readonly="readonly"
:borderless="readonly"
hide-bottom-space
class="col-6"
:label="$t('taxNo')"
v-model="taxNo"
/>
<q-input
:dense="dense"
:outlined="!readonly"
@ -25,7 +51,7 @@ defineProps<{
hide-bottom-space
class="col-6"
:label="$t('corporationThaiName')"
v-model="thaiName"
v-model="customerName"
/>
<q-input
:dense="dense"
@ -35,7 +61,7 @@ defineProps<{
hide-bottom-space
class="col-6"
:label="$t('corporationEnglishName')"
v-model="EngName"
v-model="customerNameEn"
/>
</div>