สอบคัดเลือกรวมวันทำงาน

This commit is contained in:
Kittapath 2023-10-09 13:06:55 +07:00
parent acbec63df7
commit c62c745f5e
4 changed files with 25 additions and 20 deletions

View file

@ -12,6 +12,7 @@
:add="clickAdd"
:edit="clickEdit"
:addData="false"
:bottom="true"
:editData="status == 'checkRegister' || status == 'payment'"
name="ประวัติการทำงาน (ตั้งแต่เริ่มปฏิบัติงานกับกรุงเทพมหานคร - ปัจจุบัน)"
icon="mdi-briefcase"
@ -550,13 +551,13 @@ const fetchData = async () => {
yearDiff = yearDiff + d.yearDiff;
monthDiff = monthDiff + d.monthDiff;
dayDiff = dayDiff + d.dayDiff;
if (dayDiff > 30) {
dayDiff = dayDiff % 30;
if (dayDiff >= 30) {
monthDiff = monthDiff + parseInt((dayDiff / 30).toString());
dayDiff = dayDiff % 30;
}
if (monthDiff > 12) {
monthDiff = monthDiff % 12;
if (monthDiff >= 12) {
yearDiff = yearDiff + parseInt((monthDiff / 12).toString());
monthDiff = monthDiff % 12;
}
total.value = `${yearDiff > 0 ? yearDiff + " ปี " : ""}${
monthDiff > 0 ? monthDiff + " เดือน " : ""

View file

@ -77,6 +77,9 @@
<template #body="props">
<slot v-bind="props" name="columns"></slot>
</template>
<template v-slot:bottom v-if="bottom == true">
<slot v-bind="props" name="bottom"></slot>
</template>
</q-table>
</template>
<script setup lang="ts">
@ -99,6 +102,7 @@ const props = defineProps({
inputvisible: Array,
editvisible: Boolean,
nameHeader: Boolean,
bottom: Boolean,
addData: {
type: Boolean,
defualt: true,

View file

@ -36,6 +36,20 @@
<q-icon name="attach_file" color="blue" />
</template>
</q-file>
<div>
<q-btn
size="md"
icon="mdi-upload"
round
flat
color="blue"
v-if="statusPayment"
@click="uploadFile"
>
<q-tooltip v-if="setSeat == false">อัปโหลดที่นั่งสอบ</q-tooltip>
<q-tooltip v-if="setSeat == true">อัปโหลดคะแนนสอบ</q-tooltip>
</q-btn>
</div>
</div>
</q-card>
<div class="col-12 row q-py-sm items-center q-col-gutter-sm">
@ -70,20 +84,6 @@
<q-tooltip>ตรวจสอบขอม</q-tooltip>
</q-btn>
</div>
<div>
<q-btn
size="md"
icon="mdi-upload"
round
flat
color="blue"
v-if="statusPayment"
@click="uploadFile"
>
<q-tooltip v-if="setSeat == false">อัปโหลดที่นั่งสอบ</q-tooltip>
<q-tooltip v-if="setSeat == true">อัปโหลดคะแนนสอบ</q-tooltip>
</q-btn>
</div>
<div>
<q-btn icon="mdi-download" round color="green-6" flat>
<q-tooltip>ดาวนโหลดไฟล</q-tooltip>

View file

@ -380,13 +380,13 @@
v-model="props.row.code"
:rules="[
(val) =>
val.length >= 4 ||
val.length >= 3 ||
`${'กรุณากรอกรหัสประจำตำแหน่งที่สอบ'}`,
]"
:label="`${'รหัสประจำตำแหน่งที่สอบ'}`"
@update:modelValue="clickEditRow"
hide-bottom-space
mask="####"
mask="###"
/>
</q-td>
<q-td key="position" :props="props">