Merge branch 'nice_dev' into develop
This commit is contained in:
commit
e5aad00fea
7 changed files with 879 additions and 85 deletions
|
|
@ -30,6 +30,7 @@ const $q = useQuasar();
|
|||
const { messageError, showLoader, hideLoader } = useCounterMixin();
|
||||
|
||||
/** ตัวแปร*/
|
||||
const year = ref<number>(new Date().getFullYear());
|
||||
const roundFilter = ref<any>();
|
||||
const roundOptions = ref<DataOptionShort[]>([]);
|
||||
const agencyFilter = ref<string>("");
|
||||
|
|
@ -49,42 +50,48 @@ const nextPage = ref<number>(1);
|
|||
|
||||
/**function เรียกข้อมูลรอบการขึ้นเงินเดือน*/
|
||||
function getRound() {
|
||||
roundOptions.value = [];
|
||||
showLoader();
|
||||
http
|
||||
.get(
|
||||
config.API.salaryPeriodActive() +
|
||||
config.API.salaryPeriodActive(year.value.toString()) +
|
||||
`?page=${page.value}&pageSize=${pageSize.value}&keyword=&year=0`
|
||||
)
|
||||
.then(async (res) => {
|
||||
const data = res.data.result.data;
|
||||
lastPage.value = Math.ceil(res.data.result.total / pageSize.value);
|
||||
if (data.length !== 0) {
|
||||
lastPage.value = Math.ceil(res.data.result.total / pageSize.value);
|
||||
const optionMain = await data.map((x: DataRound) => ({
|
||||
id: x.id,
|
||||
revisionId: x.revisionId,
|
||||
shortCode: x.period,
|
||||
isClose: x.isClose,
|
||||
year: x.year,
|
||||
name:
|
||||
x.period === "OCT"
|
||||
? "รอบตุลาคม "
|
||||
: x.period === "SPECIAL"
|
||||
? "รอบพิเศษ "
|
||||
: "รอบเมษายน ",
|
||||
}));
|
||||
roundOptions.value.push(...optionMain);
|
||||
|
||||
const optionMain = await data.map((x: DataRound) => ({
|
||||
id: x.id,
|
||||
revisionId: x.revisionId,
|
||||
shortCode: x.period,
|
||||
isClose: x.isClose,
|
||||
year: x.year,
|
||||
name:
|
||||
(x.period === "OCT"
|
||||
? "รอบตุลาคม "
|
||||
: x.period === "SPECIAL"
|
||||
? "รอบพิเศษ "
|
||||
: "รอบเมษายน ") +
|
||||
(Number(x.year) + 543),
|
||||
}));
|
||||
roundOptions.value.push(...optionMain);
|
||||
roundFilter.value = await (roundOptions.value
|
||||
? roundOptions.value[0]
|
||||
: "");
|
||||
|
||||
roundFilter.value = await (roundOptions.value
|
||||
? roundOptions.value[0]
|
||||
: "");
|
||||
store.roundMainCode = roundFilter.value.shortCode;
|
||||
store.isClosedRound = roundFilter.value.isClose;
|
||||
|
||||
store.roundMainCode = roundFilter.value.shortCode;
|
||||
store.isClosedRound = roundFilter.value.isClose;
|
||||
|
||||
await getSnap(roundFilter.value.shortCode);
|
||||
await getAgency(roundFilter.value.revisionId);
|
||||
await getAgencyPosition(roundFilter.value.revisionId);
|
||||
await getSnap(roundFilter.value.shortCode);
|
||||
await getAgency(roundFilter.value.revisionId);
|
||||
await getAgencyPosition(roundFilter.value.revisionId);
|
||||
} else {
|
||||
isLoad.value = false;
|
||||
roundFilter.value = "ไม่มีข้อมูล";
|
||||
snapFilter.value = "ไม่มีข้อมูล";
|
||||
agencyFilter.value = "ไม่มีข้อมูล";
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -307,8 +314,43 @@ onMounted(() => {
|
|||
รายการเลื่อนค่าจ้างลูกจ้างประจำ
|
||||
</div>
|
||||
<q-space />
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="year"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
style="width: 150px"
|
||||
@update:model-value="getRound"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
dense
|
||||
lazy-rules
|
||||
outlined
|
||||
:model-value="Number(year) + 543"
|
||||
:label="`${'ปีงบประมาณ'}`"
|
||||
bg-color="white"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
|
||||
<q-select
|
||||
class="q-ml-xs"
|
||||
v-model="roundFilter"
|
||||
label="รอบการขึ้นเงินเดือน"
|
||||
dense
|
||||
|
|
@ -323,6 +365,7 @@ onMounted(() => {
|
|||
@update:model-value="onChangeRound"
|
||||
:loading="loading"
|
||||
@virtual-scroll="onScroll"
|
||||
:disable="!isLoad"
|
||||
>
|
||||
<template v-slot:option="scope">
|
||||
<q-item v-bind="scope.itemProps">
|
||||
|
|
@ -348,6 +391,7 @@ onMounted(() => {
|
|||
hide-bottom-space
|
||||
bg-color="white"
|
||||
@update:model-value="onChangeSnap"
|
||||
:disable="!isLoad"
|
||||
/>
|
||||
<q-select
|
||||
class="q-ml-xs"
|
||||
|
|
@ -364,6 +408,7 @@ onMounted(() => {
|
|||
hide-bottom-space
|
||||
bg-color="white"
|
||||
@update:model-value="onChangeAgency"
|
||||
:disable="!isLoad"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ const $q = useQuasar();
|
|||
const { messageError, showLoader, hideLoader } = useCounterMixin();
|
||||
|
||||
/** ตัวแปร*/
|
||||
const year = ref<number>(new Date().getFullYear());
|
||||
const roundFilter = ref<any>();
|
||||
const roundOptions = ref<DataOptionShort[]>([]);
|
||||
const agencyFilter = ref<string>("");
|
||||
|
|
@ -48,51 +49,49 @@ const nextPage = ref<number>(1);
|
|||
|
||||
/**function เรียกข้อมูลรอบการขึ้นเงินเดือน*/
|
||||
function getRound() {
|
||||
roundOptions.value = [];
|
||||
showLoader();
|
||||
http
|
||||
.get(
|
||||
config.API.salaryPeriodActive() +
|
||||
config.API.salaryPeriodActive(year.value.toString()) +
|
||||
`?page=${page.value}&pageSize=${pageSize.value}&keyword=&year=0`
|
||||
)
|
||||
.then(async (res) => {
|
||||
const data = res.data.result.data;
|
||||
lastPage.value = Math.ceil(res.data.result.total / pageSize.value);
|
||||
if (data.length !== 0) {
|
||||
lastPage.value = Math.ceil(res.data.result.total / pageSize.value);
|
||||
const optionMain = await data.map((x: DataRound) => ({
|
||||
id: x.id,
|
||||
revisionId: x.revisionId,
|
||||
shortCode: x.period,
|
||||
isClose: x.isClose,
|
||||
year: x.year,
|
||||
name:
|
||||
x.period === "OCT"
|
||||
? "รอบตุลาคม "
|
||||
: x.period === "SPECIAL"
|
||||
? "รอบพิเศษ "
|
||||
: "รอบเมษายน ",
|
||||
}));
|
||||
roundOptions.value.push(...optionMain);
|
||||
|
||||
const optionMain = await data.map((x: DataRound) => ({
|
||||
id: x.id,
|
||||
revisionId: x.revisionId,
|
||||
shortCode: x.period,
|
||||
isClose: x.isClose,
|
||||
year: x.year,
|
||||
name:
|
||||
(x.period === "OCT"
|
||||
? "รอบตุลาคม "
|
||||
: x.period === "SPECIAL"
|
||||
? "รอบพิเศษ "
|
||||
: "รอบเมษายน ") +
|
||||
(Number(x.year) + 543),
|
||||
}));
|
||||
roundOptions.value.push(...optionMain);
|
||||
roundFilter.value = await (roundOptions.value
|
||||
? roundOptions.value[0]
|
||||
: "");
|
||||
|
||||
roundFilter.value = await (roundOptions.value
|
||||
? roundOptions.value[0]
|
||||
: "");
|
||||
store.roundMainCode = roundFilter.value.shortCode;
|
||||
store.roundYear = roundFilter.value.year;
|
||||
store.isClosedRound = roundFilter.value.isClose;
|
||||
|
||||
store.roundMainCode = roundFilter.value.shortCode;
|
||||
store.roundYear = roundFilter.value.year;
|
||||
store.isClosedRound = roundFilter.value.isClose;
|
||||
|
||||
await getSnap(roundFilter.value.shortCode);
|
||||
await getAgency(roundFilter.value.revisionId);
|
||||
await getAgencyPosition(roundFilter.value.revisionId);
|
||||
|
||||
// if (agencyFilter.value && roundFilter.value.id && snapFilter.value) {
|
||||
// await fetchSalalyPeriod(
|
||||
// agencyFilter.value,
|
||||
// roundFilter.value.id,
|
||||
// snapFilter.value
|
||||
// );
|
||||
// }
|
||||
await getSnap(roundFilter.value.shortCode);
|
||||
await getAgency(roundFilter.value.revisionId);
|
||||
await getAgencyPosition(roundFilter.value.revisionId);
|
||||
} else {
|
||||
isLoad.value = false;
|
||||
roundFilter.value = "ไม่มีข้อมูล";
|
||||
snapFilter.value = "ไม่มีข้อมูล";
|
||||
agencyFilter.value = "ไม่มีข้อมูล";
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -320,17 +319,16 @@ function onScroll({ to, ref }: { to: number; ref: any }) {
|
|||
|
||||
function getQuota() {
|
||||
http
|
||||
.get(config.API.salaryListPeriodQuota(store.groupId))
|
||||
.then((res)=>{
|
||||
console.log("q",res)
|
||||
const data = res.data.result
|
||||
store.statusQuota = data.status
|
||||
|
||||
}).catch((e)=>{
|
||||
messageError($q,e)
|
||||
}).finally(()=>{
|
||||
|
||||
})
|
||||
.get(config.API.salaryListPeriodQuota(store.groupId))
|
||||
.then((res) => {
|
||||
console.log("q", res);
|
||||
const data = res.data.result;
|
||||
store.statusQuota = data.status;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {});
|
||||
}
|
||||
onMounted(async () => {
|
||||
await getRound();
|
||||
|
|
@ -343,7 +341,42 @@ onMounted(async () => {
|
|||
รายการเลื่อนเงินเดือนข้าราชการฯ
|
||||
</div>
|
||||
<q-space />
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="year"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
style="width: 150px"
|
||||
@update:model-value="getRound"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
dense
|
||||
lazy-rules
|
||||
outlined
|
||||
:model-value="Number(year) + 543"
|
||||
:label="`${'ปีงบประมาณ'}`"
|
||||
bg-color="white"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
<q-select
|
||||
class="q-ml-xs"
|
||||
v-model="roundFilter"
|
||||
label="รอบการขึ้นเงินเดือน"
|
||||
dense
|
||||
|
|
@ -358,6 +391,7 @@ onMounted(async () => {
|
|||
@update:model-value="onChangeRound"
|
||||
:loading="loading"
|
||||
@virtual-scroll="onScroll"
|
||||
:disable="!isLoad"
|
||||
>
|
||||
<template v-slot:option="scope">
|
||||
<q-item v-bind="scope.itemProps">
|
||||
|
|
@ -383,6 +417,7 @@ onMounted(async () => {
|
|||
hide-bottom-space
|
||||
bg-color="white"
|
||||
@update:model-value="onChangeSnap"
|
||||
:disable="!isLoad"
|
||||
/>
|
||||
<q-select
|
||||
class="q-ml-xs"
|
||||
|
|
@ -399,6 +434,7 @@ onMounted(async () => {
|
|||
hide-bottom-space
|
||||
bg-color="white"
|
||||
@update:model-value="onChangeAgency"
|
||||
:disable="!isLoad"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue