| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322 |
- <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"
- v-if="companyItem.result.insFeeOrders || companyItem.result.feeOrders">优惠
- {{ (companyItem.result.insFeeOrders &&
- companyItem.result.insFeeOrders.totalPayablePremium) ||
- (companyItem.result.feeOrders && companyItem.result.feeOrders.totalPayablePremium)
- }}</text>
- <view v-if="companyItem.isReSelect" class="quoteBtn dis a-c j-c mt-2"
- @click.stop="individualQuote(companyItem)">
- 立即报价
- </view>
- </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-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>
- <!-- 自定义加载动画 -->
- <global-loading :show="loadingShow" :text="loadingText"></global-loading>
- </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);
- if (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,
- isReSelect: false // 清除重选标记,回到“仅展示价格”状态
- };
- this.quotableCompanyList.splice(companyIndex, 1, updatedItem);
- console.log(this.quotableCompanyList);
- } else {
- company.msg = res.msg;
- const updatedItem = {
- ...company,
- quoteCode: '3',
- isReSelect: false // 清除重选标记,回到“仅展示价格”状态
- };
- 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>
|