รายการเงินเดือน => ดาวน์โหลไฟล์
This commit is contained in:
parent
b331a79277
commit
dd91af09f3
2 changed files with 24 additions and 3 deletions
|
|
@ -3,8 +3,10 @@ import { ref, onMounted, reactive, computed } from "vue";
|
|||
import { useQuasar } from "quasar";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import genReportXLSX from "@/plugins/genreportxlsx";
|
||||
|
||||
/** importType*/
|
||||
import type { DataOption } from "@/modules/13_salary/interface/index/Main";
|
||||
import type { DataFilter } from "@/modules/13_salary/interface/index/SalaryList";
|
||||
import type {
|
||||
DataPeriodLatest,
|
||||
|
|
@ -18,6 +20,7 @@ import TableTabType2 from "@/modules/13_salary/components/SalaryLists/TableTypeO
|
|||
/** importStore*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore";
|
||||
import { log } from "console";
|
||||
|
||||
/** use*/
|
||||
const $q = useQuasar();
|
||||
|
|
@ -259,6 +262,23 @@ function fetchDataPeriodNew() {
|
|||
store.groupId && fetchDataQuota(store.groupId);
|
||||
}
|
||||
|
||||
function onClickDownload(data: DataOption) {
|
||||
console.log(data);
|
||||
// showLoader();
|
||||
// http
|
||||
// .get(config.API.salaryReportByid(salaryId.value))
|
||||
// .then((res) => {
|
||||
// const dataList = res.data.result;
|
||||
// genReportXLSX(dataList, "อัตราเงินเดือน");
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// });
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await fetchDataQuota(store.groupId);
|
||||
await fetchDataPeriod(store.groupId);
|
||||
|
|
@ -330,6 +350,7 @@ onMounted(async () => {
|
|||
:key="index"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="onClickDownload(item)"
|
||||
>
|
||||
<q-item-section>
|
||||
<q-item-label>{{ item.name }}</q-item-label>
|
||||
|
|
|
|||
|
|
@ -160,17 +160,17 @@ function getAgency(id: string) {
|
|||
* function เรียกข้อมูลหน่ยวงานปจุบัน
|
||||
* @param id revisionId
|
||||
*/
|
||||
function getAgencyPosition(id: string) {
|
||||
async function getAgencyPosition(id: string) {
|
||||
if (id) {
|
||||
http
|
||||
.get(config.API.keycloakPositionByid(id))
|
||||
.then((res) => {
|
||||
.then(async (res) => {
|
||||
const data = res.data.result;
|
||||
|
||||
const position = agencyOptions.value?.find(
|
||||
(e: DataOption) => e.id === data.rootId
|
||||
);
|
||||
agencyFilter.value = position ? position.id : "";
|
||||
agencyFilter.value = await (position ? position.id : "");
|
||||
|
||||
if (agencyFilter.value && roundFilter.value.id && snapFilter.value) {
|
||||
fetchSalalyPeriod(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue