Merge branch 'dev/phat-2' into develop
This commit is contained in:
commit
bd16d0695f
13 changed files with 247 additions and 74 deletions
|
|
@ -74,20 +74,20 @@ watch(districtId, fetchSubDistrict);
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="col-12 app-text-muted">
|
<div class="col-12 app-text-muted">
|
||||||
• {{ title || 'ข้อมูลที่อยู่พนักงาน' }}
|
• {{ title || $t('formDialogTitlePersonnelAddress') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 row q-col-gutter-y-md">
|
<div class="col-12 row q-col-gutter-y-md">
|
||||||
<div class="col-3 q-pl-xl app-text-muted">
|
<div class="col-3 q-pl-xl app-text-muted">
|
||||||
{{ addressTitle || 'ที่อยู่' }}
|
{{ addressTitle || $t('formDialogTitleAddressPure') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-9 row q-col-gutter-md">
|
<div class="col-9 row q-col-gutter-md">
|
||||||
<q-input
|
<q-input
|
||||||
|
id="input-address"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:borderless="readonly"
|
:borderless="readonly"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
id="addr-input"
|
|
||||||
:label="$t('address')"
|
:label="$t('address')"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
v-model="address"
|
v-model="address"
|
||||||
|
|
@ -98,6 +98,7 @@ watch(districtId, fetchSubDistrict);
|
||||||
]"
|
]"
|
||||||
/>
|
/>
|
||||||
<q-select
|
<q-select
|
||||||
|
id="select-province"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
|
|
@ -106,7 +107,6 @@ watch(districtId, fetchSubDistrict);
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
id="select-province"
|
|
||||||
v-model="provinceId"
|
v-model="provinceId"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
|
@ -121,6 +121,7 @@ watch(districtId, fetchSubDistrict);
|
||||||
@update:model-value="districtId = subDistrictId = zipCode = null"
|
@update:model-value="districtId = subDistrictId = zipCode = null"
|
||||||
/>
|
/>
|
||||||
<q-select
|
<q-select
|
||||||
|
id="select-district"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
|
|
@ -129,7 +130,6 @@ watch(districtId, fetchSubDistrict);
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
id="select-district"
|
|
||||||
v-model="districtId"
|
v-model="districtId"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
|
@ -144,6 +144,7 @@ watch(districtId, fetchSubDistrict);
|
||||||
@update:model-value="subDistrictId = zipCode = null"
|
@update:model-value="subDistrictId = zipCode = null"
|
||||||
/>
|
/>
|
||||||
<q-select
|
<q-select
|
||||||
|
id="select-sub-district"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
|
|
@ -152,7 +153,6 @@ watch(districtId, fetchSubDistrict);
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
id="select-sub-district"
|
|
||||||
v-model="subDistrictId"
|
v-model="subDistrictId"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
|
@ -167,27 +167,27 @@ watch(districtId, fetchSubDistrict);
|
||||||
@update:model-value="(v: string) => selectSubDistrict(v)"
|
@update:model-value="(v: string) => selectSubDistrict(v)"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
|
id="input-zip-code"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:borderless="readonly"
|
:borderless="readonly"
|
||||||
readonly
|
readonly
|
||||||
id="zip"
|
|
||||||
:label="$t('zipCode')"
|
:label="$t('zipCode')"
|
||||||
class="col-3"
|
class="col-3"
|
||||||
v-model="zipCode"
|
v-model="zipCode"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3 q-pl-xl app-text-muted">
|
<div class="col-3 q-pl-xl app-text-muted">
|
||||||
{{ addressTitleEN || 'ที่อยู่ ภาษาอังกฤษ' }}
|
{{ addressTitleEN || $t('formDialogTitleAddressPure') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-9 row q-col-gutter-md">
|
<div class="col-9 row q-col-gutter-md">
|
||||||
<q-input
|
<q-input
|
||||||
|
id="input-address-en"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:borderless="readonly"
|
:borderless="readonly"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
id="addr-en-input"
|
|
||||||
:label="$t('address')"
|
:label="$t('address')"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
v-model="addressEN"
|
v-model="addressEN"
|
||||||
|
|
@ -198,6 +198,7 @@ watch(districtId, fetchSubDistrict);
|
||||||
]"
|
]"
|
||||||
/>
|
/>
|
||||||
<q-select
|
<q-select
|
||||||
|
id="select-province-en"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
|
|
@ -205,7 +206,6 @@ watch(districtId, fetchSubDistrict);
|
||||||
:hide-dropdown-icon="readonly"
|
:hide-dropdown-icon="readonly"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
id="select-province-en"
|
|
||||||
v-model="provinceId"
|
v-model="provinceId"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="nameEN"
|
option-label="nameEN"
|
||||||
|
|
@ -214,6 +214,7 @@ watch(districtId, fetchSubDistrict);
|
||||||
:options="addrOptions.provinceOps"
|
:options="addrOptions.provinceOps"
|
||||||
/>
|
/>
|
||||||
<q-select
|
<q-select
|
||||||
|
id="select-district-en"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
|
|
@ -221,7 +222,6 @@ watch(districtId, fetchSubDistrict);
|
||||||
:hide-dropdown-icon="readonly"
|
:hide-dropdown-icon="readonly"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
id="select-district-en"
|
|
||||||
v-model="districtId"
|
v-model="districtId"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="nameEN"
|
option-label="nameEN"
|
||||||
|
|
@ -230,6 +230,7 @@ watch(districtId, fetchSubDistrict);
|
||||||
:options="addrOptions.districtOps"
|
:options="addrOptions.districtOps"
|
||||||
/>
|
/>
|
||||||
<q-select
|
<q-select
|
||||||
|
id="select-sub-district-en"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
|
|
@ -237,7 +238,6 @@ watch(districtId, fetchSubDistrict);
|
||||||
:hide-dropdown-icon="readonly"
|
:hide-dropdown-icon="readonly"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
id="select-sub-district-en"
|
|
||||||
v-model="subDistrictId"
|
v-model="subDistrictId"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="nameEN"
|
option-label="nameEN"
|
||||||
|
|
@ -247,6 +247,7 @@ watch(districtId, fetchSubDistrict);
|
||||||
@update:model-value="(v: string) => selectSubDistrict(v)"
|
@update:model-value="(v: string) => selectSubDistrict(v)"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
|
id="input-zip-code"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:borderless="readonly"
|
:borderless="readonly"
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,9 @@ function deleteFile(name: string) {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div v-if="userType" class="col-3 app-text-muted">• ข้อมูลการทำงาน</div>
|
<div v-if="userType" class="col-3 app-text-muted">
|
||||||
|
• {{ $t('formDialogTitleByType') }}
|
||||||
|
</div>
|
||||||
<div class="col-9 row q-col-gutter-md">
|
<div class="col-9 row q-col-gutter-md">
|
||||||
<div
|
<div
|
||||||
v-if="userType === 'USER' || userType === 'MESSENGER'"
|
v-if="userType === 'USER' || userType === 'MESSENGER'"
|
||||||
|
|
@ -71,11 +73,12 @@ function deleteFile(name: string) {
|
||||||
style="margin-left: 0px; padding-left: 0px"
|
style="margin-left: 0px; padding-left: 0px"
|
||||||
>
|
>
|
||||||
<q-input
|
<q-input
|
||||||
|
id="input-regis-no"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:borderless="readonly"
|
:borderless="readonly"
|
||||||
label="เลขประจำตัว นจ. 16 (เลขที่ขึ้นทะเบียน)"
|
:label="$t('formDialogInputRegisNo')"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
v-model="registrationNo"
|
v-model="registrationNo"
|
||||||
/>
|
/>
|
||||||
|
|
@ -93,7 +96,8 @@ function deleteFile(name: string) {
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input
|
||||||
label="วันที่เริ่มงาน"
|
id="input-start-date"
|
||||||
|
:label="$t('formDialogInputStartDate')"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
@ -135,7 +139,8 @@ function deleteFile(name: string) {
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input
|
||||||
label="วันที่พ้นสภาพพนักงาน"
|
id="input-retire-date"
|
||||||
|
:label="$t('formDialogInputRetireDate')"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
@ -163,6 +168,7 @@ function deleteFile(name: string) {
|
||||||
</template>
|
</template>
|
||||||
</VueDatePicker>
|
</VueDatePicker>
|
||||||
<q-select
|
<q-select
|
||||||
|
id="input-responsible-area"
|
||||||
v-if="userType === 'MESSENGER'"
|
v-if="userType === 'MESSENGER'"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
|
|
@ -172,7 +178,7 @@ function deleteFile(name: string) {
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
options-dense
|
options-dense
|
||||||
label="พื้นที่ ที่รับผิดชอบในการส่งเอกสาร"
|
:label="$t('formDialogInputResponsibleArea')"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
option-label="label"
|
option-label="label"
|
||||||
option-value="label"
|
option-value="label"
|
||||||
|
|
@ -186,11 +192,12 @@ function deleteFile(name: string) {
|
||||||
style="row-gap: 16px"
|
style="row-gap: 16px"
|
||||||
>
|
>
|
||||||
<q-input
|
<q-input
|
||||||
|
id="input-discount-condition"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:borderless="readonly"
|
:borderless="readonly"
|
||||||
label="เงื่อนไขส่วนลดบริการต่างๆ ของตัวแทน"
|
:label="$t('formDialogInputDiscount')"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
v-model="discountCondition"
|
v-model="discountCondition"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
|
|
@ -202,6 +209,7 @@ function deleteFile(name: string) {
|
||||||
style="margin-left: 0px; padding-left: 0px"
|
style="margin-left: 0px; padding-left: 0px"
|
||||||
>
|
>
|
||||||
<q-select
|
<q-select
|
||||||
|
id="input-source-nationality"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
@ -210,7 +218,7 @@ function deleteFile(name: string) {
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
options-dense
|
options-dense
|
||||||
label="สัญชาติต้นทาง"
|
:label="$t('formDialogInputSourceNationality')"
|
||||||
class="col-3"
|
class="col-3"
|
||||||
option-label="label"
|
option-label="label"
|
||||||
option-value="label"
|
option-value="label"
|
||||||
|
|
@ -218,6 +226,7 @@ function deleteFile(name: string) {
|
||||||
:options="userStore.userOption.nationalityOpts"
|
:options="userStore.userOption.nationalityOpts"
|
||||||
/>
|
/>
|
||||||
<q-select
|
<q-select
|
||||||
|
id="input-import-nationality"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
@ -226,7 +235,7 @@ function deleteFile(name: string) {
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
options-dense
|
options-dense
|
||||||
label="นำเข้าสัญชาติ"
|
:label="$t('formDialogInputImportNationality')"
|
||||||
class="col-3"
|
class="col-3"
|
||||||
option-label="label"
|
option-label="label"
|
||||||
option-value="label"
|
option-value="label"
|
||||||
|
|
@ -234,6 +243,7 @@ function deleteFile(name: string) {
|
||||||
:options="userStore.userOption.nationalityOpts"
|
:options="userStore.userOption.nationalityOpts"
|
||||||
/>
|
/>
|
||||||
<q-select
|
<q-select
|
||||||
|
id="select-trainig-place"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
@ -242,7 +252,7 @@ function deleteFile(name: string) {
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
options-dense
|
options-dense
|
||||||
label="สถานที่อบรม"
|
:label="$t('formDialogInputTrainingPlace')"
|
||||||
class="col-6"
|
class="col-6"
|
||||||
option-label="label"
|
option-label="label"
|
||||||
option-value="label"
|
option-value="label"
|
||||||
|
|
@ -250,31 +260,34 @@ function deleteFile(name: string) {
|
||||||
:options="userStore.userOption.trainingPlaceOpts"
|
:options="userStore.userOption.trainingPlaceOpts"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
|
id="input-checkpoint"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:borderless="readonly"
|
:borderless="readonly"
|
||||||
label="ด่าน"
|
:label="$t('formDialogInputCheckpoint')"
|
||||||
class="col-6"
|
class="col-6"
|
||||||
v-model="checkpoint"
|
v-model="checkpoint"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
|
id="input-checkpoint-en"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:borderless="readonly"
|
:borderless="readonly"
|
||||||
label="ด่าน ENG"
|
:label="$t('formDialogInputCheckpoint') + ' ENG'"
|
||||||
class="col-6"
|
class="col-6"
|
||||||
v-model="checkpointEN"
|
v-model="checkpointEN"
|
||||||
/>
|
/>
|
||||||
<q-file
|
<q-file
|
||||||
|
id="input-attchment"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:borderless="readonly"
|
:borderless="readonly"
|
||||||
multiple
|
multiple
|
||||||
append
|
append
|
||||||
label="แบบเอกสารประจำตัว"
|
:label="$t('formDialogAttachment')"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
v-model="agencyFile"
|
v-model="agencyFile"
|
||||||
/>
|
/>
|
||||||
|
|
@ -282,6 +295,7 @@ function deleteFile(name: string) {
|
||||||
<div v-if="agencyFileList && agencyFileList?.length > 0" class="col-12">
|
<div v-if="agencyFileList && agencyFileList?.length > 0" class="col-12">
|
||||||
<q-list bordered separator class="rounded" style="padding: 0">
|
<q-list bordered separator class="rounded" style="padding: 0">
|
||||||
<q-item
|
<q-item
|
||||||
|
id="attachment-file"
|
||||||
v-for="item in agencyFileList"
|
v-for="item in agencyFileList"
|
||||||
clickable
|
clickable
|
||||||
:key="item.url"
|
:key="item.url"
|
||||||
|
|
@ -294,6 +308,7 @@ function deleteFile(name: string) {
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</div>
|
</div>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
id="delete-file"
|
||||||
v-if="!readonly && userId"
|
v-if="!readonly && userId"
|
||||||
rounded
|
rounded
|
||||||
flat
|
flat
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,12 @@ async function selectHq(id: string) {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="col-3 app-text-muted">• ข้อมูลพื้นฐาน</div>
|
<div class="col-3 app-text-muted">
|
||||||
|
• {{ $t('formDialogTitleInformation') }}
|
||||||
|
</div>
|
||||||
<div class="col-9 row q-col-gutter-md">
|
<div class="col-9 row q-col-gutter-md">
|
||||||
<q-select
|
<q-select
|
||||||
|
id="select-hq-id"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
@ -45,12 +48,13 @@ async function selectHq(id: string) {
|
||||||
v-model="hqId"
|
v-model="hqId"
|
||||||
option-label="label"
|
option-label="label"
|
||||||
option-value="value"
|
option-value="value"
|
||||||
label="รหัสสำนักงานใหญ่"
|
:label="$t('formDialogInputCode')"
|
||||||
:options="userStore.userOption.hqOpts"
|
:options="userStore.userOption.hqOpts"
|
||||||
:rules="[(val: string) => !!val || 'กรุณาเลือกสำนักงานใหญ่']"
|
:rules="[(val: string) => !!val || $t('formDialogInputHqIdValidate')]"
|
||||||
@update:model-value="(val: string) => selectHq(val)"
|
@update:model-value="(val: string) => selectHq(val)"
|
||||||
/>
|
/>
|
||||||
<q-select
|
<q-select
|
||||||
|
id="select-br-id"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
@ -63,12 +67,13 @@ async function selectHq(id: string) {
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-6"
|
class="col-6"
|
||||||
v-model="brId"
|
v-model="brId"
|
||||||
label="รหัสสาขา"
|
:label="$t('formDialogInputBrId')"
|
||||||
option-label="label"
|
option-label="label"
|
||||||
option-value="value"
|
option-value="value"
|
||||||
:options="userStore.userOption.brOpts"
|
:options="userStore.userOption.brOpts"
|
||||||
/>
|
/>
|
||||||
<q-select
|
<q-select
|
||||||
|
id="select-user-type"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
@ -81,12 +86,13 @@ async function selectHq(id: string) {
|
||||||
class="col-3"
|
class="col-3"
|
||||||
option-value="value"
|
option-value="value"
|
||||||
option-label="label"
|
option-label="label"
|
||||||
label="ประเภทผู้ใช้งาน"
|
:label="$t('formDialogInputUserType')"
|
||||||
v-model="userType"
|
v-model="userType"
|
||||||
:options="userStore.userOption.userTypeOpts"
|
:options="userStore.userOption.userTypeOpts"
|
||||||
:rules="[(val: string) => !!val || 'กรุณาเลือกประเภทผู้ใช้งาน']"
|
:rules="[(val: string) => !!val || $t('formDialogInputUserTypeValidate')]"
|
||||||
/>
|
/>
|
||||||
<q-select
|
<q-select
|
||||||
|
id="select-user-role"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
@ -97,14 +103,15 @@ async function selectHq(id: string) {
|
||||||
options-dense
|
options-dense
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-3"
|
class="col-3"
|
||||||
label="สิทธิ์ผู้ใช้งาน"
|
:label="$t('formDialogInputUserRole')"
|
||||||
option-label="label"
|
option-label="label"
|
||||||
option-value="value"
|
option-value="value"
|
||||||
v-model="userRole"
|
v-model="userRole"
|
||||||
:options="userStore.userOption.roleOpts"
|
:options="userStore.userOption.roleOpts"
|
||||||
:rules="[(val: string) => !!val || 'กรุณาเลือกสิทธิ์ผู้ใช้งาน']"
|
:rules="[(val: string) => !!val || $t('formDialogInputUserRoleValidate')]"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
|
id="input-username"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:borderless="readonly"
|
:borderless="readonly"
|
||||||
|
|
@ -114,18 +121,22 @@ async function selectHq(id: string) {
|
||||||
options-dense
|
options-dense
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-3"
|
class="col-3"
|
||||||
label="ชื่อผู้ใช้งาน (Username)"
|
:label="$t('formDialogInputUsername')"
|
||||||
v-model="username"
|
v-model="username"
|
||||||
:rules="[(val: string) => val.length > 2 || 'กรุณากรอกชื่อผู้ใช้งาน']"
|
:rules="[
|
||||||
|
(val: string) =>
|
||||||
|
val.length > 2 || $t('formDialogInputUsernameValidate'),
|
||||||
|
]"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
|
id="input-user-code"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:borderless="readonly"
|
:borderless="readonly"
|
||||||
readonly
|
readonly
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-3"
|
class="col-3"
|
||||||
label="รหัสพนักงาน"
|
:label="$t('formDialogInputUserCode')"
|
||||||
v-model="userCode"
|
v-model="userCode"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -21,72 +21,85 @@ defineProps<{
|
||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="col-3 app-text-muted">• ข้อมูลบุคลากร</div>
|
<div class="col-3 app-text-muted">• {{ $t('formDialogTitlePersonnel') }}</div>
|
||||||
<div class="col-9 row q-col-gutter-md">
|
<div class="col-9 row q-col-gutter-md">
|
||||||
<q-input
|
<q-input
|
||||||
|
id="input-first-name"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:borderless="readonly"
|
:borderless="readonly"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-3"
|
class="col-3"
|
||||||
label="ชื่อ ภาษาไทย"
|
:label="$t('formDialogInputFirstName')"
|
||||||
v-model="firstName"
|
v-model="firstName"
|
||||||
:rules="[(val: string) => !!val || 'กรุณากรอกชื่อ ภาษาไทย']"
|
:rules="[
|
||||||
|
(val: string) => !!val || $t('formDialogInputFirstNameValidate'),
|
||||||
|
]"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
|
id="input-last-name"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:borderless="readonly"
|
:borderless="readonly"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-3"
|
class="col-3"
|
||||||
label="นามสกุล ภาษาไทย"
|
:label="$t('formDialogInputLastName')"
|
||||||
v-model="lastName"
|
v-model="lastName"
|
||||||
:rules="[(val: string) => !!val || 'กรุณากรอกนามสกุล ภาษาไทย']"
|
:rules="[(val: string) => !!val || $t('formDialogInputLastNameValidate')]"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
|
id="input-first-name-en"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:borderless="readonly"
|
:borderless="readonly"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-3"
|
class="col-3"
|
||||||
label="ชื่อ ภาษาอังกฤษ"
|
:label="$t('formDialogInputFirstNameEN')"
|
||||||
v-model="firstNameEN"
|
v-model="firstNameEN"
|
||||||
:rules="[(val: string) => !!val || 'กรุณากรอกชื่อ ภาษาอังกฤษ']"
|
:rules="[
|
||||||
|
(val: string) => !!val || $t('formDialogInputFirstNameENValidate'),
|
||||||
|
]"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
|
id="input-last-name-en"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:borderless="readonly"
|
:borderless="readonly"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-3"
|
class="col-3"
|
||||||
label="นามสกุล ภาษาอังกฤษ"
|
:label="$t('formDialogInputLastNameEN')"
|
||||||
v-model="lastNameEN"
|
v-model="lastNameEN"
|
||||||
:rules="[(val: string) => !!val || 'กรุณากรอกนามสกุล ภาษาอังกฤษ']"
|
:rules="[
|
||||||
|
(val: string) => !!val || $t('formDialogInputLastNameENValidate'),
|
||||||
|
]"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
|
id="input-telephone"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:borderless="readonly"
|
:borderless="readonly"
|
||||||
class="col-6"
|
class="col-6"
|
||||||
label="เบอร์โทร"
|
:label="$t('formDialogInputTelephone')"
|
||||||
v-model="telephoneNo"
|
v-model="telephoneNo"
|
||||||
mask="##########"
|
mask="##########"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
|
id="input-email"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:borderless="readonly"
|
:borderless="readonly"
|
||||||
label="อีเมล"
|
:label="$t('formDialogInputEmail')"
|
||||||
class="col-6"
|
class="col-6"
|
||||||
v-model="email"
|
v-model="email"
|
||||||
/>
|
/>
|
||||||
<q-select
|
<q-select
|
||||||
|
id="select-gender"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
@ -94,7 +107,7 @@ defineProps<{
|
||||||
:borderless="readonly"
|
:borderless="readonly"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
label="เพศ"
|
:label="$t('formDialogInputGender')"
|
||||||
class="col-3"
|
class="col-3"
|
||||||
option-label="label"
|
option-label="label"
|
||||||
option-value="value"
|
option-value="value"
|
||||||
|
|
@ -115,7 +128,8 @@ defineProps<{
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input
|
||||||
label="วันเดือนปีเกิด"
|
id="input-birth-date"
|
||||||
|
:label="$t('formDialogInputBirthDate')"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
|
|
@ -143,11 +157,12 @@ defineProps<{
|
||||||
</template>
|
</template>
|
||||||
</VueDatePicker>
|
</VueDatePicker>
|
||||||
<q-input
|
<q-input
|
||||||
|
id="input-age"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
:outlined="readonly ? false : outlined"
|
:outlined="readonly ? false : outlined"
|
||||||
:borderless="readonly"
|
:borderless="readonly"
|
||||||
readonly
|
readonly
|
||||||
label="อายุ"
|
:label="$t('formDialogInputAge')"
|
||||||
class="col-3"
|
class="col-3"
|
||||||
:model-value="birthDate ? userStore.calculateAge(birthDate) : ''"
|
:model-value="birthDate ? userStore.calculateAge(birthDate) : ''"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@ function reset() {
|
||||||
id="okBtn"
|
id="okBtn"
|
||||||
color="primary"
|
color="primary"
|
||||||
class="q-px-md"
|
class="q-px-md"
|
||||||
label="ตกลง"
|
:label="$t('agree')"
|
||||||
@click="close"
|
@click="close"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ const color = ['pink', 'purple'];
|
||||||
|
|
||||||
<div class="stat__content">
|
<div class="stat__content">
|
||||||
<div class="text-h5 text-weight-bold">{{ v.count }}</div>
|
<div class="text-h5 text-weight-bold">{{ v.count }}</div>
|
||||||
<div class="text-weight-bold">{{ $t(v.label) }}</div>
|
<div class="text-weight-bold">{{ v.label }}</div>
|
||||||
</div>
|
</div>
|
||||||
</AppBox>
|
</AppBox>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
export default {
|
export default {
|
||||||
|
// Branch & HQ
|
||||||
formDialogTitleImg: 'Office Image',
|
formDialogTitleImg: 'Office Image',
|
||||||
formDialogBtnImg: 'Add Office Image',
|
formDialogBtnImg: 'Add Office Image',
|
||||||
|
|
||||||
|
|
@ -49,4 +50,51 @@ export default {
|
||||||
formDialogInputSubDistrictValidate: 'Please enter the sub-district',
|
formDialogInputSubDistrictValidate: 'Please enter the sub-district',
|
||||||
|
|
||||||
formDialogBtnLocation: 'Start sharing location',
|
formDialogBtnLocation: 'Start sharing location',
|
||||||
|
|
||||||
|
// Personnel
|
||||||
|
formDialogTitleAddressPersonnel: 'Personnel Address',
|
||||||
|
|
||||||
|
formDialogBtnEditProfile: 'Edit Profile',
|
||||||
|
formDialogBtnUploadProfile: 'Upload Image',
|
||||||
|
formDialogTitleUserStatus: 'User Status',
|
||||||
|
|
||||||
|
formDialogInputHqIdValidate: 'Please select head office',
|
||||||
|
formDialogInputBrId: 'Branch Code',
|
||||||
|
formDialogInputUserType: 'User Type',
|
||||||
|
formDialogInputUserTypeValidate: 'Please select user type',
|
||||||
|
formDialogInputUserRole: 'User Role',
|
||||||
|
formDialogInputUserRoleValidate: 'Please select user role',
|
||||||
|
formDialogInputUsername: 'Username',
|
||||||
|
formDialogInputUsernameValidate: 'Please enter username',
|
||||||
|
formDialogInputUserCode: 'Personnel Code',
|
||||||
|
|
||||||
|
formDialogTitlePersonnel: 'Personnel Information',
|
||||||
|
formDialogInputFirstName: 'First Name',
|
||||||
|
formDialogInputFirstNameValidate: 'Please enter first name',
|
||||||
|
formDialogInputLastName: 'Last Name',
|
||||||
|
formDialogInputLastNameValidate: 'Please enter last name',
|
||||||
|
formDialogInputFirstNameEN: 'First Name',
|
||||||
|
formDialogInputFirstNameENValidate: 'Please enter first name',
|
||||||
|
formDialogInputLastNameEN: 'Last Name',
|
||||||
|
formDialogInputLastNameENValidate: 'Please enter last name',
|
||||||
|
formDialogInputTelephone: 'Telephone Number',
|
||||||
|
formDialogInputEmail: 'Email',
|
||||||
|
formDialogInputGender: 'Gender',
|
||||||
|
formDialogInputBirthDate: 'Birth Date',
|
||||||
|
formDialogInputAge: 'Age',
|
||||||
|
|
||||||
|
formDialogTitlePersonnelAddress: 'Personnel Address',
|
||||||
|
formDialogTitleAddressPure: 'Address',
|
||||||
|
|
||||||
|
formDialogTitleByType: 'Job Information',
|
||||||
|
formDialogInputRegisNo: 'Registration Number',
|
||||||
|
formDialogInputStartDate: 'Start Date',
|
||||||
|
formDialogInputRetireDate: 'Retire Date',
|
||||||
|
formDialogInputResponsibleArea: 'Responsible Area',
|
||||||
|
formDialogInputDiscount: 'Discount Condition',
|
||||||
|
formDialogInputSourceNationality: 'Source Nationality',
|
||||||
|
formDialogInputImportNationality: 'Import Nationality',
|
||||||
|
formDialogInputTrainingPlace: 'Training Place',
|
||||||
|
formDialogInputCheckpoint: 'Checkpoint',
|
||||||
|
formDialogAttachment: 'Attachment Document',
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import status from './status';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
ok: 'Confirm',
|
ok: 'Confirm',
|
||||||
|
agree: 'Agree',
|
||||||
cancel: 'Cancel',
|
cancel: 'Cancel',
|
||||||
failed: 'Failed',
|
failed: 'Failed',
|
||||||
success: 'Success',
|
success: 'Success',
|
||||||
|
|
|
||||||
|
|
@ -9,5 +9,9 @@ export default {
|
||||||
DELEGATE: 'Delegate',
|
DELEGATE: 'Delegate',
|
||||||
AGENCY: 'Agency',
|
AGENCY: 'Agency',
|
||||||
|
|
||||||
personnelStatTitle: 'Summary data of '
|
personnelStatTitle: 'Summary data of ',
|
||||||
|
|
||||||
|
personnelCardUserType: 'Type',
|
||||||
|
personnelCardTelephone: 'Telephone',
|
||||||
|
personnelCardAge: 'Age',
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
export default {
|
export default {
|
||||||
|
// Branch & HQ
|
||||||
formDialogTitleImg: 'ภาพสำนักงาน',
|
formDialogTitleImg: 'ภาพสำนักงาน',
|
||||||
formDialogBtnImg: 'เพิ่มรูปสำนักงาน',
|
formDialogBtnImg: 'เพิ่มรูปสำนักงาน',
|
||||||
|
|
||||||
|
|
@ -48,4 +49,51 @@ export default {
|
||||||
formDialogInputSubDistrictValidate: 'โปรดระบุตำบล',
|
formDialogInputSubDistrictValidate: 'โปรดระบุตำบล',
|
||||||
|
|
||||||
formDialogBtnLocation: 'เริ่มแชร์โลเคชั่น',
|
formDialogBtnLocation: 'เริ่มแชร์โลเคชั่น',
|
||||||
|
|
||||||
|
// Personnel
|
||||||
|
formDialogTitleAddressPersonnel: 'ที่อยู่พนักงาน',
|
||||||
|
|
||||||
|
formDialogBtnEditProfile: 'แก้ไขโปรไฟล์',
|
||||||
|
formDialogBtnUploadProfile: 'อัปโหลดรูปภาพ',
|
||||||
|
formDialogTitleUserStatus: 'สถานะผู้ใช้งาน',
|
||||||
|
|
||||||
|
formDialogInputHqIdValidate: 'กรุณาเลือกสำนักงานใหญ่',
|
||||||
|
formDialogInputBrId: 'รหัสสาขา',
|
||||||
|
formDialogInputUserType: 'ประเภทผู้ใช้งาน',
|
||||||
|
formDialogInputUserTypeValidate: 'กรุณาเลือกประเภทผู้ใช้งาน',
|
||||||
|
formDialogInputUserRole: 'สิทธิ์ผู้ใช้งาน',
|
||||||
|
formDialogInputUserRoleValidate: 'กรุณาเลือกสิทธิ์ผู้ใช้งาน',
|
||||||
|
formDialogInputUsername: 'ชื่อผู้ใช้งาน (Username)',
|
||||||
|
formDialogInputUsernameValidate: 'กรุณากรอกชื่อผู้ใช้งาน',
|
||||||
|
formDialogInputUserCode: 'รหัสพนักงาน',
|
||||||
|
|
||||||
|
formDialogTitlePersonnel: 'ข้อมูลบุคลากร',
|
||||||
|
formDialogInputFirstName: 'ชื่อ ภาษาไทย',
|
||||||
|
formDialogInputFirstNameValidate: 'กรุณากรอกชื่อ ภาษาไทย',
|
||||||
|
formDialogInputLastName: 'นามสกุล ภาษาไทย',
|
||||||
|
formDialogInputLastNameValidate: 'กรุณากรอกนามสกุล ภาษาไทย',
|
||||||
|
formDialogInputFirstNameEN: 'ชื่อ ภาษาอังกฤษ',
|
||||||
|
formDialogInputFirstNameENValidate: 'กรุณากรอกชื่อ ภาษาอังกฤษ',
|
||||||
|
formDialogInputLastNameEN: 'นามสกุล ภาษาอังกฤษ',
|
||||||
|
formDialogInputLastNameENValidate: 'กรุณากรอกนามสกุล ภาษาอังกฤษ',
|
||||||
|
formDialogInputTelephone: 'เบอร์โทร',
|
||||||
|
formDialogInputEmail: 'อีเมล',
|
||||||
|
formDialogInputGender: 'เพศ',
|
||||||
|
formDialogInputBirthDate: 'วันเดือนปีเกิด',
|
||||||
|
formDialogInputAge: 'อายุ',
|
||||||
|
|
||||||
|
formDialogTitlePersonnelAddress: 'ข้อมูลที่อยู่พนักงาน',
|
||||||
|
formDialogTitleAddressPure: 'ที่อยู่',
|
||||||
|
|
||||||
|
formDialogTitleByType: 'ข้อมูลการทำงาน',
|
||||||
|
formDialogInputRegisNo: 'เลขประจำตัว นจ. 16 (เลขที่ขึ้นทะเบียน)',
|
||||||
|
formDialogInputStartDate: 'วันที่เริ่มงาน',
|
||||||
|
formDialogInputRetireDate: 'วันที่พ้นสภาพพนักงาน',
|
||||||
|
formDialogInputResponsibleArea: 'พื้นที่ ที่รับผิดชอบในการส่งเอกสาร',
|
||||||
|
formDialogInputDiscount: 'เงื่อนไขส่วนลดบริการต่างๆ ของตัวแทน',
|
||||||
|
formDialogInputSourceNationality: 'สัญชาติต้นทาง',
|
||||||
|
formDialogInputImportNationality: 'นำเข้าสัญชาติ',
|
||||||
|
formDialogInputTrainingPlace: 'สถานที่อบรม',
|
||||||
|
formDialogInputCheckpoint: 'ด่าน',
|
||||||
|
formDialogAttachment: 'แบบเอกสารประจำตัว',
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import status from './status';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
ok: 'ยืนยัน',
|
ok: 'ยืนยัน',
|
||||||
|
agree: 'ตกลง',
|
||||||
cancel: 'ยกเลิก',
|
cancel: 'ยกเลิก',
|
||||||
failed: 'เกิดข้อผิดพลาด',
|
failed: 'เกิดข้อผิดพลาด',
|
||||||
success: 'สำเร็จ',
|
success: 'สำเร็จ',
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ export default {
|
||||||
personnelManagement: 'จัดการบุคลากร',
|
personnelManagement: 'จัดการบุคลากร',
|
||||||
personnelTooltipTitle: 'ยังไม่มีข้อมูลบุคลากร',
|
personnelTooltipTitle: 'ยังไม่มีข้อมูลบุคลากร',
|
||||||
personnelTooltipCaption: 'คลิก + เพื่อเพิ่มบุคลากร',
|
personnelTooltipCaption: 'คลิก + เพื่อเพิ่มบุคลากร',
|
||||||
personnelAdd: 'เพิ่มข้อมูลบุคลากร',
|
personnelAdd: 'เพิ่มบุคลากร',
|
||||||
|
|
||||||
USER: 'พนักงาน',
|
USER: 'พนักงาน',
|
||||||
MESSENGER: 'พนักงานส่งเอกสาร',
|
MESSENGER: 'พนักงานส่งเอกสาร',
|
||||||
|
|
@ -10,4 +10,8 @@ export default {
|
||||||
AGENCY: 'เอเจนซี่',
|
AGENCY: 'เอเจนซี่',
|
||||||
|
|
||||||
personnelStatTitle: 'สรุปจำนวนข้อมูล',
|
personnelStatTitle: 'สรุปจำนวนข้อมูล',
|
||||||
|
|
||||||
|
personnelCardUserType: 'ประเภท',
|
||||||
|
personnelCardTelephone: 'โทรศัพท์',
|
||||||
|
personnelCardAge: 'อายุ',
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -198,6 +198,7 @@ async function openDialog(action?: 'FORM' | 'INFO', idEdit?: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (idEdit && userData.value) {
|
if (idEdit && userData.value) {
|
||||||
|
isEdit.value = true;
|
||||||
assignFormData(idEdit);
|
assignFormData(idEdit);
|
||||||
|
|
||||||
if (formData.value.userType === 'AGENCY') {
|
if (formData.value.userType === 'AGENCY') {
|
||||||
|
|
@ -239,7 +240,7 @@ async function onSubmit() {
|
||||||
formData.value.profileImage = null;
|
formData.value.profileImage = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isEdit.value === true && userId.value) {
|
if (isEdit.value && userId.value) {
|
||||||
dialog({
|
dialog({
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
icon: 'mdi-pencil-outline',
|
icon: 'mdi-pencil-outline',
|
||||||
|
|
@ -262,7 +263,10 @@ async function onSubmit() {
|
||||||
hqId.value !== currentUser.value.branch[0].id &&
|
hqId.value !== currentUser.value.branch[0].id &&
|
||||||
brId.value !== currentUser.value.branch[0].id
|
brId.value !== currentUser.value.branch[0].id
|
||||||
) {
|
) {
|
||||||
userStore.removeBranch(userId.value, currentUser.value.branch[0].id);
|
await branchStore.removeUser(
|
||||||
|
currentUser.value.branch[0].id,
|
||||||
|
userId.value,
|
||||||
|
);
|
||||||
|
|
||||||
await branchStore.addUser(
|
await branchStore.addUser(
|
||||||
!!brId.value ? brId.value : hqId.value,
|
!!brId.value ? brId.value : hqId.value,
|
||||||
|
|
@ -270,6 +274,15 @@ async function onSubmit() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!currentUser.value?.branch[0]) {
|
||||||
|
if (brId.value || hqId.value) {
|
||||||
|
await branchStore.addUser(
|
||||||
|
(!!brId.value ? brId.value : hqId.value)!,
|
||||||
|
userId.value,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (userId.value && formDataEdit.userType === 'AGENCY') {
|
if (userId.value && formDataEdit.userType === 'AGENCY') {
|
||||||
if (!agencyFile.value) return;
|
if (!agencyFile.value) return;
|
||||||
const payload: UserAttachmentCreate = {
|
const payload: UserAttachmentCreate = {
|
||||||
|
|
@ -433,17 +446,21 @@ async function assignFormData(idEdit: string) {
|
||||||
? (statusToggle.value = true)
|
? (statusToggle.value = true)
|
||||||
: (statusToggle.value = false);
|
: (statusToggle.value = false);
|
||||||
userId.value = foundUser.id;
|
userId.value = foundUser.id;
|
||||||
if (foundUser.branch[0].isHeadOffice) {
|
|
||||||
hqId.value = foundUser.branch[0].id as string;
|
if (foundUser.branch[0]) {
|
||||||
} else {
|
if (foundUser.branch[0].isHeadOffice) {
|
||||||
hqId.value = foundUser.branch[0].headOfficeId as string;
|
hqId.value = foundUser.branch[0].id as string;
|
||||||
brId.value = foundUser.branch[0].id;
|
} else {
|
||||||
|
hqId.value = foundUser.branch[0].headOfficeId as string;
|
||||||
|
brId.value = foundUser.branch[0].id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
code.value = foundUser.code;
|
code.value = foundUser.code;
|
||||||
urlProfile.value = foundUser.profileImageUrl;
|
urlProfile.value = foundUser.profileImageUrl;
|
||||||
isEdit.value = true;
|
isEdit.value = true;
|
||||||
profileSubmit.value = true;
|
profileSubmit.value = true;
|
||||||
await userStore.fetchBrOption(hqId.value);
|
hqId.value && (await userStore.fetchBrOption(hqId.value));
|
||||||
if (formData.value.districtId) {
|
if (formData.value.districtId) {
|
||||||
await adrressStore.fetchSubDistrictByProvinceId(
|
await adrressStore.fetchSubDistrictByProvinceId(
|
||||||
formData.value.districtId,
|
formData.value.districtId,
|
||||||
|
|
@ -538,9 +555,10 @@ watch(
|
||||||
{{ selectorLabel === '' ? '' : $t(selectorLabel) }}
|
{{ selectorLabel === '' ? '' : $t(selectorLabel) }}
|
||||||
</div>
|
</div>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
id="btn-add-personnel"
|
||||||
dense
|
dense
|
||||||
unelevated
|
unelevated
|
||||||
label="+ เพิ่มบุคลากร"
|
:label="'+ ' + $t('personnelAdd')"
|
||||||
padding="4px 16px"
|
padding="4px 16px"
|
||||||
@click="openDialog('FORM')"
|
@click="openDialog('FORM')"
|
||||||
style="background-color: var(--cyan-6); color: white"
|
style="background-color: var(--cyan-6); color: white"
|
||||||
|
|
@ -566,6 +584,7 @@ watch(
|
||||||
<AppBox bordered class="column" style="width: 100%; min-height: 70vh">
|
<AppBox bordered class="column" style="width: 100%; min-height: 70vh">
|
||||||
<div class="row q-mb-md justify-between">
|
<div class="row q-mb-md justify-between">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
id="btn-filter"
|
||||||
icon="mdi-tune-vertical-variant"
|
icon="mdi-tune-vertical-variant"
|
||||||
size="sm"
|
size="sm"
|
||||||
class="bordered rounded"
|
class="bordered rounded"
|
||||||
|
|
@ -609,7 +628,7 @@ watch(
|
||||||
style="width: 250px"
|
style="width: 250px"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
label="ค้นหา"
|
:label="$t('search')"
|
||||||
debounce="500"
|
debounce="500"
|
||||||
v-model="inputSearch"
|
v-model="inputSearch"
|
||||||
></q-input>
|
></q-input>
|
||||||
|
|
@ -639,10 +658,10 @@ watch(
|
||||||
male: v.gender === 'male',
|
male: v.gender === 'male',
|
||||||
female: v.gender === 'female',
|
female: v.gender === 'female',
|
||||||
detail: [
|
detail: [
|
||||||
{ label: 'ประเภท', value: $t(v.userType) },
|
{ label: $t('personnelCardUserType'), value: $t(v.userType) },
|
||||||
{ label: 'โทรศัพท์', value: v.telephoneNo },
|
{ label: $t('personnelCardTelephone'), value: v.telephoneNo },
|
||||||
{
|
{
|
||||||
label: 'อายุ',
|
label: $t('personnelCardAge'),
|
||||||
value: userStore.calculateAge(v.birthDate as Date),
|
value: userStore.calculateAge(v.birthDate as Date),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
@ -697,6 +716,8 @@ watch(
|
||||||
>
|
>
|
||||||
<template #info>
|
<template #info>
|
||||||
<InfoForm
|
<InfoForm
|
||||||
|
:addressTitle="$t('formDialogTitleAddressPure')"
|
||||||
|
:addressTitleEN="$t('formDialogTitleAddressPure') + ' ENG'"
|
||||||
:readonly="!infoPersonCardEdit"
|
:readonly="!infoPersonCardEdit"
|
||||||
v-model:address="formData.address"
|
v-model:address="formData.address"
|
||||||
v-model:addressEN="formData.addressEN"
|
v-model:addressEN="formData.addressEN"
|
||||||
|
|
@ -780,9 +801,9 @@ watch(
|
||||||
<FormDialog
|
<FormDialog
|
||||||
removeDialog
|
removeDialog
|
||||||
ref="formDialogRef"
|
ref="formDialogRef"
|
||||||
title="เพิ่มบุคลากร"
|
:title="$t('personnelAdd')"
|
||||||
addressTitle="ที่อยู่พนักงาน"
|
:addressTitle="$t('formDialogTitleAddressPure')"
|
||||||
addressENTitle="ที่อยู่พนักงาน ENG"
|
:addressTitleEN="$t('formDialogTitleAddressPure') + ' ENG'"
|
||||||
v-model:modal="modal"
|
v-model:modal="modal"
|
||||||
v-model:address="formData.address"
|
v-model:address="formData.address"
|
||||||
v-model:addressEN="formData.addressEN"
|
v-model:addressEN="formData.addressEN"
|
||||||
|
|
@ -815,28 +836,31 @@ watch(
|
||||||
>
|
>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
id="btn-profile-cancel"
|
||||||
dense
|
dense
|
||||||
unelevated
|
unelevated
|
||||||
outlined
|
outlined
|
||||||
padding="8px"
|
padding="8px"
|
||||||
class="cancel-img-btn full-width"
|
class="cancel-img-btn full-width"
|
||||||
label="ยกเลิก"
|
:label="$t('cancel')"
|
||||||
@click="urlProfile = ''"
|
@click="urlProfile = ''"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
id="btn-profile-save"
|
||||||
dense
|
dense
|
||||||
unelevated
|
unelevated
|
||||||
outlined
|
outlined
|
||||||
padding="8px"
|
padding="8px"
|
||||||
class="submit-img-btn full-width"
|
class="submit-img-btn full-width"
|
||||||
label="บันทึก"
|
:label="$t('save')"
|
||||||
@click="profileSubmit = true"
|
@click="profileSubmit = true"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
id="btn-profile-edit"
|
||||||
v-else-if="urlProfile && profileSubmit"
|
v-else-if="urlProfile && profileSubmit"
|
||||||
dense
|
dense
|
||||||
unelevated
|
unelevated
|
||||||
|
|
@ -844,18 +868,19 @@ watch(
|
||||||
padding="8px"
|
padding="8px"
|
||||||
icon="mdi-pencil-outline"
|
icon="mdi-pencil-outline"
|
||||||
class="edit-img-btn q-mt-md full-width"
|
class="edit-img-btn q-mt-md full-width"
|
||||||
label="แก้ไขโปรไฟล์"
|
:label="$t('formDialogBtnEditProfile')"
|
||||||
@click.prevent="inputFile.click(), (profileSubmit = false)"
|
@click.prevent="inputFile.click(), (profileSubmit = false)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
|
id="btn-profile-upload"
|
||||||
v-else
|
v-else
|
||||||
dense
|
dense
|
||||||
unelevated
|
unelevated
|
||||||
outlined
|
outlined
|
||||||
padding="8px"
|
padding="8px"
|
||||||
class="upload-img-btn q-mt-md full-width"
|
class="upload-img-btn q-mt-md full-width"
|
||||||
label="อัปโหลดรูปภาพ"
|
:label="$t('formDialogBtnUploadProfile')"
|
||||||
:class="{ dark: $q.dark.isActive }"
|
:class="{ dark: $q.dark.isActive }"
|
||||||
@click="inputFile.click()"
|
@click="inputFile.click()"
|
||||||
/>
|
/>
|
||||||
|
|
@ -868,7 +893,7 @@ watch(
|
||||||
padding="none"
|
padding="none"
|
||||||
class="q-pr-md"
|
class="q-pr-md"
|
||||||
/>
|
/>
|
||||||
<span>สถานะผู้ใช้งาน</span>
|
<span>{{ $t('formDialogTitleUserStatus') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue