ทะเบียนประวัติ: แก้หน้าประวัติ+

This commit is contained in:
oat_dev 2024-03-29 11:31:43 +07:00
parent 02ea3431e7
commit 645d631b60
6 changed files with 405 additions and 25 deletions

View file

@ -314,7 +314,6 @@ function onSubmit() {
}
async function submit() {
console.log(formDataSalary);
const formData = {
profileId: isStatusEdit.value ? undefined : profileId.value,
date: formDataSalary.date, //
@ -340,7 +339,6 @@ async function submit() {
refCommandNo: formDataSalary.refCommandNo, //
templateDoc: formDataSalary.doc, //
};
console.log(formData);
try {
const url = isStatusEdit.value
@ -398,7 +396,7 @@ onMounted(() => {
});
</script>
<template>
<q-toolbar style="padding: 0px" class="text-primary">
<q-toolbar style="padding: 0px" class="text-primary q-mb-xs">
<q-btn flat round dense icon="add" @click="onClickOpenDialog()">
<q-tooltip>เพ</q-tooltip>
</q-btn>
@ -490,16 +488,25 @@ onMounted(() => {
<!-- <q-tooltip>เลอนลำดบลง</q-tooltip> -->
</q-btn>
</q-td>
<q-td
v-for="col in props.cols"
:key="col.id"
@click="onClickOpenDialog(true, props.row)"
>
<q-td v-for="col in props.cols" :key="col.id">
<div class="table_ellipsis">
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td auto-width>
<q-btn
color="primary"
flat
dense
round
class="q-mr-xs"
size="14px"
icon="mdi-pencil-outline"
clickable
@click="onClickOpenDialog(true, props.row)"
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
color="info"
flat
@ -526,6 +533,26 @@ onMounted(() => {
direction-links
></q-pagination>
</template>
<template v-slot:no-data="{ icon, message, filter }">
<div class="full-width row flex-center text-accent q-gutter-sm">
<span
><div
style="
height: 50vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
"
class="text-grey-5"
>
<q-icon name="search" size="4rem" />
<span>ไมพบขอม</span>
</div>
</span>
</div>
</template>
</d-table>
<q-dialog v-model="modalDialogSalary" persistent full-width>

View file

@ -173,20 +173,20 @@ const columns = ref<QTableProps["columns"]>([
style: "font-size: 14px",
},
{
name: "createdFullName",
name: "lastUpdateFullName",
align: "left",
label: "ผู้ดำเนินการ",
sortable: true,
field: "createdFullName",
field: "lastUpdateFullName",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "createdAt",
name: "lastUpdatedAt",
align: "left",
label: "วันที่แก้ไข",
sortable: true,
field: "createdAt",
field: "lastUpdatedAt",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (v) => date2Thai(v),
@ -209,8 +209,8 @@ const visibleColumns = ref<string[]>([
"salaryClass",
"templateDoc",
"refCommandNo",
"createdFullName",
"createdAt",
"lastUpdateFullName",
"lastUpdatedAt",
]);
const rows = ref<any>([]);
const pagination = ref({
@ -321,6 +321,26 @@ watch(
</q-td>
</q-tr>
</template>
<template v-slot:no-data="{ icon, message, filter }">
<div class="full-width row flex-center text-accent q-gutter-sm">
<span
><div
style="
height: 50vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
"
class="text-grey-5"
>
<q-icon name="search" size="4rem" />
<span>ไมพบขอม</span>
</div>
</span>
</div>
</template>
</d-table>
</q-card-section>
</q-card>