Merge branch 'develop' into devTee
This commit is contained in:
commit
17b832bcfc
35 changed files with 877 additions and 621 deletions
|
|
@ -10,6 +10,7 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
import axios from "axios";
|
||||
import genReport from "@/plugins/genreport";
|
||||
import genReportXLSX from "@/plugins/genreportxlsx";
|
||||
|
||||
import { useOrderPlacementDataStore } from "@/modules/10_order/store";
|
||||
|
||||
|
|
@ -127,11 +128,19 @@ const downloadCover = async (type: string) => {
|
|||
|
||||
// โหลด เอกสารแนบท้าย
|
||||
const downloadAttachment = async (type: string) => {
|
||||
// if (type === "xlsx") {
|
||||
// genReportXLSX(
|
||||
// dataAttachmentxlxs.value,
|
||||
// `เอกสารแนบท้าย คำสั่ง ${orderName.value}`,
|
||||
// type
|
||||
// );
|
||||
// } else {
|
||||
genReport(
|
||||
dataAttachment.value,
|
||||
`เอกสารแนบท้าย คำสั่ง ${orderName.value}`,
|
||||
type
|
||||
);
|
||||
// }
|
||||
};
|
||||
|
||||
const dataCover = ref<any>();
|
||||
|
|
@ -151,6 +160,7 @@ const fetchReportCover = async (type: string, orderId: string) => {
|
|||
};
|
||||
|
||||
const dataAttachment = ref<any>();
|
||||
// const dataAttachmentxlxs = ref<any>();
|
||||
// เรียกไฟล์ เอกสารแนบท้าย
|
||||
const fetchReportAttachment = async (type: string, orderId: string) => {
|
||||
showLoader();
|
||||
|
|
@ -164,6 +174,17 @@ const fetchReportAttachment = async (type: string, orderId: string) => {
|
|||
messageError($q, e);
|
||||
hideLoader();
|
||||
});
|
||||
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.reportOrderAttachment("xlsx", orderId, code.value))
|
||||
// .then(async (res) => {
|
||||
// dataAttachmentxlxs.value = res.data.result;
|
||||
// })
|
||||
// .catch(async (e) => {
|
||||
// messageError($q, e);
|
||||
// hideLoader();
|
||||
// });
|
||||
};
|
||||
|
||||
function genPDf(data: any) {
|
||||
|
|
@ -531,15 +552,15 @@ const viewFileUpload = async (url: string) => {
|
|||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="downloadAttachment('xlsx')"
|
||||
@click="downloadAttachment('docx')"
|
||||
>
|
||||
<!-- type="a"
|
||||
:href="orderAttachmentXlsx"
|
||||
target="_blank" -->
|
||||
<q-item-section avatar
|
||||
><q-icon color="green-7" name="mdi-file-excel"
|
||||
><q-icon color="blue" name="mdi-file-word"
|
||||
/></q-item-section>
|
||||
<q-item-section>ไฟล์ .xls</q-item-section>
|
||||
<q-item-section>ไฟล์ .docx</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue