diff --git a/src/modules/14_KPI/components/indicatorByRole/DetailView.vue b/src/modules/14_KPI/components/indicatorByRole/DetailView.vue index d0287e96e..3e1bc03e7 100644 --- a/src/modules/14_KPI/components/indicatorByRole/DetailView.vue +++ b/src/modules/14_KPI/components/indicatorByRole/DetailView.vue @@ -126,8 +126,7 @@ function onSubmit() { const body = { position: form.position, //ตำแหน่ง - year: form.year, //ปีงบประมาณ - round: form.round, //รอบการประเมิน(เมษา->APR, ตุลา->OCT) + kpiPeriodId: form.round, //รอบการประเมิน(เมษา->APR, ตุลา->OCT) including: form.including, //รหัสตัวชี้วัด includingName: form.includingName, //ชื่อตัวชี้วัด target: form.target, //ค่าเป้าหมาย @@ -165,7 +164,7 @@ function getDetail() { .then((res) => { const data = res.data.result; form.position = data.position; - form.year = data.year; + form.year = data.year == null ? 0:data.year; form.round = data.round; form.including = data.including; form.includingName = data.includingName; @@ -259,6 +258,7 @@ function getRound() { }); } + function statusTothai(val: string) { switch (val) { case "SPECIAL": @@ -273,9 +273,9 @@ function statusTothai(val: string) { } onMounted(() => { - getRound() fetchActive(); getOptions(); + getRound() if (id.value !== "") { console.log("edit"); getDetail(); @@ -334,6 +334,7 @@ onMounted(() => { autoApply year-picker :enableTimePicker="false" + @update:model-value="form.round = '',getRound()" >