Issues
This commit is contained in:
parent
1dbc40ddfb
commit
65cc0d0816
6 changed files with 34 additions and 30 deletions
|
|
@ -276,19 +276,6 @@ function fetchDataPeriod(id: string) {
|
|||
});
|
||||
}
|
||||
|
||||
/**function เปลี่ยนกลุ่ม*/
|
||||
// function changeTabGroup() {
|
||||
// formFilter.page = 1;
|
||||
// formFilter.pageSize = 10;
|
||||
// formFilter.keyword = "";
|
||||
// store.tabType = "PENDING";
|
||||
// props.periodLatest &&
|
||||
// store.fetchPeriodLatest(props?.periodLatest, store.tabGroup);
|
||||
// store.groupId && fetchDataQuota(store.groupId);
|
||||
// store.groupId && fetchDataPeriod(store.groupId);
|
||||
// splitterModel.value = store.roundMainCode === "APR" ? 13 : 16;
|
||||
// }
|
||||
|
||||
/**function เปลี่ยนขั้น*/
|
||||
function changeTabType() {
|
||||
formFilter.page = 1;
|
||||
|
|
@ -303,7 +290,7 @@ function fetchDataPeriodNew() {
|
|||
store.groupId && fetchDataQuota(store.groupId);
|
||||
}
|
||||
|
||||
function onClickDownload(data: DataOption) {
|
||||
function onClickDownload(data: DataOption, type: string = "xlsx") {
|
||||
showLoader();
|
||||
if (data.id === "emp-08" || data.id === "emp2-08") {
|
||||
const formData = {
|
||||
|
|
@ -341,7 +328,13 @@ function onClickDownload(data: DataOption) {
|
|||
)
|
||||
.then((res) => {
|
||||
const dataList = res.data.result;
|
||||
genReportXLSX(dataList, data.name);
|
||||
// if (type === "pdf") {
|
||||
// console.log(type);
|
||||
|
||||
// genReport(dataList, data.name, type);
|
||||
// } else {
|
||||
genReportXLSX(dataList, data.name, type);
|
||||
// }
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -455,7 +448,7 @@ const updateIsShowRetire = async () => {
|
|||
:key="index"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="onClickDownload(item)"
|
||||
@click="onClickDownload(item, item.type)"
|
||||
>
|
||||
<q-item-section>
|
||||
<q-item-label>{{ item.name }}</q-item-label>
|
||||
|
|
|
|||
|
|
@ -304,7 +304,7 @@ function fetchDataPeriodNew() {
|
|||
store.groupId && fetchDataQuota(store.groupId);
|
||||
}
|
||||
|
||||
function onClickDownload(data: DataOption) {
|
||||
function onClickDownload(data: DataOption, type: string = "xlsx") {
|
||||
showLoader();
|
||||
if (data.id === "go1" || data.id === "go2") {
|
||||
const formData = {
|
||||
|
|
@ -354,7 +354,7 @@ function onClickDownload(data: DataOption) {
|
|||
.get(finalUrl)
|
||||
.then((res) => {
|
||||
const dataList = res.data.result;
|
||||
genReportXLSX(dataList, data.name);
|
||||
genReportXLSX(dataList, data.name, type);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -539,7 +539,7 @@ const updateIsShowRetire = async () => {
|
|||
:key="index"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="onClickDownload(item)"
|
||||
@click="onClickDownload(item, item.type)"
|
||||
>
|
||||
<q-item-section>
|
||||
<q-item-label>{{ item.name }}</q-item-label>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue