From a8920b4473d6ca5687b49b6a2d4bc5f298b452d6 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 10 Jun 2026 10:59:06 +0700 Subject: [PATCH 01/46] feat(changeName): change Rank --- .../02_NameChangeHistory.vue | 68 ++++++++++++++++++- .../interface/request/Main.ts | 1 + 2 files changed, 66 insertions(+), 3 deletions(-) diff --git a/src/modules/04_registryPerson/components/detail/PersonalInformation/02_NameChangeHistory.vue b/src/modules/04_registryPerson/components/detail/PersonalInformation/02_NameChangeHistory.vue index cbe7f361e..a4c9efd6b 100644 --- a/src/modules/04_registryPerson/components/detail/PersonalInformation/02_NameChangeHistory.vue +++ b/src/modules/04_registryPerson/components/detail/PersonalInformation/02_NameChangeHistory.vue @@ -59,6 +59,7 @@ const changeNameData = reactive({ profileId: profileId.value, prefixId: "", // id คำนำหน้า prefix: "", // คำนำหน้า + rank: "", // ยศ firstName: "", // ชื่อ lastName: "", // นามสกุล status: "", // สถานะ @@ -69,11 +70,13 @@ const selection = ref([]); // ตัวเลือก const prefixChange = ref(""); // เปลี่ยนคำนำหน้า const firstNameChange = ref(""); // เปลียนชื่อ const lastNameChange = ref(""); // เปลี่ยนนามสกุล +const rankChange = ref(""); // เปลี่ยนยศ const profileInfo = ref(); // ข้อมูล Profile const statusOption = ref([ "เปลี่ยนคำนำหน้าชื่อ", + "เปลี่ยนยศ", "เปลี่ยนชื่อ", "เปลี่ยนนามสกุล", "เปลี่ยนชื่อ-นามสกุล", @@ -84,6 +87,7 @@ const statusOption = ref([ const statusOptionFilter = ref([ "เปลี่ยนคำนำหน้าชื่อ", "เปลี่ยนชื่อ", + "เปลี่ยนยศ", "เปลี่ยนนามสกุล", "เปลี่ยนชื่อ-นามสกุล", "เปลี่ยนคำนำหน้าชื่อ และชื่อ", @@ -107,6 +111,17 @@ const columns = ref([ sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, + { + name: "rank", + align: "left", + label: "ยศ", + sortable: true, + field: "rank", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, { name: "firstName", align: "left", @@ -156,6 +171,7 @@ const columns = ref([ ]); const visibleColumns = ref([ "prefix", + "rank", "firstName", "lastName", "lastUpdateFullName", @@ -215,6 +231,7 @@ function onSubmit() { firstName: changeNameData.firstName, lastName: changeNameData.lastName, status: changeNameData.status, + rank: changeNameData.rank, documentId: changeNameData.documentId, }) .then(async (res) => { @@ -346,6 +363,14 @@ function filterSelector(val: string, update: Function, refData: string) { ); }); break; + + case "rankOps": + update(() => { + store.Ops.rankOps = store.OpsFilter.rankOps.filter( + (v: DataOption) => v.name.indexOf(val) > -1 + ); + }); + break; default: break; } @@ -390,12 +415,14 @@ watch( changeNameData.prefix, changeNameData.firstName, changeNameData.lastName, + changeNameData.rank, ], () => { submitDisable.value = changeNameData.prefix === prefixChange.value && changeNameData.firstName === firstNameChange.value && - changeNameData.lastName === lastNameChange.value; + changeNameData.lastName === lastNameChange.value && + changeNameData.rank === rankChange.value; } ); @@ -411,6 +438,9 @@ watch( if (!selection.value.includes("lastname")) { changeNameData.lastName = lastNameChange.value; } + if (!selection.value.includes("rank")) { + changeNameData.rank = rankChange.value; + } } ); /** ทำงานเมื่อ Components ถูกเรียกใช้งาน*/ @@ -445,12 +475,14 @@ onMounted(async () => { icon="add" @click=" () => { - changeNameData.prefix = profileInfo?.prefixMain; + changeNameData.prefix = profileInfo?.prefix; changeNameData.firstName = profileInfo?.firstName; changeNameData.lastName = profileInfo?.lastName; + changeNameData.rank = profileInfo?.rank; prefixChange = changeNameData.prefix; firstNameChange = changeNameData.firstName; lastNameChange = changeNameData.lastName; + rankChange = changeNameData.rank; changeNameData.status = ''; dialogStatus = 'create'; submitDisable = true; @@ -563,12 +595,17 @@ onMounted(async () => {
-
+
+ { ) " />
+
+ +
Date: Thu, 11 Jun 2026 14:02:11 +0700 Subject: [PATCH 02/46] feat(resign): add commandType C-PM-48 --- .../02_resign/DialogSendToCommand.vue | 62 ++++++++++++++++++- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/src/modules/06_retirement/components/02_resign/DialogSendToCommand.vue b/src/modules/06_retirement/components/02_resign/DialogSendToCommand.vue index 443217e45..d83017e3f 100644 --- a/src/modules/06_retirement/components/02_resign/DialogSendToCommand.vue +++ b/src/modules/06_retirement/components/02_resign/DialogSendToCommand.vue @@ -5,10 +5,12 @@ import { useQuasar } from "quasar"; import { useCounterMixin } from "@/stores/mixin"; import { useRetirementDataStore } from "@/modules/06_retirement/store/Main"; import { useRoleWorkflowDataStore } from "@/stores/roleWorkflow"; +import { useCommandMainStore } from "@/modules/18_command/store/Main"; import type { PropType } from "vue"; import type { QTableProps } from "quasar"; import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main"; +import type { ListCommand } from "@/modules/18_command/interface/index/Main"; import DialogHeader from "@/components/DialogHeader.vue"; import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCommand.vue"; @@ -16,6 +18,7 @@ import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCom /** use */ const $q = useQuasar(); const stroe = useRetirementDataStore(); +const storeCommand = useCommandMainStore(); const { fetchDataCheckIsoffice } = useRoleWorkflowDataStore(); const { statusText } = stroe; const selected = ref([]); @@ -47,6 +50,10 @@ const props = defineProps({ cancel: { type: Boolean, default: false }, }); +const commandType = ref(""); +const commandMainOp = ref([]); //ข้อมูลรายการคำสั่ง +const commandOp = ref([]); //ตัวเลือกคำสั่ง + //Table const filterKeyword = defineModel("filterKeyword", { required: true }); const rowsData = ref([]); @@ -169,6 +176,11 @@ const visibleColumns = ref([ ]); const modalCommand = ref(false); +const isDisable = computed(() => { + return props.mainTabs === "1" + ? selected.value.length === 0 || commandType.value === "" + : selected.value.length === 0; +}); /** popup ยืนยันส่งัว */ function saveOrder() { @@ -210,6 +222,19 @@ async function fetchCheckOfficer() { } } +/** + * ฟิลเตอร์ คำสั่ง + * @param val ค่าจาก Input + * @param update Funtion quasar + */ +function filterSelector(val: string, update: Function) { + update(() => { + commandOp.value = commandMainOp.value.filter( + (v: ListCommand) => v.name.indexOf(val) > -1 + ); + }); +} + watch( () => props.modal, async (val) => { @@ -231,6 +256,11 @@ watch( rowsData.value = data ? data : []; rowsDataMain.value = data ? data : []; + commandType.value = ""; + const dataCommandTypes = await storeCommand.getCommandTypes(); + commandMainOp.value = dataCommandTypes.filter( + (e: ListCommand) => e.code === "C-PM-17" || e.code === "C-PM-48" + ); } else { rowsData.value = []; rowsDataMain.value = []; @@ -238,6 +268,7 @@ watch( } ); +