| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318 |
- <template>
- <view class="page">
- <!-- 头部吸顶区域 -->
- <u-sticky zIndex="999" customNavHeight="0">
- <uni-NavBar headerTitle="计算保费" background="#fff" :isSlot="false" :rightSlot="true">
- <template #rightSlot>
- <view class="dis f-c a-c mr-3" @click="getWechatCustomer">
- <image src="/static/icon/customerService.png" mode="" style="width: 48rpx;height: 48rpx;">
- </image>
- <text style="font-size: 20rpx;color: #333;">客服</text>
- </view>
- <view class="dis f-c a-c " @click="home">
- <image src="/static/icon/home.png" mode="" style="width: 48rpx;height: 48rpx;"></image>
- <text style="font-size: 20rpx;color: #333;">首页</text>
- </view>
- </template>
- </uni-NavBar>
- <!-- 修改信息提示 -->
- <view class="hint dis a-start j-s">
- <text>{{carInfo.licenseNo}}的被保人为:{{insuredPersonInfo.name}}</text>
- <view class="rightBtn dis a-c j-c " @click="toCarInfo">点击修改</view>
- </view>
- </u-sticky>
- <!-- 报价区域 -->
- <view class="quoteArea">
- <!-- 投保配置信息 -->
- <view class="insuranceConfig">
- <u--form labelPosition="left" ref="ownerForm" labelWidth="100" errorType="message">
- <u-form-item label="即时起保" borderBottom>
- <u-radio-group placement="row" v-model="immediateCoverage" @change="immediateCoverageChange">
- <u-radio v-for="(item, index) in immediateCoverageList" :key="index" :label="item.label"
- :name="item.value" activeColor="#FDE935" iconColor='#333' labelColor="#333"
- style="margin-left: 10px">
- </u-radio>
- </u-radio-group>
- </u-form-item>
- <u-form-item label="交强起保日期" borderBottom @click="jqstartShow = true"
- v-if="['0330','0330034002','0330034001'].includes(productId)">
- <u--input v-model="jqstartDate" disabled disabledColor="#ffffff" clearable
- suffixIconStyle="color:#333;font-size:40rpx" placeholder="请选择起保日期"
- placeholderStyle="text-align:right;" border="none" style="pointer-events: none">
- </u--input>
- <image src="/static/icon/quote/dateIcon.png"
- style="width: 30rpx;height: 30rpx;margin-left: 10rpx;" mode="">
- </image>
- </u-form-item>
- <u-form-item label="商业起保日期" borderBottom @click="systartShow = true"
- v-if="['034001','034002','0330034002','0330034001'].includes(productId)">
- <u--input v-model="systartDate" disabled disabledColor="#ffffff" clearable
- suffixIconStyle="color:#333;font-size:40rpx" placeholder="请选择起保日期"
- placeholderStyle="text-align:right;" border="none" style="pointer-events: none">
- </u--input>
- <image src="/static/icon/quote/dateIcon.png"
- style="width: 30rpx;height: 30rpx;margin-left: 10rpx;" mode="">
- </image>
- </u-form-item>
- <u-form-item label="报价车型" borderBottom @click="brandModelPopup=true">
- <u--text :lines="1" bold :text="carInfo.brandName"></u--text>
- <u-icon class="ml-1" name="arrow-right" color="#333" size="11"></u-icon>
- </u-form-item>
- <u-form-item label="是否过户车" borderBottom>
- <u-radio-group placement="row" v-model="transferScene"
- @change="val=>transferChange(val,'transfer')">
- <u-radio v-for="(item, index) in transferList" :key="index" :label="item.label"
- :name="item.value" activeColor="#FDE935" iconColor='#333' labelColor="#333"
- style="margin-left: 10px">
- </u-radio>
- </u-radio-group>
- </u-form-item>
- <u-form-item label="是否商业过户" borderBottom>
- <u-radio-group placement="row" v-model="biTransferScene"
- @change="val=>transferChange(val,'biTransfer')">
- <u-radio v-for="(item, index) in biTransferList" :key="index" :label="item.label"
- :name="item.value" activeColor="#FDE935" iconColor='#333' labelColor="#333"
- style="margin-left: 10px">
- </u-radio>
- </u-radio-group>
- </u-form-item>
- <u-form-item label="是否二手车" :borderBottom="carInfo.transfer?true:false">
- <u-radio-group placement="row" v-model="secondHandCarScene"
- @change="val=>transferChange(val,'secondHandCar')">
- <u-radio v-for="(item, index) in secondHandCarList" :key="index" :label="item.label"
- :name="item.value" activeColor="#FDE935" iconColor='#333' labelColor="#333"
- style="margin-left: 10px">
- </u-radio>
- </u-radio-group>
- </u-form-item>
- <u-form-item label="转移登记日期" v-if="carInfo.transfer==true">
- <u--input v-model="carInfo.transferDate" disabled disabledColor="#ffffff" clearable
- suffixIconStyle="color:#333;font-size:40rpx" placeholder="请选择起保日期"
- placeholderStyle="text-align:right;" border="none" style="pointer-events: none">
- </u--input>
- <image src="/static/icon/quote/dateIcon.png"
- style="width: 30rpx;height: 30rpx;margin-left: 10rpx;" mode="">
- </image>
- </u-form-item>
- </u--form>
- </view>
- <view class="quoteCompany mt-2">
- <view class="quoteCompanyItem dis f-c mb-2" v-for="(companyItem,compamyIndex) in quotableCompanyList"
- :key="compamyIndex" @click="dorderDetails(companyItem.result.ordersNo)">
- <view class="dis a-c j-s ">
- <!-- 左侧信息 -->
- <view class="dis a-c">
- <!-- 保险公司logo -->
- <image class="companyIcon mr-2" :src="companyItem.logo" mode=""></image>
- <view class="dis f-c ">
- <!-- 保险公司名称 -->
- <text class="companyName">{{companyItem.nameSimple}}</text>
- <!-- 选择方案 -->
- <view class="dis a-c">
- <view class="solution dis a-c" v-if="!companyItem.insurancePlanInfo"
- @click.stop="SchemeSelection(companyItem)">
- <text>选择方案</text>
- <u-icon name="arrow-right" color="#333" size="11"></u-icon>
- </view>
- <view class="solution dis a-c" @click.stop="checkSelection(compamyIndex)"
- v-if="companyItem.insurancePlanInfo">
- <text>查看方案</text>
- <u-icon name="arrow-right" color="#333" size="11"></u-icon>
- </view>
- <view class="solution dis a-c ml-2" @click.stop="SchemeSelection(companyItem)"
- v-if="companyItem.insurancePlanInfo">
- <text>重选</text>
- <u-icon name="arrow-right" color="#333" size="11"></u-icon>
- </view>
- </view>
- </view>
- </view>
- <!-- 右侧价格信息 -->
- <view class="sum-price dis f-c a-end" v-if="companyItem.quoteCode=='200'">
- <view class="totalPrice mb-1">
- <text>¥</text>
- <text>{{companyItem.result.costs.sumPremium}}</text>
- </view>
- <text class="discountedPrice">优惠 521.87</text>
- </view>
- <!-- 右侧loading加载组件 -->
- <lsLoading v-if="companyItem.quoteCode=='1'"></lsLoading>
- <!-- 右侧报价按钮 -->
- <view class="quoteBtn dis a-c j-c"
- v-if="companyItem.quoteCode=='0' || companyItem.quoteCode=='3'"
- @click.stop="individualQuote(companyItem)">
- 立即报价
- </view>
- </view>
- <!-- 报价失败原因 -->
- <view class="quoteFailureReason dis a-end " v-if="companyItem.quoteCode=='3'">
- <view class="iconText dis a-c ">
- <u-icon name="error-circle-fill" color="#F74141" size="16"></u-icon>
- <text>报价失败</text>
- </view>
- <u--text :lines="3" size="14" color="#666" style="text-indent: 160rpx;"
- :text="companyItem.msg ||'程序异常,请联系管理员'"></u--text>
- <view class="viewReason dis a-c j-end" @click.stop="quoteFailedReason(compamyIndex)">查看</view>
- </view>
- </view>
- </view>
- </view>
- <!-- 底部操作栏 -->
- <view class="footer dis a-c ">
- <view class="btn dis f-c a-c" @click="back">
- <image src="/static/icon/quote/back.png" mode=""></image>
- <text>上一步</text>
- </view>
- <view class="btn dis f-c a-c" @click="findOptimal">
- <image src="/static/icon/quote/optimal.png" mode=""></image>
- <text>查最优</text>
- </view>
- <view class="btn dis f-c a-c">
- <image src="/static/icon/quote/temporaryStorage.png" mode=""></image>
- <text>暂存</text>
- </view>
- <!-- 多家报价 -->
- <view class="batchQuotes dis a-c j-c" @click="multipleQuotes">
- <text>多家报价</text>
- <text class="sum" v-if="selectedInsurerCount>0">(已选{{selectedInsurerCount}}家)</text>
- </view>
- </view>
- <!-- 查看方案弹窗 -->
- <uni-Popup v-if="currentCompanyInfo" :show="checkSelectionPopup" @close="checkSelectionPopup=false"
- :closeable="false" headerTitle="厂牌型号" :headerSlot="true" overflow="auto" :headerStyle="{fontSize:'36rpx'}"
- maxHeight="1160rpx" mode="bottom" class="checkSelectionPopupClass">
- <template #header>
- <view class="dis a-c j-c">
- <image class="company-icon" :src="currentCompanyInfo.logo" mode=""></image>
- <text class="companyName">{{currentCompanyInfo.nameSimple}}</text>
- </view>
- </template>
- <template #content>
- <view class="checkSelectionPopup-body" v-if="currentCompanyInfo.insurancePlanInfo">
- <!-- 滚动区域 -->
- <view class="yellow-content">
- <!-- 交强险内容 -->
- <view class="content-item dis ">
- <!-- 标题 -->
- <view class="title dis j-c a-c ">
- <text>交强险/车船税</text>
- </view>
- <view class="right">
- <view class="riskView dis a-c j-s">
- <text>交强险</text>
- <text>投保</text>
- </view>
- <view class="riskView dis a-c j-s">
- <text>车船税</text>
- <text v-if="vehicleAndVesselTaxVo.taxRelifFlag=='1'">正常缴税</text>
- <view v-else class="dis a-c loadMore"
- @click="vehicleTaxIsExpanded=!vehicleTaxIsExpanded">
- <text>{{vehicleTaxIsExpanded?'收起':'展开'}}</text>
- <text>{{vehicleAndVesselTaxModel.taxRelifFlag}}信息</text>
- <u-icon :name="vehicleTaxIsExpanded?'arrow-up':'arrow-down'" class="ml-1 mr-1"
- color="#333" size="12"></u-icon>
- </view>
- </view>
- <view class="vehicleTaxInfo" v-if="vehicleTaxIsExpanded">
- <view class="item dis a-c j-s "
- v-if="vehicleAndVesselTaxVo.taxRelifFlag == 2 || vehicleAndVesselTaxVo.taxRelifFlag == 3">
- <text>减免税凭证号</text>
- <text>{{vehicleAndVesselTaxVo.extendChar2}}</text>
- </view>
- <view class="item dis a-c j-s" v-if="vehicleAndVesselTaxVo.taxRelifFlag == 4">
- <text>完税凭证号</text>
- <text>{{vehicleAndVesselTaxVo.paidFreeCertificate}}</text>
- </view>
- <view class="item dis a-c j-s "
- v-if="vehicleAndVesselTaxVo.taxRelifFlag == 2 || vehicleAndVesselTaxVo.taxRelifFlag == 3">
- <text>减免税原因</text>
- <text>{{vehicleAndVesselTaxModel.relifReason}}</text>
- </view>
- <view class="item dis a-c j-s " v-if="vehicleAndVesselTaxVo.taxRelifFlag == 3">
- <text>减税比例</text>
- <text>{{vehicleAndVesselTaxVo.taxRelief}}</text>
- </view>
- <view class="item dis a-c j-s " v-if="vehicleAndVesselTaxVo.taxRelifFlag !=1">
- <text>税务机关代码</text>
- <text>{{vehicleAndVesselTaxVo.taxComCode}}</text>
- </view>
- <view class="item dis a-c j-s " v-if="vehicleAndVesselTaxVo.taxRelifFlag !=1">
- <text>税务机关名称</text>
- <text>{{vehicleAndVesselTaxVo.taxComName}}</text>
- </view>
- <view class="item dis a-c j-s " v-if="vehicleAndVesselTaxVo.taxRelifFlag ==4">
- <text>完税凭证填发日期</text>
- <text>{{vehicleAndVesselTaxVo.taxDocumentDate}}</text>
- </view>
- <view class="item dis a-c j-s " v-if="vehicleAndVesselTaxVo.taxRelifFlag ==4">
- <text>完税凭证地区</text>
- <text>{{vehicleAndVesselTaxModel.taxPaidAreaCode}}</text>
- </view>
- </view>
- </view>
- </view>
- <!-- 商业险内容 -->
- <view class="content-item dis " style="border-color: #E3D5FF;"
- v-if="currentCompanyInfo.insurancePlanInfo.kinds.length">
- <!-- 标题 -->
- <view class="title dis j-c a-c " style="background-color:#F9F6FF;border-color:#F0E9FF;">
- <text>商业险</text>
- </view>
- <view class="right">
- <view class="riskView dis a-c j-s"
- v-for="(kindsItem,kindsIndex) in currentCompanyInfo.insurancePlanInfo.kinds"
- :key="kindsIndex">
- <text>{{kindsItem.kindName}}</text>
- <text v-if="['A','SY_WBDWGZ'].includes(kindsItem.kindCode)">投保</text>
- <text v-else-if="['D4', 'SY_FJ_YBW2'].includes(kindsItem.kindCode)"
- class="td">{{convertedValue(kindsItem.unitAmount)}}</text>
- <text v-else-if="['MJ1', 'MJ2', 'MJ3', 'MJ4'].includes(kindsItem.kindCode)"
- class="td">{{kindsItem.deductibleRate}}%</text>
- <text v-else-if="['TY1', 'TY2', 'TY3', 'TY4'].includes(kindsItem.kindCode)"
- class="td">{{kindsItem.serviceTimes}}次</text>
- <text v-else class="td">{{convertedValue(kindsItem.amount)}}</text>
- </view>
- </view>
- </view>
- <!-- 驾意险内容 -->
- <view class="content-item dis " style="border-color: #FFE1A4;"
- v-if="currentCompanyInfo.insurancePlanInfo.drivings.length">
- <!-- 标题 -->
- <view class="title dis j-c a-c " style="background-color:#FFFEF0;border-color:#FFF1D5;">
- <text>意外险</text>
- </view>
- <view class="right">
- <view class="riskView dis a-c j-s"
- v-for="(drivingsItem,drivingsIndex) in currentCompanyInfo.insurancePlanInfo.drivings"
- :key="drivingsIndex">
- <text style="width: 80%;">{{drivingsItem.productName}}</text>
- <text>x{{drivingsItem.quantity}}份</text>
- </view>
- </view>
- </view>
- </view>
- <view class="footer-btn dis a-c j-s">
- <view class="btn btns dis a-c j-c" @click="updateScheme">
- 修改方案
- </view>
- <view class="btn dis a-c j-c " @click="checkSelectionPopup=false">
- 关闭
- </view>
- </view>
- </view>
- </template>
- </uni-Popup>
- <!-- 车牌型号弹窗 -->
- <uni-Popup :show="brandModelPopup" @close="brandModelPopup=false" :closeable="false" headerTitle="厂牌型号"
- overflow="auto" :headerStyle="{fontSize:'36rpx'}" maxHeight="980rpx" mode="center" width="90%">
- <template #content>
- <view class="brandModelClass">
- <view class="cellView">
- <text>车系</text>
- <text>{{carInfo.modelCode}}</text>
- </view>
- <view class="cellView">
- <text>排量</text>
- <text>{{carInfo.displacement}}/L</text>
- </view>
- <view class="cellView">
- <text>座位数</text>
- <text>{{carInfo.seatCount}}/座</text>
- </view>
- <view class="cellView">
- <text>年款</text>
- <text>{{carInfo.carYear}}</text>
- </view>
- <view class="cellView">
- <text>新车购置价</text>
- <text>{{carInfo.purchasePrice}}/元</text>
- </view>
- <view class="footer-btn dis a-c j-c" @click="brandModelPopup=false">
- 关闭
- </view>
- </view>
- </template>
- </uni-Popup>
- <!-- 报价失败原因弹窗 -->
- <uni-Popup v-if="currentCompanyInfo" :show="quoteFailedReasonPopup" @close="quoteFailedReasonPopup=false"
- :closeable="false" headerTitle="厂牌型号" :headerSlot="true" overflow="auto" :headerStyle="{fontSize:'36rpx'}"
- maxHeight="980rpx" mode="center" width="90%" class="quoteFailedReasonClass">
- <template #header>
- <!-- 保险公司信息 -->
- <view class=" dis a-c ">
- <image class="company-icon" :src="currentCompanyInfo.logo" mode=""></image>
- <text class="companyName">{{currentCompanyInfo.nameSimple}}</text>
- <view class="quote-status">
- 报价失败
- </view>
- </view>
- </template>
- <template #content>
- <!-- 失败原因 -->
- <view class="quoteFailedReason-content">
- <view style="overflow-y: auto;max-height: 340rpx;">
- <u--text size="15" color="#666" :text="currentCompanyInfo.msg || '程序异常,请联系管理员'"></u--text>
- </view>
- <view class="PopupClose-Btn dis a-c j-c " @click="quoteFailedReasonPopup=false">
- 关闭
- </view>
- </view>
- </template>
- </uni-Popup>
- <!-- 查最优弹窗 -->
- <uni-Popup :show="findOptimalShow" @close='findOptimalShow=false' headerTitle="查最优">
- <template #content>
- <!-- 比价列表 -->
- <view class="findOptimalPopup">
- <zb-table style="border: 1rpx solid #FDE935;border-radius: 4rpx;" :columns="optimalColumn"
- :formatter="tableformatter" :border="false" :cell-header-style="cellheaderStyle"
- :data="optimalData"></zb-table>
- </view>
- </template>
- </uni-Popup>
- <!-- 自定义加载动画 -->
- <u-overlay :show="loadingShow" style="background-color: rgba(255, 255, 255, 0.6);">
- <view class="dis f-c a-c j-c " style="height: 100%;">
- <u-loading-icon></u-loading-icon>
- <text style="color: #909399;" class="mt-1">加载中</text>
- </view>
- </u-overlay>
- <!-- 交强起保日期 -->
- <u-datetime-picker :show="jqstartShow" v-model="jqstartvalue" mode="datetime" :formatter="formatter"
- @cancel="jqstartShow=false" @close="jqstartShow=false" :closeOnClickOverlay="true" @confirm="jqstartconfirm"
- confirmText="确定"></u-datetime-picker>
- <!-- 商业起保日期 -->
- <u-datetime-picker :show="systartShow" v-model="systartvalue" mode="datetime" :formatter="formatter"
- @cancel="systartShow=false" @close="systartShow=false" :closeOnClickOverlay="true" @confirm="systartconfirm"
- confirmText="确定"></u-datetime-picker>
- <!-- 自定义加载动画 -->
- <u-overlay :show="loadingShow" style="background-color: rgba(255, 255, 255, 0.6);">
- <view class="dis f-c a-c j-c " style="height: 100%;">
- <u-loading-icon></u-loading-icon>
- <text style="color: #909399;" class="mt-1">{{loadingText}}</text>
- </view>
- </u-overlay>
- </view>
- </template>
- <script>
- import lsLoading from '@/components/ls-loading/ls-loading.vue';
- import Mixin from './Mixin.js';
- export default {
- components: {
- lsLoading,
- },
- mixins: [Mixin], // 注入 Mixin
- data() {
- return {
- loadingShow: false, //加载
- loadingText: '加载中', //加载提示文字
- jqstartvalue: Number(new Date().setHours(0, 0, 0)), //交强起期
- systartvalue: Number(new Date().setHours(0, 0, 0)), //商业起期
- jqstartShow: false, //交强日期选择器
- systartShow: false, //商业日期选择器
- brandModelPopup: false, //厂牌型号弹窗
- findOptimalShow: false, //查最优弹窗
- quoteFailedReasonPopup: false, //报价失败原因弹窗
- checkSelectionPopup: false, //查看方案弹窗
- vehicleTaxIsExpanded: false, //车船税展开收起
- carInfo: {}, //车辆信息
- ownerInfo: {}, //车主信息
- policyHolderInfo: {}, //投保人信息
- insuredPersonInfo: {}, //被保人信息
- jqstartDate: "", //交强起保时日期
- jqendDate: "", //交强终保日期
- systartDate: "", //商业起保日期
- syendDate: "", //商业终保日期
- companyindex: 0,
- currentCompanyInfo: {},
- insCompanyVo: {},
- }
- },
- onShow() {},
- async onLoad(params) {
- this.loadingShow = true;
- try {
- if (params.ordersNo) {
- let res = await this.$http.get('/supplementOrder/getOrderDetail', {
- ordersNo: params.ordersNo
- });
- this.productId = res.data.order.productId; //险种id
- this.productName = res.data.order.productsName; //险种name
- this.quotableCompanyList = JSON.parse(JSON.stringify(res.data.insCompanyVo));
- this.order = res.data.order;
- this.costs = res.data.costs; //价格
- this.carInfo = res.data.carInfoVo; //车辆信息
- this.ownerInfo = res.data.ownersInfo; //车主信息
- this.policyHolderInfo = res.data.policyHolderInfo; //投保人信息
- this.insuredPersonInfo = res.data.insuredPersonInfo; //被保人信息
- this.kindInfoVo = res.data.kindInfoVo; //险种大类
- this.ciRiskInfoVo = res.data.ciRiskInfoVo; //交强险
- this.biRiskInfoVo = res.data.biRiskInfoVo; //商业险
- this.vehicleAndVesselTaxVo = res.data.vehicleAndVesselTaxVo; //车船税信息
- this.orderno = res.data.order.ordersNo;
- this.quoteno = res.data.order.quoteNo;
- this.insCompanyVo = res.data.insCompanyVo[0]; //历史保险公司
- await this.ruleFilterCompany();
- await this.commpanyList(res.data);
- this.imageEcho(res.data.imageVoList) // 影像获取完毕
- if (this.ciRiskInfoVo) {
- if (this.isDateBeforeToday(this.ciRiskInfoVo.startDate)) {
- this.jqstartDate = this.nextday();
- this.jqendDate = this.oneYearPast(this.jqstartDate)
- this.ciRiskInfoVo.startDate = this.nextday()
- this.ciRiskInfoVo.endDate = this.oneYearPast(this.jqstartDate)
- } else {
- this.jqstartDate = this.ciRiskInfoVo.startDate;
- this.jqendDate = this.ciRiskInfoVo.endDate;
- }
- }
- if (this.biRiskInfoVo) {
- if (this.isDateBeforeToday(this.biRiskInfoVo.startDate)) {
- this.systartDate = this.nextday();
- this.syendDate = this.oneYearPast(this.systartDate)
- this.biRiskInfoVo.startDate = this.nextday()
- this.biRiskInfoVo.endDate = this.oneYearPast(this.systartDate)
- } else {
- this.systartDate = this.biRiskInfoVo.startDate;
- this.syendDate = this.biRiskInfoVo.endDate;
- }
- }
- } else {
- this.jqstartDate = this.nextday();
- this.jqendDate = this.oneYearPast(this.jqstartDate);
- this.systartDate = this.nextday();
- this.syendDate = this.oneYearPast(this.jqstartDate);
- const eventChannel = this.getOpenerEventChannel()
- // 监听acceptData事件,获取上一页面通过eventChannel传送到当前页面的数据
- await eventChannel.on('acceptData', (data) => {
- console.log(data);
- this.carInfo = data.carInfo; //车辆信息
- this.ownerInfo = data.ownerInfo; //车主信息
- this.policyHolderInfo = data.policyHolderInfo; //投保人信息
- this.vehicleAndVesselTaxVo.identifyNumber = this.policyHolderInfo.identifyNumber;
- this.vehicleAndVesselTaxVo.taxpayerName = this.policyHolderInfo.name;
- this.insuredPersonInfo = data.insuredPersonInfo; //被保人信息
- this.carImageListId = data.carImageListId; //车辆
- this.ownerImageListId = data.ownerImageListId; //车主
- this.policyHolderImageListId = data.policyHolderImageListId; //投保
- this.insuredPersonImageListId = data.insuredPersonImageListId; //被保人
- this.productId = data.productId; //险种id
- this.productName = data.productName; //险种name
- this.riskTypeEchoProcessing(this.productId)
- this.quotableCompanyList = JSON.parse(JSON.stringify(data
- .quotableCompanyList)); //可报价公司
- this.commpanyList(); //保险公司数据结构处理
- console.log(this.quotableCompanyList);
- })
- }
- this.loadingShow = false;
- } catch (error) {
- this.loadingShow = false;
- }
- },
- computed: {
- //已选保险公司数量
- selectedInsurerCount() {
- return this.quotableCompanyList.filter(val => val.insurancePlanInfo !== null).length;
- },
- //获取车船税类型
- taxRelifFlagName() {
- let info = this.car_tax_codeoptions.find(ele => ele.value === this.vehicleAndVesselTaxVo.taxRelifFlag)
- return info?.description;
- },
- },
- methods: {
- // 保险公司列表过滤回显
- async ruleFilterCompany() {
- let params = {
- carInfo: this.carInfo,
- ownerInfo: this.ownerInfo,
- applyInfo: this.policyHolderInfo,
- insureInfo: this.insuredPersonInfo,
- productId: this.productId
- }
- let res = await this.$http.post('/scheme/ruleFilterCompanyApp', params);
- if (res.code == '200') {
- this.quotableCompanyList = res.data.filter(val => val.id == this.insCompanyVo.id);
- } else {
- this.quotableCompanyList = [];
- uni.showToast({
- icon: 'none',
- title: res.msg,
- });
- }
- },
- // 跳转报价详情
- dorderDetails(orderno) {
- console.log(orderno);
- uni.navigateTo({
- url: '/pages/quote/quoteRecordDetail?ordersNo=' + orderno
- })
- },
- // 修改信息
- toCarInfo() {
- uni.navigateTo({
- url: '/pages/quote/quoteInfo',
- success: (res) => {
- res.eventChannel.emit(
- "acceptData", {
- carInfo: this
- .carInfo, //车辆信息
- ownerInfo: this
- .ownerInfo, //车主信息
- policyHolderInfo: this
- .policyHolderInfo, //投保人信息
- insuredPersonInfo: this
- .insuredPersonInfo, //被保人信息
- carImageListId: this
- .carImageListId, //车辆
- ownerImageListId: this
- .ownerImageListId, //车主
- policyHolderImageListId: this
- .policyHolderImageListId, //投保
- insuredPersonImageListId: this
- .insuredPersonImageListId, //被保人
- productId: this.productId, //险种id
- productName: this.productName, //险种名称
- quoteno: this.quoteno,
- })
- }
- }, "navigateTo", true);
- },
- // 单独报价
- async individualQuote(item) {
- if (this.carInfo.licenseNo.length == '8' && this.carInfo.energyTypeCode == '0') {
- return uni.showToast({
- icon: "none",
- title: '检测到能源种类错误,与车辆信息不符。请修改后继续操作',
- duration: 3000
- });
- }
- if (!item.insurancePlanInfo) {
- uni.showToast({
- title: "请选择方案后,在进行报价",
- icon: 'none',
- });
- } else {
- this.riskTypeEchoProcessing(this.productId); //更新险种大类日期
- let param = {
- licenseNo: this.carInfo.licenseNo,
- vinNo: this.carInfo.vinNo,
- engineNo: this.carInfo.engineNo,
- };
- let orders = await this.$http.get('/unify/order/getQuoteNo', param);
- if (orders.code == '200') {
- this.quoteno = orders.msg;
- let mergedArray = [];
- let mergedArrayList = mergedArray.concat(this.carImageListId, this
- .ownerImageListId, this
- .policyHolderImageListId, this.insuredPersonImageListId)
- if (mergedArrayList.length > 0) {
- await this.$http.post('/unify/order/imageSave', {
- imageVoList: mergedArrayList,
- order: {
- quoteNo: this.quoteno,
- }
- })
- }
- this.quotableCompanyList = this.quotableCompanyList.map((ele, index) => {
- if (ele.id == item.id) {
- // 动态调用报价接口
- ele.quoteCode = '1';
- this.quoteInsurance(index, ele.id);
- }
- return ele
- });
- } else if (orders.code == '1001') {
- this.Generateshow = true;
- } else {
- uni.showToast({
- title: orders.msg,
- icon: 'none',
- });
- }
- }
- },
- // 多家报价
- async multipleQuotes() {
- var allAreFalse = this.quotableCompanyList.every(function(element) {
- return element.insurancePlanInfo == null;
- });
- if (!allAreFalse) {
- if (this.carInfo.licenseNo.length == '8' && this.carInfo.energyTypeCode == '0') {
- return uni.showToast({
- icon: "none",
- title: '检测到能源种类错误,与车辆信息不符。请修改后继续操作',
- duration: 3000
- });
- }
- this.riskTypeEchoProcessing(this.productId); //更新险种大类日期
- let param = {
- licenseNo: this.carInfo.licenseNo,
- vinNo: this.carInfo.vinNo,
- engineNo: this.carInfo.engineNo,
- };
- let orders = await this.$http.get('/unify/order/getQuoteNo', param);
- if (orders.code == '200') {
- this.quoteno = orders.msg;
- let mergedArray = [];
- let mergedArrayList = mergedArray.concat(this.carImageListId, this
- .ownerImageListId, this
- .policyHolderImageListId, this.insuredPersonImageListId)
- console.log(mergedArrayList);
- if (mergedArrayList.length > 0) {
- await this.$http.post('/unify/order/imageSave', {
- imageVoList: mergedArrayList,
- order: {
- quoteNo: this.quoteno,
- }
- })
- }
- this.quotableCompanyList = this.quotableCompanyList.map((ele, index) => {
- if (ele.insurancePlanInfo !== null) {
- // 动态调用报价接口
- ele.quoteCode = '1';
- this.quoteInsurance(index, ele.id);
- }
- return ele
- });
- } else if (orders.code == '1001') {
- this.Generateshow = true;
- } else {
- uni.showToast({
- title: orders.msg,
- icon: 'none',
- });
- }
- } else {
- uni.showToast({
- title: "请选择方案后,在进行报价",
- icon: 'none',
- });
- }
- },
- // 调用统一报价接口
- async quoteInsurance(companyIndex, companyId) {
- const company = this.quotableCompanyList[companyIndex];
- console.log(company);
- const isTaxSource = company.isTaxSource;
- const params = {
- order: {
- agreementId: company.dispatchAgreementId,
- insuranceCompanyCode: companyId,
- quoteNo: this.quoteno,
- productId: this.productId,
- orderSource: '1',
- },
- accidentalDrivings: company.insurancePlanInfo.drivings,
- kindInfoVo: this.productId === '0330' ? [] : company.insurancePlanInfo.kinds,
- ciRiskInfoVo: ['0330', '0330034002', '0330034001'].includes(this.productId) ? this
- .ciRiskInfoVo : null,
- biRiskInfoVo: ['034001', '034002', '0330034002', '0330034001'].includes(this.productId) ? this
- .biRiskInfoVo : null,
- carInfoVo: this.carInfo,
- ownersInfo: this.ownerInfo,
- policyHolderInfo: this.policyHolderInfo,
- insuredPersonInfo: this.insuredPersonInfo,
- vehicleAndVesselTaxVo: this.vehicleAndVesselTaxVo,
- isTaxSource: isTaxSource == 1 ? isTaxSource : null,
- systemType: '2'
- };
- try {
- let res = await this.$http.post('/unify/order/quote', params);
- company.msg = res.msg;
- if (res.code == "200") {
- company.result = res.data;
- const updatedItem = {
- ...company,
- quoteCode: 200
- };
- this.quotableCompanyList.splice(companyIndex, 1, updatedItem);
- } else {
- company.msg = res.msg;
- const updatedItem = {
- ...company,
- quoteCode: '3'
- };
- this.quotableCompanyList.splice(companyIndex, 1, updatedItem);
- return;
- }
- } catch (error) {
- const updatedItem = {
- ...company,
- quoteCode: '3'
- };
- this.quotableCompanyList.splice(companyIndex, 1, updatedItem);
- company.msg = '接口请求超时,请重新尝试';
- }
- },
- //选择方案
- async SchemeSelection(item) {
- uni.navigateTo({
- url: '/pages/quote/chooseOption1',
- success: (res) => {
- res.eventChannel.emit("acceptData", {
- params: {
- companyId: item.id,
- productId: this.productId,
- seatCount: this.carInfo.seatCount,
- energyType: this.carInfo.energyTypeCode,
- vehicleType: this.carInfo.carKindCode,
- carnature: this.carInfo.carNatureCode,
- },
- nameSimple: item.nameSimple,
- logo: item.logo,
- cnName: item.cnName,
- jqstartDate: this.jqstartDate,
- jqendDate: this.jqendDate,
- systartDate: this.systartDate,
- syendDate: this.syendDate,
- productName: this.productName,
- quotableCompanyList: this.quotableCompanyList,
- identifyNumber: this.policyHolderInfo.identifyNumber,
- taxpayerName: this.policyHolderInfo.name,
- })
- }
- }, "navigateTo", true);
- },
- // 修改方案
- updateScheme() {
- uni.navigateTo({
- url: '/pages/quote/chooseOption1',
- success: (res) => {
- res.eventChannel.emit("acceptData", {
- params: {
- companyId: this.currentCompanyInfo.id,
- productId: this.productId,
- },
- nameSimple: this.currentCompanyInfo.nameSimple,
- logo: this.currentCompanyInfo.logo,
- cnName: this.currentCompanyInfo.cnName,
- jqstartDate: this.jqstartDate,
- jqendDate: this.jqendDate,
- systartDate: this.systartDate,
- syendDate: this.syendDate,
- productName: this.productName,
- quotableCompanyList: this.quotableCompanyList,
- identifyNumber: this.policyHolderInfo.identifyNumber,
- taxpayerName: this.policyHolderInfo.name,
- })
- }
- }, "navigateTo", true);
- this.checkSelectionPopup = false;
- },
- //查最优
- async findOptimal() {
- let res = await this.$http.get('/supplementOrder/comparePrice?quoteNo=' + this.quoteno);
- if (res.code == '200') {
- this.optimalData = res.data;
- this.findOptimalShow = true;
- }
- },
- //查看方案弹窗
- checkSelection(index) {
- this.currentCompanyInfo = this.quotableCompanyList[index];
- console.log(this.currentCompanyInfo);
- this.checkSelectionPopup = true;
- },
- // 报价原因弹窗
- quoteFailedReason(index) {
- this.currentCompanyInfo = this.quotableCompanyList[index];
- this.quoteFailedReasonPopup = true;
- },
- //即时投保切换更新投保日期
- immediateCoverageChange(e) {
- if (e == 1) {
- const date = new Date();
- date.setHours(date.getHours() + 2);
- date.setMinutes(0)
- date.setSeconds(0)
- this.jqstartDate = this.transformTime(date)
- this.jqendDate = this.oneYearPast(date);
- this.systartDate = this.transformTime(date)
- this.syendDate = this.oneYearPast(date);
- } else {
- this.jqstartDate = this.nextday();
- this.jqendDate = this.oneYearPast(this.jqstartDate);
- this.systartDate = this.nextday();
- this.syendDate = this.oneYearPast(this.systartDate);
- }
- },
- //交强日期事件
- jqstartconfirm(e) {
- this.jqstartDate = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM') + ':00';
- this.jqendDate = this.oneYearPast(this.jqstartDate)
- this.jqstartShow = false;
- },
- // 商业日期事件
- systartconfirm(e) {
- this.systartDate = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM') + ':00';
- this.syendDate = this.oneYearPast(this.systartDate)
- this.systartShow = false;
- },
- //数字格式化
- convertedValue(num) {
- if (!num) {
- return "-";
- }
- if (num < 10000) {
- return num.toString();
- } else if (num < 100000000) {
- return (Math.floor(num / 10000 * 10) / 10) + '万';
- } else {
- return (Math.floor(num / 100000000 * 10) / 10) + '亿';
- }
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- ::v-deep {
- .u-input__content__subfix-icon {
- margin-left: 12rpx;
- image {
- width: 30rpx;
- height: 30rpx;
- }
- }
- /* 调整输入框光标靠右 */
- .uni-input-input {
- text-align: right !important;
- font-weight: bold;
- }
- /* 设置表单项非input元素靠右布局 */
- .u-form-item__body__right {
- margin-left: auto;
- flex: unset;
- }
- .u-form-item__body {
- padding: 24rpx 0;
- box-sizing: border-box;
- }
- .u-form-item__body__left__content__label {
- color: #333;
- }
- /* 覆盖表单下边框颜色 */
- .u-form-item .u-line {
- border-bottom: 1rpx solid #eee;
- }
- }
- page {
- background-color: #f8f8f8;
- }
- .page {
- background-color: #f8f8f8;
- height: 100%;
- /* 提示信息样式 */
- .hint {
- padding: 16rpx 30rpx;
- box-sizing: border-box;
- background: #FFFBD7;
- border-radius: 0rpx 0rpx 0rpx 0rpx;
- font-size: 30rpx;
- color: #333;
- .rightBtn {
- padding: 6rpx 20rpx;
- box-sizing: border-box;
- background: rgba(253, 233, 53, 0.3);
- border-radius: 40rpx 40rpx 40rpx 40rpx;
- border: 1rpx solid #FDE935;
- font-size: 26rpx;
- color: #333;
- }
- }
- .quoteArea {
- padding: 20rpx 30rpx 170rpx;
- box-sizing: border-box;
- }
- /* 投保配置 */
- .insuranceConfig {
- padding: 0 30rpx;
- box-sizing: border-box;
- width: 100%;
- background: #FFFFFF;
- border-radius: 10rpx 10rpx 10rpx 10rpx;
- }
- }
- /* 厂牌型号弹窗 */
- .brandModelClass {
- padding: 30rpx 40rpx 40rpx;
- box-sizing: border-box;
- .cellView {
- padding: 10rpx 0;
- box-sizing: border-box;
- font-size: 30rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- text:first-child {
- color: #666;
- }
- text:last-child {
- color: #333;
- font-weight: bold;
- }
- }
- .footer-btn {
- width: 100%;
- padding: 20rpx;
- box-sizing: border-box;
- background: rgba(253, 233, 53, 0.1);
- border-radius: 45rpx 45rpx 45rpx 45rpx;
- border: 1rpx solid #FDE935;
- margin-top: 30rpx;
- }
- }
- /* 报价公司 */
- .quoteCompany {
- .quoteCompanyItem {
- padding: 30rpx;
- box-sizing: border-box;
- background: #FFFFFF;
- border-radius: 10rpx 10rpx 10rpx 10rpx;
- .companyIcon {
- width: 90rpx;
- height: 90rpx;
- }
- .companyName {
- font-size: 34rpx;
- color: #333;
- font-weight: bold;
- margin-bottom: 18rpx;
- }
- .solution {
- font-size: 28rpx;
- color: #666;
- }
- .sum-price {
- color: #FF540A;
- .totalPrice {
- font-weight: bold;
- text:first-child {
- font-size: 26rpx;
- }
- text:last-child {
- font-size: 40rpx;
- }
- }
- .discountedPrice {
- font-size: 24rpx;
- }
- }
- // 报价按钮
- .quoteBtn {
- padding: 11rpx 22rpx;
- box-sizing: border-box;
- background: #FDE935;
- border-radius: 50rpx 50rpx 50rpx 50rpx;
- font-size: 30rpx;
- color: #1F1F1F;
- }
- .quoteFailureReason {
- width: 100%;
- background: #FAFAFA;
- margin-top: 20rpx;
- border-radius: 10rpx 10rpx 10rpx 10rpx;
- padding: 10rpx;
- box-sizing: border-box;
- font-size: 28rpx;
- color: #F74141;
- position: relative;
- .iconText {
- position: absolute;
- top: 10rpx;
- left: 10rpx;
- text {
- margin-left: 5rpx;
- }
- }
- .viewReason {
- background: #FAFAFA;
- position: absolute;
- bottom: 10rpx;
- right: 10rpx;
- color: #FFAC1D;
- }
- }
- }
- }
- // 报价失败原因弹窗
- .quoteFailedReasonClass {
- .company-icon {
- width: 50rpx;
- height: 50rpx;
- }
- .companyName {
- font-size: 36rpx;
- color: #333;
- font-weight: bold;
- margin-left: 10rpx;
- margin-right: 20rpx;
- }
- .quote-status {
- padding: 4rpx 10rpx;
- box-sizing: border-box;
- background: #FFECEC;
- border-radius: 2rpx 2rpx 2rpx 2rpx;
- font-size: 24rpx;
- color: #F74141;
- font-weight: bold;
- }
- .quoteFailedReason-content {
- padding: 40rpx;
- box-sizing: border-box;
- .PopupClose-Btn {
- background: rgba(253, 233, 53, 0.1);
- border: 1rpx solid #FDE935;
- padding: 22rpx 20rpx;
- box-sizing: border-box;
- border-radius: 45rpx;
- font-size: 30rpx;
- color: #333;
- margin-top: 40rpx;
- }
- }
- }
- // 查看方案弹窗
- .checkSelectionPopupClass {
- .company-icon {
- width: 50rpx;
- height: 50rpx;
- }
- .companyName {
- font-size: 36rpx;
- color: #333;
- font-weight: bold;
- margin-left: 10rpx;
- }
- .checkSelectionPopup-body {
- padding: 30rpx 40rpx;
- box-sizing: border-box;
- .yellow-content {
- overflow-y: auto;
- padding-bottom: 116rpx;
- }
- .content-item {
- border-radius: 4rpx;
- border: 1rpx solid #FFD9D9;
- margin-bottom: 30rpx;
- .title {
- width: 16%;
- padding: 10rpx;
- box-sizing: border-box;
- background: #FFF8F8;
- border-right: 1rpx solid #FFE5E5;
- border-radius: 4rpx 0 0 4rpx;
- font-size: 28rpx;
- color: #333;
- font-weight: bold;
- text {
- text-align: center;
- }
- }
- .right {
- flex: 1;
- padding: 0 20rpx;
- box-sizing: border-box;
- .riskView {
- margin: 15rpx 0;
- >text:first-child {
- font-size: 28rpx;
- color: #666;
- }
- >text:last-child {
- font-size: 28rpx;
- color: #333;
- font-weight: bold;
- }
- .loadMore {
- font-size: 28rpx;
- color: #333;
- font-weight: bold;
- }
- }
- .vehicleTaxInfo {
- flex: 1;
- width: 100%;
- background: #F9F9F9;
- padding: 0 10rpx;
- box-sizing: border-box;
- border-radius: 10rpx 10rpx 10rpx 10rpx;
- margin-bottom: 15rpx;
- .item {
- padding: 15rpx 0;
- box-sizing: border-box;
- text:first-child {
- font-size: 28rpx;
- color: #666;
- }
- text:last-child {
- font-size: 28rpx;
- color: #333;
- font-weight: bold;
- }
- }
- }
- }
- }
- .footer-btn {
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- padding: 25rpx 30rpx 55rpx;
- box-sizing: border-box;
- background: linear-gradient(0deg, #FFFFFF 0%, rgba(255, 254, 245, 0.7) 100%);
- border-radius: 0rpx 0rpx 0rpx 0rpx;
- backdrop-filter: blur(12rpx);
- .btn {
- width: 100%;
- background: #FDE935;
- padding: 20rpx 20rpx;
- box-sizing: border-box;
- border-radius: 58rpx 58rpx 58rpx 58rpx;
- font-size: 36rpx;
- color: #1F1F1F;
- }
- //操作按钮特殊样式
- .btns {
- background: transparent;
- border: 1rpx solid #FDE935;
- padding: 19rpx 20rpx;
- margin-right: 30rpx;
- }
- }
- }
- }
- .footer {
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- padding: 25rpx 30rpx 55rpx;
- box-sizing: border-box;
- backdrop-filter: blur(12rpx);
- background: linear-gradient(0deg, #FFFFFF 0%, rgba(255, 254, 245, 0.7) 100%);
- .btn {
- margin-right: 36rpx;
- image {
- width: 48rpx;
- height: 48rpx;
- }
- text {
- font-size: 20rpx;
- color: #333;
- }
- }
- .batchQuotes {
- flex: 1;
- background: #FDE935;
- border-radius: 58rpx 58rpx 58rpx 58rpx;
- padding: 26rpx 60rpx;
- box-sizing: border-box;
- color: #1F1F1F;
- text:first-child {
- font-size: 36rpx;
- font-weight: bold;
- line-height: 1;
- }
- .sum {
- font-size: 28rpx;
- }
- }
- }
- // 查最优弹窗
- .findOptimalPopup {
- height: 1200rpx;
- padding: 30rpx 40rpx;
- box-sizing: border-box;
- }
- .suffixClass {
- margin-left: 10rpx;
- font-size: 30rpx;
- }
- </style>
|