ทะเบียนประวัติ ปรับ table
This commit is contained in:
parent
fb5017b0e2
commit
0a6feb0c9c
13 changed files with 143 additions and 116 deletions
|
|
@ -24,14 +24,14 @@
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
>
|
>
|
||||||
<div v-if="col.name == 'date'" class="table_ellipsis">
|
<div v-if="col.name == 'date'" class="table_ellipsis">
|
||||||
{{ date2Thai(col.value) }}
|
{{ col.value ? date2Thai(col.value) : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'name'" class="table_ellipsis">
|
<div v-else-if="col.name == 'name'" class="table_ellipsis">
|
||||||
{{ textPoint(props.row.pointSum) }}
|
{{ textPoint(props.row.pointSum) }}
|
||||||
{{ textRangePoint(props.row.pointSum) }}
|
{{ textRangePoint(props.row.pointSum) }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="table_ellipsis">
|
<div v-else class="table_ellipsis">
|
||||||
{{ col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
a
|
||||||
<!-- card ประกาศเกียรติคุณ -->
|
<!-- card ประกาศเกียรติคุณ -->
|
||||||
<template>
|
<template>
|
||||||
<q-card flat bordered class="col-12 q-px-lg q-pa-md">
|
<q-card flat bordered class="col-12 q-px-lg q-pa-md">
|
||||||
|
|
@ -36,10 +37,14 @@
|
||||||
v-else-if="col.name == 'refCommandDate'"
|
v-else-if="col.name == 'refCommandDate'"
|
||||||
class="table_ellipsis"
|
class="table_ellipsis"
|
||||||
>
|
>
|
||||||
{{ date2Thai(props.row.refCommandDate) }}
|
{{
|
||||||
|
props.row.refCommandDate
|
||||||
|
? date2Thai(props.row.refCommandDate)
|
||||||
|
: "-"
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="table_ellipsis">
|
<div v-else class="table_ellipsis">
|
||||||
{{ col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
|
|
@ -357,10 +362,10 @@
|
||||||
"
|
"
|
||||||
class="table_ellipsis"
|
class="table_ellipsis"
|
||||||
>
|
>
|
||||||
{{ col.value == null ? null : date2Thai(col.value) }}
|
{{ col.value ? date2Thai(col.value) : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="table_ellipsis">
|
<div v-else class="table_ellipsis">
|
||||||
{{ col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
@ -380,7 +385,6 @@ import { useQuasar } from "quasar";
|
||||||
import type {
|
import type {
|
||||||
RequestItemsObject,
|
RequestItemsObject,
|
||||||
Columns,
|
Columns,
|
||||||
DataProps,
|
|
||||||
} from "@/modules/04_registry/interface/request/Coin";
|
} from "@/modules/04_registry/interface/request/Coin";
|
||||||
import type { ResponseObject } from "@/modules/04_registry/interface/response/Coin";
|
import type { ResponseObject } from "@/modules/04_registry/interface/response/Coin";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
|
|
@ -422,7 +426,7 @@ const detail = ref<string>();
|
||||||
const issueDate = ref<number>(new Date().getFullYear());
|
const issueDate = ref<number>(new Date().getFullYear());
|
||||||
const issueDate2 = ref<Date>(new Date());
|
const issueDate2 = ref<Date>(new Date());
|
||||||
const refCommandNo = ref<string>();
|
const refCommandNo = ref<string>();
|
||||||
const refCommandDate = ref<Date>(new Date());
|
const refCommandDate = ref<Date | null>(new Date());
|
||||||
const myForm = ref<any>(); //form data input
|
const myForm = ref<any>(); //form data input
|
||||||
const edit = ref<boolean>(false); //เช็คการกดปุ่มแก้ไขใน dialog
|
const edit = ref<boolean>(false); //เช็คการกดปุ่มแก้ไขใน dialog
|
||||||
const modal = ref<boolean>(false); //modal add detail
|
const modal = ref<boolean>(false); //modal add detail
|
||||||
|
|
@ -432,7 +436,7 @@ const rowIndex = ref<number>(0); //indexข้อมูลเดิมที่
|
||||||
const previous = ref<boolean>(); //แสดงปุ่มดูข้อมูลก่อนหน้า
|
const previous = ref<boolean>(); //แสดงปุ่มดูข้อมูลก่อนหน้า
|
||||||
const next = ref<boolean>(); //แสดงปุ่มดูข้อมูลต่อไป
|
const next = ref<boolean>(); //แสดงปุ่มดูข้อมูลต่อไป
|
||||||
const editRow = ref<boolean>(false); //เช็คมีการแก้ไขข้อมูล
|
const editRow = ref<boolean>(false); //เช็คมีการแก้ไขข้อมูล
|
||||||
const rowsHistory = ref<RequestItemsObject[]>([]); //select data history
|
const rowsHistory = ref<any[]>([]); //select data history
|
||||||
const tittleHistory = ref<string>("ประวัติแก้ไขประกาศเกียรติคุณ"); //
|
const tittleHistory = ref<string>("ประวัติแก้ไขประกาศเกียรติคุณ"); //
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
|
|
@ -440,7 +444,7 @@ const checkValidate = ref<boolean>(false); //validate data ผ่านหรื
|
||||||
const profileId = ref<string>(
|
const profileId = ref<string>(
|
||||||
route.params.id ? route.params.id.toString() : ""
|
route.params.id ? route.params.id.toString() : ""
|
||||||
);
|
);
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<any[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
profileData.coined.columns.length == 0
|
profileData.coined.columns.length == 0
|
||||||
|
|
@ -662,19 +666,18 @@ const fetchData = async () => {
|
||||||
.get(config.API.profileHonorId(profileId.value))
|
.get(config.API.profileHonorId(profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
let data = res.data.result;
|
let data = res.data.result;
|
||||||
console.log(data)
|
console.log(data);
|
||||||
rows.value = [];
|
rows.value = [];
|
||||||
data.map((e: ResponseObject) => {
|
data.map((e: ResponseObject) => {
|
||||||
rows.value.push({
|
rows.value.push({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
issuer: e.issuer == ''?'-':e.issuer,
|
issuer: e.issuer,
|
||||||
detail: e.detail,
|
detail: e.detail,
|
||||||
isDate: e.isDate == null ? null : e.isDate.toString(),
|
isDate: e.isDate,
|
||||||
issueDate: new Date(e.issueDate).getFullYear(),
|
issueDate: e.issueDate ? new Date(e.issueDate).getFullYear() : null,
|
||||||
issueDate2: new Date(e.issueDate),
|
issueDate2: new Date(e.issueDate),
|
||||||
refCommandNo: e.refCommandNo == "" ? "-" : e.refCommandNo,
|
refCommandNo: e.refCommandNo,
|
||||||
refCommandDate:
|
refCommandDate: e.refCommandDate,
|
||||||
e.refCommandDate == null ? "-" : new Date(e.refCommandDate),
|
|
||||||
createdAt: new Date(e.createdAt),
|
createdAt: new Date(e.createdAt),
|
||||||
createdFullName: e.createdFullName,
|
createdFullName: e.createdFullName,
|
||||||
});
|
});
|
||||||
|
|
@ -714,9 +717,10 @@ const clickNext = async () => {
|
||||||
*/
|
*/
|
||||||
const getData = () => {
|
const getData = () => {
|
||||||
const row = rows.value[rowIndex.value];
|
const row = rows.value[rowIndex.value];
|
||||||
|
console.log(row);
|
||||||
issuer.value = row.issuer;
|
issuer.value = row.issuer;
|
||||||
detail.value = row.detail;
|
detail.value = row.detail;
|
||||||
isDate.value = row.isDate;
|
isDate.value = row.isDate.toString();
|
||||||
issueDate.value = row.issueDate;
|
issueDate.value = row.issueDate;
|
||||||
issueDate2.value = row.issueDate2;
|
issueDate2.value = row.issueDate2;
|
||||||
refCommandNo.value = row.refCommandNo;
|
refCommandNo.value = row.refCommandNo;
|
||||||
|
|
@ -897,7 +901,7 @@ const clickClose = async () => {
|
||||||
* กดเลือกข้อมูลที่จะแก้ไข
|
* กดเลือกข้อมูลที่จะแก้ไข
|
||||||
* @param props ค่า props ใน row ที่เลือก
|
* @param props ค่า props ใน row ที่เลือก
|
||||||
*/
|
*/
|
||||||
const selectData = async (props: DataProps) => {
|
const selectData = async (props: any) => {
|
||||||
modalEdit.value = true;
|
modalEdit.value = true;
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
edit.value = false;
|
edit.value = false;
|
||||||
|
|
@ -915,7 +919,6 @@ const selectData = async (props: DataProps) => {
|
||||||
inputYear.value = props.row.issueDate + 543;
|
inputYear.value = props.row.issueDate + 543;
|
||||||
inputDate.value = convertDateDisplay(props.row.issueDate2);
|
inputDate.value = convertDateDisplay(props.row.issueDate2);
|
||||||
inputDateRef.value = convertDateDisplay(props.row.refCommandDate);
|
inputDateRef.value = convertDateDisplay(props.row.refCommandDate);
|
||||||
console.log(refCommandDate.value);
|
|
||||||
|
|
||||||
await checkRowPage();
|
await checkRowPage();
|
||||||
};
|
};
|
||||||
|
|
@ -984,7 +987,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
let data = res.data.result;
|
let data = res.data.result;
|
||||||
rowsHistory.value = [];
|
rowsHistory.value = [];
|
||||||
data.map((e: ResponseObject) => {
|
data.map((e: any) => {
|
||||||
rowsHistory.value.push({
|
rowsHistory.value.push({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
issuer: e.issuer,
|
issuer: e.issuer,
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,10 @@
|
||||||
v-if="col.name == 'refCommandDate' || col.name == 'date'"
|
v-if="col.name == 'refCommandDate' || col.name == 'date'"
|
||||||
class="table_ellipsis"
|
class="table_ellipsis"
|
||||||
>
|
>
|
||||||
{{ col.value == null ? null : date2Thai(col.value) }}
|
{{ col.value ? date2Thai(col.value) : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="table_ellipsis">
|
<div v-else class="table_ellipsis">
|
||||||
{{ col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
|
|
@ -291,10 +291,10 @@
|
||||||
"
|
"
|
||||||
class="table_ellipsis"
|
class="table_ellipsis"
|
||||||
>
|
>
|
||||||
{{ col.value == null ? null : date2Thai(col.value) }}
|
{{ col.value ? date2Thai(col.value) : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="table_ellipsis">
|
<div v-else class="table_ellipsis">
|
||||||
{{ col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
@ -401,7 +401,7 @@ const OpsFilter = ref<DisciplineOps>({
|
||||||
const detail = ref<string>();
|
const detail = ref<string>();
|
||||||
const unStigma = ref<string>();
|
const unStigma = ref<string>();
|
||||||
const refCommandNo = ref<string>();
|
const refCommandNo = ref<string>();
|
||||||
const refCommandDate = ref<Date | null|string>(new Date());
|
const refCommandDate = ref<Date | null | string>(new Date());
|
||||||
const date = ref<Date>(new Date());
|
const date = ref<Date>(new Date());
|
||||||
const myForm = ref<any>(); //form data input
|
const myForm = ref<any>(); //form data input
|
||||||
const edit = ref<boolean>(false); //เช็คการกดปุ่มแก้ไขใน dialog
|
const edit = ref<boolean>(false); //เช็คการกดปุ่มแก้ไขใน dialog
|
||||||
|
|
@ -677,20 +677,21 @@ const fetchData = async () => {
|
||||||
.get(config.API.profileDisId(profileId.value))
|
.get(config.API.profileDisId(profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
let data = res.data.result;
|
let data = res.data.result;
|
||||||
console.log(data)
|
console.log(data);
|
||||||
rows.value = [];
|
rows.value = [];
|
||||||
data.map((e: ResponseObject) => {
|
data.map((e: ResponseObject) => {
|
||||||
rows.value.push({
|
rows.value.push({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
level: e.level,
|
level: e.level,
|
||||||
detail: e.detail,
|
detail: e.detail,
|
||||||
unStigma: e.unStigma == '' ? '-':e.unStigma,
|
unStigma: e.unStigma,
|
||||||
refCommandNo: e.refCommandNo,
|
refCommandNo: e.refCommandNo,
|
||||||
refCommandDate:
|
refCommandDate: e.refCommandDate
|
||||||
e.refCommandDate == null ? '-' : new Date(e.refCommandDate),
|
? new Date(e.refCommandDate)
|
||||||
date: new Date(e.date),
|
: null,
|
||||||
|
date: e.date,
|
||||||
createdFullName: e.createdFullName,
|
createdFullName: e.createdFullName,
|
||||||
createdAt: new Date(e.createdAt),
|
createdAt: e.createdAt,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
@ -732,7 +733,8 @@ const getData = () => {
|
||||||
detail.value = row.detail;
|
detail.value = row.detail;
|
||||||
unStigma.value = row.unStigma;
|
unStigma.value = row.unStigma;
|
||||||
refCommandNo.value = row.refCommandNo;
|
refCommandNo.value = row.refCommandNo;
|
||||||
refCommandDate.value = row.refCommandDate == '-' ? '':row.refCommandDate as Date;
|
refCommandDate.value =
|
||||||
|
row.refCommandDate == "-" ? "" : (row.refCommandDate as Date);
|
||||||
date.value = row.date;
|
date.value = row.date;
|
||||||
id.value = row.id;
|
id.value = row.id;
|
||||||
};
|
};
|
||||||
|
|
@ -798,7 +800,9 @@ const saveData = async () => {
|
||||||
unStigma: unStigma.value,
|
unStigma: unStigma.value,
|
||||||
refCommandNo: refCommandNo.value,
|
refCommandNo: refCommandNo.value,
|
||||||
refCommandDate:
|
refCommandDate:
|
||||||
refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date),
|
refCommandDate.value == null
|
||||||
|
? null
|
||||||
|
: dateToISO(refCommandDate.value as Date),
|
||||||
date: dateToISO(date.value),
|
date: dateToISO(date.value),
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -829,7 +833,9 @@ const editData = async () => {
|
||||||
unStigma: unStigma.value,
|
unStigma: unStigma.value,
|
||||||
refCommandNo: refCommandNo.value,
|
refCommandNo: refCommandNo.value,
|
||||||
refCommandDate:
|
refCommandDate:
|
||||||
refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date),
|
refCommandDate.value == null
|
||||||
|
? null
|
||||||
|
: dateToISO(refCommandDate.value as Date),
|
||||||
date: dateToISO(date.value),
|
date: dateToISO(date.value),
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -912,7 +918,8 @@ const selectData = async (props: DataProps) => {
|
||||||
detail.value = props.row.detail;
|
detail.value = props.row.detail;
|
||||||
unStigma.value = props.row.unStigma;
|
unStigma.value = props.row.unStigma;
|
||||||
refCommandNo.value = props.row.refCommandNo;
|
refCommandNo.value = props.row.refCommandNo;
|
||||||
refCommandDate.value = props.row.refCommandDate == '-' ? '':props.row.refCommandDate;
|
refCommandDate.value =
|
||||||
|
props.row.refCommandDate == "-" ? "" : props.row.refCommandDate;
|
||||||
date.value = props.row.date;
|
date.value = props.row.date;
|
||||||
id.value = props.row.id;
|
id.value = props.row.id;
|
||||||
inputDate.value = convertDateDisplay(props.row.date);
|
inputDate.value = convertDateDisplay(props.row.date);
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
{{ col.value ? "ใช่" : "ไม่ใช่" }}
|
{{ col.value ? "ใช่" : "ไม่ใช่" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="table_ellipsis">
|
<div v-else class="table_ellipsis">
|
||||||
{{ col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
|
|
@ -392,7 +392,7 @@
|
||||||
dense
|
dense
|
||||||
/>
|
/>
|
||||||
<datepicker
|
<datepicker
|
||||||
v-else
|
v-else
|
||||||
menu-class-name="modalfix"
|
menu-class-name="modalfix"
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
v-model="finishDate"
|
v-model="finishDate"
|
||||||
|
|
@ -644,13 +644,13 @@
|
||||||
v-else-if="col.name == 'finishDate' || col.name == 'createdAt'"
|
v-else-if="col.name == 'finishDate' || col.name == 'createdAt'"
|
||||||
class="table_ellipsis"
|
class="table_ellipsis"
|
||||||
>
|
>
|
||||||
{{ date2Thai(col.value) }}
|
{{ col.value ? date2Thai(col.value) : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'isEducation'" class="table_ellipsis">
|
<div v-else-if="col.name == 'isEducation'" class="table_ellipsis">
|
||||||
{{ col.value ? "ใช่" : "ไม่ใช่" }}
|
{{ col.value ? "ใช่" : "ไม่ใช่" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="table_ellipsis">
|
<div v-else class="table_ellipsis">
|
||||||
{{ col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
@ -734,7 +734,7 @@ const durationYear = ref<number>(0);
|
||||||
const other = ref<string>();
|
const other = ref<string>();
|
||||||
const fundName = ref<string>();
|
const fundName = ref<string>();
|
||||||
const isDate = ref<string | null>("true");
|
const isDate = ref<string | null>("true");
|
||||||
const finishDate = ref<Date | null|string>(null);
|
const finishDate = ref<Date | null | string>(null);
|
||||||
const startDate = ref<Date | string | number>(new Date().getFullYear());
|
const startDate = ref<Date | string | number>(new Date().getFullYear());
|
||||||
const startDate2 = ref<Date | string | null>(new Date());
|
const startDate2 = ref<Date | string | null>(new Date());
|
||||||
const endDate = ref<number | string | Date>(new Date().getFullYear());
|
const endDate = ref<number | string | Date>(new Date().getFullYear());
|
||||||
|
|
@ -1301,7 +1301,9 @@ const getData = () => {
|
||||||
inputEndDate.value = (Number(row.endDate) + 543).toLocaleString();
|
inputEndDate.value = (Number(row.endDate) + 543).toLocaleString();
|
||||||
inputStartDate2.value = convertDateDisplay(row.startDate2);
|
inputStartDate2.value = convertDateDisplay(row.startDate2);
|
||||||
inputEndDate2.value = convertDateDisplay(row.endDate2);
|
inputEndDate2.value = convertDateDisplay(row.endDate2);
|
||||||
finishDateInput.value = row.finishDate ? convertDateDisplay(row.finishDate):'-';
|
finishDateInput.value = row.finishDate
|
||||||
|
? convertDateDisplay(row.finishDate)
|
||||||
|
: "-";
|
||||||
endDate2.value = row.endDate2;
|
endDate2.value = row.endDate2;
|
||||||
id.value = row.id;
|
id.value = row.id;
|
||||||
};
|
};
|
||||||
|
|
@ -1405,7 +1407,9 @@ const saveData = async () => {
|
||||||
other: other.value,
|
other: other.value,
|
||||||
fundName: fundName.value,
|
fundName: fundName.value,
|
||||||
isDate: isDate.value == "true" ? true : false,
|
isDate: isDate.value == "true" ? true : false,
|
||||||
finishDate: finishDate.value ? dateToISO(finishDate.value as Date) : null,
|
finishDate: finishDate.value
|
||||||
|
? dateToISO(finishDate.value as Date)
|
||||||
|
: null,
|
||||||
startDate:
|
startDate:
|
||||||
isDate.value == "true"
|
isDate.value == "true"
|
||||||
? dateToISO(startDate2.value as Date)
|
? dateToISO(startDate2.value as Date)
|
||||||
|
|
@ -1536,7 +1540,7 @@ const clickClose = async () => {
|
||||||
* @param _props ค่า props ใน row ที่เลือก
|
* @param _props ค่า props ใน row ที่เลือก
|
||||||
*/
|
*/
|
||||||
const selectData = async (_props: DataProps) => {
|
const selectData = async (_props: DataProps) => {
|
||||||
console.log(_props)
|
console.log(_props);
|
||||||
modalEdit.value = true;
|
modalEdit.value = true;
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
edit.value = false;
|
edit.value = false;
|
||||||
|
|
@ -1564,7 +1568,9 @@ const selectData = async (_props: DataProps) => {
|
||||||
inputEndDate.value = (Number(_props.row.endDate) + 543).toLocaleString();
|
inputEndDate.value = (Number(_props.row.endDate) + 543).toLocaleString();
|
||||||
inputStartDate2.value = convertDateDisplay(_props.row.startDate2);
|
inputStartDate2.value = convertDateDisplay(_props.row.startDate2);
|
||||||
inputEndDate2.value = convertDateDisplay(_props.row.endDate2);
|
inputEndDate2.value = convertDateDisplay(_props.row.endDate2);
|
||||||
finishDateInput.value = _props.row.finishDate ? convertDateDisplay(_props.row.finishDate):'-';
|
finishDateInput.value = _props.row.finishDate
|
||||||
|
? convertDateDisplay(_props.row.finishDate)
|
||||||
|
: "-";
|
||||||
await checkRowPage();
|
await checkRowPage();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1598,10 +1604,10 @@ const addData = () => {
|
||||||
inputEndDate.value = "";
|
inputEndDate.value = "";
|
||||||
finishDateInput.value = "";
|
finishDateInput.value = "";
|
||||||
|
|
||||||
dayChecked2.value = false
|
dayChecked2.value = false;
|
||||||
dayEndChecked2.value = false
|
dayEndChecked2.value = false;
|
||||||
dayChecked.value = false
|
dayChecked.value = false;
|
||||||
dayEndChecked.value = false
|
dayEndChecked.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1765,7 +1771,6 @@ watch(
|
||||||
} else {
|
} else {
|
||||||
finishDateInput.value = "";
|
finishDateInput.value = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -32,13 +32,13 @@
|
||||||
"
|
"
|
||||||
class="table_ellipsis"
|
class="table_ellipsis"
|
||||||
>
|
>
|
||||||
{{ col.value == null ? null : date2Thai(col.value) }}
|
{{ col.value ? date2Thai(col.value) : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'year'" class="table_ellipsis">
|
<div v-else-if="col.name == 'year'" class="table_ellipsis">
|
||||||
{{ col.value + 543 }}
|
{{ col.value ? col.value + 543 : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="table_ellipsis">
|
<div v-else class="table_ellipsis">
|
||||||
{{ col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
|
|
@ -497,13 +497,13 @@
|
||||||
"
|
"
|
||||||
class="table_ellipsis"
|
class="table_ellipsis"
|
||||||
>
|
>
|
||||||
{{ col.value == null ? null : date2Thai(col.value) }}
|
{{ col.value ? date2Thai(col.value) : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'year'" class="table_ellipsis">
|
<div v-else-if="col.name == 'year'" class="table_ellipsis">
|
||||||
{{ col.value + 543 }}
|
{{ col.value ? col.value + 543 : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="table_ellipsis">
|
<div v-else class="table_ellipsis">
|
||||||
{{ col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
@ -1029,18 +1029,18 @@ const fetchData = async () => {
|
||||||
insigniaId: e.insignia == null ? null : e.insignia.id,
|
insigniaId: e.insignia == null ? null : e.insignia.id,
|
||||||
insigniaType: e.insigniaType,
|
insigniaType: e.insigniaType,
|
||||||
year: e.year,
|
year: e.year,
|
||||||
no: e.no == '' ? '-':e.no,
|
no: e.no,
|
||||||
issue: e.issue == '' ? '-':e.issue,
|
issue: e.issue,
|
||||||
volumeNo: e.volumeNo == '' ? '-':e.volumeNo,
|
volumeNo: e.volumeNo,
|
||||||
volume: e.volume == '' ? '-':e.volume,
|
volume: e.volume,
|
||||||
section: e.section == '' ? '-':e.section,
|
section: e.section,
|
||||||
page: e.page == '' ? '-':e.page,
|
page: e.page,
|
||||||
receiveDate: new Date(e.receiveDate),
|
receiveDate: e.receiveDate,
|
||||||
dateAnnounce: e.dateAnnounce == null ? '-':e.dateAnnounce,
|
dateAnnounce: e.dateAnnounce,
|
||||||
refCommandNo: e.refCommandNo == '' ? '-':e.refCommandNo,
|
refCommandNo: e.refCommandNo,
|
||||||
refCommandDate: e.refCommandDate == null ? '-':e.refCommandDate,
|
refCommandDate: e.refCommandDate,
|
||||||
createdFullName: e.createdFullName,
|
createdFullName: e.createdFullName,
|
||||||
createdAt: new Date(e.createdAt),
|
createdAt: e.createdAt,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
@ -1089,7 +1089,7 @@ const getData = () => {
|
||||||
section.value = row.section;
|
section.value = row.section;
|
||||||
page.value = row.page;
|
page.value = row.page;
|
||||||
receiveDate.value = row.receiveDate;
|
receiveDate.value = row.receiveDate;
|
||||||
dateAnnounce.value = row.dateAnnounce == '-'?'':row.dateAnnounce;
|
dateAnnounce.value = row.dateAnnounce == "-" ? "" : row.dateAnnounce;
|
||||||
refCommandNo.value = row.refCommandNo;
|
refCommandNo.value = row.refCommandNo;
|
||||||
refCommandDate.value = row.refCommandDate;
|
refCommandDate.value = row.refCommandDate;
|
||||||
id.value = row.id;
|
id.value = row.id;
|
||||||
|
|
@ -1311,13 +1311,13 @@ const selectData = async (props: DataProps) => {
|
||||||
section.value = props.row.section;
|
section.value = props.row.section;
|
||||||
page.value = props.row.page;
|
page.value = props.row.page;
|
||||||
receiveDate.value = props.row.receiveDate;
|
receiveDate.value = props.row.receiveDate;
|
||||||
dateAnnounce.value = props.row.dateAnnounce == '-'? '':props.row.dateAnnounce;
|
dateAnnounce.value =
|
||||||
|
props.row.dateAnnounce == "-" ? "" : props.row.dateAnnounce;
|
||||||
refCommandNo.value = props.row.refCommandNo;
|
refCommandNo.value = props.row.refCommandNo;
|
||||||
refCommandDate.value =
|
refCommandDate.value =
|
||||||
props.row.refCommandDate == "-" ? null : props.row.refCommandDate;
|
props.row.refCommandDate == "-" ? null : props.row.refCommandDate;
|
||||||
id.value = props.row.id;
|
id.value = props.row.id;
|
||||||
|
|
||||||
console.log(dateAnnounce.value);
|
|
||||||
yearInput.value = (Number(props.row.year) + 543).toLocaleString();
|
yearInput.value = (Number(props.row.year) + 543).toLocaleString();
|
||||||
receiveDateInput.value = convertDateDisplay(props.row.receiveDate);
|
receiveDateInput.value = convertDateDisplay(props.row.receiveDate);
|
||||||
dateAnnounceInput.value = props.row.dateAnnounce
|
dateAnnounceInput.value = props.row.dateAnnounce
|
||||||
|
|
@ -1353,9 +1353,9 @@ const addData = () => {
|
||||||
receiveDateInput.value = "";
|
receiveDateInput.value = "";
|
||||||
dateAnnounceInput.value = "";
|
dateAnnounceInput.value = "";
|
||||||
refCommandDateInput.value = "";
|
refCommandDateInput.value = "";
|
||||||
yearInput.value = ''
|
yearInput.value = "";
|
||||||
|
|
||||||
receiveDateCheck.value = false
|
receiveDateCheck.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1459,7 +1459,6 @@ watch(
|
||||||
() => dateAnnounceInput.value,
|
() => dateAnnounceInput.value,
|
||||||
(value: string) => {
|
(value: string) => {
|
||||||
if (value.length === 10) {
|
if (value.length === 10) {
|
||||||
|
|
||||||
const dateVal = convertDate(value);
|
const dateVal = convertDate(value);
|
||||||
if (dateVal.isValid) {
|
if (dateVal.isValid) {
|
||||||
dateAnnounce.value = dateVal.value;
|
dateAnnounce.value = dateVal.value;
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'status'" class="table_ellipsis">
|
<div v-else-if="col.name == 'status'" class="table_ellipsis">
|
||||||
{{ statusLeave(col.value) }}
|
{{ col.value ? statusLeave(col.value) : "-" }}
|
||||||
<!-- {{ col.value }} -->
|
<!-- {{ col.value }} -->
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
|
@ -51,10 +51,12 @@
|
||||||
"
|
"
|
||||||
class="table_ellipsis"
|
class="table_ellipsis"
|
||||||
>
|
>
|
||||||
{{ col.value == null ? "" : col.value.toLocaleString("en-US") }}
|
{{
|
||||||
|
col.value == null ? "-" : col.value.toLocaleString("en-US")
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="table_ellipsis">
|
<div v-else class="table_ellipsis">
|
||||||
{{ col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<!-- <q-td auto-width>
|
<!-- <q-td auto-width>
|
||||||
|
|
@ -387,12 +389,12 @@
|
||||||
>
|
>
|
||||||
{{
|
{{
|
||||||
col.value == null
|
col.value == null
|
||||||
? ""
|
? "-"
|
||||||
: col.value.toLocaleString("en-US")
|
: col.value.toLocaleString("en-US")
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
@ -434,13 +436,13 @@
|
||||||
"
|
"
|
||||||
class="table_ellipsis"
|
class="table_ellipsis"
|
||||||
>
|
>
|
||||||
{{ col.value == null ? "" : col.value.toLocaleString("en-US") }}
|
{{ col.value == null ? "-" : col.value.toLocaleString("en-US") }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'status'" class="table_ellipsis">
|
<div v-else-if="col.name == 'status'" class="table_ellipsis">
|
||||||
{{ statusLeave(col.value) }}
|
{{ col.value ? statusLeave(col.value) : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="table_ellipsis">
|
<div v-else class="table_ellipsis">
|
||||||
{{ col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
|
||||||
|
|
@ -24,10 +24,10 @@
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
>
|
>
|
||||||
<div v-if="col.name == 'date'" class="table_ellipsis">
|
<div v-if="col.name == 'date'" class="table_ellipsis">
|
||||||
{{ date2Thai(col.value) }}
|
{{ col.value ? date2Thai(col.value) : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
|
|
@ -163,10 +163,10 @@
|
||||||
v-if="col.name == 'date' || col.name == 'createdAt'"
|
v-if="col.name == 'date' || col.name == 'createdAt'"
|
||||||
class="table_ellipsis"
|
class="table_ellipsis"
|
||||||
>
|
>
|
||||||
{{ date2Thai(col.value) }}
|
{{ col.value ? date2Thai(col.value) : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="table_ellipsis">
|
<div v-else class="table_ellipsis">
|
||||||
{{ col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,10 @@
|
||||||
v-if="col.name == 'date' || col.name == 'refCommandDate'"
|
v-if="col.name == 'date' || col.name == 'refCommandDate'"
|
||||||
class="table_ellipsis"
|
class="table_ellipsis"
|
||||||
>
|
>
|
||||||
{{ col.value == null ? null : date2Thai(col.value) }}
|
{{ col.value == null ? "-" : date2Thai(col.value) }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="table_ellipsis">
|
<div v-else class="table_ellipsis">
|
||||||
{{ col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
|
|
@ -275,10 +275,10 @@
|
||||||
"
|
"
|
||||||
class="table_ellipsis"
|
class="table_ellipsis"
|
||||||
>
|
>
|
||||||
{{ col.value == null ? null : date2Thai(col.value) }}
|
{{ col.value == null ? "-" : date2Thai(col.value) }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="table_ellipsis">
|
<div v-else class="table_ellipsis">
|
||||||
{{ col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
@ -333,7 +333,7 @@ const date = ref<Date>(new Date());
|
||||||
const detail = ref<string>();
|
const detail = ref<string>();
|
||||||
const reference = ref<string>();
|
const reference = ref<string>();
|
||||||
const refCommandNo = ref<string>();
|
const refCommandNo = ref<string>();
|
||||||
const refCommandDate = ref<Date | null|string>(new Date());
|
const refCommandDate = ref<Date | null | string>(new Date());
|
||||||
const myForm = ref<any>(); //form data input
|
const myForm = ref<any>(); //form data input
|
||||||
const edit = ref<boolean>(false); //เช็คการกดปุ่มแก้ไขใน dialog
|
const edit = ref<boolean>(false); //เช็คการกดปุ่มแก้ไขใน dialog
|
||||||
const modal = ref<boolean>(false); //modal add detail
|
const modal = ref<boolean>(false); //modal add detail
|
||||||
|
|
@ -567,7 +567,6 @@ const fetchData = async () => {
|
||||||
.get(config.API.profileNopaidId(profileId.value))
|
.get(config.API.profileNopaidId(profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
let data = res.data.result;
|
let data = res.data.result;
|
||||||
console.log(data)
|
|
||||||
rows.value = [];
|
rows.value = [];
|
||||||
data.map((e: ResponseObject) => {
|
data.map((e: ResponseObject) => {
|
||||||
rows.value.push({
|
rows.value.push({
|
||||||
|
|
@ -575,9 +574,9 @@ const fetchData = async () => {
|
||||||
date: new Date(e.date),
|
date: new Date(e.date),
|
||||||
detail: e.detail,
|
detail: e.detail,
|
||||||
reference: e.reference,
|
reference: e.reference,
|
||||||
refCommandNo: e.refCommandNo == ''?'-':e.refCommandNo,
|
refCommandNo: e.refCommandNo,
|
||||||
refCommandDate:
|
refCommandDate:
|
||||||
e.refCommandDate == null ? '-' : new Date(e.refCommandDate),
|
e.refCommandDate == null ? null : new Date(e.refCommandDate),
|
||||||
createdFullName: e.createdFullName,
|
createdFullName: e.createdFullName,
|
||||||
createdAt: new Date(e.createdAt),
|
createdAt: new Date(e.createdAt),
|
||||||
});
|
});
|
||||||
|
|
@ -686,7 +685,9 @@ const saveData = async () => {
|
||||||
reference: reference.value,
|
reference: reference.value,
|
||||||
refCommandNo: refCommandNo.value,
|
refCommandNo: refCommandNo.value,
|
||||||
refCommandDate:
|
refCommandDate:
|
||||||
refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date),
|
refCommandDate.value == null
|
||||||
|
? null
|
||||||
|
: dateToISO(refCommandDate.value as Date),
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
|
@ -714,7 +715,9 @@ const editData = async () => {
|
||||||
reference: reference.value,
|
reference: reference.value,
|
||||||
refCommandNo: refCommandNo.value,
|
refCommandNo: refCommandNo.value,
|
||||||
refCommandDate:
|
refCommandDate:
|
||||||
refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date),
|
refCommandDate.value == null
|
||||||
|
? null
|
||||||
|
: dateToISO(refCommandDate.value as Date),
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
>
|
>
|
||||||
<div class="table_ellipsis">
|
<div class="table_ellipsis">
|
||||||
{{ col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
|
|
@ -149,10 +149,10 @@
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<div v-if="col.name == 'createdAt'" class="table_ellipsis">
|
<div v-if="col.name == 'createdAt'" class="table_ellipsis">
|
||||||
{{ date2Thai(col.value) }}
|
{{ col.value ? date2Thai(col.value) : col.value }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="table_ellipsis">
|
<div v-else class="table_ellipsis">
|
||||||
{{ col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
|
||||||
|
|
@ -39,13 +39,13 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="col.name == 'dateOrder'" class="table_ellipsis">
|
<div v-else-if="col.name == 'dateOrder'" class="table_ellipsis">
|
||||||
{{ date2Thai(col.value) }}
|
{{ col.value ? date2Thai(col.value) : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'yearly'" class="table_ellipsis">
|
<div v-else-if="col.name == 'yearly'" class="table_ellipsis">
|
||||||
{{ col.value ? col.value + 543 : "" }}
|
{{ col.value ? col.value + 543 : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="table_ellipsis">
|
<div v-else class="table_ellipsis">
|
||||||
{{ col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
|
|
@ -600,13 +600,13 @@
|
||||||
"
|
"
|
||||||
class="table_ellipsis"
|
class="table_ellipsis"
|
||||||
>
|
>
|
||||||
{{ date2Thai(col.value) }}
|
{{ col.value ? date2Thai(col.value) : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'yearly'" class="table_ellipsis">
|
<div v-else-if="col.name == 'yearly'" class="table_ellipsis">
|
||||||
{{ col.value + 543 }}
|
{{ col.value ? col.value + 543 : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="table_ellipsis">
|
<div v-else class="table_ellipsis">
|
||||||
{{ col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
|
||||||
|
|
@ -31,10 +31,10 @@
|
||||||
"
|
"
|
||||||
class="table_ellipsis"
|
class="table_ellipsis"
|
||||||
>
|
>
|
||||||
{{ col.value == null ? null : date2Thai(col.value) }}
|
{{ col.value ? date2Thai(col.value) : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="table_ellipsis">
|
<div v-else class="table_ellipsis">
|
||||||
{{ col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
|
|
@ -334,10 +334,10 @@
|
||||||
"
|
"
|
||||||
class="table_ellipsis"
|
class="table_ellipsis"
|
||||||
>
|
>
|
||||||
{{ col.value == null ? null : date2Thai(col.value) }}
|
{{ col.value ? date2Thai(col.value) : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="table_ellipsis">
|
<div v-else class="table_ellipsis">
|
||||||
{{ col.value }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
@ -395,7 +395,7 @@ const detail = ref<string>();
|
||||||
const reference = ref<string>();
|
const reference = ref<string>();
|
||||||
const minDate = ref<Date>();
|
const minDate = ref<Date>();
|
||||||
const refCommandNo = ref<string>();
|
const refCommandNo = ref<string>();
|
||||||
const refCommandDate = ref<Date | null|string>(new Date());
|
const refCommandDate = ref<Date | null | string>(new Date());
|
||||||
const myForm = ref<any>(); //form data input
|
const myForm = ref<any>(); //form data input
|
||||||
const edit = ref<boolean>(false); //เช็คการกดปุ่มแก้ไขใน dialog
|
const edit = ref<boolean>(false); //เช็คการกดปุ่มแก้ไขใน dialog
|
||||||
const modal = ref<boolean>(false); //modal add detail
|
const modal = ref<boolean>(false); //modal add detail
|
||||||
|
|
@ -681,7 +681,7 @@ const fetchData = async () => {
|
||||||
reference: e.reference,
|
reference: e.reference,
|
||||||
refCommandNo: e.refCommandNo,
|
refCommandNo: e.refCommandNo,
|
||||||
refCommandDate:
|
refCommandDate:
|
||||||
e.refCommandDate == null ? '-' : new Date(e.refCommandDate),
|
e.refCommandDate == null ? null : new Date(e.refCommandDate),
|
||||||
createdFullName: e.createdFullName,
|
createdFullName: e.createdFullName,
|
||||||
createdAt: new Date(e.createdAt),
|
createdAt: new Date(e.createdAt),
|
||||||
});
|
});
|
||||||
|
|
@ -726,7 +726,8 @@ const getData = () => {
|
||||||
detail.value = row.detail;
|
detail.value = row.detail;
|
||||||
reference.value = row.reference;
|
reference.value = row.reference;
|
||||||
refCommandNo.value = row.refCommandNo;
|
refCommandNo.value = row.refCommandNo;
|
||||||
refCommandDate.value = row.refCommandDate == '-' ? '':row.refCommandDate as Date;
|
refCommandDate.value =
|
||||||
|
row.refCommandDate == "-" ? "" : (row.refCommandDate as Date);
|
||||||
id.value = row.id;
|
id.value = row.id;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -792,7 +793,9 @@ const saveData = async () => {
|
||||||
reference: reference.value,
|
reference: reference.value,
|
||||||
refCommandNo: refCommandNo.value,
|
refCommandNo: refCommandNo.value,
|
||||||
refCommandDate:
|
refCommandDate:
|
||||||
refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date),
|
refCommandDate.value == null
|
||||||
|
? null
|
||||||
|
: dateToISO(refCommandDate.value as Date),
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
|
@ -821,7 +824,9 @@ const editData = async () => {
|
||||||
reference: reference.value,
|
reference: reference.value,
|
||||||
refCommandNo: refCommandNo.value,
|
refCommandNo: refCommandNo.value,
|
||||||
refCommandDate:
|
refCommandDate:
|
||||||
refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date),
|
refCommandDate.value == null
|
||||||
|
? null
|
||||||
|
: dateToISO(refCommandDate.value as Date),
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
|
@ -904,7 +909,8 @@ const selectData = async (props: DataProps) => {
|
||||||
detail.value = props.row.detail;
|
detail.value = props.row.detail;
|
||||||
reference.value = props.row.reference;
|
reference.value = props.row.reference;
|
||||||
refCommandNo.value = props.row.refCommandNo;
|
refCommandNo.value = props.row.refCommandNo;
|
||||||
refCommandDate.value = props.row.refCommandDate =='-' ? '':props.row.refCommandDate as Date;
|
refCommandDate.value =
|
||||||
|
props.row.refCommandDate == "-" ? "" : (props.row.refCommandDate as Date);
|
||||||
id.value = props.row.id;
|
id.value = props.row.id;
|
||||||
|
|
||||||
inputDateStart.value = convertDateDisplay(dateStart.value);
|
inputDateStart.value = convertDateDisplay(dateStart.value);
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,13 @@ interface RequestItemsObject {
|
||||||
id: string;
|
id: string;
|
||||||
issuer: string;
|
issuer: string;
|
||||||
detail: string;
|
detail: string;
|
||||||
issueDate: number;
|
issueDate: number | null;
|
||||||
issueDate2: Date;
|
issueDate2: Date;
|
||||||
refCommandNo: string;
|
refCommandNo: string;
|
||||||
refCommandDate: Date | null | string;
|
refCommandDate: Date | null | string;
|
||||||
createdFullName: string;
|
createdFullName: string;
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
|
isDate: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
//columns
|
//columns
|
||||||
|
|
@ -29,4 +30,4 @@ interface Columns {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export type { RequestItemsObject, Columns, DataProps };
|
export type { RequestItemsObject, Columns };
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ interface ResponseObject {
|
||||||
refCommandDate: Date | null;
|
refCommandDate: Date | null;
|
||||||
createdFullName: string;
|
createdFullName: string;
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
|
isDate: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type { ResponseObject };
|
export type { ResponseObject };
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue