diff --git a/src/modules/13_salary/components/SalaryLists/ProcessStep.vue b/src/modules/13_salary/components/SalaryLists/ProcessStep.vue index b50a6c732..2b7c66844 100644 --- a/src/modules/13_salary/components/SalaryLists/ProcessStep.vue +++ b/src/modules/13_salary/components/SalaryLists/ProcessStep.vue @@ -63,7 +63,6 @@ function saveReccommend(reason:string) { titleRecommend:reason }) .then((res)=>{ - console.log(res) props.getData?.() }).catch((e)=>{ messageError($q,e) @@ -86,14 +85,12 @@ function sendToDirector(msg: string,type:string) { http .get(config.API.salaryPeriodStatus(type, props.periodId ? props.periodId:'', props.rootId ? props.rootId:'')) .then((res)=>{ - console.log(res) props.getData?.() }).catch((e)=>{ messageError($q,e) }).finally(()=>{ hideLoader() }) - sendStep.value = sendStep.value == 3 ? 6 : sendStep.value + 1; }, "ยืนยันการ" + msg, "ต้องการยืนยันการ" + msg + "หรือไม่?" @@ -106,7 +103,6 @@ function sendAndRecommend(title: string,typeOrder:string) { modalRecommend.value = true; titleRecommend.value = title; type.value = typeOrder - props.getData?.() } @@ -156,7 +152,7 @@ function sendAndRecommend(title: string,typeOrder:string) {
- + +
diff --git a/src/modules/13_salary/components/SalaryLists/TabMain.vue b/src/modules/13_salary/components/SalaryLists/TabMain.vue index ffef246fc..42fd2499b 100644 --- a/src/modules/13_salary/components/SalaryLists/TabMain.vue +++ b/src/modules/13_salary/components/SalaryLists/TabMain.vue @@ -228,7 +228,9 @@ function fetchDataQuota(id: string) { .get(config.API.salaryListPeriodQuota(id)) .then((res) => { const data = res.data.result; + store.remaining = data.remaining; + store.statusQuota = data.status itemsCard.value[0].total = data.total; itemsCard.value[1].total = data.fifteenPercent; itemsCard.value[2].total = data.chosen; diff --git a/src/modules/13_salary/store/SalaryListsStore.ts b/src/modules/13_salary/store/SalaryListsStore.ts index ff11a843e..5afb42fd8 100644 --- a/src/modules/13_salary/store/SalaryListsStore.ts +++ b/src/modules/13_salary/store/SalaryListsStore.ts @@ -18,6 +18,7 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => { const remaining = ref(0); + const statusQuota = ref('') const groupId = ref(""); const rootId = ref(""); const roundMainCode = ref(""); @@ -155,5 +156,6 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => { remaining, isClosedRound, roundYear, + statusQuota }; }); diff --git a/src/modules/13_salary/views/salaryLists.vue b/src/modules/13_salary/views/salaryLists.vue index 26fdc63ed..c4b824e61 100644 --- a/src/modules/13_salary/views/salaryLists.vue +++ b/src/modules/13_salary/views/salaryLists.vue @@ -319,7 +319,18 @@ function onScroll({ to, ref }: { to: number; ref: any }) { } function getQuota() { - fetchSalalyPeriod(agencyFilter.value, roundFilter.value.id, snapFilter.value); + 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(()=>{ + + }) } onMounted(async () => { await getRound();