consend form
This commit is contained in:
parent
6fe6aed921
commit
380eb0d10b
17 changed files with 482 additions and 346 deletions
|
|
@ -220,6 +220,11 @@
|
|||
</div>
|
||||
</q-form>
|
||||
</q-card>
|
||||
<q-dialog :model-value="modalConsend" persistent>
|
||||
<q-card style="min-width: 800px">
|
||||
<Conference :ok="consendOk" :close="consenClose" />
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, watch } from 'vue'
|
||||
|
|
@ -230,8 +235,11 @@ import config from '@/app.config'
|
|||
import type { Address, DataOption, zipCodeOption } from '@/modules/01_exam/interface/index/Main'
|
||||
import { defaultAddress } from '@/modules/01_exam/interface/index/Main'
|
||||
import HeaderTop from '@/components/top.vue'
|
||||
import Conference from '@/modules/01_exam/components/Conference.vue'
|
||||
import { useExamDataStore } from '@/modules/01_exam/store'
|
||||
|
||||
const mixin = useCounterMixin()
|
||||
const store = useExamDataStore()
|
||||
const { date2Thai, calAge } = mixin
|
||||
|
||||
const edit = ref<boolean>(false)
|
||||
|
|
@ -239,6 +247,7 @@ const addressData = ref<Address>(defaultAddress)
|
|||
const myform = ref<any>()
|
||||
const codep = ref<string>('')
|
||||
const codec = ref<string>('')
|
||||
const modalConsend = ref<boolean>(false)
|
||||
|
||||
const provinceOptions = ref<DataOption[]>([])
|
||||
const districtOptions = ref<DataOption[]>([])
|
||||
|
|
@ -270,11 +279,17 @@ onMounted(() => {
|
|||
})
|
||||
|
||||
const saveData = async () => {
|
||||
await myform.value.validate().then(async (success: boolean) => {
|
||||
if (success) {
|
||||
} else {
|
||||
}
|
||||
})
|
||||
if (store.consend == true) {
|
||||
edit.value = false
|
||||
emit('update:statusEdit', false)
|
||||
await myform.value.validate().then(async (success: boolean) => {
|
||||
if (success) {
|
||||
} else {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
modalConsend.value = true
|
||||
}
|
||||
}
|
||||
|
||||
const changeBtn = async () => {
|
||||
|
|
@ -402,6 +417,16 @@ const fetchSubDistrict = async (id: string, position: string) => {
|
|||
// })
|
||||
}
|
||||
|
||||
const consenClose = () => {
|
||||
modalConsend.value = false
|
||||
}
|
||||
|
||||
const consendOk = () => {
|
||||
modalConsend.value = false
|
||||
store.consend = true
|
||||
saveData()
|
||||
}
|
||||
|
||||
const cancelData = () => {}
|
||||
|
||||
const getClass = (val: boolean) => {
|
||||
|
|
|
|||
|
|
@ -272,6 +272,11 @@
|
|||
</div>
|
||||
</q-form>
|
||||
</q-card>
|
||||
<q-dialog :model-value="modalConsend" persistent>
|
||||
<q-card style="min-width: 800px">
|
||||
<Conference :ok="consendOk" :close="consenClose" />
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, watch } from 'vue'
|
||||
|
|
@ -280,14 +285,18 @@ import { useCounterMixin } from '@/stores/mixin'
|
|||
import type { Family, DataOption } from '@/modules/01_exam/interface/index/Main'
|
||||
import { defaultFamily } from '@/modules/01_exam/interface/index/Main'
|
||||
import HeaderTop from '@/components/top.vue'
|
||||
import Conference from '@/modules/01_exam/components/Conference.vue'
|
||||
import { useExamDataStore } from '@/modules/01_exam/store'
|
||||
|
||||
const mixin = useCounterMixin()
|
||||
const store = useExamDataStore()
|
||||
const { date2Thai, calAge } = mixin
|
||||
|
||||
const edit = ref<boolean>(false)
|
||||
const myform = ref<any>()
|
||||
const familyData = ref<Family>(defaultFamily)
|
||||
const statusOptions = ref<DataOption[]>([])
|
||||
const modalConsend = ref<boolean>(false)
|
||||
|
||||
// const prefixOptions = ref<any>([
|
||||
// { id: "1", name: "นาย" },
|
||||
|
|
@ -319,11 +328,17 @@ const emit = defineEmits(['update:statusEdit'])
|
|||
onMounted(() => {})
|
||||
|
||||
const saveData = async () => {
|
||||
await myform.value.validate().then(async (success: boolean) => {
|
||||
if (success) {
|
||||
} else {
|
||||
}
|
||||
})
|
||||
if (store.consend == true) {
|
||||
edit.value = false
|
||||
emit('update:statusEdit', false)
|
||||
await myform.value.validate().then(async (success: boolean) => {
|
||||
if (success) {
|
||||
} else {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
modalConsend.value = true
|
||||
}
|
||||
}
|
||||
|
||||
const changeBtn = async () => {
|
||||
|
|
@ -348,6 +363,16 @@ const selectRadio = (e: boolean, i: any) => {
|
|||
}
|
||||
}
|
||||
|
||||
const consenClose = () => {
|
||||
modalConsend.value = false
|
||||
}
|
||||
|
||||
const consendOk = () => {
|
||||
modalConsend.value = false
|
||||
store.consend = true
|
||||
saveData()
|
||||
}
|
||||
|
||||
const cancelData = () => {}
|
||||
|
||||
const getClass = (val: boolean) => {
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@
|
|||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
:max-date="new Date()"
|
||||
:disabled="!edit"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
|
|
@ -218,6 +219,7 @@
|
|||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
:max-date="new Date()"
|
||||
:disabled="!edit"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
|
|
@ -325,6 +327,11 @@
|
|||
</div>
|
||||
</q-form>
|
||||
</q-card>
|
||||
<q-dialog :model-value="modalConsend" persistent>
|
||||
<q-card style="min-width: 800px">
|
||||
<Conference :ok="consendOk" :close="consenClose" />
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, watch } from 'vue'
|
||||
|
|
@ -336,8 +343,11 @@ import HeaderTop from '@/components/top.vue'
|
|||
import http from '@/plugins/http'
|
||||
import config from '@/app.config'
|
||||
import type { file } from '@babel/types'
|
||||
import Conference from '@/modules/01_exam/components/Conference.vue'
|
||||
import { useExamDataStore } from '@/modules/01_exam/store'
|
||||
|
||||
const mixin = useCounterMixin()
|
||||
const store = useExamDataStore()
|
||||
const { date2Thai, calAge } = mixin
|
||||
|
||||
const edit = ref<boolean>(false)
|
||||
|
|
@ -346,6 +356,7 @@ const provinceOptions = ref<DataOption[]>([])
|
|||
const myform = ref<any>()
|
||||
const imageUrl = ref<string | null>(null)
|
||||
const disabledPic = ref<boolean>(false)
|
||||
const modalConsend = ref<boolean>(false)
|
||||
const fileData = ref<File | null>()
|
||||
const props = defineProps({
|
||||
prefixOptions: {
|
||||
|
|
@ -393,11 +404,17 @@ onMounted(() => {
|
|||
})
|
||||
|
||||
const saveData = async () => {
|
||||
await myform.value.validate().then(async (success: boolean) => {
|
||||
if (success) {
|
||||
} else {
|
||||
}
|
||||
})
|
||||
if (store.consend == true) {
|
||||
edit.value = false
|
||||
emit('update:statusEdit', false)
|
||||
await myform.value.validate().then(async (success: boolean) => {
|
||||
if (success) {
|
||||
} else {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
modalConsend.value = true
|
||||
}
|
||||
}
|
||||
|
||||
const changeBtn = async () => {
|
||||
|
|
@ -442,6 +459,16 @@ const pickFile = () => {
|
|||
disabledPic.value = true
|
||||
}
|
||||
|
||||
const consenClose = () => {
|
||||
modalConsend.value = false
|
||||
}
|
||||
|
||||
const consendOk = () => {
|
||||
modalConsend.value = false
|
||||
store.consend = true
|
||||
saveData()
|
||||
}
|
||||
|
||||
const cancelData = () => {
|
||||
fileData.value = null
|
||||
disabledPic.value = false
|
||||
|
|
|
|||
|
|
@ -230,6 +230,11 @@
|
|||
</div>
|
||||
</q-form>
|
||||
</q-card>
|
||||
<q-dialog :model-value="modalConsend" persistent>
|
||||
<q-card style="min-width: 800px">
|
||||
<Conference :ok="consendOk" :close="consenClose" />
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, watch } from 'vue'
|
||||
|
|
@ -239,10 +244,15 @@ import config from '@/app.config'
|
|||
import type { Occupation } from '@/modules/01_exam/interface/index/Main'
|
||||
import { defaultOccupation } from '@/modules/01_exam/interface/index/Main'
|
||||
import HeaderTop from '@/components/top.vue'
|
||||
import Conference from '@/modules/01_exam/components/Conference.vue'
|
||||
import { useExamDataStore } from '@/modules/01_exam/store'
|
||||
|
||||
const store = useExamDataStore()
|
||||
|
||||
const edit = ref<boolean>(false)
|
||||
const occupationData = ref<Occupation>(defaultOccupation)
|
||||
const myform = ref<any>()
|
||||
const modalConsend = ref<boolean>(false)
|
||||
|
||||
const props = defineProps({
|
||||
statusEdit: {
|
||||
|
|
@ -264,11 +274,17 @@ const emit = defineEmits(['update:statusEdit'])
|
|||
onMounted(() => {})
|
||||
|
||||
const saveData = async () => {
|
||||
await myform.value.validate().then(async (success: boolean) => {
|
||||
if (success) {
|
||||
} else {
|
||||
}
|
||||
})
|
||||
if (store.consend == true) {
|
||||
edit.value = false
|
||||
emit('update:statusEdit', false)
|
||||
await myform.value.validate().then(async (success: boolean) => {
|
||||
if (success) {
|
||||
} else {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
modalConsend.value = true
|
||||
}
|
||||
}
|
||||
|
||||
const changeBtn = async () => {
|
||||
|
|
@ -284,6 +300,16 @@ const changeBtn = async () => {
|
|||
}
|
||||
}
|
||||
|
||||
const consenClose = () => {
|
||||
modalConsend.value = false
|
||||
}
|
||||
|
||||
const consendOk = () => {
|
||||
modalConsend.value = false
|
||||
store.consend = true
|
||||
saveData()
|
||||
}
|
||||
|
||||
const cancelData = () => {}
|
||||
|
||||
const getClass = (val: boolean) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue