fix: แก้ให้ นิติบุคคล กับ บุคธรรมดาใช้ด้วยกันได้
This commit is contained in:
parent
32dc0cf28a
commit
f389961a98
2 changed files with 87 additions and 38 deletions
|
|
@ -6,16 +6,19 @@ defineProps<{
|
||||||
outlined?: boolean;
|
outlined?: boolean;
|
||||||
readonly?: boolean;
|
readonly?: boolean;
|
||||||
separator?: boolean;
|
separator?: boolean;
|
||||||
|
typeCustomer?: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const branchCode = defineModel<string>('branchCode');
|
const branchCode = defineModel<string>('branchCode');
|
||||||
const legalEntityCode = defineModel<string>('legalEntityCode');
|
const legalEntityCode = defineModel<string>('legalEntityCode');
|
||||||
const taxNo = defineModel<string>('taxNo');
|
const taxNo = defineModel<string | null | undefined>('taxNo');
|
||||||
const customerName = defineModel<string>('customerName');
|
const customerName = defineModel<string>('customerName');
|
||||||
const customerEnglishName = defineModel<string>('customerEnglishName');
|
const customerEnglishName = defineModel<string>('customerEnglishName');
|
||||||
const authorizedCapital = defineModel<string>('authorizedCapital');
|
const authorizedCapital = defineModel<string>('authorizedCapital');
|
||||||
const registerName = defineModel<string>('registerName');
|
const registerName = defineModel<string>('registerName');
|
||||||
const registerDate = defineModel<Date | null>('registerDate');
|
const registerDate = defineModel<Date | null>('registerDate');
|
||||||
|
|
||||||
|
const employerBranchCode = defineModel<string>('employerBranchCode');
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -23,47 +26,64 @@ const registerDate = defineModel<Date | null>('registerDate');
|
||||||
<div class="col-3 app-text-muted">• {{ $t(`about`) }}</div>
|
<div class="col-3 app-text-muted">• {{ $t(`about`) }}</div>
|
||||||
<div class="col-9 row q-col-gutter-md">
|
<div class="col-9 row q-col-gutter-md">
|
||||||
<q-input
|
<q-input
|
||||||
|
v-if="typeCustomer === 'customerNaturalPerson'"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
:readonly="readonly"
|
:readonly="true"
|
||||||
:borderless="readonly"
|
|
||||||
hide-bottom-space
|
|
||||||
class="col-3"
|
|
||||||
:label="$t('branchCode')"
|
|
||||||
v-model="branchCode"
|
|
||||||
/>
|
|
||||||
<q-input
|
|
||||||
:dense="dense"
|
|
||||||
:outlined="!readonly"
|
|
||||||
:readonly="readonly"
|
|
||||||
:borderless="readonly"
|
|
||||||
hide-bottom-space
|
|
||||||
class="col-4"
|
|
||||||
:label="$t('legalEntityCode')"
|
|
||||||
v-model="legalEntityCode"
|
|
||||||
/>
|
|
||||||
<q-input
|
|
||||||
:dense="dense"
|
|
||||||
:outlined="!readonly"
|
|
||||||
:readonly="readonly"
|
|
||||||
:borderless="readonly"
|
|
||||||
hide-bottom-space
|
|
||||||
class="col-5"
|
|
||||||
:label="$t('taxNo')"
|
|
||||||
v-model="taxNo"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<q-input
|
|
||||||
:dense="dense"
|
|
||||||
:outlined="!readonly"
|
|
||||||
:readonly="readonly"
|
|
||||||
:borderless="readonly"
|
:borderless="readonly"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-6"
|
class="col-6"
|
||||||
|
:label="$t('formDialogEmployerRanchCode')"
|
||||||
|
v-model="employerBranchCode"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div class="row q-col-gutter-md">
|
||||||
|
<q-input
|
||||||
|
v-if="typeCustomer === 'customerLegalEntity'"
|
||||||
|
:dense="dense"
|
||||||
|
:outlined="!readonly"
|
||||||
|
:readonly="true"
|
||||||
|
:borderless="readonly"
|
||||||
|
hide-bottom-space
|
||||||
|
class="col-3"
|
||||||
|
:label="$t('branchCode')"
|
||||||
|
v-model="branchCode"
|
||||||
|
/>
|
||||||
|
<q-input
|
||||||
|
v-if="typeCustomer === 'customerLegalEntity'"
|
||||||
|
:dense="dense"
|
||||||
|
:outlined="!readonly"
|
||||||
|
:readonly="true"
|
||||||
|
:borderless="readonly"
|
||||||
|
hide-bottom-space
|
||||||
|
class="col-4"
|
||||||
|
:label="$t('legalEntityCode')"
|
||||||
|
v-model="legalEntityCode"
|
||||||
|
/>
|
||||||
|
<q-input
|
||||||
|
v-if="typeCustomer === 'customerLegalEntity'"
|
||||||
|
:dense="dense"
|
||||||
|
:outlined="!readonly"
|
||||||
|
:readonly="readonly"
|
||||||
|
:borderless="readonly"
|
||||||
|
hide-bottom-space
|
||||||
|
class="col-5"
|
||||||
|
:label="$t('taxNo')"
|
||||||
|
v-model="taxNo"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<q-input
|
||||||
|
:dense="dense"
|
||||||
|
:outlined="!readonly"
|
||||||
|
:readonly="readonly"
|
||||||
|
:borderless="readonly"
|
||||||
|
hide-bottom-space
|
||||||
|
class="col"
|
||||||
:label="$t('customerName')"
|
:label="$t('customerName')"
|
||||||
v-model="customerName"
|
v-model="customerName"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
|
v-if="typeCustomer === 'customerLegalEntity'"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
@ -74,6 +94,7 @@ const registerDate = defineModel<Date | null>('registerDate');
|
||||||
v-model="customerEnglishName"
|
v-model="customerEnglishName"
|
||||||
/>
|
/>
|
||||||
<VueDatePicker
|
<VueDatePicker
|
||||||
|
v-if="typeCustomer === 'customerLegalEntity'"
|
||||||
:teleport="true"
|
:teleport="true"
|
||||||
utc
|
utc
|
||||||
autoApply
|
autoApply
|
||||||
|
|
@ -117,6 +138,7 @@ const registerDate = defineModel<Date | null>('registerDate');
|
||||||
</template>
|
</template>
|
||||||
</VueDatePicker>
|
</VueDatePicker>
|
||||||
<q-input
|
<q-input
|
||||||
|
v-if="typeCustomer === 'customerLegalEntity'"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
@ -127,6 +149,7 @@ const registerDate = defineModel<Date | null>('registerDate');
|
||||||
v-model="authorizedCapital"
|
v-model="authorizedCapital"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
|
v-if="typeCustomer === 'customerLegalEntity'"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
const customerName = defineModel<string>('customerName');
|
||||||
const thaiName = ref<string>('');
|
const customerNameEn = defineModel<string>('customerNameEn');
|
||||||
const EngName = ref<string>('');
|
const taxNo = defineModel<string | null | undefined>('taxNo');
|
||||||
|
|
||||||
|
const employerID = defineModel<string>('employerID');
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
title?: string;
|
title?: string;
|
||||||
|
|
@ -9,6 +11,7 @@ defineProps<{
|
||||||
outlined?: boolean;
|
outlined?: boolean;
|
||||||
readonly?: boolean;
|
readonly?: boolean;
|
||||||
separator?: boolean;
|
separator?: boolean;
|
||||||
|
typeCustomer?: string;
|
||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -17,6 +20,29 @@ defineProps<{
|
||||||
• {{ $t(`formDialogTitleInformation`) }}
|
• {{ $t(`formDialogTitleInformation`) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-9 row q-col-gutter-md">
|
<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
|
<q-input
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="!readonly"
|
:outlined="!readonly"
|
||||||
|
|
@ -25,7 +51,7 @@ defineProps<{
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-6"
|
class="col-6"
|
||||||
:label="$t('corporationThaiName')"
|
:label="$t('corporationThaiName')"
|
||||||
v-model="thaiName"
|
v-model="customerName"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
|
|
@ -35,7 +61,7 @@ defineProps<{
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-6"
|
class="col-6"
|
||||||
:label="$t('corporationEnglishName')"
|
:label="$t('corporationEnglishName')"
|
||||||
v-model="EngName"
|
v-model="customerNameEn"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue