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