ปรับ text ระบบเงินเดือน

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-11-01 13:04:37 +07:00
parent 4021af92a5
commit beb1522145
3 changed files with 33 additions and 6 deletions

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { onMounted, ref } from "vue";
import { computed, onMounted, ref } from "vue";
import { useQuasar } from "quasar";
import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore";
@ -55,6 +55,15 @@ const lastPage = ref<number>(0);
const modalCommand = ref<boolean>(false);
const isOfficer = ref<boolean>(false);
const isStaff = ref<boolean>(false);
const titleCommand = computed(() => {
return `ปีงบประมาณ ${year.value + 543} รอบการขึ้นเงินเดือน ${
roundFilter.value?.shortCode === "SPECIAL"
? roundFilter.value?.name
? roundFilter.value?.name
: ""
: `1 ${roundFilter.value?.name ? roundFilter.value?.name : ""}`
} `;
});
/**
* function เรยกขอมลรอบการขนเงนเดอน
@ -246,7 +255,6 @@ async function fetchSalalyPeriod(
.post(config.API.salaryListPeriodLatest, body)
.then(async (res) => {
const data = await res.data.result;
console.log(data);
if (roundFilter.value.shortCode !== "SPECIAL") {
if (Object.values(data).includes(null)) {
@ -464,7 +472,7 @@ onMounted(async () => {
<q-select
v-if="roundFilter ? roundFilter.shortCode !== 'SPECIAL' : false"
v-model="snapFilter"
label="รอบ"
label="ราชชื่อรอบ"
dense
outlined
emit-value
@ -565,6 +573,7 @@ onMounted(async () => {
system-name="SALARY"
:command-type-code-array="['C-PM-33', 'C-PM-34', 'C-PM-35']"
:salary-period-id="salaryPeriodId"
:title-command="titleCommand"
/>
</template>

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { onMounted, ref, nextTick } from "vue";
import { onMounted, ref, nextTick, computed } from "vue";
import { useQuasar } from "quasar";
import { useSalaryEmployeeListSDataStore } from "@/modules/13_salary/store/SalaryEmployeeListsStore";
@ -57,6 +57,15 @@ const nextPage = ref<number>(1);
const modalCommand = ref<boolean>(false);
const isOfficer = ref<boolean>(false);
const isStaff = ref<boolean>(false);
const titleCommand = computed(() => {
return `ปีงบประมาณ ${year.value + 543} รอบการขึ้นเงินเดือน ${
roundFilter.value?.shortCode === "SPECIAL"
? roundFilter.value?.name
? roundFilter.value?.name
: ""
: `1 ${roundFilter.value?.name ? roundFilter.value?.name : ""}`
} `;
});
/**
* function เรยกขอมลรอบการขนคาจาง
@ -463,7 +472,7 @@ onMounted(async () => {
<q-select
v-if="roundFilter ? roundFilter.shortCode !== 'SPECIAL' : false"
v-model="snapFilter"
label="รอบ"
label="ราชชื่อรอบ"
dense
outlined
emit-value
@ -557,6 +566,7 @@ onMounted(async () => {
system-name="SALARY_EMP"
:command-type-code-array="['C-PM-36', 'C-PM-37']"
:salary-period-id="salaryPeriodId"
:title-command="titleCommand"
/>
</template>

View file

@ -41,6 +41,7 @@ const props = defineProps({
systemName: String, //
orgPublishDate: { type: Date || undefined, defult: undefined },
salaryPeriodId: { type: String, defult: "" }, //
titleCommand: { type: String, defult: "" },
});
const commandOp = ref<ListCommand[]>([]); //
@ -281,7 +282,14 @@ watch(modal, async () => {
<q-dialog v-model="modal" persistent>
<q-card style="min-width: 50vw">
<q-form greedy @submit.prevent @validation-success="onSubmit">
<DialogHeader :tittle="'สร้างคำสั่ง'" :close="closeModal" />
<DialogHeader
:tittle="`สร้างคำสั่ง ${
props.systemName === 'SALARY' || props.systemName === 'SALARY_EMP'
? props.titleCommand
: ''
}`"
:close="closeModal"
/>
<q-separator />
<q-card-section style="max-height: 50vh" class="scroll">
<div class="row q-sm q-col-gutter-sm">