Commit c1efa700 by zhangxingmin

Merge remote-tracking branch 'origin/dev' into prod

parents 5d442064 7b806698
......@@ -388,196 +388,6 @@ const appointmentInfo = [
// }
]
}
// 业务信息
// {
// fatherTitle: '业务信息',
// type: 'object',
// key: 'business',
// labelPosition: 'top', //标签的位置
// showMoudle: true, //模块是否展示
// // description: '证件信息至少填写一项',
// data: [
// {
// label: '业务编号',
// key: 'businessNo',
// domType: 'Input',
// inputType: 'text',
// required: false,
// maxLength: 20,
// disabled: false,
// placeholder: '请输入',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
// {
// label: '签单员账号',
// key: 'businessRepresentAccount1',
// domType: 'Input',
// inputType: 'text',
// required: false,
// maxLength: 20,
// disabled: false,
// placeholder: '请输入',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
// {
// label: '签单员姓名',
// key: 'businessRepresentName1',
// domType: 'Input',
// inputType: 'text',
// required: false,
// maxLength: 20,
// disabled: false,
// placeholder: '请输入',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
// {
// label: '签单员电话号码',
// key: 'businessRepresentMobile1',
// domType: 'arrowRight',
// required: false,
// disabled: false,
// placeholder: '请填写',
// show: true,
// drawerType: 'phone',
// businessRepresentMobile1: {}, //带有区号得电话一定要有一个和key一样得对象用于收集区号和号码
// code: 'businessRepresentMobile1Code',
// maxLength: 20,
// labelPosition: 'top', //标签的位置
// labelWidth: '180px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
// {
// label: '签单员邮箱',
// key: 'businessRepresentEmail1',
// domType: 'Input',
// inputType: 'text',
// maxLength: 30,
// required: false,
// disabled: false,
// placeholder: '请输入',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// }
// ]
// },
// 基础信息
// {
// fatherTitle: '基础信息',
// type: 'object',
// key: 'basic',
// showMoudle: true, //模块是否展示
// // description: '证件信息至少填写一项',
// data: [
// {
// label: '意向预约时间',
// key: 'intentionAppointmentTime',
// domType: 'datetimePicker',
// required: true,
// disabled: false,
// placeholder: '请选择',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
// {
// label: '是否有用车需求',
// key: 'isUseCar',
// domType: 'Select',
// required: false,
// disabled: false,
// placeholder: '请选择',
// dictType: 'sys_no_yes',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// }
// ]
// },
// 陪同顾问信息
// {
// fatherTitle: '转介人信息',
// type: 'object',
// key: 'consult',
// showMoudle: false, //模块是否展示
// data: [
// {
// label: '姓名',
// key: 'accompanyName',
// domType: 'Input',
// inputType: 'text',
// required: false,
// maxLength: 30,
// disabled: false,
// placeholder: '请输入',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
// {
// label: '手机',
// key: 'accompanyMobile',
// domType: 'arrowRight',
// required: false,
// disabled: false,
// placeholder: '请填写',
// show: true,
// labelPosition: 'top', //标签的位置
// drawerType: 'phone',
// accompanyMobile: {}, //带有区号得电话一定要有一个和key一样得对象用于收集区号和号码
// code: 'accompanyMobileCode',
// maxLength: 20,
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// },
// {
// label: '邮箱',
// key: 'accompanyEmail',
// domType: 'Input',
// inputType: 'text',
// maxLength: 30,
// required: false,
// disabled: false,
// placeholder: '请输入',
// show: true,
// labelPosition: 'top', //标签的位置
// labelWidth: '120px', //标签宽度
// sm: 12, //栅格布局份数
// lg: 8 //栅格布局份数
// }
// ]
// },
// 其他情况
// {
// fatherTitle: '其他情况',
// type: 'object',
// key: 'other',
// showMoudle: true, //模块是否展示
// data: []
// },
]
export default appointmentInfo
......@@ -57,18 +57,20 @@ const customer = [
required: true
},
{
label: '是否长期有效',
prop: 'isPermanent',
type: 'radioGroup',
required: false
},
{
label: '证件有效期',
prop: 'certificateValidityPeriod',
type: 'datePicker',
timeType: 'daterange',
custom: true,
placeholder: '请选择证件有效期',
required: true
},
{
label: '是否长期有效',
prop: 'isPermanent',
type: 'radioGroup',
required: false
required: true,
width:300
}
],
data: []
......
......@@ -156,6 +156,7 @@
:key="column.prop"
:prop="column.prop"
align="center"
:width="column.width"
>
<template #header>
<span
......@@ -205,18 +206,44 @@
/>
</el-select>
<!-- 日期选择器 -->
<el-date-picker
<!-- 日期选择器 -->
<div v-else-if="column.prop === 'certificateValidityPeriod'">
<el-date-picker
v-model="scope.row.certificateStartDate"
type="date"
placeholder="开始日期"
:disabled="editStatus"
:style="{
width: scope.row.isPermanent == '1' ? '100%' : 'calc(50% - 10px)'
}"
/>
<span
v-if="!scope.row.isPermanent || scope.row.isPermanent == '0'"
style="display: inline-block; width: 20px; text-align: center"
>-</span
>
<el-date-picker
v-model="scope.row.certificateEndDate"
v-if="!scope.row.isPermanent || scope.row.isPermanent == '0'"
type="date"
placeholder="结束日期"
:disabled="editStatus"
style="width: calc(50% - 10px)"
/>
</div>
<!-- <el-date-picker
v-else-if="column.type === 'datePicker'"
v-model="scope.row[column.prop]"
:type="column.timeType"
:type="getDatePickerType(scope.row, column)"
:placeholder="column.placeholder"
:disabled="editStatus"
unlink-panels
style="width: 100%"
range-separator="至"
start-placeholder="开始"
end-placeholder="结束"
/>
@change="changeDatePicker(father, scope.row, column.prop, $event)"
/> -->
<el-input
v-else-if="column.type === 'inputNumber'"
v-model.number="scope.row[column.prop]"
......@@ -231,6 +258,9 @@
<el-radio-group
v-model="scope.row[column.prop]"
v-else-if="column.type === 'radioGroup'"
@change="
handleIsPermanentChange(father, scope.row, column.prop, $event)
"
>
<el-radio value="1" size="large"></el-radio>
<el-radio value="0" size="large"></el-radio>
......@@ -243,6 +273,7 @@
:disabled="editStatus"
@blur="tableInputBlur(father, scope.row, column.prop, $event)"
/>
<!-- 满足一定条件展示得控件 -->
</template>
</el-table-column>
......@@ -542,6 +573,12 @@ const operationBtnList = ref([
}
])
const customerFormRef = ref(null)
const handleIsPermanentChange = (father, row, prop, newValue) => {
if (prop == 'isPermanent') {
row.certificateStartDate = null
row.certificateEndDate = null
}
}
// 表格改变下拉框
const changeSelect = (father, row, prop, newValue) => {
if (prop == 'documentType') {
......@@ -666,6 +703,8 @@ const addChildren = father => {
documentType: '',
idNumber: '',
certificateValidityPeriod: '',
certificateStartDate: '',
certificateEndDate: '',
isPermanent: ''
}
......@@ -1039,8 +1078,10 @@ const handleSelectChange = child => {
}
if (section.data) {
for (const field of section.data) {
form.value[field.key] = ''
delete saveKey.value[field.key]
if (field.key !== 'policyholderRel') {
form.value[field.key] = ''
delete saveKey.value[field.key]
}
}
}
if (form.value[child.key] == 'MYSELF') {
......@@ -1094,10 +1135,6 @@ const setFormValue = (obj, formData, exportValue) => {
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 &&
......@@ -1111,9 +1148,6 @@ const setFormValue = (obj, formData, exportValue) => {
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)
}
......@@ -1183,8 +1217,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
......@@ -1249,9 +1281,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) {
......@@ -1336,9 +1371,9 @@ const handleFormValues = source => {
processedData = JSON.parse(JSON.stringify(processedCustomerData.value))
}
let tipName =
props.activeName == 'policyHolderInfo'
source == 'policyHolderInfoRef'
? '投保人'
: source == 'insuredInfo'
: source == 'insuredInfoRef'
? '受保人'
: props.activeName == 'customer'
? '客户资料'
......@@ -1411,9 +1446,14 @@ const handleFormValues = source => {
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
if (!item1.certificateStartDate) {
obj1.certificateStartDate = '证件开始时间'
}
if (!item1.certificateEndDate) {
obj1.certificateEndDate = '证件结束时间'
}
} else if (item1.isPermanent == '1' && !item1.certificateStartDate) {
obj1.certificateStartDate = '证件有效时间'
}
for (const key in obj1) {
if (!item1[key]) {
......@@ -1422,22 +1462,27 @@ const handleFormValues = source => {
})
return
}
if (key == 'certificateValidityPeriod' && item1[key]) {
item1.certificateStartDate = proxy.formatToDate(
item1.certificateValidityPeriod[0]
)
item1.certificateEndDate = proxy.formatToDate(
item1.certificateValidityPeriod[1]
)
delete item1.certificateValidityPeriod
if (item1.certificateStartDate) {
item1.certificateStartDate = proxy.formatToDate(item1.certificateStartDate)
}
if (item1.certificateEndDate) {
item1.certificateEndDate = proxy.formatToDate(item1.certificateEndDate)
}
}
})
submitObj['apiCertificateDtoList'] = item.data
} else if (item.key == 'apiCertificateDtoList' && item.data.length == 0) {
errorFields.value.push({
message: `${tipName}证件信息不能为空`
})
if (source !== 'insuredInfoRef') {
errorFields.value.push({
message: `${tipName}证件信息不能为空`
})
} else if (source == 'insuredInfoRef') {
if (submitObj['policyholderRel'] !== 'MYSELF') {
errorFields.value.push({
message: `${tipName}证件信息不能为空`
})
}
}
}
if (item.key == 'apiTaxationDtoList' && item.data.length > 0) {
submitObj['apiTaxationDtoList'] = item.data.filter(item => {
......@@ -1488,9 +1533,7 @@ 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)
}
......@@ -1550,7 +1593,8 @@ watch(
(newVal, oldVal) => {
editStatus.value = false
customerRightRef.value = null
if (newVal === 'customer' || newVal === 'policyholder' || newVal === 'insurantInfo') {
// || newVal === 'policyholder' || newVal === 'insurantInfo'
if (newVal === 'customer') {
processFormData()
// 因为客户资料里的编辑状态是单独控制的
if (props.tabSource == 'customer' && props.customerBizId) {
......@@ -1558,15 +1602,35 @@ watch(
} else if (props.tabSource == 'customer' && !props.customerBizId) {
editStatus.value = false
}
if (newVal === 'policyholder' || newVal === 'insurantInfo') {
editStatus.value = props.fatherEditStatus
}
// if (newVal === 'policyholder' || newVal === 'insurantInfo') {
// editStatus.value = props.fatherEditStatus
// }
}
// 切换tab要保存各自的表单值
if (oldVal == 'policyholder') {
policyholderForm.value = JSON.parse(JSON.stringify(form.value))
} else if (oldVal == 'insurantInfo') {
insuredForm.value = JSON.parse(JSON.stringify(form.value))
// if (oldVal == 'policyholder') {
// policyholderForm.value = JSON.parse(JSON.stringify(form.value))
// } else if (oldVal == 'insurantInfo') {
// insuredForm.value = JSON.parse(JSON.stringify(form.value))
// }
if (newVal === 'policyholder') {
editStatus.value = props.fatherEditStatus
if (JSON.stringify(policyholderForm.value) != '{}') {
form.value = JSON.parse(JSON.stringify(policyholderForm.value))
processedCustomerData.value = JSON.parse(JSON.stringify(tempPolicyholderDom.value))
return
} else {
processFormData()
}
} else if (newVal === 'insurantInfo') {
editStatus.value = props.fatherEditStatus
if (JSON.stringify(insuredForm.value) != '{}') {
form.value = JSON.parse(JSON.stringify(insuredForm.value))
processedCustomerData.value = JSON.parse(JSON.stringify(tempInsurantDom.value))
return
} else {
processFormData()
}
}
}
)
......
......@@ -404,6 +404,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
......
......@@ -886,6 +886,40 @@ const getDictsData = async () => {
dictStore.setSignPeopleList(response7.data.records)
}
}
// 获取下拉框所需要得数据
const getDictsLabelData = 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'
])
}
// Tab切换前的验证
const beforeTabLeave = async (activeTabName, oldTabName) => {
foldInsurantInfo.value = false
......@@ -1094,6 +1128,7 @@ if (route.query.appointmentNo && route.query.source == 'appointmentList') {
processInfo.value = route.query
idsObj.value.appointmentBizId = route.query.appointmentBizId
getDictsData()
// getDictsLabelData()
setTimeout(() => {
// 请求预约单聚合详情
getAppointmentInfo(idsObj.value.appointmentBizId, true)
......
......@@ -348,6 +348,41 @@
/>
</template>
</el-table-column>
<el-table-column
label="签约公司"
prop="contractingCompanyName"
align="center"
>
<template #default="scope">
<el-select
v-model="scope.row.contractingCompanyName"
filterable
remote
reserve-keyword
placeholder="请选择"
:remote-method="
query => searchSelectList(query, 'contractingCompanyName')
"
:loading="searchLoadingStates['contractingCompanyName']"
:disabled="editStatus"
@change="
handleTableSelectChange(
father,
scope.row,
'contractingCompanyName'
)
"
>
<el-option
v-for="item in searchOptions['contractingCompanyName'] || []"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column width="60px" align="center" label="操作">
<template #default="scope">
<el-icon
......@@ -500,7 +535,12 @@ import {
getItineraryDetail,
getAppointmentExprot
} from '@/api/sign/appointment'
import { getBankList, getAllSignList, getUserSaleExpandList } from '@/api/common'
import {
getBankList,
getAllSignList,
getUserSaleExpandList,
insuranceReconciliationCompany
} from '@/api/common'
import CommonForm from '@/views/components/commonForm'
import CommonDialog from '@/components/commonDialog'
import CardOne from '@/components/formCard/cardOne'
......@@ -827,12 +867,11 @@ const viewHistory = () => {
}
}
const handleTableSelectChange = (father, row, key) => {
console.log('选择了', row, key)
searchOptions.value[key].forEach(item => {
console.log('item', item)
if (row[key] == item.value) {
row[key] = item.label
row.userBizId = item.userBizId
// row.userBizId = item.userBizId
if (key == 'name') {
row.userSignBizId = item.value
row.practiceCode = item.practiceCode
......@@ -842,6 +881,8 @@ const handleTableSelectChange = (father, row, key) => {
row.cardType = item.cardType
} else if (key == 'realName') {
row.userSaleBizId = item.value
} else if (key == 'contractingCompanyName') {
row.contractingCompanyId = item.value
}
}
})
......@@ -954,6 +995,23 @@ const searchSelectList = async (query, key) => {
})
searchOptions.value[key] = response5.data.records
}
} else if (key == 'contractingCompanyName') {
const params5 = {
pageNo: 1,
pageSize: 10,
realName: queryString
}
const response5 = await insuranceReconciliationCompany(params5)
if (response5.code == 200) {
response5.data.records = response5.data.records.map(item => {
return {
...item,
label: item.name,
value: item.reconciliationCompanyBizId
}
})
searchOptions.value[key] = response5.data.records
}
}
} catch (error) {
console.error(` 搜索失败`, error)
......
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