Merge branch 'develop' of github.com:Frappet/bma-ehr-frontend into develop
# Conflicts: # src/modules/03_recruiting/components/Address.vue # src/modules/03_recruiting/views/03_editor/index.vue # src/modules/04_registryPerson/components/Dialog/02_Address.vue # src/modules/04_registryPerson/components/detail/PersonalInformation/03_Address.vue # src/modules/05_placement/components/PersonalDetail/CheckInformation/02_FormAddress.vue # src/modules/05_placement/components/PersonalDetail/Information/Address.vue
This commit is contained in:
commit
563f3e1b16
95 changed files with 580 additions and 489 deletions
|
|
@ -16,7 +16,7 @@ const dataLabel = {
|
|||
registrationAddress: "ที่อยู่ตามทะเบียนบ้าน",
|
||||
registrationProvince: "จังหวัด",
|
||||
registrationDistrict: "เขต/อำเภอ",
|
||||
registrationSubDistrict: "แขวง / ตำบล",
|
||||
registrationSubDistrict: "แขวง/ตำบล",
|
||||
registrationZipCode: "รหัสไปรษณีย์",
|
||||
};
|
||||
|
||||
|
|
@ -51,8 +51,8 @@ async function selectDistrict(e: string | null, name: string) {
|
|||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันเลือก แขวง / ตำบล
|
||||
* @param e แขวง / ตำบล ที่เลือก
|
||||
* ฟังก์ชันเลือก แขวง/ตำบล
|
||||
* @param e แขวง/ตำบล ที่เลือก
|
||||
* @param name 1 คือ ที่อยู่ตามทะเบียนบ้าน 2 คือ ที่อยู่ปัจจุบัน
|
||||
*/
|
||||
function selectSubDistrict(e: string | null, name: string) {
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ const formInformations = reactive<RequestObject>({
|
|||
firstName: "",
|
||||
prefix: "",
|
||||
rank: null,
|
||||
prefixMain: "",
|
||||
});
|
||||
|
||||
const formDataAddress = reactive<RequestregistrationAddressObject>({
|
||||
|
|
@ -257,7 +258,7 @@ async function amiRequest() {
|
|||
formInformations.nationality = data.value.nationalityDesc;
|
||||
|
||||
// แปลง dateOfBirth เป็น format 1989-01-01
|
||||
formInformations.birthDate = conventDateOfBirth(`${data.value.dateOfBirth}`);
|
||||
formInformations.birthDate = data.value.dateOfBirth ? conventDateOfBirth(`${data.value.dateOfBirth}`) : null;
|
||||
age.value = storeLinkCenter.calculateAge(data.value.age);
|
||||
formInformations.gender = data.value.genderDesc;
|
||||
|
||||
|
|
@ -327,15 +328,15 @@ async function convertDistrict(val: string) {
|
|||
const id = storeLinkCenter.OpsAddress.districtOps.find(
|
||||
(e: DataOption) => e.name === val
|
||||
)?.id;
|
||||
// เรียกฟังก์ชันดึงข้อมูล แขวง / ตำบล
|
||||
// เรียกฟังก์ชันดึงข้อมูล แขวง/ตำบล
|
||||
await storeLinkCenter.fetchSubDistrict(id ? id : null, "1", false);
|
||||
|
||||
return id ? id : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันแปลงชื่อแขวง / ตำบล เป็น ID
|
||||
* @param val ชื่อแขวง / ตำบล
|
||||
* ฟังก์ชันแปลงชื่อแขวง/ตำบล เป็น ID
|
||||
* @param val ชื่อแขวง/ตำบล
|
||||
*/
|
||||
async function convertSubdistrict(val: string) {
|
||||
const result = storeLinkCenter.OpsAddress.subdistrictOps.find(
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "name",
|
||||
align: "left",
|
||||
label: "ชื่อ - นามสกุล",
|
||||
label: "ชื่อ-นามสกุล",
|
||||
field: "name",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
|
|
@ -261,8 +261,8 @@ function closeDialog() {
|
|||
<q-form ref="myForm">
|
||||
<div class="col-12 bg-grey-2 q-pa-sm">
|
||||
<div class="col-12 row q-pb-sm q-col-gutter-sm items-center"></div>
|
||||
<div class="q-col-gutter-xs row no-wrap">
|
||||
<div class="col-4">
|
||||
<q-toolbar>
|
||||
<div class="row q-col-gutter-sm">
|
||||
<q-select
|
||||
hide-bottom-space
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือก ประเภท'}`]"
|
||||
|
|
@ -279,9 +279,9 @@ function closeDialog() {
|
|||
use-input
|
||||
input-debounce="0"
|
||||
@update:model-value="changeEmployeeClass"
|
||||
style="width: 250px"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
|
||||
<q-select
|
||||
hide-bottom-space
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือก ฟิลด์ที่จะค้น'}`]"
|
||||
|
|
@ -298,59 +298,18 @@ function closeDialog() {
|
|||
use-input
|
||||
input-debounce="0"
|
||||
@update:model-value="selectTypeKeyword(typeKeyword)"
|
||||
style="width: 250px"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col" v-if="typeKeyword === 'no'">
|
||||
<q-input
|
||||
borderless
|
||||
outlined
|
||||
dense
|
||||
debounce="300"
|
||||
v-model="Keyword"
|
||||
placeholder="ตำแหน่งเลขที่"
|
||||
:rules="[(val:string) => !!val || `${'กรุณากรอก ตำแหน่งเลขที่'}`]"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col" v-if="typeKeyword === 'position'">
|
||||
<q-select
|
||||
hide-bottom-space
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือก ตำแหน่ง'}`]"
|
||||
outlined
|
||||
dense
|
||||
v-model="positionKeyword"
|
||||
emit-value
|
||||
map-options
|
||||
:options="options"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
:label="`${' เลือกตำแหน่ง'}`"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="filterFn"
|
||||
behavior="menu"
|
||||
>
|
||||
<template v-slot:no-option>
|
||||
<q-item>
|
||||
<q-item-section class="text-grey">
|
||||
ไม่มีข้อมูล
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template></q-select
|
||||
>
|
||||
</div>
|
||||
|
||||
<q-space />
|
||||
|
||||
<q-btn
|
||||
color="primary"
|
||||
icon="mdi-magnify"
|
||||
label="ค้นหา"
|
||||
@click="clickSearch(employeeClass)"
|
||||
/>
|
||||
</div>
|
||||
</q-toolbar>
|
||||
</div>
|
||||
|
||||
<div class="col-12 q-mt-sm">
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "fullName",
|
||||
align: "left",
|
||||
label: "ชื่อ - นามสกุล",
|
||||
label: "ชื่อ-นามสกุล",
|
||||
sortable: true,
|
||||
field: "fullName",
|
||||
headerStyle: "font-size: 14px; min-width: 200px",
|
||||
|
|
|
|||
|
|
@ -215,6 +215,8 @@ async function getData() {
|
|||
.get(config.API.profileNewGovernmentById(profileId.value, empType.value))
|
||||
.then(async (res) => {
|
||||
const data = await res.data.result;
|
||||
console.log(data);
|
||||
|
||||
formMain.ocId = data.org ?? "-"; //สังกัด
|
||||
formMain.positionId = data.position ?? "-"; //ตำแหน่ง
|
||||
formMain.positionLine = data.positionField ?? "-"; //สายงาน
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
|
|||
/**
|
||||
* props
|
||||
*/
|
||||
const isLeave = defineModel<boolean>("isLeave", {
|
||||
const isLeave = defineModel<boolean>("isLeave", {
|
||||
required: true,
|
||||
});
|
||||
|
||||
|
|
@ -230,7 +230,7 @@ function openDialogAdd() {
|
|||
/**
|
||||
* function fetch ข้อมูลรายการวินัย
|
||||
*/
|
||||
function fetchData(id: string) {
|
||||
async function fetchData(id: string) {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.profileNewDisciplineByProfileId(id, empType.value))
|
||||
|
|
@ -398,7 +398,6 @@ onMounted(() => {
|
|||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
|
||||
style="min-width: 140px"
|
||||
/>
|
||||
<q-btn-toggle
|
||||
|
|
|
|||
|
|
@ -256,7 +256,6 @@ onMounted(() => {
|
|||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
|
||||
style="min-width: 140px"
|
||||
/>
|
||||
<q-btn-toggle
|
||||
|
|
@ -366,7 +365,7 @@ onMounted(() => {
|
|||
flat
|
||||
round
|
||||
@click="openDialogEdit(props.row)"
|
||||
><q-tooltip>แก้ไข</q-tooltip></q-btn
|
||||
><q-tooltip>แก้ไขข้อมูล</q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ const dataLabel = {
|
|||
religion: "ศาสนา",
|
||||
bloodGroup: "หมู่เลือด",
|
||||
phone: "เบอร์โทร",
|
||||
email: "อีเมล์",
|
||||
email: "อีเมล",
|
||||
prefix: "คำนำหน้าชื่อ",
|
||||
rank: "ยศ",
|
||||
firstName: "ชื่อ",
|
||||
|
|
@ -316,10 +316,11 @@ async function getData() {
|
|||
function onClickOpenDialog() {
|
||||
if (!informaData.value) return;
|
||||
modal.value = true;
|
||||
|
||||
id.value = informaData.value.id;
|
||||
age.value = calculateAge(informaData.value.birthDate);
|
||||
formData.citizenId = informaData.value.citizenId;
|
||||
formData.prefix = informaData.value.prefix;
|
||||
formData.prefix = informaData.value.prefixMain;
|
||||
formData.rank = informaData.value.rank;
|
||||
formData.firstName = informaData.value.firstName;
|
||||
formData.lastName = informaData.value.lastName;
|
||||
|
|
|
|||
|
|
@ -461,7 +461,7 @@ onMounted(async () => {
|
|||
icon="add"
|
||||
@click="
|
||||
() => {
|
||||
changeNameData.prefix = profileInfo?.prefix;
|
||||
changeNameData.prefix = profileInfo?.prefixMain;
|
||||
changeNameData.firstName = profileInfo?.firstName;
|
||||
changeNameData.lastName = profileInfo?.lastName;
|
||||
prefixChange = changeNameData.prefix;
|
||||
|
|
@ -496,7 +496,6 @@ onMounted(async () => {
|
|||
outlined
|
||||
emit-value
|
||||
map-options
|
||||
|
||||
options-dense
|
||||
option-value="name"
|
||||
style="min-width: 140px"
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ const columnsHistory = ref<QTableProps["columns"]>([
|
|||
/**
|
||||
* ฟังก์ชันดึงข้อมูลที่อยู่
|
||||
*
|
||||
* ดึงข้อมูลที่อยู่ ข้อมูลจังหวัด ข้อมูล เขต / อำเภอ และข้อมูล แขวง / ตำบล
|
||||
* ดึงข้อมูลที่อยู่ ข้อมูลจังหวัด ข้อมูล เขต / อำเภอ และข้อมูล แขวง/ตำบล
|
||||
*/
|
||||
async function getData() {
|
||||
showLoader();
|
||||
|
|
@ -337,8 +337,8 @@ async function selectDistrict(e: string | null, name: string) {
|
|||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันเลือก แขวง / ตำบล
|
||||
* @param e แขวง / ตำบล ที่เลือก
|
||||
* ฟังก์ชันเลือก แขวง/ตำบล
|
||||
* @param e แขวง/ตำบล ที่เลือก
|
||||
* @param name 1 คือ ที่อยู่ตามทะเบียนบ้าน 2 คือ ที่อยู่ปัจจุบัน
|
||||
*/
|
||||
function selectSubDistrict(e: string | null, name: string) {
|
||||
|
|
@ -941,7 +941,6 @@ onMounted(async () => {
|
|||
map-options
|
||||
:options="columnsHistory"
|
||||
option-value="name"
|
||||
|
||||
style="min-width: 140px"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1008,7 +1008,7 @@ onMounted(async () => {
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row q-mt-md">
|
||||
<div class="row">
|
||||
<div class="q-mr-sm">สถานภาพการมีชีวิต</div>
|
||||
<div>
|
||||
<q-radio
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue