no message
This commit is contained in:
parent
c16c062bcb
commit
346e31999f
2 changed files with 22 additions and 4 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue