Commit e6731b25 by yuzhenWang

Merge branch 'feature-20250827wyz-写业务' into 'test'

导入发布测试

See merge request !53
parents edf7624e 231d894f
......@@ -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'
})
}
......@@ -202,7 +202,7 @@ const customer = [
label: '婚姻状况',
key: 'maritalStatus',
domType: 'Select',
required: true,
required: false,
disabled: false,
placeholder: '请选择',
dictType: 'csf_marriage',
......@@ -216,7 +216,7 @@ const customer = [
label: '教育程度',
key: 'educationLevel',
domType: 'Select',
required: true,
required: false,
disabled: false,
placeholder: '请选择',
dictType: 'csf_education',
......@@ -230,7 +230,7 @@ const customer = [
label: '是否退休',
key: 'isRetirement',
domType: 'Select',
required: true,
required: false,
disabled: false,
placeholder: '请选择',
dictType: 'sys_no_yes',
......@@ -434,7 +434,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: '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,
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
......@@ -353,7 +353,8 @@ 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()
......@@ -692,7 +693,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 +742,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 +754,9 @@ const processFormData = async () => {
// 投保人回显值
setFormValue(props.apiInsurantInfoDto, processedData)
} else {
if (props.tabSource == 'customer') {
form.value.smokingStatus = '0'
}
processedCustomerData.value = oldCustomerData.value = processedData
}
}
......@@ -1031,9 +1046,8 @@ const setFormValue = (obj, formData, exportValue) => {
}
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
......@@ -1176,6 +1190,8 @@ const handleFormValues = source => {
} else {
submitObj = { ...form.value }
}
console.log('投保人form', submitObj)
let processedData = JSON.parse(JSON.stringify(processedCustomerData.value))
return new Promise(async resolve => {
// 如果没有点击受保人这个tab页就进行填写提醒,
......@@ -1190,11 +1206,6 @@ const handleFormValues = source => {
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') {
......@@ -1289,9 +1300,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)
}
})
......@@ -1306,6 +1321,8 @@ const handleFormValues = source => {
} else {
// 新增状态
// 因为这两个在同一个大提交里,所以要判断是哪个提交,方便这两个都有自己独立的提交验证
console.log('走这里了')
resolve(undefined)
}
}
......@@ -1330,6 +1347,8 @@ watch(
} else if (props.activeName == 'insurantInfo') {
insuredForm.value = JSON.parse(JSON.stringify(newVal))
}
console.log('form值变化policyholderForm', policyholderForm.value)
console.log('form值变化insuredForm', insuredForm.value)
},
{ immediate: true, deep: true }
)
......@@ -1364,11 +1383,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>
......
......@@ -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, tIndex) 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>
......@@ -165,6 +210,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,
......@@ -298,41 +377,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'
])
}
}
// 更新流程
......
......@@ -83,13 +83,13 @@
<el-row v-if="isEmbed">
<el-col>
<div class="topButtonBox">
<!-- <el-button
v-if="idsObj.appointmentBizId && pageSource !== 'policyList'"
<el-button
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"
type="primary"
......@@ -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,7 @@ 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 +939,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 +952,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 +966,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 +982,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 +1077,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 +1312,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 +1362,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'])
......@@ -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