Commit 66f2ec3f by yuzhenWang

修改受保人生日为全选

parent db5627e8
...@@ -468,7 +468,7 @@ const tableLoading = ref(false) ...@@ -468,7 +468,7 @@ const tableLoading = ref(false)
const tableData = ref([]) const tableData = ref([])
const total = ref(0) const total = ref(0)
//计算默认显示的日期(18年前的今天) //计算默认显示的日期(18年前的今天)
const defaultDisplayDate = ref(dayjs().subtract(19, 'year').toDate()) const defaultDisplayDate = ref()
// 地址组件菜单数据 // 地址组件菜单数据
const addressMenuList = ref([ const addressMenuList = ref([
...@@ -761,13 +761,11 @@ const handleDateChange = child => { ...@@ -761,13 +761,11 @@ const handleDateChange = child => {
} }
} }
const disabledDate = (time, child) => { const disabledDate = (time, child) => {
if (child.key == 'birthday') { if (child.key == 'birthday' && props.activeName !== 'insurantInfo') {
// 计算18年前的今天 // 计算18年前的今天
const eighteenYearsAgo = dayjs().subtract(19, 'year') const eighteenYearsAgo = dayjs().subtract(19, 'year')
// 禁用今天之后的日期和18年前的今天之后的日期 // 禁用今天之后的日期和18年前的今天之后的日期
return time.getTime() > Date.now() || time.getTime() > eighteenYearsAgo.valueOf() return time.getTime() > Date.now() || time.getTime() > eighteenYearsAgo.valueOf()
} else {
return time.getTime() > Date.now()
} }
} }
const exportInfo = () => { const exportInfo = () => {
...@@ -1594,6 +1592,9 @@ watch( ...@@ -1594,6 +1592,9 @@ watch(
(newVal, oldVal) => { (newVal, oldVal) => {
editStatus.value = false editStatus.value = false
customerRightRef.value = null customerRightRef.value = null
if (newVal === 'customer' || newVal === 'policyholder') {
defaultDisplayDate.value = dayjs().subtract(19, 'year').toDate()
}
if (newVal === 'customer') { if (newVal === 'customer') {
processFormData() processFormData()
// if (JSON.stringify(customerForm.value) != '{}') { // if (JSON.stringify(customerForm.value) != '{}') {
...@@ -1622,6 +1623,7 @@ watch( ...@@ -1622,6 +1623,7 @@ watch(
processFormData() processFormData()
} }
} else if (newVal === 'insurantInfo') { } else if (newVal === 'insurantInfo') {
defaultDisplayDate.value = dayjs().startOf('day')
editStatus.value = props.fatherEditStatus editStatus.value = props.fatherEditStatus
if (JSON.stringify(insuredForm.value) != '{}') { if (JSON.stringify(insuredForm.value) != '{}') {
form.value = JSON.parse(JSON.stringify(insuredForm.value)) form.value = JSON.parse(JSON.stringify(insuredForm.value))
......
...@@ -49,14 +49,14 @@ ...@@ -49,14 +49,14 @@
>编辑</el-button >编辑</el-button
> >
<el-button <!-- <el-button
type="primary" type="primary"
v-if="!editStatus" v-if="!editStatus"
@click="handleSubmit('editStorage')" @click="handleSubmit('editStorage')"
:disabled="submitLoading" :disabled="submitLoading"
:loading="submitLoading" :loading="submitLoading"
>暂存</el-button >暂存</el-button
> > -->
<el-button <el-button
v-if="!editStatus" v-if="!editStatus"
type="success" type="success"
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
:loading="submitLoading" :loading="submitLoading"
>提交</el-button >提交</el-button
> >
<el-button <!-- <el-button
type="primary" type="primary"
plain plain
v-if="!idsObj.appointmentBizId && source == 'fnaList'" v-if="!idsObj.appointmentBizId && source == 'fnaList'"
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
:disabled="submitLoading" :disabled="submitLoading"
:loading="submitLoading" :loading="submitLoading"
>暂存</el-button >暂存</el-button
> > -->
<el-button <el-button
style="margin-left: 10px" style="margin-left: 10px"
v-if="idsObj.appointmentBizId" v-if="idsObj.appointmentBizId"
...@@ -1070,6 +1070,8 @@ const handleSubmit = async type => { ...@@ -1070,6 +1070,8 @@ const handleSubmit = async type => {
tab: 'appointment', tab: 'appointment',
type: 'add' type: 'add'
}) })
} else {
submitLoading.value = false
} }
}) })
} }
...@@ -1088,6 +1090,8 @@ const handleSubmit = async type => { ...@@ -1088,6 +1090,8 @@ const handleSubmit = async type => {
editStatus.value = true editStatus.value = true
getAppointmentInfo(idsObj.value.appointmentBizId) getAppointmentInfo(idsObj.value.appointmentBizId)
proxy.$message.success('修改预约单成功') proxy.$message.success('修改预约单成功')
} else {
submitLoading.value = false
} }
}) })
} }
...@@ -1104,6 +1108,8 @@ const handleSubmit = async type => { ...@@ -1104,6 +1108,8 @@ const handleSubmit = async type => {
submitLoading.value = false submitLoading.value = false
proxy.$message.success('预约暂存成功') proxy.$message.success('预约暂存成功')
router.push({ path: '/sign/appointment' }) router.push({ path: '/sign/appointment' })
} else {
submitLoading.value = false
} }
}) })
} }
...@@ -1117,6 +1123,8 @@ const handleSubmit = async type => { ...@@ -1117,6 +1123,8 @@ const handleSubmit = async type => {
proxy.$message.success('预约暂存提交成功') proxy.$message.success('预约暂存提交成功')
editStatus.value = true editStatus.value = true
getAppointmentInfo(idsObj.value.appointmentBizId) getAppointmentInfo(idsObj.value.appointmentBizId)
} else {
submitLoading.value = false
} }
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment