From 7d4be05a9a4e458c415471bf333b7069d671c38d Mon Sep 17 00:00:00 2001 From: Kittapath Date: Mon, 5 Feb 2024 12:49:00 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9A=E0=B8=B1=E0=B8=99=E0=B8=97=E0=B8=B6?= =?UTF-8?q?=E0=B8=81=E0=B8=95=E0=B8=B3=E0=B9=81=E0=B8=AB=E0=B8=99=E0=B9=88?= =?UTF-8?q?=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/04_registry/components/Salary.vue | 43 ++++++++++++++----- .../04_registry/interface/request/Salary.ts | 7 +++ 2 files changed, 40 insertions(+), 10 deletions(-) diff --git a/src/modules/04_registry/components/Salary.vue b/src/modules/04_registry/components/Salary.vue index ae69d7868..d7a315397 100644 --- a/src/modules/04_registry/components/Salary.vue +++ b/src/modules/04_registry/components/Salary.vue @@ -1681,7 +1681,7 @@ const fetchData = async () => { .then((res) => { let data = res.data.result; rows.value = []; - data.map((e: ResponseObject) => { + data.map((e: any) => { rows.value.push({ id: e.id, date: new Date(e.date), @@ -1691,6 +1691,7 @@ const fetchData = async () => { oc: e.oc, ocId: e.ocId, position: e.position, + positionName: e.positionName, positionId: e.positionId !== "00000000-0000-0000-0000-000000000000" ? e.positionId @@ -1701,15 +1702,18 @@ const fetchData = async () => { ? e.posNoId : "", positionLine: e.positionLine, + positionLineName: e.positionLineName, positionLineId: e.positionLineId, positionPathSide: e.positionPathSide, positionPathSideId: e.positionPathSideId, + positionPathSideName: e.positionPathSideName, positionType: e.positionType, positionTypeId: e.positionTypeId, positionLevel: e.positionLevel, positionLevelId: e.positionLevelId, positionExecutive: e.positionExecutive, positionExecutiveId: e.positionExecutiveId, + positionExecutiveName: e.positionExecutiveName, positionExecutiveSide: e.positionExecutiveSide, positionExecutiveSideId: e.positionExecutiveSideId, salaryClass: e.salaryClass, @@ -1717,6 +1721,9 @@ const fetchData = async () => { salaryStatus: e.salaryStatus, refCommandNo: e.refCommandNo, createdFullName: e.createdFullName, + orgName: e.orgName, + agencyName: e.agencyName, + cLevel: e.cLevel, createdAt: new Date(e.createdAt), }); }); @@ -1804,14 +1811,14 @@ const getData = async () => { mouthSalaryAmount.value = row.mouthSalaryAmount; await onSelected(row.ocId); selected.value = row.ocId; - positionName.value = row.positionId; + positionName.value = row.positionName; posNoId.value = row.posNoId; posNo.value = row.posNo; - positionLineName.value = row.positionLineId; - positionPathSideName.value = row.positionPathSideId; + positionLineName.value = row.positionLineName; + positionPathSideName.value = row.positionPathSideName; positionTypeId.value = row.positionTypeId; positionLevelId.value = row.positionLevelId; - positionExecutiveName.value = row.positionExecutiveId; + positionExecutiveName.value = row.positionExecutiveName; positionExecutiveSideId.value = row.positionExecutiveSideId; salaryClass.value = row.salaryClass; salaryRef.value = row.salaryRef; @@ -1980,6 +1987,9 @@ const saveData = async () => { // salaryClass: salaryClass.value, salaryRef: salaryRef.value, refCommandNo: refCommandNo.value, + orgName: orgName.value, + agencyName: agencyName.value, + cLevel: cLevel.value, }) .then((res) => { success($q, "บันทึกข้อมูลสำเร็จ"); @@ -2018,6 +2028,9 @@ const editData = async () => { // salaryClass: salaryClass.value, salaryRef: salaryRef.value, refCommandNo: refCommandNo.value, + orgName: orgName.value, + agencyName: agencyName.value, + cLevel: cLevel.value, }) .then((res) => { success($q, "บันทึกข้อมูลสำเร็จ"); @@ -2101,19 +2114,22 @@ const selectData = async (props: DataProps) => { mouthSalaryAmount.value = props.row.mouthSalaryAmount; // await onSelected(props.row.ocId); selected.value = props.row.ocId; - positionName.value = props.row.positionId; + positionName.value = props.row.positionName; posNoId.value = props.row.posNoId; posNo.value = props.row.posNo; - positionLineName.value = props.row.positionLineId; - positionPathSideName.value = props.row.positionPathSideId; + positionLineName.value = props.row.positionLineName; + positionPathSideName.value = props.row.positionPathSideName; positionTypeId.value = props.row.positionTypeId; positionLevelId.value = props.row.positionLevelId; - positionExecutiveName.value = props.row.positionExecutiveId; + positionExecutiveName.value = props.row.positionExecutiveName; positionExecutiveSideId.value = props.row.positionExecutiveSideId; salaryClass.value = props.row.salaryClass; salaryRef.value = props.row.salaryRef; refCommandNo.value = props.row.refCommandNo; id.value = props.row.id; + orgName.value = props.row.orgName; + agencyName.value = props.row.agencyName; + cLevel.value = props.row.cLevel; await checkRowPage(); }; @@ -2200,7 +2216,7 @@ const clickHistory = async (row: RequestItemsObject) => { .then((res) => { let data = res.data.result; rowsHistory.value = []; - data.map((e: ResponseObject) => { + data.map((e: any) => { rowsHistory.value.push({ id: e.id, date: new Date(e.date), @@ -2211,18 +2227,22 @@ const clickHistory = async (row: RequestItemsObject) => { ocId: e.ocId, position: e.position, positionId: e.positionId, + positionName: e.positionName, posNo: e.posNo, posNoId: e.posNoId, positionLine: e.positionLine, + positionLineName: e.positionLineName, positionLineId: e.positionLineId, positionPathSide: e.positionPathSide, positionPathSideId: e.positionPathSideId, + positionPathSideName: e.positionPathSideName, positionType: e.positionType, positionTypeId: e.positionTypeId, positionLevel: e.positionLevel, positionLevelId: e.positionLevelId, positionExecutive: e.positionExecutive, positionExecutiveId: e.positionExecutiveId, + positionExecutiveName: e.positionExecutiveName, positionExecutiveSide: e.positionExecutiveSide, positionExecutiveSideId: e.positionExecutiveSideId, salaryClass: e.salaryClass, @@ -2230,6 +2250,9 @@ const clickHistory = async (row: RequestItemsObject) => { salaryRef: e.salaryRef, refCommandNo: e.refCommandNo, createdFullName: e.createdFullName, + orgName: e.orgName, + agencyName: e.agencyName, + cLevel: e.cLevel, createdAt: new Date(e.createdAt), }); }); diff --git a/src/modules/04_registry/interface/request/Salary.ts b/src/modules/04_registry/interface/request/Salary.ts index 81c8f6129..1ab977cf0 100644 --- a/src/modules/04_registry/interface/request/Salary.ts +++ b/src/modules/04_registry/interface/request/Salary.ts @@ -18,24 +18,31 @@ interface RequestItemsObject { oc: string; ocId: string; position: string; + positionName: string; positionId: string; posNo: string; posNoId: string; positionLine: string; + positionLineName: string; positionLineId: string; positionPathSide: string; positionPathSideId: string; + positionPathSideName: string; positionType: string; positionTypeId: string; positionLevel: string; positionLevelId: string; positionExecutive: string; + positionExecutiveName: string; positionExecutiveId: string; positionExecutiveSide: string; positionExecutiveSideId: string; salaryClass: string; salaryRef: string; refCommandNo: string; + orgName: string; + agencyName: string; + cLevel: string; // refCommandDate: Date | null; salaryStatus: string | null; createdFullName: string;