| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323 |
- <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>
|