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

View file

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

View file

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

View file

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

View file

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

View file

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