แก้ API ดาวน์โหลดไฟล์ของทะบียนประวัติ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-09-05 11:55:29 +07:00
parent dd1dd14d06
commit 24de3ccd48
3 changed files with 17 additions and 4 deletions

View file

@ -178,6 +178,7 @@ export default {
profileReportEmpId: (profileId: string) =>
`${report}kk1-employee/${profileId}`,
profileKp7ShortId: (profileId: string) => `${report}kp7-short/${profileId}`,
profileKp7ShortEmpId: (profileId: string) => `${report}kp7-short-employee/${profileId}`,
profileChangeNameId: (profileId: string) =>
`${profile}changeName/${profileId}`,

View file

@ -304,7 +304,10 @@ function onClickDownloadKp7(type: string) {
? empType.value
? config.API.profileReportEmpId(profileId.value)
: config.API.profileReportId(profileId.value)
: empType.value
? config.API.profileKp7ShortEmpId(profileId.value)
: config.API.profileKp7ShortId(profileId.value);
const fileName = type === "FULL" ? "ก.พ.7/ก.ก.1" : "ประวัติแบบย่อ";
http
.get(url, {
@ -746,6 +749,7 @@ onMounted(async () => {
</q-btn-dropdown>
<q-btn
v-if="empType !== '-temp'"
unelevated
round
color="grey-4"

View file

@ -394,16 +394,24 @@ onMounted(async () => {
>
<q-btn
v-if="
(props.row.draftOrgEmployeeStatus === null ||
props.row.draftOrgEmployeeStatus === 'WAITTING' ||
props.row.draftOrgEmployeeStatus === 'PENDING') &&
checkPermission($route)?.attrIsUpdate &&
checkPermission($route)?.attrIsGet
"
:disable="
props.row.draftOrgEmployeeStatus !== null &&
props.row.draftOrgEmployeeStatus !== 'WAITTING' &&
props.row.draftOrgEmployeeStatus !== 'PENDING'
"
flat
round
dense
color="blue"
:color="
props.row.draftOrgEmployeeStatus !== null &&
props.row.draftOrgEmployeeStatus !== 'WAITTING' &&
props.row.draftOrgEmployeeStatus !== 'PENDING'
? 'grey-5'
: 'blue'
"
icon="mdi-account-settings"
@click.pervent="onClickSelectPos(props.row)"
>