From f10b77a34b35d80e9fde5cbe63963f7c6bc3d1d0 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Wed, 22 Nov 2023 12:03:33 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=20?= =?UTF-8?q?=E0=B8=9C=E0=B8=B9=E0=B9=89=E0=B8=A3=E0=B9=89=E0=B9=89=E0=B8=AD?= =?UTF-8?q?=E0=B8=87=E0=B9=80=E0=B8=A3=E0=B8=B5=E0=B8=A2=E0=B8=99=20?= =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=20dialog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Dialogs/AddPersonal.vue | 63 ++++--- .../components/1_Complaint/EditPage.vue | 4 +- .../components/1_Complaint/Form.vue | 166 ++++++++++-------- .../3_InvestigateDisciplinary/Form.vue | 1 + .../interface/request/complaint.ts | 8 +- .../interface/response/complaint.ts | 4 +- .../11_discipline/store/ComplaintsStore.ts | 8 +- 7 files changed, 149 insertions(+), 105 deletions(-) diff --git a/src/components/Dialogs/AddPersonal.vue b/src/components/Dialogs/AddPersonal.vue index 58ab6cc0a..5405f3af8 100644 --- a/src/components/Dialogs/AddPersonal.vue +++ b/src/components/Dialogs/AddPersonal.vue @@ -41,10 +41,12 @@ const typeOps = ref([ /** หัวข้อที่เเสดงในตาราง */ const visibleColumns = ref([ "no", - "cardId", + "idcard", "fullName", "position", - "level", + "positionLevel", + "salary", + "organization", ]); /** หัวตาราง */ @@ -59,11 +61,11 @@ const columns = ref([ style: "font-size: 14px", }, { - name: "cardId", + name: "idcard", align: "left", - label: "เลขประจำตัวประชาชน", + label: "เลขบัตรประชาชน", sortable: true, - field: "cardId", + field: "idcard", headerStyle: "font-size: 14px", style: "font-size: 14px", }, @@ -86,11 +88,29 @@ const columns = ref([ style: "font-size: 14px", }, { - name: "level", + name: "positionLevel", align: "left", label: "ระดับ", sortable: true, - field: "level", + field: "positionLevel", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "salary", + align: "left", + label: "เงินเดือน", + sortable: true, + field: "salary", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "organization", + align: "left", + label: "หน่วยงาน", + sortable: true, + field: "organization", headerStyle: "font-size: 14px", style: "font-size: 14px", }, @@ -155,7 +175,7 @@ function saveData() { function searchInput() { const data = dataObject.value; if (type.value === "idcard") { - rows.value = data.filter((item: any) => item.cardId === search.value); + rows.value = data.filter((item: any) => item.idcard === search.value); } else if (type.value === "firstname") { rows.value = data.filter((item: any) => item.firstName === search.value); } else if (type.value === "lastname") { @@ -181,38 +201,38 @@ onMounted(() => { const data = [ { id: "001", - cardId: "0000000000001", + idcard: "0000000000001", prefix: "นาง", firstName: "ศิรินภา", lastName: "คงน้อย", position: "ตำเเหน่ง1", - level: "level1", - degree: "ป.ตรี", - oc: "สำนักงาน 1", + positionLevel: "level1", + salary: "100", + organization: "สำนักงาน 1", fullName: "นางศิรินภา คงน้อย", }, { id: "002", - cardId: "0000000000002", + idcard: "0000000000002", prefix: "นาย", firstName: "แก้ว", lastName: "คำ", position: "ตำแหน่ง2", - level: "level2", - degree: "ป.โท", - oc: "สำนักงาน 2", + positionLevel: "level2", + salary: "100", + organization: "สำนักงาน 2", fullName: "นางแก้ว คำ", }, { id: "003", - cardId: "0000000000003", + idcard: "0000000000003", prefix: "นาย", firstName: "ภัทรานุย", lastName: "คงนอย", position: "ตำแหน่ง2", - level: "level3", - degree: "ป.เอก", - oc: "สำนักงาน 3", + positionLevel: "level3", + salary: "100", + organization: "สำนักงาน 3", fullName: "นางภัทรานุย คงนอย", }, ]; @@ -336,6 +356,9 @@ onMounted(() => {
{{ props.rowIndex + 1 }}
+
+ {{ props.prefix }} +
{{ col.value }}
diff --git a/src/modules/11_discipline/components/1_Complaint/EditPage.vue b/src/modules/11_discipline/components/1_Complaint/EditPage.vue index 4429996c0..c5c6a8cdf 100644 --- a/src/modules/11_discipline/components/1_Complaint/EditPage.vue +++ b/src/modules/11_discipline/components/1_Complaint/EditPage.vue @@ -22,7 +22,7 @@ const personOj = reactive({ name: "", position: "", positionLevel: "", - educationQualification: "", + salary: "", organization: "", }); const data = reactive({ @@ -68,7 +68,7 @@ const fetchData = async () => { name: "นางศิรินภา คงน้อย", position: "ธุรการ", positionLevel: "ต้น", - educationQualification: "ปริญญาตรี", + salary: "10000", organization: "สกจ.", }, ] diff --git a/src/modules/11_discipline/components/1_Complaint/Form.vue b/src/modules/11_discipline/components/1_Complaint/Form.vue index ba17e28e0..407a9c3d6 100644 --- a/src/modules/11_discipline/components/1_Complaint/Form.vue +++ b/src/modules/11_discipline/components/1_Complaint/Form.vue @@ -62,7 +62,7 @@ const personOj = reactive({ name: "", position: "", positionLevel: "", - educationQualification: "", + salary: "", organization: "", }); @@ -173,18 +173,18 @@ const columns = ref([ style: "font-size: 14px", }, { - name: "educationQualification", + name: "salary", align: "left", - label: "วุฒิการศึกษา", + label: "เงินเดือน", sortable: true, - field: "educationQualification", + field: "salary", headerStyle: "font-size: 14px", style: "font-size: 14px", }, { name: "organization", align: "left", - label: "สังกัด", + label: "หน่วยงาน", sortable: true, field: "organization", headerStyle: "font-size: 14px", @@ -199,7 +199,7 @@ const visibleColumns = ref([ "name", "position", "positionLevel", - "educationQualification", + "salary", "organization", ]); @@ -315,7 +315,7 @@ async function addPerson() { name: "นางศิรินภา คงน้อย", position: "ตำเเหน่ง1", positionLevel: "level1", - educationQualification: "ป.ตรี", + salary: "10000", organization: "สำนักงาน 1", }, { @@ -324,7 +324,7 @@ async function addPerson() { name: "นายแก้ว คำ", position: "ตำแหน่ง2", positionLevel: "level2", - educationQualification: "ป.โท", + salary: "1000", organization: "สำนักงาน 2", }, { @@ -333,7 +333,7 @@ async function addPerson() { name: "นายภัทรานุย คงนอย", position: "ตำแหน่ง2", positionLevel: "level3", - educationQualification: "ป.เอก", + salary: "100", organization: "สำนักงาน 3", }, ]; @@ -482,75 +482,81 @@ onMounted(() => { - -
-
- - + +
- -
เพิ่ม
- - -
-
- - - - -
+ ผู้ถูกร้องเรียน + + เพิ่มผู้ถูกร้องเรียน + +
+
+
+ + + + +
+
-
{
+ + diff --git a/src/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue b/src/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue index eab23641e..c5d9b55d5 100644 --- a/src/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue +++ b/src/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue @@ -88,6 +88,7 @@ const formData = reactive({ recordAccuser: "", witnesses: "", InvestResults: "", + complaintStatus:"", filesEvidence: null, filesRecordAccuser: null, filesWitnesses: null, diff --git a/src/modules/11_discipline/interface/request/complaint.ts b/src/modules/11_discipline/interface/request/complaint.ts index 2cdab8c2f..ee3b95889 100644 --- a/src/modules/11_discipline/interface/request/complaint.ts +++ b/src/modules/11_discipline/interface/request/complaint.ts @@ -14,9 +14,9 @@ interface FormData { documentFile: any | null complaintStatus: string persons: ArrayPerson[] - personId: Array + personId: any organizationId:string|null - respondentId:Array + respondentId:any } interface ArrayPerson { @@ -24,7 +24,7 @@ interface ArrayPerson { name: string, position: string, positionLevel: string, - educationQualification: string, + salary: string, organization: string, } interface MyObjectComplaintsRef { @@ -50,7 +50,7 @@ interface DataAddRequest { name: string position: string positionLevel: string - educationQualification: string + salary: string organization: string } export type { diff --git a/src/modules/11_discipline/interface/response/complaint.ts b/src/modules/11_discipline/interface/response/complaint.ts index 6d8e932d7..5a81bbda8 100644 --- a/src/modules/11_discipline/interface/response/complaint.ts +++ b/src/modules/11_discipline/interface/response/complaint.ts @@ -15,7 +15,7 @@ interface DataAdd { name:string position:string positionLevel:string - educationQualification:string + salary:string organization:string } interface DataAddResponse { @@ -24,7 +24,7 @@ interface DataAddResponse { name:string position:string positionLevel:string - educationQualification:string + salary:string organization:string } interface DataList { diff --git a/src/modules/11_discipline/store/ComplaintsStore.ts b/src/modules/11_discipline/store/ComplaintsStore.ts index 588dee574..9fc3f98bc 100644 --- a/src/modules/11_discipline/store/ComplaintsStore.ts +++ b/src/modules/11_discipline/store/ComplaintsStore.ts @@ -24,18 +24,24 @@ export const useComplainstDataStore = defineStore("DisciplineComplainst", () => const columns = ref([]); function fetchComplainstAdd(data: DataAddResponse[]) { + console.log(data) let datalist = data.map((e: DataAddResponse) => ({ id: e.id, idcard: e.idcard, name: e.name, position: e.position, positionLevel: e.positionLevel, - educationQualification: e.educationQualification, + salary: addCommas(e.salary), organization: e.organization, })) rowsAdd.value = datalist } + function addCommas(salaryString: string): string { + const salaryNumber = parseFloat(salaryString.replace(/,/g, '')); + return salaryNumber.toLocaleString(); + } + function fetchComplainst(data: DataList[]) { let datalist: DataListRow[] = data.map((e: DataList) => ({ id: e.id,