no message
This commit is contained in:
parent
58a8f97e6c
commit
68771708b2
5 changed files with 66 additions and 43 deletions
|
|
@ -13,6 +13,7 @@
|
|||
:edit="clickEdit"
|
||||
:addData="false"
|
||||
:bottom="true"
|
||||
:boss="status == 'checkRegister' || status == 'payment'"
|
||||
:editData="status == 'checkRegister' || status == 'payment'"
|
||||
name="ประวัติการทำงาน (ตั้งแต่เริ่มปฏิบัติงานกับกรุงเทพมหานคร - ปัจจุบัน)"
|
||||
icon="mdi-briefcase"
|
||||
|
|
@ -83,12 +84,14 @@
|
|||
>
|
||||
<div class="col-xs-12 col-sm-6 col-md-6">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
:class="
|
||||
getClass(status == 'checkRegister' || status == 'payment')
|
||||
"
|
||||
:outlined="status == 'checkRegister' || status == 'payment'"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
:readonly="!status == 'checkRegister' || status == 'payment'"
|
||||
:borderless="!status == 'checkRegister' || status == 'payment'"
|
||||
v-model="position"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/ลักษณะงาน'}`]"
|
||||
:label="`${'ตำแหน่ง/ลักษณะงาน'}`"
|
||||
|
|
@ -98,17 +101,19 @@
|
|||
</div>
|
||||
<div class="col-xs-12 col-sm-6 col-md-6">
|
||||
<q-select
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
:class="
|
||||
getClass(status == 'checkRegister' || status == 'payment')
|
||||
"
|
||||
:outlined="status == 'checkRegister' || status == 'payment'"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
:readonly="!status == 'checkRegister' || status == 'payment'"
|
||||
:borderless="!status == 'checkRegister' || status == 'payment'"
|
||||
v-model="type"
|
||||
:options="opType"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกประเภท'}`]"
|
||||
:label="`${'ประเภท'}`"
|
||||
@update:modelValue="clickEditRow"
|
||||
@update:modelValue="clickEditRowPosition"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -160,7 +165,7 @@
|
|||
<div class="col-xs-12 col-sm-6 col-md-6">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
:readonly="!edit"
|
||||
:readonly="!status == 'checkRegister' || status == 'payment'"
|
||||
v-model="startDate"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
|
|
@ -176,11 +181,15 @@
|
|||
</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
:class="
|
||||
getClass(status == 'checkRegister' || status == 'payment')
|
||||
"
|
||||
:outlined="status == 'checkRegister' || status == 'payment'"
|
||||
dense
|
||||
lazy-rules
|
||||
:borderless="!edit"
|
||||
:borderless="
|
||||
!status == 'checkRegister' || status == 'payment'
|
||||
"
|
||||
:model-value="date2Thai(startDate)"
|
||||
:rules="[
|
||||
(val) => !!val || `${'กรุณาเลือกวันที่เริ่ม'}`,
|
||||
|
|
@ -196,7 +205,7 @@
|
|||
name="event"
|
||||
class="cursor-pointer"
|
||||
:style="
|
||||
edit
|
||||
status == 'checkRegister' || status == 'payment'
|
||||
? 'color: var(--q-primary)'
|
||||
: 'color: var(--q-grey)'
|
||||
"
|
||||
|
|
@ -210,7 +219,7 @@
|
|||
<div class="col-xs-12 col-sm-6 col-md-6">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
:readonly="!edit"
|
||||
:readonly="!status == 'checkRegister' || status == 'payment'"
|
||||
v-model="endDate"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
|
|
@ -226,11 +235,15 @@
|
|||
</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
:class="
|
||||
getClass(status == 'checkRegister' || status == 'payment')
|
||||
"
|
||||
:outlined="status == 'checkRegister' || status == 'payment'"
|
||||
dense
|
||||
lazy-rules
|
||||
:borderless="!edit"
|
||||
:borderless="
|
||||
!status == 'checkRegister' || status == 'payment'
|
||||
"
|
||||
:model-value="date2Thai(endDate)"
|
||||
:rules="[
|
||||
(val) => !!val || `${'กรุณาเลือกวันที่สิ้นสุด'}`,
|
||||
|
|
@ -246,7 +259,7 @@
|
|||
name="event"
|
||||
class="cursor-pointer"
|
||||
:style="
|
||||
edit
|
||||
status == 'checkRegister' || status == 'payment'
|
||||
? 'color: var(--q-primary)'
|
||||
: 'color: var(--q-grey)'
|
||||
"
|
||||
|
|
@ -506,6 +519,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 + " วัน " : ""}`;
|
||||
|
|
@ -543,6 +564,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