ทะเบียนประวัติ: clearable

This commit is contained in:
oat_dev 2024-03-29 17:08:52 +07:00
parent e7076ee06c
commit f07f3acd51
6 changed files with 15 additions and 15 deletions

View file

@ -9,6 +9,7 @@ import type { RequestItemsObject } from "@/modules/04_registryNew/interface/requ
import type { ResponseObject } from "@/modules/04_registryNew/interface/response/ProfesLicense";
import http from "@/plugins/http";
import config from "@/app.config";
import { log } from "console";
const mixin = useCounterMixin();
const $q = useQuasar();
const {
@ -179,7 +180,7 @@ const profesLicenseData = reactive<RequestItemsObject>({
issuer: "",
certificateNo: "",
issueDate: new Date(),
expireDate: new Date(),
expireDate: null,
profileId: id.value,
});
@ -244,7 +245,7 @@ async function fetchData(id: string) {
}
function clearForm() {
profesLicenseData.expireDate = new Date();
profesLicenseData.expireDate = null;
profesLicenseData.issueDate = new Date();
profesLicenseData.certificateNo = "";
profesLicenseData.certificateType = "";
@ -642,6 +643,8 @@ onMounted(async () => {
dense
outlined
bg-color="white"
clearable
@clear="() => (profesLicenseData.expireDate = null)"
hide-bottom-space
:model-value="
profesLicenseData.expireDate
@ -649,6 +652,7 @@ onMounted(async () => {
: ''
"
:label="`${'วันที่หมดอายุ'}`"
@update:modelValue="profesLicenseData.expireDate"
>
<template v-slot:prepend>
<q-icon

View file

@ -295,12 +295,12 @@ const trainData = reactive<RequestItemsObject>({
profileId: id.value,
name: "",
topic: "",
yearly: new Date().getFullYear(),
yearly: null,
place: "",
duration: "",
department: "",
numberOrder: "",
dateOrder: new Date(),
dateOrder: null,
startDate: new Date(),
endDate: new Date(),
startYear: new Date().getFullYear(),
@ -360,7 +360,7 @@ function clearForm() {
isDate.value = "false";
trainData.name = "";
trainData.topic = "";
trainData.yearly = new Date().getFullYear();
trainData.yearly = null;
trainData.place = "";
trainData.duration = "";
trainData.department = "";
@ -959,7 +959,9 @@ onMounted(async () => {
lazy-rules
outlined
hide-bottom-space
:model-value="trainData.yearly + 543"
:model-value="
!!trainData.yearly ? trainData.yearly + 543 : null
"
:label="`${'ปีงบประมาณ'}`"
>
<template v-slot:prepend>

View file

@ -520,7 +520,6 @@ onMounted(async () => {
label="คำนำหน้าชื่อ"
v-model="fatherData.prefix"
use-input
clearable
input-debounce="0"
emit-value
map-options
@ -649,7 +648,6 @@ onMounted(async () => {
label="คำนำหน้าชื่อ"
hidden-space
use-input
clearable
input-debounce="0"
emit-value
map-options
@ -778,7 +776,6 @@ onMounted(async () => {
label="คำนำหน้าชื่อ"
hidden-space
use-input
clearable
input-debounce="0"
emit-value
map-options
@ -899,7 +896,6 @@ onMounted(async () => {
:rules="[(val) => !!val || 'กรุณาเลือกคำนำหน้าชื่อ']"
label="คำนำหน้าชื่อ"
use-input
clearable
input-debounce="0"
emit-value
map-options

View file

@ -977,7 +977,6 @@ onMounted(async () => {
) "
:rules="[(val) => !!val || `${'กรุณาเลือกระดับการศึกษา'}`]"
label="ระดับการศึกษา"
clearable
/>
</div>
<div class="col-6">
@ -1237,7 +1236,6 @@ onMounted(async () => {
dense
emit-value
map-options
clearable
bg-color="white"
v-model="educationData.isEducation"
:options="educationOption"

View file

@ -3,7 +3,7 @@ interface RequestItemsObject {
issuer: string;
certificateNo: string;
issueDate: Date;
expireDate: Date;
expireDate: Date | null;
profileId: string;
}

View file

@ -1,12 +1,12 @@
interface RequestItemsObject {
name: string,
topic: string,
yearly: number,
yearly: number | null,
place: string,
duration: string,
department: string,
numberOrder: string,
dateOrder: Date,
dateOrder: Date | null,
startDate: Date,
endDate: Date,
startYear: number,