รายการเลื่อนเงินเดือนข้าราชการฯ => new

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-03-18 16:03:57 +07:00
parent 91504f66ec
commit 3e39d421f3
12 changed files with 301 additions and 228 deletions

View file

@ -21,11 +21,11 @@ import TabGroup from "@/modules/13_salary/components/SalaryEmployeeLists/TabMain
// import PageDashBoard from "@/modules/13_salary/components/SalaryEmployeeLists/Dashboard.vue";
/** importStore*/
import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore";
import { useSalaryEmployeeListSDataStore } from "@/modules/13_salary/store/SalaryEmployeeListsStore";
import { useCounterMixin } from "@/stores/mixin";
/** use*/
const store = useSalaryListSDataStore();
const store = useSalaryEmployeeListSDataStore();
const $q = useQuasar();
const { messageError, showLoader, hideLoader } = useCounterMixin();
@ -215,7 +215,7 @@ function fetchSalalyPeriod(rootId: string, periodId: string, snap: string) {
};
http
.post(config.API.salaryListPeriodLatest, body)
.post(config.API.salaryListPeriodLatestEmp, body)
.then(async (res) => {
const data = res.data.result;
if (Object.values(data).includes(null)) {

View file

@ -85,14 +85,6 @@ function getRound() {
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
// );
// }
})
.catch((e) => {
messageError($q, e);
@ -219,6 +211,7 @@ function fetchSalalyPeriod(rootId: string, periodId: string, snap: string) {
.post(config.API.salaryListPeriodLatest, body)
.then(async (res) => {
const data = res.data.result;
if (Object.values(data).includes(null)) {
isLoad.value = false;
} else {
@ -241,7 +234,6 @@ function fetchSalalyPeriod(rootId: string, periodId: string, snap: string) {
async function onChangeRound() {
// isClosedRound
store.isClosedRound = roundFilter.value.isClose;
console.log(roundFilter.value);
await getSnap(roundFilter.value.shortCode);
await getAgency(roundFilter.value.revisionId);
@ -263,7 +255,7 @@ async function onChangeRound() {
/** function เปลี่ยนรอบ*/
async function onChangeSnap() {
if (agencyFilter.value && roundFilter.value.id && snapFilter.value) {
await fetchSalalyPeriod(
fetchSalalyPeriod(
agencyFilter.value,
roundFilter.value.id,
snapFilter.value
@ -280,7 +272,7 @@ async function onChangeAgency() {
roundFilter.value.id &&
snapFilter.value
) {
await fetchSalalyPeriod(
fetchSalalyPeriod(
agencyFilter.value,
roundFilter.value.id,
snapFilter.value
@ -311,8 +303,8 @@ function onScroll({ to, ref }: { to: number; ref: any }) {
}
}
onMounted(async () => {
await getRound();
onMounted(() => {
getRound();
});
</script>
@ -346,7 +338,9 @@ onMounted(async () => {
</q-item>
</template>
</q-select>
<q-select
v-if="roundFilter ? roundFilter.shortCode !== 'SPECIAL' : false"
class="q-ml-xs"
v-model="snapFilter"
label="รอบ"
@ -401,7 +395,12 @@ onMounted(async () => {
<q-separator /> -->
<q-card flat bordered>
<div v-if="agencyFilter !== 'ALL'">
<TabGroup v-if="isLoad" :periodLatest="periodLatest" />
<TabGroup
v-if="isLoad"
:periodLatest="periodLatest"
:periodId="roundFilter.id"
:rootId="agencyFilter"
/>
<q-card v-else class="q-pa-sm">
<div class="q-pa-sm">
<q-banner inline-actions rounded class="bg-grey-1 text-center">
@ -421,7 +420,11 @@ onMounted(async () => {
bordered
class="row col-12 q-mt-xs"
>
<ProcessStep :periodId="roundFilter.id" :rootId="agencyFilter" :get-data="onChangeRound"/>
<ProcessStep
:periodId="roundFilter.id"
:rootId="agencyFilter"
:get-data="onChangeRound"
/>
</q-card>
<!-- </q-card> -->