|
@@ -88,7 +88,7 @@
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
|
<!-- 使用性质下拉选择 -->
|
|
<!-- 使用性质下拉选择 -->
|
|
|
<el-form-item label="使用性质" prop="carNatureCode">
|
|
<el-form-item label="使用性质" prop="carNatureCode">
|
|
|
- <el-select v-model="insurancePolicyForm.carNatureCode" placeholder="请选择" @change="getSchemeResult">
|
|
|
|
|
|
|
+ <el-select v-model="insurancePolicyForm.carNatureCode" placeholder="请选择" @change="ruleFilterCompany({value: insurancePolicyForm.productId},null)">
|
|
|
<el-option v-for="item in optionObj.car_nature_code" :label="item.label" :value="item.value"
|
|
<el-option v-for="item in optionObj.car_nature_code" :label="item.label" :value="item.value"
|
|
|
:key="item.value"></el-option>
|
|
:key="item.value"></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
@@ -106,7 +106,7 @@
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
|
<!-- 车辆种类下拉选择 -->
|
|
<!-- 车辆种类下拉选择 -->
|
|
|
<el-form-item label="车辆种类" prop="plateType">
|
|
<el-form-item label="车辆种类" prop="plateType">
|
|
|
- <el-select v-model="insurancePolicyForm.plateType" placeholder="请选择" @change="getSchemeResult">
|
|
|
|
|
|
|
+ <el-select v-model="insurancePolicyForm.plateType" placeholder="请选择" @change="ruleFilterCompany({value: insurancePolicyForm.productId},null)">
|
|
|
<el-option v-for="item in optionObj.car_kind_code" :label="item.label" :value="item.value"
|
|
<el-option v-for="item in optionObj.car_kind_code" :label="item.label" :value="item.value"
|
|
|
:key="item.value"></el-option>
|
|
:key="item.value"></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
@@ -125,7 +125,7 @@
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
|
<!-- 能源种类下拉选择 -->
|
|
<!-- 能源种类下拉选择 -->
|
|
|
<el-form-item label="能源种类" prop="energyTypeCode">
|
|
<el-form-item label="能源种类" prop="energyTypeCode">
|
|
|
- <el-select v-model="insurancePolicyForm.energyTypeCode" placeholder="请选择" @change="getSchemeResult">
|
|
|
|
|
|
|
+ <el-select v-model="insurancePolicyForm.energyTypeCode" placeholder="请选择" @change="ruleFilterCompany({value: insurancePolicyForm.productId},null)">
|
|
|
<el-option v-for="item in optionObj.energy_type_code" :label="item.label" :value="item.value"
|
|
<el-option v-for="item in optionObj.energy_type_code" :label="item.label" :value="item.value"
|
|
|
:key="item.value"></el-option>
|
|
:key="item.value"></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
@@ -2416,7 +2416,6 @@ let btns = ref({
|
|
|
}],
|
|
}],
|
|
|
})
|
|
})
|
|
|
const handleChange = async (item: any, type: any) => {
|
|
const handleChange = async (item: any, type: any) => {
|
|
|
-
|
|
|
|
|
switch (type) {
|
|
switch (type) {
|
|
|
case 'owner1':
|
|
case 'owner1':
|
|
|
item.checked = !item.checked
|
|
item.checked = !item.checked
|
|
@@ -2760,6 +2759,83 @@ const handleEquitiesSave = (data: any) => {
|
|
|
equitiesShow.value = false
|
|
equitiesShow.value = false
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
|
|
+ * 组装报价/筛选保司接口的公共请求体
|
|
|
|
|
+ * 车辆信息、车主/投保人/被保人信息、业务员信息在两处调用中完全一致,统一在此拼接
|
|
|
|
|
+ */
|
|
|
|
|
+const buildCommonQuoteData = () => ({
|
|
|
|
|
+ carInfo: { // 车辆信息
|
|
|
|
|
+ carOwner: insurancePolicyForm.value.carOwner,
|
|
|
|
|
+ licenseNo: insurancePolicyForm.value.licenseNo,
|
|
|
|
|
+ vinNo: insurancePolicyForm.value.vinNo,
|
|
|
|
|
+ brandName: insurancePolicyForm.value.brandName,
|
|
|
|
|
+ engineNo: insurancePolicyForm.value.engineNo,
|
|
|
|
|
+ carNatureCode: insurancePolicyForm.value.carNatureCode,
|
|
|
|
|
+ vehicleUseCode: insurancePolicyForm.value.vehicleUseCode,
|
|
|
|
|
+ carTypeCode: insurancePolicyForm.value.carTypeCode,
|
|
|
|
|
+ energyTypeCode: insurancePolicyForm.value.energyTypeCode,
|
|
|
|
|
+ registerDate: insurancePolicyForm.value.registerDate,
|
|
|
|
|
+ issueDate: insurancePolicyForm.value.issueDate,
|
|
|
|
|
+ completeKerbMass: insurancePolicyForm.value.completeKerbMass,
|
|
|
|
|
+ limitLoad: insurancePolicyForm.value.limitLoad,
|
|
|
|
|
+ seatCount: insurancePolicyForm.value.seatCount,
|
|
|
|
|
+ carYear: insurancePolicyForm.value.carYear,
|
|
|
|
|
+ purchasePrice: insurancePolicyForm.value.purchasePrice,
|
|
|
|
|
+ displacement: insurancePolicyForm.value.displacement,
|
|
|
|
|
+ powerScale: insurancePolicyForm.value.powerScale,
|
|
|
|
|
+ carKindCode: insurancePolicyForm.value.plateType
|
|
|
|
|
+ },
|
|
|
|
|
+ ownerInfo: { // 车主信息
|
|
|
|
|
+ name: insurancePolicyForm.value.name1,
|
|
|
|
|
+ mobile: insurancePolicyForm.value.mobile1,
|
|
|
|
|
+ identifyType: insurancePolicyForm.value.identifyType1,
|
|
|
|
|
+ identifyNumber: insurancePolicyForm.value.identifyNumber1,
|
|
|
|
|
+ identifyValidDate: insurancePolicyForm.value.identifyValidDate1,
|
|
|
|
|
+ identifyValidEndDate: insurancePolicyForm.value.identifyValidEndDate1,
|
|
|
|
|
+ addr: insurancePolicyForm.value.addr1,
|
|
|
|
|
+ telephone: insurancePolicyForm.value.telephone1,
|
|
|
|
|
+ person: insurancePolicyForm.value.person1,
|
|
|
|
|
+ age: insurancePolicyForm.value.age1,
|
|
|
|
|
+ address: insurancePolicyForm.value.address1,
|
|
|
|
|
+ registeredCapital: insurancePolicyForm.value.registeredCapital1,
|
|
|
|
|
+ email: insurancePolicyForm.value.email1,
|
|
|
|
|
+ },
|
|
|
|
|
+ applyInfo: { // 投保人信息
|
|
|
|
|
+ name: insurancePolicyForm.value.name2,
|
|
|
|
|
+ mobile: insurancePolicyForm.value.mobile2,
|
|
|
|
|
+ identifyType: insurancePolicyForm.value.identifyType2,
|
|
|
|
|
+ identifyNumber: insurancePolicyForm.value.identifyNumber2,
|
|
|
|
|
+ identifyValidDate: insurancePolicyForm.value.identifyValidDate2,
|
|
|
|
|
+ identifyValidEndDate: insurancePolicyForm.value.identifyValidEndDate2,
|
|
|
|
|
+ addr: insurancePolicyForm.value.addr2,
|
|
|
|
|
+ telephone: insurancePolicyForm.value.telephone2,
|
|
|
|
|
+ person: insurancePolicyForm.value.person2,
|
|
|
|
|
+ age: insurancePolicyForm.value.age2,
|
|
|
|
|
+ address: insurancePolicyForm.value.address2,
|
|
|
|
|
+ registeredCapital: insurancePolicyForm.value.registeredCapital2,
|
|
|
|
|
+ email: insurancePolicyForm.value.email2,
|
|
|
|
|
+ },
|
|
|
|
|
+ insureInfo: { // 被保人信息
|
|
|
|
|
+ name: insurancePolicyForm.value.name3,
|
|
|
|
|
+ mobile: insurancePolicyForm.value.mobile3,
|
|
|
|
|
+ identifyType: insurancePolicyForm.value.identifyType3,
|
|
|
|
|
+ identifyNumber: insurancePolicyForm.value.identifyNumber3,
|
|
|
|
|
+ identifyValidDate: insurancePolicyForm.value.identifyValidDate3,
|
|
|
|
|
+ identifyValidEndDate: insurancePolicyForm.value.identifyValidEndDate3,
|
|
|
|
|
+ addr: insurancePolicyForm.value.addr3,
|
|
|
|
|
+ telephone: insurancePolicyForm.value.telephone3,
|
|
|
|
|
+ person: insurancePolicyForm.value.person3,
|
|
|
|
|
+ age: insurancePolicyForm.value.age3,
|
|
|
|
|
+ address: insurancePolicyForm.value.address3,
|
|
|
|
|
+ registeredCapital: insurancePolicyForm.value.registeredCapital3,
|
|
|
|
|
+ email: insurancePolicyForm.value.email3,
|
|
|
|
|
+ },
|
|
|
|
|
+ // 业务员信息
|
|
|
|
|
+ salespersonInfo: {
|
|
|
|
|
+ id: salesmanId.value,
|
|
|
|
|
+ }
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 获取保险公司方案结果并更新报价数据
|
|
* 获取保险公司方案结果并更新报价数据
|
|
|
* 根据当前保单表单中的保险公司编码、产品ID、座位数、能源类型、车辆类型及使用性质,
|
|
* 根据当前保单表单中的保险公司编码、产品ID、座位数、能源类型、车辆类型及使用性质,
|
|
@@ -2767,17 +2843,17 @@ const handleEquitiesSave = (data: any) => {
|
|
|
* 并将方案信息及过滤后的项目列表写入当前行的报价数据中。
|
|
* 并将方案信息及过滤后的项目列表写入当前行的报价数据中。
|
|
|
*/
|
|
*/
|
|
|
const getSchemeResult = (bool: false) => {
|
|
const getSchemeResult = (bool: false) => {
|
|
|
|
|
+ console.log(insurancePolicyForm.value)
|
|
|
|
|
+ let data = {
|
|
|
|
|
+ companyId: insurancePolicyForm.value.order.insuranceCompanyCode,
|
|
|
|
|
+ productId: insurancePolicyForm.value.productId,
|
|
|
|
|
+ ...buildCommonQuoteData(),
|
|
|
|
|
+ }
|
|
|
|
|
+ // return
|
|
|
if (!insurancePolicyForm.value.order.insuranceCompanyCode) return
|
|
if (!insurancePolicyForm.value.order.insuranceCompanyCode) return
|
|
|
if (!insurancePolicyForm.value.productId) return
|
|
if (!insurancePolicyForm.value.productId) return
|
|
|
const insuranceCompanyCode = insurancePolicyForm.value.order.insuranceCompanyCode
|
|
const insuranceCompanyCode = insurancePolicyForm.value.order.insuranceCompanyCode
|
|
|
- api.insurancePolicyApi.getSchemeResult({
|
|
|
|
|
- companyId: insurancePolicyForm.value.order.insuranceCompanyCode,
|
|
|
|
|
- productId: insurancePolicyForm.value.productId,
|
|
|
|
|
- seatCount: insurancePolicyForm.value.seatCount,
|
|
|
|
|
- energyType: insurancePolicyForm.value.energyTypeCode,
|
|
|
|
|
- vehicleType: insurancePolicyForm.value.plateType,
|
|
|
|
|
- carnature: insurancePolicyForm.value.carNatureCode,
|
|
|
|
|
- }).then((res: any) => {
|
|
|
|
|
|
|
+ api.insurancePolicyApi.getSchemeResult(data).then((res: any) => {
|
|
|
let list = res.data?.schemes || [];
|
|
let list = res.data?.schemes || [];
|
|
|
if (res.data?.optionalScheme) {
|
|
if (res.data?.optionalScheme) {
|
|
|
list.push(res.data.optionalScheme)
|
|
list.push(res.data.optionalScheme)
|
|
@@ -3916,76 +3992,7 @@ const handleOpen = (scope: any) => {
|
|
|
const ruleFilterCompany = (item: any, obj: any) => {
|
|
const ruleFilterCompany = (item: any, obj: any) => {
|
|
|
let data = {
|
|
let data = {
|
|
|
productId: item.value, // 产品ID
|
|
productId: item.value, // 产品ID
|
|
|
- carInfo: { // 车辆信息
|
|
|
|
|
- carOwner: insurancePolicyForm.value.carOwner,
|
|
|
|
|
- licenseNo: insurancePolicyForm.value.licenseNo,
|
|
|
|
|
- vinNo: insurancePolicyForm.value.vinNo,
|
|
|
|
|
- brandName: insurancePolicyForm.value.brandName,
|
|
|
|
|
- engineNo: insurancePolicyForm.value.engineNo,
|
|
|
|
|
- carNatureCode: insurancePolicyForm.value.carNatureCode,
|
|
|
|
|
- vehicleUseCode: insurancePolicyForm.value.vehicleUseCode,
|
|
|
|
|
- carTypeCode: insurancePolicyForm.value.carTypeCode,
|
|
|
|
|
- energyTypeCode: insurancePolicyForm.value.energyTypeCode,
|
|
|
|
|
- registerDate: insurancePolicyForm.value.registerDate,
|
|
|
|
|
- issueDate: insurancePolicyForm.value.issueDate,
|
|
|
|
|
- completeKerbMass: insurancePolicyForm.value.completeKerbMass,
|
|
|
|
|
- limitLoad: insurancePolicyForm.value.limitLoad,
|
|
|
|
|
- seatCount: insurancePolicyForm.value.seatCount,
|
|
|
|
|
- carYear: insurancePolicyForm.value.carYear,
|
|
|
|
|
- purchasePrice: insurancePolicyForm.value.purchasePrice,
|
|
|
|
|
- displacement: insurancePolicyForm.value.displacement,
|
|
|
|
|
- powerScale: insurancePolicyForm.value.powerScale,
|
|
|
|
|
- carKindCode: insurancePolicyForm.value.plateType
|
|
|
|
|
- },
|
|
|
|
|
- ownerInfo: { // 车主信息
|
|
|
|
|
- name: insurancePolicyForm.value.name1,
|
|
|
|
|
- mobile: insurancePolicyForm.value.mobile1,
|
|
|
|
|
- identifyType: insurancePolicyForm.value.identifyType1,
|
|
|
|
|
- identifyNumber: insurancePolicyForm.value.identifyNumber1,
|
|
|
|
|
- identifyValidDate: insurancePolicyForm.value.identifyValidDate1,
|
|
|
|
|
- identifyValidEndDate: insurancePolicyForm.value.identifyValidEndDate1,
|
|
|
|
|
- addr: insurancePolicyForm.value.addr1,
|
|
|
|
|
- telephone: insurancePolicyForm.value.telephone1,
|
|
|
|
|
- person: insurancePolicyForm.value.person1,
|
|
|
|
|
- age: insurancePolicyForm.value.age1,
|
|
|
|
|
- address: insurancePolicyForm.value.address1,
|
|
|
|
|
- registeredCapital: insurancePolicyForm.value.registeredCapital1,
|
|
|
|
|
- email: insurancePolicyForm.value.email1,
|
|
|
|
|
- },
|
|
|
|
|
- applyInfo: { // 投保人信息
|
|
|
|
|
- name: insurancePolicyForm.value.name2,
|
|
|
|
|
- mobile: insurancePolicyForm.value.mobile2,
|
|
|
|
|
- identifyType: insurancePolicyForm.value.identifyType2,
|
|
|
|
|
- identifyNumber: insurancePolicyForm.value.identifyNumber2,
|
|
|
|
|
- identifyValidDate: insurancePolicyForm.value.identifyValidDate2,
|
|
|
|
|
- identifyValidEndDate: insurancePolicyForm.value.identifyValidEndDate2,
|
|
|
|
|
- addr: insurancePolicyForm.value.addr2,
|
|
|
|
|
- telephone: insurancePolicyForm.value.telephone2,
|
|
|
|
|
- person: insurancePolicyForm.value.person2,
|
|
|
|
|
- age: insurancePolicyForm.value.age2,
|
|
|
|
|
- address: insurancePolicyForm.value.address2,
|
|
|
|
|
- registeredCapital: insurancePolicyForm.value.registeredCapital2,
|
|
|
|
|
- email: insurancePolicyForm.value.email2,
|
|
|
|
|
- },
|
|
|
|
|
- insureInfo: { // 被保人信息
|
|
|
|
|
- name: insurancePolicyForm.value.name3,
|
|
|
|
|
- mobile: insurancePolicyForm.value.mobile3,
|
|
|
|
|
- identifyType: insurancePolicyForm.value.identifyType3,
|
|
|
|
|
- identifyNumber: insurancePolicyForm.value.identifyNumber3,
|
|
|
|
|
- identifyValidDate: insurancePolicyForm.value.identifyValidDate3,
|
|
|
|
|
- identifyValidEndDate: insurancePolicyForm.value.identifyValidEndDate3,
|
|
|
|
|
- addr: insurancePolicyForm.value.addr3,
|
|
|
|
|
- telephone: insurancePolicyForm.value.telephone3,
|
|
|
|
|
- person: insurancePolicyForm.value.person3,
|
|
|
|
|
- age: insurancePolicyForm.value.age3,
|
|
|
|
|
- address: insurancePolicyForm.value.address3,
|
|
|
|
|
- registeredCapital: insurancePolicyForm.value.registeredCapital3,
|
|
|
|
|
- email: insurancePolicyForm.value.email3,
|
|
|
|
|
- },
|
|
|
|
|
- // 业务员信息
|
|
|
|
|
- salespersonInfo: {
|
|
|
|
|
- id: salesmanId.value,
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ ...buildCommonQuoteData(),
|
|
|
}
|
|
}
|
|
|
// 调用API获取符合规则的保险公司列表
|
|
// 调用API获取符合规则的保险公司列表
|
|
|
api.insurancePolicyApi.ruleFilterCompany(data).then((res: any) => {
|
|
api.insurancePolicyApi.ruleFilterCompany(data).then((res: any) => {
|