no message

This commit is contained in:
Kittapath 2023-10-13 17:33:15 +07:00
parent c16c062bcb
commit 346e31999f
2 changed files with 22 additions and 4 deletions

View file

@ -71,13 +71,13 @@
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width v-if="editBtn == true" />
<q-th auto-width v-if="boss == true" />
</q-tr>
</template>
<template #body="props">
<slot v-bind="props" name="columns"></slot>
</template>
<template v-slot:bottom v-if="bottom == true">
<template v-slot:bottom v-if="bottom == true">
<slot v-bind="props" name="bottom"></slot>
</template>
</q-table>
@ -94,7 +94,8 @@ const props = defineProps({
inputvisible: Array,
editvisible: Boolean,
nameHeader: Boolean,
bottom:Boolean,
bottom: Boolean,
boss: Boolean,
addData: {
type: Boolean,
defualt: true

View file

@ -13,6 +13,7 @@
:edit="clickEdit"
:addData="false"
:bottom="true"
:editBtn="false"
:editData="status == 'register' || status == 'rejectRegister'"
name="ประวัติการทำงาน (ตั้งแต่เริ่มปฏิบัติงานกับกรุงเทพมหานคร - ปัจจุบัน)"
icon="mdi-briefcase"
@ -33,7 +34,7 @@
{{ col.value }}
</div>
</q-td>
<q-td auto-width v-if="edit === true">
<q-td auto-width v-if="status == 'startDate' || status == 'endDate'">
<q-btn
color="red"
flat
@ -456,6 +457,14 @@ const calDate = async () => {
}
dayDiff += daysInMonth[_startDate.getMonth()]
}
if (dayDiff >= 30) {
monthDiff = monthDiff + 1
dayDiff = 0
if (monthDiff >= 12) {
yearDiff = yearDiff + 1
monthDiff = 0
}
}
rangeDate.value = `${yearDiff > 0 ? yearDiff + ' ปี ' : ''}${
monthDiff > 0 ? monthDiff + ' เดือน ' : ''
}${dayDiff > 0 ? dayDiff + ' วัน ' : ''}`
@ -490,6 +499,14 @@ const calDateSplit = async (startDate: Date, endDate: Date) => {
}
dayDiff += daysInMonth[_startDate.getMonth()]
}
if (dayDiff >= 30) {
monthDiff = monthDiff + 1
dayDiff = 0
if (monthDiff >= 12) {
yearDiff = yearDiff + 1
monthDiff = 0
}
}
var obj = {
yearDiff: yearDiff,
monthDiff: monthDiff,