Merge branch 'develop' into dev-tee

This commit is contained in:
setthawutttty 2023-09-13 14:57:49 +07:00
commit 4936c51a31
10 changed files with 195 additions and 51 deletions

View file

@ -643,24 +643,44 @@ const fetchData = async () => {
.get(config.API.profileAdrsId(route.params.id.toString()))
.then((res) => {
const data: ResponseObject = res.data.result;
console.log(data);
addressData.value.address = data.registrationAddress;
addressData.value.addressC = data.currentAddress;
addressData.value.districtId = data.registrationDistrictId;
addressData.value.districtIdC = data.currentDistrictId;
addressData.value.provinceId = data.registrationProvinceId;
addressData.value.provinceIdC = data.currentProvinceId;
addressData.value.subdistrictId = data.registrationSubDistrictId;
addressData.value.subdistrictIdC = data.currentSubDistrictId;
addressData.value.districtId =
data.registrationDistrictId !== "00000000-0000-0000-0000-000000000000"
? data.registrationDistrictId
: "";
addressData.value.districtIdC =
data.currentDistrictId !== "00000000-0000-0000-0000-000000000000"
? data.currentDistrictId
: "";
addressData.value.provinceId =
data.registrationProvinceId !== "00000000-0000-0000-0000-000000000000"
? data.registrationProvinceId
: "";
addressData.value.provinceIdC =
data.currentProvinceId !== "00000000-0000-0000-0000-000000000000"
? data.currentProvinceId
: "";
addressData.value.subdistrictId =
data.registrationSubDistrictId !==
"00000000-0000-0000-0000-000000000000"
? data.registrationSubDistrictId
: "";
addressData.value.subdistrictIdC =
data.currentSubDistrictId !== "00000000-0000-0000-0000-000000000000"
? data.currentSubDistrictId
: "";
addressData.value.same = data.registrationSame ? "1" : "0";
addressData.value.codec = data.currentZipCode;
addressData.value.codep = data.registrationZipCode;
console.log(res);
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
.finally(async () => {
hideLoader();
});
}

View file

@ -1022,12 +1022,21 @@ const fetchData = async () => {
informaData.value.firstname = data.firstName;
informaData.value.lastname = data.lastName;
informaData.value.birthDate = new Date(data.birthDate);
informaData.value.genderId = data.genderId;
informaData.value.genderId =
data.genderId !== "00000000-0000-0000-0000-000000000000"
? data.genderId
: "";
informaData.value.bloodId = data.bloodGroupId;
informaData.value.nationality = data.nationality;
informaData.value.ethnicity = data.race;
informaData.value.statusId = data.relationshipId;
informaData.value.religionId = data.religionId;
informaData.value.statusId =
data.relationshipId !== "00000000-0000-0000-0000-000000000000"
? data.relationshipId
: "";
informaData.value.religionId =
data.religionId !== "00000000-0000-0000-0000-000000000000"
? data.religionId
: "";
informaData.value.tel = data.telephoneNumber;
informaData.value.age = data.age;
informaData.value.employeeType = data.employeeType;

View file

@ -486,6 +486,8 @@ const fetchData = async () => {
// console.log(res);
// });
const data: any = res.data.result;
console.log(data);
informaTempData.value.employeeMoneyIncrease =
data.employeeMoneyIncrease;
informaTempData.value.employeeMoneyAllowance =
@ -495,11 +497,19 @@ const fetchData = async () => {
informaTempData.value.employeeMoneyEmployer =
data.employeeMoneyEmployer;
informaTempData.value.positionEmployeeGroupId =
data.positionEmployeeGroupId;
data.positionEmployeeGroupId !==
"00000000-0000-0000-0000-000000000000"
? data.positionEmployeeGroupId
: "";
informaTempData.value.positionEmployeePositionId =
data.positionEmployeePositionId;
data.positionEmployeePositionId !==
"00000000-0000-0000-0000-000000000000"
? data.positionEmployeePositionId
: "";
informaTempData.value.positionEmployeeLineId =
data.positionEmployeeLineId;
data.positionEmployeeLineId !== "00000000-0000-0000-0000-000000000000"
? data.positionEmployeeLineId
: "";
informaTempData.value.employeeTypeIndividual =
data.employeeTypeIndividual;
informaTempData.value.employeeOc = data.employeeOc;

View file

@ -536,6 +536,7 @@
</q-form>
</q-card>
</q-dialog>
<HistoryTable
:rows="rowsHistory"
:columns="columnsHistory"
@ -619,6 +620,7 @@ const {
showLoader,
hideLoader,
dialogConfirm,
dialogMessageNotify,
} = mixin;
const route = useRoute();
const id = ref<string>("");
@ -1498,7 +1500,8 @@ const fetchData = async () => {
.get(config.API.profileSalaryEmployeeId(profileId.value))
.then((res) => {
const data = res.data.result;
// console.log(data);
console.log(data);
rows.value = [];
data.map((e: ResponseObjectEmployee) => {
rows.value.push({
@ -1510,7 +1513,10 @@ const fetchData = async () => {
oc: e.oc,
ocId: e.ocId,
posNo: e.posNo,
posNoId: e.posNoId,
posNoId:
e.posNoId !== "00000000-0000-0000-0000-000000000000"
? e.posNoId
: "",
posNoEmployee: e.posNoEmployee,
positionEmployeeGroup: e.positionEmployeeGroup,
positionEmployeeGroupId: e.positionEmployeeGroupId,
@ -1709,12 +1715,14 @@ const clickSave = () => {
};
const SaveData = async () => {
await myForm.value.validate().then(async (result: boolean) => {
if (result) {
if (result && agencyId.value) {
if (modalEdit.value) {
await editData();
} else {
await saveData();
}
} else if (agencyId.value == "") {
dialogMessageNotify($q, "กรุณาเลือกหน่วยงาน");
}
});
};
@ -1759,6 +1767,8 @@ const saveData = async () => {
* นทกแกไขขอม
*/
const editData = async () => {
console.log(agencyId.value);
showLoader();
await http
.put(config.API.profileSalaryEmployeeId(id.value), {
@ -1968,7 +1978,7 @@ const clickHistory = async (row: RequestItemsEmployee) => {
.get(config.API.profileSalaryHisId(row.id))
.then((res) => {
const data = res.data.result;
// console.log("clickHistory", data);
console.log("clickHistory", data);
rowsHistory.value = [];
data.map((e: ResponseObjectEmployee) => {
rowsHistory.value.push({