From 1fc8c415544f6ddb3f6fa05da69595cb30c1cca7 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Fri, 6 Dec 2024 17:15:02 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=E0=B9=81=E0=B8=AA=E0=B8=94=E0=B8=87=E0=B9=80=E0=B8=87=E0=B8=B4?= =?UTF-8?q?=E0=B8=99=E0=B8=84=E0=B9=88=E0=B8=B2=E0=B8=95=E0=B8=AD=E0=B8=9A?= =?UTF-8?q?=E0=B9=81=E0=B8=97=E0=B8=99=E0=B8=9E=E0=B8=B4=E0=B9=80=E0=B8=A8?= =?UTF-8?q?=E0=B8=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/01_compete/CompeteReport.vue | 4 +-- .../detail/Salary/01_PositionSalary.vue | 28 ++++++++++++++++++- .../interface/request/Salary.ts | 1 + .../interface/response/Salary.ts | 1 + .../components/DialogCreateCommandORG.vue | 6 ++++ .../18_command/components/Step/0_Main.vue | 1 + .../components/Step/Dialog2_Salary.vue | 28 +++++++++++++++---- src/modules/18_command/store/DetailStore.ts | 3 +- 8 files changed, 63 insertions(+), 9 deletions(-) diff --git a/src/modules/03_recruiting/views/01_compete/CompeteReport.vue b/src/modules/03_recruiting/views/01_compete/CompeteReport.vue index c3e6c60b7..7f2a4e5fc 100644 --- a/src/modules/03_recruiting/views/01_compete/CompeteReport.vue +++ b/src/modules/03_recruiting/views/01_compete/CompeteReport.vue @@ -48,7 +48,7 @@ async function getReportRecruit() { await http .get( config.API.reportRecruit(reportSelect.value) + - `?rootId=&year=${year.value+543}` + `?year=${year.value+543}` ) .then(async (res) => { const data = res.data.result; @@ -188,7 +188,7 @@ onMounted(() => { dense v-model="reportSelect" :options="reportSelectOption" - label="ประเภท" + label="รายงาน" emit-value map-options hide-selected 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 71be17a68..8cef6e73e 100644 --- a/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue +++ b/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue @@ -192,6 +192,7 @@ const formDataSalary = reactive({ refCommandNo: "", //เลขที่คำสั่ง templateDoc: "", //ต้นแบบ (template) เอกสารอ้างอิง doc: "", //เอกสารอ้างอิง + amountSpecial: null, //เงินค่าตอบแทนพิเศษ }); const modalDialogSalary = ref(false); //แสดง popup ตำแหน่งเงินเดือน @@ -748,6 +749,17 @@ onMounted(() => { {{ col.value ? col.value : "-" }} ดูคำสั่ง +
+ {{ + props.row.amount + ? `${props.row.amount}${ + props.row.amountSpecial !== 0 && props.row.amountSpecial + ? `(${props.row.amountSpecial.toLocaleString()})` + : "" + }` + : "-" + }} +
-
@@ -1097,7 +1109,21 @@ onMounted(() => { hide-bottom-space /> - +
+ +
{ firstName: i.firstName, lastName: i.lastName, citizenId: i.citizenId, + ...(props.systemName?.includes("SALARY") && { + amount: i.positionSalaryAmount, + amountSpecial: i.amountSpecial, + }), })); }); + //Table const rows = ref([]); const selected = ref([]); @@ -143,6 +148,7 @@ function onSubmit() { commandNo: commandNo.value, persons: selected.value ? dataMapToSend.value : [], }; + await http .post(config.API.command + `/person`, body) .then(async (res) => { diff --git a/src/modules/18_command/components/Step/0_Main.vue b/src/modules/18_command/components/Step/0_Main.vue index 6e8df6a8b..0129ef8c7 100644 --- a/src/modules/18_command/components/Step/0_Main.vue +++ b/src/modules/18_command/components/Step/0_Main.vue @@ -47,6 +47,7 @@ async function fetchData() { isDraft.value = data.isDraft; isSign.value = data.isSign; isAttachment.value = data.isAttachment; + store.isSalary = data.isSalary }) .catch((err) => { messageError($q, err); diff --git a/src/modules/18_command/components/Step/Dialog2_Salary.vue b/src/modules/18_command/components/Step/Dialog2_Salary.vue index 9e26f1061..b91933301 100644 --- a/src/modules/18_command/components/Step/Dialog2_Salary.vue +++ b/src/modules/18_command/components/Step/Dialog2_Salary.vue @@ -6,13 +6,14 @@ import http from "@/plugins/http"; import config from "@/app.config"; 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"; const $q = useQuasar(); const { showLoader, hideLoader, dialogConfirm, messageError, success } = useCounterMixin(); const store = useCommandMainStore(); +const storeDetail = useCommandDetail(); const props = defineProps({ getData: Function, @@ -36,6 +37,7 @@ const formData = reactive({ mouthSalaryAmount: null, remarkVertical: null, remarkHorizontal: null, + amountSpecial: null, }); const readonly = ref(false); @@ -167,12 +169,28 @@ watch( :class="getClass(!readonly)" mask="###,###,###,###,###,###" reverse-fill-mask - :readonly="readonly" + :readonly="!storeDetail.isSalary" :label="`${'เงินเดือน'}`" :rules="[(val: any) => !!val || `${'กรุณากรอกเงินเดือน'}`]" />
- +
+ +
{ const readonly = ref(false); const dataCommand = ref(); const status = ref(""); - + const isSalary = ref(false) function checkStep(val: string) { status.value = val; switch (val) { @@ -39,5 +39,6 @@ export const useCommandDetail = defineStore("commandDetailStore", () => { readonly, status, dataCommand, + isSalary }; });