From 9693c689e6a2ed13f4bf83a72ed6de718a5549b7 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Tue, 13 Feb 2024 17:26:10 +0700 Subject: [PATCH] no message --- src/modules/04_registry/components/Coin.vue | 3 ++- .../04_registry/components/Discipline.vue | 17 +++++++------- .../04_registry/components/Insignia.vue | 22 +++++++++---------- src/modules/04_registry/components/Record.vue | 17 +++++++------- src/modules/04_registry/components/Work.vue | 16 +++++++------- .../interface/request/Discipline.ts | 2 +- .../04_registry/interface/request/Record.ts | 2 +- .../04_registry/interface/request/Work.ts | 2 +- 8 files changed, 42 insertions(+), 39 deletions(-) diff --git a/src/modules/04_registry/components/Coin.vue b/src/modules/04_registry/components/Coin.vue index 4f78aa308..ccf194c73 100644 --- a/src/modules/04_registry/components/Coin.vue +++ b/src/modules/04_registry/components/Coin.vue @@ -567,11 +567,12 @@ const fetchData = async () => { .get(config.API.profileHonorId(profileId.value)) .then((res) => { let data = res.data.result; + console.log(data) rows.value = []; data.map((e: ResponseObject) => { rows.value.push({ id: e.id, - issuer: e.issuer, + issuer: e.issuer == ''?'-':e.issuer, detail: e.detail, isDate: e.isDate == null ? null : e.isDate.toString(), issueDate: new Date(e.issueDate).getFullYear(), diff --git a/src/modules/04_registry/components/Discipline.vue b/src/modules/04_registry/components/Discipline.vue index 657ec504b..5bdc1db76 100644 --- a/src/modules/04_registry/components/Discipline.vue +++ b/src/modules/04_registry/components/Discipline.vue @@ -202,7 +202,7 @@ lazy-rules :borderless="!edit" :model-value=" - refCommandDate == null ? null : date2Thai(refCommandDate) + refCommandDate == null ? null : date2Thai(refCommandDate as Date) " hide-bottom-space :label="`${'เอกสารอ้างอิง (ลงวันที่)'}`" @@ -372,7 +372,7 @@ const OpsFilter = ref({ const detail = ref(); const unStigma = ref(); const refCommandNo = ref(); -const refCommandDate = ref(new Date()); +const refCommandDate = ref(new Date()); const date = ref(new Date()); const myForm = ref(); //form data input const edit = ref(false); //เช็คการกดปุ่มแก้ไขใน dialog @@ -602,16 +602,17 @@ const fetchData = async () => { .get(config.API.profileDisId(profileId.value)) .then((res) => { let data = res.data.result; + console.log(data) rows.value = []; data.map((e: ResponseObject) => { rows.value.push({ id: e.id, level: e.level, detail: e.detail, - unStigma: e.unStigma, + unStigma: e.unStigma == '' ? '-':e.unStigma, refCommandNo: e.refCommandNo, refCommandDate: - e.refCommandDate == null ? null : new Date(e.refCommandDate), + e.refCommandDate == null ? '-' : new Date(e.refCommandDate), date: new Date(e.date), createdFullName: e.createdFullName, createdAt: new Date(e.createdAt), @@ -656,7 +657,7 @@ const getData = () => { detail.value = row.detail; unStigma.value = row.unStigma; refCommandNo.value = row.refCommandNo; - refCommandDate.value = row.refCommandDate; + refCommandDate.value = row.refCommandDate == '-' ? '':row.refCommandDate as Date; date.value = row.date; id.value = row.id; }; @@ -722,7 +723,7 @@ const saveData = async () => { unStigma: unStigma.value, refCommandNo: refCommandNo.value, refCommandDate: - refCommandDate.value == null ? null : dateToISO(refCommandDate.value), + refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date), date: dateToISO(date.value), }) .then((res) => { @@ -751,7 +752,7 @@ const editData = async () => { unStigma: unStigma.value, refCommandNo: refCommandNo.value, refCommandDate: - refCommandDate.value == null ? null : dateToISO(refCommandDate.value), + refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date), date: dateToISO(date.value), }) .then((res) => { @@ -834,7 +835,7 @@ const selectData = async (props: DataProps) => { detail.value = props.row.detail; unStigma.value = props.row.unStigma; refCommandNo.value = props.row.refCommandNo; - refCommandDate.value = props.row.refCommandDate; + refCommandDate.value = props.row.refCommandDate == '-' ? '':props.row.refCommandDate; date.value = props.row.date; id.value = props.row.id; await checkRowPage(); diff --git a/src/modules/04_registry/components/Insignia.vue b/src/modules/04_registry/components/Insignia.vue index 85c196d55..9cdd3d22a 100644 --- a/src/modules/04_registry/components/Insignia.vue +++ b/src/modules/04_registry/components/Insignia.vue @@ -1029,16 +1029,16 @@ const fetchData = async () => { insigniaId: e.insignia == null ? null : e.insignia.id, insigniaType: e.insigniaType, year: e.year, - no: e.no, - issue: e.issue, - volumeNo: e.volumeNo, - volume: e.volume, - section: e.section, - page: e.page, + no: e.no == '' ? '-':e.no, + issue: e.issue == '' ? '-':e.issue, + volumeNo: e.volumeNo == '' ? '-':e.volumeNo, + volume: e.volume == '' ? '-':e.volume, + section: e.section == '' ? '-':e.section, + page: e.page == '' ? '-':e.page, receiveDate: new Date(e.receiveDate), - dateAnnounce: e.dateAnnounce, - refCommandNo: e.refCommandNo, - refCommandDate: e.refCommandDate, + dateAnnounce: e.dateAnnounce == null ? '-':e.dateAnnounce, + refCommandNo: e.refCommandNo == '' ? '-':e.refCommandNo, + refCommandDate: e.refCommandDate == null ? '-':e.refCommandDate, createdFullName: e.createdFullName, createdAt: new Date(e.createdAt), }); @@ -1089,7 +1089,7 @@ const getData = () => { section.value = row.section; page.value = row.page; receiveDate.value = row.receiveDate; - dateAnnounce.value = row.dateAnnounce; + dateAnnounce.value = row.dateAnnounce == '-'?'':row.dateAnnounce; refCommandNo.value = row.refCommandNo; refCommandDate.value = row.refCommandDate; id.value = row.id; @@ -1311,7 +1311,7 @@ const selectData = async (props: DataProps) => { section.value = props.row.section; page.value = props.row.page; receiveDate.value = props.row.receiveDate; - dateAnnounce.value = props.row.dateAnnounce; + dateAnnounce.value = props.row.dateAnnounce == '-'? '':props.row.dateAnnounce; refCommandNo.value = props.row.refCommandNo; refCommandDate.value = props.row.refCommandDate == "-" ? null : props.row.refCommandDate; diff --git a/src/modules/04_registry/components/Record.vue b/src/modules/04_registry/components/Record.vue index 43261cbe2..b17936fff 100644 --- a/src/modules/04_registry/components/Record.vue +++ b/src/modules/04_registry/components/Record.vue @@ -207,7 +207,7 @@ lazy-rules :borderless="!edit" :model-value=" - refCommandDate == null ? null : date2Thai(refCommandDate) + refCommandDate == null ? null : date2Thai(refCommandDate as Date) " hide-bottom-space :label="`${'เอกสารอ้างอิง (ลงวันที่)'}`" @@ -333,7 +333,7 @@ const date = ref(new Date()); const detail = ref(); const reference = ref(); const refCommandNo = ref(); -const refCommandDate = ref(new Date()); +const refCommandDate = ref(new Date()); const myForm = ref(); //form data input const edit = ref(false); //เช็คการกดปุ่มแก้ไขใน dialog const modal = ref(false); //modal add detail @@ -358,7 +358,7 @@ const filter = ref(""); //search data table const visibleColumns = ref([]); const inputDate = ref(""); const inputDateRefCommandDate = ref( - refCommandDate.value ? convertDateDisplay(refCommandDate.value) : "" + refCommandDate.value ? convertDateDisplay(refCommandDate.value as Date) : "" ); const dayChecked = ref(false); @@ -567,6 +567,7 @@ const fetchData = async () => { .get(config.API.profileNopaidId(profileId.value)) .then((res) => { let data = res.data.result; + console.log(data) rows.value = []; data.map((e: ResponseObject) => { rows.value.push({ @@ -574,9 +575,9 @@ const fetchData = async () => { date: new Date(e.date), detail: e.detail, reference: e.reference, - refCommandNo: e.refCommandNo, + refCommandNo: e.refCommandNo == ''?'-':e.refCommandNo, refCommandDate: - e.refCommandDate == null ? null : new Date(e.refCommandDate), + e.refCommandDate == null ? '-' : new Date(e.refCommandDate), createdFullName: e.createdFullName, createdAt: new Date(e.createdAt), }); @@ -685,7 +686,7 @@ const saveData = async () => { reference: reference.value, refCommandNo: refCommandNo.value, refCommandDate: - refCommandDate.value == null ? null : dateToISO(refCommandDate.value), + refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date), }) .then((res) => { success($q, "บันทึกข้อมูลสำเร็จ"); @@ -713,7 +714,7 @@ const editData = async () => { reference: reference.value, refCommandNo: refCommandNo.value, refCommandDate: - refCommandDate.value == null ? null : dateToISO(refCommandDate.value), + refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date), }) .then((res) => { success($q, "บันทึกข้อมูลสำเร็จ"); @@ -800,7 +801,7 @@ const selectData = async (props: DataProps) => { inputDate.value = convertDateDisplay(date.value); inputDateRefCommandDate.value = refCommandDate.value - ? convertDateDisplay(refCommandDate.value) + ? convertDateDisplay(refCommandDate.value as Date) : ""; await checkRowPage(); }; diff --git a/src/modules/04_registry/components/Work.vue b/src/modules/04_registry/components/Work.vue index 4c316b7be..9ec90644c 100644 --- a/src/modules/04_registry/components/Work.vue +++ b/src/modules/04_registry/components/Work.vue @@ -265,7 +265,7 @@ lazy-rules :borderless="!edit" :model-value=" - refCommandDate == null ? null : date2Thai(refCommandDate) + refCommandDate == null ? null : date2Thai(refCommandDate as Date) " hide-bottom-space :label="`${'เอกสารอ้างอิง (ลงวันที่)'}`" @@ -395,7 +395,7 @@ const detail = ref(); const reference = ref(); const minDate = ref(); const refCommandNo = ref(); -const refCommandDate = ref(new Date()); +const refCommandDate = ref(new Date()); const myForm = ref(); //form data input const edit = ref(false); //เช็คการกดปุ่มแก้ไขใน dialog const modal = ref(false); //modal add detail @@ -681,7 +681,7 @@ const fetchData = async () => { reference: e.reference, refCommandNo: e.refCommandNo, refCommandDate: - e.refCommandDate == null ? null : new Date(e.refCommandDate), + e.refCommandDate == null ? '-' : new Date(e.refCommandDate), createdFullName: e.createdFullName, createdAt: new Date(e.createdAt), }); @@ -726,7 +726,7 @@ const getData = () => { detail.value = row.detail; reference.value = row.reference; refCommandNo.value = row.refCommandNo; - refCommandDate.value = row.refCommandDate; + refCommandDate.value = row.refCommandDate == '-' ? '':row.refCommandDate as Date; id.value = row.id; }; @@ -792,7 +792,7 @@ const saveData = async () => { reference: reference.value, refCommandNo: refCommandNo.value, refCommandDate: - refCommandDate.value == null ? null : dateToISO(refCommandDate.value), + refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date), }) .then((res) => { success($q, "บันทึกข้อมูลสำเร็จ"); @@ -821,7 +821,7 @@ const editData = async () => { reference: reference.value, refCommandNo: refCommandNo.value, refCommandDate: - refCommandDate.value == null ? null : dateToISO(refCommandDate.value), + refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date), }) .then((res) => { success($q, "บันทึกข้อมูลสำเร็จ"); @@ -904,13 +904,13 @@ const selectData = async (props: DataProps) => { detail.value = props.row.detail; reference.value = props.row.reference; 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; inputDateStart.value = convertDateDisplay(dateStart.value); inputDateEnd.value = convertDateDisplay(dateEnd.value); inputRefCommandDate.value = refCommandDate.value - ? convertDateDisplay(refCommandDate.value) + ? convertDateDisplay(refCommandDate.value as Date) : ""; await checkRowPage(); }; diff --git a/src/modules/04_registry/interface/request/Discipline.ts b/src/modules/04_registry/interface/request/Discipline.ts index 0cc0906c7..9eeea6f03 100644 --- a/src/modules/04_registry/interface/request/Discipline.ts +++ b/src/modules/04_registry/interface/request/Discipline.ts @@ -10,7 +10,7 @@ interface RequestItemsObject { detail: string; unStigma: string; refCommandNo: string; - refCommandDate: Date | null; + refCommandDate: Date | null|string; date: Date; createdFullName: string; createdAt: Date; diff --git a/src/modules/04_registry/interface/request/Record.ts b/src/modules/04_registry/interface/request/Record.ts index b40baaf49..28838a6ac 100644 --- a/src/modules/04_registry/interface/request/Record.ts +++ b/src/modules/04_registry/interface/request/Record.ts @@ -10,7 +10,7 @@ interface RequestItemsObject { detail: string; reference: string; refCommandNo: string; - refCommandDate: Date | null; + refCommandDate: Date | null | string; createdFullName: string; createdAt: Date; } diff --git a/src/modules/04_registry/interface/request/Work.ts b/src/modules/04_registry/interface/request/Work.ts index 58d2730cd..d4d164d4f 100644 --- a/src/modules/04_registry/interface/request/Work.ts +++ b/src/modules/04_registry/interface/request/Work.ts @@ -11,7 +11,7 @@ interface RequestItemsObject { detail: string; reference: string; refCommandNo: string; - refCommandDate: Date | null; + refCommandDate: Date | null|string; createdFullName: string; createdAt: Date; }