แก้ 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) => profileReportEmpId: (profileId: string) =>
`${report}kk1-employee/${profileId}`, `${report}kk1-employee/${profileId}`,
profileKp7ShortId: (profileId: string) => `${report}kp7-short/${profileId}`, profileKp7ShortId: (profileId: string) => `${report}kp7-short/${profileId}`,
profileKp7ShortEmpId: (profileId: string) => `${report}kp7-short-employee/${profileId}`,
profileChangeNameId: (profileId: string) => profileChangeNameId: (profileId: string) =>
`${profile}changeName/${profileId}`, `${profile}changeName/${profileId}`,

View file

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

View file

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