ออกคำสั่ง => แนบท้าย
This commit is contained in:
parent
f6ea889258
commit
45b04affa6
1 changed files with 27 additions and 27 deletions
|
|
@ -128,19 +128,19 @@ const downloadCover = async (type: string) => {
|
||||||
|
|
||||||
// โหลด เอกสารแนบท้าย
|
// โหลด เอกสารแนบท้าย
|
||||||
const downloadAttachment = async (type: string) => {
|
const downloadAttachment = async (type: string) => {
|
||||||
if (type === "xlsx") {
|
// if (type === "xlsx") {
|
||||||
genReportXLSX(
|
// genReportXLSX(
|
||||||
dataAttachmentxlxs.value,
|
// dataAttachmentxlxs.value,
|
||||||
`เอกสารแนบท้าย คำสั่ง ${orderName.value}`,
|
// `เอกสารแนบท้าย คำสั่ง ${orderName.value}`,
|
||||||
type
|
// type
|
||||||
);
|
// );
|
||||||
} else {
|
// } else {
|
||||||
genReport(
|
genReport(
|
||||||
dataAttachment.value,
|
dataAttachment.value,
|
||||||
`เอกสารแนบท้าย คำสั่ง ${orderName.value}`,
|
`เอกสารแนบท้าย คำสั่ง ${orderName.value}`,
|
||||||
type
|
type
|
||||||
);
|
);
|
||||||
}
|
// }
|
||||||
};
|
};
|
||||||
|
|
||||||
const dataCover = ref<any>();
|
const dataCover = ref<any>();
|
||||||
|
|
@ -160,7 +160,7 @@ const fetchReportCover = async (type: string, orderId: string) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const dataAttachment = ref<any>();
|
const dataAttachment = ref<any>();
|
||||||
const dataAttachmentxlxs = ref<any>();
|
// const dataAttachmentxlxs = ref<any>();
|
||||||
// เรียกไฟล์ เอกสารแนบท้าย
|
// เรียกไฟล์ เอกสารแนบท้าย
|
||||||
const fetchReportAttachment = async (type: string, orderId: string) => {
|
const fetchReportAttachment = async (type: string, orderId: string) => {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -175,16 +175,16 @@ const fetchReportAttachment = async (type: string, orderId: string) => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
|
|
||||||
showLoader();
|
// showLoader();
|
||||||
await http
|
// await http
|
||||||
.get(config.API.reportOrderAttachment("xlsx", orderId, code.value))
|
// .get(config.API.reportOrderAttachment("xlsx", orderId, code.value))
|
||||||
.then(async (res) => {
|
// .then(async (res) => {
|
||||||
dataAttachmentxlxs.value = res.data.result;
|
// dataAttachmentxlxs.value = res.data.result;
|
||||||
})
|
// })
|
||||||
.catch(async (e) => {
|
// .catch(async (e) => {
|
||||||
messageError($q, e);
|
// messageError($q, e);
|
||||||
hideLoader();
|
// hideLoader();
|
||||||
});
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
function genPDf(data: any) {
|
function genPDf(data: any) {
|
||||||
|
|
@ -552,15 +552,15 @@ const viewFileUpload = async (url: string) => {
|
||||||
<q-item
|
<q-item
|
||||||
clickable
|
clickable
|
||||||
v-close-popup
|
v-close-popup
|
||||||
@click="downloadAttachment('xlsx')"
|
@click="downloadAttachment('docx')"
|
||||||
>
|
>
|
||||||
<!-- type="a"
|
<!-- type="a"
|
||||||
:href="orderAttachmentXlsx"
|
:href="orderAttachmentXlsx"
|
||||||
target="_blank" -->
|
target="_blank" -->
|
||||||
<q-item-section avatar
|
<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>
|
||||||
<q-item-section>ไฟล์ .xls</q-item-section>
|
<q-item-section>ไฟล์ .docx</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
</q-menu>
|
</q-menu>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue