diff --git a/src/components/information/Information.vue b/src/components/information/Information.vue index 70a7b9d68..8446b07d1 100644 --- a/src/components/information/Information.vue +++ b/src/components/information/Information.vue @@ -116,7 +116,7 @@ lazy-rules :readonly="!edit" :borderless="!edit" - :model-value="date2Thai(informaData.birthDate)" + :model-value="informaData.birthDate ? date2Thai(informaData.birthDate) : null" :rules="[(val:string) => !!val || `${'กรุณาเลือก วัน/เดือน/ปี เกิด'}`]" :label="`${'วัน/เดือน/ปี เกิด'}`" > @@ -1054,7 +1054,7 @@ const editData = async () => { nationality: informaData.value.nationality, race: informaData.value.ethnicity, religionId: informaData.value.religionId, - birthDate: dateToISO(informaData.value.birthDate) ?? dateToISO(new Date()), + birthDate: informaData.value.birthDate ? dateToISO(informaData.value.birthDate) : dateToISO(new Date()), bloodGroupId: informaData.value.bloodId, relationshipId: informaData.value.statusId, telephoneNumber: informaData.value.tel, diff --git a/src/components/information/interface/index/Main.ts b/src/components/information/interface/index/Main.ts index fe165e2b9..25c5cfe8e 100644 --- a/src/components/information/interface/index/Main.ts +++ b/src/components/information/interface/index/Main.ts @@ -1,4 +1,4 @@ -import type { zipCodeOption } from "../../components/profileType"; +import type { zipCodeOption } from "@/components/information/interface/index/profileType"; interface Pagination { rowsPerPage: number; } diff --git a/src/components/information/interface/index/profileType.ts b/src/components/information/interface/index/profileType.ts new file mode 100644 index 000000000..a3e94f836 --- /dev/null +++ b/src/components/information/interface/index/profileType.ts @@ -0,0 +1,210 @@ +//interface class array object {name string ,id number} + +import type { childrenFamily } from "@/modules/04_registry/interface/response/Family"; +interface ChangeActive { + name: string; + id: number; +} + +//ข้อมูลส่วนตัว +interface Information { + cardid: string | null; + prefix: string | null; + age: string | null; + prefixId: string | null; + firstname: string | null; + lastname: string | null; + birthDate: Date | null; + genderId: string | null; + bloodId: string | null; + nationality: string | null; + ethnicity: string | null; + statusId: string | null; + religionId: string | null; + tel: string | null; + employeeType: string | null; + employeeClass: string | null; + profileType: string | null; +} + +interface Family { + prefixC: string | null; // couple + prefixIdC: string | null; + firstnameC: string | null; + lastnameC: string | null; + lastnameCOld: string | null; + occupationC: string | null; + citizenIdC: string | null; + liveC: string | null; + prefixM: string | null; // male + prefixIdM: string | null; + firstnameM: string | null; + lastnameM: string | null; + occupationM: string | null; + citizenIdM: string | null; + liveM: string | null; + prefixF: string | null; // female + prefixIdF: string | null; + firstnameF: string | null; + lastnameF: string | null; + occupationF: string | null; + citizenIdF: string | null; + liveF: string | null; + same: string | null; + childrens: childrenFamily[]; +} + +interface Address { + address: string | null; + provinceId: string | null; + districtId: string | null; + subdistrictId: string | null; + addressC: string | null; + provinceIdC: string | null; + districtIdC: string | null; + subdistrictIdC: string | null; + same: string | null; + codec: string | null; + codep: string | null; +} + +interface Goverment { + ocId: string | null; + positionId: string | null; + positionPathSide: string | null; + positionLine: string | null; + positionType: string | null; + positionLevel: string | null; + numberId: string | null; + positionExecutive: string | null; + positionExecutiveSide: string | null; + containDate: Date; + workDate: Date; + retireDate: string | null; + absent: number | null; + age: number | null; + ageAll: string | null; + reasonSameDate: string | null; +} + +interface DataOption { + id: string; + name: string; + zipCode?: string; +} + +interface zipCodeOption { + id: string; + name: string; + zipCode: string; +} + +const defaultGoverment: Goverment = { + ocId: null, + positionId: null, + positionPathSide: null, + positionLine: null, + positionType: null, + positionLevel: null, + numberId: null, + positionExecutive: null, + positionExecutiveSide: null, + containDate: new Date(), + workDate: new Date(), + retireDate: null, + absent: 0, + age: 0, + ageAll: null, + reasonSameDate: null, +}; + +const defaultAddress: Address = { + address: null, + provinceId: null, + districtId: null, + subdistrictId: null, + addressC: null, + provinceIdC: null, + districtIdC: null, + subdistrictIdC: null, + codec: null, + codep: null, + same: "0", +}; + +const defaultInformation: Information = { + cardid: null, + age: null, + prefix: null, + prefixId: null, + firstname: null, + lastname: null, + birthDate: null, + genderId: null, + bloodId: null, + nationality: null, + ethnicity: null, + statusId: null, + religionId: null, + tel: null, + employeeType: null, + employeeClass: null, + profileType: null, +}; + +const defaultTempInformation: any = { + employeeMoneyIncrease: null, + employeeMoneyAllowance: null, + employeeMoneyEmployee: null, + employeeMoneyEmployer: null, + positionEmployeeGroupId: null, + positionEmployeePositionId: null, + positionEmployeeLineId: null, + employeeTypeIndividual: null, + employeeOc: null, + employeeWage: null, +}; + +const defaultFamily: Family = { + prefixC: null, + prefixIdC: null, + firstnameC: null, + lastnameC: null, + lastnameCOld: null, + occupationC: null, + citizenIdC: null, + liveC: "1", + prefixM: null, + prefixIdM: null, + firstnameM: null, + lastnameM: null, + occupationM: null, + citizenIdM: null, + liveM: "1", + prefixF: null, + prefixIdF: null, + firstnameF: null, + lastnameF: null, + occupationF: null, + citizenIdF: null, + liveF: "1", + same: "0", + childrens: [], +}; + +export { + defaultInformation, + defaultFamily, + defaultAddress, + defaultGoverment, + defaultTempInformation, +}; +export type { + ChangeActive, + Information, + Family, + Address, + Goverment, + DataOption, + zipCodeOption, +}; diff --git a/src/modules/04_registry/components/SalaryEmployee.vue b/src/modules/04_registry/components/SalaryEmployee.vue index da2d034b7..f500e4f60 100644 --- a/src/modules/04_registry/components/SalaryEmployee.vue +++ b/src/modules/04_registry/components/SalaryEmployee.vue @@ -1540,6 +1540,7 @@ const fetchData = async () => { // refCommandDate: new Date(e.refCommandDate), createdFullName: e.createdFullName, createdAt: new Date(e.createdAt), + salaryStatus: null }); }); }) @@ -2022,6 +2023,7 @@ const clickHistory = async (row: RequestItemsEmployee) => { refCommandNo: e.refCommandNo, createdFullName: e.createdFullName, createdAt: new Date(e.createdAt), + salaryStatus: null }); }); }) diff --git a/src/modules/04_registry/components/SalaryEmployeeTemp.vue b/src/modules/04_registry/components/SalaryEmployeeTemp.vue index e569bec38..82f140634 100644 --- a/src/modules/04_registry/components/SalaryEmployeeTemp.vue +++ b/src/modules/04_registry/components/SalaryEmployeeTemp.vue @@ -1568,6 +1568,7 @@ const fetchData = async () => { refCommandNo: e.refCommandNo, createdFullName: e.createdFullName, createdAt: new Date(e.createdAt), + salaryStatus: null }); }); }) @@ -2068,6 +2069,7 @@ const clickHistory = async (row: RequestItemsEmployee) => { refCommandNo: e.refCommandNo, createdFullName: e.createdFullName, createdAt: new Date(e.createdAt), + salaryStatus: null }); }); }) diff --git a/src/modules/04_registry/components/profileType.ts b/src/modules/04_registry/components/profileType.ts index caf829f0e..a3e94f836 100644 --- a/src/modules/04_registry/components/profileType.ts +++ b/src/modules/04_registry/components/profileType.ts @@ -127,6 +127,8 @@ const defaultAddress: Address = { provinceIdC: null, districtIdC: null, subdistrictIdC: null, + codec: null, + codep: null, same: "0", }; diff --git a/src/modules/05_placement/components/Receive/AddEmployee/Main.vue b/src/modules/05_placement/components/Receive/AddEmployee/Main.vue new file mode 100644 index 000000000..c8f8d6a3d --- /dev/null +++ b/src/modules/05_placement/components/Receive/AddEmployee/Main.vue @@ -0,0 +1,505 @@ + + + \ No newline at end of file diff --git a/src/modules/05_placement/components/Receive/FormAdd.vue b/src/modules/05_placement/components/Receive/FormAdd.vue index 074e3b82a..04015992f 100644 --- a/src/modules/05_placement/components/Receive/FormAdd.vue +++ b/src/modules/05_placement/components/Receive/FormAdd.vue @@ -1,5 +1,5 @@