refactor: เพิ่ม input

This commit is contained in:
Net 2024-07-03 17:50:20 +07:00
parent f6e15a19a3
commit 11f90445f8
2 changed files with 35 additions and 3 deletions

View file

@ -17,8 +17,7 @@ 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 branchNo = defineModel<number>('branchNo');
const employerBranchCode = defineModel<string>('employerBranchCode');
</script> </script>
<template> <template>
@ -35,7 +34,19 @@ const employerBranchCode = defineModel<string>('employerBranchCode');
hide-bottom-space hide-bottom-space
class="col-3" class="col-3"
:label="$t('branchCode')" :label="$t('branchCode')"
v-model="employerBranchCode" v-model="branchCode"
/>
<q-input
for="input-branchCode"
id="input-branchCode"
:dense="dense"
outlined
:readonly="!!branchCode"
hide-bottom-space
class="col-3"
label="ลำดับที่"
v-model="branchNo"
/> />
<q-input <q-input

View file

@ -5,6 +5,7 @@ import { onMounted, ref } from 'vue';
const personName = defineModel<string>('personName'); const personName = defineModel<string>('personName');
const customerName = defineModel<string>('customerName'); const customerName = defineModel<string>('customerName');
const customerNameEn = defineModel<string>('customerNameEn'); const customerNameEn = defineModel<string>('customerNameEn');
const registeredBranchId = defineModel<string>('registeredBranchId');
const taxNo = defineModel<string | null | undefined>('taxNo'); const taxNo = defineModel<string | null | undefined>('taxNo');
const employerID = defineModel<string>('employerID'); const employerID = defineModel<string>('employerID');
@ -29,6 +30,7 @@ defineProps<{
separator?: boolean; separator?: boolean;
typeCustomer?: string; typeCustomer?: string;
employee?: boolean; employee?: boolean;
optionsBranch?: { id: string; name: string }[];
employeeOwnerOption?: CustomerBranch[]; employeeOwnerOption?: CustomerBranch[];
}>(); }>();
@ -45,6 +47,25 @@ onMounted(async () => {});
{{ $t(`formDialogTitleInformation`) }} {{ $t(`formDialogTitleInformation`) }}
</div> </div>
<div v-if="!employee" class="col-9 row q-col-gutter-md"> <div v-if="!employee" class="col-9 row q-col-gutter-md">
<q-select
id="input-source-nationality"
:dense="dense"
outlined
:readonly="readonly"
:hide-dropdown-icon="readonly"
hide-bottom-space
emit-value
map-options
options-dense
:label="$t('registeredBranch')"
class="col-12"
option-label="name"
option-value="id"
v-model="registeredBranchId"
:options="optionsBranch"
:rules="[(val) => !!val]"
/>
<q-input <q-input
for="input-employer-id" for="input-employer-id"
id="input-employer-id" id="input-employer-id"