hide bottom space rule
This commit is contained in:
parent
3c12d849f6
commit
a95c2fcbb4
10 changed files with 469 additions and 494 deletions
|
|
@ -9,10 +9,10 @@
|
|||
:addData="true"
|
||||
:editOnly="false"
|
||||
:cancel="cancelData"
|
||||
:changeBtn="changeBtn"
|
||||
:editData="status == 'register' || status == 'rejectRegister'"
|
||||
:disable="statusEdit"
|
||||
/>
|
||||
<!-- :changeBtn="changeBtn" -->
|
||||
<q-form ref="myform" class="col-12">
|
||||
<div class="row col-12 items-center q-col-gutter-x-xs q-col-gutter-y-xs">
|
||||
<div class="col-xs-12 q-gutter-sm items-center flex q-my-sm">
|
||||
|
|
@ -40,7 +40,6 @@
|
|||
</div>
|
||||
<div class="col-xs-12 col-sm-2 col-md-2" v-if="familyData.same == '1'">
|
||||
<q-select
|
||||
hide-bottom-space
|
||||
:class="getClass(edit)"
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
|
|
@ -61,7 +60,6 @@
|
|||
<div class="col-xs-6 col-sm-3 col-md-3" v-if="familyData.same == '1'">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
|
|
@ -75,7 +73,6 @@
|
|||
<div class="col-xs-6 col-sm-3 col-md-3" v-if="familyData.same == '1'">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
|
|
@ -89,7 +86,6 @@
|
|||
<div class="col-xs-12 col-sm-2 col-md-2" v-if="familyData.same == '1'">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
|
|
@ -103,7 +99,6 @@
|
|||
<div class="col-xs-12 col-sm-2 col-md-2" v-if="familyData.same == '1'">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
|
|
@ -118,7 +113,6 @@
|
|||
<div class="col-xs-12 text-weight-bold">• บิดา</div>
|
||||
<div class="col-xs-12 col-sm-2 col-md-2">
|
||||
<q-select
|
||||
hide-bottom-space
|
||||
:class="getClass(edit)"
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
|
|
@ -139,7 +133,6 @@
|
|||
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
|
|
@ -153,7 +146,6 @@
|
|||
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
|
|
@ -167,7 +159,6 @@
|
|||
<div class="col-xs-12 col-sm-2 col-md-2">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
|
|
@ -181,7 +172,6 @@
|
|||
<div class="col-xs-12 col-sm-2 col-md-2">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
|
|
@ -196,7 +186,6 @@
|
|||
<div class="col-xs-12 text-weight-bold">• มารดา</div>
|
||||
<div class="col-xs-12 col-sm-2 col-md-2">
|
||||
<q-select
|
||||
hide-bottom-space
|
||||
:class="getClass(edit)"
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
|
|
@ -216,7 +205,6 @@
|
|||
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
|
|
@ -230,7 +218,6 @@
|
|||
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
|
|
@ -244,7 +231,6 @@
|
|||
<div class="col-xs-12 col-sm-2 col-md-2">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
|
|
@ -258,7 +244,6 @@
|
|||
<div class="col-xs-12 col-sm-2 col-md-2">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
|
|
@ -272,11 +257,11 @@
|
|||
</div>
|
||||
</q-form>
|
||||
</q-card>
|
||||
<q-dialog :model-value="modalConsend" persistent>
|
||||
<!-- <q-dialog :model-value="modalConsend" persistent>
|
||||
<q-card style="min-width: 800px">
|
||||
<Conference :ok="consendOk" :close="consenClose" />
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</q-dialog> -->
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, watch } from 'vue'
|
||||
|
|
@ -314,10 +299,10 @@ const $q = useQuasar()
|
|||
const mixin = useCounterMixin()
|
||||
const store = useExamDataStore()
|
||||
const { success } = mixin
|
||||
const edit = ref<boolean>(false)
|
||||
const edit = ref<boolean>(true)
|
||||
const myform = ref<any>()
|
||||
const familyData = ref<Family>(defaultFamily)
|
||||
const modalConsend = ref<boolean>(false)
|
||||
// const modalConsend = ref<boolean>(false)
|
||||
const candidateId = ref<string>('2223ba53-2fb2-470b-8dc1-27e5471b0331')
|
||||
const loader = ref<boolean>(false)
|
||||
|
||||
|
|
@ -359,61 +344,61 @@ const fetchData = async () => {
|
|||
const saveData = async () => {
|
||||
await myform.value.validate().then(async (suc: boolean) => {
|
||||
if (suc) {
|
||||
if (store.consend == true) {
|
||||
loader.value = true
|
||||
await http
|
||||
.post(config.API.candidateFamily(candidateId.value), {
|
||||
marryPrefixId: familyData.value.prefixIdC,
|
||||
marryFirstName: familyData.value.firstnameC,
|
||||
marryLastName: familyData.value.lastnameC,
|
||||
marryOccupation: familyData.value.occupationC,
|
||||
marryNationality: familyData.value.nationalityC,
|
||||
fatherPrefixId: familyData.value.prefixIdM,
|
||||
fatherFirstName: familyData.value.firstnameM,
|
||||
fatherLastName: familyData.value.lastnameM,
|
||||
fatherOccupation: familyData.value.occupationM,
|
||||
fatherNationality: familyData.value.nationalityM,
|
||||
motherPrefixId: familyData.value.prefixIdF,
|
||||
motherFirstName: familyData.value.firstnameF,
|
||||
motherLastName: familyData.value.lastnameF,
|
||||
motherOccupation: familyData.value.occupationF,
|
||||
motherNationality: familyData.value.nationalityF,
|
||||
marry: familyData.value.same == '1' ? true : familyData.value.same == '0' ? false : null
|
||||
})
|
||||
.then(() => {
|
||||
success($q, 'บันทึกข้อมูลครอบครัวสำเร็จ')
|
||||
edit.value = false
|
||||
emit('update:statusEdit', false)
|
||||
})
|
||||
.catch(() => {
|
||||
// modalError.value = true
|
||||
// modalErrorTittle.value = 'ไม่สามารถบันทึกข้อมูลร่างได้'
|
||||
// modalErrorDetail.value = e.response.data.message
|
||||
// statusCode.value = e.response.data.status
|
||||
})
|
||||
.finally(async () => {
|
||||
loader.value = false
|
||||
await fetchData()
|
||||
})
|
||||
} else {
|
||||
modalConsend.value = true
|
||||
}
|
||||
// if (store.consend == true) {
|
||||
loader.value = true
|
||||
await http
|
||||
.post(config.API.candidateFamily(candidateId.value), {
|
||||
marryPrefixId: familyData.value.prefixIdC,
|
||||
marryFirstName: familyData.value.firstnameC,
|
||||
marryLastName: familyData.value.lastnameC,
|
||||
marryOccupation: familyData.value.occupationC,
|
||||
marryNationality: familyData.value.nationalityC,
|
||||
fatherPrefixId: familyData.value.prefixIdM,
|
||||
fatherFirstName: familyData.value.firstnameM,
|
||||
fatherLastName: familyData.value.lastnameM,
|
||||
fatherOccupation: familyData.value.occupationM,
|
||||
fatherNationality: familyData.value.nationalityM,
|
||||
motherPrefixId: familyData.value.prefixIdF,
|
||||
motherFirstName: familyData.value.firstnameF,
|
||||
motherLastName: familyData.value.lastnameF,
|
||||
motherOccupation: familyData.value.occupationF,
|
||||
motherNationality: familyData.value.nationalityF,
|
||||
marry: familyData.value.same == '1' ? true : familyData.value.same == '0' ? false : null
|
||||
})
|
||||
.then(() => {
|
||||
success($q, 'บันทึกข้อมูลครอบครัวสำเร็จ')
|
||||
// edit.value = false
|
||||
emit('update:statusEdit', false)
|
||||
})
|
||||
.catch(() => {
|
||||
// modalError.value = true
|
||||
// modalErrorTittle.value = 'ไม่สามารถบันทึกข้อมูลร่างได้'
|
||||
// modalErrorDetail.value = e.response.data.message
|
||||
// statusCode.value = e.response.data.status
|
||||
})
|
||||
.finally(async () => {
|
||||
loader.value = false
|
||||
await fetchData()
|
||||
})
|
||||
// } else {
|
||||
// modalConsend.value = true
|
||||
// }
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const changeBtn = async () => {
|
||||
if (edit.value == true) {
|
||||
if (props.statusEdit === true) {
|
||||
edit.value = false
|
||||
props.notiNoEdit()
|
||||
} else {
|
||||
emit('update:statusEdit', true)
|
||||
}
|
||||
} else {
|
||||
emit('update:statusEdit', false)
|
||||
}
|
||||
}
|
||||
// const changeBtn = async () => {
|
||||
// if (edit.value == true) {
|
||||
// if (props.statusEdit === true) {
|
||||
// edit.value = false
|
||||
// props.notiNoEdit()
|
||||
// } else {
|
||||
// emit('update:statusEdit', true)
|
||||
// }
|
||||
// } else {
|
||||
// emit('update:statusEdit', false)
|
||||
// }
|
||||
// }
|
||||
|
||||
const selectRadio = (e: boolean) => {
|
||||
if (!e) {
|
||||
|
|
@ -424,15 +409,15 @@ const selectRadio = (e: boolean) => {
|
|||
}
|
||||
}
|
||||
|
||||
const consenClose = () => {
|
||||
modalConsend.value = false
|
||||
}
|
||||
// const consenClose = () => {
|
||||
// modalConsend.value = false
|
||||
// }
|
||||
|
||||
const consendOk = async () => {
|
||||
modalConsend.value = false
|
||||
store.consend = true
|
||||
saveData()
|
||||
}
|
||||
// const consendOk = async () => {
|
||||
// modalConsend.value = false
|
||||
// store.consend = true
|
||||
// saveData()
|
||||
// }
|
||||
|
||||
const cancelData = () => {}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue