insureItems1.vue 37 KB

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