updated เงินเดือน

This commit is contained in:
Warunee Tamkoo 2024-02-28 15:52:08 +07:00
parent 16a6a4255b
commit 44d22a9b13
4 changed files with 32 additions and 56 deletions

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, defineModel } from "vue";
import { ref, defineModel, computed } from "vue";
import Header from "@/components/DialogHeader.vue";
import { useCounterMixin } from "@/stores/mixin";
import type { DataOption } from "@/modules/13_salary/interface/response/Main";
@ -61,6 +61,21 @@ function onSubmit() {
});
}
const typeRangeOps = computed(() => {
return store.roundMainCode == "OCT"
? [
{ id: "NONE", name: "ไม่ได้เลื่อน" },
{ id: "HAFT", name: "0.5 ขั้น" },
{ id: "FULL", name: "1 ขั้น" },
{ id: "FULLHAFT", name: "1.5 ขั้น" },
]
: [
{ id: "NONE", name: "ไม่ได้เลื่อน" },
{ id: "HAFT", name: "0.5 ขั้น" },
{ id: "FULL", name: "1 ขั้น" },
];
});
function inputEdit(val: boolean) {
return {
"full-width cursor-pointer inputgreen ": val,
@ -88,7 +103,7 @@ function inputEdit(val: boolean) {
map-options
option-label="name"
option-value="id"
:options="store.typeRangeOps.filter((e) => e.id !== store.tabType)"
:options="typeRangeOps.filter((e) => e.id !== store.tabType)"
:rules="[(val) => !!val || `${'กรุณาเลือก ขั้น'}`]"
lazy-rules
hide-bottom-space

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, onMounted, reactive } from "vue";
import { ref, onMounted, reactive, computed } from "vue";
import { useQuasar } from "quasar";
import { useRouter } from "vue-router";
import http from "@/plugins/http";
@ -44,8 +44,8 @@ const itemsTabGroup = ref([
},
]);
const itemsTabType = ref(
store.roundCode === "OCT"
const itemsTabType = computed(() => {
return store.roundMainCode === "OCT"
? [
{
lable: "รายชื่อคนครอง",
@ -99,8 +99,8 @@ const itemsTabType = ref(
name: "tab4",
type: "NONE",
},
]
);
];
});
const itemsCard = ref([
{
@ -224,7 +224,6 @@ onMounted(async () => {
<q-tab :name="item.name" :label="item.lable" />
</div>
</q-tabs>
<q-separator />
<q-tab-panels v-model="store.tabGroup" animated class="bg-grey-1">
<q-tab-panel
@ -303,47 +302,19 @@ onMounted(async () => {
:name="item.type"
>
<TableTabType1
v-if="index + 1 === 1"
v-if="index === 0"
:rows="rows"
v-model:maxPage="maxPage"
v-model:formFilter="formFilter"
:fetchDataTable="updatePagination"
/>
<TableTabType2
v-if="index + 1 === 2"
v-else
:rows="rows"
v-model:maxPage="maxPage"
v-model:formFilter="formFilter"
:fetchDataTable="updatePagination"
/>
<TableTabType2
v-if="index + 1 === 3"
:rows="rows"
v-model:maxPage="maxPage"
v-model:formFilter="formFilter"
:fetchDataTable="updatePagination"
/>
<TableTabType2
v-if="index + 1 === 4"
:rows="rows"
v-model:maxPage="maxPage"
v-model:formFilter="formFilter"
:fetchDataTable="updatePagination"
/>
<TableTabType2
v-if="index + 1 === 5"
:rows="rows"
v-model:maxPage="maxPage"
v-model:formFilter="formFilter"
:updatePagination="updatePagination"
/>
<TableTabType2
v-if="index + 1 === 6"
:rows="rows"
v-model:maxPage="maxPage"
v-model:formFilter="formFilter"
:updatePagination="updatePagination"
/>
</q-tab-panel>
</q-tab-panels>
</template>