Merge branch 'develop' into dev-tee

This commit is contained in:
setthawutttty 2023-08-24 09:11:59 +07:00
commit ab32df6dc9
2 changed files with 85 additions and 4 deletions

View file

@ -145,6 +145,37 @@
</div>
</div>
</q-card>
<q-card bordered class="row col-12 text-dark q-mt-sm">
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
<div class="q-pl-sm text-weight-bold text-dark">เอกสารเพมเต</div>
</div>
<div class="col-12"><q-separator /></div>
<div class="col-12">
<d-table
:rows="rows"
:columns="columns"
row-key="fileName"
hide-header
hide-bottom
>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td key="no" :props="props">
{{ props.rowIndex + 1 }}
</q-td>
<q-td key="fileName" :props="props">
{{ props.row.fileName }}
</q-td>
<q-td key="btnMicrosoft" :props="props">
<q-btn flat dense round color="red" icon="picture_as_pdf">
<q-tooltip>ไฟล PDF</q-tooltip>
</q-btn>
</q-td>
</q-tr>
</template>
</d-table>
</div>
</q-card>
<q-card bordered class="row col-12 text-dark q-mt-sm">
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
<div class="q-pl-sm text-weight-bold text-dark">
@ -610,7 +641,12 @@ import CurrencyInput from "@/components/CurruncyInput.vue";
import http from "@/plugins/http";
import config from "@/app.config";
import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main";
import type {
ResponseItems,
TypeFile,
} from "@/modules/06_retirement/interface/response/Main";
import type { QTableProps } from "quasar";
const $q = useQuasar();
const route = useRoute();
@ -671,6 +707,37 @@ const actionPass = ref<boolean>(false);
const reasonReign = ref<string>("");
const dateBreak = ref<Date | null>(null);
const rows = ref<TypeFile[]>([]);
const columns = ref<QTableProps["columns"]>([
{
name: "no",
align: "left",
label: "ลำดับ",
sortable: true,
field: "no",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "fileName",
align: "left",
label: "ชื่อไฟล์",
sortable: true,
field: "fileName",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "btnMicrosoft",
align: "right",
label: "ปุ่ม",
sortable: true,
field: "btnMicrosoft",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
]);
const closeModal = () => (modal.value = false);
const openModal = () => (modal.value = true);
@ -700,9 +767,18 @@ const fetchData = async (id: string) => {
.get(config.API.resingByid(id))
.then((res: any) => {
const data = res.data.result;
console.log(data);
dataDetail.value = data;
// console.log(data);
let list: TypeFile[] = [];
if (data.docs.length > 0) {
data.docs.map((doc: TypeFile) => {
list.push({
pathName: doc.pathName ?? "",
fileName: doc.fileName ?? "",
});
});
}
dataDetail.value = data;
organizationPositionOld.value = data.organizationPositionOld ?? "";
positionTypeOld.value = data.positionTypeOld ?? "";
positionLevelOld.value = data.positionLevelOld ?? "";

View file

@ -30,4 +30,9 @@ interface ResponseItems {
datetext: string | null;
}
export type { resMain, ResponseItems };
interface TypeFile {
fileName: string;
pathName: string;
}
export type { resMain, ResponseItems, TypeFile };