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