+
diff --git a/src/modules/13_salary/components/SalaryEmployeeLists/Dashboard.vue b/src/modules/13_salary/components/SalaryEmployeeLists/Dashboard.vue
index 0d760227a..c8bd7e48f 100644
--- a/src/modules/13_salary/components/SalaryEmployeeLists/Dashboard.vue
+++ b/src/modules/13_salary/components/SalaryEmployeeLists/Dashboard.vue
@@ -348,6 +348,7 @@ const columnsSpeciel = ref([
format: (v) => Number(v).toLocaleString(),
},
]);
+
const columns = computed(() => {
const columnsss =
store.roundMainCode === "APR"
@@ -371,8 +372,9 @@ const visibleColumns = ref(
"remainingAmount",
"totalBackup",
]
- : []
+ : ["org", "total", "chosen", "totalBackup"]
);
+const filter = ref("");
function fetchDataDashboard() {
showLoader();
@@ -462,59 +464,75 @@ watch([() => props?.snapShot, () => props.roundFilter], () => {
-
-
+
diff --git a/src/modules/13_salary/components/SalaryLists/Dashboard.vue b/src/modules/13_salary/components/SalaryLists/Dashboard.vue
index 63b71215f..7a8aadce1 100644
--- a/src/modules/13_salary/components/SalaryLists/Dashboard.vue
+++ b/src/modules/13_salary/components/SalaryLists/Dashboard.vue
@@ -360,6 +360,22 @@ const columnsSpeciel = ref
([
format: (v) => Number(v).toLocaleString(),
},
]);
+const visibleColumns = ref(
+ store.roundMainCode === "APR"
+ ? ["org", "total", "chosen", "totalBackup"]
+ : store.roundMainCode === "OCT"
+ ? [
+ "org",
+ "currentAmount",
+ "sixPercentAmount",
+ "spentAmount",
+ "sixPercentSpentAmount",
+ "useAmount",
+ "remainingAmount",
+ "totalBackup",
+ ]
+ : ["org", "total", "fifteenPercent", "chosen", "remaining", "totalBackup"]
+);
const columns = computed(() => {
const columnsss =
store.roundMainCode === "APR"
@@ -369,6 +385,7 @@ const columns = computed(() => {
: columnsSpeciel.value;
return columnsss;
});
+const filter = ref("");
/** function fetch ข้อมูลสถิติ*/
function fetchDataDashboard() {
@@ -500,58 +517,74 @@ watch([() => props?.snapShot, () => props.roundFilter], () => {
-
-
-
-
-
- {{ col.label }}
-
-
-
-
-
-
-
- {{ col.value }}
-
-
-
-
-
+
+
+
+
+
+
+
+ {{ col.label }}
+
+
+
+
+
+
+
+ {{ col.value }}
+
+
+
+
+
+
diff --git a/src/modules/13_salary/components/SalaryLists/TabMain.vue b/src/modules/13_salary/components/SalaryLists/TabMain.vue
index a73bdf12b..ea12a5b2f 100644
--- a/src/modules/13_salary/components/SalaryLists/TabMain.vue
+++ b/src/modules/13_salary/components/SalaryLists/TabMain.vue
@@ -356,7 +356,6 @@ function onClickDownload(data: DataOption) {
const modalDialogInfoCriteria = ref
(false);
onMounted(() => {
- console.log(props.rootId);
if (props.rootId) {
fetchDataQuota(store.groupId);
fetchDataPeriod(store.groupId);
diff --git a/src/modules/13_salary/views/salaryEmployeeLists.vue b/src/modules/13_salary/views/salaryEmployeeLists.vue
index c39079c4a..71ec8c671 100644
--- a/src/modules/13_salary/views/salaryEmployeeLists.vue
+++ b/src/modules/13_salary/views/salaryEmployeeLists.vue
@@ -154,6 +154,8 @@ async function getAgency(id: string) {
(await http
.get(config.API.activeOrganizationRootById(id))
.then(async (res) => {
+ agencyOptions.value = [];
+ agencyOptionsMain.value = [];
const data = res.data.result;
agencyOptionsMain.value = await [
{
@@ -247,13 +249,14 @@ async function onChangeRound() {
await getSnap(roundFilter.value.shortCode);
await getAgency(roundFilter.value.revisionId);
- // await getAgencyPosition(roundFilter.value.revisionId);
+ await getAgencyPosition(roundFilter.value.revisionId);
+
if (agencyFilter.value && roundFilter.value.id && snapFilter.value) {
- fetchSalalyPeriod(
- agencyFilter.value,
- roundFilter.value.id,
- snapFilter.value
- );
+ // fetchSalalyPeriod(
+ // agencyFilter.value,
+ // roundFilter.value.id,
+ // snapFilter.value
+ // );
store.tabType = "PENDING";
store.roundMainCode = roundFilter.value.shortCode;
} else {
@@ -320,6 +323,7 @@ function filterSelector(val: any, update: Function, refData: string) {
switch (refData) {
case "agencyFilter":
update(() => {
+ agencyFilter.value = "";
agencyOptions.value = agencyOptionsMain.value.filter(
(v: DataOption) => v.name.indexOf(val) > -1
);
diff --git a/src/modules/13_salary/views/salaryLists.vue b/src/modules/13_salary/views/salaryLists.vue
index 0bfda6b23..063c2c18d 100644
--- a/src/modules/13_salary/views/salaryLists.vue
+++ b/src/modules/13_salary/views/salaryLists.vue
@@ -89,8 +89,6 @@ function getRound() {
store.roundYear = roundFilter.value.year;
store.isClosedRound = roundFilter.value.isClose;
- console.log(roundFilter.value);
-
await getSnap(roundFilter.value.shortCode);
await getAgency(roundFilter.value.revisionId);
await getAgencyPosition(roundFilter.value.revisionId);
@@ -157,6 +155,8 @@ async function getAgency(id: string) {
.get(config.API.activeOrganizationRootById(id))
.then(async (res) => {
const data = res.data.result;
+ agencyOptions.value = [];
+ agencyOptionsMain.value = [];
agencyOptionsMain.value = await [
{
id: "ALL",
@@ -189,14 +189,12 @@ async function getAgencyPosition(id: string) {
.get(config.API.keycloakPositionByid(id))
.then(async (res) => {
const data = await res.data.result;
-
store.rootId = data.rootId;
const position = agencyOptions.value?.find(
(e: DataOption) => e.id === data.rootId
);
agencyFilter.value = position ? position.id : "ALL";
-
if (agencyFilter.value && roundFilter.value.id && snapFilter.value) {
fetchSalalyPeriod(
agencyFilter.value,
@@ -266,12 +264,8 @@ async function onChangeRound() {
}
getSnap(roundFilter.value.shortCode);
await getAgency(roundFilter.value.revisionId);
+ await getAgencyPosition(roundFilter.value.revisionId);
if (agencyFilter.value && roundFilter.value.id && snapFilter.value) {
- fetchSalalyPeriod(
- agencyFilter.value,
- roundFilter.value.id,
- snapFilter.value
- );
store.tabType = "PENDING";
store.roundMainCode = roundFilter.value.shortCode;
store.roundYear = roundFilter.value.year;
@@ -282,6 +276,7 @@ async function onChangeRound() {
/** function เปลี่ยนรอบ*/
async function onChangeSnap() {
+ agencyFilter.value = "";
if (agencyFilter.value && roundFilter.value.id && snapFilter.value) {
await fetchSalalyPeriod(
agencyFilter.value,
@@ -307,29 +302,6 @@ async function onChangeAgency() {
}
}
-/** function onScrollSelect รอบการขึ้นเงินเดือน*/
-function onScroll({ to, ref }: { to: number; ref: any }) {
- const lastIndex = roundOptions.value.length - 1;
-
- if (
- loading.value !== true &&
- nextPage.value < lastPage.value &&
- to === lastIndex
- ) {
- loading.value = true;
-
- setTimeout(() => {
- nextPage.value++;
- page.value = nextPage.value;
- getRound();
- nextTick(() => {
- ref.refresh();
- loading.value = false;
- });
- }, 500);
- }
-}
-
/** function fetch PeriodQuota*/
function getQuota() {
http
@@ -340,8 +312,7 @@ function getQuota() {
})
.catch((e) => {
messageError($q, e);
- })
- .finally(() => {});
+ });
}
/**
@@ -354,6 +325,7 @@ function filterSelector(val: string, update: Function, refData: string) {
switch (refData) {
case "agencyFilter":
update(() => {
+ agencyFilter.value = "";
agencyOptions.value = agencyOptionsMain.value.filter(
(v: DataOption) => v.name.indexOf(val) > -1
);
@@ -422,8 +394,6 @@ onMounted(() => {
hide-bottom-space
bg-color="white"
@update:model-value="onChangeRound"
- :loading="loading"
- @virtual-scroll="onScroll"
:disable="!isDisable"
>
@@ -452,6 +422,7 @@ onMounted(() => {
@update:model-value="onChangeSnap"
:disable="!isDisable"
/>
+
{
option-label="name"
option-value="id"
:options="agencyOptions"
- lazy-rules
hide-bottom-space
bg-color="white"
@update:model-value="onChangeAgency"
@@ -473,13 +443,19 @@ onMounted(() => {
doneFn:Function) => filterSelector(inputValue, doneFn,'agencyFilter'
) "
>
+
+
+ ไม่มีข้อมูล
+
+
+ />
+
+