Commit 11c7857a by yuzhenWang

预约前端已经写完发布测试

parent 2e0664dc
......@@ -54,6 +54,14 @@ export function getAppointmentDetail(appointmentBizId) {
method: 'get'
})
}
// 获取行程单详情
export function getItineraryDetail(appointmentBizId) {
return request({
url: `/csf/api/appointmentFile/pdf/itinerary/detail?appointmentBizId=${appointmentBizId}`,
method: 'get'
})
}
// 获取预约健康信息数据
export function getQuestionnaires(appointmentBizId) {
return request({
......@@ -61,6 +69,14 @@ export function getQuestionnaires(appointmentBizId) {
method: 'get'
})
}
// 预约-提交健康信息模块
export function saveQuestionnaires(data) {
return request({
url: '/question/api/questionnaires/answer/save',
method: 'post',
data: data
})
}
// 预约-提交预约信息模块
export function editAppointmentInfo(data) {
return request({
......@@ -171,6 +187,19 @@ export function getAppointmentFile(data) {
data: data
})
}
// 上传Execl
export function uploadExcel(data) {
return request({
url: '/csf/api/appointmentFile/excel/import/appointment',
method: 'post',
data: data,
// 重要:不要手动设置 Content-Type,让浏览器自动设置
headers: {
// 如果您的请求拦截器中有默认的 Content-Type,可能需要覆盖
'Content-Type': 'multipart/form-data'
}
})
}
// 删除单个附件
export function delFile(appointmentFileBizId) {
return request({
......
......@@ -186,7 +186,7 @@ const productPlan = [
required: false,
disabled: false,
placeholder: '请选择',
show: true,
show: false,
labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度
sm: 12, //栅格布局份数
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -53,3 +53,9 @@ export const calculateExactAge = birthDate => {
return 0
}
}
export default {
formatIsoToDateTime,
formatToDateTime,
formatToDate,
getNowTime
}
......@@ -23,11 +23,17 @@
<div class="fatherLable">{{ father.fatherTitle }}</div>
<div class="fatherDes">{{ father.description }}</div>
<el-row>
<el-row :gutter="20">
<template v-for="child in father.data" :key="child.key">
<el-col :span="8" class="formItem" v-if="child.show">
<el-col :sm="child.sm" :lg="child.lg" class="formItem" v-if="child.show">
<div>
<el-form-item :label="child.label" :prop="child.key" :key="child.key">
<el-form-item
:label="child.label"
:prop="child.key"
:key="child.key"
:label-width="child.labelWidth"
:label-position="child.labelPosition"
>
<el-input
v-if="child.type === 'Input'"
:type="child.inputType"
......@@ -180,8 +186,7 @@ import Country from '@/views/components/country'
import Phone from '@/views/components/phone'
import Address from '@/views/components/address'
import { watch, } from 'vue'
import { watch } from 'vue'
import { addCustomer, getCustomerDetail, editCustomer, getCustomerList } from '@/api/sign/fna'
import useDictStore from '@/store/modules/dict'
const dictStore = useDictStore() //获取字典数据
......
......@@ -20,7 +20,7 @@
<div class="fatherLable">{{ father.fatherTitle }}</div>
<div class="subTitle" v-if="father.subTitle">{{ father.subTitle }}</div>
<el-row v-if="father.child == 'no'">
<el-row v-if="father.child == 'no'" :gutter="20">
<template v-for="child in father.data" :key="child.key">
<el-col :sm="child.sm" :lg="child.lg" class="formItem" v-if="child.show">
<div>
......@@ -40,6 +40,16 @@
:disabled="child.disabled"
:style="{ width: child.inputWidth ? child.inputWidth : '100%' }"
/>
<el-input
v-if="child.inputType === 'Input'"
:type="child.inputType"
v-model="form[father.key][child.key]"
:placeholder="child.placeholder"
maxlength="30"
:disabled="child.disabled"
:style="{ width: child.inputWidth ? child.inputWidth : '100%' }"
class="formInput"
/>
<el-select
v-if="child.domType === 'Select'"
v-model="form[father.key][child.key]"
......@@ -99,7 +109,7 @@
</template>
</el-row>
<!-- 有子孙的dom -->
<el-row v-if="father.child == 'yes'">
<el-row v-if="father.child == 'yes'" :gutter="20">
<template v-for="(child, childIndex) in father.data" :key="child.id">
<el-col :span="child.span">
<div class="childLabel" v-if="father.key == 'familyMembers'">
......@@ -130,6 +140,7 @@
:prop="grandchildren.key"
:key="grandchildren.key"
:label-width="grandchildren.labelWidth"
:label-position="grandchildren.labelPosition"
>
<el-input
v-if="grandchildren.domType === 'Input'"
......@@ -139,6 +150,7 @@
maxlength="30"
:disabled="grandchildren.disabled"
/>
<el-select
v-if="grandchildren.domType === 'Select'"
v-model="form[father.key][childIndex][grandchildren.key]"
......@@ -169,9 +181,7 @@
style="margin-left: 10px"
@click="deleteChildren(father, childIndex)"
>
<el-icon style="color: red; font-size: 18px; padding-top: 15px"
><Delete
/></el-icon>
<el-icon class="deleteIcon"><Delete /></el-icon>
</el-col>
</template>
<el-col
......@@ -179,7 +189,11 @@
v-if="father.addFamilyChildren"
style="display: flex; justify-content: flex-end"
>
<el-button type="primary" icon="Plus" @click="addChildren(father)"
<el-button
:disabled="editStatus"
type="primary"
icon="Plus"
@click="addChildren(father)"
>添加儿女</el-button
>
</el-col>
......@@ -382,6 +396,10 @@ const processFormData = async () => {
}
// 添加表单子级dom
const addChildren = father => {
if (editStatus.value) {
proxy.$modal.confirm(`请先点击编辑再添加儿女`, { showCancel: '0', title: '填写提示' })
return
}
const processedData = JSON.parse(JSON.stringify(processedFanFormData.value))
let obj = {
type: '4',
......@@ -402,8 +420,9 @@ const addChildren = father => {
disabled: false,
placeholder: '请输入',
show: true,
labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度
sm: 10, //栅格布局份数
sm: 8, //栅格布局份数
lg: 8 //栅格布局份数
},
{
......@@ -417,8 +436,9 @@ const addChildren = father => {
show: true,
dictType: 'sys_no_yes',
options: noYesList.value,
labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度
sm: 10, //栅格布局份数
sm: 8, //栅格布局份数
lg: 8 //栅格布局份数
}
]
......@@ -804,12 +824,12 @@ watch(
}
.subTitle {
font-size: 16px;
padding-left: 8px;
/* padding-left: 8px; */
margin-bottom: 10px;
}
.childLabel {
font-size: 14px;
padding-left: 15px;
/* padding-left: 15px; */
margin-bottom: 15px;
}
.fatherDes {
......@@ -832,6 +852,11 @@ watch(
color: #a8abb2;
}
}
.deleteIcon {
color: red;
font-size: 18px;
padding-top: 15px;
}
}
.tabButton {
box-shadow: 0 -1px 14px #00000014;
......@@ -894,14 +919,17 @@ watch(
margin-right: 10px;
}
/* 确保标签对齐方式正确 */
/* :deep(.el-form-item) {
display: flex;
align-items: center;
} */
@media only screen and (min-width: 768px) {
.formInput,
.deleteIcon {
margin-top: 30px !important;
}
}
/* :deep(.el-form-item__content) {
flex: 1;
margin-left: 0 !important;
} */
@media only screen and (min-width: 1200px) {
.formInput,
.deleteIcon {
margin-top: 30px !important;
}
}
</style>
......@@ -265,7 +265,8 @@ const getDictsData = async () => {
'csf_ap_movie',
'csf_ap_game',
'wj_question_first_category',
'wj_question_second_category'
'wj_question_second_category',
'csf_ap_policy_transfer'
])
}
......
......@@ -83,7 +83,7 @@
<el-table-column type="selection" width="55" />
<el-table-column type="index" width="50" />
<el-table-column label="流程编号" align="center" prop="fnaNo" width="200" />
<el-table-column label="预约编号" align="center" prop="appointmentNo" />
<el-table-column label="预约编号" align="center" prop="appointmentNo" width="200" />
<el-table-column label="新单编号" align="center" prop="policyId" />
<el-table-column label="保单号" align="center" prop="policyNo" width="150" />
......@@ -102,7 +102,7 @@
</span>
</template>
</el-table-column>
<el-table-column label="创建时间" sortable align="center" prop="createTime" width="150">
<el-table-column label="创建时间" sortable align="center" prop="createTime" width="200">
<template #default="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
......
......@@ -8,7 +8,7 @@
v-if="props.idsObj.appointmentBizId"
type="primary"
icon="EditPen"
@click="handleEditStatus"
@click="handleEditStatus(!editStatus)"
>编辑</el-button
>
</div>
......@@ -126,6 +126,7 @@
</el-row>
</el-form>
</div>
<!-- <div v-else class="domEmpty" v-loading="loading"></div> -->
<Phone
@close="handleCloseDrawer"
:showDrawer="showPhoneDrawer"
......@@ -489,8 +490,8 @@ const handleSelectChange = (father, child) => {
}
}
// 改变编辑状态
const handleEditStatus = () => {
editStatus.value = !editStatus.value
const handleEditStatus = status => {
editStatus.value = status
// 深拷贝原始数据
const processedData = JSON.parse(JSON.stringify(processedAppointmentData.value))
for (const section of processedData) {
......@@ -726,7 +727,7 @@ const submitForm = () => {
if (props.idsObj.appointmentBizId) {
editAppointmentInfo(submitObj).then(res => {
if (res.code == 200) {
handleEditStatus()
handleEditStatus(true)
proxy.$message.success('预约信息修改成功')
emit('handleSuccessEdit')
}
......@@ -772,6 +773,7 @@ watch(
setTimeout(() => {
processFormData()
}, 500)
// processFormData()
}
}
)
......@@ -791,6 +793,17 @@ defineExpose({
})
</script>
<style lang="scss" scoped>
.domEmpty {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
height: 100%;
font-size: 16px;
color: #a8abb2;
margin-top: 100px;
}
.topBtn {
width: 100%;
display: flex;
......
......@@ -15,7 +15,7 @@
v-if="props.idsObj.appointmentBizId"
type="primary"
icon="EditPen"
@click="handleEditStatus"
@click="handleEditStatus(!editStatus)"
>编辑</el-button
>
</div>
......@@ -174,6 +174,7 @@
</div>
</el-dialog>
</div>
<!-- <div v-else class="domEmpty" v-loading="loading"></div> -->
<Phone
@close="handleCloseDrawer"
:showDrawer="showPhoneDrawer"
......@@ -692,8 +693,8 @@ const handleSelectChange = (child, l1, l2) => {
}
}
// 改变编辑状态
const handleEditStatus = () => {
editStatus.value = !editStatus.value
const handleEditStatus = status => {
editStatus.value = status
console.log('触发了编辑状态', editStatus.value)
// 深拷贝原始数据
......@@ -891,21 +892,21 @@ const handleFormValues = () => {
if (pattern.test(key) && section[key]) {
section[key] = proxy.formatToDateTime(section[key])
}
if (section['customerType'] == 'COMPANY') {
for (const key1 in companyObj.value) {
if (key == key1 && section[key]) {
submitObj[key1] = section[key]
}
if (key == 'companyMobile' && section[key]) {
submitObj[key] = section[key].split(' ')[1]
submitObj['companyMobileCode'] = section[key].split(' ')[0]
}
if (key == 'authMobile' && section[key]) {
submitObj[key] = section[key].split(' ')[1]
submitObj['authMobileCode'] = section[key].split(' ')[0]
}
}
}
// if (section['customerType'] == 'COMPANY') {
// for (const key1 in companyObj.value) {
// if (key == key1 && section[key]) {
// submitObj[key1] = section[key]
// }
// if (key == 'companyMobile' && section[key]) {
// submitObj[key] = section[key].split(' ')[1]
// submitObj['companyMobileCode'] = section[key].split(' ')[0]
// }
// if (key == 'authMobile' && section[key]) {
// submitObj[key] = section[key].split(' ')[1]
// submitObj['authMobileCode'] = section[key].split(' ')[0]
// }
// }
// }
if (section['customerType'] == 'INDIVIDUAL' && section[key]) {
for (const key1 in personalObj.value) {
if (key == key1) {
......@@ -914,6 +915,18 @@ const handleFormValues = () => {
}
}
}
if (submitObj['companyMobile']) {
submitObj['companyMobileCode'] = submitObj['companyMobile'].split(' ')[0]
submitObj['companyMobile'] = submitObj['companyMobile'].split(' ')[1]
}
if (submitObj['mobile']) {
submitObj['mobileCode'] = submitObj['mobile'].split(' ')[0]
submitObj['mobile'] = submitObj['mobile'].split(' ')[1]
}
if (submitObj['authMobile']) {
submitObj['authMobileCode'] = submitObj['authMobile'].split(' ')[0]
submitObj['authMobile'] = submitObj['authMobile'].split(' ')[1]
}
phoneOraddressKey.value.forEach(item => {
if (item.drawerType == 'address' && item.id === section.id) {
submitObj.addressList.push({
......@@ -958,7 +971,7 @@ const submitForm = () => {
apiBeneficiaryInfoDtoList: submitObj
}).then(res => {
if (res.code == 200) {
handleEditStatus()
handleEditStatus(true)
proxy.$message.success('受益人修改成功')
emit('handleSuccessEdit')
}
......@@ -1026,6 +1039,17 @@ defineExpose({
})
</script>
<style lang="scss" scoped>
.domEmpty {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
height: 100%;
font-size: 16px;
color: #a8abb2;
margin-top: 100px;
}
.topBtn {
width: 100%;
display: flex;
......
......@@ -7,10 +7,10 @@
@sort-change="sortChange"
>
<!-- <el-table-column type="selection" width="55" /> -->
<el-table-column type="index" width="50" />
<el-table-column type="index" width="50" label="序号" />
<el-table-column label="流程编号" align="center" prop="fnaNo" width="200" />
<el-table-column label="预约编号" align="center" prop="appointmentNo" />
<el-table-column label="新单编号" align="center" prop="policyId" />
<el-table-column label="预约编号" align="center" prop="appointmentNo" width="200" />
<el-table-column label="新单编号" align="center" prop="policyId" width="150" />
<el-table-column label="保单号" align="center" prop="policyNo" width="150" />
<el-table-column label="客户姓名" align="center" prop="customerName" width="100" />
......@@ -28,7 +28,7 @@
</span>
</template>
</el-table-column>
<el-table-column label="创建时间" sortable align="center" prop="createTime" width="150">
<el-table-column label="创建时间" sortable align="center" prop="createTime" width="200">
<template #default="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
......
......@@ -16,7 +16,7 @@
v-if="props.idsObj.appointmentBizId"
type="primary"
icon="EditPen"
@click="handleEditStatus"
@click="handleEditStatus(!editStatus)"
>编辑</el-button
>
</div>
......@@ -78,6 +78,7 @@
style="width: 100%"
v-if="child.domType === 'DatePicker'"
type="date"
:disabled-date="disabledDate"
:placeholder="child.placeholder"
:disabled="child.disabled"
/>
......@@ -169,6 +170,7 @@
</div>
</el-dialog>
</div>
<!-- <div v-else class="domEmpty" v-loading="loading"></div> -->
<Phone
@close="handleCloseDrawer"
:showDrawer="showPhoneDrawer"
......@@ -313,6 +315,9 @@ const data = reactive({
})
const { form, rules, processedinsuredData, queryParams, oldAppointmentData, tempPolicyForm } =
toRefs(data)
const disabledDate = time => {
return time.getTime() > Date.now()
}
const exportInfo = () => {
if (props.customerBizId && editStatus.value) {
proxy.$modal.confirm(`请先点击编辑在导入客户信息`, { showCancel: '0', title: '填写提示' })
......@@ -776,10 +781,8 @@ const handleSelectChange = (father, child) => {
}
}
// 改变编辑状态
const handleEditStatus = () => {
editStatus.value = !editStatus.value
console.log('触发了编辑状态', editStatus.value)
const handleEditStatus = status => {
editStatus.value = status
// 深拷贝原始数据
const processedData = JSON.parse(JSON.stringify(processedinsuredData.value))
for (const section of processedData) {
......@@ -921,13 +924,15 @@ const handleFormValues = () => {
submitObj['authMobileCode'] = submitObj['authMobile'].split(' ')[0]
submitObj['authMobile'] = submitObj['authMobile'].split(' ')[1]
}
console.log('====================================')
console.log('受保人submitObj', submitObj)
console.log('====================================')
// 删除多余字段
deleteKeyList.value.forEach(item => {
delete submitObj[item]
})
console.log('====================================')
console.log('受保人submitObj', submitObj)
console.log('====================================')
return submitObj
}
// 表单提交
......@@ -953,7 +958,7 @@ const submitForm = () => {
submitObj['insurantBizId'] = props.apiInsurantInfoDto.insurantBizId
editInsurantInfo(submitObj).then(res => {
if (res.code == 200) {
handleEditStatus()
handleEditStatus(true)
proxy.$message.success('受保人修改成功')
emit('handleSuccessEdit')
}
......@@ -1022,6 +1027,17 @@ defineExpose({
})
</script>
<style lang="scss" scoped>
.domEmpty {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
height: 100%;
font-size: 16px;
color: #a8abb2;
margin-top: 100px;
}
.topBtn {
width: 100%;
display: flex;
......
......@@ -16,7 +16,7 @@
v-if="props.idsObj.appointmentBizId"
type="primary"
icon="EditPen"
@click="handleEditStatus"
@click="handleEditStatus(!editStatus)"
>编辑</el-button
>
</div>
......@@ -78,6 +78,7 @@
style="width: 100%"
v-if="child.domType === 'DatePicker'"
type="date"
:disabled-date="disabledDate"
:placeholder="child.placeholder"
:disabled="child.disabled"
/>
......@@ -169,6 +170,7 @@
</div>
</el-dialog>
</div>
<!-- <div v-else class="domEmpty" v-loading="loading"></div> -->
<Phone
@close="handleCloseDrawer"
:showDrawer="showPhoneDrawer"
......@@ -200,7 +202,7 @@ import Phone from '@/views/components/phone'
import Address from '@/views/components/address'
import { watch, nextTick } from 'vue'
import { addCustomer, getCustomerDetail, editCustomer, getCustomerList } from '@/api/sign/fna'
import { getCustomerList } from '@/api/sign/fna'
import { editPolicyholderInfo } from '@/api/sign/appointment'
import useDictStore from '@/store/modules/dict'
......@@ -313,6 +315,9 @@ const data = reactive({
})
const { form, rules, processedPolicyData, queryParams, oldAppointmentData, tempPolicyForm } =
toRefs(data)
const disabledDate = time => {
return time.getTime() > Date.now()
}
const exportInfo = () => {
if (props.customerBizId && editStatus.value) {
proxy.$modal.confirm(`请先点击编辑在导入客户信息`, { showCancel: '0', title: '填写提示' })
......@@ -660,11 +665,7 @@ const confirmDrawer = info => {
// info 为抽屉返回的值
if (drawerInfo.value.domType == 'arrowRight' && drawerInfo.value.drawerType) {
let newObj = info[drawerInfo.value.key]
// if (form.value['customerType'] == 'COMPANY') {
// newObj.fatherKey = 'company'
// } else if (form.value['customerType'] == 'INDIVIDUAL') {
// newObj.fatherKey = 'person'
// }
//要判断drawerType
switch (drawerInfo.value.drawerType) {
case 'phone':
......@@ -772,10 +773,8 @@ const handleSelectChange = (father, child) => {
}
}
// 改变编辑状态
const handleEditStatus = () => {
editStatus.value = !editStatus.value
console.log('触发了编辑状态', editStatus.value)
const handleEditStatus = status => {
editStatus.value = status
// 深拷贝原始数据
const processedData = JSON.parse(JSON.stringify(processedPolicyData.value))
for (const section of processedData) {
......@@ -924,6 +923,8 @@ const handleFormValues = () => {
delete submitObj[item]
})
console.log('投保人', submitObj)
return submitObj
}
// 表单提交
......@@ -931,10 +932,6 @@ const submitForm = () => {
proxy.$refs['policyholderInfoFormRef'].validate((valid, fields) => {
if (valid) {
let submitObj = handleFormValues()
console.log('====================================')
console.log('submitObj', submitObj)
console.log('====================================')
// return
if (props.idsObj.appointmentBizId) {
submitObj['appointmentBizId'] = props.apiPolicyholderInfoDto.appointmentBizId
......@@ -942,7 +939,7 @@ const submitForm = () => {
submitObj['policyholderBizId'] = props.apiPolicyholderInfoDto.policyholderBizId
editPolicyholderInfo(submitObj).then(res => {
if (res.code == 200) {
handleEditStatus()
handleEditStatus(true)
proxy.$message.success('投保人修改成功')
emit('handleSuccessEdit')
}
......@@ -974,15 +971,7 @@ const resetForm = () => {
.catch(() => {})
}
// 获取流程详情
// function getCustomerInfo(customerBizId, formData) {
// getCustomerDetail(customerBizId).then(async res => {
// if (res.code == 200) {
// // 回显值
// setFormValue(res.data, formData)
// }
// })
// }
watch(
() => props.activeName,
newVal => {
......@@ -1018,6 +1007,17 @@ defineExpose({
})
</script>
<style lang="scss" scoped>
.domEmpty {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
height: 100%;
font-size: 16px;
color: #a8abb2;
margin-top: 100px;
}
.topBtn {
width: 100%;
display: flex;
......
......@@ -8,7 +8,7 @@
v-if="props.idsObj.appointmentBizId"
type="primary"
icon="EditPen"
@click="handleEditStatus"
@click="handleEditStatus(!editStatus)"
>编辑</el-button
>
</div>
......@@ -52,18 +52,13 @@
<el-row>
<el-col>
<div class="tabButton">
<el-button
type="primary"
icon="Check"
@click="submitForm"
size="large"
:disabled="editStatus"
>提交</el-button
>
<!-- :disabled="editStatus" -->
<el-button type="primary" icon="Check" @click="submitForm" size="large">提交</el-button>
</div>
</el-col>
</el-row>
</div>
<!-- <div v-else class="domEmpty" v-loading="loading"></div> -->
</div>
</template>
<script setup name="PolicyTransferInfo">
......@@ -85,6 +80,7 @@ const props = defineProps({
const emit = defineEmits(['handleSuccessEdit'])
const { proxy } = getCurrentInstance()
// const { csf_id_type, sys_gender } = proxy.useDict('csf_id_type', 'sys_gender')
const loading = ref(false)
const editStatus = ref(false) //编辑状态
const errorFields = ref([]) // 存储校验失败的字段信息
const data = reactive({
......@@ -135,6 +131,7 @@ const validateEnglish = (rule, value, callback) => {
*/
const processFormData = async obj => {
form.value = {}
loading.value = true
// 深拷贝原始数据
const processedData = JSON.parse(JSON.stringify(obj.domdata))
......@@ -150,10 +147,11 @@ const processFormData = async obj => {
}
}
policyTransferData.value = processedData
loading.value = false
}
// 改变编辑状态
const handleEditStatus = () => {
editStatus.value = !editStatus.value
const handleEditStatus = status => {
editStatus.value = status
console.log('触发了编辑状态', editStatus.value)
// 深拷贝原始数据
......@@ -213,7 +211,7 @@ const submitForm = () => {
if (props.idsObj.appointmentBizId) {
editPolicytransfer(submitObj).then(res => {
if (res.code == 200) {
// handleEditStatus()
// handleEditStatus(true)
proxy.$message.success('转保声明修改成功')
emit('handleSuccessEdit')
}
......@@ -252,6 +250,17 @@ defineExpose({
})
</script>
<style lang="scss" scoped>
.domEmpty {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
height: 100%;
font-size: 16px;
color: #a8abb2;
margin-top: 100px;
}
.content {
display: flex;
flex-direction: column;
......
......@@ -8,7 +8,7 @@
v-if="props.idsObj.appointmentBizId"
type="primary"
icon="EditPen"
@click="handleEditStatus"
@click="handleEditStatus(!editStatus)"
>编辑</el-button
>
</div>
......@@ -684,14 +684,24 @@ const handleSelectChange = (father, child) => {
}
break
case 'isBacktrack':
// 选是,展示日期
if (form.value[father.key][child.key] == '1') {
resetShow('policyEffectiveDate', true)
// form.value[father.key]['policyEffectiveDate'] = ''
} else {
resetShow('policyEffectiveDate', false)
}
break
default:
break
}
}
// 改变编辑状态
const handleEditStatus = () => {
editStatus.value = !editStatus.value
const handleEditStatus = status => {
editStatus.value = status
// 深拷贝原始数据
const processedData = JSON.parse(JSON.stringify(processedProductData.value))
for (const section of processedData) {
......@@ -867,6 +877,8 @@ const setFormValue = (obj, formData) => {
const processedData = JSON.parse(JSON.stringify(formData))
for (const section of processedData) {
for (const key in newForm) {
console.log('key', key)
//回显的数据有的没填写就会是null,收集表单值得时候和dom对应不上,对于null值得项要根据section得keyType给form正确得数据类型
if (!newForm[key]) {
if (section.keyType == 'Array') {
......@@ -885,6 +897,18 @@ const setFormValue = (obj, formData) => {
section.data.push(newChildren)
}
for (const field of section.data) {
if (key == 'apiProductPlanMainInfoDto') {
for (const key2 in newForm[key]) {
if (
field.key == 'policyEffectiveDate' &&
newForm[key][field.key] &&
newForm[key]['isBacktrack'] == '1'
) {
field.show = true
}
}
}
if (section.child == 'yes' && field.children && field.children.length > 0) {
for (const child of field.children) {
if (props.idsObj.appointmentBizId) {
......@@ -936,6 +960,9 @@ const handleSubmitForm = () => {
for (const key in result) {
if (isObject(result[key])) {
for (const key2 in result[key]) {
if (key2 == 'isBacktrack' && result[key][key2] == '0') {
result[key]['policyEffectiveDate'] = null
}
if (key2 == 'policyEffectiveDate' && result[key][key2]) {
result[key][key2] = proxy.formatToDateTime(result[key][key2])
}
......@@ -992,10 +1019,11 @@ const submitForm = saveType => {
console.log('====================================')
console.log('提交的数据', result)
console.log('====================================')
// return
if (props.idsObj.appointmentBizId) {
editProductPlanInfo(result).then(res => {
if (res.code == 200) {
handleEditStatus()
handleEditStatus(true)
proxy.$message.success('产品计划修改成功')
emit('handleSuccessEdit')
}
......@@ -1034,11 +1062,7 @@ watch(
}
}
)
if (props.formStatus == 'appointmentAdd') {
setTimeout(() => {
processFormData()
}, 1000)
}
// 暴露给父组件
defineExpose({
handleSubmitForm,
......
......@@ -11,7 +11,7 @@
v-if="props.idsObj.appointmentBizId"
type="primary"
icon="EditPen"
@click="handleEditStatus"
@click="handleEditStatus(!editStatus)"
>编辑</el-button
>
</div>
......@@ -270,8 +270,6 @@ const phoneMenuList = ref([
}
])
const phoneQuickList = ref([])
const personalObj = ref({}) //存储个人key
const companyObj = ref({}) //存储公司key
const commonObj = ref({}) //存储个人和公司的公共key
const deleteKeyList = ref([
'objType',
......@@ -450,8 +448,6 @@ const processFormData = async obj => {
//弹出右侧抽屉
const handleFoucs = child => {
if (child.disabled) return
console.log('saveKey.value', saveKey.value)
console.log('child', child)
drawerInfo.value = JSON.parse(JSON.stringify(child))
switch (child.drawerType) {
......@@ -617,8 +613,8 @@ const handleSelectChange = (father, child) => {
}
}
// 改变编辑状态
const handleEditStatus = () => {
editStatus.value = !editStatus.value
const handleEditStatus = status => {
editStatus.value = status
console.log('触发了编辑状态', editStatus.value)
// 深拷贝原始数据
......@@ -686,15 +682,10 @@ const submitForm = () => {
proxy.$refs['secondHolderFormRef'].validate((valid, fields) => {
if (valid) {
let submitObj = handleFormValues()
console.log('====================================')
console.log('submitObj', submitObj)
console.log('====================================')
// return
if (props.idsObj.appointmentBizId) {
editSecondHolderInfo(submitObj).then(res => {
if (res.code == 200) {
handleEditStatus()
handleEditStatus(true)
proxy.$message.success('第二持有人修改成功')
emit('handleSuccessEdit')
}
......@@ -742,6 +733,10 @@ watch(
exportValue: null
})
}, 500)
// processFormData({
// domdata: secondHolderDomData,
// exportValue: null
// })
}
}
)
......@@ -806,7 +801,7 @@ defineExpose({
}
}
.tabButton {
box-shadow: 0 -1px 14px #00000014;
/* box-shadow: 0 -1px 14px #00000014; */
width: 100%;
display: flex;
align-items: center;
......
......@@ -16,12 +16,6 @@
v-show="showSearch"
label-width="100px"
>
<el-form-item
><el-button type="primary" icon="Plus" @click="handleAdd"
>上传EXECL</el-button
></el-form-item
>
<el-form-item label="确认预约时间" style="width: 300px">
<el-date-picker
v-model="dateRange"
......@@ -144,22 +138,31 @@
<!-- 展示行程单详情 -->
<el-dialog v-model="dialogVisible" width="70%">
<div class="dialogBox">
<div class="dialogTitle">
{{ appointmentSummeryInfo.apiAppointmentInfoDto.creatorName }} - 香港行程安排
</div>
<div class="dialogTitle">香港行程安排</div>
<div class="dialogItem" v-for="item in detailData">
<div class="dialogItemTitle">{{ item.title }}</div>
<DetailPanel
:data="item.data"
:row-span="24"
col-gap="16px"
col-gap="10px"
label-width="120px"
row-height="45px"
:show-col-border="true"
/>
</div>
<div class="remarkBOx">
<div class="remarkTitle">备注</div>
<div class="remarkContent" v-if="appointmentSummeryInfo.remark">
{{ appointmentSummeryInfo.remark }}
</div>
<div class="remarkEmpty" v-else>暂无备注</div>
</div>
<div class="exprotBtn">
<el-button :loading="exportLoading" type="primary" @click="handleExprotPdf"
<el-button
:loading="exportLoading"
type="primary"
style="margin-top: 15px"
@click="handleExprotPdf"
>下载行程单</el-button
>
</div>
......@@ -176,7 +179,7 @@ import {
getAppointmentList,
getAppointmentExprot,
delSigleAppointment,
getAppointmentDetail,
getItineraryDetail,
getItineraryExprot
} from '@/api/sign/appointment'
import useUserStore from '@/store/modules/user'
......@@ -209,7 +212,11 @@ const data = reactive({
})
const { queryParams, form, rules } = toRefs(data)
const { bx_currency_type, csf_ap_status } = proxy.useDict('bx_currency_type', 'csf_ap_status')
const { bx_currency_type, csf_ap_status, csf_ap_meeting_point } = proxy.useDict(
'bx_currency_type',
'csf_ap_status',
'csf_ap_meeting_point'
)
const handleExprotPdf = () => {
exportLoading.value = true
getItineraryExprot(appointmentSummeryInfo.value.apiAppointmentInfoDto.appointmentBizId).then(
......@@ -222,7 +229,7 @@ const handleExprotPdf = () => {
// 设置下载文件名(重要)
// 从URL中提取文件名,或者使用返回的文件名
const fileName = `${appointmentSummeryInfo.value.apiAppointmentInfoDto.creatorName} - 香港行程安排.pdf`
const fileName = `香港行程安排.pdf`
link.download = fileName
// 触发下载
......@@ -238,13 +245,18 @@ const handleExprotPdf = () => {
}
// 获取预约详情
function getAppointmentInfo(appointmentBizId) {
getAppointmentDetail(appointmentBizId).then(res => {
getItineraryDetail(appointmentBizId).then(res => {
if (res.code == 200) {
appointmentSummeryInfo.value = res.data
let appointment = appointmentSummeryInfo.value.apiAppointmentInfoDto
let insurant = appointmentSummeryInfo.value.apiInsurantInfoDto
let productPlan = appointmentSummeryInfo.value.apiProductPlanInfoDto.apiProductPlanMainInfoDto
productPlan.total = (productPlan.paymentTerm * productPlan.eachIssuePremium).toFixed(2)
csf_ap_meeting_point._object.csf_ap_meeting_point.forEach(item => {
if (item.value == appointmentSummeryInfo.value.meetingPoint) {
appointmentSummeryInfo.value.meetingPoint = item.label
}
})
if (appointmentSummeryInfo.value.total) {
appointmentSummeryInfo.value.total = Number(appointmentSummeryInfo.value.total).toFixed(2)
}
detailData.value = [
{
title: '集合信息',
......@@ -252,17 +264,17 @@ function getAppointmentInfo(appointmentBizId) {
// 第一行:2列布局(各占12)
{
label: '集合时间',
value: appointment.arrivalTime,
value: appointmentSummeryInfo.value.arrivalTime,
span: 12 // 占12/24
},
{
label: '集合地点',
value: appointment.meetingPoint,
value: appointmentSummeryInfo.value.meetingPoint,
span: 12 // 占12/24
},
{
label: '意向地点',
value: appointment.signingAddress,
value: appointmentSummeryInfo.value.signingAddress,
span: 12 // 占12/24
}
]
......@@ -273,13 +285,14 @@ function getAppointmentInfo(appointmentBizId) {
// 第一行:2列布局(各占12)
{
label: '姓名',
value: appointment.businessRepresentName1,
value: appointmentSummeryInfo.value.businessRepresentName1,
span: 12 // 占12/24
},
{
label: '联系电话',
value: appointment.businessRepresentMobile1
? appointment.businessRepresentMobile1Code + appointment.businessRepresentMobile1
value: appointmentSummeryInfo.value.businessRepresentMobile1
? appointmentSummeryInfo.value.businessRepresentMobile1Code +
appointmentSummeryInfo.value.businessRepresentMobile1
: '-',
span: 12 // 占12/24
}
......@@ -291,43 +304,42 @@ function getAppointmentInfo(appointmentBizId) {
// 第一行:2列布局(各占12)
{
label: '咨询人',
value: appointment.arrivalTime,
value: appointmentSummeryInfo.value.name,
span: 12 // 占12/24
},
{
label: '受保人',
value: insurant.insurantName,
value: appointmentSummeryInfo.value.insurantName,
span: 12 // 占12/24
},
{
label: '意向缴费年期',
value: productPlan.paymentTerm,
value: appointmentSummeryInfo.value.paymentTerm,
span: 12 // 占12/24
},
{
label: '保单费',
value: productPlan.policyFee || '-',
label: '保单费',
value: appointmentSummeryInfo.value.policyFee || '-',
span: 12 // 占12/24
},
{
label: '币种',
value: productPlan.currency,
value: appointmentSummeryInfo.value.currency,
span: 12 // 占12/24
},
{
label: '意向咨询产品',
value: productPlan.productName,
value: appointmentSummeryInfo.value.productName,
span: 12 // 占12/24
},
{
label: '合计金额',
value: productPlan.total,
value: appointmentSummeryInfo.value.total,
span: 12 // 占12/24
}
]
}
]
console.log('detailData.value', detailData.value)
dialogVisible.value = true
}
......@@ -381,7 +393,7 @@ const goToAppointment = type => {
if (type == 'previousStep') {
router.push({ path: '/sign/FnaList' })
} else if (type == 'nextStep') {
router.push({ path: '/sign/appointment' })
router.push({ path: '/sign/underwritingMain' })
}
}
/** 查询租户列表 */
......@@ -505,6 +517,24 @@ getList()
font-size: 16px;
font-weight: 500;
margin: 10px 0;
color: #333;
}
}
.remarkBOx {
padding: 10px;
box-sizing: border-box;
background-color: #f5f5f5;
border-radius: 5px;
.remarkTitle {
font-size: 16px;
}
.remarkEmpty {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
color: #999;
margin-bottom: 10px;
}
}
.exprotBtn {
......
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