12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247 |
- <template>
- <view class="page">
- <!-- 公共组件-每个页面必须引入 -->
- <public-module></public-module>
- <view class="plan-ins-title own-ins-title d-flex j-sb">
- <view class="title-left d-flex a-center j-center">已选险种</view>
- <view class="title-right d-flex a-center j-center" @tap="insureTip">投保方案建议<view
- class="icon iconfont icon-Group-" style="margin-left: 15upx;"></view>
- </view>
- </view>
- <view class="compulsory-insurance">
- <view class="common-title d-flex a-center">交强险 <view class="icon iconfont icon-Group-"
- style="margin-left: 15upx;color: #aaa;font-weight: normal;" @tap="CITips"></view>
- </view>
- <!-- <template v-if="CIInsureList.amount!=0"> -->
- <u-form ref="uForm" label-width="200px" v-if="CIInsureList.amount!=0" style="padding: 0 15px;">
- <u-form-item label="交强险投保日期">
- <u-input type="select" :select-open="jqstartShow" v-model="jqstartDate" placeholder="请选择开始时间"
- @click="jqstartShow = true"></u-input>
- <u-picker v-model="jqstartShow" mode="time" :params="params" @confirm="jqstartconfirm"></u-picker>
- </u-form-item>
- <u-form-item label="交强险终保日期">
- <u-input type="select" :select-open="jqendShow" v-model="jqendDate" placeholder="请选择结束时间"
- @click="jqendShow = true"></u-input>
- <u-picker v-model="jqendShow" mode="time" :params="params" @confirm="jqendconfirm"></u-picker>
- </u-form-item>
- </u-form>
- <view class="car-ins-cell d-flex j-sb common-ins-cell" @tap="adjustCIItem('CIInsureList')">
- <view class="cell-title d-flex a-center j-center">交强险</view>
- <view class="cell-desc d-flex a-center j-center">{{CIInsureList.amountDesc}}
- <view class="icon iconfont icon-youjiantou" style="font-size: 24upx;margin-left: 20upx;"></view>
- </view>
- </view>
- </view>
- <view class="business-insurance">
- <view class="common-title d-flex a-center">商业险 <view class="icon iconfont icon-Group-"
- style="margin-left: 15upx;color: #aaa;font-weight: normal;" @tap="BITips"></view>
- </view>
- <u-form ref="uForm" label-width="200px" style="padding: 0 15px;" v-if="BIInsureList.amount!=0">
- <u-form-item label="商业险投保日期">
- <u-input type="select" :select-open="systartShow" v-model="systartDate" placeholder="请选择开始时间"
- @click="systartShow = true"></u-input>
- <u-picker v-model="systartShow" mode="time" :params="params" @confirm="systartconfirm"></u-picker>
- </u-form-item>
- <u-form-item label="商业险投保日期">
- <u-input type="select" :select-open="syendShow" v-model="syendDate" placeholder="请选择开始时间"
- @click="syendShow = true"></u-input>
- <u-picker v-model="syendShow" mode="time" :params="params" @confirm="syendconfirm"></u-picker>
- </u-form-item>
- </u-form>
- <view class="car-ins-cell d-flex j-sb common-ins-cell" @tap="adjustCIItem('BIInsureList')">
- <view class="cell-title d-flex a-center j-center">商业险</view>
- <view class="cell-desc d-flex a-center j-center">{{BIInsureList.amountDesc}}
- <view class="icon iconfont icon-youjiantou" style="font-size: 24upx;margin-left: 20upx;"></view>
- </view>
- </view>
- </view>
- <view class="business-insurance">
- <block v-for="(insureItem,index) in insureList" :key="index">
- <template v-if="insureItem.amount != 0">
- <view class="car-ins-cell d-flex j-sb common-ins-cell" @tap="adjustBIItem(index)">
- <view class="cell-title d-flex a-center j-center">{{insureItem.kindName}}</view>
- <view class="cell-desc d-flex a-center j-center">{{insureItem.amountDesc}}
- <view class="icon iconfont icon-youjiantou" style="font-size: 24upx;margin-left: 20upx;">
- </view>
- </view>
- </view>
- </template>
- </block>
- <view v-if="insureCodeList.length>0">
- <view class="car-ins-cell d-flex j-sb common-ins-cell" style="border:none;">
- <view class="cell-title d-flex a-center j-center">增值服务</view>
- <view class="cell-desc d-flex a-center j-center">赠送</view>
- </view>
- <view
- style="margin:0 30upx 30upx; padding: 15upx;color: #A6A6A6;font-size: 24upx;background-color: #F8FAFC;">
- 注:包含道路救援/安全检测/代为驾驶/代为送检,投保以上商业主0险免费赠送,各家保司各个地区旅游差异,具体以保单信息为准</view>
- </view>
- </view>
- <view>
- <view class="plan-ins-title own-ins-title d-flex j-sb" v-if="insureCodeList.length < insureList.length">
- <view class="title-left d-flex a-center j-center main-text-color">未选险种</view>
- </view>
- <block v-for="(insureItem,index) in insureList" :key="index">
- <template
- v-if="(insureItem.amount == 0) && (insureItem.isMainRisk || (insureItem.isMainRisk && (insureCodeList.indexOf(insureItem.mainRiskCodeList)>=0))) ">
- <view class="car-ins-cell d-flex j-sb common-ins-cell" @tap="adjustBIItem(index)">
- <view class="cell-title d-flex a-center j-center">{{insureItem.kindName}}</view>
- <view class="cell-desc d-flex a-center j-center">{{insureItem.amountDesc}}
- <view class="icon iconfont icon-youjiantou" style="font-size: 24upx;margin-left: 20upx;">
- </view>
- </view>
- </view>
- </template>
- </block>
- </view>
- <view class="bottom-btn">
- <button type="primary" class="main-bg-color" @tap="toQuote">确定</button>
- </view>
- <wyb-popup ref="popupInsure" type="center" mode="size-fixed" height="700" width="600" radius="6">
- <view class="popupBody">
- <view class="popHeader d-flex a-center j-center">
- 投保方案建议
- </view>
- <scroll-view scroll-top="0" scroll-y="true" class="popupScroll">
- <view class="title">行驶城市</view>
- <view class="desc">可根据投保城市经济情况和自身经济情况,选择机动车第三者责任保险、车上人员责任保险(司机)、车上人员责任保险(乘客)等保障,建议保额相对高一些。</view>
- <view class="title">车辆情况</view>
- <view class="desc">可根据自己车辆年龄、价格、日常行驶路况、生活环境,选择机动车损失保险、全车盗抢、玻璃破碎、划痕、涉水损失险,高价格车辆建议配置保障。</view>
- <view class="title">费用承担</view>
- <view class="desc">如您不幸发生保险事故时,希望获得全额赔偿,不承担自费,可选择购买不计免赔。</view>
- </scroll-view>
- <view class="popBottom d-flex a-center j-center main-text-color" @tap="adjustPopupInsureSubmit">我知道了
- </view>
- </view>
- </wyb-popup>
- <!-- 交强选择方案 -->
- <wyb-popup ref="popupCI" type="bottom" mode="size-fixed" height="900" radius="6" :showCloseIcon="true">
- <view class="popup-content">
- <view class="popHeader d-flex a-center j-center">
- 选择方案
- </view>
- <scroll-view scroll-top="0" scroll-y="true" class="popContent">
- <view class="popContentTitle">{{insureItem.kindName}}</view>
- <view style="color: #999;font-size: 24upx;">{{insureItem.desc}}</view>
- <view>
- <block v-for="(amt,index) in insureItem.amtList" :key="index">
- <view class="amtSingle">
- <view :class="(amt.label== insureItem.amountDesc)?'active':''"
- @tap="adjustCIItemLabel(index)">{{amt.label}}</view>
- </view>
- </block>
- </view>
- </scroll-view>
- <view class="popBottom">
- <button class="main-bg-color" type="primary"
- @tap="adjustCIItemLabelSubmit(insureItem.kindCode)">完成</button>
- </view>
- </view>
- </wyb-popup>
- <!-- 商业选择方案 -->
- <wyb-popup ref="popupBI" type="bottom" mode="size-fixed" height="900" radius="6" :showCloseIcon="true">
- <view class="popup-content">
- <view class="popHeader d-flex a-center j-center">
- 选择方案
- </view>
- <scroll-view scroll-top="0" scroll-y="true" class="popContent">
- <view class="popContentTitle">{{insureItem.kindName}}</view>
- <view style="color: #999;font-size: 24upx;">{{insureItem.desc}}</view>
- <view>
- <block v-for="(amt,index) in insureItem.amtList" :key="index">
- <view class="amtSingle">
- <view :class="(amt.label== insureItem.amountDesc)?'active':''"
- @tap="adjustBIItemLabel(index)">{{amt.label}}</view>
- </view>
- </block>
- </view>
- </scroll-view>
- <view class="popBottom">
- <button class="main-bg-color" type="primary" @tap="adjustBIItemLabelSubmit()">完成</button>
- </view>
- </view>
- </wyb-popup>
- </view>
- </template>
- <script>
- import wybPopup from '@/components/modules/carInsure/wyb-popup/wyb-popup.vue'
- var dateTime = new Date();
- dateTime.setTime(dateTime.getTime() + 24 * 60 * 60 * 1000);
- var tomorrow = dateTime.getFullYear() + "-" + (((dateTime.getMonth() + 1) < 10) ? ("0" + (dateTime.getMonth() + 1)) :
- (dateTime.getMonth() + 1)) + "-" + ((dateTime.getDate() < 10) ? ("0" + dateTime.getDate() + ' 00:00') :
- dateTime
- .getDate() + ' 00:00:00');
- export default {
- components: {
- wybPopup
- },
- data() {
- return {
- carInfoRmation: [], //车辆
- ownerInfoRmation: [], //车主
- policyHolderInfoRmation: [], //投保人
- insuredPersonInfoRmation: [], //被保人
- form: {},
- jqstartShow: false, //交强起保日期
- jqendShow: false, //交强终保日期
- systartShow: false, //商业起保日期
- syendShow: false, //商业终保日期
- params: {
- year: true, //年
- month: true, //月
- day: true, //日
- hour: true, //时
- minute: true, //分
- second: true, //秒
- },
- carInfo: {}, //车辆信息
- ownerInfo: {}, //车主信息
- policyHolderInfo: {}, //投保人信息
- insuredPersonInfo: {}, //被保人信息
- riskList: [], //险种大类信息
- kindList: [], //商业险险别
- jqstartDate: tomorrow, //交强始
- jqendDate: " ", //交强终
- systartDate: tomorrow, //商业始
- syendDate: "", //商业终
- BIStartDate: tomorrow,
- insureItem: {}, //popup弹出框的参数
- insureCodeList: ["A", "B", "D3", "D4"],
- CIInsureList: {
- amount: "1",
- amountDesc: "投保",
- amtList: [{
- "label": "不投保",
- "value": "0"
- }, {
- "label": "投保",
- "value": "1"
- }],
- kindCode: "0507",
- kindName: "交强险",
- desc: "国家强制规定购买的险种,对第三方的人身或财产损失提供基本保障"
- },
- BIInsureList: {
- amount: "1",
- amountDesc: "投保",
- amtList: [{
- "label": "不投保",
- "value": "0"
- }, {
- "label": "投保",
- "value": "1"
- }],
- kindCode: "0510",
- kindName: "商业险",
- desc: "国家强制规定购买的险种,对第三方的人身或财产损失提供基本保障"
- },
- insureList: [{
- amount: "1",
- amountDesc: "投保",
- amtList: [{
- "label": "不投保",
- "value": "0"
- }, {
- "label": "投保",
- "value": "1"
- }],
- kindCode: "A",
- isMainRisk: true,
- kindName: "机动车损失险",
- desc: "保险期间内,被保险人或被保险机动车驾驶人在使用被保险机动车过程中,因自然灾害、意外事故、机动车被盗窃、抢劫、抢夺等情况(详见保险条款)造成被保险机动车直接损失,且不属于免除保险人责任的范围,保险人依照本保险合同的约定负责赔偿的险种。"
- },
- {
- amount: "1000000",
- amountDesc: "100万",
- 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: "10000",
- amountDesc: "1万",
- 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: "10000",
- amountDesc: "1万",
- 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"
- }
- ]
- }
- },
- // 监听导航栏的按钮
- onNavigationBarButtonTap(e) {
- if (e.index == 0) {
- this.navigate({
- url: '/pages/index/index'
- }, "switchTab", true);
- }
- },
- onShow() {
- dateTime = new Date();
- dateTime.setTime(dateTime.getTime() + 24 * 60 * 60 * 1000);
- },
- onLoad() {
- 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传送到当前页面的数据
- eventChannel.on('acceptData', (data) => {
- console.log(data)
- if (!!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.carInfoRmation = data.carInfoRmation; //车辆
- this.ownerInfoRmation = data.ownerInfoRmation; //车主
- this.policyHolderInfoRmation = data.policyHolderInfoRmation; //投保
- this.insuredPersonInfoRmation = data.insuredPersonInfoRmation; //被保人
- if (this.riskList.length > 0) {
- this.insureCodeList = [];
- this.riskList.map(ele => {
- switch (ele.riskCode) {
- case '0507':
- this.CIInsureList.amount = "1";
- this.CIInsureList.amountDesc = "投保";
- this.jqstartDate = ele.startDate;
- this.jqendDate = ele.endDate;
- break;
- case '0510':
- this.BIInsureList.amount = "1";
- this.BIInsureList.amountDesc = "投保";
- this.systartDate = ele.startDate;
- this.syendDate = ele.endDate;
- break;
- default:
- break;
- }
- })
- this.kindList.map(ele => {
- this.insureList.map(ele1 => {
- if (ele.kindCode == ele1.kindCode) {
- switch (ele.kindCode) {
- case 'A':
- ele1.amount = '1';
- ele1.amountDesc = '投保'
- break;
- case 'D4':
- case "SY_FJ_YBW2":
- ele1.amount = ele.unitAmount;
- ele1.amountDesc = this.toChinesNum(ele.unitAmount)
- break;
- case "MJ1":
- case "MJ2":
- case "MJ3":
- case "MJ4":
- ele1.amount = ele.deductibleRate;
- ele1.amountDesc = ele.deductibleRate + '%'
- break;
- default:
- ele1.amount = ele.amount;
- ele1.amountDesc = this.toChinesNum(ele.amount)
- break;
- }
- }
- })
- })
- }
- }
- })
- },
- computed: {
- startDate() {
- return this.getDate('start');
- },
- endDate() {
- return this.getDate('end');
- }
- },
- methods: {
- jqstartconfirm(e) {
- this.jqstartDate = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
- this.jqendDate = this.oneYearPast(this.jqstartDate)
- },
- jqendconfirm(e) {
- this.jqendDate = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
- },
- systartconfirm(e) {
- this.systartDate = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
- this.syendDate = this.oneYearPast(this.systartDate)
- },
- syendconfirm(e) {
- this.syendDate = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
- },
- insureTip() {
- this.$refs.popupInsure.show() // 显示
- },
- adjustPopupInsureSubmit() {
- this.$refs.popupInsure.hide() // 显示
- },
- // 交强险提示
- CITips() {
- uni.showModal({
- title: "交强险",
- content: "指“机动车交通事故责任强制保险”,是由保险公司对被保险机动车发生道路交通事故造成受害人(不包括本车人员和被保险人)的人身伤亡、财产损失,在责任限额内予以赔偿的强制性责任保险。",
- showCancel: false,
- confirmText: "我知道了"
- })
- },
- // 商业险提示
- BITips() {
- uni.showModal({
- title: "商业险",
- content: "指给车辆加上一份全面保障。详细险种包含:第三者责任险、盗抢险、车上人员责任险、车辆损失险、车身划痕损失险、自燃损失险、涉水险等,是您和爱车的必要保障。",
- showCancel: false,
- confirmText: "我知道了"
- })
- },
- //弹出popup框并显示基本信息
- adjustBIItem(index) {
- var a = {};
- Object.assign(a, this.insureList[index])
- this.insureItem = a;
- this.$refs.popupBI.show() // 显示
- },
- //popup内容的label改变
- adjustBIItemLabel(index) {
- this.insureItem.amount = this.insureItem.amtList[index].value;
- this.insureItem.amountDesc = this.insureItem.amtList[index].label;
- },
- // 提交popup的label修改
- adjustBIItemLabelSubmit() {
- for (let i = 0; i < this.insureList.length; i++) {
- if (this.insureItem.kindCode == this.insureList[i].kindCode) {
- this.insureList[i].amount = this.insureItem.amount;
- this.insureList[i].amountDesc = this.insureItem.amountDesc;
- if (this.insureItem.kindCode == 'B') {
- if (this.insureItem.amount != 0) {
- this.insureList[9].amtList[1].value = this.insureItem.amount;
- } else {
- this.insureList[9].amtList[1].value = '1';
- }
- }
- if (this.insureList[i].isMainRisk && this.insureList[i].amount == '0') {
- for (let j = 0; j < this.insureList.length; j++) {
- if ((!this.insureList[j].isMainRisk) && (this.insureList[j].mainRiskCodeList == this
- .insureList[i].kindCode)) {
- this.insureList[j].amount = this.insureList[j].amtList[0].value;
- this.insureList[j].amountDesc = this.insureList[j].amtList[0].label;
- }
- }
- }
- var codeList = []
- for (let m = 0; m < this.insureList.length; m++) {
- if (this.insureList[m].amount != '0') {
- codeList.push(this.insureList[m].kindCode);
- }
- }
- this.insureCodeList = [];
- Object.assign(this.insureCodeList, codeList)
- if (this.insureCodeList.length > 0) {
- this.BIInsureList.amount = '1';
- this.BIInsureList.amountDesc = '投保';
- } else {
- this.BIInsureList.amount = '0';
- this.BIInsureList.amountDesc = '不投保';
- }
- break;
- }
- }
- this.$refs.popupBI.hide();
- },
- getDate(type) {
- const date = new Date();
- if (type === 'start') {
- date.setTime(date.getTime());
- } else if (type === 'end') {
- date.setTime(date.getTime() + 24 * 60 * 60 * 1000 * 90);
- }
- let year = date.getFullYear();
- let month = date.getMonth() + 1;
- let day = date.getDate();
- month = month > 9 ? month : '0' + month;;
- day = day > 9 ? day : '0' + day;
- return `${year}-${month}-${day}`;
- },
- //日期的选择
- bindDateChange(e, startDateType) {
- const date = new Date();
- const date1 = date.getTime();
- const date2 = date.getTime() + 24 * 60 * 60 * 1000 * 90;
- const date3 = new Date(e.detail.value).getTime();
- if (((date3 - date1) > 0) && ((date3 - date2) > 0)) {
- return uni.showToast({
- icon: "none",
- title: "投保日期须在90天内"
- })
- }
- this[startDateType] = e.detail.value;
- },
- //交强险弹出框
- adjustCIItem(type) {
- var a = {};
- Object.assign(a, this[type]);
- this.insureItem = a;
- this.$refs.popupCI.show() // 显示
- },
- adjustCIItemLabel(index) {
- this.insureItem.amount = this.insureItem.amtList[index].value;
- this.insureItem.amountDesc = this.insureItem.amtList[index].label;
- },
- adjustCIItemLabelSubmit(kindCode) {
- var a = {};
- if (kindCode == '0507') {
- this.CIInsureList = {};
- Object.assign(a, this.insureItem)
- this.CIInsureList = a;
- }
- if (kindCode == '0510') {
- if (this.insureItem.amount == '0') {
- this.insureCodeList = [];
- for (let i = 0; i < this.insureList.length; i++) {
- this.insureList[i].amount = '0';
- this.insureList[i].amountDesc = '不投保';
- }
- } else {
- // 车损险
- this.insureList[0].amount = 1;
- this.insureList[0].amountDesc = "投保";
- // 三者险
- this.insureList[1].amount = 1000000;
- this.insureList[1].amountDesc = "100万";
- // 司机险
- this.insureList[2].amount = 10000;
- this.insureList[2].amountDesc = "1万";
- // 乘客险
- this.insureList[3].amount = 10000;
- this.insureList[3].amountDesc = "1万";
- this.insureList[4].amount = 0;
- this.insureList[4].amountDesc = "不投保";
- }
- this.BIInsureList = {};
- Object.assign(a, this.insureItem)
- this.BIInsureList = a;
- }
- this.$refs.popupCI.hide() // 显示
- },
- //跳转报价页面
- toQuote() {
- var riskList = []; //险种大类信息
- var kindList = []; //商业险险别
- if (this.CIInsureList.amount == '1') {
- this.jqstartDate = this.transformTime(this.jqstartDate);
- this.jqendDate = this.transformTime(this.jqendDate);
- riskList.push({
- amount: "200000",
- premium: "0",
- riskCode: "0507",
- startDate: this.jqstartDate,
- endDate: this.jqendDate,
- instantFlag: "0"
- })
- }
- if (this.BIInsureList.amount == '1') {
- this.systartDate = this.transformTime(this.systartDate);
- this.syendDate = this.transformTime(this.syendDate);
- riskList.push({
- startDate: this.systartDate,
- endDate: this.syendDate,
- quotePreceptName: "",
- quotePreceptCode: "",
- instantFlag: "0",
- premium: "0",
- riskCode: "0510"
- })
- this.insureList.map((ele, index) => {
- if (
- ele.amount != "0" &&
- (ele.kindCode == "D4" || ele.kindCode == "SY_FJ_YBW2")
- ) {
- kindList.push({
- unitAmount: this.insureList[index].amount,
- kindCode: this.insureList[index].kindCode,
- kindName: this.insureList[index].kindName
- });
- } else if (
- ele.amount != "0" &&
- (ele.kindCode == "MJ1" ||
- ele.kindCode == "MJ2" ||
- ele.kindCode == "MJ3" ||
- ele.kindCode == "MJ4")
- ) {
- kindList.push({
- deductibleRate: this.insureList[index].amount,
- kindCode: this.insureList[index].kindCode,
- kindName: this.insureList[index].kindName
- });
- } else if (ele.amount != "0") {
- kindList.push({
- amount: this.insureList[index].amount,
- kindCode: this.insureList[index].kindCode,
- kindName: this.insureList[index].kindName
- });
- }
- return ele;
- });
- }
- if (riskList.length == 0) {
- return uni.showToast({
- icon: "none",
- title: "请至少选择一种主险"
- })
- }
- console.log(riskList, kindList)
- this.navigate({
- url: '/pages/carInsure1/quote1',
- success: (res) => {
- res.eventChannel.emit("acceptData", {
- carInfo: this.carInfo,
- ownerInfo: this.ownerInfo,
- policyHolderInfo: this.policyHolderInfo,
- insuredPersonInfo: this.insuredPersonInfo,
- riskList: riskList,
- kindList: kindList,
- carInfoRmation: this.carInfoRmation, //车辆
- ownerInfoRmation: this.ownerInfoRmation, //车主
- policyHolderInfoRmation: this.policyHolderInfoRmation, //投保人
- insuredPersonInfoRmation: this.insuredPersonInfoRmation, //被保人
- })
- }
- }, "navigateTo", true);
- },
- //计算输入时间一年后的的前一天(输入的参数为字符串("2019-03-02")最终输出也为日期的字符串)
- 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;
- },
- //次日
- nextday() {
- var date = new Date();
- date.setFullYear(date.getFullYear());
- date.setTime(date.getTime() + 24 * 60 * 60 * 1000);
- var strYear = date.getFullYear();
- var strDay = date.getDate();
- var strMonth = date.getMonth() + 1;
- 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 + " " + "00:00:00";
- return datastr;
- },
- //时间转换
- transformTime(date) {
- var d = new Date(date);
- var strYear = d.getFullYear();
- var strMonth = d.getMonth() + 1;
- var strDay = d.getDate();
- var hh = d.getHours();
- if (hh < 10) {
- hh = "0" + hh;
- }
- if (strMonth < 10) {
- strMonth = "0" + strMonth;
- }
- if (strDay < 10) {
- strDay = "0" + strDay;
- }
- var datetime =
- strYear + "-" + strMonth + "-" + strDay + " " + hh + ":00:00";
- return datetime;
- },
- toChinesNum(num) {
- let changeNum = [
- "零", "1", "2", "3", "4", "5", "6", "7", "8", "9"
- ];
- let unit = ["", "0", "00", "000", "0000"];
- num = parseInt(num);
- let getWan = temp => {
- let strArr = temp
- .toString()
- .split("")
- .reverse();
- let newNum = "";
- let newArr = [];
- strArr.forEach((item, index) => {
- newArr.unshift(
- item === "0" ? changeNum[item] : changeNum[item] + unit[index]
- );
- });
- let numArr = [];
- newArr.forEach((m, n) => {
- if (m !== "零") numArr.push(n);
- });
- if (newArr.length > 1) {
- newArr.forEach((m, n) => {
- if (newArr[newArr.length - 1] === "零") {
- if (n <= numArr[numArr.length - 1]) {
- newNum += m;
- }
- } else {
- newNum += m;
- }
- });
- } else {
- newNum = newArr[0];
- }
- return newNum;
- };
- let overWan = Math.floor(num / 10000);
- let noWan = num % 10000;
- if (noWan.toString().length < 4) {
- noWan = "0" + noWan;
- }
- return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num);
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- @import '@/style/mixin.scss';
- /* 整个页面的统一样式 Start */
- .page {
- padding-bottom: 200upx;
- }
- /* 整个页面的统一样式 End */
- .plan-ins-title {
- background-color: #F4F5F7;
- height: 88upx;
- color: #666;
- font-size: 32upx;
- line-height: 88upx;
- font-weight: 400;
- padding: 0 30upx;
- }
- .plan-ins-title .title-right {
- color: #aaa;
- }
- .compulsory-insurance,
- .business-insurance {
- border-bottom: 15upx solid #eee;
- }
- .common-title {
- font-size: 32upx;
- padding: 0upx 32upx;
- height: 90upx;
- border-bottom: 1px solid #eee;
- font-weight: bold;
- }
- .common-ins-cell {
- font-size: 30upx;
- padding: 0upx 30upx;
- height: 90upx;
- border-bottom: 1px solid #eee;
- }
- /* 底部按钮Start */
- .bottom-btn {
- background-color: #fff;
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- padding: 30upx 30upx;
- }
- /* 底部按钮End */
- /* 交强险和商业险弹出框Start */
- .popup-content {
- position: relative;
- }
- .popHeader {
- box-sizing: border-box;
- font-size: 32upx;
- font-weight: bold;
- height: 120upx;
- border-bottom: 1px solid #eee;
- }
- .popup-content .popContent {
- padding: 0upx 30upx;
- height: 620upx;
- box-sizing: border-box;
- }
- .popup-content .popContent .popContentTitle {
- font-weight: bold;
- font-size: 32upx;
- margin: 20upx 0upx 5upx 0upx;
- }
- .popup-content .popContent .amtSingle {
- width: 25%;
- box-sizing: border-box;
- display: inline-block;
- padding: 15upx;
- text-align: center;
- vertical-align: middle;
- }
- .popup-content .popContent .amtSingle>view {
- font-size: 28upx;
- border: 1px solid #eee;
- border-radius: 10upx;
- }
- .popup-content .popContent .amtSingle>view.active {
- background: rgba($themeColor, .08);
- color: $themeColor;
- border: 1px solid rgba($themeColor, .01);
- font-weight: 700;
- }
- .popup-content .popBottom {
- margin: 30upx 30upx 0 30upx;
- padding-bottom: 30upx;
- }
- /* 交强险和商业险弹出框End */
- /* 投保方案建议弹出框Start */
- .popupBody {
- position: relative;
- }
- .popupBody .popHeader {
- border: none;
- }
- .popupBody .popBottom {
- position: fixed;
- box-sizing: border-box;
- bottom: 0;
- width: 100%;
- height: 100upx;
- border-top: 1px solid #f6f6f6;
- font-weight: 700;
- font-size: 36upx;
- }
- .popupBody .popupScroll {
- height: 485upx;
- padding: 0 30upx 0 30upx;
- box-sizing: border-box;
- }
- .popupScroll .title {
- font-weight: 700;
- font-size: 30upx;
- }
- .popupScroll .desc {
- font-size: 28upx;
- }
- /* 投保方案建议弹出框End */
- </style>
|