|
|
@@ -872,6 +872,7 @@
|
|
|
@selection-change="handleSelect"
|
|
|
@select="handelSelectRow"
|
|
|
@row-click="handleClickRow"
|
|
|
+ @expand-change="handelExpend"
|
|
|
>
|
|
|
<el-table-column type="expand">
|
|
|
<template #default="scope">
|
|
|
@@ -885,9 +886,9 @@
|
|
|
<el-col :span="12">
|
|
|
<div class="quoteTitle">方案明细</div>
|
|
|
<el-table
|
|
|
- :data="scope.row.projectList[productIndex].kinds"
|
|
|
+ :data="scope.row.projectList?.[productIndex]?.kinds"
|
|
|
>
|
|
|
- <el-table-column width="50" align="center" v-if="scope.row.projectList[productIndex].schemeType !='1'">
|
|
|
+ <el-table-column width="50" align="center" v-if="scope.row.projectList?.[productIndex]?.schemeType !='1'">
|
|
|
<template #header>
|
|
|
<el-icon style="cursor: pointer;" @click="handlePopover(scope)"><CirclePlus /></el-icon>
|
|
|
</template>
|
|
|
@@ -905,32 +906,32 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="保费" prop="unitAmount" align="center"></el-table-column>
|
|
|
</el-table>
|
|
|
- <div class="quoteTitle">增值服务</div>
|
|
|
- <el-row :gutter="20">
|
|
|
+ <div class="quoteTitle" v-if="scope.row.projectList?.[productIndex]?.rescue && scope.row.projectList?.[productIndex]?.detection && scope.row.projectList?.[productIndex]?.driver && scope.row.projectList?.[productIndex]?.inspect ">增值服务</div>
|
|
|
+ <el-row :gutter="20" v-if="scope.row.projectList?.[productIndex]?.rescue && scope.row.projectList?.[productIndex]?.detection && scope.row.projectList?.[productIndex]?.driver && scope.row.projectList?.[productIndex]?.inspect ">
|
|
|
<el-col :span="6" class="quoteFlex">
|
|
|
救援
|
|
|
- <el-select v-model="scope.row.projectList[productIndex].rescue" :disabled="scope.row.projectList[productIndex].schemeType =='1'" size="small" style="width: 80px; margin: 0 10px">
|
|
|
+ <el-select v-model="scope.row.projectList[productIndex].rescue" :disabled="scope.row.projectList?.[productIndex]?.schemeType =='1'" size="small" style="width: 80px; margin: 0 10px">
|
|
|
<el-option label="1" value="1"></el-option>
|
|
|
</el-select>
|
|
|
次
|
|
|
</el-col>
|
|
|
<el-col :span="6" class="quoteFlex">
|
|
|
检测
|
|
|
- <el-select v-model="scope.row.projectList[productIndex].detection" :disabled="scope.row.projectList[productIndex].schemeType =='1'" size="small" style="width: 80px; margin: 0 10px">
|
|
|
+ <el-select v-model="scope.row.projectList[productIndex].detection" :disabled="scope.row.projectList?.[productIndex]?.schemeType =='1'" size="small" style="width: 80px; margin: 0 10px">
|
|
|
<el-option label="1" value="1"></el-option>
|
|
|
</el-select>
|
|
|
次
|
|
|
</el-col>
|
|
|
<el-col :span="6" class="quoteFlex">
|
|
|
代驾
|
|
|
- <el-select v-model="scope.row.projectList[productIndex].driver" :disabled="scope.row.projectList[productIndex].schemeType =='1'" size="small" style="width: 80px; margin: 0 10px">
|
|
|
+ <el-select v-model="scope.row.projectList[productIndex].driver" :disabled="scope.row.projectList?.[productIndex]?.schemeType =='1'" size="small" style="width: 80px; margin: 0 10px">
|
|
|
<el-option label="1" value="1"></el-option>
|
|
|
</el-select>
|
|
|
次
|
|
|
</el-col>
|
|
|
<el-col :span="6" class="quoteFlex">
|
|
|
送检
|
|
|
- <el-select v-model="scope.row.projectList[productIndex].inspect" :disabled="scope.row.projectList[productIndex].schemeType =='1'" size="small" style="width: 80px; margin: 0 10px">
|
|
|
+ <el-select v-model="scope.row.projectList[productIndex].inspect" :disabled="scope.row.projectList?.[productIndex]?.schemeType =='1'" size="small" style="width: 80px; margin: 0 10px">
|
|
|
<el-option label="1" value="1"></el-option>
|
|
|
</el-select>
|
|
|
次
|
|
|
@@ -938,9 +939,9 @@
|
|
|
</el-row>
|
|
|
<div class="quoteTitle">驾意险</div>
|
|
|
<el-table
|
|
|
- :data="scope.row.projectList[productIndex].drivings"
|
|
|
+ :data="scope.row.projectList?.[productIndex]?.drivings"
|
|
|
>
|
|
|
- <el-table-column width="50" align="center" v-if="scope.row.projectList[productIndex].schemeType !='1'">
|
|
|
+ <el-table-column width="50" align="center" v-if="scope.row.projectList?.[productIndex]?.schemeType !='1'">
|
|
|
<template #header>
|
|
|
<el-icon @click="handleDriving(scope)"><CirclePlus /></el-icon>
|
|
|
</template>
|
|
|
@@ -955,7 +956,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="数量" align="center">
|
|
|
<template #default="props">
|
|
|
- <el-input :disabled="scope.row.projectList[productIndex].schemeType === '1'" v-model="props.row.quantity" style="width: 140px">
|
|
|
+ <el-input :disabled="scope.row.projectList?.[productIndex]?.schemeType === '1'" v-model="props.row.quantity" style="width: 140px">
|
|
|
<template #append>
|
|
|
<span>份</span>
|
|
|
</template>
|
|
|
@@ -1081,8 +1082,8 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="报价协议" prop="" align="center" width="260">
|
|
|
<template #default="scope">
|
|
|
- <el-select v-if="currentRow.some(a => a.id === scope.row.id)">
|
|
|
- <el-option v-for="item in scope.row.aggrements" :value="item.value" :label="item.label"></el-option>
|
|
|
+ <el-select v-model="scope.row.agreement" :disabled="scope.row.isDispatch" v-if="currentRow.some(a => 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>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -1140,11 +1141,77 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="费用因子" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <div class="costFactor" v-if="scope.row.quoteResult?.scoreVo">
|
|
|
+ <span>评分:</span><span>{{ scope.row.quoteResult?.scoreVo?.score || '--' }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="costFactor" v-if="scope.row.quoteResult?.scoreVo">
|
|
|
+ <span>交强险系数:</span><span>{{ scope.row.quoteResult?.scoreVo?.jqLossRation || '--' }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="costFactor" v-if="scope.row.quoteResult?.scoreVo">
|
|
|
+ <span>商业险系数:</span><span>{{ scope.row.quoteResult?.scoreVo?.syLossRation || '--' }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="costFactor" v-if="scope.row.quoteResult?.scoreVo">
|
|
|
+ <el-popover
|
|
|
+ :width="200"
|
|
|
+ placement="bottom"
|
|
|
+ trigger="hover"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ <span style="display: flex; align-items: center">更多信息:<el-icon color="#409eff"><InfoFilled /></el-icon></span>
|
|
|
+ </template>
|
|
|
+ <div class="moreFactor">
|
|
|
+ <span>NCD折扣系数:</span><span>{{ scope.row.quoteResult?.scoreVo?.syLossRation || '--' }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="moreFactor">
|
|
|
+ <span>交通违法系数:</span><span>{{ scope.row.quoteResult?.scoreVo?.syLossRation || '--' }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="moreFactor">
|
|
|
+ <span>自主定价系数:</span><span>{{ scope.row.quoteResult?.scoreVo?.syLossRation || '--' }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="moreFactor">
|
|
|
+ <span>自助渠道系数:</span><span>{{ scope.row.quoteResult?.scoreVo?.syLossRation || '--' }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="moreFactor">
|
|
|
+ <span>鼎然车险风险评分:</span><span>{{ scope.row.quoteResult?.scoreVo?.syLossRation || '--' }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="moreFactor">
|
|
|
+ <span>交强评分:</span><span>{{ scope.row.quoteResult?.scoreVo?.syLossRation || '--' }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="moreFactor">
|
|
|
+ <span>商业评分:</span><span>{{ scope.row.quoteResult?.scoreVo?.syLossRation || '--' }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="moreFactor">
|
|
|
+ <span>出险信息:</span><span>{{ scope.row.quoteResult?.scoreVo?.syLossRation || '--' }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="moreFactor">
|
|
|
+ <span>总赔付率:</span><span>{{ scope.row.quoteResult?.scoreVo?.syLossRation || '--' }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="moreFactor">
|
|
|
+ <span>商业赔付率:</span><span>{{ scope.row.quoteResult?.scoreVo?.syLossRation || '--' }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="moreFactor">
|
|
|
+ <span>总折扣率:</span><span>{{ scope.row.quoteResult?.scoreVo?.syLossRation || '--' }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="moreFactor">
|
|
|
+ <span>交强折扣:</span><span>{{ scope.row.quoteResult?.scoreVo?.syLossRation || '--' }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="moreFactor">
|
|
|
+ <span>商业折扣:</span><span>{{ scope.row.quoteResult?.scoreVo?.syLossRation || '--' }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="moreFactor">
|
|
|
+ <span>类型:</span><span>{{ scope.row.quoteResult?.scoreVo?.syLossRation || '--' }}</span>
|
|
|
+ </div>
|
|
|
+ </el-popover>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="操作" align="center" width="360">
|
|
|
<template #default="scope">
|
|
|
<div v-if="currentRow.some(a => a.id === scope.row.id)">
|
|
|
<el-button link type="primary" @click="handleCount(scope)">优惠测算</el-button>
|
|
|
- <el-button link type="primary">详情</el-button>
|
|
|
+ <el-button link type="primary" @click="toDetail(scope.row.orderNo)">详情</el-button>
|
|
|
<el-button link type="primary" :loading="scope.row.loading" @click="handleSubmit(InsurancePolicyRefs,scope)">计算保费</el-button>
|
|
|
<el-button link type="primary" @click="handleShare(scope)">分享</el-button>
|
|
|
<el-button link type="primary" @click="handleUnderwriting(scope)">核保</el-button>
|
|
|
@@ -1173,15 +1240,15 @@
|
|
|
<el-table-column label="保险公司" prop="companyName"></el-table-column>
|
|
|
<el-table-column label="报价时间" prop="quoteTime"></el-table-column>
|
|
|
<el-table-column label="险种" prop="productName"></el-table-column>
|
|
|
- <el-table-column label="状态" prop="state">
|
|
|
+ <el-table-column label="状态" prop="orderStatusName">
|
|
|
<template #default="scope">
|
|
|
- <span v-if="scope.row.state===1" class="success">报价成功</span>
|
|
|
- <span v-if="scope.row.state===2" style="display: flex; align-items: center">
|
|
|
- <span class="fail">报价失败</span>
|
|
|
+ <span v-if="scope.row.orderStatusName=='报价成功'" class="success">报价成功</span>
|
|
|
+ <span v-if="scope.row.orderStatus=='6'" style="display: flex; align-items: center">
|
|
|
+ <span class="fail">{{ scope.row.orderStatusName }}</span>
|
|
|
<el-tooltip
|
|
|
class="box-item"
|
|
|
effect="dark"
|
|
|
- content="报价失败的原因"
|
|
|
+ :content="scope.row.errorMessage"
|
|
|
placement="bottom"
|
|
|
>
|
|
|
<el-icon style="color: #FF4545; font-size: 18px"><Warning /></el-icon>
|
|
|
@@ -1190,14 +1257,34 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="保费计算" prop="sumPremium"></el-table-column>
|
|
|
- <el-table-column label="交强险" prop=""></el-table-column>
|
|
|
- <el-table-column label="商业险" prop=""></el-table-column>
|
|
|
- <el-table-column label="驾意险" prop=""></el-table-column>
|
|
|
+ <el-table-column label="交强险" prop="jqPremium"></el-table-column>
|
|
|
+ <el-table-column label="商业险" prop="syPremium"></el-table-column>
|
|
|
+ <el-table-column label="驾意险" prop="jyPremium"></el-table-column>
|
|
|
<el-table-column label="操作">
|
|
|
<template #default="scope">
|
|
|
- <el-button link type="primary">详情</el-button>
|
|
|
- <el-button link type="primary">分享</el-button>
|
|
|
- <el-button link type="primary">核保</el-button>
|
|
|
+ <el-button link type="primary" @click="toDetail(scope.row.orderNo)">详情</el-button>
|
|
|
+ <el-popover
|
|
|
+ v-if="scope.row.orderStatus === '5'"
|
|
|
+ :width="200"
|
|
|
+ placement="bottom"
|
|
|
+ trigger="click"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ <el-button size="small" type="primary" link @click="handleCode(scope.row.orderNo)">分享</el-button>
|
|
|
+ </template>
|
|
|
+ <div class="popover">
|
|
|
+ <img style="display: block; width: 128px; height: 128px; margin: 5px auto;" :src="payCodeUrl">
|
|
|
+ <p>使用微信扫码,查看报价单</p>
|
|
|
+ <div class="popoverBtns">
|
|
|
+ <el-button size="small" type="primary" plain @click="handlePopoverCancel">保存二维码</el-button>
|
|
|
+ <el-button size="small" type="primary" plain @click="handlePopoverConfirm">复制链接</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-popover>
|
|
|
+ <el-button link type="primary" v-if="scope.row.orderStatus === '1'" @click="handleUnderwriting(scope)">核保</el-button>
|
|
|
+ <el-button link type="primary" v-if="scope.row.orderStatus === '4'" @click="getPayCode(scope.row.orderNo)">支付码</el-button>
|
|
|
+<!-- <el-button link type="primary" v-if="scope.row.orderStatus === '1'" @click="handleImageSave(scope)">上传影像</el-button>-->
|
|
|
+ <el-button link type="primary" v-if="scope.row.orderStatus === '7'" @click="handleUnderwriting(scope)">重新核保</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -1330,7 +1417,7 @@
|
|
|
import type { FormInstance, FormRules } from 'element-plus'
|
|
|
import api from "@/api";
|
|
|
import { ElMessage } from "element-plus";
|
|
|
-import { useRoute } from 'vue-router'
|
|
|
+import { useRoute, useRouter } from 'vue-router'
|
|
|
import underwriting from './modules/underwriting.vue'
|
|
|
import recognition from './modules/recognition.vue'
|
|
|
import calculating from './modules/calculating.vue'
|
|
|
@@ -1338,6 +1425,9 @@ 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 QRCode from 'qrcode'
|
|
|
+import QrcodeVue from 'qrcode.vue';
|
|
|
+
|
|
|
|
|
|
const SalesmanSelectRef = ref()
|
|
|
const InsuranceTypeRef = ref()
|
|
|
@@ -1347,6 +1437,7 @@ const LicenseNoTable = ref()
|
|
|
const JYXDetail = ref()
|
|
|
|
|
|
const myRoute = useRoute()
|
|
|
+const router = useRouter()
|
|
|
|
|
|
const initDetail = () => {
|
|
|
api.insurancePolicyApi.getOrderDetail(myRoute.query.orderNo).then((res: any) => {
|
|
|
@@ -1903,7 +1994,9 @@ const getQuoteNumber = () => {
|
|
|
}
|
|
|
if(insurancePolicyForm.value.licenseNo) {
|
|
|
api.insurancePolicyApi.getHistoryQuoteList({
|
|
|
- licenseNo: insurancePolicyForm.value.licenseNo
|
|
|
+ licenseNo: insurancePolicyForm.value.licenseNo,
|
|
|
+ pages: 1,
|
|
|
+ size: 999
|
|
|
}).then((res: any) => {
|
|
|
if(res.code === 200) {
|
|
|
tableData.value = res.data.records
|
|
|
@@ -2274,7 +2367,15 @@ const handelSelectRow = (a, b) => {
|
|
|
}
|
|
|
quoteData.value.forEach(item => {
|
|
|
if(item.id === b.id) {
|
|
|
- item.projectList = res.data.schemes
|
|
|
+ item.projectList = res.data.schemes.map(item => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ rescue: [],
|
|
|
+ detection: [],
|
|
|
+ driver: [],
|
|
|
+ inspect: []
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
@@ -2283,6 +2384,34 @@ const handelSelectRow = (a, b) => {
|
|
|
insurancePolicyForm.value.order.insuranceCompanyCode = ''
|
|
|
}
|
|
|
}
|
|
|
+const handelExpend = (e) => {
|
|
|
+ insurancePolicyForm.value.order.insuranceCompanyCode = e.id
|
|
|
+ if(insurancePolicyForm.value.productId) {
|
|
|
+ api.insurancePolicyApi.getSchemeResult({
|
|
|
+ companyId: e.id,
|
|
|
+ productId: insurancePolicyForm.value.productId
|
|
|
+ }).then((res: any) => {
|
|
|
+ if(res.data?.schemes) {
|
|
|
+ res.data?.schemes.forEach(item => {
|
|
|
+ item.checked = false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ quoteData.value.forEach(item => {
|
|
|
+ if(item.id === e .id) {
|
|
|
+ item.projectList = res.data.schemes.map(item => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ rescue: [],
|
|
|
+ detection: [],
|
|
|
+ driver: [],
|
|
|
+ inspect: []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
const handleClickRow = (a, b) => {
|
|
|
|
|
|
}
|
|
|
@@ -2426,6 +2555,107 @@ const handleCount = (scope) => {
|
|
|
calculatingShow.value = true
|
|
|
}
|
|
|
|
|
|
+// 详情
|
|
|
+const toDetail = (orderNo: any) => {
|
|
|
+ router.push({
|
|
|
+ path: '/insurancePolicy/order/insurancePolicyOrderDetail',
|
|
|
+ query: {
|
|
|
+ orderNo: orderNo
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+// 上传影像
|
|
|
+const handleImageSave = (scope) => {
|
|
|
+ let list = images.value.filter(a => a.checked)
|
|
|
+ if(list.length > 0) {
|
|
|
+ let arr = list.map(a => {
|
|
|
+ return {
|
|
|
+ imageCode: a.imageType,
|
|
|
+ imageBase64List: [
|
|
|
+ {
|
|
|
+ imageId: a.imageId
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ api.insurancePolicyApi.imageSave({
|
|
|
+ order: {
|
|
|
+ quoteNo: insurancePolicyForm.value.order.quoteNo
|
|
|
+ },
|
|
|
+ imageVoList: arr
|
|
|
+ }).then((res: any) => {
|
|
|
+ if(res.code == 200) {
|
|
|
+ ElMessage({
|
|
|
+ message: '上传成功!',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ ElMessage({
|
|
|
+ message: '请选择影像资料!',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+//支付码
|
|
|
+const getPayCode = (orderNo) => {
|
|
|
+ api.insurancePolicyApi.getQrCode(orderNo).then((res: any) => {
|
|
|
+ if(res.code == 200) {
|
|
|
+ payCodeUrl.value = res.data?.qrcode
|
|
|
+ } else {
|
|
|
+ payCodeUrl.value = ''
|
|
|
+ ElMessage({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+//分享
|
|
|
+let qrImageUrl = ref('')
|
|
|
+let payCodeUrl = ref('')
|
|
|
+const handleCode = async (orderNo) => {
|
|
|
+ api.insurancePolicyApi.getQrCode(orderNo).then((res: any) => {
|
|
|
+ if(res.code == 200) {
|
|
|
+ payCodeUrl.value = res.data?.qrcode
|
|
|
+ qrImageUrl.value = QRCode.toDataURL(payCodeUrl.value, {
|
|
|
+ width: 150,
|
|
|
+ margin: 2
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ payCodeUrl.value = ''
|
|
|
+ ElMessage({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+const handlePopoverCancel = async () => {
|
|
|
+ const link = document.createElement('a');
|
|
|
+ link.href = qrImageUrl.value;
|
|
|
+ link.download = 'qrcode.png';
|
|
|
+ link.click();
|
|
|
+}
|
|
|
+const handlePopoverConfirm = async () => {
|
|
|
+ try {
|
|
|
+ await navigator.clipboard.writeText('你想要复制的文本');
|
|
|
+ ElMessage({
|
|
|
+ message: '复制成功!',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ } catch (err) {
|
|
|
+ ElMessage({
|
|
|
+ message: '复制失败!',
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
// 提交核保
|
|
|
let underwritingShow = ref(false)
|
|
|
const handleUnderwriting = (scope) => {
|
|
|
@@ -2434,31 +2664,31 @@ const handleUnderwriting = (scope) => {
|
|
|
let data = {
|
|
|
|
|
|
// ordersNo: '1915570359429222400'
|
|
|
- ordersNo: scope.row.quoteResult.ordersNo,
|
|
|
- quoteNo: insurancePolicyForm.value.order.quoteNo
|
|
|
+ ordersNo: scope.row.orderNo,
|
|
|
+ quoteNo: insurancePolicyForm.value.order.quoteNo,
|
|
|
+ list: insurancePolicyForm.value.imageVoList
|
|
|
}
|
|
|
nextTick(() => {
|
|
|
UnderwritingRefs.value.initEdit({
|
|
|
- ...data,
|
|
|
- list: images.value
|
|
|
- })
|
|
|
- })
|
|
|
- api.insurancePolicyApi.imagesUpload({
|
|
|
- order: {
|
|
|
- ...data
|
|
|
- }
|
|
|
- }).then((res: any) => {
|
|
|
- if(res.code === 200) {
|
|
|
- nextTick(() => {
|
|
|
- UnderwritingRefs.value.initEdit(data)
|
|
|
- })
|
|
|
- } else {
|
|
|
- ElMessage({
|
|
|
- message: res.msg,
|
|
|
- type: 'warning'
|
|
|
+ ...data
|
|
|
})
|
|
|
- }
|
|
|
})
|
|
|
+ // api.insurancePolicyApi.imagesUpload({
|
|
|
+ // order: {
|
|
|
+ // ...data
|
|
|
+ // }
|
|
|
+ // }).then((res: any) => {
|
|
|
+ // if(res.code === 200) {
|
|
|
+ // nextTick(() => {
|
|
|
+ // UnderwritingRefs.value.initEdit(data)
|
|
|
+ // })
|
|
|
+ // } else {
|
|
|
+ // ElMessage({
|
|
|
+ // message: res.msg,
|
|
|
+ // type: 'warning'
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
}
|
|
|
const handleUnderwritingClose = () => {
|
|
|
underwritingShow.value = false
|
|
|
@@ -2753,81 +2983,142 @@ const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined, scope
|
|
|
accidentalDrivings: [...brr],
|
|
|
specialInfoVo: [...crr]
|
|
|
}
|
|
|
- api.insurancePolicyApi.imageSave({
|
|
|
- order: {
|
|
|
- quoteNo: insurancePolicyForm.value.order.quoteNo
|
|
|
- },
|
|
|
- imageVoList: insurancePolicyForm.value.imageVoList
|
|
|
- }).then((res: any) => {
|
|
|
- if(res.code == 200) {
|
|
|
- api.insurancePolicyApi.quote(data).then((res: any) => {
|
|
|
+ api.insurancePolicyApi.quote(data).then((res: any) => {
|
|
|
if(res.code == 200) {
|
|
|
- ElMessage({
|
|
|
- message: res.msg,
|
|
|
- type: 'success'
|
|
|
- })
|
|
|
- if(res.data) {
|
|
|
- let a = res.data.ciPremium?res.data.ciPremium:0
|
|
|
- let b = res.data.vvTax?res.data.vvTax:0
|
|
|
- let c = res.data.biPremium?res.data.biPremium:0
|
|
|
- let d = res.data.niPremium?res.data.niPremium:0
|
|
|
- res.data.quoteTotal = Number(a) + Number(b) + Number(c) + Number(d)
|
|
|
- }
|
|
|
- quoteData.value[scope.$index].discounts = [
|
|
|
- {
|
|
|
- name: '交强',
|
|
|
- additionalPremium: res.data?.feeOrders?.jqAdditionalPremium,
|
|
|
- additionalRatio: res.data?.feeOrders?.jqAdditionalRatio,
|
|
|
- commissionPremium: res.data?.feeOrders?.jqCommissionPremium,
|
|
|
- commissionRatio: res.data?.feeOrders?.jqCommissionRatio,
|
|
|
- exportPremium: res.data?.feeOrders?.jqExportPremium,
|
|
|
- exportRatio: res.data?.feeOrders?.jqExportRatio,
|
|
|
- },{
|
|
|
- name: '商业',
|
|
|
- additionalPremium: res.data?.feeOrders?.syAdditionalPremium,
|
|
|
- additionalRatio: res.data?.feeOrders?.syAdditionalRatio,
|
|
|
- commissionPremium: res.data?.feeOrders?.syCommissionPremium,
|
|
|
- commissionRatio: res.data?.feeOrders?.syCommissionRatio,
|
|
|
- exportPremium: res.data?.feeOrders?.syExportPremium,
|
|
|
- exportRatio: res.data?.feeOrders?.syExportRatio,
|
|
|
- },{
|
|
|
- name: '驾意险',
|
|
|
- additionalPremium: res.data?.feeOrders?.jyAdditionalPremium,
|
|
|
- additionalRatio: res.data?.feeOrders?.jyAdditionalRatio,
|
|
|
- commissionPremium: res.data?.feeOrders?.jyCommissionPremium,
|
|
|
- commissionRatio: res.data?.feeOrders?.jyCommissionRatio,
|
|
|
- exportPremium: res.data?.feeOrders?.jyExportPremium,
|
|
|
- exportRatio: res.data?.feeOrders?.jyExportRatio,
|
|
|
- },
|
|
|
- ]
|
|
|
- quoteData.value[scope.$index].quoteResult = res.data
|
|
|
- loading.value = false
|
|
|
- quoteData.value[scope.$index].loading = false
|
|
|
+ ElMessage({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ if(res.data) {
|
|
|
+ let a = res.data.ciPremium?res.data.ciPremium:0
|
|
|
+ let b = res.data.vvTax?res.data.vvTax:0
|
|
|
+ let c = res.data.biPremium?res.data.biPremium:0
|
|
|
+ let d = res.data.niPremium?res.data.niPremium:0
|
|
|
+ res.data.quoteTotal = Number(a) + Number(b) + Number(c) + Number(d)
|
|
|
+ }
|
|
|
+ quoteData.value[scope.$index].discounts = [
|
|
|
+ {
|
|
|
+ name: '交强',
|
|
|
+ additionalPremium: res.data?.feeOrders?.jqAdditionalPremium,
|
|
|
+ additionalRatio: res.data?.feeOrders?.jqAdditionalRatio,
|
|
|
+ commissionPremium: res.data?.feeOrders?.jqCommissionPremium,
|
|
|
+ commissionRatio: res.data?.feeOrders?.jqCommissionRatio,
|
|
|
+ exportPremium: res.data?.feeOrders?.jqExportPremium,
|
|
|
+ exportRatio: res.data?.feeOrders?.jqExportRatio,
|
|
|
+ },{
|
|
|
+ name: '商业',
|
|
|
+ additionalPremium: res.data?.feeOrders?.syAdditionalPremium,
|
|
|
+ additionalRatio: res.data?.feeOrders?.syAdditionalRatio,
|
|
|
+ commissionPremium: res.data?.feeOrders?.syCommissionPremium,
|
|
|
+ commissionRatio: res.data?.feeOrders?.syCommissionRatio,
|
|
|
+ exportPremium: res.data?.feeOrders?.syExportPremium,
|
|
|
+ exportRatio: res.data?.feeOrders?.syExportRatio,
|
|
|
+ },{
|
|
|
+ name: '驾意险',
|
|
|
+ additionalPremium: res.data?.feeOrders?.jyAdditionalPremium,
|
|
|
+ additionalRatio: res.data?.feeOrders?.jyAdditionalRatio,
|
|
|
+ commissionPremium: res.data?.feeOrders?.jyCommissionPremium,
|
|
|
+ commissionRatio: res.data?.feeOrders?.jyCommissionRatio,
|
|
|
+ exportPremium: res.data?.feeOrders?.jyExportPremium,
|
|
|
+ exportRatio: res.data?.feeOrders?.jyExportRatio,
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ quoteData.value[scope.$index].quoteResult = res.data
|
|
|
+ loading.value = false
|
|
|
+ quoteData.value[scope.$index].loading = false
|
|
|
console.log('报价后的数据', quoteData.value)
|
|
|
} else {
|
|
|
- ElMessage({
|
|
|
- message: res.msg,
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- quoteData.value[scope.$index].quoteResult.failMsg = res.msg
|
|
|
- loading.value = false
|
|
|
- quoteData.value[scope.$index].loading = false
|
|
|
+ ElMessage({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ quoteData.value[scope.$index].quoteResult.failMsg = res.msg
|
|
|
+ loading.value = false
|
|
|
+ quoteData.value[scope.$index].loading = false
|
|
|
}
|
|
|
// InsurancePolicyRefs.resetFields()
|
|
|
- }).catch(e => {
|
|
|
+ }).catch(e => {
|
|
|
loading.value = false
|
|
|
quoteData.value[scope.$index].loading = false
|
|
|
quoteData.value.forEach(a => {
|
|
|
- a.loading = false
|
|
|
+ a.loading = false
|
|
|
})
|
|
|
- })
|
|
|
- } else {
|
|
|
- ElMessage({
|
|
|
- message: res.msg,
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
+ // api.insurancePolicyApi.imageSave({
|
|
|
+ // order: {
|
|
|
+ // quoteNo: insurancePolicyForm.value.order.quoteNo
|
|
|
+ // },
|
|
|
+ // imageVoList: insurancePolicyForm.value.imageVoList
|
|
|
+ // }).then((res: any) => {
|
|
|
+ // if(res.code == 200) {
|
|
|
+ // api.insurancePolicyApi.quote(data).then((res: any) => {
|
|
|
+ // if(res.code == 200) {
|
|
|
+ // ElMessage({
|
|
|
+ // message: res.msg,
|
|
|
+ // type: 'success'
|
|
|
+ // })
|
|
|
+ // if(res.data) {
|
|
|
+ // let a = res.data.ciPremium?res.data.ciPremium:0
|
|
|
+ // let b = res.data.vvTax?res.data.vvTax:0
|
|
|
+ // let c = res.data.biPremium?res.data.biPremium:0
|
|
|
+ // let d = res.data.niPremium?res.data.niPremium:0
|
|
|
+ // res.data.quoteTotal = Number(a) + Number(b) + Number(c) + Number(d)
|
|
|
+ // }
|
|
|
+ // quoteData.value[scope.$index].discounts = [
|
|
|
+ // {
|
|
|
+ // name: '交强',
|
|
|
+ // additionalPremium: res.data?.feeOrders?.jqAdditionalPremium,
|
|
|
+ // additionalRatio: res.data?.feeOrders?.jqAdditionalRatio,
|
|
|
+ // commissionPremium: res.data?.feeOrders?.jqCommissionPremium,
|
|
|
+ // commissionRatio: res.data?.feeOrders?.jqCommissionRatio,
|
|
|
+ // exportPremium: res.data?.feeOrders?.jqExportPremium,
|
|
|
+ // exportRatio: res.data?.feeOrders?.jqExportRatio,
|
|
|
+ // },{
|
|
|
+ // name: '商业',
|
|
|
+ // additionalPremium: res.data?.feeOrders?.syAdditionalPremium,
|
|
|
+ // additionalRatio: res.data?.feeOrders?.syAdditionalRatio,
|
|
|
+ // commissionPremium: res.data?.feeOrders?.syCommissionPremium,
|
|
|
+ // commissionRatio: res.data?.feeOrders?.syCommissionRatio,
|
|
|
+ // exportPremium: res.data?.feeOrders?.syExportPremium,
|
|
|
+ // exportRatio: res.data?.feeOrders?.syExportRatio,
|
|
|
+ // },{
|
|
|
+ // name: '驾意险',
|
|
|
+ // additionalPremium: res.data?.feeOrders?.jyAdditionalPremium,
|
|
|
+ // additionalRatio: res.data?.feeOrders?.jyAdditionalRatio,
|
|
|
+ // commissionPremium: res.data?.feeOrders?.jyCommissionPremium,
|
|
|
+ // commissionRatio: res.data?.feeOrders?.jyCommissionRatio,
|
|
|
+ // exportPremium: res.data?.feeOrders?.jyExportPremium,
|
|
|
+ // exportRatio: res.data?.feeOrders?.jyExportRatio,
|
|
|
+ // },
|
|
|
+ // ]
|
|
|
+ // quoteData.value[scope.$index].quoteResult = res.data
|
|
|
+ // loading.value = false
|
|
|
+ // quoteData.value[scope.$index].loading = false
|
|
|
+ // console.log('报价后的数据', quoteData.value)
|
|
|
+ // } else {
|
|
|
+ // ElMessage({
|
|
|
+ // message: res.msg,
|
|
|
+ // type: 'warning'
|
|
|
+ // })
|
|
|
+ // quoteData.value[scope.$index].quoteResult.failMsg = res.msg
|
|
|
+ // loading.value = false
|
|
|
+ // quoteData.value[scope.$index].loading = false
|
|
|
+ // }
|
|
|
+ // // InsurancePolicyRefs.resetFields()
|
|
|
+ // }).catch(e => {
|
|
|
+ // loading.value = false
|
|
|
+ // quoteData.value[scope.$index].loading = false
|
|
|
+ // quoteData.value.forEach(a => {
|
|
|
+ // a.loading = false
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ // } else {
|
|
|
+ // ElMessage({
|
|
|
+ // message: res.msg,
|
|
|
+ // type: 'warning'
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
} else {
|
|
|
ElMessage({
|
|
|
message: '请完整填写相关信息',
|
|
|
@@ -3063,6 +3354,12 @@ onMounted(() => {
|
|
|
margin-left: 10px;
|
|
|
}
|
|
|
}
|
|
|
+ .costFactor{
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: flex-start;
|
|
|
+ }
|
|
|
.quoteFail{
|
|
|
display: flex;
|
|
|
align-items: center;
|