updated เงินเดือน
This commit is contained in:
parent
16a6a4255b
commit
44d22a9b13
4 changed files with 32 additions and 56 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
|
|||
|
||||
const groupId = ref<string>("");
|
||||
const rootId = ref<string>("");
|
||||
const roundCode = ref<string>("OCT");
|
||||
const roundMainCode = ref<string>("");
|
||||
const roundCode = ref<string>("");
|
||||
/** List Menu*/
|
||||
const itemMenu = ref<ItemsMenu[]>([
|
||||
{
|
||||
|
|
@ -47,21 +48,6 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
|
|||
},
|
||||
]);
|
||||
|
||||
const typeRangeOps = ref<DataOption[]>(
|
||||
roundCode.value === "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 fetchPeriodLatest(data: DataPeriodLatest, type: string) {
|
||||
groupId.value = type === "group1" ? data.group1id : data.group2id;
|
||||
roundCode.value = data.period;
|
||||
|
|
@ -77,6 +63,6 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
|
|||
rootId,
|
||||
roundCode,
|
||||
groupOp,
|
||||
typeRangeOps,
|
||||
roundMainCode
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -62,6 +62,8 @@ async function getRound() {
|
|||
? roundOptions.value[0]
|
||||
: "");
|
||||
|
||||
store.roundMainCode = roundFilter.value.shortCode;
|
||||
|
||||
await getSnap(roundFilter.value.shortCode);
|
||||
await getAgency(roundFilter.value.revisionId);
|
||||
await getAgencyPosition(roundFilter.value.revisionId);
|
||||
|
|
@ -85,7 +87,7 @@ async function getRound() {
|
|||
/** function เรียกรอบ*/
|
||||
function getSnap(code: string) {
|
||||
snapOptions.value =
|
||||
code === "OCT"
|
||||
code == "OCT"
|
||||
? [
|
||||
{
|
||||
id: "SNAP1",
|
||||
|
|
@ -210,6 +212,8 @@ async function onChangeRound() {
|
|||
roundFilter.value.id,
|
||||
snapFilter.value
|
||||
);
|
||||
store.tabType = "PENDING";
|
||||
store.roundMainCode = roundFilter.value.shortCode
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue