Merge branch 'develop' of github.com:Frappet/bma-ehr-frontend into develop

* 'develop' of github.com:Frappet/bma-ehr-frontend:
  no message
This commit is contained in:
Warunee Tamkoo 2024-04-22 14:39:56 +07:00
commit 561e82dca2
2 changed files with 9 additions and 6 deletions

View file

@ -126,8 +126,7 @@ function onSubmit() {
const body = { const body = {
position: form.position, // position: form.position, //
year: form.year, // kpiPeriodId: form.round, //(->APR, ->OCT)
round: form.round, //(->APR, ->OCT)
including: form.including, // including: form.including, //
includingName: form.includingName, // includingName: form.includingName, //
target: form.target, // target: form.target, //
@ -165,7 +164,7 @@ function getDetail() {
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
form.position = data.position; form.position = data.position;
form.year = data.year; form.year = data.year == null ? 0:data.year;
form.round = data.round; form.round = data.round;
form.including = data.including; form.including = data.including;
form.includingName = data.includingName; form.includingName = data.includingName;
@ -259,6 +258,7 @@ function getRound() {
}); });
} }
function statusTothai(val: string) { function statusTothai(val: string) {
switch (val) { switch (val) {
case "SPECIAL": case "SPECIAL":
@ -273,9 +273,9 @@ function statusTothai(val: string) {
} }
onMounted(() => { onMounted(() => {
getRound()
fetchActive(); fetchActive();
getOptions(); getOptions();
getRound()
if (id.value !== "") { if (id.value !== "") {
console.log("edit"); console.log("edit");
getDetail(); getDetail();
@ -334,6 +334,7 @@ onMounted(() => {
autoApply autoApply
year-picker year-picker
:enableTimePicker="false" :enableTimePicker="false"
@update:model-value="form.round = '',getRound()"
> >
<template #year="{ year }">{{ year + 543 }}</template> <template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{ <template #year-overlay-value="{ value }">{{
@ -347,9 +348,10 @@ onMounted(() => {
hide-bottom-space hide-bottom-space
outlined outlined
:model-value=" :model-value="
form.year === null ? null : Number(form.year) + 543 form.year === 0 ? null : Number(form.year) + 543
" "
:label="`${'ปีงบประมาณ'}`" :label="`${'ปีงบประมาณ'}`"
> >
<template v-slot:prepend> <template v-slot:prepend>
<q-icon <q-icon

View file

@ -74,7 +74,7 @@ function fetchList() {
http http
.get( .get(
config.API.kpiRoleMainList + config.API.kpiRoleMainList +
`?page=${formFilter.page}&pageSize=${formFilter.pageSize}&kpiPeriodId=${formFilter.round}&position=${formFilter.position}` `?page=${formFilter.page}&pageSize=${formFilter.pageSize}&kpiPeriodId=${formFilter.round}&position=${formFilter.position}&year=2024`
) )
.then((res) => { .then((res) => {
console.log(res); console.log(res);
@ -306,6 +306,7 @@ onMounted(async () => {
option-value="id" option-value="id"
emit-value emit-value
map-options map-options
@update:model-value="fetchList" @update:model-value="fetchList"
style="width: 200px;" style="width: 200px;"
/> />