|
@@ -1514,8 +1514,9 @@
|
|
|
<el-button size="small" type="primary" @click="handlePayCodeClose">关闭</el-button>
|
|
<el-button size="small" type="primary" @click="handlePayCodeClose">关闭</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
- <Equities v-model:show="equitiesShow" v-if="equitiesShow" :recipientInfo="[owerFormInfo, policyHolderInfo, insuredPersonInfo]"
|
|
|
|
|
- :EquitiesInfo="EquitiesInfo" @save="handleEquitiesSave"></Equities>
|
|
|
|
|
|
|
+ <Equities v-model:show="equitiesShow" v-if="equitiesShow"
|
|
|
|
|
+ :recipientInfo="[owerFormInfo, policyHolderInfo, insuredPersonInfo]" :EquitiesInfo="EquitiesInfo"
|
|
|
|
|
+ @save="handleEquitiesSave"></Equities>
|
|
|
</div>
|
|
</div>
|
|
|
<quotation ref="quotationRef" :quotationObj="quotationObj" :insurancePolicyForm="insurancePolicyForm" />
|
|
<quotation ref="quotationRef" :quotationObj="quotationObj" :insurancePolicyForm="insurancePolicyForm" />
|
|
|
</template>
|
|
</template>
|
|
@@ -3803,46 +3804,7 @@ const quoteInsurance = async (companyId: any, companyIndex: any, val: any) => {
|
|
|
}
|
|
}
|
|
|
// 设置折扣信息
|
|
// 设置折扣信息
|
|
|
const feeOrders = res.data?.feeOrders || {};
|
|
const feeOrders = res.data?.feeOrders || {};
|
|
|
- if (quoteData.value[companyIndex]) {
|
|
|
|
|
- quoteData.value[companyIndex].discounts = [
|
|
|
|
|
- {
|
|
|
|
|
- name: '交强', // 交强险费用明细
|
|
|
|
|
- additionalPremium: feeOrders.jqAdditionalPremium ?? 0,
|
|
|
|
|
- additionalRatio: feeOrders.jqAdditionalRatio ?? 0,
|
|
|
|
|
- commissionPremium: feeOrders.jqCommissionPremium ?? 0,
|
|
|
|
|
- commissionRatio: feeOrders.jqCommissionRatio ?? 0,
|
|
|
|
|
- exportPremium: feeOrders.jqExportPremium ?? 0,
|
|
|
|
|
- exportRatio: new Decimal(feeOrders.jqExportRatio ?? 0).times(100) + '%',
|
|
|
|
|
- }, {
|
|
|
|
|
- name: '商业', // 商业险费用明细
|
|
|
|
|
- additionalPremium: feeOrders.syAdditionalPremium ?? 0,
|
|
|
|
|
- additionalRatio: feeOrders.syAdditionalRatio ?? 0,
|
|
|
|
|
- commissionPremium: feeOrders.syCommissionPremium ?? 0,
|
|
|
|
|
- commissionRatio: feeOrders.syCommissionRatio ?? 0,
|
|
|
|
|
- exportPremium: feeOrders.syExportPremium ?? 0,
|
|
|
|
|
- exportRatio: new Decimal(feeOrders.syExportRatio ?? 0).times(100) + '%',
|
|
|
|
|
- }, {
|
|
|
|
|
- name: '驾意险', // 驾意险费用明细
|
|
|
|
|
- additionalPremium: feeOrders.jyAdditionalPremium ?? 0,
|
|
|
|
|
- additionalRatio: feeOrders.jyAdditionalRatio ?? 0,
|
|
|
|
|
- commissionPremium: feeOrders.jyCommissionPremium ?? 0,
|
|
|
|
|
- commissionRatio: feeOrders.jyCommissionRatio ?? 0,
|
|
|
|
|
- exportPremium: feeOrders.jyExportPremium ?? 0,
|
|
|
|
|
- exportRatio: new Decimal(feeOrders.jyExportRatio ?? 0).times(100) + '%',
|
|
|
|
|
- }, {
|
|
|
|
|
- name: '总计', // 总计
|
|
|
|
|
- commissionPremium: new Decimal(feeOrders.jqCommissionPremium ?? 0).plus(feeOrders.syCommissionPremium ?? 0).plus(feeOrders.jyCommissionPremium ?? 0),
|
|
|
|
|
- exportPremium: new Decimal(feeOrders.jyExportPremium ?? 0).plus(feeOrders.syExportPremium ?? 0).plus(feeOrders.jqExportPremium ?? 0),
|
|
|
|
|
- exportRatio: '--',
|
|
|
|
|
- commissionRatio: '--',
|
|
|
|
|
- },
|
|
|
|
|
- ]
|
|
|
|
|
- // 保存报价结果
|
|
|
|
|
- quoteData.value[companyIndex].quoteResult = res.data
|
|
|
|
|
- quoteData.value[companyIndex].quoteCode = 200
|
|
|
|
|
- loading.value = false
|
|
|
|
|
- quoteData.value[companyIndex].loading = false
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ setDiscounts(companyIndex, feeOrders)
|
|
|
} else {
|
|
} else {
|
|
|
if (quoteData.value[companyIndex]) {
|
|
if (quoteData.value[companyIndex]) {
|
|
|
quoteData.value[companyIndex].quoteResult = res.data
|
|
quoteData.value[companyIndex].quoteResult = res.data
|
|
@@ -3864,6 +3826,49 @@ const quoteInsurance = async (companyId: any, companyIndex: any, val: any) => {
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+const setDiscounts = (companyIndex, feeOrders) => {
|
|
|
|
|
+ if (quoteData.value[companyIndex]) {
|
|
|
|
|
+ quoteData.value[companyIndex].discounts = [
|
|
|
|
|
+ {
|
|
|
|
|
+ name: '交强', // 交强险费用明细
|
|
|
|
|
+ additionalPremium: feeOrders.jqAdditionalPremium ?? 0,
|
|
|
|
|
+ additionalRatio: feeOrders.jqAdditionalRatio ?? 0,
|
|
|
|
|
+ commissionPremium: feeOrders.jqCommissionPremium ?? 0,
|
|
|
|
|
+ commissionRatio: feeOrders.jqCommissionRatio ?? 0,
|
|
|
|
|
+ exportPremium: feeOrders.jqExportPremium ?? 0,
|
|
|
|
|
+ exportRatio: new Decimal(feeOrders.jqExportRatio ?? 0).times(100) + '%',
|
|
|
|
|
+ }, {
|
|
|
|
|
+ name: '商业', // 商业险费用明细
|
|
|
|
|
+ additionalPremium: feeOrders.syAdditionalPremium ?? 0,
|
|
|
|
|
+ additionalRatio: feeOrders.syAdditionalRatio ?? 0,
|
|
|
|
|
+ commissionPremium: feeOrders.syCommissionPremium ?? 0,
|
|
|
|
|
+ commissionRatio: feeOrders.syCommissionRatio ?? 0,
|
|
|
|
|
+ exportPremium: feeOrders.syExportPremium ?? 0,
|
|
|
|
|
+ exportRatio: new Decimal(feeOrders.syExportRatio ?? 0).times(100) + '%',
|
|
|
|
|
+ }, {
|
|
|
|
|
+ name: '驾意险', // 驾意险费用明细
|
|
|
|
|
+ additionalPremium: feeOrders.jyAdditionalPremium ?? 0,
|
|
|
|
|
+ additionalRatio: feeOrders.jyAdditionalRatio ?? 0,
|
|
|
|
|
+ commissionPremium: feeOrders.jyCommissionPremium ?? 0,
|
|
|
|
|
+ commissionRatio: feeOrders.jyCommissionRatio ?? 0,
|
|
|
|
|
+ exportPremium: feeOrders.jyExportPremium ?? 0,
|
|
|
|
|
+ exportRatio: new Decimal(feeOrders.jyExportRatio ?? 0).times(100) + '%',
|
|
|
|
|
+ }, {
|
|
|
|
|
+ name: '总计', // 总计
|
|
|
|
|
+ commissionPremium: new Decimal(feeOrders.jqCommissionPremium ?? 0).plus(feeOrders.syCommissionPremium ?? 0).plus(feeOrders.jyCommissionPremium ?? 0),
|
|
|
|
|
+ exportPremium: new Decimal(feeOrders.jyExportPremium ?? 0).plus(feeOrders.syExportPremium ?? 0).plus(feeOrders.jqExportPremium ?? 0),
|
|
|
|
|
+ exportRatio: '--',
|
|
|
|
|
+ commissionRatio: '--',
|
|
|
|
|
+ },
|
|
|
|
|
+ ]
|
|
|
|
|
+ // 保存报价结果
|
|
|
|
|
+ quoteData.value[companyIndex].quoteResult = res.data
|
|
|
|
|
+ quoteData.value[companyIndex].quoteCode = 200
|
|
|
|
|
+ loading.value = false
|
|
|
|
|
+ quoteData.value[companyIndex].loading = false
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
/**
|
|
/**
|
|
|
* 处理下一步操作
|
|
* 处理下一步操作
|
|
|
* 在新窗口打开保险单页面
|
|
* 在新窗口打开保险单页面
|
|
@@ -3981,7 +3986,7 @@ const ruleFilterCompany = (item: any, obj: any) => {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
if (obj) {
|
|
if (obj) {
|
|
|
- quoteData.value?.map((item: any) => {
|
|
|
|
|
|
|
+ quoteData.value?.map((item: any, i: number) => {
|
|
|
obj.insCompanyVo?.map((a: any) => {
|
|
obj.insCompanyVo?.map((a: any) => {
|
|
|
if (item.id == a.id) {
|
|
if (item.id == a.id) {
|
|
|
item.quoteResult = { ...a, ...obj };
|
|
item.quoteResult = { ...a, ...obj };
|
|
@@ -3997,6 +4002,7 @@ const ruleFilterCompany = (item: any, obj: any) => {
|
|
|
item.failMsg = obj.errorMessage
|
|
item.failMsg = obj.errorMessage
|
|
|
}
|
|
}
|
|
|
insurancePolicyForm.value.order.insuranceCompanyCode = a.id
|
|
insurancePolicyForm.value.order.insuranceCompanyCode = a.id
|
|
|
|
|
+ setDiscounts(i, obj.insFeeOrders)
|
|
|
getSchemeResult(true)
|
|
getSchemeResult(true)
|
|
|
}
|
|
}
|
|
|
return a
|
|
return a
|