12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481 |
- <template>
- <view :style="getHeight" style="background-color: #F5F5F5;">
- <!-- 头部 -->
- <view class="carInfo w-100 px-3 box-sizing">
- <view class="d-flex">
- <view class="icon iconfont icon-tree-round-car flex-shrink topLeft"></view>
- <view class="topRight d-flex flex-1 p-3 flex-column" style="color: #FFFFFF;">
- <view class="d-flex flex-1">
- <view class="font-lg d-flex a-center">{{this.carInfo.licenseNo}}
- <view class="icon iconfont icon-bianji1 ml-2" @tap="toCarInfo"></view>
- </view>
- </view>
- <view class="brandName">{{this.carInfo.modelcname}}</view>
- </view>
- </view>
- <view class="other d-flex j-sb px-3">
- <view class="d-flex flex-1 a-center">
- <view class="privilege d-flex a-center j-center flex-shrink px-2">特权</view>
- <view class="content">每月自动查违章,无违章领奖励</view>
- </view>
- <view class="flex-shrink icon iconfont icon-youjiantou d-flex a-center font-sm"></view>
- </view>
- </view>
- <!-- 报价方案 -->
- <view class="pageContent">
- <view class="quotePlan mx-3">
- <view class="header j-sb d-flex a-center px-3">
- <view class="title font-md">报价方案</view>
- <view class="adjustPlan main-text-color" @tap="toInsureItems">调整方案</view>
- </view>
- <view class="body">
- <view class="insurance">
- <template v-if="jqstartDate">
- <view class="row j-sb d-flex a-center">
- <view>交强险</view>
- <view>投保</view>
- </view>
- </template>
- <template v-if="systartDate">
- <block v-for="(item,index) in insureList" :key="index">
- <template v-if="item.amount!=0">
- <view class="row j-sb d-flex a-center">
- <view>{{item.kindName}}</view>
- <block v-for="(item2,index2) in item.amtList" :key="index2">
- <template v-if="item2.value == item.amount">
- <view>{{item2.label}}</view>
- </template>
- </block>
- </view>
- </template>
- </block>
- </template>
- <view class="d-flex" v-if="jqstartDate">
- <view>起保日期:</view>
- <view>
- <p class="date d-flex a-center font-md" style="color: #FFFFFF;" v-if="jqstartDate">
- 交强险 {{this.jqstartDate}}
- </p>
- <p class="date d-flex a-center font-md" style="color: #FFFFFF;" v-if="systartDate">商业险
- {{this.systartDate}}
- </p>
- </view>
- </view>
- </view>
- <view class="addedServices">
- <view class="row j-sb d-flex a-center">
- <view>增值服务</view>
- <view>赠送</view>
- </view>
- <view style="padding: 15upx;color: #A6A6A6;font-size: 24upx;background-color: #F8FAFC;">
- 注:包含道路救援/安全检测/代为驾驶/代为送检,投保以上商业主险免费赠送,各家保司各个地区旅游差异,具体以保单信息为准</view>
- </view>
- </view>
- </view>
- <view class="quoteCompany">
- <view class="header j-sb d-flex a-center">
- <view class="title d-flex">精选保险公司<view class="icon iconfont icon-Group-"></view>
- </view>
- </view>
- <block v-for="(totalitem,totalindex) in totalCompanyList" :key="index">
- <template>
- <view class="quoteCompanyItem">
- <view class="top dis f-c">
- <ls-loading v-show="totalitem.quoteCode==1" text="掌柜正在为您报价,请稍等......"
- :animation="animation" fontSize="22" />
- <view class="companyIcon dis j-s a-c">
- <view class="dis ">
- <!-- 勾选框 -->
- <u-checkbox
- @change="event=>checkboxChange(event,totalitem.id,totalitem.cnName, totalindex)"
- v-model="totalitem.checked" active-color="rgb(250, 53, 52)"></u-checkbox>
- <!-- logo -->
- <image :src="totalitem.logo"></image>
- <!-- 名称 -->
- <view class="companyName">{{totalitem.namesimple}}</view>
- </view>
- <!-- 价格 -->
- <text v-show="totalitem.quoteCode==200"
- class="sum">¥{{totalitem.result.sumPermium}}</text>
- <text
- v-show="(totalitem.quoteCode != '200') && (totalitem.quoteCode != '0') && (totalitem.quoteCode != '1')"
- class="sum" style="color: #999;font-size: 12px;"
- @click="ErrorMsg(totalitem.msg)">报价失败,请点击查看</text>
- </view>
- <view class="" v-if="totalitem.checked">
- <u-form-item label="报价协议选择" :prop="totalitem.agreementId" label-width="200"
- :border-bottom='false' style="width: 250px;padding: 0;">
- <u-input type="select" :select-open="totalitem.selectShow"
- v-model="totalitem.agreementName" placeholder="请选择协议"
- @click="totalitem.selectShow = true"></u-input>
- <u-select mode="single-column" :list="totalitem.agreement" value-name="id"
- label-name="agreementName" v-model="totalitem.selectShow"
- @confirm="val=>selectConfirm(val,totalindex)"></u-select>
- </u-form-item>
- </view>
- <button v-show="totalitem.quoteCode==200" type="default"
- class="d-flex a-center j-center btn"
- @tap="querydetial(totalitem.result.companyId)">查看详情</button>
- </view>
- </view>
- </template>
- </block>
- </view>
- </view>
- <wyb-popup ref="carTypePopup" type="center" :scrollY="true" mode="size-fixed" :maskClickClose="false"
- height="640" width="690" radius="6">
- <view class="popupBody">
- <block v-for="(item,index) in carTypeList" :key="index">
- <view class="carTypeItem d-flex " @tap="chooseCarType(item)">
- <view class="nav d-flex flex-1 flex-column">
- <view class="carseriesName">{{item.carseriesname}}</view>
- <view class="modelName">{{item.modelname}}</view>
- <view class="nav_box d-flex">
- <span class="zid">{{item.transmissiontype}}</span>
- <p class=" d-flex a-center">
- {{item.caryear}}{{item.caryear==""?"":"款 | "}}{{item.seatmax}}座
- </p>
- </view>
- </view>
- <view class="price d-flex a-center j-center">¥{{item.purchaseprice}}</view>
- </view>
- </block>
- </view>
- </wyb-popup>
- <view class="infoBottom d-flex a-center j-center j-sb">
- <button type="default" class="d-flex a-center j-center" @tap="toNext">保费计算</button>
- </view>
- <u-modal ref="uModal" v-model="msgshow" :content="content" :title-style="{fontWeight:'bold'}" title="报价提示">
- </u-modal>
- </view>
- </template>
- <script>
- import {
- mapState
- } from "vuex"
- import wybPopup from '@/components/common/wyb-popup/wyb-popup.vue'
- import lsLoading from '@/components/common/ls-loading/ls-loading.vue';
- export default {
- components: {
- wybPopup,
- lsLoading
- },
- computed: {
- ...mapState(['userInfo']),
- getHeight() {
- let height = uni.getSystemInfoSync().windowHeight;
- return `minHeight: ${height}px;`;
- }
- },
- // 监听导航栏的按钮
- onNavigationBarButtonTap(e) {
- if (e.index == 0) {
- this.navigate({
- url: '/pages/index/index'
- }, "switchTab", true);
- }
- },
- data() {
- return {
- msgshow: false,
- content: "",
- agreementList: [],
- zmDrivingForm: {}, //中煤驾意险
- carInfoRmation: [], //车辆影像
- ownerInfoRmation: [], //车主影像
- policyHolderInfoRmation: [], //投保人影像
- insuredPersonInfoRmation: [], //被保人影像
- orderno: "", //订单号
- show1: false, //华农
- animation: 'twinkle', //动画类型
- jqjishi: false,
- syjishi: false,
- timeArray: [],
- jqTimeIndex: 0,
- syTimeIndex: 0,
- time1: "",
- time2: "",
- carTypeList: [], //车辆品牌型号列表
- msg: "",
- quoteno: "", //报价编号
- hasKindCodeA: false, //是否含有车损险
- carInfo: {}, //车辆信息
- ownerInfo: {}, //车主信息
- policyHolderInfo: {}, //投保人信息
- insuredPersonInfo: {}, //被保人信息
- riskList: [], //险种大类信息
- kindList: [], //商业险险别
- showCarInfo: false, //控制车辆信息显示
- showInsureDate: true, //控制险种时间显示
- jqstartDate: "", //交强险日期
- jqendDate: " ", //交强险日期
- systartDate: "", //商业险日期
- syendDate: "", //商业险日期
- insureList: [{
- amount: "0",
- amountDesc: "投保",
- amtList: [{
- "label": "不投保",
- "value": "0"
- }, {
- "label": "投保",
- "value": "1"
- }],
- kindCode: "A",
- isMainRisk: true,
- kindName: "机动车损失险",
- desc: "保险期间内,被保险人或被保险机动车驾驶人在使用被保险机动车过程中,因自然灾害、意外事故、机动车被盗窃、抢劫、抢夺等情况(详见保险条款)造成被保险机动车直接损失,且不属于免除保险人责任的范围,保险人依照本保险合同的约定负责赔偿的险种。"
- },
- {
- amount: "0",
- amountDesc: "不投保",
- amtList: [{
- label: "不投保",
- value: "0"
- },
- {
- label: "50万",
- value: "500000"
- },
- {
- label: "100万",
- value: "1000000"
- },
- {
- label: "150万",
- value: "1500000"
- },
- {
- label: "200万",
- value: "2000000"
- },
- {
- label: "250万",
- value: "2500000"
- },
- {
- label: "300万",
- value: "3000000"
- },
- {
- label: "500万",
- value: "5000000"
- },
- {
- label: "1000万",
- value: "10000000"
- }
- ],
- kindCode: "B",
- isMainRisk: true,
- kindName: "第三者责任险",
- desc: "保险期间内,被保险人或其允许的驾驶人在使用被保险机动车过程中发生意外事故,致使第三者遭受人身伤亡或财产直接损毁,依法应当对第三者承担的损害赔偿责任,且不属于免除保险人责任的范围,保险人依照本保险合同的约定,对于超过机动车交通事故责任强制保险各分项赔偿限额的部分负责赔偿的险种。"
- },
- {
- amount: "0",
- amountDesc: "不投保",
- amtList: [{
- "label": "不投保",
- "value": "0"
- }, {
- "label": "1万",
- "value": "10000"
- }, {
- "label": "2万",
- "value": "20000"
- }, {
- "label": "5万",
- "value": "50000"
- }, {
- "label": "10万",
- "value": "100000"
- }, {
- "label": "15万",
- "value": "150000"
- }, {
- "label": "20万",
- "value": "200000"
- }],
- kindCode: "D3",
- isMainRisk: true,
- kindName: "司机责任险",
- desc: "保险期间内,被保险人或其允许的驾驶人在使用被保险机动车过程中发生意外事故,致使车上人员遭受人身伤亡,且不属于免除保险人责任的范围,依法应当对车上人员承担的损害赔偿责任,保险人依照本保险合同的约定负责赔偿的险种。"
- },
- {
- amount: "0",
- amountDesc: "不投保",
- amtList: [{
- "label": "不投保",
- "value": "0"
- }, {
- "label": "1万",
- "value": "10000"
- }, {
- "label": "2万",
- "value": "20000"
- }, {
- "label": "4万",
- "value": "40000"
- }, {
- "label": "5万",
- "value": "50000"
- }, {
- "label": "10万",
- "value": "100000"
- }, {
- "label": "15万",
- "value": "150000"
- }, {
- "label": "20万",
- "value": "200000"
- }],
- kindCode: "D4",
- isMainRisk: true,
- kindName: "乘客责任险",
- desc: "保险期间内,被保险人或其允许的驾驶人在使用被保险机动车过程中发生意外事故,致使车上人员遭受人身伤亡,且不属于免除保险人责任的范围,依法应当对车上人员承担的损害赔偿责任,保险人依照本保险合同的约定负责赔偿的险种。"
- },
- {
- amount: "0",
- amountDesc: "不投保",
- amtList: [{
- "label": "不投保",
- "value": "0"
- }, {
- "label": "2000",
- "value": "2000"
- }, {
- "label": "5000",
- "value": "5000"
- }, {
- "label": "1万",
- "value": "10000"
- }],
- desc: "保险期间内,被保险机动车在被保险人或被保险机动车驾驶人使用过程中,发生无明显碰撞痕迹的车身划痕损失,保险人按照保险合同约定负责赔偿的险种",
- isMainRisk: true,
- kindCode: "L",
- kindName: "车身划痕险",
- mainRiskCodeList: "A"
- },
- {
- amount: "0",
- amountDesc: "不投保",
- amtList: [{
- "label": "不投保",
- "value": "0"
- }, {
- "label": "5%",
- "value": "5"
- }, {
- "label": "10%",
- "value": "10"
- }, {
- "label": "15%",
- "value": "15"
- }, {
- "label": "20%",
- "value": "20"
- }],
- desc: "被保险机动车发生主险约定的保险事故,保险人按照主险的约定计算赔款后,扣减本特约条款约定的免赔的险种。",
- isMainRisk: true,
- kindCode: "MJ1",
- kindName: "绝对免赔率特约险(车损)",
- mainRiskCodeList: "A"
- },
- {
- amount: "0",
- amountDesc: "不投保",
- amtList: [{
- "label": "不投保",
- "value": "0"
- }, {
- "label": "5%",
- "value": "5"
- }, {
- "label": "10%",
- "value": "10"
- }, {
- "label": "15%",
- "value": "15"
- }, {
- "label": "20%",
- "value": "20"
- }],
- desc: "被保险机动车发生主险约定的保险事故,保险人按照主险的约定计算赔款后,扣减本特约条款约定的免赔的险种。",
- isMainRisk: true,
- kindCode: "MJ2",
- kindName: "绝对免赔率特约险(三者)",
- mainRiskCodeList: "B"
- },
- {
- amount: "0",
- amountDesc: "不投保",
- amtList: [{
- "label": "不投保",
- "value": "0"
- }, {
- "label": "5%",
- "value": "5"
- }, {
- "label": "10%",
- "value": "10"
- }, {
- "label": "15%",
- "value": "15"
- }, {
- "label": "20%",
- "value": "20"
- }],
- desc: "被保险机动车发生主险约定的保险事故,保险人按照主险的约定计算赔款后,扣减本特约条款约定的免赔的险种。",
- isMainRisk: true,
- kindCode: "MJ3",
- kindName: "绝对免赔率特约险(司机)",
- mainRiskCodeList: "D3"
- },
- {
- amount: "0",
- amountDesc: "不投保",
- amtList: [{
- "label": "不投保",
- "value": "0"
- }, {
- "label": "5%",
- "value": "5"
- }, {
- "label": "10%",
- "value": "10"
- }, {
- "label": "15%",
- "value": "15"
- }, {
- "label": "20%",
- "value": "20"
- }],
- desc: "被保险机动车发生主险约定的保险事故,保险人按照主险的约定计算赔款后,扣减本特约条款约定的免赔的险种。",
- isMainRisk: true,
- kindCode: "MJ4",
- kindName: "绝对免赔率特约险(乘客)",
- mainRiskCodeList: "D4"
- },
- {
- amount: "0",
- amountDesc: "不投保",
- coveragePremium: 0,
- amtList: [{
- label: "不投保",
- value: "0"
- },
- {
- label: "1万",
- value: "10000"
- },
- {
- label: "2万",
- value: "20000"
- },
- {
- label: "5万",
- value: "50000"
- },
- {
- label: "10万",
- value: "100000"
- }
- ],
- kindCode: "SY_FJ_YBW1",
- isMainRisk: true,
- kindName: "附加医保-三者",
- desc: "附加医保外医疗费用责任险(机动车第三者责任保险)"
- },
- {
- amount: "0",
- amountDesc: "不投保",
- coveragePremium: 0,
- amtList: [{
- label: "不投保",
- value: "0"
- },
- {
- label: "1万",
- value: "10000"
- },
- {
- label: "2万",
- value: "20000"
- },
- {
- label: "5万",
- value: "50000"
- },
- {
- label: "10万",
- value: "100000"
- }
- ],
- kindCode: "SY_FJ_YBW2",
- isMainRisk: true,
- kindName: "附加医保-座位险(乘客)",
- desc: "附加医保外医疗费用责任险(机动车第三者责任保险)"
- },
- {
- amount: "0",
- amountDesc: "不投保",
- coveragePremium: 0,
- amtList: [{
- label: "不投保",
- value: "0"
- },
- {
- label: "1万",
- value: "10000"
- },
- {
- label: "2万",
- value: "20000"
- },
- {
- label: "5万",
- value: "50000"
- },
- {
- label: "10万",
- value: "100000"
- }
- ],
- kindCode: "SY_FJ_YBW3",
- isMainRisk: true,
- kindName: "附加医保-座位险(司机)",
- desc: "附加医保外医疗费用责任险(机动车第三者责任保险)"
- },
- {
- amount: "0",
- amountDesc: "不投保",
- amtList: [{
- label: "不投保",
- value: "0"
- },
- {
- label: "50万",
- value: "500000"
- },
- {
- label: "100万",
- value: "1000000"
- },
- {
- label: "150万",
- value: "1500000"
- },
- {
- label: "200万",
- value: "2000000"
- },
- {
- label: "250万",
- value: "2500000"
- },
- {
- label: "300万",
- value: "3000000"
- },
- {
- label: "500万",
- value: "5000000"
- },
- {
- label: "1000万",
- value: "10000000"
- }
- ],
- desc: "保险期间内,被保险人或其允许的驾驶人在法定节假日期间使用被保险机动车发生机动车第三者责任保险范围内的事故,并经公安部门或保险人查勘确认的,被保险机动车第三者责任保险所适用的责任限额在保险单载明的基础上增加一倍的险种",
- isMainRisk: true,
- kindCode: "BD",
- kindName: "法定节假日限额翻倍险",
- mainRiskCodeList: "B"
- }
- ],
- totalCompanyList: [], //保险公司列表
- notStartedQuote: true, //未开始报价(true表示未开始报价,false表示已经报价结束)
- quoteCompanyCount: 0,
- }
- },
- async onLoad() {
- const eventChannel = this.getOpenerEventChannel()
- // 监听acceptData事件,获取上一页面通过eventChannel传送到当前页面的数据
- eventChannel.on('acceptData', async (data) => {
- console.log(data)
- this.carInfo = data.carInfo; //车辆信息
- this.ownerInfo = data.ownerInfo; //车主信息
- this.policyHolderInfo = data.policyHolderInfo; //投保人信息
- this.insuredPersonInfo = data.insuredPersonInfo; //被保人信息
- this.riskList = data.riskList; //险种大类
- this.kindList = data.kindList; //商业险险别
- this.orderno = data.orderno;
- this.quoteno = data.quoteno;
- if (this.riskList.length > 0) {
- for (let i = 0; i < this.riskList.length; i++) {
- if (this.riskList[i].riskCode == '0507') {
- this.jqstartDate = this.riskList[i].startDate;
- }
- if (this.riskList[i].riskCode == '0510') {
- this.systartDate = this.riskList[i].startDate;
- this.kindList.map(ele1 => {
- this.insureList.map(ele2 => {
- if (ele2.kindCode == ele1.kindCode) {
- switch (ele1.kindCode) {
- case 'D4':
- case 'SY_FJ_YBW2':
- ele2.amount = ele1.unitAmount;
- break;
- case "MJ1":
- case "MJ2":
- case "MJ3":
- case "MJ4":
- ele2.amount = ele1.deductibleRate;
- break;
- default:
- ele2.amount = ele1.amount;
- }
- }
- })
- })
- }
- }
- }
- })
- this.commpanyList();
- },
- methods: {
- //查看详情
- querydetial(id) {
- this.navigate({
- url: "/pages/carInsure1/quoteDetail1?companyId=" + id
- },
- "navigateTo", true);
- },
- //选择协议
- selectConfirm(e, index) {
- this.totalCompanyList[index].agreementId = e[0].value;
- this.totalCompanyList[index].agreementName = e[0].label;
- this.totalCompanyList[index].apiType = e[0].extra;
- },
- //获取保险公司列表
- async commpanyList() {
- let commpanykad = await this.$http.get('/insurance/order/getAgreementInsCompany');
- commpanykad.data.map(ele => {
- ele["result"] = {};
- ele["quoteCode"] = 0;
- ele["checked"] = false;
- ele["msg"] = "";
- ele["agreementId"] = "";
- ele["agreementName"] = "";
- ele["apiType"] = "";
- ele["selectShow"] = false;
- })
- this.totalCompanyList = commpanykad.data;
- },
- async toNext() {
- if (this.quoteno) {
- this.OrderStageProcessing();
- } else {
- let getquote = await this.$http.get('/ins/tool/getQuoteNo');
- this.quoteno = getquote.data;
- this.OrderStageProcessing();
- }
- },
- async OrderStageProcessing() {
- await this.$http.post('/ins/taskImage/uploadImages', {
- imageIdList: this.carInfoRmation,
- imageType: "C01",
- quoteNo: this.quoteno
- })
- await this.$http.post('/ins/taskImage/uploadImages', {
- imageIdList: this.ownerInfoRmation,
- imageType: "C02",
- quoteNo: this.quoteno
- })
- await this.$http.post('/ins/taskImage/uploadImages', {
- imageIdList: this.policyHolderInfoRmation,
- imageType: "C03",
- quoteNo: this.quoteno
- })
- await this.$http.post('/ins/taskImage/uploadImages', {
- imageIdList: this.insuredPersonInfoRmation,
- imageType: "C04",
- quoteNo: this.quoteno
- })
- let param = {
- userId: this.userInfo.sysUser.id,
- quoteno: this.quoteno,
- orderNo: this.orderno ? this.orderno : "",
- carInfo: this.carInfo,
- insuredPersonInfo: this.insuredPersonInfo,
- ownerInfo: this.ownerInfo,
- policyHolderInfo: this.policyHolderInfo,
- kindList: this.kindList,
- riskList: this.riskList
- };
- let orders = await this.$http.post('/insurance/order/generateOrder', param);
- if (orders.code == '200') {
- this.orderno = orders.data.orderno;
- this.totalCompanyList.map((ele, index) => {
- if (ele.checked) {
- //动态调用报价接口
- ele.quoteCode = "1";
- console.log(ele.quoteCode)
- this.ToolClickFun(ele.cnName, index, ele.id);
- }
- });
- }
- },
- //动态函数
- ToolClickFun(MethodName, Parameter, companyId) {
- this[`${MethodName}`](Parameter, companyId)
- },
- //永安报价
- async yongan(num, id) {
- let params = {
- orderNo: this.orderno,
- companyId: id
- };
- let quote = await this.$http('/order/yongAn/quote', params);
- if (quote.msg == "重复投保" && quote.code == "501") {
- if (!!quote.data.jqStartDate && !quote.data.syStartDate) {
- this.jqstartDate = quote.data.jqStartDate;
- this.jqendDate = quote.data.jqEndDate;
- if (this.riskList.length > 0) {
- for (let i = 0; i < this.riskList.length; i++) {
- if (this.riskList[i].riskCode == "0507") {
- this.riskList[i].startDate = quote.data.jqStartDate;
- this.riskList[i].endDate = quote.data.jqEndDate;
- }
- }
- }
- let param = {
- userId: this.userInfo.sysUser.id,
- quoteno: this.quoteno,
- orderNo: this.orderno,
- carInfo: this.carInfo,
- insuredPersonInfo: this.insuredPersonInfo,
- ownerInfo: this.ownerInfo,
- policyHolderInfo: this.policyHolderInfo,
- kindList: this.kindList,
- riskList: this.riskList
- };
- await this.$http.post('/insurance/order/generateOrder', param);
- return this.yongan(num, id);
- } else if (!!quote.data.syStartDate && !quote.data.jqStartDate) {
- } else if (!!quote.data.syStartDate && !!quote.data.jqStartDate) {
- } else {
- this.totalCompanyList[num].quoteCode = "3";
- this.totalCompanyList[num].msg = "重复投保";
- }
- } else if (quote.code == "500" || quote.code == "502" || quote.code == "-9999") {
- this.totalCompanyList[num].quoteCode = "-9999";
- this.totalCompanyList[num].msg = quote.msg;
- } else {
- this.totalCompanyList[num].quoteCode = 200;
- this.totalCompanyList[num].result = quote.data;
- }
- },
- //中煤报价
- async zhongmei(num, id) {
- let params = {
- accidentalDrivingVo: this.zmDrivingForm,
- orderNo: this.orderno,
- companyId: id,
- agreementId: this.totalCompanyList[num].agreementId,
- };
- let res = await this.$http.post('/order/zhongMeiApi/quote', params);
- this.totalCompanyList[num].msg = res.msg;
- if (!!res.msg && res.msg.indexOf("不存在有效协议") >= 0) {
- this.totalCompanyList[num].quoteCode = "4";
- this.totalCompanyList[num].msg = res.msg;
- return;
- } else if (
- res.data == null &&
- res.msg.indexOf("交强险平台返回") > -1 &&
- res.msg.indexOf(";终保日期") > -1
- ) {
- let time =
- res.msg.substr(res.msg.indexOf(";终保日期 ") + 6, 16) + ":00";
- this.jqstartDate = time;
- this.jqendDate = this.oneYearPast(time);
- this.systartDate = time;
- this.syendDate = this.oneYearPast(time);
- if (this.riskList.length > 0) {
- for (let i = 0; i < this.riskList.length; i++) {
- if (this.riskList[i].riskCode == "0507") {
- this.riskList[i].startDate = time;
- this.riskList[i].endDate = this.oneYearPast(time);
- } else if (this.riskList[i].riskCode == "0510") {
- this.riskList[i].startDate = time;
- this.riskList[i].endDate = this.oneYearPast(time);
- }
- }
- }
- let param = {
- userId: this.userInfo.sysUser.id,
- quoteno: this.quoteno,
- orderNo: this.orderno,
- carInfo: this.carInfo,
- insuredPersonInfo: this.insuredPersonInfo,
- ownerInfo: this.ownerInfo,
- policyHolderInfo: this.policyHolderInfo,
- kindList: this.kindList,
- riskList: this.riskList
- };
- await this.$http.post('/insurance/order/generateOrder', param);
- return this.zhongmei(num, id);
- } else if (!!res.data) {
- this.totalCompanyList[num].quoteCode = 200;
- this.totalCompanyList[num].result = res.data;
- } else {
- this.totalCompanyList[num].quoteCode = "3";
- this.totalCompanyList[num].msg = res.msg;
- return;
- }
- },
- //永诚报价
- async yongcheng(num, id) {
- let accidentalDrivingVo = {};
- if (this.accidentForm.id) {
- let data = this.accidentDataList.find(
- val => val.id == this.accidentForm.accidentType
- );
- accidentalDrivingVo = {
- rideRiskCode: data.code ? data.code : "",
- rideRiskName: data.name ? data.name : "",
- quantity: this.accidentForm.fen ? this.accidentForm.fen : ""
- };
- }
- let params = {
- accidentalDrivingVo,
- orderNo: this.orderno,
- companyId: id,
- cqryCdeJq: this.cqryCdeJq,
- cqryCdeSy: this.cqryCdeSy,
- renewalCodeJq: this.renewalCodeJq,
- renewalCodeSy: this.renewalCodeSy
- };
- let res = await this.$http('/api/yongCheng/quote', params);
- this.totalCompanyList[num].msg = res.msg;
- if (!!res.msg && res.msg.indexOf("不存在有效协议") >= 0) {
- this.totalCompanyList[num].quoteCode = "4";
- this.totalCompanyList[num].msg = res.msg;
- return;
- } else if (
- res.data == null &&
- res.msg.indexOf("车险平台返回") > -1 &&
- res.msg.indexOf(";终保日期") > -1
- ) {
- let time =
- res.msg.substr(res.msg.indexOf(";终保日期 ") + 6, 16) + ":00";
- let Aortime = this.transformTime2(time); //终保日期的后一天
- this.jqstartDate = Aortime;
- this.jqendDate = this.oneYearPast(Aortime);
- this.systartDate = Aortime;
- this.syendDate = this.oneYearPast(Aortime);
- if (this.riskList.length > 0) {
- for (let i = 0; i < this.riskList.length; i++) {
- if (this.riskList[i].riskCode == "0507") {
- this.riskList[i].startDate = Aortime;
- this.riskList[i].endDate = this.oneYearPast(Aortime);
- } else if (this.riskList[i].riskCode == "0510") {
- this.riskList[i].startDate = Aortime;
- this.riskList[i].endDate = this.oneYearPast(Aortime);
- }
- }
- }
- let param = {
- userId: this.userInfo.sysUser.id,
- quoteno: this.quoteno,
- orderNo: this.orderno,
- carInfo: this.carInfo,
- insuredPersonInfo: this.insuredPersonInfo,
- ownerInfo: this.ownerInfo,
- policyHolderInfo: this.policyHolderInfo,
- kindList: this.kindList,
- riskList: this.riskList
- };
- await this.$http.post('/insurance/order/generateOrder', param);
- return this.yongcheng(num, id);
- } else if (res.code == "200") {
- this.totalCompanyList[num].quoteCode = 200;
- this.totalCompanyList[num].result = res.data;
- } else if (res.code == "101") {
- this.totalCompanyList[num].quoteCode = "101";
- this.totalCompanyList[num].msg = res.msg;
- this.cqryCdeJq = res.data.cqryCdeJq;
- this.cqryCdeSy = res.data.cqryCdeSy;
- let jq = res.data.renewalCodeJq.replace(/[\r\n]/g, "");
- let jqBase64 = `data:image/png;base64,${jq}`;
- this.renewalCodeJqImg = jqBase64;
- if (res.data.renewalCodeSy) {
- let sy = res.data.renewalCodeSy.replace(/[\r\n]/g, "");
- let syBase64 = `data:image/png;base64,${sy}`;
- this.renewalCodeSyImg = syBase64;
- }
- this.renewalCodedialogVisible = true;
- } else {
- this.totalCompanyList[num].quoteCode = "3";
- this.totalCompanyList[num].msg = res.msg;
- return;
- }
- },
- //爬虫统一报价接口
- async quoteInsurance(num, id, apiType) {
- let api = apiType === 2 ? "/insurance/crawler/quote" : "anshengquote";
- let params = {
- orderNo: this.orderno,
- companyId: id,
- agreementId: this.totalCompanyList[num].agreementId,
- };
- let res = await this.$http.post(`${api}`, params);
- this.totalCompanyList[num].msg = res.msg;
- if (!!res.msg && res.msg.indexOf("不存在有效协议") >= 0) {
- this.totalCompanyList[num].quoteCode = "4";
- this.totalCompanyList[num].msg = res.msg;
- return;
- } else if (
- res.data == null &&
- res.msg.indexOf("交强险平台返回") > -1 &&
- res.msg.indexOf(";终保日期") > -1
- ) {
- let time =
- res.msg.substr(res.msg.indexOf(";终保日期 ") + 6, 16) + ":00";
- this.jqstartDate = time;
- this.jqendDate = this.oneYearPast(time);
- this.systartDate = time;
- this.syendDate = this.oneYearPast(time);
- if (this.riskList.length > 0) {
- for (let i = 0; i < this.riskList.length; i++) {
- if (this.riskList[i].riskCode == "0507") {
- this.riskList[i].startDate = time;
- this.riskList[i].endDate = this.oneYearPast(time);
- } else if (this.riskList[i].riskCode == "0510") {
- this.riskList[i].startDate = time;
- this.riskList[i].endDate = this.oneYearPast(time);
- }
- }
- }
- let param = {
- userId: this.userInfo.sysUser.id,
- quoteno: this.quoteno,
- orderNo: this.orderno,
- carInfo: this.carInfo,
- insuredPersonInfo: this.insuredPersonInfo,
- ownerInfo: this.ownerInfo,
- policyHolderInfo: this.policyHolderInfo,
- kindList: this.kindList,
- riskList: this.riskList
- };
- await this.$http.post('/insurance/order/generateOrder', param);
- return this.quoteInsurance(num, id, apiType);
- } else if (!!res.data) {
- this.totalCompanyList[num].quoteCode = 200;
- this.totalCompanyList[num].result = res.data;
- } else {
- this.totalCompanyList[num].quoteCode = "3";
- this.totalCompanyList[num].msg = res.msg;
- return;
- }
- },
- //安盛天平
- ansheng(num, id) {
- this.quoteInsurance(num, id, this.totalCompanyList[num].apiType);
- },
- //众安
- zhongan(num, id) {
- this.quoteInsurance(num, id, this.totalCompanyList[num].apiType);
- },
- //人寿
- renshou(num, id) {
- this.quoteInsurance(num, id, this.totalCompanyList[num].apiType);
- },
- //恒邦
- hengbang(num, id) {
- this.quoteInsurance(num, id, this.totalCompanyList[num].apiType);
- },
- /**
- * 选择保险公司方法
- * @param {String} event change选中事件
- * @param {String} code 保险公司ID
- * @param {String} name 保险公司主体全拼
- * @param {String} index 选中下标
- */
- checkboxChange(event, code, name, index) {
- this.totalCompanyList[index].checked = event.value;
- let arr = this.totalCompanyList[index].agreement;
- let list = [];
- list = arr.filter(item => {
- return item.licenseNo.length > 0 ? item.licenseNo.includes(this.carInfo.licenseNo.slice(
- 0,
- 2)) : "true"
- })
- list.map(ele => {
- ele.extra = ele.apiType;
- return ele;
- })
- this.agreementList = list;
- },
- // 重新选择车型
- toCarInfo() {
- this.navigate({
- url: '/pages/carInsure1/carInfo1',
- success: (res) => {
- res.eventChannel.emit("acceptData", {
- carInfo: this.carInfo,
- ownerInfo: this.ownerInfo,
- policyHolderInfo: this.policyHolderInfo,
- insuredPersonInfo: this.insuredPersonInfo,
- riskList: this.riskList,
- kindList: this.kindList
- })
- }
- }, "navigateTo", true);
- },
- // 重新选择方案
- toInsureItems() {
- this.navigate({
- url: '/pages/carInsure1/insureItems1',
- success: (res) => {
- res.eventChannel.emit("acceptData", {
- carInfo: this.carInfo,
- ownerInfo: this.ownerInfo,
- policyHolderInfo: this.policyHolderInfo,
- insuredPersonInfo: this.insuredPersonInfo,
- riskList: this.riskList,
- kindList: this.kindList,
- vehicleModel: this.vehicleModel,
- })
- }
- }, "navigateTo", true);
- },
- toQuoteDetail(orderno) {
- this.navigate({
- url: "/pages/carInsure1/quoteDetail1?orderno=" + orderno
- }, "navigateTo", true);
- },
- // 显示报错信息
- ErrorMsg(msg) {
- this.content = msg;
- this.msgshow = true;
- },
- //选择正确的车型
- async chooseCarType(item) {
- this.carInfo.brandName = item.modelname; //品牌型号
- this.carInfo.ciModelCode = item.vehiclecode; //行业车型编码
- this.carInfo.modelCode = item.modelcode;
- this.carInfo.seatCount = item.seatmax + '';
- this.carInfo.caryear = item.caryear;
- this.carInfo.exhaustScale = (item.exhaustscale * 1000) + '';
- this.carInfo.factory = item.factory;
- this.carInfo.factoryid = item.factorycode;
- this.carInfo.cimodelclass = item.inscarclassname;
- this.carInfo.powertype = item.powerType;
- this.carInfo.purchasePrice = item.purchaseprice + '';
- this.carInfo.modelcname = item.modelname;
- this.$refs.carTypePopup.hide()
- let a = await this.huanongquote(0);
- this.totalCompanyList[0].result = a;
- if (this.totalCompanyList[0].quoteCode != '4') {
- this.quoteCompanyCount++;
- let c = await this.zhongmeiquote(2);
- this.totalCompanyList[2].result = c;
- this.quoteCompanyCount++;
- let d = await this.tiananquote(1);
- this.totalCompanyList[1].result = d;
- this.quoteCompanyCount++;
- let b = await this.hengbangquote(3);
- this.totalCompanyList[3].result = b;
- this.quoteCompanyCount++;
- }
- },
- oneYearPast(time) {
- var date = new Date(time);
- date.setFullYear(date.getFullYear() + 1); //一年后
- date.setTime(date.getTime() - 24 * 60 * 60 * 1000); //一年后的前一天
- var strYear = date.getFullYear();
- var strMonth = date.getMonth() + 1;
- var strDay = date.getDate();
- var hh = date.getHours();
- if (hh < 10) {
- hh = "0" + hh;
- }
- if (strMonth < 10) {
- strMonth = "0" + strMonth;
- }
- if (strDay < 10) {
- strDay = "0" + strDay;
- }
- var datastr = strYear + "-" + strMonth + "-" + strDay + ' ' + hh + ':00:00';
- return datastr;
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- @import '@/style/mixin.scss';
- /* 头部车辆信息和特权Start */
- .carInfo {
- height: 330upx;
- background: -webkit-linear-gradient(0deg, rgba($themeColor, 0.6), rgba($themeColor, 0.8));
- background-size: 100% 100%;
- }
- .carInfo .topLeft {
- width: 120upx;
- font-size: 90upx;
- color: #FFFFFF;
- }
- .carInfo .topRight .brandName {
- width: 400upx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .carInfo .other {
- background-color: #FFFFFF;
- height: 80upx;
- border-radius: 15upx;
- box-sizing: border-box;
- }
- .carInfo .other .privilege {
- background-color: rgba($themeColor, 0.6);
- font-size: 24upx;
- color: #FFFFFF;
- font-weight: bold;
- }
- .carInfo .other .content {
- width: 460upx;
- margin-left: 15upx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .carInfo .other .icon {
- width: 30upx;
- }
- /* 头部车辆信息和特权End */
- .pageContent {
- position: relative;
- top: -50upx;
- padding-bottom: 100px;
- }
- /* 报价方案Start */
- .quotePlan {
- background: #FFFFFF;
- position: relative;
- border-radius: 20upx;
- }
- .quotePlan .header {
- height: 80upx;
- position: relative;
- border-bottom: 1px solid #E6E8EA;
- }
- .quotePlan .header .title {
- // font-size: 30upx;
- font-weight: bold;
- padding-left: 25upx;
- }
- .quotePlan .header .title:before {
- content: "";
- position: absolute;
- left: 30upx;
- top: 25upx;
- width: 8upx;
- height: 30upx;
- background-color: $themeColor;
- }
- .quotePlan .body {
- padding: 0 30upx 10upx;
- }
- .quotePlan .body .insurance {
- padding-bottom: 20upx;
- border-bottom: 1px dashed #E6E8EA;
- }
- .carTypeItem {
- padding: 0 30upx 20upx;
- border-bottom: 1px solid #e5e5e5;
- margin-top: 20upx;
- width: 100%;
- box-sizing: border-box;
- }
- .carTypeItem .nav .carseriesName {
- font-size: 34upx;
- width: 360upx;
- font-family: PingFangSC-Medium, PingFangSC;
- color: #4a4a4a;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .carTypeItem .nav .modelName {
- font-size: 26upx;
- width: 400upx;
- font-family: PingFangSC-Medium, PingFangSC;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .carTypeItem .nav .nav_box {
- margin: 10upx 0;
- }
- .carTypeItem .nav .nav_box .zid {
- display: inline-block;
- padding: 6upx 10upx;
- font-size: 24upx;
- height: 40upx;
- background: #AFC9F7;
- border-radius: 25upx;
- color: #007AFF;
- font-weight: bold;
- line-height: 40upx;
- }
- .carTypeItem .nav .nav_box>p {
- margin-left: 30upx;
- color: #999;
- font-size: 24upx;
- }
- .carTypeItem .price {
- font-size: 16px;
- width: 200upx;
- flex-shrink: 0;
- font-family: PingFangSC-Regular, PingFangSC;
- font-weight: 400;
- color: #007AFF;
- }
- .quotePlan .body .row {
- height: 70upx;
- }
- .quotePlan .body .date {
- background-color: $themeColor;
- color: $themeColor;
- font-size: 22upx;
- padding: 0upx 7upx;
- border-radius: 3upx;
- margin: 10upx;
- margin-right: 10upx;
- }
- /* 报价方案End */
- /* 报价公司Start */
- .quoteCompany {
- margin: 20upx 30upx;
- box-sizing: border-box;
- /* background:#FFFFFF; */
- position: relative;
- border-radius: 20upx;
- }
- .quoteCompany .header {
- height: 80upx;
- padding: 0 30upx;
- position: relative;
- }
- .quoteCompany .header .title {
- font-size: 30upx;
- font-weight: bold;
- padding-left: 25upx;
- }
- .quoteCompany .header .title:before {
- content: "";
- position: absolute;
- left: 30upx;
- top: 25upx;
- width: 8upx;
- height: 30upx;
- background-color: rgba($themeColor, 0.6);
- }
- .quoteCompany .header .title .icon {
- color: rgba($themeColor, 0.6);
- margin-left: 15upx;
- }
- .quoteCompanyItem {
- margin-bottom: 20upx;
- background: #FFFFFF;
- border-radius: 15upx;
- padding: 10px 20px;
- box-sizing: border-box;
- cursor: pointer;
- }
- .quoteCompanyItem .top {
- position: relative;
- }
- .quoteCompanyItem .top .companyIcon {
- flex-shrink: 0;
- }
- .quoteCompanyItem .top .companyIcon image {
- width: 34px;
- height: 34px;
- margin-right: 10px;
- }
- .quoteCompanyItem .top .companyName {
- font-size: 32upx;
- font-weight: bold;
- width: 180upx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .quoteCompanyItem .top .totalMoney {
- font-size: 40upx;
- font-weight: bold;
- color: $themeColor;
- position: absolute;
- top: -15upx;
- right: 0;
- }
- .quoteCompanyItem .top .tip {
- font-size: 26upx;
- font-weight: bold;
- color: #999;
- position: absolute;
- top: 0upx;
- right: 0;
- }
- .sum {
- color: #ea552d;
- font-size: 22px;
- font-weight: bold;
- }
- .quoteCompanyItem .top .signs {
- width: 500upx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .quoteCompanyItem .top .sign {
- height: 40upx;
- margin: 0upx 10upx;
- background: rgba($themeColor, 0.6);
- color: $themeColor;
- font-size: 20upx;
- margin-right: 10upx;
- border-radius: 6upx;
- padding: 0 2px;
- line-height: 40upx;
- }
- .jqsign {
- height: 20px;
- background: rgba(255, 177, 177, 0.55);
- color: #fd0a0a;
- font-size: 20upx;
- border-radius: 6upx;
- padding: 0 10px;
- box-sizing: border-box;
- }
- .quoteCompanyItem .body {
- padding: 20upx 0;
- flex-wrap: wrap;
- }
- .quoteCompanyItem .body>view {
- flex-shrink: 0;
- width: 50%;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .quoteCompanyItem .body .icon-exchange {
- margin-right: 15upx;
- display: inline-block;
- }
- /* 报价公司End */
- /* 查看详情按钮Start */
- .btn {
- font-size: 16px;
- color: #fff;
- background-color: #ea552d;
- margin-top: 10px;
- }
- /* 底部的样式Start */
- .infoBottom {
- height: 140upx;
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- background: #FFFFFF;
- border-top: 1upx solid #EEEEEE;
- z-index: 99;
- }
- .infoBottom>button {
- // font-size: 30upx;
- background: $themeColor;
- color: #FFFFFF;
- flex: 1;
- margin: 0upx 30upx;
- }
- /* 查看详情按钮End */
- </style>
|