@@ -269,7 +326,12 @@ const options = ref(["ทั้งหมด", "กลุ่ม 1", "กลุ่
v-model="gruup"
:options="options"
label="กลุ่ม"
+ emit-value
+ map-options
+ option-label="name"
+ option-value="id"
style="width: 150px"
+ @update:model-value="fetchDataDashboard"
/>
diff --git a/src/modules/13_salary/views/salaryEmployeeLists.vue b/src/modules/13_salary/views/salaryEmployeeLists.vue
index cc202d66f..a975ce0ad 100644
--- a/src/modules/13_salary/views/salaryEmployeeLists.vue
+++ b/src/modules/13_salary/views/salaryEmployeeLists.vue
@@ -40,6 +40,7 @@ const snapOptions = ref();
const periodLatest = ref();
const isLoad = ref(false);
+const isDisable = ref(false);
/** ตัวแปร select*/
const page = ref(1);
@@ -51,6 +52,7 @@ const nextPage = ref(1);
/**function เรียกข้อมูลรอบการขึ้นเงินเดือน*/
function getRound() {
roundOptions.value = [];
+ isDisable.value = false;
showLoader();
http
.get(
@@ -60,6 +62,7 @@ function getRound() {
.then(async (res) => {
const data = res.data.result.data;
if (data.length !== 0) {
+ isDisable.value = true;
lastPage.value = Math.ceil(res.data.result.total / pageSize.value);
const optionMain = await data.map((x: DataRound) => ({
id: x.id,
@@ -372,7 +375,7 @@ onMounted(() => {
@update:model-value="onChangeRound"
:loading="loading"
@virtual-scroll="onScroll"
- :disable="!isLoad"
+ :disable="!isDisable"
>
@@ -398,7 +401,7 @@ onMounted(() => {
hide-bottom-space
bg-color="white"
@update:model-value="onChangeSnap"
- :disable="!isLoad"
+ :disable="!isDisable"
/>
{
hide-bottom-space
bg-color="white"
@update:model-value="onChangeAgency"
- :disable="!isLoad"
+ :disable="!isDisable"
/>
diff --git a/src/modules/13_salary/views/salaryLists.vue b/src/modules/13_salary/views/salaryLists.vue
index 80bf65ffd..622797995 100644
--- a/src/modules/13_salary/views/salaryLists.vue
+++ b/src/modules/13_salary/views/salaryLists.vue
@@ -39,6 +39,7 @@ const snapOptions = ref();
const periodLatest = ref();
const isLoad = ref(false);
+const isDisable = ref(false);
/** ตัวแปร select*/
const page = ref(1);
@@ -51,6 +52,7 @@ const nextPage = ref(1);
function getRound() {
roundOptions.value = [];
showLoader();
+ isDisable.value = false;
http
.get(
config.API.salaryPeriodActive(year.value.toString()) +
@@ -59,6 +61,7 @@ function getRound() {
.then(async (res) => {
const data = res.data.result.data;
if (data.length !== 0) {
+ isDisable.value = true;
lastPage.value = Math.ceil(res.data.result.total / pageSize.value);
const optionMain = await data.map((x: DataRound) => ({
id: x.id,
@@ -220,8 +223,6 @@ function fetchSalalyPeriod(rootId: string, periodId: string, snap: string) {
.then(async (res) => {
const data = res.data.result;
- console.log(roundFilter.value.shortCode);
-
if (roundFilter.value.shortCode !== "SPECIAL") {
if (Object.values(data).includes(null)) {
isLoad.value = false;
@@ -238,6 +239,7 @@ function fetchSalalyPeriod(rootId: string, periodId: string, snap: string) {
})
.catch((err) => {
messageError($q, err);
+ // isLoad.value = true;
})
.finally(() => {
setTimeout(() => {
@@ -396,7 +398,7 @@ onMounted(async () => {
@update:model-value="onChangeRound"
:loading="loading"
@virtual-scroll="onScroll"
- :disable="!isLoad"
+ :disable="!isDisable"
>
@@ -422,7 +424,7 @@ onMounted(async () => {
hide-bottom-space
bg-color="white"
@update:model-value="onChangeSnap"
- :disable="!isLoad"
+ :disable="!isDisable"
/>
{
hide-bottom-space
bg-color="white"
@update:model-value="onChangeAgency"
- :disable="!isLoad"
+ :disable="!isDisable"
/>
@@ -480,7 +482,11 @@ onMounted(async () => {