Merge branch 'develop' into devTee
This commit is contained in:
commit
f65a7086bd
5 changed files with 16 additions and 2 deletions
|
|
@ -96,6 +96,7 @@ const formFilter = reactive<DataFilterPerson>({
|
|||
page: 1,
|
||||
pageSize: 10,
|
||||
keyword: "",
|
||||
rootId: ""
|
||||
});
|
||||
const maxPage = ref<number>(1);
|
||||
|
||||
|
|
@ -108,7 +109,8 @@ function closeModal() {
|
|||
|
||||
/** function เรียกรายชื่อ คนเลื่อนเงินเดือน*/
|
||||
function fetchListPerson() {
|
||||
showLoader();
|
||||
showLoader();
|
||||
formFilter.rootId = store.rootId;
|
||||
http
|
||||
.post(config.API.salaryListPerson, formFilter)
|
||||
.then((res) => {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ interface DataFilterPerson {
|
|||
page: number;
|
||||
pageSize: number;
|
||||
keyword: string;
|
||||
rootId: string;
|
||||
}
|
||||
|
||||
export type { DataFilter, DataFilterPerson };
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ interface DataRound {
|
|||
revisionId: string;
|
||||
status: string;
|
||||
year: number;
|
||||
isClose: boolean
|
||||
}
|
||||
|
||||
interface DataAgency {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
|
|||
const rootId = ref<string>("");
|
||||
const roundMainCode = ref<string>("");
|
||||
const roundCode = ref<string>("");
|
||||
const isClosedRound = ref<boolean>(false); // การปิดรอบ
|
||||
/** List Menu*/
|
||||
const itemMenu = ref<ItemsMenu[]>([
|
||||
{
|
||||
|
|
@ -151,5 +152,6 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
|
|||
groupOp,
|
||||
roundMainCode,
|
||||
remaining,
|
||||
isClosedRound
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ function getRound() {
|
|||
id: x.id,
|
||||
revisionId: x.revisionId,
|
||||
shortCode: x.period,
|
||||
isClose: x.isClose,
|
||||
name:
|
||||
(x.period === "OCT"
|
||||
? "รอบตุลาคม "
|
||||
|
|
@ -77,6 +78,7 @@ function getRound() {
|
|||
: "");
|
||||
|
||||
store.roundMainCode = roundFilter.value.shortCode;
|
||||
store.isClosedRound = roundFilter.value.isClose;
|
||||
|
||||
await getSnap(roundFilter.value.shortCode);
|
||||
await getAgency(roundFilter.value.revisionId);
|
||||
|
|
@ -168,6 +170,7 @@ async function getAgencyPosition(id: string) {
|
|||
.then(async (res) => {
|
||||
const data = await res.data.result;
|
||||
|
||||
store.rootId = data.rootId;
|
||||
const position = agencyOptions.value?.find(
|
||||
(e: DataOption) => e.id === data.rootId
|
||||
);
|
||||
|
|
@ -227,6 +230,9 @@ function fetchSalalyPeriod(rootId: string, periodId: string, snap: string) {
|
|||
|
||||
/** function เปลี่ยนรอบการขั้นเงินเดือน*/
|
||||
async function onChangeRound() {
|
||||
// เก็บสถานะการปิดรอบในตัวแปร isClosedRound เพื่อใช้ในการเช็ค
|
||||
store.isClosedRound = roundFilter.value.isClose;
|
||||
|
||||
await getSnap(roundFilter.value.shortCode);
|
||||
await getAgency(roundFilter.value.revisionId);
|
||||
await getAgencyPosition(roundFilter.value.revisionId);
|
||||
|
|
@ -256,6 +262,8 @@ async function onChangeSnap() {
|
|||
|
||||
/** function เปลี่ยนหน่วยงาน*/
|
||||
async function onChangeAgency() {
|
||||
store.rootId = agencyFilter.value;
|
||||
|
||||
if (agencyFilter.value && roundFilter.value.id && snapFilter.value) {
|
||||
await fetchSalalyPeriod(
|
||||
agencyFilter.value,
|
||||
|
|
@ -388,7 +396,7 @@ onMounted(async () => {
|
|||
</q-card>
|
||||
</q-card>
|
||||
|
||||
<q-card v-if="isLoad" flat bordered class="row col-12 q-mt-xs">
|
||||
<q-card v-if="isLoad && !store.isClosedRound" flat bordered class="row col-12 q-mt-xs">
|
||||
<ProcessStep />
|
||||
</q-card>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue