insureItems1.vue 37 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220
  1. <template>
  2. <view class="page">
  3. <!-- 公共组件-每个页面必须引入 -->
  4. <public-module></public-module>
  5. <view class="plan-ins-title own-ins-title d-flex j-sb">
  6. <view class="title-left d-flex a-center j-center">已选险种</view>
  7. <view class="title-right d-flex a-center j-center" @tap="insureTip">投保方案建议<view
  8. class="icon iconfont icon-Group-" style="margin-left: 15upx;"></view>
  9. </view>
  10. </view>
  11. <view class="compulsory-insurance">
  12. <view class="common-title d-flex a-center">交强险 <view class="icon iconfont icon-Group-"
  13. style="margin-left: 15upx;color: #aaa;font-weight: normal;" @tap="CITips"></view>
  14. </view>
  15. <!-- <template v-if="CIInsureList.amount!=0"> -->
  16. <u-form ref="uForm" label-width="200px" v-if="CIInsureList.amount!=0" style="padding: 0 15px;">
  17. <u-form-item label="交强险投保日期">
  18. <u-input type="select" :select-open="jqstartShow" v-model="jqstartDate" placeholder="请选择开始时间"
  19. @click="jqstartShow = true"></u-input>
  20. <u-picker v-model="jqstartShow" mode="time" :params="params" @confirm="jqstartconfirm"></u-picker>
  21. </u-form-item>
  22. <u-form-item label="交强险终保日期">
  23. <u-input type="select" :select-open="jqendShow" v-model="jqendDate" placeholder="请选择结束时间"
  24. @click="jqendShow = true"></u-input>
  25. <u-picker v-model="jqendShow" mode="time" :params="params" @confirm="jqendconfirm"></u-picker>
  26. </u-form-item>
  27. </u-form>
  28. <view class="car-ins-cell d-flex j-sb common-ins-cell" @tap="adjustCIItem('CIInsureList')">
  29. <view class="cell-title d-flex a-center j-center">交强险</view>
  30. <view class="cell-desc d-flex a-center j-center">{{CIInsureList.amountDesc}}
  31. <view class="icon iconfont icon-youjiantou" style="font-size: 24upx;margin-left: 20upx;"></view>
  32. </view>
  33. </view>
  34. </view>
  35. <view class="business-insurance">
  36. <view class="common-title d-flex a-center">商业险 <view class="icon iconfont icon-Group-"
  37. style="margin-left: 15upx;color: #aaa;font-weight: normal;" @tap="BITips"></view>
  38. </view>
  39. <u-form ref="uForm" label-width="200px" style="padding: 0 15px;" v-if="BIInsureList.amount!=0">
  40. <u-form-item label="商业险投保日期">
  41. <u-input type="select" :select-open="systartShow" v-model="systartDate" placeholder="请选择开始时间"
  42. @click="systartShow = true"></u-input>
  43. <u-picker v-model="systartShow" mode="time" :params="params" @confirm="systartconfirm"></u-picker>
  44. </u-form-item>
  45. <u-form-item label="商业险投保日期">
  46. <u-input type="select" :select-open="syendShow" v-model="syendDate" placeholder="请选择开始时间"
  47. @click="syendShow = true"></u-input>
  48. <u-picker v-model="syendShow" mode="time" :params="params" @confirm="syendconfirm"></u-picker>
  49. </u-form-item>
  50. </u-form>
  51. <view class="car-ins-cell d-flex j-sb common-ins-cell" @tap="adjustCIItem('BIInsureList')">
  52. <view class="cell-title d-flex a-center j-center">商业险</view>
  53. <view class="cell-desc d-flex a-center j-center">{{BIInsureList.amountDesc}}
  54. <view class="icon iconfont icon-youjiantou" style="font-size: 24upx;margin-left: 20upx;"></view>
  55. </view>
  56. </view>
  57. </view>
  58. <view class="business-insurance">
  59. <block v-for="(insureItem,index) in insureList" :key="index">
  60. <template v-if="insureItem.amount != 0">
  61. <view class="car-ins-cell d-flex j-sb common-ins-cell" @tap="adjustBIItem(index)">
  62. <view class="cell-title d-flex a-center j-center">{{insureItem.kindName}}</view>
  63. <view class="cell-desc d-flex a-center j-center">{{insureItem.amountDesc}}
  64. <view class="icon iconfont icon-youjiantou" style="font-size: 24upx;margin-left: 20upx;">
  65. </view>
  66. </view>
  67. </view>
  68. </template>
  69. </block>
  70. <view v-if="insureCodeList.length>0">
  71. <view class="car-ins-cell d-flex j-sb common-ins-cell" style="border:none;">
  72. <view class="cell-title d-flex a-center j-center">增值服务</view>
  73. <view class="cell-desc d-flex a-center j-center">赠送</view>
  74. </view>
  75. <view
  76. style="margin:0 30upx 30upx; padding: 15upx;color: #A6A6A6;font-size: 24upx;background-color: #F8FAFC;">
  77. 注:包含道路救援/安全检测/代为驾驶/代为送检,投保以上商业主0险免费赠送,各家保司各个地区旅游差异,具体以保单信息为准</view>
  78. </view>
  79. </view>
  80. <view>
  81. <view class="plan-ins-title own-ins-title d-flex j-sb" v-if="insureCodeList.length < insureList.length">
  82. <view class="title-left d-flex a-center j-center main-text-color">未选险种</view>
  83. </view>
  84. <block v-for="(insureItem,index) in insureList" :key="index">
  85. <template
  86. v-if="(insureItem.amount == 0) && (insureItem.isMainRisk || (insureItem.isMainRisk && (insureCodeList.indexOf(insureItem.mainRiskCodeList)>=0))) ">
  87. <view class="car-ins-cell d-flex j-sb common-ins-cell" @tap="adjustBIItem(index)">
  88. <view class="cell-title d-flex a-center j-center">{{insureItem.kindName}}</view>
  89. <view class="cell-desc d-flex a-center j-center">{{insureItem.amountDesc}}
  90. <view class="icon iconfont icon-youjiantou" style="font-size: 24upx;margin-left: 20upx;">
  91. </view>
  92. </view>
  93. </view>
  94. </template>
  95. </block>
  96. </view>
  97. <view class="bottom-btn">
  98. <button type="primary" class="main-bg-color" @tap="toQuote">确定</button>
  99. </view>
  100. <wyb-popup ref="popupInsure" type="center" mode="size-fixed" height="700" width="600" radius="6">
  101. <view class="popupBody">
  102. <view class="popHeader d-flex a-center j-center">
  103. 投保方案建议
  104. </view>
  105. <scroll-view scroll-top="0" scroll-y="true" class="popupScroll">
  106. <view class="title">行驶城市</view>
  107. <view class="desc">可根据投保城市经济情况和自身经济情况,选择机动车第三者责任保险、车上人员责任保险(司机)、车上人员责任保险(乘客)等保障,建议保额相对高一些。</view>
  108. <view class="title">车辆情况</view>
  109. <view class="desc">可根据自己车辆年龄、价格、日常行驶路况、生活环境,选择机动车损失保险、全车盗抢、玻璃破碎、划痕、涉水损失险,高价格车辆建议配置保障。</view>
  110. <view class="title">费用承担</view>
  111. <view class="desc">如您不幸发生保险事故时,希望获得全额赔偿,不承担自费,可选择购买不计免赔。</view>
  112. </scroll-view>
  113. <view class="popBottom d-flex a-center j-center main-text-color" @tap="adjustPopupInsureSubmit">我知道了
  114. </view>
  115. </view>
  116. </wyb-popup>
  117. <!-- 交强选择方案 -->
  118. <wyb-popup ref="popupCI" type="bottom" mode="size-fixed" height="900" radius="6" :showCloseIcon="true">
  119. <view class="popup-content">
  120. <view class="popHeader d-flex a-center j-center">
  121. 选择方案
  122. </view>
  123. <scroll-view scroll-top="0" scroll-y="true" class="popContent">
  124. <view class="popContentTitle">{{insureItem.kindName}}</view>
  125. <view style="color: #999;font-size: 24upx;">{{insureItem.desc}}</view>
  126. <view>
  127. <block v-for="(amt,index) in insureItem.amtList" :key="index">
  128. <view class="amtSingle">
  129. <view :class="(amt.label== insureItem.amountDesc)?'active':''"
  130. @tap="adjustCIItemLabel(index)">{{amt.label}}</view>
  131. </view>
  132. </block>
  133. </view>
  134. </scroll-view>
  135. <view class="popBottom">
  136. <button class="main-bg-color" type="primary"
  137. @tap="adjustCIItemLabelSubmit(insureItem.kindCode)">完成</button>
  138. </view>
  139. </view>
  140. </wyb-popup>
  141. <!-- 商业选择方案 -->
  142. <wyb-popup ref="popupBI" type="bottom" mode="size-fixed" height="900" radius="6" :showCloseIcon="true">
  143. <view class="popup-content">
  144. <view class="popHeader d-flex a-center j-center">
  145. 选择方案
  146. </view>
  147. <scroll-view scroll-top="0" scroll-y="true" class="popContent">
  148. <view class="popContentTitle">{{insureItem.kindName}}</view>
  149. <view style="color: #999;font-size: 24upx;">{{insureItem.desc}}</view>
  150. <view>
  151. <block v-for="(amt,index) in insureItem.amtList" :key="index">
  152. <view class="amtSingle">
  153. <view :class="(amt.label== insureItem.amountDesc)?'active':''"
  154. @tap="adjustBIItemLabel(index)">{{amt.label}}</view>
  155. </view>
  156. </block>
  157. </view>
  158. </scroll-view>
  159. <view class="popBottom">
  160. <button class="main-bg-color" type="primary" @tap="adjustBIItemLabelSubmit()">完成</button>
  161. </view>
  162. </view>
  163. </wyb-popup>
  164. </view>
  165. </template>
  166. <script>
  167. import wybPopup from '@/components/modules/carInsure/wyb-popup/wyb-popup.vue'
  168. var dateTime = new Date();
  169. dateTime.setTime(dateTime.getTime() + 24 * 60 * 60 * 1000);
  170. var tomorrow = dateTime.getFullYear() + "-" + (((dateTime.getMonth() + 1) < 10) ? ("0" + (dateTime.getMonth() + 1)) :
  171. (dateTime.getMonth() + 1)) + "-" + ((dateTime.getDate() < 10) ? ("0" + dateTime.getDate() + ' 00:00') :
  172. dateTime
  173. .getDate() + ' 00:00:00');
  174. export default {
  175. components: {
  176. wybPopup
  177. },
  178. data() {
  179. return {
  180. form: {},
  181. jqstartShow: false, //交强起保日期
  182. jqendShow: false, //交强终保日期
  183. systartShow: false, //商业起保日期
  184. syendShow: false, //商业终保日期
  185. params: {
  186. year: true, //年
  187. month: true, //月
  188. day: true, //日
  189. hour: true, //时
  190. minute: true, //分
  191. second: true, //秒
  192. },
  193. carInfo: {}, //车辆信息
  194. ownerInfo: {}, //车主信息
  195. policyHolderInfo: {}, //投保人信息
  196. insuredPersonInfo: {}, //被保人信息
  197. riskList: [], //险种大类信息
  198. kindList: [], //商业险险别
  199. jqstartDate: tomorrow, //交强始
  200. jqendDate: " ", //交强终
  201. systartDate: tomorrow, //商业始
  202. syendDate: tomorrow, //商业终
  203. BIStartDate: tomorrow,
  204. insureItem: {}, //popup弹出框的参数
  205. insureCodeList: ["A", "B", "D3", "D4"],
  206. CIInsureList: {
  207. amount: "1",
  208. amountDesc: "投保",
  209. amtList: [{
  210. "label": "不投保",
  211. "value": "0"
  212. }, {
  213. "label": "投保",
  214. "value": "1"
  215. }],
  216. kindCode: "0507",
  217. kindName: "交强险",
  218. desc: "国家强制规定购买的险种,对第三方的人身或财产损失提供基本保障"
  219. },
  220. BIInsureList: {
  221. amount: "1",
  222. amountDesc: "投保",
  223. amtList: [{
  224. "label": "不投保",
  225. "value": "0"
  226. }, {
  227. "label": "投保",
  228. "value": "1"
  229. }],
  230. kindCode: "0510",
  231. kindName: "商业险",
  232. desc: "国家强制规定购买的险种,对第三方的人身或财产损失提供基本保障"
  233. },
  234. insureList: [{
  235. amount: "1",
  236. amountDesc: "投保",
  237. amtList: [{
  238. "label": "不投保",
  239. "value": "0"
  240. }, {
  241. "label": "投保",
  242. "value": "1"
  243. }],
  244. kindCode: "A",
  245. isMainRisk: true,
  246. kindName: "机动车损失险",
  247. desc: "保险期间内,被保险人或被保险机动车驾驶人在使用被保险机动车过程中,因自然灾害、意外事故、机动车被盗窃、抢劫、抢夺等情况(详见保险条款)造成被保险机动车直接损失,且不属于免除保险人责任的范围,保险人依照本保险合同的约定负责赔偿的险种。"
  248. },
  249. {
  250. amount: "1000000",
  251. amountDesc: "100万",
  252. amtList: [{
  253. label: "不投保",
  254. value: "0"
  255. },
  256. {
  257. label: "50万",
  258. value: "500000"
  259. },
  260. {
  261. label: "100万",
  262. value: "1000000"
  263. },
  264. {
  265. label: "150万",
  266. value: "1500000"
  267. },
  268. {
  269. label: "200万",
  270. value: "2000000"
  271. },
  272. {
  273. label: "250万",
  274. value: "2500000"
  275. },
  276. {
  277. label: "300万",
  278. value: "3000000"
  279. },
  280. {
  281. label: "500万",
  282. value: "5000000"
  283. },
  284. {
  285. label: "1000万",
  286. value: "10000000"
  287. }
  288. ],
  289. kindCode: "B",
  290. isMainRisk: true,
  291. kindName: "第三者责任险",
  292. desc: "保险期间内,被保险人或其允许的驾驶人在使用被保险机动车过程中发生意外事故,致使第三者遭受人身伤亡或财产直接损毁,依法应当对第三者承担的损害赔偿责任,且不属于免除保险人责任的范围,保险人依照本保险合同的约定,对于超过机动车交通事故责任强制保险各分项赔偿限额的部分负责赔偿的险种。"
  293. },
  294. {
  295. amount: "10000",
  296. amountDesc: "1万",
  297. amtList: [{
  298. "label": "不投保",
  299. "value": "0"
  300. }, {
  301. "label": "1万",
  302. "value": "10000"
  303. }, {
  304. "label": "2万",
  305. "value": "20000"
  306. }, {
  307. "label": "5万",
  308. "value": "50000"
  309. }, {
  310. "label": "10万",
  311. "value": "100000"
  312. }, {
  313. "label": "15万",
  314. "value": "150000"
  315. }, {
  316. "label": "20万",
  317. "value": "200000"
  318. }],
  319. kindCode: "D3",
  320. isMainRisk: true,
  321. kindName: "司机责任险",
  322. desc: "保险期间内,被保险人或其允许的驾驶人在使用被保险机动车过程中发生意外事故,致使车上人员遭受人身伤亡,且不属于免除保险人责任的范围,依法应当对车上人员承担的损害赔偿责任,保险人依照本保险合同的约定负责赔偿的险种。"
  323. },
  324. {
  325. amount: "10000",
  326. amountDesc: "1万",
  327. amtList: [{
  328. "label": "不投保",
  329. "value": "0"
  330. }, {
  331. "label": "1万",
  332. "value": "10000"
  333. }, {
  334. "label": "2万",
  335. "value": "20000"
  336. }, {
  337. "label": "4万",
  338. "value": "40000"
  339. }, {
  340. "label": "5万",
  341. "value": "50000"
  342. }, {
  343. "label": "10万",
  344. "value": "100000"
  345. }, {
  346. "label": "15万",
  347. "value": "150000"
  348. }, {
  349. "label": "20万",
  350. "value": "200000"
  351. }],
  352. kindCode: "D4",
  353. isMainRisk: true,
  354. kindName: "乘客责任险",
  355. desc: "保险期间内,被保险人或其允许的驾驶人在使用被保险机动车过程中发生意外事故,致使车上人员遭受人身伤亡,且不属于免除保险人责任的范围,依法应当对车上人员承担的损害赔偿责任,保险人依照本保险合同的约定负责赔偿的险种。"
  356. },
  357. {
  358. amount: "0",
  359. amountDesc: "不投保",
  360. amtList: [{
  361. "label": "不投保",
  362. "value": "0"
  363. }, {
  364. "label": "2000",
  365. "value": "2000"
  366. }, {
  367. "label": "5000",
  368. "value": "5000"
  369. }, {
  370. "label": "1万",
  371. "value": "10000"
  372. }],
  373. desc: "保险期间内,被保险机动车在被保险人或被保险机动车驾驶人使用过程中,发生无明显碰撞痕迹的车身划痕损失,保险人按照保险合同约定负责赔偿的险种",
  374. isMainRisk: true,
  375. kindCode: "L",
  376. kindName: "车身划痕险",
  377. mainRiskCodeList: "A"
  378. },
  379. {
  380. amount: "0",
  381. amountDesc: "不投保",
  382. amtList: [{
  383. "label": "不投保",
  384. "value": "0"
  385. }, {
  386. "label": "5%",
  387. "value": "5"
  388. }, {
  389. "label": "10%",
  390. "value": "10"
  391. }, {
  392. "label": "15%",
  393. "value": "15"
  394. }, {
  395. "label": "20%",
  396. "value": "20"
  397. }],
  398. desc: "被保险机动车发生主险约定的保险事故,保险人按照主险的约定计算赔款后,扣减本特约条款约定的免赔的险种。",
  399. isMainRisk: true,
  400. kindCode: "MJ1",
  401. kindName: "绝对免赔率特约险(车损)",
  402. mainRiskCodeList: "A"
  403. },
  404. {
  405. amount: "0",
  406. amountDesc: "不投保",
  407. amtList: [{
  408. "label": "不投保",
  409. "value": "0"
  410. }, {
  411. "label": "5%",
  412. "value": "5"
  413. }, {
  414. "label": "10%",
  415. "value": "10"
  416. }, {
  417. "label": "15%",
  418. "value": "15"
  419. }, {
  420. "label": "20%",
  421. "value": "20"
  422. }],
  423. desc: "被保险机动车发生主险约定的保险事故,保险人按照主险的约定计算赔款后,扣减本特约条款约定的免赔的险种。",
  424. isMainRisk: true,
  425. kindCode: "MJ2",
  426. kindName: "绝对免赔率特约险(三者)",
  427. mainRiskCodeList: "B"
  428. },
  429. {
  430. amount: "0",
  431. amountDesc: "不投保",
  432. amtList: [{
  433. "label": "不投保",
  434. "value": "0"
  435. }, {
  436. "label": "5%",
  437. "value": "5"
  438. }, {
  439. "label": "10%",
  440. "value": "10"
  441. }, {
  442. "label": "15%",
  443. "value": "15"
  444. }, {
  445. "label": "20%",
  446. "value": "20"
  447. }],
  448. desc: "被保险机动车发生主险约定的保险事故,保险人按照主险的约定计算赔款后,扣减本特约条款约定的免赔的险种。",
  449. isMainRisk: true,
  450. kindCode: "MJ3",
  451. kindName: "绝对免赔率特约险(司机)",
  452. mainRiskCodeList: "D3"
  453. },
  454. {
  455. amount: "0",
  456. amountDesc: "不投保",
  457. amtList: [{
  458. "label": "不投保",
  459. "value": "0"
  460. }, {
  461. "label": "5%",
  462. "value": "5"
  463. }, {
  464. "label": "10%",
  465. "value": "10"
  466. }, {
  467. "label": "15%",
  468. "value": "15"
  469. }, {
  470. "label": "20%",
  471. "value": "20"
  472. }],
  473. desc: "被保险机动车发生主险约定的保险事故,保险人按照主险的约定计算赔款后,扣减本特约条款约定的免赔的险种。",
  474. isMainRisk: true,
  475. kindCode: "MJ4",
  476. kindName: "绝对免赔率特约险(乘客)",
  477. mainRiskCodeList: "D4"
  478. },
  479. {
  480. amount: "0",
  481. amountDesc: "不投保",
  482. coveragePremium: 0,
  483. amtList: [{
  484. label: "不投保",
  485. value: "0"
  486. },
  487. {
  488. label: "1万",
  489. value: "10000"
  490. },
  491. {
  492. label: "2万",
  493. value: "20000"
  494. },
  495. {
  496. label: "5万",
  497. value: "50000"
  498. },
  499. {
  500. label: "10万",
  501. value: "100000"
  502. }
  503. ],
  504. kindCode: "SY_FJ_YBW1",
  505. isMainRisk: true,
  506. kindName: "附加医保-三者",
  507. desc: "附加医保外医疗费用责任险(机动车第三者责任保险)"
  508. },
  509. {
  510. amount: "0",
  511. amountDesc: "不投保",
  512. coveragePremium: 0,
  513. amtList: [{
  514. label: "不投保",
  515. value: "0"
  516. },
  517. {
  518. label: "1万",
  519. value: "10000"
  520. },
  521. {
  522. label: "2万",
  523. value: "20000"
  524. },
  525. {
  526. label: "5万",
  527. value: "50000"
  528. },
  529. {
  530. label: "10万",
  531. value: "100000"
  532. }
  533. ],
  534. kindCode: "SY_FJ_YBW2",
  535. isMainRisk: true,
  536. kindName: "附加医保-座位险(乘客)",
  537. desc: "附加医保外医疗费用责任险(机动车第三者责任保险)"
  538. },
  539. {
  540. amount: "0",
  541. amountDesc: "不投保",
  542. coveragePremium: 0,
  543. amtList: [{
  544. label: "不投保",
  545. value: "0"
  546. },
  547. {
  548. label: "1万",
  549. value: "10000"
  550. },
  551. {
  552. label: "2万",
  553. value: "20000"
  554. },
  555. {
  556. label: "5万",
  557. value: "50000"
  558. },
  559. {
  560. label: "10万",
  561. value: "100000"
  562. }
  563. ],
  564. kindCode: "SY_FJ_YBW3",
  565. isMainRisk: true,
  566. kindName: "附加医保-座位险(司机)",
  567. desc: "附加医保外医疗费用责任险(机动车第三者责任保险)"
  568. },
  569. {
  570. amount: "0",
  571. amountDesc: "不投保",
  572. amtList: [{
  573. label: "不投保",
  574. value: "0"
  575. },
  576. {
  577. label: "50万",
  578. value: "500000"
  579. },
  580. {
  581. label: "100万",
  582. value: "1000000"
  583. },
  584. {
  585. label: "150万",
  586. value: "1500000"
  587. },
  588. {
  589. label: "200万",
  590. value: "2000000"
  591. },
  592. {
  593. label: "250万",
  594. value: "2500000"
  595. },
  596. {
  597. label: "300万",
  598. value: "3000000"
  599. },
  600. {
  601. label: "500万",
  602. value: "5000000"
  603. },
  604. {
  605. label: "1000万",
  606. value: "10000000"
  607. }
  608. ],
  609. desc: "保险期间内,被保险人或其允许的驾驶人在法定节假日期间使用被保险机动车发生机动车第三者责任保险范围内的事故,并经公安部门或保险人查勘确认的,被保险机动车第三者责任保险所适用的责任限额在保险单载明的基础上增加一倍的险种",
  610. isMainRisk: true,
  611. kindCode: "BD",
  612. kindName: "法定节假日限额翻倍险",
  613. mainRiskCodeList: "B"
  614. }
  615. ]
  616. }
  617. },
  618. // 监听导航栏的按钮
  619. onNavigationBarButtonTap(e) {
  620. if (e.index == 0) {
  621. this.navigate({
  622. url: '/pages/index/index'
  623. }, "switchTab", true);
  624. }
  625. },
  626. onShow() {
  627. dateTime = new Date();
  628. dateTime.setTime(dateTime.getTime() + 24 * 60 * 60 * 1000);
  629. },
  630. onLoad() {
  631. this.jqstartDate = this.nextday();
  632. this.jqendDate = this.oneYearPast(this.jqstartDate);
  633. this.systartDate = this.nextday();
  634. this.syendDate = this.oneYearPast(this.jqstartDate);
  635. const eventChannel = this.getOpenerEventChannel()
  636. // 监听acceptData事件,获取上一页面通过eventChannel传送到当前页面的数据
  637. eventChannel.on('acceptData', (data) => {
  638. if (!!data) {
  639. //读取上一个页面传过来数据(车辆信息,人员信息,险种信息)
  640. this.carInfo = data.carInfo; //车辆信息
  641. this.ownerInfo = data.ownerInfo; //车主信息
  642. this.policyHolderInfo = data.policyHolderInfo; //投保人信息
  643. this.insuredPersonInfo = data.insuredPersonInfo; //被保人信息
  644. this.riskList = data.riskList; //险种大类
  645. this.kindList = data.kindList; //商业险险别
  646. if (this.riskList.length > 0) {
  647. this.CIInsureList.amount = 0;
  648. this.CIInsureList.amountDesc = "不投保";
  649. this.BIInsureList.amount = 0;
  650. this.BIInsureList.amountDesc = "不投保";
  651. for (let i = 0; i < this.insureList.length; i++) {
  652. this.insureList[i].amount = '0';
  653. this.insureList[i].amountDesc = "不投保";
  654. }
  655. this.insureCodeList = [];
  656. for (let i = 0; i < this.riskList.length; i++) {
  657. if (this.riskList[i].riskCode == "0507") {
  658. this.CIInsureList.amount = "1";
  659. this.CIInsureList.amountDesc = "投保";
  660. this.CIStartDate = this.riskList[i].startDate;
  661. }
  662. if (this.riskList[i].riskCode == "0510") {
  663. this.BIInsureList.amount = "1";
  664. this.BIInsureList.amountDesc = "投保";
  665. if (!!this.riskList[i].startDate) {
  666. this.BIStartDate = this.riskList[i].startDate;
  667. }
  668. for (let j = 0; j < this.kindList.length; j++) {
  669. for (let m = 0; m < this.insureList.length; m++) {
  670. if (this.kindList[j].kindCode == this.insureList[m].kindCode) {
  671. if (this.kindList[j].kindCode == 'B') {
  672. this.insureList[9].amtList[1].value = this.kindList[j].amount;
  673. }
  674. if (this.insureList[m].kindCode == 'D4') {
  675. if (this.kindList[j].unitAmount != '0') {
  676. this.insureCodeList.push(this.kindList[j].kindCode)
  677. }
  678. this.insureList[m].amount = this.kindList[j].unitAmount;
  679. for (let n = 0; n < this.insureList[m].amtList.length; n++) {
  680. if (this.insureList[m].amount == this.insureList[m].amtList[n]
  681. .value) {
  682. this.insureList[m].amountDesc = this.insureList[m].amtList[
  683. n].label;
  684. }
  685. }
  686. } else if (this.insureList[m].isMainRisk || (this.insureList[m]
  687. .kindCode == 'BD') || (this.insureList[m].kindCode ==
  688. 'L')) {
  689. if (this.kindList[j].amount != '0') {
  690. this.insureCodeList.push(this.kindList[j].kindCode)
  691. }
  692. this.insureList[m].amount = this.kindList[j].amount;
  693. if (this.insureList[m].kindCode == 'A') {
  694. this.insureList[m].amount = '1';
  695. }
  696. for (let n = 0; n < this.insureList[m].amtList.length; n++) {
  697. if (this.insureList[m].amount == this.insureList[m].amtList[n]
  698. .value) {
  699. this.insureList[m].amountDesc = this.insureList[m].amtList[
  700. n].label;
  701. }
  702. }
  703. } else {
  704. if (this.kindList[j].deductibleRate != '0') {
  705. this.insureCodeList.push(this.kindList[j].kindCode)
  706. }
  707. this.insureList[m].amount = this.kindList[j].deductibleRate;
  708. for (let n = 0; n < this.insureList[m].amtList.length; n++) {
  709. if (this.insureList[m].amount == this.insureList[m].amtList[n]
  710. .value) {
  711. this.insureList[m].amountDesc = this.insureList[m].amtList[
  712. n].label;
  713. }
  714. }
  715. }
  716. }
  717. }
  718. }
  719. }
  720. }
  721. }
  722. }
  723. })
  724. },
  725. computed: {
  726. startDate() {
  727. return this.getDate('start');
  728. },
  729. endDate() {
  730. return this.getDate('end');
  731. }
  732. },
  733. methods: {
  734. jqstartconfirm(e) {
  735. this.jqstartDate = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
  736. this.jqendDate = this.oneYearPast(this.jqstartDate)
  737. },
  738. jqendconfirm(e) {
  739. this.jqendDate = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
  740. },
  741. systartconfirm(e) {
  742. this.systartDate = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
  743. },
  744. syendconfirm(e) {
  745. this.syendDate = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
  746. },
  747. insureTip() {
  748. this.$refs.popupInsure.show() // 显示
  749. },
  750. adjustPopupInsureSubmit() {
  751. this.$refs.popupInsure.hide() // 显示
  752. },
  753. // 交强险提示
  754. CITips() {
  755. uni.showModal({
  756. title: "交强险",
  757. content: "指“机动车交通事故责任强制保险”,是由保险公司对被保险机动车发生道路交通事故造成受害人(不包括本车人员和被保险人)的人身伤亡、财产损失,在责任限额内予以赔偿的强制性责任保险。",
  758. showCancel: false,
  759. confirmText: "我知道了"
  760. })
  761. },
  762. // 商业险提示
  763. BITips() {
  764. uni.showModal({
  765. title: "商业险",
  766. content: "指给车辆加上一份全面保障。详细险种包含:第三者责任险、盗抢险、车上人员责任险、车辆损失险、车身划痕损失险、自燃损失险、涉水险等,是您和爱车的必要保障。",
  767. showCancel: false,
  768. confirmText: "我知道了"
  769. })
  770. },
  771. //弹出popup框并显示基本信息
  772. adjustBIItem(index) {
  773. var a = {};
  774. Object.assign(a, this.insureList[index])
  775. this.insureItem = a;
  776. this.$refs.popupBI.show() // 显示
  777. },
  778. //popup内容的label改变
  779. adjustBIItemLabel(index) {
  780. this.insureItem.amount = this.insureItem.amtList[index].value;
  781. this.insureItem.amountDesc = this.insureItem.amtList[index].label;
  782. },
  783. // 提交popup的label修改
  784. adjustBIItemLabelSubmit() {
  785. for (let i = 0; i < this.insureList.length; i++) {
  786. if (this.insureItem.kindCode == this.insureList[i].kindCode) {
  787. this.insureList[i].amount = this.insureItem.amount;
  788. this.insureList[i].amountDesc = this.insureItem.amountDesc;
  789. if (this.insureItem.kindCode == 'B') {
  790. if (this.insureItem.amount != 0) {
  791. this.insureList[9].amtList[1].value = this.insureItem.amount;
  792. } else {
  793. this.insureList[9].amtList[1].value = '1';
  794. }
  795. }
  796. if (this.insureList[i].isMainRisk && this.insureList[i].amount == '0') {
  797. for (let j = 0; j < this.insureList.length; j++) {
  798. if ((!this.insureList[j].isMainRisk) && (this.insureList[j].mainRiskCodeList == this
  799. .insureList[i].kindCode)) {
  800. this.insureList[j].amount = this.insureList[j].amtList[0].value;
  801. this.insureList[j].amountDesc = this.insureList[j].amtList[0].label;
  802. }
  803. }
  804. }
  805. var codeList = []
  806. for (let m = 0; m < this.insureList.length; m++) {
  807. if (this.insureList[m].amount != '0') {
  808. codeList.push(this.insureList[m].kindCode);
  809. }
  810. }
  811. this.insureCodeList = [];
  812. Object.assign(this.insureCodeList, codeList)
  813. if (this.insureCodeList.length > 0) {
  814. this.BIInsureList.amount = '1';
  815. this.BIInsureList.amountDesc = '投保';
  816. } else {
  817. this.BIInsureList.amount = '0';
  818. this.BIInsureList.amountDesc = '不投保';
  819. }
  820. break;
  821. }
  822. }
  823. this.$refs.popupBI.hide();
  824. },
  825. getDate(type) {
  826. const date = new Date();
  827. if (type === 'start') {
  828. date.setTime(date.getTime());
  829. } else if (type === 'end') {
  830. date.setTime(date.getTime() + 24 * 60 * 60 * 1000 * 90);
  831. }
  832. let year = date.getFullYear();
  833. let month = date.getMonth() + 1;
  834. let day = date.getDate();
  835. month = month > 9 ? month : '0' + month;;
  836. day = day > 9 ? day : '0' + day;
  837. return `${year}-${month}-${day}`;
  838. },
  839. //日期的选择
  840. bindDateChange(e, startDateType) {
  841. const date = new Date();
  842. const date1 = date.getTime();
  843. const date2 = date.getTime() + 24 * 60 * 60 * 1000 * 90;
  844. const date3 = new Date(e.detail.value).getTime();
  845. if (((date3 - date1) > 0) && ((date3 - date2) > 0)) {
  846. return uni.showToast({
  847. icon: "none",
  848. title: "投保日期须在90天内"
  849. })
  850. }
  851. this[startDateType] = e.detail.value;
  852. },
  853. //交强险弹出框
  854. adjustCIItem(type) {
  855. var a = {};
  856. Object.assign(a, this[type]);
  857. this.insureItem = a;
  858. this.$refs.popupCI.show() // 显示
  859. },
  860. adjustCIItemLabel(index) {
  861. this.insureItem.amount = this.insureItem.amtList[index].value;
  862. this.insureItem.amountDesc = this.insureItem.amtList[index].label;
  863. },
  864. adjustCIItemLabelSubmit(kindCode) {
  865. var a = {};
  866. if (kindCode == '0507') {
  867. this.CIInsureList = {};
  868. Object.assign(a, this.insureItem)
  869. this.CIInsureList = a;
  870. }
  871. if (kindCode == '0510') {
  872. if (this.insureItem.amount == '0') {
  873. this.insureCodeList = [];
  874. for (let i = 0; i < this.insureList.length; i++) {
  875. this.insureList[i].amount = '0';
  876. this.insureList[i].amountDesc = '不投保';
  877. }
  878. } else {
  879. // 车损险
  880. this.insureList[0].amount = 1;
  881. this.insureList[0].amountDesc = "投保";
  882. // 三者险
  883. this.insureList[1].amount = 1000000;
  884. this.insureList[1].amountDesc = "100万";
  885. // 司机险
  886. this.insureList[2].amount = 10000;
  887. this.insureList[2].amountDesc = "1万";
  888. // 乘客险
  889. this.insureList[3].amount = 10000;
  890. this.insureList[3].amountDesc = "1万";
  891. this.insureList[4].amount = 0;
  892. this.insureList[4].amountDesc = "不投保";
  893. }
  894. this.BIInsureList = {};
  895. Object.assign(a, this.insureItem)
  896. this.BIInsureList = a;
  897. }
  898. this.$refs.popupCI.hide() // 显示
  899. },
  900. //跳转报价页面
  901. toQuote() {
  902. var riskList = []; //险种大类信息
  903. var kindList = []; //商业险险别
  904. if (this.CIInsureList.amount == '1') {
  905. this.jqstartDate = this.transformTime(this.jqstartDate);
  906. this.jqendDate = this.transformTime(this.jqendDate);
  907. riskList.push({
  908. amount: "200000",
  909. premium: "0",
  910. riskCode: "0507",
  911. startDate: this.jqstartDate,
  912. endDate: this.jqendDate,
  913. instantFlag: "0"
  914. })
  915. }
  916. if (this.BIInsureList.amount == '1') {
  917. this.systartDate = this.transformTime(this.systartDate);
  918. this.syendDate = this.transformTime(this.syendDate);
  919. riskList.push({
  920. startDate: this.systartDate,
  921. endDate: this.syendDate,
  922. quotePreceptName: "",
  923. quotePreceptCode: "",
  924. instantFlag: "0",
  925. premium: "0",
  926. riskCode: "0510"
  927. })
  928. this.insureList.map((ele, index) => {
  929. if (
  930. ele.amount != "0" &&
  931. (ele.kindCode == "D4" || ele.kindCode == "SY_FJ_YBW2")
  932. ) {
  933. kindList.push({
  934. unitAmount: this.insureList[index].amount,
  935. kindCode: this.insureList[index].kindCode,
  936. kindName: this.insureList[index].kindName
  937. });
  938. } else if (
  939. ele.amount != "0" &&
  940. (ele.kindCode == "MJ1" ||
  941. ele.kindCode == "MJ2" ||
  942. ele.kindCode == "MJ3" ||
  943. ele.kindCode == "MJ4")
  944. ) {
  945. kindList.push({
  946. deductibleRate: this.insureList[index].amount,
  947. kindCode: this.insureList[index].kindCode,
  948. kindName: this.insureList[index].kindName
  949. });
  950. } else if (ele.amount != "0") {
  951. kindList.push({
  952. amount: this.insureList[index].amount,
  953. kindCode: this.insureList[index].kindCode,
  954. kindName: this.insureList[index].kindName
  955. });
  956. }
  957. return ele;
  958. });
  959. }
  960. if (riskList.length == 0) {
  961. return uni.showToast({
  962. icon: "none",
  963. title: "请至少选择一种主险"
  964. })
  965. }
  966. this.navigate({
  967. url: '/pages/carInsure1/quote1',
  968. success: (res) => {
  969. res.eventChannel.emit("acceptData", {
  970. carInfo: this.carInfo,
  971. ownerInfo: this.ownerInfo,
  972. policyHolderInfo: this.policyHolderInfo,
  973. insuredPersonInfo: this.insuredPersonInfo,
  974. riskList: riskList,
  975. kindList: kindList
  976. })
  977. }
  978. }, "navigateTo", true);
  979. },
  980. //计算输入时间一年后的的前一天(输入的参数为字符串("2019-03-02")最终输出也为日期的字符串)
  981. oneYearPast(time) {
  982. var date = new Date(time);
  983. date.setFullYear(date.getFullYear() + 1); //一年后
  984. date.setTime(date.getTime() - 24 * 60 * 60 * 1000); //一年后的前一天
  985. var strYear = date.getFullYear();
  986. var strMonth = date.getMonth() + 1;
  987. var strDay = date.getDate();
  988. var hh = date.getHours();
  989. if (hh < 10) {
  990. hh = "0" + hh;
  991. }
  992. if (strMonth < 10) {
  993. strMonth = "0" + strMonth;
  994. }
  995. if (strDay < 10) {
  996. strDay = "0" + strDay;
  997. }
  998. var datastr = strYear + "-" + strMonth + "-" + strDay + ' ' + hh + ':00:00';
  999. return datastr;
  1000. },
  1001. //次日
  1002. nextday() {
  1003. var date = new Date();
  1004. date.setFullYear(date.getFullYear());
  1005. date.setTime(date.getTime() + 24 * 60 * 60 * 1000);
  1006. var strYear = date.getFullYear();
  1007. var strDay = date.getDate();
  1008. var strMonth = date.getMonth() + 1;
  1009. var hh = date.getHours();
  1010. if (hh < 10) {
  1011. hh = "0" + hh;
  1012. }
  1013. if (strMonth < 10) {
  1014. strMonth = "0" + strMonth;
  1015. }
  1016. if (strDay < 10) {
  1017. strDay = "0" + strDay;
  1018. }
  1019. var datastr = strYear + "-" + strMonth + "-" + strDay + " " + "00:00:00";
  1020. return datastr;
  1021. },
  1022. //时间转换
  1023. transformTime(date) {
  1024. var d = new Date(date);
  1025. var strYear = d.getFullYear();
  1026. var strMonth = d.getMonth() + 1;
  1027. var strDay = d.getDate();
  1028. var hh = d.getHours();
  1029. if (hh < 10) {
  1030. hh = "0" + hh;
  1031. }
  1032. if (strMonth < 10) {
  1033. strMonth = "0" + strMonth;
  1034. }
  1035. if (strDay < 10) {
  1036. strDay = "0" + strDay;
  1037. }
  1038. var datetime =
  1039. strYear + "-" + strMonth + "-" + strDay + " " + hh + ":00:00";
  1040. return datetime;
  1041. },
  1042. }
  1043. }
  1044. </script>
  1045. <style lang="scss" scoped>
  1046. @import '@/style/mixin.scss';
  1047. /* 整个页面的统一样式 Start */
  1048. .page {
  1049. padding-bottom: 200upx;
  1050. }
  1051. /* 整个页面的统一样式 End */
  1052. .plan-ins-title {
  1053. background-color: #F4F5F7;
  1054. height: 88upx;
  1055. color: #666;
  1056. font-size: 32upx;
  1057. line-height: 88upx;
  1058. font-weight: 400;
  1059. padding: 0 30upx;
  1060. }
  1061. .plan-ins-title .title-right {
  1062. color: #aaa;
  1063. }
  1064. .compulsory-insurance,
  1065. .business-insurance {
  1066. border-bottom: 15upx solid #eee;
  1067. }
  1068. .common-title {
  1069. font-size: 32upx;
  1070. padding: 0upx 32upx;
  1071. height: 90upx;
  1072. border-bottom: 1px solid #eee;
  1073. font-weight: bold;
  1074. }
  1075. .common-ins-cell {
  1076. font-size: 30upx;
  1077. padding: 0upx 30upx;
  1078. height: 90upx;
  1079. border-bottom: 1px solid #eee;
  1080. }
  1081. /* 底部按钮Start */
  1082. .bottom-btn {
  1083. background-color: #fff;
  1084. position: fixed;
  1085. bottom: 0;
  1086. left: 0;
  1087. right: 0;
  1088. padding: 30upx 30upx;
  1089. }
  1090. /* 底部按钮End */
  1091. /* 交强险和商业险弹出框Start */
  1092. .popup-content {
  1093. position: relative;
  1094. }
  1095. .popHeader {
  1096. box-sizing: border-box;
  1097. font-size: 32upx;
  1098. font-weight: bold;
  1099. height: 120upx;
  1100. border-bottom: 1px solid #eee;
  1101. }
  1102. .popup-content .popContent {
  1103. padding: 0upx 30upx;
  1104. height: 620upx;
  1105. box-sizing: border-box;
  1106. }
  1107. .popup-content .popContent .popContentTitle {
  1108. font-weight: bold;
  1109. font-size: 32upx;
  1110. margin: 20upx 0upx 5upx 0upx;
  1111. }
  1112. .popup-content .popContent .amtSingle {
  1113. width: 25%;
  1114. box-sizing: border-box;
  1115. display: inline-block;
  1116. padding: 15upx;
  1117. text-align: center;
  1118. vertical-align: middle;
  1119. }
  1120. .popup-content .popContent .amtSingle>view {
  1121. font-size: 28upx;
  1122. border: 1px solid #eee;
  1123. border-radius: 10upx;
  1124. }
  1125. .popup-content .popContent .amtSingle>view.active {
  1126. background: rgba($themeColor, .08);
  1127. color: $themeColor;
  1128. border: 1px solid rgba($themeColor, .01);
  1129. font-weight: 700;
  1130. }
  1131. .popup-content .popBottom {
  1132. margin: 30upx 30upx 0 30upx;
  1133. padding-bottom: 30upx;
  1134. }
  1135. /* 交强险和商业险弹出框End */
  1136. /* 投保方案建议弹出框Start */
  1137. .popupBody {
  1138. position: relative;
  1139. }
  1140. .popupBody .popHeader {
  1141. border: none;
  1142. }
  1143. .popupBody .popBottom {
  1144. position: fixed;
  1145. box-sizing: border-box;
  1146. bottom: 0;
  1147. width: 100%;
  1148. height: 100upx;
  1149. border-top: 1px solid #f6f6f6;
  1150. font-weight: 700;
  1151. font-size: 36upx;
  1152. }
  1153. .popupBody .popupScroll {
  1154. height: 485upx;
  1155. padding: 0 30upx 0 30upx;
  1156. box-sizing: border-box;
  1157. }
  1158. .popupScroll .title {
  1159. font-weight: 700;
  1160. font-size: 30upx;
  1161. }
  1162. .popupScroll .desc {
  1163. font-size: 28upx;
  1164. }
  1165. /* 投保方案建议弹出框End */
  1166. </style>