salary - check isClose round

This commit is contained in:
Warunee Tamkoo 2024-03-08 09:48:49 +07:00
parent 8b0eeb5f95
commit 2e0f98448f
4 changed files with 10 additions and 4 deletions

View file

@ -109,9 +109,7 @@ function closeModal() {
/** function เรียกรายชื่อ คนเลื่อนเงินเดือน*/
function fetchListPerson() {
showLoader();
console.log(store.rootId);
showLoader();
formFilter.rootId = store.rootId;
http
.post(config.API.salaryListPerson, formFilter)

View file

@ -20,6 +20,7 @@ interface DataRound {
revisionId: string;
status: string;
year: number;
isClose: boolean
}
interface DataAgency {

View file

@ -22,6 +22,7 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
const rootId = ref<string>("");
const roundMainCode = ref<string>("");
const roundCode = ref<string>("");
const isClosedRound = ref<boolean>(false); // การปิดรอบ
/** List Menu*/
const itemMenu = ref<ItemsMenu[]>([
{
@ -151,5 +152,6 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
groupOp,
roundMainCode,
remaining,
isClosedRound
};
});

View file

@ -62,6 +62,7 @@ function getRound() {
id: x.id,
revisionId: x.revisionId,
shortCode: x.period,
isClose: x.isClose,
name:
(x.period === "OCT"
? "รอบตุลาคม "
@ -77,6 +78,7 @@ function getRound() {
: "");
store.roundMainCode = roundFilter.value.shortCode;
store.isClosedRound = roundFilter.value.isClose;
await getSnap(roundFilter.value.shortCode);
await getAgency(roundFilter.value.revisionId);
@ -228,6 +230,9 @@ function fetchSalalyPeriod(rootId: string, periodId: string, snap: string) {
/** function เปลี่ยนรอบการขั้นเงินเดือน*/
async function onChangeRound() {
// isClosedRound
store.isClosedRound = roundFilter.value.isClose;
await getSnap(roundFilter.value.shortCode);
await getAgency(roundFilter.value.revisionId);
await getAgencyPosition(roundFilter.value.revisionId);
@ -391,7 +396,7 @@ onMounted(async () => {
</q-card>
</q-card>
<q-card v-if="isLoad" flat bordered class="row col-12 q-mt-xs">
<q-card v-if="isLoad && !store.isClosedRound" flat bordered class="row col-12 q-mt-xs">
<ProcessStep />
</q-card>