Merge branch 'develop' into devTee

This commit is contained in:
setthawutttty 2024-03-08 10:10:56 +07:00
commit f65a7086bd
5 changed files with 16 additions and 2 deletions

View file

@ -96,6 +96,7 @@ const formFilter = reactive<DataFilterPerson>({
page: 1, page: 1,
pageSize: 10, pageSize: 10,
keyword: "", keyword: "",
rootId: ""
}); });
const maxPage = ref<number>(1); const maxPage = ref<number>(1);
@ -109,6 +110,7 @@ function closeModal() {
/** function เรียกรายชื่อ คนเลื่อนเงินเดือน*/ /** function เรียกรายชื่อ คนเลื่อนเงินเดือน*/
function fetchListPerson() { function fetchListPerson() {
showLoader(); showLoader();
formFilter.rootId = store.rootId;
http http
.post(config.API.salaryListPerson, formFilter) .post(config.API.salaryListPerson, formFilter)
.then((res) => { .then((res) => {

View file

@ -9,6 +9,7 @@ interface DataFilterPerson {
page: number; page: number;
pageSize: number; pageSize: number;
keyword: string; keyword: string;
rootId: string;
} }
export type { DataFilter, DataFilterPerson }; export type { DataFilter, DataFilterPerson };

View file

@ -20,6 +20,7 @@ interface DataRound {
revisionId: string; revisionId: string;
status: string; status: string;
year: number; year: number;
isClose: boolean
} }
interface DataAgency { interface DataAgency {

View file

@ -22,6 +22,7 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
const rootId = ref<string>(""); const rootId = ref<string>("");
const roundMainCode = ref<string>(""); const roundMainCode = ref<string>("");
const roundCode = ref<string>(""); const roundCode = ref<string>("");
const isClosedRound = ref<boolean>(false); // การปิดรอบ
/** List Menu*/ /** List Menu*/
const itemMenu = ref<ItemsMenu[]>([ const itemMenu = ref<ItemsMenu[]>([
{ {
@ -151,5 +152,6 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
groupOp, groupOp,
roundMainCode, roundMainCode,
remaining, remaining,
isClosedRound
}; };
}); });

View file

@ -62,6 +62,7 @@ function getRound() {
id: x.id, id: x.id,
revisionId: x.revisionId, revisionId: x.revisionId,
shortCode: x.period, shortCode: x.period,
isClose: x.isClose,
name: name:
(x.period === "OCT" (x.period === "OCT"
? "รอบตุลาคม " ? "รอบตุลาคม "
@ -77,6 +78,7 @@ function getRound() {
: ""); : "");
store.roundMainCode = roundFilter.value.shortCode; store.roundMainCode = roundFilter.value.shortCode;
store.isClosedRound = roundFilter.value.isClose;
await getSnap(roundFilter.value.shortCode); await getSnap(roundFilter.value.shortCode);
await getAgency(roundFilter.value.revisionId); await getAgency(roundFilter.value.revisionId);
@ -168,6 +170,7 @@ async function getAgencyPosition(id: string) {
.then(async (res) => { .then(async (res) => {
const data = await res.data.result; const data = await res.data.result;
store.rootId = data.rootId;
const position = agencyOptions.value?.find( const position = agencyOptions.value?.find(
(e: DataOption) => e.id === data.rootId (e: DataOption) => e.id === data.rootId
); );
@ -227,6 +230,9 @@ function fetchSalalyPeriod(rootId: string, periodId: string, snap: string) {
/** function เปลี่ยนรอบการขั้นเงินเดือน*/ /** function เปลี่ยนรอบการขั้นเงินเดือน*/
async function onChangeRound() { async function onChangeRound() {
// isClosedRound
store.isClosedRound = roundFilter.value.isClose;
await getSnap(roundFilter.value.shortCode); await getSnap(roundFilter.value.shortCode);
await getAgency(roundFilter.value.revisionId); await getAgency(roundFilter.value.revisionId);
await getAgencyPosition(roundFilter.value.revisionId); await getAgencyPosition(roundFilter.value.revisionId);
@ -256,6 +262,8 @@ async function onChangeSnap() {
/** function เปลี่ยนหน่วยงาน*/ /** function เปลี่ยนหน่วยงาน*/
async function onChangeAgency() { async function onChangeAgency() {
store.rootId = agencyFilter.value;
if (agencyFilter.value && roundFilter.value.id && snapFilter.value) { if (agencyFilter.value && roundFilter.value.id && snapFilter.value) {
await fetchSalalyPeriod( await fetchSalalyPeriod(
agencyFilter.value, agencyFilter.value,
@ -388,7 +396,7 @@ onMounted(async () => {
</q-card> </q-card>
</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 /> <ProcessStep />
</q-card> </q-card>