salary - get list persons by agency rootId
This commit is contained in:
parent
cbf34695b8
commit
8b0eeb5f95
3 changed files with 8 additions and 0 deletions
|
|
@ -96,6 +96,7 @@ const formFilter = reactive<DataFilterPerson>({
|
|||
page: 1,
|
||||
pageSize: 10,
|
||||
keyword: "",
|
||||
rootId: ""
|
||||
});
|
||||
const maxPage = ref<number>(1);
|
||||
|
||||
|
|
@ -109,6 +110,9 @@ function closeModal() {
|
|||
/** function เรียกรายชื่อ คนเลื่อนเงินเดือน*/
|
||||
function fetchListPerson() {
|
||||
showLoader();
|
||||
console.log(store.rootId);
|
||||
|
||||
formFilter.rootId = store.rootId;
|
||||
http
|
||||
.post(config.API.salaryListPerson, formFilter)
|
||||
.then((res) => {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ interface DataFilterPerson {
|
|||
page: number;
|
||||
pageSize: number;
|
||||
keyword: string;
|
||||
rootId: string;
|
||||
}
|
||||
|
||||
export type { DataFilter, DataFilterPerson };
|
||||
|
|
|
|||
|
|
@ -168,6 +168,7 @@ async function getAgencyPosition(id: string) {
|
|||
.then(async (res) => {
|
||||
const data = await res.data.result;
|
||||
|
||||
store.rootId = data.rootId;
|
||||
const position = agencyOptions.value?.find(
|
||||
(e: DataOption) => e.id === data.rootId
|
||||
);
|
||||
|
|
@ -256,6 +257,8 @@ async function onChangeSnap() {
|
|||
|
||||
/** function เปลี่ยนหน่วยงาน*/
|
||||
async function onChangeAgency() {
|
||||
store.rootId = agencyFilter.value;
|
||||
|
||||
if (agencyFilter.value && roundFilter.value.id && snapFilter.value) {
|
||||
await fetchSalalyPeriod(
|
||||
agencyFilter.value,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue