From e7b132d1ae7f5d36018dc032a3af86706ff968c6 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 19 Mar 2025 11:40:03 +0700 Subject: [PATCH 1/5] fix --- .../components/DialogAddPosition.vue | 26 +++++++------- .../components/DialogFormPosition.vue | 18 +++++----- .../components/DialogHistoryPos.vue | 8 ++--- .../components/DialogPositionDetail.vue | 10 +++--- .../components/DialogSelectPerson.vue | 26 +++++++------- .../components/DialogSuccession.vue | 2 +- .../02_organization/components/TableMain.vue | 4 +-- .../interface/response/organizational.ts | 34 +++++++++---------- src/modules/17_acting/views/main.vue | 2 +- src/modules/19_condition/view/Main.vue | 2 +- 10 files changed, 66 insertions(+), 66 deletions(-) diff --git a/src/modules/02_organization/components/DialogAddPosition.vue b/src/modules/02_organization/components/DialogAddPosition.vue index 4d49b690b..60af47d2b 100644 --- a/src/modules/02_organization/components/DialogAddPosition.vue +++ b/src/modules/02_organization/components/DialogAddPosition.vue @@ -48,16 +48,16 @@ const props = defineProps({ const isReadonly = ref(false); // อ่านได้อย่างเดียว -const dataLevel = ref([]); // ข้อมูลประเภทตำแหน่ง +const dataLevel = ref([]); // ข้อมูลตำแหน่งประเภท const posExecutive = ref(""); // ชื่อตำแหน่งทางการบริหาร const isSpecial = ref(false); // เฉพาะสายงานที่กำหนด const shape = ref("false"); // ตำแหน่งทางการบริหาร const isDisValidate = ref(false); -const typeOpsMain = ref([]); //ตัวเลือกประเภทตำแหน่ง +const typeOpsMain = ref([]); //ตัวเลือกตำแหน่งประเภท const levelOpsMain = ref([]); //ตัวเลือกระดับตำแหน่ง const executiveOpsMain = ref([]); //ตัวเลือกรายการตำแหน่งทางการบริหาร -const typeOps = ref([]); //ตัวเลือกประเภทตำแหน่ง +const typeOps = ref([]); //ตัวเลือกตำแหน่งประเภท const levelOps = ref([]); //ตัวเลือกระดับตำแหน่ง const executiveOps = ref([]); //ตัวเลือกรายการตำแหน่งทางการบริหาร const shapeOp = ref([ @@ -118,7 +118,7 @@ function saveSelectEdit() { ? { posDictName: formPositionSelect.positionName, posDictField: formPositionSelect.positionField, //สายงาน - posTypeId: formPositionSelect.positionType, //*ประเภทตำแหน่ง + posTypeId: formPositionSelect.positionType, //*ตำแหน่งประเภท posLevelId: formPositionSelect.positionLevel, //*ระดับตำแหน่ง posExecutiveId: dataExecutive ?? "", //ตำแหน่งทางการบริหาร posDictExecutiveField: @@ -129,7 +129,7 @@ function saveSelectEdit() { : { posDictName: formPositionSelect.positionName, posDictField: formPositionSelect.positionField, //สายงาน - posTypeId: formPositionSelect.positionType, //*ประเภทตำแหน่ง + posTypeId: formPositionSelect.positionType, //*ตำแหน่งประเภท posLevelId: formPositionSelect.positionLevel, //*ระดับตำแหน่ง posExecutive: dataExecutive ?? "", //ตำแหน่งทางการบริหาร posDictExecutiveField: formPositionSelect.positionExecutiveField, //ด้านทางการบริหาร @@ -176,7 +176,7 @@ function onSubmitSelectEdit() { ? { posDictName: formPositionSelect.positionName, posDictField: formPositionSelect.positionField, //สายงาน - posTypeId: formPositionSelect.positionType, //*ประเภทตำแหน่ง + posTypeId: formPositionSelect.positionType, //*ตำแหน่งประเภท posLevelId: formPositionSelect.positionLevel, //*ระดับตำแหน่ง posExecutiveId: dataExecutive ?? "", //ตำแหน่งทางการบริหาร posDictExecutiveField: formPositionSelect.positionExecutiveField, //ด้านทางการบริหาร @@ -186,7 +186,7 @@ function onSubmitSelectEdit() { : { posDictName: formPositionSelect.positionName, posDictField: formPositionSelect.positionField, //สายงาน - posTypeId: formPositionSelect.positionType, //*ประเภทตำแหน่ง + posTypeId: formPositionSelect.positionType, //*ตำแหน่งประเภท posLevelId: formPositionSelect.positionLevel, //*ระดับตำแหน่ง posExecutive: dataExecutive ?? "", //ตำแหน่งทางการบริหาร posDictExecutiveField: formPositionSelect.positionExecutiveField, //ด้านทางการบริหาร @@ -241,7 +241,7 @@ async function clearFormPositionSelect() { } /** - * ฟังก์เรียกข้อมูลรายการประเภทตำแหน่ง + * ฟังก์เรียกข้อมูลรายการตำแหน่งประเภท */ async function fetchType() { await http @@ -260,8 +260,8 @@ async function fetchType() { } /** - * ฟังก์ชันกำหนดตัวเลือกประเภทตำแหน่งตาม id ประเภทตำแหน่ง - * @param val id ประเภทตำแหน่ง + * ฟังก์ชันกำหนดตัวเลือกตำแหน่งประเภทตาม id ตำแหน่งประเภท + * @param val id ตำแหน่งประเภท */ async function updateSelectType(val: string) { // หาระดับตำแหน่ง @@ -320,7 +320,7 @@ function inputEdit(val: boolean) { /** * ดูการเปลี่ยนแปลงของ modal.value * - * ถ้าเป็น true ทำการเรียกข้อมูลรายการประเภทตำแหน่ง และ ข้อมูลรายการตำแหน่งทางการบริหาร + * ถ้าเป็น true ทำการเรียกข้อมูลรายการตำแหน่งประเภท และ ข้อมูลรายการตำแหน่งทางการบริหาร * และถ้ามี props.data จะกำหนด formPositionSelect เป็นตาม props.data */ watch( @@ -418,7 +418,7 @@ watch( diff --git a/src/modules/02_organization/components/DialogFormPosition.vue b/src/modules/02_organization/components/DialogFormPosition.vue index 3f410caf7..5786aed69 100644 --- a/src/modules/02_organization/components/DialogFormPosition.vue +++ b/src/modules/02_organization/components/DialogFormPosition.vue @@ -69,7 +69,7 @@ const type = ref("positionName"); //ประเภทค้นหา const optionFilter = ref([ { id: "positionName", name: "ตำแหน่งในสายงาน" }, { id: "positionField", name: "สายงาน" }, - { id: "positionType", name: "ประเภทตำแหน่ง" }, + { id: "positionType", name: "ตำแหน่งประเภท" }, { id: "positionLevel", name: "ระดับตำแหน่ง" }, { id: "positionExecutive", name: "ตำแหน่งทางการบริหาร" }, { id: "positionExecutiveField", name: "ด้านทางการบริหาร" }, @@ -252,7 +252,7 @@ function onSubmit() { const positionsData = rows.value.map((e: RowDetailPositions) => ({ posDictName: e.positionName, //ชื่อตำแหน่งในสายงาน (ชื่อตำแหน่ง) posDictField: e.positionField, //สายงาน - posTypeId: e.posTypeId, //*ประเภทตำแหน่ง + posTypeId: e.posTypeId, //*ตำแหน่งประเภท posLevelId: e.posLevelId, //*ระดับตำแหน่ง posExecutiveId: e.posExecutiveId ? e.posExecutiveId : "", //ตำแหน่งทางการบริหาร posDictExecutiveField: e.positionExecutiveField, //ด้านทางการบริหาร @@ -261,10 +261,10 @@ function onSubmit() { positionIsSelected: e.positionIsSelected, })); const body = { - posMasterNoPrefix: formData.prefixNo, //*Prefix นำหน้าตำแหน่งเลขที่ เป็น Optional (ไม่ใช่อักษรย่อของหน่วยงาน/ส่วนราชการ) - posMasterNo: Number(formData.positionNo), //*ตำแหน่งเลขที่ เป็นตัวเลข - posMasterNoSuffix: formData.suffixNo, //Suffix หลังตำแหน่งเลขที่ เช่น ช. - reason: formData.reason, //Suffix หลังตำแหน่งเลขที่ เช่น ช. + posMasterNoPrefix: formData.prefixNo, //*Prefix นำหน้าเลขที่ตำแหน่ง เป็น Optional (ไม่ใช่อักษรย่อของหน่วยงาน/ส่วนราชการ) + posMasterNo: Number(formData.positionNo), //*เลขที่ตำแหน่ง เป็นตัวเลข + posMasterNoSuffix: formData.suffixNo, //Suffix หลังเลขที่ตำแหน่ง เช่น ช. + reason: formData.reason, //Suffix หลังเลขที่ตำแหน่ง เช่น ช. isDirector: formData.isDirector, // isStaff: formData.isStaff ? formData.isStaff : false, isStaff: false, @@ -554,11 +554,11 @@ watch( dense outlined for="#positionNo" - label="ตำแหน่งเลขที่" + label="เลขที่ตำแหน่ง" lazy-rules hide-bottom-space :rules="[ - (val:string) => !!val || `${'กรุณากรอกตำแหน่งเลขที่'}`, + (val:string) => !!val || `${'กรุณากรอกเลขที่ตำแหน่ง'}`, ]" mask="########################" /> @@ -570,7 +570,7 @@ watch( dense outlined for="#suffixNo" - label="Suffix ตำแหน่งเลขที่" + label="Suffix เลขที่ตำแหน่ง" /> diff --git a/src/modules/02_organization/components/DialogHistoryPos.vue b/src/modules/02_organization/components/DialogHistoryPos.vue index b0fb0fc32..f6b5164fe 100644 --- a/src/modules/02_organization/components/DialogHistoryPos.vue +++ b/src/modules/02_organization/components/DialogHistoryPos.vue @@ -72,7 +72,7 @@ const columns = ref([ { name: "posMasterNoPrefix", align: "left", - label: " Prefix ตำแหน่งเลขที่", + label: " Prefix เลขที่ตำแหน่ง", sortable: true, field: "posMasterNoPrefix", headerStyle: "font-size: 14px", @@ -83,7 +83,7 @@ const columns = ref([ { name: "posMasterNo", align: "left", - label: "ตำแหน่งเลขที่", + label: "เลขที่ตำแหน่ง", sortable: true, field: "posMasterNo", headerStyle: "font-size: 14px", @@ -96,7 +96,7 @@ const columns = ref([ { name: "posMasterNoSuffix", align: "left", - label: "Suffix ตำแหน่งเลขที่", + label: "Suffix เลขที่ตำแหน่ง", sortable: true, field: "posMasterNoSuffix", headerStyle: "font-size: 14px", @@ -118,7 +118,7 @@ const columns = ref([ { name: "posType", align: "left", - label: "ประเภทตำแหน่ง", + label: "ตำแหน่งประเภท", sortable: true, field: "posType", format(val, row) { diff --git a/src/modules/02_organization/components/DialogPositionDetail.vue b/src/modules/02_organization/components/DialogPositionDetail.vue index 38c3e3ad5..cba05d340 100644 --- a/src/modules/02_organization/components/DialogPositionDetail.vue +++ b/src/modules/02_organization/components/DialogPositionDetail.vue @@ -30,8 +30,8 @@ const prosp = defineProps({ /** formData*/ const formData = reactive({ - positionNo: "", //*ตำแหน่งเลขที่ - positionType: "", //*ประเภทตำแหน่ง + positionNo: "", //*เลขที่ตำแหน่ง + positionType: "", //*ตำแหน่งประเภท positionPathSide: "", //*ตำแหน่งในสายงาน positionLine: "", //*สายงาน positionSide: "", //*ด้าน/สาขา @@ -49,7 +49,7 @@ function close() { } /** - * callblack function ทำเมื่อเปิด popup set ตำแหน่งเลขที่ และสถานะตำแหน่ง + * callblack function ทำเมื่อเปิด popup set เลขที่ตำแหน่ง และสถานะตำแหน่ง */ watch( () => modal.value, @@ -93,7 +93,7 @@ watch(
-

ตำแหน่งเลขที่

+

เลขที่ตำแหน่ง

@@ -103,7 +103,7 @@ watch(
-

ประเภทตำแหน่ง

+

ตำแหน่งประเภท

diff --git a/src/modules/02_organization/components/DialogSelectPerson.vue b/src/modules/02_organization/components/DialogSelectPerson.vue index a7ddaf8d1..8c08e7def 100644 --- a/src/modules/02_organization/components/DialogSelectPerson.vue +++ b/src/modules/02_organization/components/DialogSelectPerson.vue @@ -67,20 +67,20 @@ const props = defineProps({ }); const isReadonly = ref(false); // อ่านได้อย่างเดียว -const typeOpsMain = ref([]); //ข้อมูลประเภทตำแหน่ง +const typeOpsMain = ref([]); //ข้อมูลตำแหน่งประเภท const levelOpsMain = ref([]); //ข้อมูลระดับตำแหน่ง -const typeOps = ref([]); //ตัวเลือกรายการประเภทตำแหน่ง +const typeOps = ref([]); //ตัวเลือกรายการตำแหน่งประเภท const levelOps = ref([]); //ตัวเลือกรายการระดับตำแหน่ง -const dataLevel = ref([]); //ข้อมูลประเภทตำแหน่ง +const dataLevel = ref([]); //ข้อมูลตำแหน่งประเภท const selected = ref([]); //เลือกตำแหน่ง const isSit = ref(false); //นั่งทับตำแหน่ง const formData = reactive({ - positionNo: "", //*ตำแหน่งเลขที่ - positionType: "", //*ตำแหน่งเลขที่ - positionLevel: "", //*ตำแหน่งเลขที่ - personal: "", //*ตำแหน่งเลขที่ - position: "", //*ตำแหน่งเลขที่ + positionNo: "", //*เลขที่ตำแหน่ง + positionType: "", //*เลขที่ตำแหน่ง + positionLevel: "", //*เลขที่ตำแหน่ง + personal: "", //*เลขที่ตำแหน่ง + position: "", //*เลขที่ตำแหน่ง status: "", }); @@ -228,7 +228,7 @@ const columnsResult = ref([ ]); /** - * function เรียกข้อมูลประเภทตำแหน่ง + * function เรียกข้อมูลตำแหน่งประเภท */ function fetchType() { showLoader(); @@ -321,7 +321,7 @@ const selectedProfile = ref([]); function searchData() { showLoader(); const reqBody = { - posTypeId: formData.positionType, // id ประเภทตำแหน่ง + posTypeId: formData.positionType, // id ตำแหน่งประเภท posLevelId: formData.positionLevel, // id ระดับตำแหน่ง position: formData.position, // ตำแหน่ง page: page.value, //*หน้า @@ -375,7 +375,7 @@ function clearForm() { } /** - * function เคลียร์ประเภทตำแหน่งและระดับตำแหน่ง + * function เคลียร์ตำแหน่งประเภทและระดับตำแหน่ง */ function clearPosition() { formData.positionType = ""; @@ -457,7 +457,7 @@ watch(
-

ตำแหน่งเลขที่

+

เลขที่ตำแหน่ง

{{ formData.positionNo }}

@@ -582,7 +582,7 @@ watch( ([ { name: "posMasterNo", align: "left", - label: "ตำแหน่งเลขที่", + label: "เลขที่ตำแหน่ง", sortable: true, field: "posMasterNo", headerStyle: "font-size: 14px", diff --git a/src/modules/02_organization/components/TableMain.vue b/src/modules/02_organization/components/TableMain.vue index c930ad715..e45caf7bb 100644 --- a/src/modules/02_organization/components/TableMain.vue +++ b/src/modules/02_organization/components/TableMain.vue @@ -156,7 +156,7 @@ const columns = ref([ { name: "posMasterNo", align: "left", - label: "ตำแหน่งเลขที่", + label: "เลขที่ตำแหน่ง", sortable: false, field: "posMasterNo", headerStyle: "font-size: 14px", @@ -174,7 +174,7 @@ const columns = ref([ { name: "posTypeName", align: "left", - label: "ประเภทตำแหน่ง", + label: "ตำแหน่งประเภท", sortable: false, field: "posTypeName", headerStyle: "font-size: 14px", diff --git a/src/modules/02_organization/interface/response/organizational.ts b/src/modules/02_organization/interface/response/organizational.ts index a8fbe6d01..dbcfe9d8e 100644 --- a/src/modules/02_organization/interface/response/organizational.ts +++ b/src/modules/02_organization/interface/response/organizational.ts @@ -81,8 +81,8 @@ interface Position { id: string; // id ตำแหน่ง positionName: string; // ชื่อตำแหน่งในสายงาน (ชื่อตำแหน่ง) positionField: string; // สายงาน - posTypeId: string; // ประเภทตำแหน่ง - posTypeName: string; // ประเภทตำแหน่ง + posTypeId: string; // ตำแหน่งประเภท + posTypeName: string; // ตำแหน่งประเภท posLevelId: string; // ระดับตำแหน่ง posLevelName: string; // ระดับตำแหน่ง posExecutiveId: string; // ตำแหน่งทางการบริหาร @@ -95,13 +95,13 @@ interface Position { interface PosMaster { id: string; // id อัตรากำลัง posmaster orgShortname: string; // อักษรย่อตำแหน่ง - posMasterNoPrefix: string; // Prefix นำหน้าตำแหน่งเลขที่ เป็น Optional (ไม่ใช่อักษรย่อของหน่วยงาน/ส่วนราชการ) - posMasterNo: number | string; // ตำแหน่งเลขที่ เป็นตัวเลข - posMasterNoSuffix: string | null; // Suffix หลังตำแหน่งเลขที่ เช่น ช. + posMasterNoPrefix: string; // Prefix นำหน้าเลขที่ตำแหน่ง เป็น Optional (ไม่ใช่อักษรย่อของหน่วยงาน/ส่วนราชการ) + posMasterNo: number | string; // เลขที่ตำแหน่ง เป็นตัวเลข + posMasterNoSuffix: string | null; // Suffix หลังเลขที่ตำแหน่ง เช่น ช. positionName: string; // ชื่อตำแหน่งในสายงาน (ชื่อตำแหน่ง) positionField: string; // สายงาน - posTypeId: string; // ประเภทตำแหน่ง - posTypeName: string; // ประเภทตำแหน่ง + posTypeId: string; // ตำแหน่งประเภท + posTypeName: string; // ตำแหน่งประเภท posLevelId: string; // ระดับตำแหน่ง posLevelName: string; // ระดับตำแหน่ง posExecutiveId: string; // ตำแหน่งทางการบริหาร @@ -124,8 +124,8 @@ interface Position2 { id: string; // id ตำแหน่ง positionName: string; // ชื่อตำแหน่งในสายงาน (ชื่อตำแหน่ง) positionField: string; // สายงาน - posTypeId: string; // ประเภทตำแหน่ง - posTypeName: string; // ประเภทตำแหน่ง + posTypeId: string; // ตำแหน่งประเภท + posTypeName: string; // ตำแหน่งประเภท posLevelId: string; // ระดับตำแหน่ง posLevelName: string; // ระดับตำแหน่ง posExecutiveId: string; // ตำแหน่งทางการบริหาร @@ -138,13 +138,13 @@ interface Position2 { interface PosMaster2 { id: string; // id อัตรากำลัง posmaster orgShortname: string; // อักษรย่อตำแหน่ง - posMasterNoPrefix: string; // Prefix นำหน้าตำแหน่งเลขที่ เป็น Optional (ไม่ใช่อักษรย่อของหน่วยงาน/ส่วนราชการ) - posMasterNo: number | string; // ตำแหน่งเลขที่ เป็นตัวเลข - posMasterNoSuffix: string | null; // Suffix หลังตำแหน่งเลขที่ เช่น ช. + posMasterNoPrefix: string; // Prefix นำหน้าเลขที่ตำแหน่ง เป็น Optional (ไม่ใช่อักษรย่อของหน่วยงาน/ส่วนราชการ) + posMasterNo: number | string; // เลขที่ตำแหน่ง เป็นตัวเลข + posMasterNoSuffix: string | null; // Suffix หลังเลขที่ตำแหน่ง เช่น ช. positionName: string; // ชื่อตำแหน่งในสายงาน (ชื่อตำแหน่ง) positionField: string; // สายงาน - posTypeId: string; // ประเภทตำแหน่ง - posTypeName: string; // ประเภทตำแหน่ง + posTypeId: string; // ตำแหน่งประเภท + posTypeName: string; // ตำแหน่งประเภท posLevelId: string; // ระดับตำแหน่ง posLevelName: string; // ระดับตำแหน่ง posExecutiveId: string; // ตำแหน่งทางการบริหาร @@ -165,9 +165,9 @@ interface HistoryPos { id: string; //id node orgShotName: string; //ชื่อย่อส่วนราชการ lastUpdatedAt: Date; //วันที่แก้ไข - posMasterNoPrefix: string; //Prefix นำหน้าตำแหน่งเลขที่ เป็น Optional (ไม่ใช่อักษรย่อของหน่วยงาน/ส่วนราชการ) - posMasterNo: number; //ตำแหน่งเลขที่ เป็นตัวเลข - posMasterNoSuffix: string; //Suffix หลังตำแหน่งเลขที่ เช่น ช. + posMasterNoPrefix: string; //Prefix นำหน้าเลขที่ตำแหน่ง เป็น Optional (ไม่ใช่อักษรย่อของหน่วยงาน/ส่วนราชการ) + posMasterNo: number; //เลขที่ตำแหน่ง เป็นตัวเลข + posMasterNoSuffix: string; //Suffix หลังเลขที่ตำแหน่ง เช่น ช. } interface SelectPerson { diff --git a/src/modules/17_acting/views/main.vue b/src/modules/17_acting/views/main.vue index 1fca0f075..a04bac858 100644 --- a/src/modules/17_acting/views/main.vue +++ b/src/modules/17_acting/views/main.vue @@ -118,7 +118,7 @@ const columns = ref([ { name: "posNo", align: "left", - label: "ตำแหน่งเลขที่", + label: "เลขที่ตำแหน่ง", sortable: false, field: "posNo", headerStyle: "font-size: 14px", diff --git a/src/modules/19_condition/view/Main.vue b/src/modules/19_condition/view/Main.vue index 2e78af69c..097a510f5 100644 --- a/src/modules/19_condition/view/Main.vue +++ b/src/modules/19_condition/view/Main.vue @@ -83,7 +83,7 @@ const columns = ref([ { name: "profilePostype", align: "left", - label: "ประเภทตำแหน่ง", + label: "ตำแหน่งประเภท", sortable: false, field: "profilePostype", headerStyle: "font-size: 14px", From 98acdd66bf8cde11fd58039a0d0b28237e886e2d Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Wed, 19 Mar 2025 12:10:31 +0700 Subject: [PATCH 2/5] =?UTF-8?q?add=20=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=E0=B8=97=E0=B8=B0=E0=B9=80=E0=B8=9A=E0=B8=B5=E0=B8=A2?= =?UTF-8?q?=E0=B8=99=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7=E0=B8=B1=E0=B8=95?= =?UTF-8?q?=E0=B8=B4=20=E0=B8=95=E0=B8=B3=E0=B9=81=E0=B8=AB=E0=B8=99?= =?UTF-8?q?=E0=B9=88=E0=B8=87/=E0=B9=80=E0=B8=87=E0=B8=B4=E0=B8=99?= =?UTF-8?q?=E0=B9=80=E0=B8=94=E0=B8=B7=E0=B8=AD=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/04_registryPerson/router.ts | 15 +++++++ .../04_registryPerson/views/edit/list.vue | 44 +++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 src/modules/04_registryPerson/views/edit/list.vue diff --git a/src/modules/04_registryPerson/router.ts b/src/modules/04_registryPerson/router.ts index 1e4dddb10..75e391894 100644 --- a/src/modules/04_registryPerson/router.ts +++ b/src/modules/04_registryPerson/router.ts @@ -17,6 +17,10 @@ const Page01_Detail = () => "@/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue" ); +// edit +const EditListPage = () => + import("@/modules/04_registryPerson/views/edit/list.vue"); + export default [ { path: "/registry-officer", @@ -120,4 +124,15 @@ export default [ Role: "STAFF", }, }, + // edit registry + { + path: "/registry/edit/list", + name: "registryEdit", + component: EditListPage, + meta: { + Auth: true, + Key: "SYS_REGISTRY_EDIT", + Role: "STAFF", + }, + }, ]; diff --git a/src/modules/04_registryPerson/views/edit/list.vue b/src/modules/04_registryPerson/views/edit/list.vue new file mode 100644 index 000000000..e0b2d52a9 --- /dev/null +++ b/src/modules/04_registryPerson/views/edit/list.vue @@ -0,0 +1,44 @@ + + + + + From ced0326a49973d41960eb360698b1ff491e6b4d8 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Wed, 19 Mar 2025 12:34:49 +0700 Subject: [PATCH 3/5] updated --- src/modules/04_registryPerson/router.ts | 12 +++++ .../04_registryPerson/views/edit/salary.vue | 44 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 src/modules/04_registryPerson/views/edit/salary.vue diff --git a/src/modules/04_registryPerson/router.ts b/src/modules/04_registryPerson/router.ts index 75e391894..a509ac585 100644 --- a/src/modules/04_registryPerson/router.ts +++ b/src/modules/04_registryPerson/router.ts @@ -20,6 +20,8 @@ const Page01_Detail = () => // edit const EditListPage = () => import("@/modules/04_registryPerson/views/edit/list.vue"); +const EditListSalaryPage = () => + import("@/modules/04_registryPerson/views/edit/salary.vue"); export default [ { @@ -135,4 +137,14 @@ export default [ Role: "STAFF", }, }, + { + path: "/registry/edit/salary/:id", + name: "registryEditSalary", + component: EditListSalaryPage, + meta: { + Auth: true, + Key: "SYS_REGISTRY_EDIT", + Role: "STAFF", + }, + }, ]; diff --git a/src/modules/04_registryPerson/views/edit/salary.vue b/src/modules/04_registryPerson/views/edit/salary.vue new file mode 100644 index 000000000..a5207b19d --- /dev/null +++ b/src/modules/04_registryPerson/views/edit/salary.vue @@ -0,0 +1,44 @@ + + + + + From 603ba96ff1e4385febffbd1ed021cf7852fc0881 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 19 Mar 2025 15:21:31 +0700 Subject: [PATCH 4/5] fix position --- .../GovernmentInformation/07_Position.vue | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/src/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue b/src/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue index d6befdc8e..5c29f55ca 100644 --- a/src/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue +++ b/src/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue @@ -298,12 +298,23 @@ const modalCommand = ref(false); const command = ref(""); const commandId = ref(""); -const columns = ref( - baseColumns.value.filter( +const columns = computed(() => { + if (empType.value === "-employee") { + if (baseColumns.value) { + return baseColumns.value.filter( + (column) => + column.name !== "positionExecutive" && + column.name !== "lastUpdateFullName" && + column.name !== "lastUpdatedAt" + ); + } + } + return baseColumns.value.filter( (e: QTableColumn) => e.name !== "lastUpdateFullName" && e.name !== "lastUpdatedAt" - ) -); + ); +}); + const visibleColumns = ref( baseVisibleColumns.value.filter( (e: string) => e !== "lastUpdateFullName" && e !== "lastUpdatedAt" @@ -339,7 +350,16 @@ const formData = reactive({ remark: "", //หมายเหตุ }); -const columnsHistory = ref(baseColumns.value); +const columnsHistory = computed(() => { + if (empType.value === "-employee") { + if (baseColumns.value) { + return baseColumns.value.filter( + (column) => column.name !== "positionExecutive" + ); + } + } + return baseColumns.value; +}); const visibleColumnsHistory = ref(baseVisibleColumns.value); const modalDialogSalary = ref(false); //แสดง popup ตำแหน่งเงินเดือน From 66b90d37efefb4d1716a48c041ab998964b1ad26 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 19 Mar 2025 17:30:14 +0700 Subject: [PATCH 5/5] fix position salary --- .../GovernmentInformation/07_Position.vue | 83 ++++++----- .../detail/Salary/01_PositionSalary.vue | 137 +++++++++--------- 2 files changed, 108 insertions(+), 112 deletions(-) diff --git a/src/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue b/src/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue index 5c29f55ca..7c1839ffd 100644 --- a/src/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue +++ b/src/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue @@ -71,10 +71,24 @@ const baseColumns = ref([ .toString() .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, + { + name: "commandDateSign", + align: "left", + label: "วันที่ลงนาม", + sortable: true, + field: "commandDateSign", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (v) => date2Thai(v), + sort: (a: string, b: string) => + a + .toString() + .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, { name: "posNo", align: "left", - label: empType.value === "" ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่", + label: empType.value === "-employee" ? "ตำแหน่งเลขที่" : "เลขที่ตำแหน่ง", sortable: true, field: "posNo", headerStyle: "font-size: 14px", @@ -107,7 +121,7 @@ const baseColumns = ref([ { name: "positionType", align: "left", - label: empType.value === "-employee" ? "กลุ่มงาน" : "ประเภทตำแหน่ง", + label: empType.value === "-employee" ? "กลุ่มงาน" : "ตำแหน่งประเภท", sortable: true, field: "positionType", headerStyle: "font-size: 14px", @@ -148,28 +162,6 @@ const baseColumns = ref([ sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, - { - name: "amount", - align: "left", - label: empType.value === "-employee" ? "ค่าจ้าง" : "เงินเดือน", - sortable: true, - field: "amount", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - format(v, row) { - return row.amount - ? `${row.amount.toLocaleString()}${ - row.amountSpecial !== 0 && row.amountSpecial - ? ` (${row.amountSpecial.toLocaleString()})` - : "" - }` - : "-"; - }, - sort: (a: string, b: string) => - a - .toString() - .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, { name: "commandNo", align: "left", @@ -194,26 +186,9 @@ const baseColumns = ref([ field: "commandCode", headerStyle: "font-size: 14px", style: "font-size: 14px", - format(val, row) { - return store.convertCommandCodeName(val); - }, sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, - { - name: "commandDateSign", - align: "left", - label: "วันที่ลงนาม", - sortable: true, - field: "commandDateSign", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - format: (v) => date2Thai(v), - sort: (a: string, b: string) => - a - .toString() - .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, { name: "organization", align: "left", @@ -234,6 +209,28 @@ const baseColumns = ref([ sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, + { + name: "amount", + align: "left", + label: empType.value === "-employee" ? "ค่าจ้าง" : "เงินเดือน", + sortable: true, + field: "amount", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format(v, row) { + return row.amount + ? `${row.amount.toLocaleString()}${ + row.amountSpecial !== 0 && row.amountSpecial + ? ` (${row.amountSpecial.toLocaleString()})` + : "" + }` + : "-"; + }, + sort: (a: string, b: string) => + a + .toString() + .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, { name: "remark", align: "left", @@ -243,7 +240,9 @@ const baseColumns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + a + .toString() + .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { name: "lastUpdateFullName", diff --git a/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue b/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue index c8cd9b208..ee942abfc 100644 --- a/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue +++ b/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue @@ -76,10 +76,24 @@ const baseColumns = ref([ .toString() .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, + { + name: "commandDateSign", + align: "left", + label: "วันที่ลงนาม", + sortable: true, + field: "commandDateSign", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (v) => date2Thai(v), + sort: (a: string, b: string) => + a + .toString() + .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, { name: "posNo", align: "left", - label: empType.value === "" ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่", + label: empType.value === "-employee" ? "ตำแหน่งเลขที่" : "เลขที่ตำแหน่ง", sortable: true, field: "posNo", headerStyle: "font-size: 14px", @@ -112,7 +126,7 @@ const baseColumns = ref([ { name: "positionType", align: "left", - label: empType.value === "-employee" ? "กลุ่มงาน" : "ประเภทตำแหน่ง", + label: empType.value === "-employee" ? "กลุ่มงาน" : "ตำแหน่งประเภท", sortable: true, field: "positionType", headerStyle: "font-size: 14px", @@ -153,56 +167,6 @@ const baseColumns = ref([ sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, - { - name: "amount", - align: "left", - label: empType.value === "-employee" ? "ค่าจ้าง" : "เงินเดือน", - sortable: true, - field: "amount", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - format(v, row) { - return row.amount - ? `${row.amount.toLocaleString()}${ - row.amountSpecial !== 0 && row.amountSpecial - ? ` (${row.amountSpecial.toLocaleString()})` - : "" - }` - : "-"; - }, - sort: (a: string, b: string) => - a - .toString() - .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "positionSalaryAmount", - align: "left", - label: "เงินประจำตำแหน่ง", - sortable: true, - field: "positionSalaryAmount", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - format: (v) => Number(v).toLocaleString(), - sort: (a: string, b: string) => - a - .toString() - .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "mouthSalaryAmount", - align: "left", - label: "เงินค่าตอบแทนรายเดือน", - sortable: true, - field: "mouthSalaryAmount", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - format: (v) => Number(v).toLocaleString(), - sort: (a: string, b: string) => - a - .toString() - .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, { name: "commandNo", align: "left", @@ -227,27 +191,9 @@ const baseColumns = ref([ field: "commandCode", headerStyle: "font-size: 14px", style: "font-size: 14px", - format(val, row) { - return store.convertCommandCodeName(val); - }, - sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, - { - name: "commandDateSign", - align: "left", - label: "วันที่ลงนาม", - sortable: true, - field: "commandDateSign", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - format: (v) => date2Thai(v), - sort: (a: string, b: string) => - a - .toString() - .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, { name: "organization", align: "left", @@ -268,6 +214,57 @@ const baseColumns = ref([ sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, + { + name: "amount", + align: "left", + label: empType.value === "-employee" ? "ค่าจ้าง" : "เงินเดือน", + sortable: true, + field: "amount", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format(v, row) { + return row.amount + ? `${row.amount.toLocaleString()}${ + row.amountSpecial !== 0 && row.amountSpecial + ? ` (${row.amountSpecial.toLocaleString()})` + : "" + }` + : "-"; + }, + sort: (a: string, b: string) => + a + .toString() + .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "mouthSalaryAmount", + align: "left", + label: "เงินค่าตอบแทนรายเดือน", + sortable: true, + field: "mouthSalaryAmount", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (v) => Number(v).toLocaleString(), + sort: (a: string, b: string) => + a + .toString() + .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "positionSalaryAmount", + align: "left", + label: "เงินประจำตำแหน่ง", + sortable: true, + field: "positionSalaryAmount", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (v) => Number(v).toLocaleString(), + sort: (a: string, b: string) => + a + .toString() + .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { name: "remark", align: "left",