แก้ไขขอโอน รับโอน รายการช่วยราชการ รายการส่งตัวกลับ รายการลาออก

This commit is contained in:
Thanit Konmek 2023-08-22 15:24:49 +07:00
parent a3eabec197
commit 9505fb5dbb
14 changed files with 789 additions and 107 deletions

View file

@ -38,6 +38,7 @@ const visibleColumns = ref<string[]>([
"organizationPositionOld",
"organization",
"statustext",
"dateText",
]);
const visibleColumns2 = ref<string[]>([
"no",
@ -47,6 +48,7 @@ const visibleColumns2 = ref<string[]>([
"organizationPositionOld",
"organization",
"statustext",
"dateText",
]); //
const filterKeyword = ref<string>("");
const filterKeyword2 = ref<string>("");
@ -72,6 +74,8 @@ const columns = ref<QTableProps["columns"]>([
field: "no",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "fullname",
@ -81,6 +85,8 @@ const columns = ref<QTableProps["columns"]>([
field: "fullname",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "position",
@ -90,6 +96,8 @@ const columns = ref<QTableProps["columns"]>([
field: "position",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "positionLevel",
@ -99,6 +107,8 @@ const columns = ref<QTableProps["columns"]>([
field: "positionLevel",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "organizationPositionOld",
@ -108,6 +118,8 @@ const columns = ref<QTableProps["columns"]>([
field: "organizationPositionOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "organization",
@ -117,6 +129,20 @@ const columns = ref<QTableProps["columns"]>([
field: "organization",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "dateText",
align: "left",
label: "วันที่ดำเนินการ",
sortable: true,
field: "dateText",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
sortOrder: "da",
},
{
name: "statustext",
@ -126,6 +152,8 @@ const columns = ref<QTableProps["columns"]>([
field: "statustext",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
]);
const columns2 = ref<QTableProps["columns"]>([
@ -137,6 +165,8 @@ const columns2 = ref<QTableProps["columns"]>([
field: "no",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "fullname",
@ -146,6 +176,8 @@ const columns2 = ref<QTableProps["columns"]>([
field: "fullname",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "position",
@ -155,6 +187,8 @@ const columns2 = ref<QTableProps["columns"]>([
field: "position",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "positionLevel",
@ -164,6 +198,8 @@ const columns2 = ref<QTableProps["columns"]>([
field: "positionLevel",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "organizationPositionOld",
@ -173,6 +209,8 @@ const columns2 = ref<QTableProps["columns"]>([
field: "organizationPositionOld",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "organization",
@ -182,6 +220,20 @@ const columns2 = ref<QTableProps["columns"]>([
field: "organization",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "dateText",
align: "left",
label: "วันที่ดำเนินการ",
sortable: true,
field: "dateText",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
sortOrder: "da",
},
{
name: "statustext",
@ -191,6 +243,8 @@ const columns2 = ref<QTableProps["columns"]>([
field: "statustext",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
]);
@ -219,7 +273,9 @@ const getData = async () => {
let list: ResponseData[] = [];
data.map((r: ResponseData) => {
list.push({
createdAt: new Date(),
dateText:
r.createdAt !== null ? date2Thai(new Date(r.createdAt)) : "-",
createdAt: r.createdAt !== null ? new Date(r.createdAt) : null,
date: new Date(),
firstName: r.firstName ?? "",
id: r.id ?? "",
@ -384,6 +440,9 @@ const saveOrder = async () => {
</q-tooltip> -->
</div>
</q-td>
<q-td key="dateText" :props="props">
{{ props.row.dateText }}
</q-td>
<q-td key="statustext" :props="props">
{{ props.row.statustext }}
</q-td>
@ -491,6 +550,9 @@ const saveOrder = async () => {
{{ props.row.organization }}
</div>
</q-td>
<q-td key="dateText" :props="props">
{{ props.row.dateText }}
</q-td>
<q-td key="statustext" :props="props">
{{ props.row.statustext }}
</q-td>

View file

@ -164,6 +164,9 @@
label="แก้ไข"
style="width: 80px"
@click="edit = !edit"
v-if="
!(responseData.status == 'REPORT' || responseData.status == 'DONE')
"
/>
</div>
<div class="q-gutter-sm" v-else>