no message

This commit is contained in:
setthawutttty 2024-02-13 17:26:10 +07:00
parent ea91acf18a
commit 9693c689e6
8 changed files with 42 additions and 39 deletions

View file

@ -567,11 +567,12 @@ 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)
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, issuer: e.issuer == ''?'-':e.issuer,
detail: e.detail, detail: e.detail,
isDate: e.isDate == null ? null : e.isDate.toString(), isDate: e.isDate == null ? null : e.isDate.toString(),
issueDate: new Date(e.issueDate).getFullYear(), issueDate: new Date(e.issueDate).getFullYear(),

View file

@ -202,7 +202,7 @@
lazy-rules lazy-rules
:borderless="!edit" :borderless="!edit"
:model-value=" :model-value="
refCommandDate == null ? null : date2Thai(refCommandDate) refCommandDate == null ? null : date2Thai(refCommandDate as Date)
" "
hide-bottom-space hide-bottom-space
:label="`${'เอกสารอ้างอิง (ลงวันที่)'}`" :label="`${'เอกสารอ้างอิง (ลงวันที่)'}`"
@ -372,7 +372,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>(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
@ -602,16 +602,17 @@ 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)
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, unStigma: e.unStigma == '' ? '-':e.unStigma,
refCommandNo: e.refCommandNo, refCommandNo: e.refCommandNo,
refCommandDate: refCommandDate:
e.refCommandDate == null ? null : new Date(e.refCommandDate), e.refCommandDate == null ? '-' : new Date(e.refCommandDate),
date: new Date(e.date), date: new Date(e.date),
createdFullName: e.createdFullName, createdFullName: e.createdFullName,
createdAt: new Date(e.createdAt), createdAt: new Date(e.createdAt),
@ -656,7 +657,7 @@ 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; refCommandDate.value = row.refCommandDate == '-' ? '':row.refCommandDate as Date;
date.value = row.date; date.value = row.date;
id.value = row.id; id.value = row.id;
}; };
@ -722,7 +723,7 @@ const saveData = async () => {
unStigma: unStigma.value, unStigma: unStigma.value,
refCommandNo: refCommandNo.value, refCommandNo: refCommandNo.value,
refCommandDate: refCommandDate:
refCommandDate.value == null ? null : dateToISO(refCommandDate.value), refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date),
date: dateToISO(date.value), date: dateToISO(date.value),
}) })
.then((res) => { .then((res) => {
@ -751,7 +752,7 @@ const editData = async () => {
unStigma: unStigma.value, unStigma: unStigma.value,
refCommandNo: refCommandNo.value, refCommandNo: refCommandNo.value,
refCommandDate: refCommandDate:
refCommandDate.value == null ? null : dateToISO(refCommandDate.value), refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date),
date: dateToISO(date.value), date: dateToISO(date.value),
}) })
.then((res) => { .then((res) => {
@ -834,7 +835,7 @@ 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; 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;
await checkRowPage(); await checkRowPage();

View file

@ -1029,16 +1029,16 @@ 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, no: e.no == '' ? '-':e.no,
issue: e.issue, issue: e.issue == '' ? '-':e.issue,
volumeNo: e.volumeNo, volumeNo: e.volumeNo == '' ? '-':e.volumeNo,
volume: e.volume, volume: e.volume == '' ? '-':e.volume,
section: e.section, section: e.section == '' ? '-':e.section,
page: e.page, page: e.page == '' ? '-':e.page,
receiveDate: new Date(e.receiveDate), receiveDate: new Date(e.receiveDate),
dateAnnounce: e.dateAnnounce, dateAnnounce: e.dateAnnounce == null ? '-':e.dateAnnounce,
refCommandNo: e.refCommandNo, refCommandNo: e.refCommandNo == '' ? '-':e.refCommandNo,
refCommandDate: e.refCommandDate, refCommandDate: e.refCommandDate == null ? '-':e.refCommandDate,
createdFullName: e.createdFullName, createdFullName: e.createdFullName,
createdAt: new Date(e.createdAt), createdAt: new Date(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; 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,7 +1311,7 @@ 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; 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;

View file

@ -207,7 +207,7 @@
lazy-rules lazy-rules
:borderless="!edit" :borderless="!edit"
:model-value=" :model-value="
refCommandDate == null ? null : date2Thai(refCommandDate) refCommandDate == null ? null : date2Thai(refCommandDate as Date)
" "
hide-bottom-space hide-bottom-space
:label="`${'เอกสารอ้างอิง (ลงวันที่)'}`" :label="`${'เอกสารอ้างอิง (ลงวันที่)'}`"
@ -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>(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
@ -358,7 +358,7 @@ const filter = ref<string>(""); //search data table
const visibleColumns = ref<String[]>([]); const visibleColumns = ref<String[]>([]);
const inputDate = ref<string>(""); const inputDate = ref<string>("");
const inputDateRefCommandDate = ref<string>( const inputDateRefCommandDate = ref<string>(
refCommandDate.value ? convertDateDisplay(refCommandDate.value) : "" refCommandDate.value ? convertDateDisplay(refCommandDate.value as Date) : ""
); );
const dayChecked = ref<boolean>(false); const dayChecked = ref<boolean>(false);
@ -567,6 +567,7 @@ 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({
@ -574,9 +575,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, refCommandNo: e.refCommandNo == ''?'-':e.refCommandNo,
refCommandDate: refCommandDate:
e.refCommandDate == null ? null : new Date(e.refCommandDate), e.refCommandDate == null ? '-' : new Date(e.refCommandDate),
createdFullName: e.createdFullName, createdFullName: e.createdFullName,
createdAt: new Date(e.createdAt), createdAt: new Date(e.createdAt),
}); });
@ -685,7 +686,7 @@ const saveData = async () => {
reference: reference.value, reference: reference.value,
refCommandNo: refCommandNo.value, refCommandNo: refCommandNo.value,
refCommandDate: refCommandDate:
refCommandDate.value == null ? null : dateToISO(refCommandDate.value), refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date),
}) })
.then((res) => { .then((res) => {
success($q, "บันทึกข้อมูลสำเร็จ"); success($q, "บันทึกข้อมูลสำเร็จ");
@ -713,7 +714,7 @@ const editData = async () => {
reference: reference.value, reference: reference.value,
refCommandNo: refCommandNo.value, refCommandNo: refCommandNo.value,
refCommandDate: refCommandDate:
refCommandDate.value == null ? null : dateToISO(refCommandDate.value), refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date),
}) })
.then((res) => { .then((res) => {
success($q, "บันทึกข้อมูลสำเร็จ"); success($q, "บันทึกข้อมูลสำเร็จ");
@ -800,7 +801,7 @@ const selectData = async (props: DataProps) => {
inputDate.value = convertDateDisplay(date.value); inputDate.value = convertDateDisplay(date.value);
inputDateRefCommandDate.value = refCommandDate.value inputDateRefCommandDate.value = refCommandDate.value
? convertDateDisplay(refCommandDate.value) ? convertDateDisplay(refCommandDate.value as Date)
: ""; : "";
await checkRowPage(); await checkRowPage();
}; };

View file

@ -265,7 +265,7 @@
lazy-rules lazy-rules
:borderless="!edit" :borderless="!edit"
:model-value=" :model-value="
refCommandDate == null ? null : date2Thai(refCommandDate) refCommandDate == null ? null : date2Thai(refCommandDate as Date)
" "
hide-bottom-space hide-bottom-space
:label="`${'เอกสารอ้างอิง (ลงวันที่)'}`" :label="`${'เอกสารอ้างอิง (ลงวันที่)'}`"
@ -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>(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 ? null : new Date(e.refCommandDate), e.refCommandDate == null ? '-' : new Date(e.refCommandDate),
createdFullName: e.createdFullName, createdFullName: e.createdFullName,
createdAt: new Date(e.createdAt), createdAt: new Date(e.createdAt),
}); });
@ -726,7 +726,7 @@ 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; refCommandDate.value = row.refCommandDate == '-' ? '':row.refCommandDate as Date;
id.value = row.id; id.value = row.id;
}; };
@ -792,7 +792,7 @@ const saveData = async () => {
reference: reference.value, reference: reference.value,
refCommandNo: refCommandNo.value, refCommandNo: refCommandNo.value,
refCommandDate: refCommandDate:
refCommandDate.value == null ? null : dateToISO(refCommandDate.value), refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date),
}) })
.then((res) => { .then((res) => {
success($q, "บันทึกข้อมูลสำเร็จ"); success($q, "บันทึกข้อมูลสำเร็จ");
@ -821,7 +821,7 @@ const editData = async () => {
reference: reference.value, reference: reference.value,
refCommandNo: refCommandNo.value, refCommandNo: refCommandNo.value,
refCommandDate: refCommandDate:
refCommandDate.value == null ? null : dateToISO(refCommandDate.value), refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date),
}) })
.then((res) => { .then((res) => {
success($q, "บันทึกข้อมูลสำเร็จ"); success($q, "บันทึกข้อมูลสำเร็จ");
@ -904,13 +904,13 @@ 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; 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);
inputDateEnd.value = convertDateDisplay(dateEnd.value); inputDateEnd.value = convertDateDisplay(dateEnd.value);
inputRefCommandDate.value = refCommandDate.value inputRefCommandDate.value = refCommandDate.value
? convertDateDisplay(refCommandDate.value) ? convertDateDisplay(refCommandDate.value as Date)
: ""; : "";
await checkRowPage(); await checkRowPage();
}; };

View file

@ -10,7 +10,7 @@ interface RequestItemsObject {
detail: string; detail: string;
unStigma: string; unStigma: string;
refCommandNo: string; refCommandNo: string;
refCommandDate: Date | null; refCommandDate: Date | null|string;
date: Date; date: Date;
createdFullName: string; createdFullName: string;
createdAt: Date; createdAt: Date;

View file

@ -10,7 +10,7 @@ interface RequestItemsObject {
detail: string; detail: string;
reference: string; reference: string;
refCommandNo: string; refCommandNo: string;
refCommandDate: Date | null; refCommandDate: Date | null | string;
createdFullName: string; createdFullName: string;
createdAt: Date; createdAt: Date;
} }

View file

@ -11,7 +11,7 @@ interface RequestItemsObject {
detail: string; detail: string;
reference: string; reference: string;
refCommandNo: string; refCommandNo: string;
refCommandDate: Date | null; refCommandDate: Date | null|string;
createdFullName: string; createdFullName: string;
createdAt: Date; createdAt: Date;
} }