ออกคำสั่ง

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-10-09 14:33:20 +07:00
parent 73c41d9b01
commit 671c7103ab
7 changed files with 86 additions and 61 deletions

View file

@ -9,10 +9,15 @@ const $q = useQuasar();
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError } = mixin;
async function genReport(data: any, fileName: string, type: string = "docx") {
async function genReport(
data: any,
fileName: string,
type: string = "docx",
folder: string = ""
) {
showLoader();
await axios
.post(`${config.API.reportTemplate}/docx`, data, {
.post(`${config.API.reportTemplate}/docx${folder}`, data, {
headers:
type == "docx"
? {

View file

@ -12,11 +12,12 @@ const { showLoader, hideLoader, messageError } = mixin;
async function genReportXLSX(
data: any,
fileName: string,
type: string = "xlsx"
type: string = "xlsx",
folder: string = ""
) {
showLoader();
await axios
.post(`${config.API.reportTemplate}/xlsx`, data, {
.post(`${config.API.reportTemplate}/xlsx${folder}`, data, {
headers:
type == "xlsx"
? {