From d21528316300caef8b68c4555ac24ffc03c73a06 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 15 Dec 2025 11:50:33 +0700 Subject: [PATCH 1/4] fix(command): edit-salary --- src/api/18_command/api.command.ts | 2 + .../components/PersonalList/DialogOrders.vue | 4 +- .../components/PersonalList/Table.vue | 1 - .../components/DialogCreateCommand.vue | 55 +- .../components/DialogEditSalary.vue | 484 ++++++++++++++++++ .../18_command/interface/index/Main.ts | 1 + 6 files changed, 534 insertions(+), 13 deletions(-) create mode 100644 src/modules/18_command/components/DialogEditSalary.vue diff --git a/src/api/18_command/api.command.ts b/src/api/18_command/api.command.ts index 9bf159f39..d986ff9b2 100644 --- a/src/api/18_command/api.command.ts +++ b/src/api/18_command/api.command.ts @@ -25,4 +25,6 @@ export default { //Digital Signature commandDirector: `${env.API_URI}/org/profile/commander-director`, + + commandEditSalary: `${command}/tab2/edit-salary`, }; diff --git a/src/modules/05_placement/components/PersonalList/DialogOrders.vue b/src/modules/05_placement/components/PersonalList/DialogOrders.vue index 253a7cf7f..8ac613a5f 100644 --- a/src/modules/05_placement/components/PersonalList/DialogOrders.vue +++ b/src/modules/05_placement/components/PersonalList/DialogOrders.vue @@ -346,7 +346,7 @@ watch( keep-color color="primary" dense - :disable="commandType" + :disable="commandType ? false : true" v-model="scope.selected" /> @@ -357,7 +357,7 @@ watch( keep-color color="primary" dense - :disable="commandType" + :disable="commandType ? false : true" v-model="props.selected" /> diff --git a/src/modules/05_placement/components/PersonalList/Table.vue b/src/modules/05_placement/components/PersonalList/Table.vue index 07dfad06d..b7fd87dd2 100644 --- a/src/modules/05_placement/components/PersonalList/Table.vue +++ b/src/modules/05_placement/components/PersonalList/Table.vue @@ -774,7 +774,6 @@ function onSubmitDate() { */ function openModalOrder(val: boolean) { // ยังไม่ได้ดัก ส่ง ไป ทั้ง object #e.draft == "รอส่งตัว" && - console.log(rowsOrder.value); rowsOrder.value = rows.value.filter( (e: any) => diff --git a/src/modules/18_command/components/DialogCreateCommand.vue b/src/modules/18_command/components/DialogCreateCommand.vue index d29ce53f6..c2928197c 100644 --- a/src/modules/18_command/components/DialogCreateCommand.vue +++ b/src/modules/18_command/components/DialogCreateCommand.vue @@ -1,5 +1,5 @@ + + + + diff --git a/src/modules/18_command/interface/index/Main.ts b/src/modules/18_command/interface/index/Main.ts index 98e1b78a7..1ee537587 100644 --- a/src/modules/18_command/interface/index/Main.ts +++ b/src/modules/18_command/interface/index/Main.ts @@ -60,6 +60,7 @@ interface ListCommand { name: string; subtitle?: string; commandSysId: string; + isSalary?: boolean; } interface DataOrder { From 512f9840de8b1ce69e4534116c779ea59f96d271 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Mon, 15 Dec 2025 13:21:08 +0700 Subject: [PATCH 2/4] fix currency --- src/components/CurruncyInput.vue | 2 +- .../components/DialogEditSalary.vue | 80 ++++++++++++------- .../components/Step/Dialog2_Salary.vue | 47 ++++++++--- 3 files changed, 86 insertions(+), 43 deletions(-) diff --git a/src/components/CurruncyInput.vue b/src/components/CurruncyInput.vue index 9386d093e..e2b2f3ae0 100644 --- a/src/components/CurruncyInput.vue +++ b/src/components/CurruncyInput.vue @@ -44,7 +44,7 @@ const { inputRef, formattedValue, setValue } = useCurrencyInput({ currency: "THB", currencyDisplay: "hidden" as any, hideCurrencySymbolOnFocus: true, - hideGroupingSeparatorOnFocus: true, + hideGroupingSeparatorOnFocus: false, hideNegligibleDecimalDigitsOnFocus: true, autoDecimalDigits: false, useGrouping: true, diff --git a/src/modules/18_command/components/DialogEditSalary.vue b/src/modules/18_command/components/DialogEditSalary.vue index 916451611..7c2a2b256 100644 --- a/src/modules/18_command/components/DialogEditSalary.vue +++ b/src/modules/18_command/components/DialogEditSalary.vue @@ -8,6 +8,7 @@ import { useRouter } from "vue-router"; import { useCounterMixin } from "@/stores/mixin"; import DialogHeader from "@/components/DialogHeader.vue"; +import CurruncyInput from "@/components/CurruncyInput.vue"; const $q = useQuasar(); const router = useRouter(); @@ -372,55 +373,74 @@ watch( :props="props" >
-
-
-
-
@@ -429,6 +449,7 @@ watch( v-model="props.row.remarkHorizontal" type="textarea" autorows + hide-bottom-space dense borderless outlined @@ -440,6 +461,7 @@ watch( v-model="props.row.remarkVertical" type="textarea" autorows + hide-bottom-space dense borderless outlined diff --git a/src/modules/18_command/components/Step/Dialog2_Salary.vue b/src/modules/18_command/components/Step/Dialog2_Salary.vue index 77a3efceb..68995a783 100644 --- a/src/modules/18_command/components/Step/Dialog2_Salary.vue +++ b/src/modules/18_command/components/Step/Dialog2_Salary.vue @@ -8,6 +8,7 @@ import { useCounterMixin } from "@/stores/mixin"; import { useCommandMainStore } from "@/modules/18_command/store/Main"; import { useCommandDetail } from "@/modules/18_command/store/DetailStore"; import DialogHeader from "@/components/DialogHeader.vue"; +import CurruncyInput from "@/components/CurruncyInput.vue"; const $q = useQuasar(); const { showLoader, hideLoader, dialogConfirm, messageError, success } = @@ -140,25 +141,30 @@ watch( v-if="store.isShowSalary(type)" class="col-xs-6 col-sm-6 col-md-6" > -
-
-
@@ -193,7 +209,7 @@ watch( v-if="store.isShowSalary(type)" class="col-xs-6 col-sm-6 col-md-6" > - From b0f55a92720711a3487a0b2cd3c57fd814cf4efc Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 15 Dec 2025 13:26:31 +0700 Subject: [PATCH 3/4] fix:q-input maxlength --- src/modules/15_development/components/ProjectDetail.vue | 2 ++ src/modules/15_development/components/Target.vue | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modules/15_development/components/ProjectDetail.vue b/src/modules/15_development/components/ProjectDetail.vue index 4847fa233..8ed60030f 100644 --- a/src/modules/15_development/components/ProjectDetail.vue +++ b/src/modules/15_development/components/ProjectDetail.vue @@ -1015,6 +1015,7 @@ defineExpose({ v-model="formData.projectModalPlanned" label="จำนวน (รุ่น)" mask="#" + maxlength="5" reverse-fill-mask class="inputgreen" @update:model-value="props.onCheckChangeData()" @@ -1198,6 +1199,7 @@ defineExpose({ v-model="formData.projectModalActual" label="จำนวน (รุ่น)" mask="#" + maxlength="5" reverse-fill-mask @update:model-value="props.onCheckChangeData()" /> diff --git a/src/modules/15_development/components/Target.vue b/src/modules/15_development/components/Target.vue index 73085fc29..360cd4b26 100644 --- a/src/modules/15_development/components/Target.vue +++ b/src/modules/15_development/components/Target.vue @@ -222,6 +222,7 @@ const columnsPlannedGoals = ref([ align: "left", label: "จำนวน(คน)", sortable: true, + format: (val) => Number(val).toLocaleString("th-TH"), field: "amount", headerStyle: "font-size: 14px", style: "font-size: 14px", @@ -264,9 +265,9 @@ const columnsActualGoals = ref([ label: "จำนวน(คน)", sortable: true, field: "amount", + format: (val) => Number(val).toLocaleString("th-TH"), headerStyle: "font-size: 14px", style: "font-size: 14px", - format: (val) => Number(val), }, ]); @@ -290,7 +291,7 @@ const columnsRelated = ref([ field: "amount", headerStyle: "font-size: 14px", style: "font-size: 14px", - format: (val) => Number(val), + format: (val) => Number(val).toLocaleString("th-TH"), }, ]); @@ -1203,6 +1204,7 @@ onMounted(() => { v-model="formGroupTarget.amount" label="จำนวน(คน)" mask="#" + maxlength="5" reverse-fill-mask :rules="[ (val:string) => @@ -1352,6 +1354,7 @@ onMounted(() => { v-model="formGroupTarget.amount" label="จำนวน(คน)" mask="#" + maxlength="5" reverse-fill-mask :rules="[ (val:string) => @@ -1546,6 +1549,7 @@ onMounted(() => { v-model="formGroupRelate.amount" label="จำนวน(คน)" mask="#" + maxlength="5" reverse-fill-mask :rules="[ (val:string) => From 792a2aa6191dad63536a6cebf1153c5dbafc09d9 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 15 Dec 2025 15:18:03 +0700 Subject: [PATCH 4/4] fix: async await --- src/modules/18_command/components/DialogEditSalary.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/18_command/components/DialogEditSalary.vue b/src/modules/18_command/components/DialogEditSalary.vue index 7c2a2b256..e24ad4329 100644 --- a/src/modules/18_command/components/DialogEditSalary.vue +++ b/src/modules/18_command/components/DialogEditSalary.vue @@ -279,13 +279,13 @@ function onSubmit() { })); await http.post(config.API.commandEditSalary, payload); - success($q, "บันทึกข้อมูลาสำเร็จ"); if (isNext.value) { router.push(`/command/edit/${props.commandId}`); } else { + await props.fetchData(); // เรียกฟังก์ชัน fetchData ที่ส่งมาจาก props เพื่อรีเฟรชข้อมูล closeModal(); - props.fetchData(); // เรียกฟังก์ชัน fetchData ที่ส่งมาจาก props เพื่อรีเฟรชข้อมูล } + success($q, "บันทึกข้อมูลาสำเร็จ"); } catch (error) { messageError($q, error); } finally {