แก้ไข type

This commit is contained in:
Thanit Konmek 2023-07-07 15:53:30 +07:00
parent e72f86e1d4
commit a3905a84b6
5 changed files with 32 additions and 12 deletions

View file

@ -205,7 +205,7 @@ const defaultAdd = () => {
if (props.statusAdd) {
edit.value = props.statusAdd;
name.value = "";
if (uploader.value !== null) {
if (uploader.value) {
uploader.value.reset();
}
}

View file

@ -116,7 +116,11 @@
lazy-rules
:readonly="!edit"
:borderless="!edit"
:model-value="date2Thai(informaData.birthDate)"
:model-value="
informaData.birthDate == null
? ''
: date2Thai(informaData.birthDate)
"
:rules="[(val:string) => !!val || `${'กรุณาเลือก วัน/เดือน/ปี เกิด'}`]"
:label="`${'วัน/เดือน/ปี เกิด'}`"
>
@ -1051,7 +1055,10 @@ const editData = async () => {
nationality: informaData.value.nationality,
race: informaData.value.ethnicity,
religionId: informaData.value.religionId,
birthDate: dateToISO(informaData.value.birthDate) ?? dateToISO(new Date()),
birthDate:
informaData.value.birthDate == null
? dateToISO(new Date())
: dateToISO(informaData.value.birthDate),
bloodGroupId: informaData.value.bloodId,
relationshipId: informaData.value.statusId,
telephoneNumber: informaData.value.tel,

View file

@ -70,7 +70,7 @@
</template>
<template v-slot:body-selection="scope">
<q-checkbox
<!-- <q-checkbox
keep-color
color="primary"
dense
@ -83,6 +83,12 @@
);
}
"
/> -->
<q-checkbox
keep-color
color="primary"
dense
v-model="scope.selected"
/>
</template>
@ -175,6 +181,7 @@ import { ref } from "vue";
import { useQuasar } from "quasar";
import type { QInput } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
import type { QTableProps } from "quasar";
const props = defineProps({
next: {
@ -197,7 +204,7 @@ const $q = useQuasar();
const filterRef = ref<QInput>();
const filter = ref<string>("");
const visibleColumns = ref<String[]>(["no", "idcard", "name", "educate"]);
const columns = [
const columns = ref<QTableProps["columns"]>([
{ name: "no", align: "left", label: "ลำดับ", field: "no", sortable: true },
{
name: "idcard",
@ -220,7 +227,7 @@ const columns = [
field: "educate",
sortable: true,
},
];
]);
const rows = [
{

View file

@ -270,7 +270,7 @@
</template>
<template v-slot:body-selection="scope">
<q-checkbox
<!-- <q-checkbox
keep-color
color="primary"
dense
@ -283,6 +283,12 @@
);
}
"
/> -->
<q-checkbox
keep-color
color="primary"
dense
v-model="scope.selected"
/>
</template>
@ -337,6 +343,7 @@ import type { QInput, QForm } from "quasar";
import type { treeTab } from "@/modules/05_placement/interface/index/Main";
import http from "@/plugins/http";
import config from "@/app.config";
import type { QTableProps } from "quasar";
const props = defineProps({
next: {
@ -370,7 +377,7 @@ const selectedModal = ref([]);
const test = ref([]);
const filterModal = ref<string>("");
const visibleColumnsModal = ref<String[]>(["no", "idcard", "name"]);
const columnsModal = [
const columnsModal = ref<QTableProps["columns"]>([
{ name: "no", align: "left", label: "ลำดับ", field: "no", sortable: true },
{
name: "idcard",
@ -386,7 +393,7 @@ const columnsModal = [
field: "name",
sortable: true,
},
];
]);
const rowsModal = [
{
@ -482,7 +489,7 @@ const visibleColumns = ref<String[]>([
"agency",
"send",
]);
const columns = [
const columns = ref<QTableProps["columns"]>([
{ name: "no", align: "left", label: "ลำดับ", field: "no", sortable: true },
{
name: "idcard",
@ -519,7 +526,7 @@ const columns = [
field: "send",
sortable: true,
},
];
]);
const rows = ref([
{

View file

@ -166,7 +166,6 @@
</template>
<script setup lang="ts">
import { ref, onMounted } from "vue";
import router from "@/router";
import { useQuasar } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
import type { QInput, QForm } from "quasar";