KPI => รายงาน

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-07-12 11:01:15 +07:00
parent 6e78a643e6
commit 8b9e8bd495

View file

@ -333,6 +333,8 @@ const formFilter = reactive({
const maxPage = ref<number>(1);
const total = ref<number>(0);
const roundRef = ref<any>(null);
const rowsPerson = ref<ResPerson[]>([]);
const columns = ref<QTableProps["columns"]>([
{
@ -398,8 +400,17 @@ const columns = ref<QTableProps["columns"]>([
* function เป popup เลอกราชช
*/
function onClickModal() {
modal.value = true;
fetchListPerson();
if (typeReport.value === "KPI8") {
roundRef.value.validate();
if (!roundRef.value.hasError) {
modal.value = true;
fetchListPerson();
}
} else {
modal.value = true;
fetchListPerson();
}
}
/**
@ -592,11 +603,13 @@ onMounted(() => {
</template>
</datepicker>
<q-select
ref="roundRef"
class="bg-white"
v-model="round"
outlined
label="รอบการประเมิน"
dense
hide-bottom-space
option-label="name"
option-value="id"
:options="roundOp"
@ -605,6 +618,12 @@ onMounted(() => {
map-options
:disable="roundOp.length === 0"
@update:model-value="changOption(typeReport)"
lazy-rules
:rules="
typeReport === 'KPI8'
? [(val) => !!val || 'กรุณาเลือกรอบการประเมิน']
: []
"
/>
<q-select
v-if="typeReport !== 'KPI8'"