Commit 590d2904 by Sweet Zhang

合并test分支

parents b9d3fa54 c5f821e1
......@@ -213,3 +213,11 @@ export function downloadCompressedFile(data) {
method: 'post'
})
}
// 获取保险对账公司列表
export function insuranceReconciliationCompany(data) {
return request({
url: '/insurance/base/api/insuranceReconciliationCompany/page',
data: data,
method: 'post'
})
}
......@@ -25,6 +25,54 @@ const customer = [
}
]
},
// 证件信息
{
fatherTitle: '证件信息',
keyType: 'Array', //用于表单收集值时,判断是数组还是对象
key: 'apiCertificateDtoList',
anchorKey: 'apiCertificateDtoList',
moudleType: 'apiCertificateDtoList',
dataLength: 1, //设置dataLength,用于控制子级dom的个数,子级保存一个样例数据,便于加子级数据
showMoudle: true,
showTable: true,
addChildren: true, //是否可以新增子级dom
addChildrenTxt: '证件', //新增按钮得文本
fatherRequired: false, //父级必填,代表个人资料这个模块有必填项
isOpen: false, //dom是否展开
// 表格列配置
columns: [
{
label: '证件类型',
prop: 'documentType',
type: 'select',
dictType: 'csf_id_type',
placeholder: '请选择证件类型',
required: true
},
{
label: '证件号码',
prop: 'idNumber',
type: 'input',
placeholder: '请输入证件号码',
required: true
},
{
label: '证件有效期',
prop: 'certificateValidityPeriod',
type: 'datePicker',
timeType: 'daterange',
placeholder: '请选择证件有效期',
required: true
},
{
label: '是否长期有效',
prop: 'isPermanent',
type: 'radioGroup',
required: false
}
],
data: []
},
// 基础信息
{
fatherTitle: '基础信息',
......@@ -68,35 +116,35 @@ const customer = [
lg: 8 //栅格布局份数
},
{
label: '证件类型',
key: 'documentType',
domType: 'Select',
required: true,
disabled: false,
placeholder: '请选择',
dictType: 'csf_id_type',
show: true,
labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度
sm: 12, //栅格布局份数
lg: 8 //栅格布局份数
},
{
label: '证件号码',
key: 'idNumber',
domType: 'Input',
inputType: 'text',
required: true,
maxLength: 20,
disabled: false,
placeholder: '请输入',
show: true,
labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度
sm: 12, //栅格布局份数
lg: 8 //栅格布局份数
},
// {
// label: '证件类型',
// key: 'documentType',
// domType: 'Select',
// required: true,
// disabled: false,
// placeholder: '请选择',
// dictType: 'csf_id_type',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
// {
// label: '证件号码',
// key: 'idNumber',
// domType: 'Input',
// inputType: 'text',
// required: true,
// maxLength: 20,
// disabled: false,
// placeholder: '请输入',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
{
label: '性别',
......@@ -202,7 +250,7 @@ const customer = [
label: '婚姻状况',
key: 'maritalStatus',
domType: 'Select',
required: true,
required: false,
disabled: false,
placeholder: '请选择',
dictType: 'csf_marriage',
......@@ -216,7 +264,7 @@ const customer = [
label: '教育程度',
key: 'educationLevel',
domType: 'Select',
required: true,
required: false,
disabled: false,
placeholder: '请选择',
dictType: 'csf_education',
......@@ -230,7 +278,7 @@ const customer = [
label: '是否退休',
key: 'isRetirement',
domType: 'Select',
required: true,
required: false,
disabled: false,
placeholder: '请选择',
dictType: 'sys_no_yes',
......@@ -346,6 +394,21 @@ const customer = [
addChildrenTxt: '税务', //新增按钮得文本
fatherRequired: false, //父级必填,代表个人资料这个模块有必填项
isOpen: false, //dom是否展开
// 表格列配置
columns: [
{
label: '税务国家',
prop: 'taxCountry',
type: 'Input',
placeholder: '请输入税务国家'
},
{
label: '税务编号',
prop: 'taxId',
type: 'Input',
placeholder: '请税务编号'
}
],
data: [
// {
// id: Date.now() + Math.floor(Math.random() * 1000), //唯一标识
......@@ -434,7 +497,7 @@ const customer = [
key: 'certificateAddress',
domType: 'Input',
inputType: 'text',
required: true,
required: false,
maxLength: 20,
disabled: false,
placeholder: '请输入',
......
......@@ -168,6 +168,21 @@ const productPlan = [
lg: 8 //栅格布局份数
},
{
label: '预缴年期',
key: 'prepaymentPeriod',
domType: 'Input',
inputType: 'number',
required: false,
maxLength: 20,
disabled: false,
placeholder: '请输入',
show: false,
labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度
sm: 12, //栅格布局份数
lg: 8 //栅格布局份数
},
{
label: '是否追溯',
key: 'isTraceable',
domType: 'Select',
......@@ -238,87 +253,8 @@ const productPlan = [
lg: 8 //栅格布局份数
},
{
label: '保单额度(重疾)',
key: 'sumInsured',
domType: 'Input',
inputType: 'number',
required: false,
maxLength: 20,
disabled: false,
placeholder: '请输入',
show: false,
labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度
sm: 12, //栅格布局份数
lg: 8 //栅格布局份数
}
]
},
//附加险
{
showMoudle: true, //模块是否展示
fatherTitle: '附加计划',
keyType: 'Array', //用于表单收集值时,判断是数组还是对象
key: 'apiProductPlanAdditionalInfoDtoList',
anchorKey: 'apiProductPlanAdditionalInfoDtoList',
fatherRequired: true, //父级必填,代表个人资料这个模块有必填项
addChildren: true,
addChildrenTxt: '新增附加险',
showTable: true, //是否展示表格
data: [],
columns: [
{
label: '产品名称',
prop: 'productLaunchNameValue',
type: 'text'
},
{
label: '供款期数',
prop: 'issueNumber',
type: 'text'
},
{
label: '保障年期',
prop: 'guaranteePeriod',
type: 'text'
},
{
label: '保单币种',
prop: 'policyCurrency',
type: 'text'
},
{
label: '保单额度',
prop: 'sumInsured',
type: 'text'
},
{
label: '每期保费',
prop: 'eachIssuePremium',
type: 'text'
},
{
label: '保障级别',
prop: 'protectionLevel',
type: 'text'
},
{
label: '自付额',
prop: 'deductibles',
type: 'text'
},
{
label: '附加保障',
prop: 'additionalSafeguards',
type: 'text'
}
],
// 弹窗表单的配置
formItem: [
{
label: '产品名称',
value: '',
key: 'productLaunchName',
label: '出单经纪公司',
key: 'reconciliationCompanyName',
domType: 'SearchSelect',
required: false,
maxLength: 30,
......@@ -331,61 +267,12 @@ const productPlan = [
lg: 8 //栅格布局份数
},
{
label: '供款期数',
key: 'issueNumber',
value: '',
domType: 'Select',
required: false,
disabled: false,
placeholder: '请选择',
dictType: 'issueNumber',
show: true,
labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度
sm: 12, //栅格布局份数
lg: 8 //栅格布局份数
},
{
label: '保障年期(若是终身,输入999)',
key: 'guaranteePeriod',
value: '',
domType: 'Input',
inputType: 'number',
required: false,
maxLength: 300,
disabled: false,
placeholder: '请输入',
show: true,
labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度
sm: 12, //栅格布局份数
lg: 8 //栅格布局份数
},
{
label: '保单币种',
key: 'policyCurrency',
value: '',
domType: 'Select',
inputType: 'text',
required: false,
maxLength: 300,
disabled: false,
placeholder: '请输入',
show: true,
dictType: 'bx_currency_type',
labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度
sm: 12, //栅格布局份数
lg: 8 //栅格布局份数
},
{
label: '保单额度(重疾)',
key: 'sumInsured',
value: '',
domType: 'Input',
inputType: 'number',
required: false,
maxLength: 300,
maxLength: 20,
disabled: false,
placeholder: '请输入',
show: false,
......@@ -393,89 +280,231 @@ const productPlan = [
labelWidth: '120px', //标签宽度
sm: 12, //栅格布局份数
lg: 8 //栅格布局份数
},
{
label: '每期保费',
key: 'eachIssuePremium',
value: '',
domType: 'Input',
inputType: 'number',
required: false,
maxLength: 300,
disabled: false,
placeholder: '请输入',
show: true,
labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度
sm: 12, //栅格布局份数
lg: 8 //栅格布局份数
},
{
label: '保障地区',
key: 'guaranteeRegion',
value: '',
domType: 'Input',
inputType: 'text',
required: false,
maxLength: 300,
disabled: false,
placeholder: '请输入',
show: true,
labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度
sm: 12, //栅格布局份数
lg: 8 //栅格布局份数
},
{
label: '保障级别',
value: '',
key: 'protectionLevel',
domType: 'Input',
inputType: 'text',
required: false,
maxLength: 300,
disabled: false,
placeholder: '请输入',
show: true,
labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度
sm: 12, //栅格布局份数
lg: 8 //栅格布局份数
},
{
label: '自付额',
value: '',
key: 'deductibles',
domType: 'Input',
inputType: 'number',
required: false,
maxLength: 300,
disabled: false,
placeholder: '请输入',
show: true,
labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度
sm: 12, //栅格布局份数
lg: 8 //栅格布局份数
},
{
label: '附加保障',
value: '',
key: 'additionalSafeguards',
domType: 'Input',
inputType: 'textarea',
required: false,
maxLength: 300,
disabled: false,
placeholder: '请输入',
show: true,
labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度
sm: 24, //栅格布局份数
lg: 24 //栅格布局份数
}
]
}
//附加险
// {
// showMoudle: true, //模块是否展示
// fatherTitle: '附加计划',
// keyType: 'Array', //用于表单收集值时,判断是数组还是对象
// key: 'apiProductPlanAdditionalInfoDtoList',
// anchorKey: 'apiProductPlanAdditionalInfoDtoList',
// fatherRequired: true, //父级必填,代表个人资料这个模块有必填项
// addChildren: true,
// addChildrenTxt: '新增附加险',
// showTable: true, //是否展示表格
// data: [],
// columns: [
// {
// label: '产品名称',
// prop: 'productLaunchNameValue',
// type: 'text'
// },
// {
// label: '供款期数',
// prop: 'issueNumber',
// type: 'text'
// },
// {
// label: '保障年期',
// prop: 'guaranteePeriod',
// type: 'text'
// },
// {
// label: '保单币种',
// prop: 'policyCurrency',
// type: 'text'
// },
// {
// label: '保单额度',
// prop: 'sumInsured',
// type: 'text'
// },
// {
// label: '每期保费',
// prop: 'eachIssuePremium',
// type: 'text'
// },
// {
// label: '保障级别',
// prop: 'protectionLevel',
// type: 'text'
// },
// {
// label: '自付额',
// prop: 'deductibles',
// type: 'text'
// },
// {
// label: '附加保障',
// prop: 'additionalSafeguards',
// type: 'text'
// }
// ],
// // 弹窗表单的配置
// formItem: [
// {
// label: '产品名称',
// value: '',
// key: 'productLaunchName',
// domType: 'SearchSelect',
// required: false,
// maxLength: 30,
// disabled: false,
// placeholder: '请输入',
// show: true,
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// labelPosition: 'top', //标签的位置
// lg: 8 //栅格布局份数
// },
// {
// label: '供款期数',
// key: 'issueNumber',
// value: '',
// domType: 'Input',
// required: false,
// disabled: false,
// placeholder: '请选择',
// dictType: 'issueNumber',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
// {
// label: '保障年期(若是终身,输入999)',
// key: 'guaranteePeriod',
// value: '',
// domType: 'Input',
// inputType: 'number',
// required: false,
// maxLength: 300,
// disabled: false,
// placeholder: '请输入',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
// {
// label: '保单币种',
// key: 'policyCurrency',
// value: '',
// domType: 'Select',
// inputType: 'text',
// required: false,
// maxLength: 300,
// disabled: false,
// placeholder: '请输入',
// show: true,
// dictType: 'bx_currency_type',
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
// {
// label: '保单额度(重疾)',
// key: 'sumInsured',
// value: '',
// domType: 'Input',
// inputType: 'number',
// required: false,
// maxLength: 300,
// disabled: false,
// placeholder: '请输入',
// show: false,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
// {
// label: '每期保费',
// key: 'eachIssuePremium',
// value: '',
// domType: 'Input',
// inputType: 'number',
// required: false,
// maxLength: 300,
// disabled: false,
// placeholder: '请输入',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
// {
// label: '保障地区',
// key: 'guaranteeRegion',
// value: '',
// domType: 'Input',
// inputType: 'text',
// required: false,
// maxLength: 300,
// disabled: false,
// placeholder: '请输入',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
// {
// label: '保障级别',
// value: '',
// key: 'protectionLevel',
// domType: 'Input',
// inputType: 'text',
// required: false,
// maxLength: 300,
// disabled: false,
// placeholder: '请输入',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
// {
// label: '自付额',
// value: '',
// key: 'deductibles',
// domType: 'Input',
// inputType: 'number',
// required: false,
// maxLength: 300,
// disabled: false,
// placeholder: '请输入',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
// {
// label: '附加保障',
// value: '',
// key: 'additionalSafeguards',
// domType: 'Input',
// inputType: 'textarea',
// required: false,
// maxLength: 300,
// disabled: false,
// placeholder: '请输入',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 24, //栅格布局份数
// lg: 24 //栅格布局份数
// }
// ]
// }
]
export default productPlan
......@@ -28,7 +28,7 @@ const secondHolder = [
//受益人
{
showMoudle: false, //模块是否展示
fatherTitle: '受益人',
fatherTitle: '第二持有人',
keyType: 'Object', //用于表单收集值时,判断是数组还是对象
key: 'apiSecondHolderInfoDto',
anchorKey: 'apiSecondHolderInfoDto',
......
......@@ -149,37 +149,115 @@
>
</el-col>
<el-table :data="father.data" border v-if="father.data.length > 0">
<template v-if="father.key == 'apiTaxationDtoList'">
<el-table-column label="税务国家" prop="taxCountry" align="center">
<!-- 动态渲染列 -->
<!-- :label="column.label" -->
<el-table-column
v-for="column in father.columns"
:key="column.prop"
:prop="column.prop"
align="center"
>
<template #header>
<span
:class="{ 'required-label': column.required ? 'required-label' : '' }"
>{{ column.label }}</span
>
</template>
<template #default="scope">
<el-input
size="default"
placeholder="请输入"
v-model="scope.row.taxCountry"
<!-- 远程搜索选择框 -->
<el-select
v-if="column.type === 'remoteSelect'"
v-model="scope.row[column.prop]"
filterable
remote
reserve-keyword
:placeholder="column.placeholder"
:remote-method="
query => searchSelectList(query, column.searchType, scope.row)
"
:loading="searchLoadingStates[column.searchType]"
:disabled="editStatus"
@change="handleRemoteSelectChange(scope.row, column, father)"
>
<template>
<el-option
v-for="item in searchOptions[column.searchType] || []"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</template>
</el-table-column>
<el-table-column label="税务编号" prop="taxId" align="center">
<template #default="scope">
</el-select>
<!-- 普通选择框 -->
<el-select
v-else-if="column.type === 'select'"
v-model="scope.row[column.prop]"
:placeholder="column.placeholder"
:disabled="editStatus"
@change="changeSelect(father, scope.row, column.prop, $event)"
>
<el-option
v-for="item in fetchDictData(column.dictType)"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<!-- 日期选择器 -->
<el-date-picker
v-else-if="column.type === 'datePicker'"
v-model="scope.row[column.prop]"
:type="column.timeType"
:placeholder="column.placeholder"
:disabled="editStatus"
style="width: 100%"
range-separator="至"
start-placeholder="开始"
end-placeholder="结束"
/>
<el-input
v-else-if="column.type === 'inputNumber'"
v-model.number="scope.row[column.prop]"
:placeholder="column.placeholder"
:disabled="editStatus"
type="number"
>
<template v-if="column.unit" #append>
<span>{{ column.unit }}</span>
</template>
</el-input>
<el-radio-group
v-model="scope.row[column.prop]"
v-else-if="column.type === 'radioGroup'"
>
<el-radio value="1" size="large"></el-radio>
<el-radio value="0" size="large"></el-radio>
</el-radio-group>
<!-- 普通输入框(默认) -->
<el-input
v-model="scope.row.taxId"
size="default"
placeholder="请输入"
v-else
v-model="scope.row[column.prop]"
:placeholder="column.placeholder"
:disabled="editStatus"
@blur="tableInputBlur(father, scope.row, column.prop, $event)"
/>
</template>
</el-table-column>
<el-table-column width="60px" align="center" label="操作">
<!-- 操作列(固定) -->
<el-table-column width="80" align="center" label="操作">
<template #default="scope">
<el-icon
class="deleteIcon"
<el-button
type="danger"
size="small"
@click="deleteChildren(father, scope.$index)"
><Delete
/></el-icon>
>
删除
</el-button>
</template>
</el-table-column>
</template>
</el-table>
</el-row>
</template>
......@@ -353,10 +431,13 @@ const props = defineProps({
tabSource: { type: String, default: '' },
idsObj: { type: Object, default: () => ({}) }, //引用这个组件的页面来源,用于逻辑判断
apiPolicyholderInfoDto: { type: Object, default: () => ({}) }, //投保人编辑状态详情
apiInsurantInfoDto: { type: Object, default: () => ({}) } //受保人编辑状态详情
apiInsurantInfoDto: { type: Object, default: () => ({}) }, //受保人编辑状态详情
isExportAppointment: { type: Boolean, default: false } //是否导入
})
const emit = defineEmits(['handleSuccess'])
const { proxy } = getCurrentInstance()
const tempPolicyholderDom = ref([]) //投保人dom
const tempInsurantDom = ref([]) //受保人dom
const customerRightRef = ref(null)
const showPhoneDrawer = ref(false) //电话抽屉开关
const showAddressDrawer = ref(false) //地址抽屉开关
......@@ -367,7 +448,6 @@ const errorFields = ref([]) // 存储校验失败的字段信息
const editStatus = ref(true) // 表单是否可编辑,若是修改初始不可编辑
const openList = ref(false) // 客户列表弹窗
const oldObjInfo = ref({}) // 修改时存储原始数据,便于撤销操作
const tableLoading = ref(false)
const tableData = ref([])
const total = ref(0)
......@@ -462,7 +542,29 @@ const operationBtnList = ref([
}
])
const customerFormRef = ref(null)
// 表格改变下拉框
const changeSelect = (father, row, prop, newValue) => {
if (prop == 'documentType') {
// 检查其他行是否已有相同的证件类型(排除自己)
const hasDuplicate = father.data.some(item => item !== row && item.documentType === newValue)
if (hasDuplicate) {
//如果选择的是身份证,给性别,生日,年龄赋值
proxy.$modal.confirm(`该证件类型已存在,请勿重复添加!`, {
showCancel: '0',
title: '填写提示'
})
// 清空当前行的选择
row.documentType = null // 或者 undefined,根据你的数据结构
}
}
console.log('提交', processedCustomerData.value)
}
const tableInputBlur = (father, row, prop, newValue) => {
if (prop == 'idNumber' && row.documentType == 'idCard') {
getFieldValue(prop, row.idNumber)
}
}
const changePageNo = val => {
queryParams.value.pageNo = val
customerList()
......@@ -500,9 +602,7 @@ const handleAppendInput = child => {
}
}
const handleInputBlur = child => {
if (form.value['documentType'] == 'idCard' && child.key == 'idNumber') {
getFieldValue(child.key)
} else if (
if (
(child.key == 'weight' || child.key == 'height') &&
form.value['weight'] &&
form.value['height']
......@@ -512,12 +612,12 @@ const handleInputBlur = child => {
getFieldValue(child.key)
}
}
const getFieldValue = key => {
const getFieldValue = (key, value) => {
let obj = {}
if (form.value['documentType'] == 'idCard' && key == 'idNumber') {
if (key == 'idNumber') {
obj = {
calculateType: 6,
requestValue: form.value['idNumber']
requestValue: value
}
} else if (key == 'weight' || key == 'height') {
obj = {
......@@ -560,11 +660,22 @@ const addChildren = father => {
taxCountry: '',
taxId: ''
}
let obj5 = {
id: Date.now() + Math.floor(Math.random() * 1000), //唯一标识
span: 24, //栅格布局份数
documentType: '',
idNumber: '',
certificateValidityPeriod: '',
isPermanent: ''
}
for (const section of processedData) {
if (father.key == 'apiTaxationDtoList' && section.key == father.key) {
section.data.push(obj4)
}
if (father.key == 'apiCertificateDtoList' && section.key == father.key) {
section.data.push(obj5)
}
}
processedCustomerData.value = processedData
console.log('processedCustomerData.value', processedCustomerData.value)
......@@ -579,6 +690,9 @@ const deleteChildren = (father, childIndex) => {
if (father.key == 'apiTaxationDtoList' && section.key == father.key) {
section.data.splice(childIndex, 1)
}
if (father.key == 'apiCertificateDtoList' && section.key == father.key) {
section.data.splice(childIndex, 1)
}
}
processedCustomerData.value = processedData
}
......@@ -692,7 +806,17 @@ const processFormData = async () => {
} else if (props.activeName !== 'insurantInfo' && section.key == 'policyholderRel') {
section.showMoudle = false
}
if (props.activeName == 'insurantInfo') {
if (form.value['policyholderRel'] && form.value['policyholderRel'] == 'MYSELF') {
if (section.key == 'policyholderRel') {
section.showMoudle = true
} else {
section.showMoudle = false
}
} else {
section.showMoudle = true
}
}
if (section.data) {
for (const field of section.data) {
if (field.dictType) {
......@@ -731,7 +855,8 @@ const processFormData = async () => {
} else if (
props.customerBizId &&
(props.tabSource == 'policyholder' || props.tabSource == 'insurantInfo') &&
!props.idsObj.appointmentBizId
!props.idsObj.appointmentBizId &&
!props.isExportAppointment
) {
//是投保人/受保人但是新增预约 需要引用客户资料的值
getCustomerInfo(props.customerBizId, processedData)
......@@ -742,6 +867,9 @@ const processFormData = async () => {
// 投保人回显值
setFormValue(props.apiInsurantInfoDto, processedData)
} else {
if (props.tabSource == 'customer') {
form.value.smokingStatus = '0'
}
processedCustomerData.value = oldCustomerData.value = processedData
}
}
......@@ -906,6 +1034,17 @@ const handleSelectChange = child => {
// 强制同步:确保form.value.policyholderRel与当前选择的值一致
processedCustomerData.value.forEach(section => {
if (section.keyType == 'Array') {
section.data = []
}
if (section.data) {
for (const field of section.data) {
if (field.key !== 'policyholderRel') {
form.value[field.key] = ''
delete saveKey.value[field.key]
}
}
}
if (form.value[child.key] == 'MYSELF') {
if (section.key == 'policyholderRel') {
section.showMoudle = true
......@@ -916,7 +1055,6 @@ const handleSelectChange = child => {
section.showMoudle = true
}
})
console.log('下拉', form.value)
break
default:
......@@ -956,11 +1094,8 @@ const setFormValue = (obj, formData, exportValue) => {
form.value = JSON.parse(JSON.stringify(obj))
// 深拷贝原始数据
const processedData = JSON.parse(JSON.stringify(formData))
for (const section of processedData) {
// 这里还要回显受供养人数,等调试的时候再加
// if (section.key == 'personInfo') {
// section.data.push()
// }
if (
section.key == 'apiTaxationDtoList' &&
obj.apiTaxationDtoList &&
......@@ -968,6 +1103,21 @@ const setFormValue = (obj, formData, exportValue) => {
) {
section.data = JSON.parse(JSON.stringify(obj.apiTaxationDtoList))
}
if (
section.key == 'apiCertificateDtoList' &&
obj.apiCertificateDtoList &&
obj.apiCertificateDtoList.length > 0
) {
obj.apiCertificateDtoList.forEach(item => {
if (item.certificateStartDate) {
item.certificateValidityPeriod = [item.certificateStartDate, item.certificateEndDate]
}
if (item.isPermanent || item.isPermanent == 0) {
item.isPermanent = String(item.isPermanent)
}
})
section.data = JSON.parse(JSON.stringify(obj.apiCertificateDtoList))
}
// 编辑状态当tab为受保人时,与投保人关系为本人控制受保人信息模块隐藏
if (
props.activeName == 'insurantInfo' &&
......@@ -1031,9 +1181,6 @@ const setFormValue = (obj, formData, exportValue) => {
}
if (addressObj) {
form.value[
field.key
] = `${addressObj.region} ${addressObj.city} ${addressObj.street} ${addressObj.location}`
addressObj.addressString = `${addressObj.region}${addressObj.city}${addressObj.street}${addressObj.location}`
addressObj.objType = field.drawerType
saveKey.value[field.key] = addressObj
......@@ -1047,7 +1194,9 @@ const setFormValue = (obj, formData, exportValue) => {
tempAddressList.push(addressObj)
}
}
console.log('====================================')
console.log('form.value[field.key]', field.key, form.value[field.key])
console.log('====================================')
break
case 'country':
form.value[field.key] = obj.nationality
......@@ -1062,6 +1211,12 @@ const setFormValue = (obj, formData, exportValue) => {
default:
break
}
for (const key in obj) {
if (field.key == key && !obj[key]) {
obj[key] = ''
form.value[key] = ''
}
}
}
}
}
......@@ -1080,6 +1235,7 @@ const setFormValue = (obj, formData, exportValue) => {
}
}
})
if (form.value['birthday']) {
let age = calculateExactAge(proxy.formatToDate(form.value.birthday))
if (age >= 18) {
......@@ -1091,9 +1247,12 @@ const setFormValue = (obj, formData, exportValue) => {
phoneQuickList.value = removeDuplicates(tempPhoneList, 'phoneString')
addressQuickList.value = removeDuplicates(tempAddressList, 'addressString')
if (addressQuickList.value.length > 0) {
addressQuickList.value.forEach(item => {
form.value[item.type] = `${item.region} ${item.city} ${item.street} ${item.location}`
})
}
processedCustomerData.value = processedData
console.log('form.value', form.value)
}
// 数组去重
function removeDuplicates(arr, key) {
......@@ -1133,9 +1292,6 @@ const resetForm = () => {
.confirm('是否确认撤销所作操作?')
.then(function () {
customerFormRef.value.resetFields()
console.log('切换之前的form', oldObjInfo.value)
console.log('切换之前的dom', oldCustomerData.value)
// processedCustomerData.value = JSON.parse(JSON.stringify(oldCustomerData.value))
setFormValue(oldObjInfo.value, oldCustomerData.value)
})
......@@ -1167,16 +1323,28 @@ const resetShow = (key, status) => {
//source:因为这个组件是公共组件所以提交的时候要知道是哪里要获取表单的值
const handleFormValues = source => {
let submitObj = {}
let processedData = []
// 因为投保人没有policyholderRel的校验会影响 受保人,所以暂时先赋值处理
if (source == 'policyHolderInfoRef') {
form.value['policyholderRel'] = '111' //因为校验在form上所以这句不能去除
submitObj = { ...policyholderForm.value }
processedData = JSON.parse(JSON.stringify(tempPolicyholderDom.value))
} else if (source == 'insuredInfoRef') {
submitObj = { ...insuredForm.value }
processedData = JSON.parse(JSON.stringify(tempInsurantDom.value))
} else {
submitObj = { ...form.value }
processedData = JSON.parse(JSON.stringify(processedCustomerData.value))
}
let processedData = JSON.parse(JSON.stringify(processedCustomerData.value))
let tipName =
props.activeName == 'policyHolderInfo'
? '投保人'
: source == 'insuredInfo'
? '受保人'
: props.activeName == 'customer'
? '客户资料'
: ''
return new Promise(async resolve => {
// 如果没有点击受保人这个tab页就进行填写提醒,
if (
......@@ -1187,14 +1355,10 @@ const handleFormValues = source => {
resolve(undefined)
return
}
if (processedData.length > 0) {
customerFormRef.value.validate((valid, fields) => {
if (valid) {
if (source == 'insuredInfoRef') {
console.log('====================================')
console.log('submitObj', form.value['policyholderRel'])
console.log('====================================')
}
let addressList = []
if (submitObj['birthday']) {
if (source == 'insuredInfoRef' || source == 'policyHolderInfoRef') {
......@@ -1205,6 +1369,8 @@ const handleFormValues = source => {
}
errorFields.value = [] // 清空错误信息
console.log('errorFields.value', errorFields.value)
//处理表单数据
for (const key1 in form.value) {
for (const key2 in saveKey.value) {
......@@ -1237,8 +1403,43 @@ const handleFormValues = source => {
if (addressList.length > 0) {
submitObj['addressList'] = addressList
}
let obj1 = {
documentType: '证件类型',
idNumber: '证件号码'
}
processedCustomerData.value.forEach(item => {
processedData.forEach(item => {
if (item.key == 'apiCertificateDtoList' && item.data.length > 0) {
item.data.forEach((item1, index) => {
if (!item1.isPermanent || item1.isPermanent == '0') {
obj1.certificateValidityPeriod = '证件有效期'
} else {
delete obj1.certificateValidityPeriod
}
for (const key in obj1) {
if (!item1[key]) {
errorFields.value.push({
message: `${tipName}证件信息-第${index + 1}${obj1[key]}不能为空`
})
return
}
if (key == 'certificateValidityPeriod' && item1[key]) {
item1.certificateStartDate = proxy.formatToDate(
item1.certificateValidityPeriod[0]
)
item1.certificateEndDate = proxy.formatToDate(
item1.certificateValidityPeriod[1]
)
delete item1.certificateValidityPeriod
}
}
})
submitObj['apiCertificateDtoList'] = item.data
} else if (item.key == 'apiCertificateDtoList' && item.data.length == 0) {
errorFields.value.push({
message: `${tipName}证件信息不能为空`
})
}
if (item.key == 'apiTaxationDtoList' && item.data.length > 0) {
submitObj['apiTaxationDtoList'] = item.data.filter(item => {
return item.taxCountry && item.taxCountry.trim() && item.taxId && item.taxId.trim()
......@@ -1250,7 +1451,6 @@ const handleFormValues = source => {
deleteKeyList.value.forEach(item => {
delete submitObj[item]
})
if (errorFields.value.length > 0) {
proxy.$message.error(errorFields.value[0].message)
return undefined
......@@ -1289,9 +1489,13 @@ const handleFormValues = source => {
resolve(errorFields.value.length == 0 ? submitObj : null)
} else {
errorFields.value = getInvalidFields(fields)
console.log('====================================')
console.log('222222', errorFields.value)
console.log('====================================')
if (errorFields.value.length > 0) {
proxy.$message.error(errorFields.value[0].message)
}
resolve(undefined)
}
})
......@@ -1304,8 +1508,6 @@ const handleFormValues = source => {
resolve(props.apiInsurantInfoDto)
}
} else {
// 新增状态
// 因为这两个在同一个大提交里,所以要判断是哪个提交,方便这两个都有自己独立的提交验证
resolve(undefined)
}
}
......@@ -1334,6 +1536,17 @@ watch(
{ immediate: true, deep: true }
)
watch(
() => processedCustomerData.value,
newVal => {
if (props.activeName == 'policyholder') {
tempPolicyholderDom.value = JSON.parse(JSON.stringify(newVal))
} else if (props.activeName == 'insurantInfo') {
tempInsurantDom.value = JSON.parse(JSON.stringify(newVal))
}
},
{ immediate: true, deep: true }
)
watch(
() => props.activeName,
(newVal, oldVal) => {
editStatus.value = false
......@@ -1364,11 +1577,28 @@ watch(
editStatus.value = newVal
}
)
//导入预约单成功后,要重新渲染页面回显值
watch(
() => props.isExportAppointment,
newVal => {
console.log('导入发生变化', newVal)
if (newVal) {
if (props.tabSource == 'policyholder') {
// 投保人回显值
setFormValue(props.apiPolicyholderInfoDto, processedCustomerData.value)
} else if (props.tabSource == 'insurantInfo') {
// 受保人回显值
setFormValue(props.apiInsurantInfoDto, processedCustomerData.value)
}
}
}
)
// 暴露给父组件
defineExpose({
handleFormValues,
handleEditStatus,
getRawForm: () => JSON.parse(JSON.stringify(form.value))
getInsuredForm: () => JSON.parse(JSON.stringify(insuredForm.value))
})
</script>
<style lang="scss" scoped>
......@@ -1378,6 +1608,11 @@ defineExpose({
height: 600px;
overflow-y: scroll;
}
.required-label::before {
content: '*';
color: #f56c6c;
margin-right: 4px;
}
.customerContainer {
/* display: flex; */
height: 100%;
......
......@@ -10,69 +10,114 @@
<div class="status">{{ processInfo.status || '--' }}</div>
<div class="time">
<span class="iconfont icon-yanqiweiwancheng"></span>
<span>{{ parseTime(processInfo.createTime) }}{{
<span
>{{ parseTime(processInfo.createTime) }}{{
processInfo.customerName || '--'
}}创建</span>
}}创建</span
>
</div>
</div>
</div>
</div>
</div>
<div class="tabsBox">
<el-tabs v-model="activeName" class="demo-tabs" :before-leave="beforeTabLeave" ref="tabPaneRef">
<el-tab-pane v-for="(tab) in tabsList" :key="tab.name" :label="tab.label" :name="tab.name">
<el-tabs
v-model="activeName"
class="demo-tabs"
:before-leave="beforeTabLeave"
ref="tabPaneRef"
>
<el-tab-pane
v-for="(tab, tIndex) in tabsList"
:key="tab.name"
:label="tab.label"
:name="tab.name"
>
<!-- 注意tabPaneBox这个类名与子组件的锚点定位相关,不能轻易改动 -->
<div :class="{ tabPaneBox: activeName !== 'appointment' }">
<div v-if="tab.name === 'overview'" class="overviewBox">
<div class="oneItem" v-for="item in tabsList.filter(item => item.id !== -1 && item.status)"
:key="item.id" @click="handleStep(item)">
<div class="circle" :class="{
<div
class="oneItem"
v-for="item in tabsList.filter(item => item.id !== -1 && item.status)"
:key="item.id"
@click="handleStep(item)"
>
<div
class="circle"
:class="{
finfishCircle: item.status == '1',
unFinishCircle: item.status == '0'
}">
}"
>
<el-icon v-if="item.status == '1'">
<Check />
</el-icon>
<span v-else>{{ item.id }}</span>
</div>
<div class="title" :class="{
<div
class="title"
:class="{
finfishTitle: item.status == '1',
unFinishTitle: item.status == '0'
}">
}"
>
{{ item.label }}
</div>
<div class="status" :class="{
<div
class="status"
:class="{
finfishStatus: item.status == '1',
unFinishStatus: item.status == '0'
}">
}"
>
{{ item.status == '1' ? '已完成' : '未完成' }}
</div>
<div class="operation">
<el-icon class="editIcon" v-if="item.status == '0'">
<EditPen />
</el-icon>
<div :class="{
<div
:class="{
finfishOperation: item.status == '1',
unFinishOperation: item.status == '0'
}">
}"
>
{{ item.status == '1' ? '点击查看详情' : '去填写' }}
</div>
</div>
</div>
</div>
<Customer v-if="tab.name === 'customer'" :activeName="activeName"
:customerBizId="processInfo.customerBizId" @handleSuccess="handleSuccess"
:tabIndex="tabsList.findIndex(t => t.name === 'customer')" anchorContainer=".tabPaneBox"
tabSource="customer" />
<Customer
v-if="tab.name === 'customer'"
:activeName="activeName"
:customerBizId="processInfo.customerBizId"
@handleSuccess="handleSuccess"
:tabIndex="tabsList.findIndex(t => t.name === 'customer')"
anchorContainer=".tabPaneBox"
tabSource="customer"
/>
<div v-if="tab.name === 'fnaform'">
<FanForm :activeName="activeName" :fnaFormBizId="processInfo.fnaFormBizId"
:customerBizId="processInfo.customerBizId" :dictTypeLists="dictTypeLists" :customerInfo="customerInfo"
@handleSuccess="handleSuccess" :tabIndex="tabsList.findIndex(t => t.name === 'fnaform')"
anchorContainer=".tabPaneBox" tabSource="fnaform" />
<FanForm
:activeName="activeName"
:fnaFormBizId="processInfo.fnaFormBizId"
:customerBizId="processInfo.customerBizId"
:dictTypeLists="dictTypeLists"
:customerInfo="customerInfo"
@handleSuccess="handleSuccess"
:tabIndex="tabsList.findIndex(t => t.name === 'fnaform')"
anchorContainer=".tabPaneBox"
tabSource="fnaform"
/>
</div>
<div v-if="tab.name === 'appointment'">
<AppointmentEdit :embed="true" editStatus="add" :tabName="activeName" :processDetail="processInfo"
@handleSuccess="handleSuccess" source="fnaList" />
<AppointmentEdit
:embed="true"
editStatus="add"
:tabName="activeName"
:processDetail="processInfo"
@handleSuccess="handleSuccess"
source="fnaList"
/>
</div>
<div v-if="tab.name === 'newpolicy'">关联新单内容</div>
</div>
......@@ -166,6 +211,40 @@ const tabsList = ref([
const { csf_fna_status } = proxy.useDict('csf_fna_status')
// 获取各个流程所需要得字典数据
const getDictsData = async () => {
// 请求每个流程中所涉及到的字典值数据,如果缓存中有,则不再请求
if (dictStore.dictTypeLists.length == 0) {
proxy.useDictLists([
'csf_employment',
'sys_no_yes',
'bx_currency_type',
'csf_liquid_asset_type',
'csf_premium_funding_source',
'csf_customer_type',
'csf_customer_title',
'sys_gender',
'csf_marriage',
'csf_education',
'csf_id_type',
'csf_ap_apply_type',
'csf_ap_meeting_point',
'csf_ap_first_issue',
'csf_ap_dividend',
'csf_ap_frequency',
'csf_ap_rel',
'csf_ap_registration',
'csf_ap_exercise',
'csf_ap_risk',
'csf_ap_movie',
'csf_ap_game',
'wj_question_first_category',
'wj_question_second_category',
'csf_ap_policy_transfer',
'md_bank',
'csf_property_type',
'oss_data_type',
'oss_data_person'
])
}
// 获取租户用户列表
const params1 = {
tenantBizId: userStore.projectInfo.tenantBizId,
......@@ -299,41 +378,6 @@ const getDictsData = async () => {
})
dictStore.setAllInsuranceCompanyList(response9.data.records)
}
// 请求每个流程中所涉及到的字典值数据,如果缓存中有,则不再请求
if (dictStore.dictTypeLists.length == 0) {
proxy.useDictLists([
'csf_employment',
'sys_no_yes',
'bx_currency_type',
'csf_liquid_asset_type',
'csf_premium_funding_source',
'csf_customer_type',
'csf_customer_title',
'sys_gender',
'csf_marriage',
'csf_education',
'csf_id_type',
'csf_ap_apply_type',
'csf_ap_meeting_point',
'csf_ap_first_issue',
'csf_ap_dividend',
'csf_ap_frequency',
'csf_ap_rel',
'csf_ap_registration',
'csf_ap_exercise',
'csf_ap_risk',
'csf_ap_movie',
'csf_ap_game',
'wj_question_first_category',
'wj_question_second_category',
'csf_ap_policy_transfer',
'md_bank',
'csf_property_type',
'oss_data_type',
'oss_data_person'
])
}
}
// 更新流程
......@@ -361,6 +405,8 @@ function getProcessInfo(fnaBizId, changeTab, currentTab) {
item.status = '0'
}
})
console.log('客户资料新增成功', tabsList.value)
csf_fna_status._object.csf_fna_status.forEach(item => {
if (item.value == res.data.status) {
processInfo.value.status = item.label
......
......@@ -84,11 +84,11 @@
<el-col>
<div class="topButtonBox">
<!-- <el-button
v-if="idsObj.appointmentBizId && pageSource !== 'policyList'"
v-if="!idsObj.appointmentBizId"
type="primary"
icon="Plus"
@click="handleAddExecl"
>上传EXECL</el-button
@click="execlDialog = true"
>导入</el-button
> -->
<el-button
v-if="pageSource !== 'policyList' && idsObj.appointmentBizId"
......@@ -122,12 +122,7 @@
</el-col>
</el-row>
<el-tabs v-model="activeName" type="card" class="demo-tabs" :before-leave="beforeTabLeave">
<el-tab-pane
v-for="tab in tabsList"
:key="tab.name"
:label="tab.label"
:name="tab.name"
>
<el-tab-pane v-for="tab in tabsList" :key="tab.name" :label="tab.label" :name="tab.name">
<div
class="appointmentTabPaneBox"
:style="{
......@@ -148,6 +143,7 @@
:fatherTabName="tabName"
:editStatus="editStatus"
:affixOffset="pageSource == 'fnaList' ? 360 : 250"
:isExportAppointment="isExportAppointment"
/>
</div>
<div v-if="tab.name === 'productPlan'">
......@@ -166,6 +162,7 @@
:fatherTabName="tabName"
:editStatus="editStatus"
:affixOffset="pageSource == 'fnaList' ? 360 : 250"
:isExportAppointment="isExportAppointment"
/>
</div>
<!-- 投保人 -->
......@@ -184,6 +181,7 @@
:apiPolicyholderInfoDto="appointmentSummeryInfo.apiPolicyholderInfoDto"
:idsObj="idsObj"
:customerBizId="props.processDetail.customerBizId"
:isExportAppointment="isExportAppointment"
/>
</div>
<!-- 受保人 -->
......@@ -203,6 +201,7 @@
:customerBizId="props.processDetail.customerBizId"
:customerInfo="customerInfo"
:apiInsurantInfoDto="appointmentSummeryInfo.apiInsurantInfoDto"
:isExportAppointment="isExportAppointment"
/>
</div>
<div v-if="tab.name === 'secondHolder'">
......@@ -222,6 +221,7 @@
:fatherTabName="tabName"
:editStatus="editStatus"
:affixOffset="pageSource == 'fnaList' ? 360 : 250"
:isExportAppointment="isExportAppointment"
/>
</div>
<div v-if="tab.name === 'beneficiary'">
......@@ -240,6 +240,7 @@
:fatherTabName="tabName"
:editStatus="editStatus"
:affixOffset="pageSource == 'fnaList' ? 360 : 250"
:isExportAppointment="isExportAppointment"
/>
</div>
<div v-if="tab.name === 'questionnaires'">
......@@ -339,8 +340,17 @@
</el-tabs>
</div>
</el-card>
<!-- 展示行程单详情 -->
<el-dialog v-model="execlDialog" title="Excel导入" width="40%">
<!-- 导入预约-->
<CommonDialog
dialogTitle="导入预约"
cancleText="关闭"
dialogWidth="50%"
:openDialog="execlDialog"
:showClose="true"
@close="execlDialog = false"
:showAction="false"
>
<div class="dialogBox">
<div>
<div class="tipTitle">您需要准备</div>
......@@ -364,14 +374,15 @@
:on-change="handleFileChange"
accept=".xlsx,.xls"
>
<el-button type="primary" @click="execlUpload">上传文件</el-button>
<el-button type="primary" :loading="exprotLoading">导入</el-button>
</el-upload>
</div>
</div>
</el-dialog>
</CommonDialog>
</div>
</template>
<script setup name="AppointmentEdit">
import CommonDialog from '@/components/commonDialog'
import AppointmentInfo from './components/appointmentInfo.vue'
import ProductPlan from './components/productPlan.vue'
import PolicyHolderInfo from './components/policyHolderInfo.vue'
......@@ -449,6 +460,8 @@ const idsObj = ref({}) //各个模块的bizId
const appointmentSummeryInfo = ref({}) //预约详情总信息
const currentFile = ref(null)
const foldInsurantInfo = ref(false) //健康信息中得受保人信息是否隐藏
const exprotLoading = ref(false) //导入预约loading
const isExportAppointment = ref(false) //是否导入预约信息
const processInfo = ref({
fnaNo: '暂无',
status: '未完成',
......@@ -634,35 +647,53 @@ const handleFileChange = async file => {
// 添加文件到 FormData(第二个参数是文件对象,第三个参数是文件名)
formData.append('file', rawFile, rawFile.name)
// 添加其他参数
formData.append('appointmentBizId', idsObj.value.appointmentBizId)
exprotLoading.value = true
isExportAppointment.value = false
const res = await uploadExcel(formData)
if (res.code === 200) {
proxy.$message.success('上传文件成功')
appointmentSummeryInfo.value = res.data
if (
res.data.apiAppointmentInfoDto.isSecond == '0' ||
res.data.apiAppointmentInfoDto.isSecond
) {
appointmentSummeryInfo.value.apiSecondHolderInfoDto.isSecond =
res.data.apiAppointmentInfoDto.isSecond
}
isExportAppointment.value = true
proxy.$message.success('预约导入成功!!')
console.log('导入预约信息', appointmentSummeryInfo.value)
exprotLoading.value = false
execlDialog.value = false
}
} catch (error) {
proxy.$message.error('上传失败')
console.error('Upload error:', error)
exprotLoading.value = false
proxy.$message.error(error.message)
}
return false // 阻止自动上传
}
const execlUpload = () => {
let data = {
appointmentBizId: idsObj.value.appointmentBizId,
file: currentFile.value
}
if (currentFile.value) {
uploadExcel(data).then(res => {
if (res.code == 200) {
proxy.$message.success('上传文件成功')
execlDialog.value = false
}
})
}
// exprotLoading.value = true
// let data = {
// // appointmentBizId: idsObj.value.appointmentBizId,
// file: currentFile.value
// }
// try {
// if (currentFile.value) {
// uploadExcel(data).then(res => {
// if (res.code == 200) {
// proxy.$message.success('预约导入成功')
// execlDialog.value = false
// exprotLoading.value = false
// }
// })
// }
// } catch (error) {
// proxy.$message.error(error.message)
// exprotLoading.value = false
// }
}
// 获取预约详情
function getAppointmentInfo(appointmentBizId, changeTab) {
......@@ -678,17 +709,13 @@ function getAppointmentInfo(appointmentBizId, changeTab) {
appointmentSummeryInfo.value.apiSecondHolderInfoDto.isSecond =
res.data.apiAppointmentInfoDto.isSecond
}
// 如果受保人中与投保人关系选择得是本人,那么健康信息中问卷只要填写投保人得问卷
// if (res.data.apiInsurantInfoDto && res.data.apiInsurantInfoDto.policyholderRel == 'MYSELF') {
// foldInsurantInfo.value = true
// }
let options = fetchDictData('csf_ap_status')
options.forEach(item => {
if (item.value == appointmentSummeryInfo.value.status) {
processInfo.value.status = item.label
}
})
// getCustomerInfo(res.data.apiAppointmentInfoDto.customerBizId)
if (!appointmentSummeryInfo.value.apiAppointmentInfoDto.appointmentBizId) {
showStorage.value = true
}
......@@ -717,6 +744,37 @@ function getCustomerInfo(customerBizId) {
}
// 获取各个流程所需要得字典数据
const getDictsData = async () => {
proxy.useDictLists([
'csf_employment',
'sys_no_yes',
'bx_currency_type',
'csf_liquid_asset_type',
'csf_premium_funding_source',
'csf_customer_type',
'csf_customer_title',
'sys_gender',
'csf_marriage',
'csf_education',
'csf_id_type',
'csf_ap_apply_type',
'csf_ap_meeting_point',
'csf_ap_first_issue',
'csf_ap_dividend',
'csf_ap_frequency',
'csf_ap_rel',
'csf_ap_registration',
'csf_ap_exercise',
'csf_ap_risk',
'csf_ap_movie',
'csf_ap_game',
'csf_ap_policy_transfer',
'wj_question_first_category',
'wj_question_second_category',
'csf_ap_status',
'md_bank',
'oss_data_type',
'oss_data_person'
])
if (route.query.source == 'policyList') {
const params4 = {
pageNo: 1,
......@@ -827,37 +885,6 @@ const getDictsData = async () => {
})
dictStore.setSignPeopleList(response7.data.records)
}
proxy.useDictLists([
'csf_employment',
'sys_no_yes',
'bx_currency_type',
'csf_liquid_asset_type',
'csf_premium_funding_source',
'csf_customer_type',
'csf_customer_title',
'sys_gender',
'csf_marriage',
'csf_education',
'csf_id_type',
'csf_ap_apply_type',
'csf_ap_meeting_point',
'csf_ap_first_issue',
'csf_ap_dividend',
'csf_ap_frequency',
'csf_ap_rel',
'csf_ap_registration',
'csf_ap_exercise',
'csf_ap_risk',
'csf_ap_movie',
'csf_ap_game',
'csf_ap_policy_transfer',
'wj_question_first_category',
'wj_question_second_category',
'csf_ap_status',
'md_bank',
'oss_data_type',
'oss_data_person'
])
}
// Tab切换前的验证
const beforeTabLeave = async (activeTabName, oldTabName) => {
......@@ -865,7 +892,7 @@ const beforeTabLeave = async (activeTabName, oldTabName) => {
// 获取受保人数据
let insuredData = null
if (insuredInfoRef.value) {
insuredData = await insuredInfoRef.value[0].handleFormValues('insuredInfoRef')
insuredData = await insuredInfoRef.value[0].getInsuredForm()
// 健康信息得展示内容要根据受保人与投保人得关系展示
if (activeTabName == 'questionnaires') {
// 编辑状态下
......@@ -900,15 +927,6 @@ const beforeTabLeave = async (activeTabName, oldTabName) => {
}
}
// 判断是否为数组
const isArray = value => {
return Array.isArray(value)
}
// 判断是否为对象
const isObject = value => {
return typeof value === 'object' && value !== null && !Array.isArray(value)
}
const handleSubmit = async type => {
// 提交得时候要拿到各个步骤得表单数据
if (appointmentInfoRef.value) {
......@@ -920,6 +938,10 @@ const handleSubmit = async type => {
submitAppointmentObj.value.apiProductPlanInfoDto =
await productPlanRef.value[0].handleSubmitForm()
if (!submitAppointmentObj.value.apiProductPlanInfoDto && isExportAppointment.value) {
proxy.$message.error('请确认产品计划信息')
return
}
if (!submitAppointmentObj.value.apiProductPlanInfoDto) {
proxy.$message.error('请完善产品计划信息')
return
......@@ -929,6 +951,12 @@ const handleSubmit = async type => {
if (policyHolderInfoRef.value) {
submitAppointmentObj.value.apiPolicyholderInfoDto =
await policyHolderInfoRef.value[0].handleFormValues('policyHolderInfoRef')
console.log(submitAppointmentObj.value.apiPolicyholderInfoDto)
if (!submitAppointmentObj.value.apiPolicyholderInfoDto && isExportAppointment.value) {
proxy.$message.error('请确认投保人信息')
return
}
if (!submitAppointmentObj.value.apiPolicyholderInfoDto) {
proxy.$message.error('请确认投保人信息')
return
......@@ -937,11 +965,14 @@ const handleSubmit = async type => {
// 获取受保人form
if (insuredInfoRef.value) {
submitAppointmentObj.value.apiInsurantInfoDto = await insuredInfoRef.value[0].handleFormValues(
'insuredInfoRef'
)
submitAppointmentObj.value.apiInsurantInfoDto =
await insuredInfoRef.value[0].handleFormValues('insuredInfoRef')
console.log('受保人', submitAppointmentObj.value.apiInsurantInfoDto)
if (!submitAppointmentObj.value.apiInsurantInfoDto && isExportAppointment.value) {
proxy.$message.error('请确认受保人信息')
return
}
if (!submitAppointmentObj.value.apiInsurantInfoDto) {
proxy.$message.error('请完善受保人信息')
return
......@@ -950,15 +981,22 @@ const handleSubmit = async type => {
if (beneficiaryInfoRef.value) {
submitAppointmentObj.value.apiBeneficiaryInfoFzDto =
await beneficiaryInfoRef.value[0].handleFormValues()
if (!submitAppointmentObj.value.apiBeneficiaryInfoFzDto && isExportAppointment.value) {
proxy.$message.error('请确认受益人信息')
return
}
if (!submitAppointmentObj.value.apiBeneficiaryInfoFzDto) {
proxy.$message.error('请完善受益人信息')
return
} else {
}
}
if (secondHolderInfoRef.value) {
submitAppointmentObj.value.apiSecondHolderInfoDto =
await secondHolderInfoRef.value[0].handleFormValues()
if (!submitAppointmentObj.value.apiSecondHolderInfoDto && isExportAppointment.value) {
proxy.$message.error('请确认第二持有人信息')
return
}
if (!submitAppointmentObj.value.apiSecondHolderInfoDto) {
proxy.$message.error('请完善第二持有人信息')
return
......@@ -1038,10 +1076,6 @@ const handleSubmit = async type => {
}
// 编辑状态下预约暂存
if (type == 'editStorage') {
// submitAppointmentObj.value.apiAppointmentInfoDto.customerBizId =
// props.processDetail.customerBizId
// submitAppointmentObj.value.apiAppointmentInfoDto.fnaBizId = props.processDetail.fnaBizId
// submitAppointmentObj.value.apiAppointmentInfoDto.fnaNo = props.processDetail.fnaNo
// 暂存预约单
appointmentEditStorage(submitAppointmentObj.value).then(res => {
if (res.code == 200) {
......@@ -1277,126 +1311,6 @@ const getPolicyDetail = tabName => {
console.error('请求失败:', error)
})
}
if (route.query.source == 'policyList') {
idsObj.value.policyBizId = route.query.policyBizId
// getCustomerInfo(props.policyDetailInfo.customerBizId)
appointmentSummeryInfo.value = JSON.parse(JSON.stringify(props.policyDetailInfo))
if (appointmentSummeryInfo.value.apiProductPlanInfoDto) {
appointmentSummeryInfo.value.apiAppointmentInfoDto = JSON.parse(
JSON.stringify(appointmentSummeryInfo.value.apiProductPlanInfoDto.apiProductPlanMainInfoDto)
)
}
policyNo.value = route.query.policyNo
idsObj.value.appointmentBizId = route.query.appointmentBizId
isEmbed.value = route.query.embed
getDictsData()
tabsList.value = [
{
label: '预计来佣',
name: 'expectedCommission',
id: 1,
key: 'expectedCommission'
},
{
label: '预计发佣',
name: 'expectedFortune',
id: 1,
key: 'expectedFortune'
},
{
label: '保单信息',
name: 'policyInfo',
id: 2,
key: 'policyInfo'
},
{
label: '保单附件',
name: 'policyAccessories',
id: 3,
key: 'policyAccessories'
},
{
label: '转介人',
name: 'policyBroker',
id: 4,
key: 'policyBroker'
},
{
label: '邮寄信息',
name: 'policyMailing',
id: 5,
key: 'policyMailing'
},
{
label: '核保信息',
name: 'verifyPolicyInfo',
id: 6,
key: 'verifyPolicyInfo'
},
{
label: '产品计划',
name: 'productPlan',
id: 8,
status: '0',
key: 'planBizId'
},
{
label: '投保人',
name: 'policyholder',
id: 9,
status: '0',
key: 'policyholderBizId'
},
{
label: '受保人',
name: 'insurantInfo',
id: 10,
status: '0',
key: 'insurantBizId'
},
{
label: '受益人',
name: 'beneficiary',
id: 11,
status: '0',
key: 'beneficiaryBizId'
},
{
label: '第二持有人',
name: 'secondHolder',
id: 12,
status: '0',
key: 'secondHolderBizId'
},
{
label: '健康信息', //后端还没加这个字段
name: 'questionnaires',
id: 13,
status: '0',
key: 'questionnaireBizId'
},
{
label: '转保声明',
name: 'policyTransfer',
id: 15,
status: '0',
key: 'policyTransfer'
},
{
label: '预约附件', //大提交的时候不用提交了,因为上传文件的时候已经入库了
name: 'accessories',
id: 16,
status: '0',
key: 'fnaBizId'
}
]
nextTick(() => {
activeName.value = 'expectedCommission'
})
}
// 根据页面来源的不同控制tab项内模块小提交按钮的显示与否,也能证明是修改状态
const showSubmitBtn = computed(() => {
if (route.query.appointmentNo && route.query.source == 'appointmentList') {
......@@ -1447,11 +1361,11 @@ onUnmounted(() => {
})
</script>
<style lang="scss" scoped>
:deep(.el-card ) {
:deep(.el-card) {
border: none !important;
}
:deep(.el-input-group__append ),
:deep(.el-input-group__prepend ) {
:deep(.el-input-group__append),
:deep(.el-input-group__prepend) {
background-color: #fff !important;
}
.noembed-container {
......
......@@ -5,8 +5,15 @@
<div style="position: relative; top: -100%; left: -1100%">
{{ appointmentRef }}
</div>
<CommonForm :anchorList="anchorList" :affixOffset="affixOffset" :anchorOffset="10"
:scrollContainerSelector="anchorContainer" :domIndex="tabIndex" :activeName="activeName" v-if="appointmentRef">
<CommonForm
:anchorList="anchorList"
:affixOffset="affixOffset"
:anchorOffset="10"
:scrollContainerSelector="anchorContainer"
:domIndex="tabIndex"
:activeName="activeName"
v-if="appointmentRef"
>
<template #form-right>
<el-form ref="appointmentInfoFormRef" :model="form" :rules="rules" label-width="120px">
<div v-for="father in processedAppointmentData">
......@@ -15,71 +22,156 @@
<CardOne :title="father.fatherTitle">
<template #mainTitCustom v-if="props.idsObj.appointmentBizId">
<div style="margin-left: 10px">
<el-button @click="viewHistory" type="primary" link
v-if="father.key == 'administration'">历史记录</el-button>
<el-button
@click="viewHistory"
type="primary"
link
v-if="father.key == 'administration'"
>历史记录</el-button
>
</div>
</template>
<template #headerRight v-if="father.key == 'administration'">
<div>
<el-button v-if="idsObj.appointmentBizId" @click="handleExprot" type="primary"
link>导出预约表</el-button>
<el-button v-if="appointmentStatus >= 2" @click="getItineraryInfo" type="primary"
link>行程单预览</el-button>
<el-button
v-if="idsObj.appointmentBizId"
@click="handleExprot"
type="primary"
link
>导出预约表</el-button
>
<el-button
v-if="appointmentStatus >= 2"
@click="getItineraryInfo"
type="primary"
link
>行程单预览</el-button
>
</div>
</template>
<template #content>
<!-- 不是表格 -->
<el-row :gutter="20" v-if="!father.showTable">
<template v-for="child in father.data" :key="child.key">
<el-col :sm="child.sm" :lg="child.lg" class="formItemBox" v-if="child.show">
<el-col
:sm="child.sm"
:lg="child.lg"
class="formItemBox"
v-if="child.show"
>
<div>
<el-form-item :label-width="child.labelWidth" :label="child.label" :prop="child.key"
:key="child.key" :label-position="child.labelPosition" class="button-form-item">
<el-input v-if="child.domType === 'Input'" :type="child.inputType"
v-model="form[child.key]" :placeholder="child.placeholder" maxlength="30"
:rows="child.rows" :disabled="editStatus" />
<el-select v-if="child.domType === 'Select'" v-model="form[child.key]"
:placeholder="child.placeholder" @change="handleSelectChange(father, child)"
:disabled="editStatus">
<el-option v-for="item in child.options" :key="item.value" :label="item.label"
:value="item.value" />
<el-form-item
:label-width="child.labelWidth"
:label="child.label"
:prop="child.key"
:key="child.key"
:label-position="child.labelPosition"
class="button-form-item"
>
<el-input
v-if="child.domType === 'Input'"
:type="child.inputType"
v-model="form[child.key]"
:placeholder="child.placeholder"
maxlength="30"
:rows="child.rows"
:disabled="editStatus"
/>
<el-select
v-if="child.domType === 'Select'"
v-model="form[child.key]"
:placeholder="child.placeholder"
@change="handleSelectChange(father, child)"
:disabled="editStatus"
>
<el-option
v-for="item in child.options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<!-- 带时分的时间框 -->
<div v-if="child.domType === 'datetimePicker'" class="compositionDateTime">
<el-date-picker type="date" placeholder="选择日期" style="width: 100%"
v-model="form[child.key]" :disabled="editStatus" @change="handleDateChange(child)"
:disabled-date="time => disabledDate(time, child)" format="YYYY-MM-DD"
value-format="YYYY-MM-DD" @clear="handleDateClear(child)" />
<div
v-if="child.domType === 'datetimePicker'"
class="compositionDateTime"
>
<el-date-picker
type="date"
placeholder="选择日期"
style="width: 100%"
v-model="form[child.key]"
:disabled="editStatus"
@change="handleDateChange(child)"
:disabled-date="time => disabledDate(time, child)"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
@clear="handleDateClear(child)"
/>
<span class="text-gray-500">-</span>
<el-time-picker placeholder="选择时分" style="width: 100%" v-model="child.timeValue"
:disabled="editStatus" format="HH:mm" value-format="HH:mm"
@change="timeValueChange(child)" />
<el-time-picker
placeholder="选择时分"
style="width: 100%"
v-model="child.timeValue"
:disabled="editStatus"
format="HH:mm"
value-format="HH:mm"
@change="timeValueChange(child)"
/>
</div>
<!-- 不带时分 -->
<el-date-picker style="width: 100%" v-if="child.domType === 'DatePicker'"
v-model="form[child.key]" type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
:placeholder="child.placeholder" :disabled="editStatus"
:disabled-date="time => disabledDate(time, child)" @change="handleDateChange(child)"
@clear="handleDateClear(child)" />
<el-input v-if="child.domType === 'arrowRight'" v-model="form[child.key]"
:placeholder="child.placeholder" :suffix-icon="ArrowRight" readonly
:disabled="editStatus" @focus="handleFoucs(child)">
<el-date-picker
style="width: 100%"
v-if="child.domType === 'DatePicker'"
v-model="form[child.key]"
type="date"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
:placeholder="child.placeholder"
:disabled="editStatus"
:disabled-date="time => disabledDate(time, child)"
@change="handleDateChange(child)"
@clear="handleDateClear(child)"
/>
<el-input
v-if="child.domType === 'arrowRight'"
v-model="form[child.key]"
:placeholder="child.placeholder"
:suffix-icon="ArrowRight"
readonly
:disabled="editStatus"
@focus="handleFoucs(child)"
>
</el-input>
<el-select v-model="form[child.key]" v-if="child.domType === 'SearchSelect'" filterable
:allow-create="child.allowCreate" reserve-keyword
<el-select
v-model="form[child.key]"
v-if="child.domType === 'SearchSelect'"
filterable
:allow-create="child.allowCreate"
reserve-keyword
@change="handleSelectChange(father, child)"
:remote-method="query => searchSelectList(query, child.key)" placeholder="请输入关键词搜索"
:loading="searchLoadingStates[child.key]" :disabled="editStatus">
<el-option v-for="item in searchOptions[child.key] || []" :key="item.id"
:label="item.label" :value="item.value" />
:remote-method="query => searchSelectList(query, child.key)"
placeholder="请输入关键词搜索"
:loading="searchLoadingStates[child.key]"
:disabled="editStatus"
>
<el-option
v-for="item in searchOptions[child.key] || []"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<div v-if="child.domType === 'Div'" class="divClass">
<div v-if="child.key == 'information'" class="desBox">
<div class="title">{{ child.title }}</div>
<div class="informationBox">
<div v-for="(item, index) in child.informationList" :key="index">
<div
v-for="(item, index) in child.informationList"
:key="index"
>
{{ item.name }}
</div>
</div>
......@@ -92,9 +184,15 @@
<!-- 是表格数据 -->
<el-row v-if="father.showTable">
<el-col :span="24" v-if="father.addChildren">
<el-button :disabled="editStatus" type="primary" icon="Plus" size="small"
style="margin-bottom: 10px" @click="addChildren(father)">{{ father.addChildrenTxt
}}</el-button>
<el-button
:disabled="editStatus"
type="primary"
icon="Plus"
size="small"
style="margin-bottom: 10px"
@click="addChildren(father)"
>{{ father.addChildrenTxt }}</el-button
>
</el-col>
<el-table :data="father.data" border v-if="father.data.length > 0">
<template v-if="father.key == 'referrerDtoList'">
......@@ -103,12 +201,23 @@
<span class="required-label">姓名</span>
</template>
<template #default="scope">
<el-select v-model="scope.row.realName" filterable remote reserve-keyword
placeholder="请输入关键词搜索" :remote-method="query => searchSelectList(query, 'realName')"
:loading="searchLoadingStates['realName']" :disabled="editStatus"
@change="handleTableSelectChange(father, scope.row, 'realName')">
<el-option v-for="item in searchOptions['realName'] || []" :key="item.id"
:label="item.label" :value="item.value" />
<el-select
v-model="scope.row.realName"
filterable
remote
reserve-keyword
placeholder="请输入关键词搜索"
:remote-method="query => searchSelectList(query, 'realName')"
:loading="searchLoadingStates['realName']"
:disabled="editStatus"
@change="handleTableSelectChange(father, scope.row, 'realName')"
>
<el-option
v-for="item in searchOptions['realName'] || []"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
......@@ -117,8 +226,12 @@
<span class="required-label">手机号</span>
</template>
<template #default="scope">
<el-input v-model="scope.row.phone" size="default" placeholder="请输入"
:disabled="editStatus" />
<el-input
v-model="scope.row.phone"
size="default"
placeholder="请输入"
:disabled="editStatus"
/>
</template>
</el-table-column>
<el-table-column label="邮箱" prop="email" align="center">
......@@ -126,13 +239,20 @@
<span class="required-label">邮箱</span>
</template>
<template #default="scope">
<el-input v-model="scope.row.email" size="default" placeholder="请输入"
:disabled="editStatus" />
<el-input
v-model="scope.row.email"
size="default"
placeholder="请输入"
:disabled="editStatus"
/>
</template>
</el-table-column>
<el-table-column width="60px" align="center" label="操作">
<template #default="scope">
<el-icon class="deleteIcon" @click="deleteChildren(father, scope.$index)">
<el-icon
class="deleteIcon"
@click="deleteChildren(father, scope.$index)"
>
<Delete />
</el-icon>
</template>
......@@ -144,12 +264,23 @@
<span class="required-label">姓名</span>
</template>
<template #default="scope">
<el-select v-model="scope.row.name" filterable remote reserve-keyword placeholder="请选择"
<el-select
v-model="scope.row.name"
filterable
remote
reserve-keyword
placeholder="请选择"
:remote-method="query => searchSelectList(query, 'name')"
:loading="searchLoadingStates['name']" :disabled="editStatus"
@change="handleTableSelectChange(father, scope.row, 'name')">
<el-option v-for="item in searchOptions['name'] || []" :key="item.id"
:label="item.label" :value="item.value" />
:loading="searchLoadingStates['name']"
:disabled="editStatus"
@change="handleTableSelectChange(father, scope.row, 'name')"
>
<el-option
v-for="item in searchOptions['name'] || []"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
......@@ -158,8 +289,12 @@
<span class="required-label">手机号</span>
</template>
<template #default="scope">
<el-input v-model="scope.row.phone" size="default" placeholder="请输入"
:disabled="editStatus" />
<el-input
v-model="scope.row.phone"
size="default"
placeholder="请输入"
:disabled="editStatus"
/>
</template>
</el-table-column>
<el-table-column label="执业编码" prop="practiceCode" align="center">
......@@ -167,35 +302,58 @@
<span class="required-label">执业编码</span>
</template>
<template #default="scope">
<el-input v-model="scope.row.practiceCode" size="default" placeholder="请输入"
:disabled="editStatus" />
<el-input
v-model="scope.row.practiceCode"
size="default"
placeholder="请输入"
:disabled="editStatus"
/>
</template>
</el-table-column>
<el-table-column label="邮箱" prop="email" align="center">
<template #default="scope">
<el-input v-model="scope.row.email" size="default" placeholder="请输入"
:disabled="editStatus" />
<el-input
v-model="scope.row.email"
size="default"
placeholder="请输入"
:disabled="editStatus"
/>
</template>
</el-table-column>
<el-table-column label="证件类型" prop="cardType" align="center">
<template #default="scope">
<el-select v-model="scope.row.cardType" placeholder="请选择" :disabled="editStatus"
clearable>
<el-option v-for="item in fetchDictData('csf_id_type')" :key="item.value"
:label="item.label" :value="item.value" />
<el-select
v-model="scope.row.cardType"
placeholder="请选择"
:disabled="editStatus"
clearable
>
<el-option
v-for="item in fetchDictData('csf_id_type')"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column label="证件号" prop="cardNo" align="center">
<template #default="scope">
<el-input v-model="scope.row.cardNo" size="default" placeholder="请输入"
:disabled="editStatus" />
<el-input
v-model="scope.row.cardNo"
size="default"
placeholder="请输入"
:disabled="editStatus"
/>
</template>
</el-table-column>
<el-table-column width="60px" align="center" label="操作">
<template #default="scope">
<el-icon @click="deleteChildren(father, scope.$index)" class="deleteIcon">
<el-icon
@click="deleteChildren(father, scope.$index)"
class="deleteIcon"
>
<Delete />
</el-icon>
</template>
......@@ -213,12 +371,26 @@
</CommonForm>
</div>
<!-- 历史签约记录 -->
<CommonDialog dialogTitle="历史记录" :showConfirm="false" cancleText="关闭" dialogWidth="70%" :openDialog="openList"
:showClose="true" @close="openList = false">
<CommonDialog
dialogTitle="历史记录"
:showConfirm="false"
cancleText="关闭"
dialogWidth="70%"
:openDialog="openList"
:showClose="true"
@close="openList = false"
>
<div class="dialogBox">
<CommonPage :showSearchForm="false" :show-pagination="true" :currentPage="queryParams.pageNo" :total="total"
:pageSize="queryParams.pageSize" @current-change="changePageNo" @size-change="changePageSize"
:showOperationBtn="false">
<CommonPage
:showSearchForm="false"
:show-pagination="true"
:currentPage="queryParams.pageNo"
:total="total"
:pageSize="queryParams.pageSize"
@current-change="changePageNo"
@size-change="changePageSize"
:showOperationBtn="false"
>
<template #table>
<el-table v-loading="tableLoading" :data="tableData" border height="350px">
<el-table-column label="创建人" align="center" prop="creatorName" />
......@@ -230,8 +402,13 @@
}}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100" class-name="small-padding fixed-width"
fixed="right">
<el-table-column
label="操作"
align="center"
width="100"
class-name="small-padding fixed-width"
fixed="right"
>
<template #default="scope">
<el-button link type="primary" @click="viewDetail(scope.row)">查看</el-button>
</template>
......@@ -242,8 +419,15 @@
</div>
</CommonDialog>
<!-- 签约详情 -->
<CommonDialog :dialogTitle="detailTitle" :showConfirm="false" cancleText="关闭" dialogWidth="70%"
:openDialog="showDetail" :showClose="true" @close="showDetail = false">
<CommonDialog
:dialogTitle="detailTitle"
:showConfirm="false"
cancleText="关闭"
dialogWidth="70%"
:openDialog="showDetail"
:showClose="true"
@close="showDetail = false"
>
<el-scrollbar max-height="600px">
<div class="dialogBox">
<AppointmentDetail :detailInfo="detailInfo" :editSatus="true"></AppointmentDetail>
......@@ -251,22 +435,52 @@
</el-scrollbar>
</CommonDialog>
<!-- 行程单详情 -->
<CommonDialog dialogTitle="香港行程安排" confirmText="下载行程单" dialogWidth="70%" :openDialog="showItinerary"
@confirm="handleExprotPdf" @close="showItinerary = false" :showClose="true" :showCancle="false"
:confirmLoading="exportLoading">
<CommonDialog
dialogTitle="香港行程安排"
confirmText="下载行程单"
dialogWidth="70%"
:openDialog="showItinerary"
@confirm="handleExprotPdf"
@close="showItinerary = false"
:showClose="true"
:showCancle="false"
:confirmLoading="exportLoading"
>
<div class="itineraryDialogBox">
<div class="dialogItem" v-for="item in itineraryData">
<div class="dialogItemTitle">{{ item.title }}</div>
<DetailPanel :data="item.data" :row-span="24" col-gap="10px" label-width="120px" row-height="45px"
:show-col-border="true" />
<DetailPanel
:data="item.data"
:row-span="24"
col-gap="10px"
label-width="120px"
row-height="45px"
:show-col-border="true"
/>
</div>
</div>
</CommonDialog>
<Phone @close="handleCloseDrawer" :showDrawer="showPhoneDrawer" :drawerInfo="drawerInfo"
:phoneMenuList="phoneMenuList" :phoneQuickList="phoneQuickList" @confirmDrawer="confirmDrawer" />
<Address @close="handleCloseDrawer" :showAddressDrawer="showAddressDrawer" :drawerInfo="drawerInfo"
:addressMenuList="addressMenuList" :addressQuickList="addressQuickList" @confirmDrawer="confirmDrawer" />
<Country :showCountryDrawer="showCountryDrawer" @close="handleCloseDrawer" @confirmCountry="confirmDrawer" />
<Phone
@close="handleCloseDrawer"
:showDrawer="showPhoneDrawer"
:drawerInfo="drawerInfo"
:phoneMenuList="phoneMenuList"
:phoneQuickList="phoneQuickList"
@confirmDrawer="confirmDrawer"
/>
<Address
@close="handleCloseDrawer"
:showAddressDrawer="showAddressDrawer"
:drawerInfo="drawerInfo"
:addressMenuList="addressMenuList"
:addressQuickList="addressQuickList"
@confirmDrawer="confirmDrawer"
/>
<Country
:showCountryDrawer="showCountryDrawer"
@close="handleCloseDrawer"
@confirmCountry="confirmDrawer"
/>
</div>
</template>
<script setup name="appointmentInfo">
......@@ -305,6 +519,7 @@ const props = defineProps({
fatherTabName: { type: String, default: '' }, //一级tab名称
anchorContainer: { type: String, default: '' }, //锚点滚动容器
editStatus: { type: Boolean, default: true }, //编辑状态
isExportAppointment: { type: Boolean, default: false }, //是否导入预约信息
tabIndex: { type: [String, Number], default: '' }, //tab索引
affixOffset: { type: Number, default: 360 } //tab索引
})
......@@ -581,7 +796,6 @@ const timeValueChange = child => {
proxy.$message.warning(`请先选择${child.label}日期`)
child.timeValue = ''
}
console.log('signDate',child.finishTime)
}
// 签约详情
const viewDetail = row => {
......@@ -631,7 +845,6 @@ const handleTableSelectChange = (father, row, key) => {
}
}
})
}
// 添加表单子级dom
const addChildren = father => {
......@@ -759,7 +972,7 @@ const disabledDate = (time, child) => {
switch (child.key) {
case 'signDate':
// 默认禁用今天及今天之前
return inputDate.isBefore(today, 'day') || inputDate.isSame(today, 'day')
// return inputDate.isBefore(today, 'day') || inputDate.isSame(today, 'day')
break
case 'confirmAppointmentTime':
......@@ -807,11 +1020,19 @@ const handleDateChange = child => {
// 拼接日期与时分
if (child.key == 'arrivalTime' && child.finishTime && child.finishTime.split(' ').length == 2) {
child.finishTime = `${form.value[child.key]} ${child.timeValue}:00`
} else if (child.key == 'departureTime' && child.finishTime && child.finishTime.split(' ').length == 2 ) {
} else if (
child.key == 'departureTime' &&
child.finishTime &&
child.finishTime.split(' ').length == 2
) {
child.finishTime = `${form.value[child.key]} ${child.timeValue}:00`
} else if (child.key == 'signDate' && child.finishTime && child.finishTime.split(' ').length == 2) {
} else if (
child.key == 'signDate' &&
child.finishTime &&
child.finishTime.split(' ').length == 2
) {
child.finishTime = `${form.value[child.key]} ${child.timeValue}:00`
console.log('signDate',child.finishTime)
console.log('signDate', child.finishTime)
}
// 离港时间在到港时间之前
if (
......@@ -919,7 +1140,6 @@ const processFormData = async () => {
// 编辑状态下回显值
if (props.idsObj.appointmentBizId) {
setFormValue(props.apiAppointmentInfoDto, processedData)
return
} else {
processedAppointmentData.value = processedData
......@@ -993,7 +1213,8 @@ const confirmDrawer = info => {
newObj.objType = drawerInfo.value.drawerType
// 因为电话有多个,根据点击的电话类型在抽屉里回显,所以要用drawerInfo.value.code来控制
newObj.key = drawerInfo.value.key
form.value[info.key] = newObj.phoneString = `${newObj[drawerInfo.value.code]} ${newObj[drawerInfo.value.key]
form.value[info.key] = newObj.phoneString = `${newObj[drawerInfo.value.code]} ${
newObj[drawerInfo.value.key]
}`
saveKey.value[drawerInfo.value.key] = newObj
// 检查数组中是否已存在key的电话
......@@ -1140,6 +1361,7 @@ const setFormValue = (obj, formData) => {
phoneQuickList.value = []
// 深拷贝原始数据
form.value = JSON.parse(JSON.stringify(obj))
// 深拷贝原始数据
const processedData = JSON.parse(JSON.stringify(formData))
for (const section of processedData) {
......@@ -1165,7 +1387,7 @@ const setFormValue = (obj, formData) => {
if (field.key == 'confirmAppointmentTime' && props.appointmentStatus !== 0) {
field.show = true
}
if(field.compositionTime && obj[field.key]){
if (field.compositionTime && obj[field.key]) {
field.finishTime = obj[field.key]
form.value[field.key] = proxy.formatToDate(obj[field.key])
field.timeValue = obj[field.key].split(' ')[1]
......@@ -1220,7 +1442,8 @@ const setFormValue = (obj, formData) => {
}
if (phoneObj[field.key]) {
phoneObj.phoneString = form.value[field.key] = `${phoneObj[field.code]} ${phoneObj[field.key]
phoneObj.phoneString = form.value[field.key] = `${phoneObj[field.code]} ${
phoneObj[field.key]
}`
tempPhoneList.push(phoneObj)
}
......@@ -1242,9 +1465,8 @@ const setFormValue = (obj, formData) => {
}
if (addressObj) {
form.value[
field.key
] = `${addressObj.region} ${addressObj.city} ${addressObj.street} ${addressObj.location}`
form.value[field.key] =
`${addressObj.region} ${addressObj.city} ${addressObj.street} ${addressObj.location}`
addressObj.addressString = `${addressObj.region} ${addressObj.city} ${addressObj.street} ${addressObj.location}`
addressObj.objType = field.drawerType
saveKey.value[field.key] = addressObj
......@@ -1385,10 +1607,9 @@ const handleFormValues = () => {
practiceCode: '签单员执业编码'
}
processedAppointmentData.value.forEach(item => {
if(item.data){
item.data.forEach(item1=>{
if(item1.key=='signDate'&&!item1.timeValue){
if (item.data) {
item.data.forEach(item1 => {
if (item1.key == 'signDate' && !item1.timeValue) {
errorFields.value.push({
message: '请选择签单日的时分'
})
......@@ -1500,7 +1721,6 @@ watch(
processFormData()
hasLoaded.value = true
}
showDetail.value = false
openList.value = false
}
......@@ -1516,6 +1736,15 @@ watch(
}
}
)
//导入预约单成功后,要重新渲染页面回显值
watch(
() => props.isExportAppointment,
newVal => {
if (newVal) {
setFormValue(props.apiAppointmentInfoDto, processedAppointmentData.value)
}
}
)
// 暴露给父组件
defineExpose({
......
<template>
<div style="padding-top: 10px">
<div ref="beneficiaryRef">
<CommonForm :showAnchor="false">
......@@ -277,6 +276,7 @@ const props = defineProps({
anchorContainer: { type: String, default: '' }, //锚点滚动容器
editStatus: { type: Boolean, default: true }, //编辑状态
affixOffset: { type: Number },
isExportAppointment: { type: Boolean, default: false }, //是否导入
tabIndex: { type: [String, Number], default: '' } //tab索引
})
const emit = defineEmits(['handleSuccessEdit', 'policyEditSuccess'])
......@@ -589,7 +589,7 @@ const processFormData = async obj => {
}
}
}
if (props.idsObj.appointmentBizId) {
if (props.idsObj.appointmentBizId ) {
setFormValue(processedData)
} else {
processedBeneficiaryData.value = oldAppointmentData.value = processedData
......@@ -681,9 +681,8 @@ const confirmDrawer = info => {
newObj.type = drawerInfo.value.key
newObj.id = drawerInfo.value.id
newObj.drawerType = drawerInfo.value.drawerType
form.value.apiBeneficiaryInfoDtoList[drawerInfo.value.l1][
drawerInfo.value.key
] = `${newObj.region} ${newObj.city} ${newObj.street} ${newObj.location}`
form.value.apiBeneficiaryInfoDtoList[drawerInfo.value.l1][drawerInfo.value.key] =
`${newObj.region} ${newObj.city} ${newObj.street} ${newObj.location}`
newObj.addressString = `${newObj.region} ${newObj.city} ${newObj.street} ${newObj.location}`
// 检查数组中是否已存在相同ID的地址
......@@ -858,7 +857,6 @@ const setFormValue = processedData => {
}
}
processedBeneficiaryData.value = oldDom
console.log('受益人表单', form.value)
console.log('dom', processedBeneficiaryData.value)
}
// 获取校验失败的字段信息
......@@ -954,7 +952,15 @@ watch(
}
}
)
//导入预约单成功后,要重新渲染页面回显值
watch(
() => props.isExportAppointment,
newVal => {
if (newVal) {
setFormValue(processedBeneficiaryData.value)
}
}
)
// 暴露给父组件
defineExpose({
handleFormValues,
......
......@@ -249,7 +249,8 @@ import {
getAdditionalProductList,
secondAdditonalList,
getInsuranceCategory,
getInsuranceCompany
getInsuranceCompany,
insuranceReconciliationCompany
} from '@/api/common'
import { editProductPlanInfo, delAdditional } from '@/api/sign/appointment'
import { updatePolicyProduct, delPolicyAdditional } from '@/api/sign/underwritingMain'
......@@ -272,6 +273,7 @@ const props = defineProps({
fatherTabName: { type: String, default: '' }, //一级tab名称
anchorContainer: { type: String, default: '' }, //锚点滚动容器
editStatus: { type: Boolean, default: true }, //编辑状态
isExportAppointment: { type: Boolean, default: false }, //是否导入
tabIndex: { type: [String, Number], default: '' } //tab索引
})
const emit = defineEmits(['handleSuccessEdit', 'policyEditSuccess'])
......@@ -407,32 +409,32 @@ const handleSearchSelectChange = (father, key) => {
dialogForm.value['productLaunchName'] = item1.label
dialogForm.value['productLaunchBizId'] = item1.value
}
item1.apiAttributeSettingDtoList.forEach(item2 => {
if (item2.fieldBizId == 'field_eWCnuwS3WPKog5kZ' && item.key == 'issueNumber') {
if (item2.value) {
item.options = item2.value
.split(/[,,;;\s]+/)
.map(item => item.trim())
.filter(item => item !== '')
.map(item => {
return { label: item, value: item }
})
// item1.apiAttributeSettingDtoList.forEach(item2 => {
// if (item2.fieldBizId == 'field_eWCnuwS3WPKog5kZ' && item.key == 'issueNumber') {
// if (item2.value) {
// item.options = item2.value
// .split(/[,,;;\s]+/)
// .map(item => item.trim())
// .filter(item => item !== '')
// .map(item => {
// return { label: item, value: item }
// })
if (item.options.length > 0) dialogForm.value[item.key] = item.options[0].value
}
}
})
// if (item.options.length > 0) dialogForm.value[item.key] = item.options[0].value
// }
// }
// })
})
})
}
// 有些产品会没有供款年期,所以这段逻辑先注释掉后续在加
// if (key == 'productLaunchMainName') {
// father.data.forEach(item => {
// searchOptions.value['productLaunchMainName'].forEach(item1 => {
// if (item1.value == form.value[father.key][key]) {
// // form.value[father.key][key] = item1.label
// // form.value[father.key]['productLaunchBizId'] = item1.value
// console.log('item1.apiAttributeSettingDtoList', item1.apiAttributeSettingDtoList)
if (key == 'productLaunchMainName') {
father.data.forEach(item => {
searchOptions.value['productLaunchMainName'].forEach(item1 => {
if (item1.value == form.value[father.key][key]) {
form.value[father.key][key] = item1.label
form.value[father.key]['productLaunchBizId'] = item1.value
console.log('item1.apiAttributeSettingDtoList', item1.apiAttributeSettingDtoList)
// item1.apiAttributeSettingDtoList.forEach(item2 => {
// if (item2.fieldBizId == 'field_eWCnuwS3WPKog5kZ' && item.key == 'issueNumber') {
// if (item2.value) {
......@@ -450,10 +452,10 @@ const handleSearchSelectChange = (father, key) => {
// console.log(item.options, item, '1111')
// }
// })
// }
// })
// })
// }
}
})
})
}
if (key == 'insuranceTypeName') {
searchOptions.value['insuranceTypeName'].forEach(item => {
if (item.value == form.value['apiProductPlanMainInfoDto']['insuranceTypeName']) {
......@@ -475,6 +477,14 @@ const handleSearchSelectChange = (father, key) => {
}
})
}
if (key == 'reconciliationCompanyName') {
searchOptions.value['reconciliationCompanyName'].forEach(item => {
if (form.value[father.key][key] == item.value) {
form.value[father.key][key] = item.label
form.value[father.key].reconciliationCompanyId = item.value
}
})
}
}
// 下拉框搜索方法
// 搜索方法
......@@ -553,7 +563,7 @@ const searchSelectList = async (query, fieldKey) => {
showCancel: '0',
title: '填写提示'
})
// row.insuranceType = ''
return
}
const params1 = {
......@@ -572,6 +582,23 @@ const searchSelectList = async (query, fieldKey) => {
})
searchOptions.value[fieldKey] = response1.data.records
}
} else if (fieldKey == 'reconciliationCompanyName') {
const params1 = {
pageNo: 1,
pageSize: 10,
name: query.trim()
}
const response1 = await insuranceReconciliationCompany(params1)
if (response1.code == 200) {
response1.data.records = response1.data.records.map(item => {
return {
...item,
label: item.name,
value: item.reconciliationCompanyBizId
}
})
searchOptions.value[fieldKey] = response1.data.records
}
}
} catch (error) {
console.error(`${fieldKey} 搜索失败`, error)
......@@ -735,6 +762,15 @@ const handleSelectChange = (father, child) => {
}
break
case 'isPrepay':
// 选是,展示日期
if (form.value[father.key][child.key] == '1') {
resetShow('prepaymentPeriod', true)
} else {
resetShow('prepaymentPeriod', false)
}
break
default:
break
......@@ -805,6 +841,13 @@ const setFormValue = (obj, formData) => {
) {
filed.show = true
}
if (
filed.key == 'prepaymentPeriod' &&
obj.apiProductPlanMainInfoDto.isPrepay &&
obj.apiProductPlanMainInfoDto.isPrepay == '1'
) {
filed.show = true
}
}
// 为附加险增加dom
if (
......@@ -939,7 +982,15 @@ watch(
}
}
)
//导入预约单成功后,要重新渲染页面回显值
watch(
() => props.isExportAppointment,
newVal => {
if (newVal) {
setFormValue(props.apiProductPlanInfoDto, processedProductData.value)
}
}
)
// 暴露给父组件
defineExpose({
handleSubmitForm,
......
......@@ -246,7 +246,8 @@ const props = defineProps({
anchorContainer: { type: String, default: '' }, //锚点滚动容器
editStatus: { type: Boolean, default: false }, //编辑状态
affixOffset: { type: Number },
tabIndex: { type: [String, Number], default: '' } //tab索引
tabIndex: { type: [String, Number], default: '' }, //tab索引
isExportAppointment: { type: Boolean, default: false } //是否导入
})
const emit = defineEmits(['handleSuccessEdit', 'policyEditSuccess'])
......@@ -757,7 +758,6 @@ watch(
exportValue: null,
detailInfo: props.apiSecondHolderInfoDto
})
console.log(' props.apiSecondHolderInfoDto', props.apiSecondHolderInfoDto)
} else {
processFormData({
domdata: secondHolderDomData,
......@@ -769,7 +769,19 @@ watch(
}
}
)
//导入预约单成功后,要重新渲染页面回显值
watch(
() => props.isExportAppointment,
newVal => {
if (newVal) {
processFormData({
domdata: secondHolderDomData,
exportValue: null,
detailInfo: props.apiSecondHolderInfoDto
})
}
}
)
// 暴露给父组件
defineExpose({
handleFormValues,
......
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