ปรับ code รายการเงินเดือน
This commit is contained in:
parent
40a771e8f0
commit
16db5c593b
3 changed files with 19 additions and 23 deletions
|
|
@ -103,13 +103,13 @@ const maxPage = ref<number>(1);
|
||||||
function closeModal() {
|
function closeModal() {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
formFilter.page = 1;
|
formFilter.page = 1;
|
||||||
formFilter.keyword = ''
|
formFilter.keyword = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** function เรียกรายชื่อ คนเลื่อนเงินเดือน*/
|
/** function เรียกรายชื่อ คนเลื่อนเงินเดือน*/
|
||||||
async function fetchListPerson() {
|
function fetchListPerson() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
http
|
||||||
.post(config.API.salaryListPerson, formFilter)
|
.post(config.API.salaryListPerson, formFilter)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
|
|
@ -129,7 +129,7 @@ async function fetchListPerson() {
|
||||||
* function ยืนยันการเพิ่มคนเลื่อนเงินเดือน
|
* function ยืนยันการเพิ่มคนเลื่อนเงินเดือน
|
||||||
* @param data ข้อมูลคนที่เพิ่ม
|
* @param data ข้อมูลคนที่เพิ่ม
|
||||||
*/
|
*/
|
||||||
async function onClickAddPerson(data: DataPerson) {
|
function onClickAddPerson(data: DataPerson) {
|
||||||
const body: DataPersonReq = {
|
const body: DataPersonReq = {
|
||||||
id: store.groupId,
|
id: store.groupId,
|
||||||
type: store.tabType,
|
type: store.tabType,
|
||||||
|
|
@ -138,8 +138,8 @@ async function onClickAddPerson(data: DataPerson) {
|
||||||
|
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
() => {
|
||||||
await http
|
http
|
||||||
.post(config.API.salaryPeriodProfile, body)
|
.post(config.API.salaryPeriodProfile, body)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
props.fetchData?.();
|
props.fetchData?.();
|
||||||
|
|
|
||||||
|
|
@ -181,9 +181,9 @@ const maxPage = ref<number>(1);
|
||||||
* function เรียกข้อมูลจำนวนโควต้า
|
* function เรียกข้อมูลจำนวนโควต้า
|
||||||
* @param id กลุ่ม
|
* @param id กลุ่ม
|
||||||
*/
|
*/
|
||||||
async function fetchDataQuota(id: string) {
|
function fetchDataQuota(id: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
http
|
||||||
.get(config.API.salaryListPeriodQuota(id))
|
.get(config.API.salaryListPeriodQuota(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
@ -212,7 +212,7 @@ async function fetchDataQuota(id: string) {
|
||||||
* function เรียกข้อมูลรายชื่อ
|
* function เรียกข้อมูลรายชื่อ
|
||||||
* @param id กลุ่ม
|
* @param id กลุ่ม
|
||||||
*/
|
*/
|
||||||
async function fetchDataPeriod(id: string) {
|
function fetchDataPeriod(id: string) {
|
||||||
rows.value = [];
|
rows.value = [];
|
||||||
const formData = {
|
const formData = {
|
||||||
page: formFilter.page.toString(),
|
page: formFilter.page.toString(),
|
||||||
|
|
@ -222,7 +222,7 @@ async function fetchDataPeriod(id: string) {
|
||||||
isRetire: store.tabType === "RETIRE" ? true : null,
|
isRetire: store.tabType === "RETIRE" ? true : null,
|
||||||
};
|
};
|
||||||
|
|
||||||
await http
|
http
|
||||||
.put(config.API.salaryListPeriodORG(id), formData)
|
.put(config.API.salaryListPeriodORG(id), formData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
rows.value = res.data.result.data;
|
rows.value = res.data.result.data;
|
||||||
|
|
@ -234,7 +234,7 @@ async function fetchDataPeriod(id: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**function เปลี่ยนกลุ่ม*/
|
/**function เปลี่ยนกลุ่ม*/
|
||||||
async function changeTabGroup() {
|
function changeTabGroup() {
|
||||||
formFilter.page = 1;
|
formFilter.page = 1;
|
||||||
formFilter.pageSize = 10;
|
formFilter.pageSize = 10;
|
||||||
formFilter.keyword = "";
|
formFilter.keyword = "";
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ const loading = ref(false);
|
||||||
const nextPage = ref<number>(1);
|
const nextPage = ref<number>(1);
|
||||||
|
|
||||||
/**function เรียกข้อมูลรอบการขึ้นเงินเดือน*/
|
/**function เรียกข้อมูลรอบการขึ้นเงินเดือน*/
|
||||||
async function getRound() {
|
function getRound() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(
|
.get(
|
||||||
|
|
@ -139,9 +139,9 @@ function getSnap(code: string) {
|
||||||
* function เรียกข้อมูลหน่ยวงาน
|
* function เรียกข้อมูลหน่ยวงาน
|
||||||
* @param id revisionId
|
* @param id revisionId
|
||||||
*/
|
*/
|
||||||
async function getAgency(id: string) {
|
function getAgency(id: string) {
|
||||||
id &&
|
id &&
|
||||||
(await http
|
http
|
||||||
.get(config.API.activeOrganizationRootById(id))
|
.get(config.API.activeOrganizationRootById(id))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
@ -153,16 +153,16 @@ async function getAgency(id: string) {
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
}));
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* function เรียกข้อมูลหน่ยวงานปจุบัน
|
* function เรียกข้อมูลหน่ยวงานปจุบัน
|
||||||
* @param id revisionId
|
* @param id revisionId
|
||||||
*/
|
*/
|
||||||
async function getAgencyPosition(id: string) {
|
function getAgencyPosition(id: string) {
|
||||||
if (id) {
|
if (id) {
|
||||||
await http
|
http
|
||||||
.get(config.API.keycloakPositionByid(id))
|
.get(config.API.keycloakPositionByid(id))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
@ -184,11 +184,7 @@ async function getAgencyPosition(id: string) {
|
||||||
* @param periodId id รอบการขึ้นเงินเดือน
|
* @param periodId id รอบการขึ้นเงินเดือน
|
||||||
* @param snap id รอบ
|
* @param snap id รอบ
|
||||||
*/
|
*/
|
||||||
async function fetchSalalyPeriod(
|
function fetchSalalyPeriod(rootId: string, periodId: string, snap: string) {
|
||||||
rootId: string,
|
|
||||||
periodId: string,
|
|
||||||
snap: string
|
|
||||||
) {
|
|
||||||
showLoader();
|
showLoader();
|
||||||
isLoad.value = false;
|
isLoad.value = false;
|
||||||
const body = {
|
const body = {
|
||||||
|
|
@ -197,7 +193,7 @@ async function fetchSalalyPeriod(
|
||||||
snapshot: snap,
|
snapshot: snap,
|
||||||
};
|
};
|
||||||
|
|
||||||
await http
|
http
|
||||||
.post(config.API.salaryListPeriodLatest, body)
|
.post(config.API.salaryListPeriodLatest, body)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue