แก้ไขขอโอน รับโอน รายการช่วยราชการ รายการส่งตัวกลับ รายการลาออก
This commit is contained in:
parent
a3eabec197
commit
9505fb5dbb
14 changed files with 789 additions and 107 deletions
|
|
@ -99,6 +99,18 @@ const columns = ref<QTableProps["columns"]>([
|
|||
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",
|
||||
align: "left",
|
||||
|
|
@ -119,6 +131,7 @@ const visibleColumns = ref<string[]>([
|
|||
"positionLevelOld",
|
||||
"positionNumberOld",
|
||||
"organizationPositionOld",
|
||||
"datetext",
|
||||
"statustext",
|
||||
]);
|
||||
|
||||
|
|
@ -203,6 +216,18 @@ const columns2 = ref<QTableProps["columns"]>([
|
|||
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",
|
||||
align: "left",
|
||||
|
|
@ -223,6 +248,7 @@ const visibleColumns2 = ref<string[]>([
|
|||
"positionLevelOld",
|
||||
"positionNumberOld",
|
||||
"organizationPositionOld",
|
||||
"datetext",
|
||||
"statustext",
|
||||
]);
|
||||
|
||||
|
|
@ -270,8 +296,10 @@ const fecthlist = async () => {
|
|||
|
||||
data.map((r: ResponseItems) => {
|
||||
list.push({
|
||||
datetext:
|
||||
r.createdAt == null ? "-" : date2Thai(new Date(r.createdAt)),
|
||||
activeDate: new Date(),
|
||||
createdAt: new Date(),
|
||||
createdAt: new Date(r.createdAt),
|
||||
firstName: r.firstName ?? "",
|
||||
id: r.id ?? "",
|
||||
isActive: r.isActive ? r.isActive : false,
|
||||
|
|
@ -429,6 +457,9 @@ const saveOrder = async () => {
|
|||
{{ props.row.organizationPositionOld }}
|
||||
</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>
|
||||
|
|
@ -538,6 +569,9 @@ const saveOrder = async () => {
|
|||
{{ props.row.organizationPositionOld }}
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@
|
|||
label="แก้ไข"
|
||||
style="width: 80px"
|
||||
@click="edit = !edit"
|
||||
v-if="!(status == 'REPORT' || status == 'DONE')"
|
||||
/>
|
||||
</div>
|
||||
<div class="q-gutter-sm" v-else>
|
||||
|
|
@ -488,6 +489,7 @@ const id = ref<string>(route.params.id.toString());
|
|||
const myForm = ref<QForm | null>(null);
|
||||
const edit = ref<boolean>(false);
|
||||
const dataDetail = ref<ResponseItems>({
|
||||
datetext: "",
|
||||
activeDate: new Date(),
|
||||
createdAt: new Date(),
|
||||
firstName: "",
|
||||
|
|
@ -518,6 +520,7 @@ const date = ref<Date | null>(null);
|
|||
const dateLeave = ref<Date | null>(null);
|
||||
const reason = ref<string>("");
|
||||
const location = ref<string>("");
|
||||
const status = ref<string>("");
|
||||
|
||||
// const modalPass = ref<boolean>(false);
|
||||
// const modalPassNot = ref<boolean>(false);
|
||||
|
|
@ -531,6 +534,7 @@ const fetchData = async (id: string) => {
|
|||
.get(config.API.resingByid(id))
|
||||
.then((res: any) => {
|
||||
const data = res.data.result;
|
||||
console.log(data);
|
||||
dataDetail.value = data;
|
||||
|
||||
organizationPositionOld.value = data.organizationPositionOld ?? "";
|
||||
|
|
@ -542,6 +546,7 @@ const fetchData = async (id: string) => {
|
|||
dateLeave.value = data.activeDate ? new Date(data.activeDate) : null;
|
||||
reason.value = data.reason ?? "";
|
||||
location.value = data.location ?? "";
|
||||
status.value = data.status ?? "";
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue