From 2cfd9672d0819e6b6444ce754b6932eb2aa3cfb5 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Fri, 1 Mar 2024 09:34:06 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=AB=E0=B8=A1=E0=B8=B2=E0=B8=A2=E0=B9=80?= =?UTF-8?q?=E0=B8=AB=E0=B8=95=E0=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../04_registry/components/Insignia.vue | 31 +++++++++++++++++-- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/src/modules/04_registry/components/Insignia.vue b/src/modules/04_registry/components/Insignia.vue index 5e6747074..6e0e7026b 100644 --- a/src/modules/04_registry/components/Insignia.vue +++ b/src/modules/04_registry/components/Insignia.vue @@ -457,6 +457,15 @@ +
+ +
@@ -576,6 +585,8 @@ const Ops = ref({ const OpsFilter = ref({ insigniaOptions: [], }); + +const note = ref() const insigniaType = ref(); const year = ref(0); const no = ref(); @@ -623,6 +634,7 @@ profileData.insignia.columns.length == 0 "dateAnnounce", "refCommandNo", "refCommandDate", + "note", "createdAt", ]) : (visibleColumns.value = profileData.insignia.columns); @@ -770,7 +782,20 @@ const columns = ref([ sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, + { + name: "note", + align: "left", + label: "หมายเหตุ", + sortable: true, + field: "note", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, ]); + + const columnsHistory = ref([ { name: "year", @@ -1021,7 +1046,6 @@ const fetchData = async () => { .get(config.API.profileInsignId(profileId.value)) .then((res) => { let data = res.data.result; - console.log(data); rows.value = []; data.map((e: any) => { rows.value.push({ @@ -1042,9 +1066,9 @@ const fetchData = async () => { refCommandDate: e.refCommandDate, createdFullName: e.createdFullName, createdAt: e.createdAt, + note: e.note, }); }); - console.log(data) }) .catch((e) => { messageError($q, e); @@ -1185,6 +1209,7 @@ const saveData = async () => { refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date), + note:note.value }) .then((res) => { success($q, "บันทึกข้อมูลสำเร็จ"); @@ -1225,6 +1250,7 @@ const editData = async () => { refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date), + note:note.value }) .then((res) => { success($q, "บันทึกข้อมูลสำเร็จ"); @@ -1297,7 +1323,6 @@ const clickClose = async () => { * @param props ค่า props ใน row ที่เลือก */ const selectData = async (props: DataProps) => { - console.log(props.row); modalEdit.value = true; modal.value = true; edit.value = false;