|
|
@@ -393,8 +393,8 @@
|
|
|
<div class="title">
|
|
|
投保人信息
|
|
|
<div class="ml-5 flex a-c">
|
|
|
- <span class="ordinary" :class="{ 'active': item.checked }" v-for="item in btns.owner1"
|
|
|
- :key="item.text" @click.stop="handleChange(item, 'owner1')">
|
|
|
+ <span class="ordinary" :class="{ 'active': item.checked }" v-for="item in btns.owner1" :key="item.text"
|
|
|
+ @click.stop="handleChange(item, 'owner1')">
|
|
|
{{ item.text }}
|
|
|
</span>
|
|
|
</div>
|
|
|
@@ -435,14 +435,14 @@
|
|
|
<el-form-item prop="identifyValidDate2" label="有效期起期">
|
|
|
<el-date-picker v-model="insurancePolicyForm.identifyValidDate2" type="date" placeholder="请选择"
|
|
|
value-format="YYYY-MM-DD" style="width: 100%"
|
|
|
- @blur="(e:any) => insurancePolicyForm.identifyValidDate2 = changeDate(e)" />
|
|
|
+ @blur="(e: any) => insurancePolicyForm.identifyValidDate2 = changeDate(e)" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item prop="identifyValidEndDate2" label="有效期止期">
|
|
|
<el-date-picker v-model="insurancePolicyForm.identifyValidEndDate2" type="date" placeholder="请选择"
|
|
|
value-format="YYYY-MM-DD" style="width: 100%"
|
|
|
- @blur="(e:any) => insurancePolicyForm.identifyValidEndDate2 = changeDate(e)" />
|
|
|
+ @blur="(e: any) => insurancePolicyForm.identifyValidEndDate2 = changeDate(e)" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
@@ -574,14 +574,14 @@
|
|
|
<el-form-item prop="identifyValidDate3" label="有效期起期">
|
|
|
<el-date-picker v-model="insurancePolicyForm.identifyValidDate3" type="date" placeholder="请选择"
|
|
|
value-format="YYYY-MM-DD" style="width: 100%"
|
|
|
- @blur="(e:any) => insurancePolicyForm.identifyValidDate3 = changeDate(e)" />
|
|
|
+ @blur="(e: any) => insurancePolicyForm.identifyValidDate3 = changeDate(e)" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item prop="identifyValidEndDate3" label="有效期止期">
|
|
|
<el-date-picker v-model="insurancePolicyForm.identifyValidEndDate3" type="date" placeholder="请选择"
|
|
|
value-format="YYYY-MM-DD" style="width: 100%"
|
|
|
- @blur="(e:any) => insurancePolicyForm.identifyValidEndDate3 = changeDate(e)" />
|
|
|
+ @blur="(e: any) => insurancePolicyForm.identifyValidEndDate3 = changeDate(e)" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
@@ -670,8 +670,8 @@
|
|
|
<div class="title">
|
|
|
车船税
|
|
|
<div class="ml-5 flex a-c">
|
|
|
- <span class="ordinary" :class="{ 'active': item.checked }" v-for="item in btns.owner3"
|
|
|
- :key="item.text" @click.stop="handleChange(item, 'owner3')">
|
|
|
+ <span class="ordinary" :class="{ 'active': item.checked }" v-for="item in btns.owner3" :key="item.text"
|
|
|
+ @click.stop="handleChange(item, 'owner3')">
|
|
|
{{ item.text }}
|
|
|
</span>
|
|
|
</div>
|
|
|
@@ -812,9 +812,8 @@
|
|
|
<div class="title">
|
|
|
投保信息
|
|
|
<div class="ml-5 flex a-c">
|
|
|
- <span class="ordinary" :class="{ 'active': item.checked }"
|
|
|
- v-for="item in optionObj.insuranceType" :key="item.value"
|
|
|
- @click.stop="handleChange(item, 'insurance')">
|
|
|
+ <span class="ordinary" :class="{ 'active': item.checked }" v-for="item in optionObj.insuranceType"
|
|
|
+ :key="item.value" @click.stop="handleChange(item, 'insurance')">
|
|
|
{{ item.label }}
|
|
|
</span>
|
|
|
</div>
|
|
|
@@ -896,10 +895,11 @@
|
|
|
<div class="circle"></div>
|
|
|
<div>为车主提供 "省心、省时、又省钱" 的全场景服务</div>
|
|
|
<el-button style="margin: 0 20px" size="small" type="primary"
|
|
|
- @click="handleOpenEquities">选择权益</el-button>
|
|
|
+ @click="handleOpenEquities(scope.row.quoteResult.ordersNo)">选择权益</el-button>
|
|
|
</div>
|
|
|
<div class="equitiesChoice">
|
|
|
- 已选<span style="color: #0083FF">12</span>项去权益,共计<span style="color: #FF8C21">135.35</span>元
|
|
|
+ 已选<span style="color: #0083FF">{{ insOrderRightsInfoDto.length }}</span>项去权益,共计<span
|
|
|
+ style="color: #FF8C21">{{ insOrderRightsInfoDto.totalPriceCount }}</span>元
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="expandFlex">
|
|
|
@@ -999,7 +999,7 @@
|
|
|
<el-table-column label="产品名称" prop="productName" align="center">
|
|
|
<template #default="props">
|
|
|
<el-button link type="primary" @click="getJYXDetail(props.row)">{{ props.row.productName
|
|
|
- }}</el-button>
|
|
|
+ }}</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="数量" align="center">
|
|
|
@@ -1118,7 +1118,8 @@
|
|
|
<template #default="scope">
|
|
|
<el-select v-model="scope.row.agreement"
|
|
|
:disabled="!!scope.row.isDispatch || scope.row.agreements?.length == 1"
|
|
|
- v-if="currentRow.some((a:any) => a.id === scope.row.id)" :placeholder="scope.row.isDispatch ? '默认' : '请选择'">
|
|
|
+ v-if="currentRow.some((a: any) => a.id === scope.row.id)"
|
|
|
+ :placeholder="scope.row.isDispatch ? '默认' : '请选择'">
|
|
|
<el-option v-for="item in scope.row.agreements" :value="item.id"
|
|
|
:label="item.agreementName"></el-option>
|
|
|
</el-select>
|
|
|
@@ -1132,7 +1133,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #default="scope">
|
|
|
- <div class="result" v-if="currentRow.some((a:any) => a.id === scope.row.id) && !scope.row.loading">
|
|
|
+ <div class="result" v-if="currentRow.some((a: any) => a.id === scope.row.id) && !scope.row.loading">
|
|
|
<div class="resultItem">
|
|
|
<span v-if="scope.row.quoteResult?.costs?.sumPremium">总保费:{{
|
|
|
scope.row.quoteResult?.costs?.sumPremium }}</span>
|
|
|
@@ -1184,13 +1185,15 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" width="360">
|
|
|
<template #default="scope">
|
|
|
- <div v-if="currentRow.some((a:any) => a.id === scope.row.id)">
|
|
|
+ <div v-if="currentRow.some((a: any) => a.id === scope.row.id)">
|
|
|
<el-button v-if="scope.row.quoteResult" link type="primary"
|
|
|
@click="handleCount(scope)">优惠测算</el-button>
|
|
|
- <el-button v-if="scope.row.quoteResult" link type="primary" @click="toDetail(scope)">详情</el-button>
|
|
|
+ <el-button v-if="scope.row.quoteResult" link type="primary"
|
|
|
+ @click="toDetail(scope.row.quoteResult.ordersNo)">详情</el-button>
|
|
|
<el-button link type="primary" :loading="scope.row.loading"
|
|
|
@click="handleSubmit(InsurancePolicyRefs, scope)">计算保费</el-button>
|
|
|
- <el-button v-if="scope.row.quoteResult" link type="primary" @click="handleShare(scope)">分享</el-button>
|
|
|
+ <el-button v-if="scope.row.quoteResult" link type="primary"
|
|
|
+ @click="handleShare(scope.row.quoteResult.ordersNo)">分享</el-button>
|
|
|
<el-button v-if="scope.row.quoteResult" link type="primary"
|
|
|
@click="handleUnderwriting(scope)">核保</el-button>
|
|
|
</div>
|
|
|
@@ -1302,7 +1305,9 @@
|
|
|
<calculating ref="calculatingRefs"></calculating>
|
|
|
</el-dialog>
|
|
|
<el-dialog title="提交核保" width="1100" v-model="underwritingShow">
|
|
|
- <underwriting ref="UnderwritingRefs" @close="handleUnderwritingClose"></underwriting>
|
|
|
+ <underwriting v-if="underwritingShow" ref="UnderwritingRefs" :insOrderRightsInfoDto="insOrderRightsInfoDto"
|
|
|
+ :availableAmount="availableAmount" :recipientInfo="[owerFormInfo, policyHolderInfo, insuredPersonInfo]"
|
|
|
+ @close="handleUnderwritingClose"></underwriting>
|
|
|
</el-dialog>
|
|
|
<el-dialog title="证件识别" width="800" v-model="imageShow">
|
|
|
<recognition ref="RecognitionRefs" :option="optionObj.car_type_code" @close="handleImageClose"></recognition>
|
|
|
@@ -1367,7 +1372,9 @@
|
|
|
<el-button size="small" type="primary" @click="handlePayCodeClose">关闭</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
- <Equities v-if="equitiesShow" :show="equitiesShow" @cancel="handleEquities"></Equities>
|
|
|
+ <Equities v-if="equitiesShow" :show="equitiesShow"
|
|
|
+ :recipientInfo="[owerFormInfo, policyHolderInfo, insuredPersonInfo]" :availableAmount="availableAmount"
|
|
|
+ @cancel="equitiesShow = false" @save="handleEquitiesSave"></Equities>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -1389,6 +1396,7 @@ import salesmanSelect from '../additionalOrder/additional/modules/salesmanSelect
|
|
|
import insurance from "../additionalOrder/additional/modules/insuranceSelect.vue"; // 保险选择模块
|
|
|
import driving from '../../layouts/components/DrivingType/index.vue' // 驾意险模块
|
|
|
import detail from '../../layouts/components/JYXDetail/index.vue' // 驾意险详情模块
|
|
|
+import Equities from './modules/Equities.vue' // 驾意险详情模块
|
|
|
// 导入二维码生成库
|
|
|
import QRCode from 'qrcode'
|
|
|
// 导入日期处理库
|
|
|
@@ -1633,7 +1641,7 @@ const handleFocus = () => {
|
|
|
* 处理业务员选择回调
|
|
|
* @param data 选中的业务员数据
|
|
|
*/
|
|
|
-const handleSalesmanSelect = (data:any) => {
|
|
|
+const handleSalesmanSelect = (data: any) => {
|
|
|
salesmanShow.value = false
|
|
|
if (data) {
|
|
|
// 如果已有业务员信息且选择了险种,则清空报价数据并重新过滤公司
|
|
|
@@ -1832,11 +1840,7 @@ let insurancePolicyRules = ref<FormRules>({
|
|
|
],
|
|
|
engineNo: [
|
|
|
{ required: true, trigger: 'blur', message: '请输入发动机号' },
|
|
|
- {
|
|
|
- pattern: /^(?=.*[a-z])(?=.*\d).+$/i,
|
|
|
- message: '请填写正确的发动机号',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
+
|
|
|
],
|
|
|
carNatureCode: [
|
|
|
{ required: true, trigger: 'change', message: '请选择车辆是否上牌' },
|
|
|
@@ -2070,8 +2074,8 @@ const licenseNoDataSubmit = () => {
|
|
|
insurancePolicyForm.value.purchasePrice = carData.replacementValue
|
|
|
insurancePolicyForm.value.displacement = carData.displacement
|
|
|
insurancePolicyForm.value.powerScale = carData.powerScale
|
|
|
- licenseNoShow.value = false
|
|
|
- }else{
|
|
|
+ licenseNoShow.value = false
|
|
|
+ } else {
|
|
|
ElMessage({
|
|
|
message: '请选择车型',
|
|
|
type: 'warning'
|
|
|
@@ -2143,7 +2147,7 @@ const longTime = () => {
|
|
|
insurancePolicyForm.value.identifyValidEndDate1 = '9999-12-31'
|
|
|
}
|
|
|
|
|
|
-const issueDateChange = (e:any) => {
|
|
|
+const issueDateChange = (e: any) => {
|
|
|
insurancePolicyForm.value.transferDate = insurancePolicyForm.value.issueDate
|
|
|
}
|
|
|
|
|
|
@@ -2185,7 +2189,7 @@ let btns = ref({
|
|
|
checked: false
|
|
|
}],
|
|
|
})
|
|
|
-const handleChange = (item:any, type:any) => {
|
|
|
+const handleChange = (item: any, type: any) => {
|
|
|
|
|
|
switch (type) {
|
|
|
case 'owner1':
|
|
|
@@ -2305,7 +2309,7 @@ const initOption = () => {
|
|
|
api.commonApi.personInfo('insurance_type').then((res: any) => {
|
|
|
if (res.code == 200) {
|
|
|
if (res.data && res.data.length > 0) {
|
|
|
- res.data.forEach((a:any) => {
|
|
|
+ res.data.forEach((a: any) => {
|
|
|
a.checked = false
|
|
|
})
|
|
|
optionObj.value.insuranceType = res.data
|
|
|
@@ -2346,7 +2350,7 @@ const getAgeByIdCard = (idCard: any, type?: any) => {
|
|
|
// type.age = age
|
|
|
return age
|
|
|
}
|
|
|
-const noeYearPast = (time:any) => {
|
|
|
+const noeYearPast = (time: any) => {
|
|
|
let strYear: any = time.getFullYear();
|
|
|
let strDay: any = time.getDate();
|
|
|
let strMonth: any = time.getMonth() + 1;
|
|
|
@@ -2382,7 +2386,7 @@ const noeYearPast = (time:any) => {
|
|
|
Seconds;
|
|
|
return datastr;
|
|
|
}
|
|
|
-const oneYearPast1 = (time:any) => {
|
|
|
+const oneYearPast1 = (time: any) => {
|
|
|
//明年减一秒
|
|
|
let date = new Date(time);
|
|
|
date.setSeconds(date.getSeconds() - 1);
|
|
|
@@ -2444,7 +2448,7 @@ const transformTime1 = () => {
|
|
|
let datastr = strYear + "-" + strMonth + "-" + strDay + " " + "00:00:00";
|
|
|
return datastr;
|
|
|
}
|
|
|
-const JQChange = (item:any) => {
|
|
|
+const JQChange = (item: any) => {
|
|
|
item.checked = !item.checked
|
|
|
if (jqWork.value.some(a => a.checked)) {
|
|
|
let date: any = new Date();
|
|
|
@@ -2460,7 +2464,7 @@ const JQChange = (item:any) => {
|
|
|
insurancePolicyForm.value.JQInstantFlag = false
|
|
|
}
|
|
|
}
|
|
|
-const jqChange = (e:any) => {
|
|
|
+const jqChange = (e: any) => {
|
|
|
insurancePolicyForm.value.JQEndDate = oneYearPast1(e)
|
|
|
}
|
|
|
// 日期限制函数
|
|
|
@@ -2476,7 +2480,7 @@ const disabledDate = (time: any) => {
|
|
|
let syWork = ref([
|
|
|
{ text: '即时生效', checked: false }
|
|
|
])
|
|
|
-const SYChange = (item:any) => {
|
|
|
+const SYChange = (item: any) => {
|
|
|
item.checked = !item.checked
|
|
|
if (syWork.value.some(a => a.checked)) {
|
|
|
let date: any = new Date();
|
|
|
@@ -2492,7 +2496,7 @@ const SYChange = (item:any) => {
|
|
|
insurancePolicyForm.value.SYInstantFlag = false
|
|
|
}
|
|
|
}
|
|
|
-const syChange = (e:any) => {
|
|
|
+const syChange = (e: any) => {
|
|
|
insurancePolicyForm.value.SYEndDate = oneYearPast1(e)
|
|
|
}
|
|
|
|
|
|
@@ -2501,22 +2505,33 @@ let currentRow = ref([])
|
|
|
let quoteData = ref<QuoteDataItem[]>([])
|
|
|
|
|
|
// 选择权益
|
|
|
-let equitiesShow = ref(false)
|
|
|
-const handleOpenEquities = () => {
|
|
|
+let equitiesShow = ref(false)//权益弹窗是否显示
|
|
|
+const availableAmount = ref(1700)//可选金额
|
|
|
+const insOrderRightsInfoDto = ref<any>({})//权益信息
|
|
|
+const handleOpenEquities = (row: string) => {
|
|
|
+ console.log(row)
|
|
|
equitiesShow.value = true
|
|
|
+ // api.insurancePolicyApi.getOrderDetail(row).then((res: any) => {
|
|
|
+ // if (res.code == '200') {
|
|
|
+ // availableAmount.value = res.data?.insFeeOrders.availableAmount || 0
|
|
|
+ // }
|
|
|
+ // })
|
|
|
}
|
|
|
-const handleEquities = (bool:any) => {
|
|
|
- equitiesShow.value = bool
|
|
|
+// 保存权益
|
|
|
+const handleEquitiesSave = (data: any) => {
|
|
|
+ insOrderRightsInfoDto.value = data
|
|
|
+ console.log(insOrderRightsInfoDto.value)
|
|
|
+ equitiesShow.value = false
|
|
|
}
|
|
|
|
|
|
-const handleSelect = (a:any, b:any) => {
|
|
|
+const handleSelect = (a: any, b: any) => {
|
|
|
currentRow.value = a
|
|
|
// currentRow.value = a
|
|
|
// insurancePolicyForm.value.order.insuranceCompanyCode = a[0].id
|
|
|
}
|
|
|
-const handelSelectRow = (a:any, b:any) => {
|
|
|
+const handelSelectRow = (a: any, b: any) => {
|
|
|
currentRow.value = a
|
|
|
- if (a.some((c:any) => c.id === b.id)) {
|
|
|
+ if (a.some((c: any) => c.id === b.id)) {
|
|
|
insurancePolicyForm.value.order.insuranceCompanyCode = b.id
|
|
|
if (insurancePolicyForm.value.productId) {
|
|
|
api.insurancePolicyApi.getSchemeResult({
|
|
|
@@ -2529,14 +2544,14 @@ const handelSelectRow = (a:any, b:any) => {
|
|
|
console.log(123123123, list)
|
|
|
}
|
|
|
if (list.length > 0) {
|
|
|
- list.forEach((item:any) => {
|
|
|
+ list.forEach((item: any) => {
|
|
|
item.checked = false
|
|
|
})
|
|
|
}
|
|
|
- quoteData.value.forEach((item:any) => {
|
|
|
+ quoteData.value.forEach((item: any) => {
|
|
|
item.productIndex = 0
|
|
|
if (item.id === b.id) {
|
|
|
- item.projectList = list.map((item:any) => {
|
|
|
+ item.projectList = list.map((item: any) => {
|
|
|
return {
|
|
|
...item,
|
|
|
rescue: [],
|
|
|
@@ -2553,7 +2568,7 @@ const handelSelectRow = (a:any, b:any) => {
|
|
|
insurancePolicyForm.value.order.insuranceCompanyCode = ''
|
|
|
}
|
|
|
}
|
|
|
-const handelExpend = (e:any) => {
|
|
|
+const handelExpend = (e: any) => {
|
|
|
insurancePolicyForm.value.order.insuranceCompanyCode = e.id
|
|
|
if (insurancePolicyForm.value.productId) {
|
|
|
api.insurancePolicyApi.getSchemeResult({
|
|
|
@@ -2566,14 +2581,14 @@ const handelExpend = (e:any) => {
|
|
|
console.log(123123123, list)
|
|
|
}
|
|
|
if (list.length > 0) {
|
|
|
- list.forEach((item:any) => {
|
|
|
+ list.forEach((item: any) => {
|
|
|
item.checked = false
|
|
|
})
|
|
|
}
|
|
|
- quoteData.value.forEach((item:any) => {
|
|
|
+ quoteData.value.forEach((item: any) => {
|
|
|
item.productIndex = 0
|
|
|
if (item.id === e.id) {
|
|
|
- item.projectList = list.map((item:any) => {
|
|
|
+ item.projectList = list.map((item: any) => {
|
|
|
return {
|
|
|
...item,
|
|
|
rescue: [],
|
|
|
@@ -2587,39 +2602,39 @@ const handelExpend = (e:any) => {
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
-const handleClickRow = (a:any, b:any) => {
|
|
|
+const handleClickRow = (a: any, b: any) => {
|
|
|
|
|
|
}
|
|
|
-const handleViewSuccess = (e:any) => {
|
|
|
+const handleViewSuccess = (e: any) => {
|
|
|
console.log(11111, quoteData.value)
|
|
|
}
|
|
|
// 选择险种
|
|
|
let insuranceShow = ref(false)
|
|
|
-const handlePopover = (scope:any) => {
|
|
|
+const handlePopover = (scope: any) => {
|
|
|
insuranceShow.value = true
|
|
|
nextTick(() => {
|
|
|
InsuranceTypeRef.value.initEditData(scope.row.projectList[scope.row.productIndex].kinds)
|
|
|
})
|
|
|
}
|
|
|
// 删除险种
|
|
|
-const handleInsuranceDel = (scope:any, props:any) => {
|
|
|
- let obj = scope.row.projectList[scope.row.productIndex].kinds.filter((a:any) => a.id != props.row.id)
|
|
|
- quoteData.value.forEach((a:any) => {
|
|
|
+const handleInsuranceDel = (scope: any, props: any) => {
|
|
|
+ let obj = scope.row.projectList[scope.row.productIndex].kinds.filter((a: any) => a.id != props.row.id)
|
|
|
+ quoteData.value.forEach((a: any) => {
|
|
|
if (a.id === scope.row.id) {
|
|
|
a.projectList[scope.row.productIndex].kinds = obj
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
-const handleClose = (data:any) => {
|
|
|
+const handleClose = (data: any) => {
|
|
|
insuranceShow.value = false
|
|
|
if (data && data.list.length > 0) {
|
|
|
- data.list.forEach((item:any) => {
|
|
|
- let obj = item.options.find((b:any) => b.checked)
|
|
|
+ data.list.forEach((item: any) => {
|
|
|
+ let obj = item.options.find((b: any) => b.checked)
|
|
|
item.amount = obj.value
|
|
|
item.unitAmount = obj.value
|
|
|
})
|
|
|
}
|
|
|
- quoteData.value.forEach((a:any) => {
|
|
|
+ quoteData.value.forEach((a: any) => {
|
|
|
if (insurancePolicyForm.value.order.insuranceCompanyCode === a.id) {
|
|
|
a.projectList[a.productIndex].kinds = data.list
|
|
|
}
|
|
|
@@ -2630,7 +2645,7 @@ const handleClose = (data:any) => {
|
|
|
let drivingShow = ref(false)
|
|
|
let drivingRow = ref(0)
|
|
|
let JYXDetailShow = ref(false)
|
|
|
-const handleDriving = (scope:any) => {
|
|
|
+const handleDriving = (scope: any) => {
|
|
|
drivingRow.value = scope.$index
|
|
|
drivingShow.value = true
|
|
|
nextTick(() => {
|
|
|
@@ -2638,24 +2653,24 @@ const handleDriving = (scope:any) => {
|
|
|
})
|
|
|
}
|
|
|
// 删除驾意险
|
|
|
-const handleDrivingDel = (scope:any, props:any) => {
|
|
|
- let obj = scope.row.projectList[scope.row.productIndex].drivings.filter((a:any) => a.id != props.row.id)
|
|
|
- quoteData.value.forEach((a:any) => {
|
|
|
+const handleDrivingDel = (scope: any, props: any) => {
|
|
|
+ let obj = scope.row.projectList[scope.row.productIndex].drivings.filter((a: any) => a.id != props.row.id)
|
|
|
+ quoteData.value.forEach((a: any) => {
|
|
|
if (a.id === scope.row.id) {
|
|
|
a.projectList[scope.row.productIndex].drivings = obj
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
// 驾意险详情
|
|
|
-const getJYXDetail = (row:any) => {
|
|
|
+const getJYXDetail = (row: any) => {
|
|
|
JYXDetailShow.value = true
|
|
|
nextTick(() => {
|
|
|
JYXDetail.value.initData(row.drivingIntentionId)
|
|
|
})
|
|
|
}
|
|
|
-const handleDrivingClose = (data:any) => {
|
|
|
+const handleDrivingClose = (data: any) => {
|
|
|
if (data && data.list.length > 0) {
|
|
|
- data.list.forEach((a:any) => {
|
|
|
+ data.list.forEach((a: any) => {
|
|
|
a.quantity = 1
|
|
|
})
|
|
|
const quoteItem = quoteData.value[drivingRow.value]
|
|
|
@@ -2674,7 +2689,7 @@ let specialIndex = ref(-1)
|
|
|
let specialShow = ref(false)
|
|
|
let specialTableData = ref([])
|
|
|
let specialSelectList = ref<any[]>([])
|
|
|
-const handleSelectSpecial = (scope:any) => {
|
|
|
+const handleSelectSpecial = (scope: any) => {
|
|
|
specialIndex.value = scope.$index
|
|
|
specialShow.value = true
|
|
|
api.insurancePolicyApi.getClausePage({
|
|
|
@@ -2691,7 +2706,7 @@ const handleSelectSpecial = (scope:any) => {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
-const handleSpecialSelectChage = (a:any) => {
|
|
|
+const handleSpecialSelectChage = (a: any) => {
|
|
|
specialSelectList.value = [...a]
|
|
|
}
|
|
|
const handleSpecialTableDataCancel = () => {
|
|
|
@@ -2713,7 +2728,7 @@ const handleSpecialTableDataSubmit = () => {
|
|
|
// 优惠信息
|
|
|
let discounts = ref([])
|
|
|
let productIndex = ref(0)
|
|
|
-const handleProduct = (scope:any, e:any, index:any) => {
|
|
|
+const handleProduct = (scope: any, e: any, index: any) => {
|
|
|
scope.row.productIndex = index
|
|
|
}
|
|
|
|
|
|
@@ -2723,7 +2738,7 @@ let tableData = ref([])
|
|
|
// 分享
|
|
|
let shareShow = ref(false)
|
|
|
let shareImageUrl = ref('')
|
|
|
-const handleShare = async (scope:any) => {
|
|
|
+const handleShare = async (scope: any) => {
|
|
|
shareShow.value = true
|
|
|
shareImageUrl.value = await QRCode.toDataURL(`http://test-tennat.baoxianzhanggui.com/h5/#/pages/quote/paymentCode?ordersNo=${scope.row.quoteResult.ordersNo}`, {
|
|
|
width: 150,
|
|
|
@@ -2755,7 +2770,7 @@ const handleCopyLink = async () => {
|
|
|
|
|
|
// 优惠测算
|
|
|
let calculatingShow = ref(false)
|
|
|
-const handleCount = (scope:any) => {
|
|
|
+const handleCount = (scope: any) => {
|
|
|
calculatingShow.value = true
|
|
|
}
|
|
|
|
|
|
@@ -2771,10 +2786,10 @@ const toDetail = (scope: any) => {
|
|
|
}
|
|
|
|
|
|
// 上传影像
|
|
|
-const handleImageSave = (scope:any) => {
|
|
|
- let list = images.value.filter((a:any) => a.checked)
|
|
|
+const handleImageSave = (scope: any) => {
|
|
|
+ let list = images.value.filter((a: any) => a.checked)
|
|
|
if (list.length > 0) {
|
|
|
- let arr = list.map((a:any) => {
|
|
|
+ let arr = list.map((a: any) => {
|
|
|
return {
|
|
|
imageCode: a.imageType,
|
|
|
imageBase64List: [
|
|
|
@@ -2806,7 +2821,7 @@ const handleImageSave = (scope:any) => {
|
|
|
}
|
|
|
|
|
|
//支付码
|
|
|
-const getPayCode = (orderNo:any) => {
|
|
|
+const getPayCode = (orderNo: any) => {
|
|
|
api.insurancePolicyApi.getQrCode(orderNo).then((res: any) => {
|
|
|
if (res.code == 200) {
|
|
|
payCodeUrl.value = res.data?.qrcode
|
|
|
@@ -2823,7 +2838,7 @@ const getPayCode = (orderNo:any) => {
|
|
|
//分享
|
|
|
let qrImageUrl = ref('')
|
|
|
let payCodeUrl = ref('')
|
|
|
-const handleCode = async (orderNo:any) => {
|
|
|
+const handleCode = async (orderNo: any) => {
|
|
|
api.insurancePolicyApi.getQrCode(orderNo).then((res: any) => {
|
|
|
if (res.code == 200) {
|
|
|
payCodeUrl.value = res.data?.qrcode
|
|
|
@@ -2864,7 +2879,7 @@ const handlePopoverConfirm = async () => {
|
|
|
// 提交核保
|
|
|
let underwritingShow = ref(false)
|
|
|
let underwritingIndex = ref(-1)
|
|
|
-const handleUnderwriting = (scope:any) => {
|
|
|
+const handleUnderwriting = (scope: any) => {
|
|
|
console.log('要去核保的数据', scope.row)
|
|
|
underwritingShow.value = true
|
|
|
underwritingIndex.value = scope.$index
|
|
|
@@ -2901,7 +2916,8 @@ const handleUnderwriting = (scope:any) => {
|
|
|
|
|
|
let underwritingMsgShow = ref(false)
|
|
|
|
|
|
-const handleUnderwritingClose = (bool:any, msg:any) => {
|
|
|
+const handleUnderwritingClose = (bool: any, msg: any) => {
|
|
|
+ console.log(bool, msg)
|
|
|
underwritingShow.value = false
|
|
|
if (msg) {
|
|
|
console.log(msg)
|
|
|
@@ -2930,7 +2946,7 @@ const handleGetPayCode = () => {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
-const srcChange = async (url:any) => {
|
|
|
+const srcChange = async (url: any) => {
|
|
|
payCodeSrc.value = await QRCode.toDataURL(url, {
|
|
|
width: 150,
|
|
|
margin: 2
|
|
|
@@ -2941,14 +2957,17 @@ const handlePayCodeClose = () => {
|
|
|
payCodeShow.value = false
|
|
|
}
|
|
|
|
|
|
+const owerFormInfo = ref<any>({})
|
|
|
+const policyHolderInfo = ref<any>({})
|
|
|
+const insuredPersonInfo = ref<any>({})
|
|
|
// 证件识别
|
|
|
let imageShow = ref(false)
|
|
|
let images = ref([])
|
|
|
-const handleImageClose = (data:any) => {
|
|
|
- btns.value.owner1.forEach((a:any) => {
|
|
|
+const handleImageClose = (data: any) => {
|
|
|
+ btns.value.owner1.forEach((a: any) => {
|
|
|
a.checked = false
|
|
|
})
|
|
|
- btns.value.owner2.forEach((a:any) => {
|
|
|
+ btns.value.owner2.forEach((a: any) => {
|
|
|
a.checked = false
|
|
|
})
|
|
|
imageShow.value = false
|
|
|
@@ -3046,7 +3065,7 @@ const handleImageClose = (data:any) => {
|
|
|
}
|
|
|
}
|
|
|
if (imageVoList && imageVoList.length > 0) {
|
|
|
- insurancePolicyForm.value.imageVoList = imageVoList.filter((a:any) => a.imageBase64List[0].imageId)
|
|
|
+ insurancePolicyForm.value.imageVoList = imageVoList.filter((a: any) => a.imageBase64List[0].imageId)
|
|
|
}
|
|
|
if (list && list.length > 0) {
|
|
|
images.value = list
|
|
|
@@ -3056,7 +3075,7 @@ const handleImageClose = (data:any) => {
|
|
|
|
|
|
// 记录已填好的信息,防止再次进行证件识别
|
|
|
let hadWritedData = ref<Partial<typeof insurancePolicyForm.value>>({})
|
|
|
-const handleRecognition = (achor:any) => {
|
|
|
+const handleRecognition = (achor: any) => {
|
|
|
imageShow.value = true
|
|
|
hadWritedData.value = JSON.parse(JSON.stringify(insurancePolicyForm.value))
|
|
|
nextTick(() => {
|
|
|
@@ -3073,7 +3092,7 @@ let loading = ref(false) // 提交加载状态
|
|
|
* @param InsurancePolicyRefs 表单引用实例
|
|
|
* @param scope 当前行作用域
|
|
|
*/
|
|
|
-const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined, scope :any) => {
|
|
|
+const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined, scope: any) => {
|
|
|
// 检查货车是否填写核定载质量
|
|
|
if (insurancePolicyForm.value.plateType == 'A1') {
|
|
|
if (!insurancePolicyForm.value.limitLoad) {
|
|
|
@@ -3088,7 +3107,7 @@ const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined, scope
|
|
|
InsurancePolicyRefs?.resetFields()
|
|
|
return
|
|
|
}
|
|
|
- await InsurancePolicyRefs.validate((valid:any) => {
|
|
|
+ await InsurancePolicyRefs.validate((valid: any) => {
|
|
|
if (valid) {
|
|
|
// 设置当前报价项的加载状态
|
|
|
quoteData.value[scope.$index].loading = true
|
|
|
@@ -3099,17 +3118,17 @@ const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined, scope
|
|
|
let obj = quoteData.value.find((a: QuoteDataItem) => a.id === insurancePolicyForm.value.order.insuranceCompanyCode)
|
|
|
if (obj && obj.projectList && obj.productIndex !== undefined) {
|
|
|
// 收集险种信息
|
|
|
- obj.projectList[obj.productIndex].kinds?.forEach((a:any) => {
|
|
|
+ obj.projectList[obj.productIndex].kinds?.forEach((a: any) => {
|
|
|
arr.push(a)
|
|
|
})
|
|
|
// 收集驾意险信息
|
|
|
- obj.projectList[obj.productIndex].drivings?.forEach((a:any) => {
|
|
|
+ obj.projectList[obj.productIndex].drivings?.forEach((a: any) => {
|
|
|
brr.push(a)
|
|
|
})
|
|
|
}
|
|
|
// 收集特约信息
|
|
|
if (obj?.specialSelectedList && obj.specialSelectedList.length > 0) {
|
|
|
- obj.specialSelectedList.forEach((a:any) => {
|
|
|
+ obj.specialSelectedList.forEach((a: any) => {
|
|
|
crr.push(a)
|
|
|
})
|
|
|
}
|
|
|
@@ -3124,7 +3143,7 @@ const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined, scope
|
|
|
}
|
|
|
|
|
|
// 处理车主与投保人关系
|
|
|
- let obj1 = btns.value.owner1.find((a:any) => a.checked)
|
|
|
+ let obj1 = btns.value.owner1.find((a: any) => a.checked)
|
|
|
btns.value.owner1Text = obj1.text
|
|
|
if (obj1.text === '同车主') {
|
|
|
// 如果选择"同车主",则将投保人信息设为车主信息
|
|
|
@@ -3144,7 +3163,7 @@ const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined, scope
|
|
|
}
|
|
|
|
|
|
// 处理投保人与被保人关系
|
|
|
- let obj2 = btns.value.owner2.find((a:any) => a.checked)
|
|
|
+ let obj2 = btns.value.owner2.find((a: any) => a.checked)
|
|
|
btns.value.owner2Text = obj2.text
|
|
|
if (obj2.text === '同车主') {
|
|
|
// 如果被保人选择"同车主",则将被保人信息设为车主信息
|
|
|
@@ -3296,6 +3315,9 @@ const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined, scope
|
|
|
accidentalDrivings: [...brr],
|
|
|
specialInfoVo: [...crr]
|
|
|
}
|
|
|
+ owerFormInfo.value = { ...data.ownersInfo, title: '车主', policyPersonType: '1' };
|
|
|
+ policyHolderInfo.value = { ...data.policyHolderInfo, title: '投保人', policyPersonType: '2' };
|
|
|
+ insuredPersonInfo.value = { ...data.insuredPersonInfo, title: '被保人', policyPersonType: '3' };
|
|
|
// 先保存影像资料
|
|
|
api.insurancePolicyApi.imageSave({
|
|
|
order: {
|
|
|
@@ -3367,11 +3389,11 @@ const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined, scope
|
|
|
quoteData.value[scope.$index].loading = false
|
|
|
}
|
|
|
// InsurancePolicyRefs.resetFields()
|
|
|
- }).catch((e:any) => {
|
|
|
+ }).catch((e: any) => {
|
|
|
// 处理异常情况,重置加载状态
|
|
|
loading.value = false
|
|
|
quoteData.value[scope.$index].loading = false
|
|
|
- quoteData.value.forEach((a:any) => {
|
|
|
+ quoteData.value.forEach((a: any) => {
|
|
|
a.loading = false
|
|
|
})
|
|
|
})
|
|
|
@@ -3482,7 +3504,7 @@ const handleNext = () => {
|
|
|
* 显示费用匹配错误信息
|
|
|
* @param scope 当前行作用域
|
|
|
*/
|
|
|
-const handleOpen = (scope:any) => {
|
|
|
+const handleOpen = (scope: any) => {
|
|
|
ElNotification({
|
|
|
title: '费用匹配错误信息',
|
|
|
message: h('p', { style: 'white-space: pre-line' }, `${scope.row.quoteResult?.feeNoDescription}`),
|
|
|
@@ -3494,7 +3516,7 @@ const handleOpen = (scope:any) => {
|
|
|
* 根据产品ID和车辆及人员信息获取可报价的保险公司列表
|
|
|
* @param item 选中的产品信息
|
|
|
*/
|
|
|
-const ruleFilterCompany = (item:any) => {
|
|
|
+const ruleFilterCompany = (item: any) => {
|
|
|
let data = {
|
|
|
productId: item.value, // 产品ID
|
|
|
carInfo: { // 车辆信息
|
|
|
@@ -3568,12 +3590,12 @@ const ruleFilterCompany = (item:any) => {
|
|
|
api.insurancePolicyApi.ruleFilterCompany(data).then((res: any) => {
|
|
|
if (res.code == 200) {
|
|
|
// 设置每个保险公司的加载状态
|
|
|
- res.data.forEach((a:any) => {
|
|
|
+ res.data.forEach((a: any) => {
|
|
|
a.loading = false
|
|
|
})
|
|
|
quoteData.value = res.data
|
|
|
// 如果只有一个协议,自动选择
|
|
|
- quoteData.value.forEach((item:any) => {
|
|
|
+ quoteData.value.forEach((item: any) => {
|
|
|
if (item.agreements && item.agreements.length == 1) {
|
|
|
item.agreement = item.agreements[0].id
|
|
|
}
|
|
|
@@ -3997,4 +4019,4 @@ onMounted(() => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|