รายการเลื่อนเงินเดือนข้าราชการฯ => ดาวโหลราบงาน
This commit is contained in:
parent
f9bb01a66b
commit
63a6dc371c
2 changed files with 39 additions and 7 deletions
|
|
@ -33,6 +33,7 @@ const props = defineProps({
|
||||||
periodLatest: { type: Object as () => DataPeriodLatest, require: true },
|
periodLatest: { type: Object as () => DataPeriodLatest, require: true },
|
||||||
rootId: { type: String, require: true },
|
rootId: { type: String, require: true },
|
||||||
periodId: { type: String, require: true },
|
periodId: { type: String, require: true },
|
||||||
|
roundFilter: { type: Object, require: true },
|
||||||
});
|
});
|
||||||
|
|
||||||
const total = ref<number>();
|
const total = ref<number>();
|
||||||
|
|
@ -228,9 +229,9 @@ function fetchDataQuota(id: string) {
|
||||||
.get(config.API.salaryListPeriodQuota(id))
|
.get(config.API.salaryListPeriodQuota(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
||||||
store.remaining = data.remaining;
|
store.remaining = data.remaining;
|
||||||
store.statusQuota = data.status
|
store.statusQuota = data.status;
|
||||||
itemsCard.value[0].total = data.total;
|
itemsCard.value[0].total = data.total;
|
||||||
itemsCard.value[1].total = data.fifteenPercent;
|
itemsCard.value[1].total = data.fifteenPercent;
|
||||||
itemsCard.value[2].total = data.chosen;
|
itemsCard.value[2].total = data.chosen;
|
||||||
|
|
@ -308,12 +309,20 @@ function fetchDataPeriodNew() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onClickDownload(data: DataOption) {
|
function onClickDownload(data: DataOption) {
|
||||||
if (props.rootId && props.periodId) {
|
if (data.id === "gov1-06" || data.id === "gov2-06") {
|
||||||
showLoader();
|
const formData = {
|
||||||
|
type: "HAFT",
|
||||||
|
startDate:
|
||||||
|
data.id === "gov1-06"
|
||||||
|
? `${props?.roundFilter?.year - 1}-10-01`
|
||||||
|
: `${props?.roundFilter?.year}-04-01`,
|
||||||
|
endDate:
|
||||||
|
data.id === "gov1-06"
|
||||||
|
? `${props?.roundFilter?.year}-03-31`
|
||||||
|
: `${props?.roundFilter?.year}-09-30`,
|
||||||
|
};
|
||||||
http
|
http
|
||||||
.get(
|
.post(config.API.leaveReportLeaveday("officer"), formData)
|
||||||
config.API.salaryReportListsByid(data.id, props.rootId, props.periodId)
|
|
||||||
)
|
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const dataList = res.data.result;
|
const dataList = res.data.result;
|
||||||
genReportXLSX(dataList, data.name);
|
genReportXLSX(dataList, data.name);
|
||||||
|
|
@ -324,6 +333,28 @@ function onClickDownload(data: DataOption) {
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
if (props.rootId && props.periodId) {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.get(
|
||||||
|
config.API.salaryReportListsByid(
|
||||||
|
data.id,
|
||||||
|
props.rootId,
|
||||||
|
props.periodId
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.then((res) => {
|
||||||
|
const dataList = res.data.result;
|
||||||
|
genReportXLSX(dataList, data.name);
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -428,6 +428,7 @@ onMounted(async () => {
|
||||||
:periodLatest="periodLatest"
|
:periodLatest="periodLatest"
|
||||||
:periodId="roundFilter.id"
|
:periodId="roundFilter.id"
|
||||||
:rootId="agencyFilter"
|
:rootId="agencyFilter"
|
||||||
|
:roundFilter="roundFilter"
|
||||||
/>
|
/>
|
||||||
<q-card v-else class="q-pa-sm">
|
<q-card v-else class="q-pa-sm">
|
||||||
<div class="q-pa-sm">
|
<div class="q-pa-sm">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue