Merge branch 'develop' into dev-tee

This commit is contained in:
setthawutttty 2023-08-25 17:08:45 +07:00
commit f02ddcf93a
4 changed files with 1174 additions and 383 deletions

View file

@ -16,7 +16,8 @@ const { showLoader, hideLoader, messageError, success } = mixin;
// const type_params = route.params.type;
// const year_params = route.params.year;
const retireld_params = route.params.retirementId;
const orderCoverDocs = ref<string>("");
const orderCoverPdf = ref<string>("");
const modalNote = ref<boolean>(false);
const note = ref<string>("");
const retireProfileId = ref<string>("");
@ -149,10 +150,14 @@ const visibleColumns = ref<string[]>([
const action = ref<string>("");
const fileUpload = ref<any>(null);
const clickOpenDownloadPDF =() =>{window.open(orderCoverPdf.value);}
const clickOpenDownloadDoc =() =>{window.open(orderCoverDocs.value);}
onMounted(() => {
retireld.value = retireld_params.toString();
fecthlistprofile(retireld.value);
fetchReportCover("pdf", retireld.value);
fetchReportCover("docx", retireld.value);
});
const round = ref<number>();
const typeReport = ref<string>("");
@ -320,6 +325,25 @@ const uploadFile = async (event: any) => {
});
};
const fetchReportCover = async (type: string, orderId: string) => {
showLoader();
await http
.get(config.API.reportRetireList(type, orderId))
.then(async (res) => {
if (type == "pdf") {
orderCoverPdf.value = res.data.result;
} else {
orderCoverDocs.value = res.data.result;
}
})
.catch((e) => {
// messageError($q, e);
})
.finally(() => {
hideLoader();
});
};
// const classrow = (prop: any) => {
// if (profileId.value !== "" && prop.profileId === profileId.value) {
// return "color: #26a69a;";
@ -374,17 +398,29 @@ const paginationLabel = (start: number, end: number, total: number) => {
<q-btn color="primary" flat round icon="download">
<q-menu>
<q-list style="min-width: 100px">
<q-item clickable>
<q-item-section avatar>
<q-icon color="red" name="mdi-file-pdf" />
</q-item-section>
<q-item-section>ไฟล .PDF</q-item-section>
<q-item
clickable
v-close-popup
type="a"
@click="clickOpenDownloadPDF"
target="_blank"
>
<q-item-section avatar
><q-icon color="red" name="mdi-file-pdf"
/></q-item-section>
<q-item-section>ไฟล .PDF</q-item-section>
</q-item>
<q-item clickable>
<q-item-section avatar>
<q-icon color="green" name="mdi-file-excel" />
</q-item-section>
<q-item-section>ไฟล .xls</q-item-section>
<q-item
clickable
v-close-popup
type="a"
@click="clickOpenDownloadDoc"
target="_blank"
>
<q-item-section avatar
><q-icon color="blue" name="mdi-file-word"
/></q-item-section>
<q-item-section>ไฟล .docx</q-item-section>
</q-item>
</q-list>
</q-menu>

File diff suppressed because it is too large Load diff