Merge branch 'nice_dev' into develop
This commit is contained in:
commit
a32bd4573a
4 changed files with 67 additions and 44 deletions
|
|
@ -83,7 +83,8 @@ const itemsTabType = computed(() => {
|
|||
type: "NONE",
|
||||
},
|
||||
]
|
||||
: [
|
||||
: store.roundMainCode === "APR"
|
||||
? [
|
||||
{
|
||||
lable: "รายชื่อคนครอง",
|
||||
name: "tab1",
|
||||
|
|
@ -104,6 +105,23 @@ const itemsTabType = computed(() => {
|
|||
name: "tab4",
|
||||
type: "NONE",
|
||||
},
|
||||
]
|
||||
: [
|
||||
{
|
||||
lable: "รายชื่อคนครอง",
|
||||
name: "tab1",
|
||||
type: "PENDING",
|
||||
},
|
||||
{
|
||||
lable: "1 ขั้น",
|
||||
name: "tab2",
|
||||
type: "FULL",
|
||||
},
|
||||
{
|
||||
lable: "0.5 ขั้น",
|
||||
name: "tab3",
|
||||
type: "HAFT",
|
||||
},
|
||||
];
|
||||
});
|
||||
|
||||
|
|
@ -354,7 +372,7 @@ onMounted(() => {
|
|||
? itemsCard.slice(0, 5)
|
||||
: store.roundMainCode === 'OCT'
|
||||
? itemsCard.slice(5, 12)
|
||||
: itemsCard"
|
||||
: []"
|
||||
:key="index"
|
||||
:class="
|
||||
store.roundMainCode === 'APR'
|
||||
|
|
|
|||
|
|
@ -422,7 +422,7 @@ watch(
|
|||
<q-menu>
|
||||
<q-list dense style="min-width: 150px">
|
||||
<q-item
|
||||
v-for="(item, index) in store.itemMenu.filter((x:any)=>x.type != 'properties')"
|
||||
v-for="(item, index) in store.roundCode !== 'SPECIAL' ? store.itemMenu.filter((x:any)=>x.type !== 'properties') :store.itemMenu.filter((x:any)=>x.type !== 'moveGroup' && x.type !== 'properties')"
|
||||
:key="index"
|
||||
clickable
|
||||
v-close-popup
|
||||
|
|
|
|||
|
|
@ -198,10 +198,10 @@ const modalDialogProperties = ref<boolean>(false);
|
|||
/** ตัวแปร*/
|
||||
const profileId = ref<string>("");
|
||||
const amount = ref<number>(0);
|
||||
const isPunish = ref<boolean>(false)
|
||||
const isSuspension = ref<boolean>(false)
|
||||
const isAbsent = ref<boolean>(false)
|
||||
const isLeave = ref<boolean>(false)
|
||||
const isPunish = ref<boolean>(false);
|
||||
const isSuspension = ref<boolean>(false);
|
||||
const isAbsent = ref<boolean>(false);
|
||||
const isLeave = ref<boolean>(false);
|
||||
/**
|
||||
* function ยืนยันการลบรายชื่อ
|
||||
* @param id profileId
|
||||
|
|
@ -282,14 +282,14 @@ function searchData() {
|
|||
props.fetchDataTable?.();
|
||||
}
|
||||
|
||||
function onProperties(data:any){
|
||||
console.log(data)
|
||||
modalDialogProperties.value = true
|
||||
profileId.value = data.id
|
||||
isPunish.value = data.isPunish
|
||||
isSuspension.value = data.isSuspension
|
||||
isAbsent.value = data.isAbsent
|
||||
isLeave.value = data.isLeave
|
||||
function onProperties(data: any) {
|
||||
console.log(data);
|
||||
modalDialogProperties.value = true;
|
||||
profileId.value = data.id;
|
||||
isPunish.value = data.isPunish;
|
||||
isSuspension.value = data.isSuspension;
|
||||
isAbsent.value = data.isAbsent;
|
||||
isLeave.value = data.isLeave;
|
||||
}
|
||||
/** callblack function เรียกข้อมูลรายชื่อใหม่ เมื่อมีการเปลี่ยน PageSize*/
|
||||
watch(
|
||||
|
|
@ -302,7 +302,14 @@ watch(
|
|||
|
||||
<template>
|
||||
<q-toolbar class="text-primary" style="padding: 0px">
|
||||
<q-btn v-if="!store.isClosedRound" flat round dense icon="add" @click="onClickAddPerson">
|
||||
<q-btn
|
||||
v-if="!store.isClosedRound"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="add"
|
||||
@click="onClickAddPerson"
|
||||
>
|
||||
<q-tooltip>เพิ่ม </q-tooltip>
|
||||
</q-btn>
|
||||
<q-space />
|
||||
|
|
@ -439,7 +446,7 @@ watch(
|
|||
size="24px"
|
||||
/>
|
||||
<div v-else-if="props.row.isPunish == null">
|
||||
{{ props.row.isPunish == null ? '-':''}}
|
||||
{{ props.row.isPunish == null ? "-" : "" }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="col.name == 'isSuspension'">
|
||||
|
|
@ -450,7 +457,7 @@ watch(
|
|||
size="24px"
|
||||
/>
|
||||
<div v-else-if="props.row.isSuspension == null">
|
||||
{{ props.row.isSuspension == null ? '-':''}}
|
||||
{{ props.row.isSuspension == null ? "-" : "" }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="col.name == 'isAbsent'">
|
||||
|
|
@ -461,12 +468,12 @@ watch(
|
|||
size="24px"
|
||||
/>
|
||||
<div v-else-if="props.row.isAbsent == null">
|
||||
{{ props.row.isAbsent == null ? '-':''}}
|
||||
{{ props.row.isAbsent == null ? "-" : "" }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="col.name == 'amount'">
|
||||
{{Number(props.row.amount).toLocaleString()}}
|
||||
</div>
|
||||
{{ Number(props.row.amount).toLocaleString() }}
|
||||
</div>
|
||||
<div v-else-if="col.name == 'isLeave'">
|
||||
<q-icon
|
||||
v-if="props.row.isLeave !== null"
|
||||
|
|
@ -475,9 +482,8 @@ watch(
|
|||
size="24px"
|
||||
/>
|
||||
<div v-else-if="props.row.isLeave == null">
|
||||
{{ props.row.isLeave == null ? '-':''}}
|
||||
{{ props.row.isLeave == null ? "-" : "" }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value ? col.value : "-" }}
|
||||
|
|
@ -485,7 +491,7 @@ watch(
|
|||
</q-td>
|
||||
<q-td>
|
||||
<q-btn
|
||||
v-if="!store.isClosedRound"
|
||||
v-if="!store.isClosedRound"
|
||||
flat
|
||||
dense
|
||||
icon="mdi-dots-vertical"
|
||||
|
|
@ -496,7 +502,7 @@ watch(
|
|||
<q-menu>
|
||||
<q-list dense style="min-width: 150px">
|
||||
<q-item
|
||||
v-for="(item, index) in store.itemMenu"
|
||||
v-for="(item, index) in store.roundCode !== 'SPECIAL'? store.itemMenu :store.itemMenu.filter((x:any)=>x.type !== 'moveGroup')"
|
||||
:key="index"
|
||||
clickable
|
||||
v-close-popup
|
||||
|
|
@ -576,13 +582,13 @@ watch(
|
|||
:fetchData="props.fetchDataTable"
|
||||
/>
|
||||
<DialogProperties
|
||||
v-model:modal="modalDialogProperties"
|
||||
v-model:id="profileId"
|
||||
:is-punish="isPunish"
|
||||
:is-suspension="isSuspension"
|
||||
:is-absent="isAbsent"
|
||||
:is-leave="isLeave"
|
||||
:fetch-data="props.fetchDataTable"
|
||||
v-model:modal="modalDialogProperties"
|
||||
v-model:id="profileId"
|
||||
:is-punish="isPunish"
|
||||
:is-suspension="isSuspension"
|
||||
:is-absent="isAbsent"
|
||||
:is-leave="isLeave"
|
||||
:fetch-data="props.fetchDataTable"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ import type {
|
|||
|
||||
/** importComponents*/
|
||||
import TabGroup from "@/modules/13_salary/components/SalaryEmployeeLists/TabMain.vue";
|
||||
// import ProcessStep from "@/modules/13_salary/components/SalaryEmployeeLists/ProcessStep.vue";
|
||||
// import PageDashBoard from "@/modules/13_salary/components/SalaryEmployeeLists/Dashboard.vue";
|
||||
import ProcessStep from "@/modules/13_salary/components/SalaryEmployeeLists/ProcessStep.vue";
|
||||
import PageDashBoard from "@/modules/13_salary/components/SalaryEmployeeLists/Dashboard.vue";
|
||||
|
||||
/** importStore*/
|
||||
import { useSalaryEmployeeListSDataStore } from "@/modules/13_salary/store/SalaryEmployeeListsStore";
|
||||
|
|
@ -84,14 +84,6 @@ function getRound() {
|
|||
await getSnap(roundFilter.value.shortCode);
|
||||
await getAgency(roundFilter.value.revisionId);
|
||||
await getAgencyPosition(roundFilter.value.revisionId);
|
||||
|
||||
// if (agencyFilter.value && roundFilter.value.id && snapFilter.value) {
|
||||
// await fetchSalalyPeriod(
|
||||
// agencyFilter.value,
|
||||
// roundFilter.value.id,
|
||||
// snapFilter.value
|
||||
// );
|
||||
// }
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -218,8 +210,14 @@ function fetchSalalyPeriod(rootId: string, periodId: string, snap: string) {
|
|||
.post(config.API.salaryListPeriodLatestEmp, body)
|
||||
.then(async (res) => {
|
||||
const data = res.data.result;
|
||||
if (Object.values(data).includes(null)) {
|
||||
isLoad.value = false;
|
||||
if (roundFilter.value.shortCode !== "SPECIAL") {
|
||||
if (Object.values(data).includes(null)) {
|
||||
isLoad.value = false;
|
||||
} else {
|
||||
data && store.fetchPeriodLatest(data, store.tabGroup);
|
||||
periodLatest.value = data;
|
||||
isLoad.value = true;
|
||||
}
|
||||
} else {
|
||||
data && store.fetchPeriodLatest(data, store.tabGroup);
|
||||
periodLatest.value = data;
|
||||
|
|
@ -345,6 +343,7 @@ onMounted(async () => {
|
|||
</template>
|
||||
</q-select>
|
||||
<q-select
|
||||
v-if="roundFilter ? roundFilter.shortCode !== 'SPECIAL' : false"
|
||||
class="q-ml-xs"
|
||||
v-model="snapFilter"
|
||||
label="รอบ"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue