insureItems1.vue 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562
  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">
  17. <u-form-item label="交强险投保日期" class="modelformcss">
  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="交强险终保日期" class="modelformcss">
  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="compulsory-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;"></view>
  38. </view>
  39. <u-form ref="uForm" :model="vehicleAndVesselTaxForm" label-width="130px">
  40. <u-form-item label="纳税类型" prop="taxRelifFlag" class="modelformcss">
  41. <u-input type="select" :select-open="taxRelifFlagShow" v-model="model.taxRelifFlag"
  42. placeholder="请选择纳税类型" @click="taxRelifFlagShow = true"></u-input>
  43. <u-select mode="single-column" :list="taxRelifFlagoptions" v-model="taxRelifFlagShow"
  44. label-name="dictTag" value-name="dictValue"
  45. @confirm="taxRelifFlagConfirm($event,'taxRelifFlag')"></u-select>
  46. </u-form-item>
  47. <u-form-item v-show="vehicleAndVesselTaxForm.taxRelifFlag==1" label="纳税人姓名" prop="taxpayerName"
  48. class="modelformcss">
  49. <u-input placeholder="请输入姓名" v-model="vehicleAndVesselTaxForm.taxpayerName" type="text"></u-input>
  50. </u-form-item>
  51. <u-form-item v-show="vehicleAndVesselTaxForm.taxRelifFlag==1" label="纳税人证件号" prop="identifyNumber"
  52. class="modelformcss">
  53. <u-input placeholder="纳税人证件号" v-model="vehicleAndVesselTaxForm.identifyNumber"
  54. type="text"></u-input>
  55. </u-form-item>
  56. <u-form-item v-show="vehicleAndVesselTaxForm.taxRelifFlag==1" label="证件类型" prop="taxpayerIdentifier"
  57. class="modelformcss">
  58. <u-input type="select" :select-open="taxpayerIdentifierShow" v-model="model.taxpayerIdentifier"
  59. placeholder="请选择证件类型" @click="taxpayerIdentifierShow = true"></u-input>
  60. <u-select mode="single-column" :list="taxpayerIdentifieroptions" v-model="taxpayerIdentifierShow"
  61. label-name="dictTag" value-name="dictValue"
  62. @confirm="taxRelifFlagConfirm($event,'taxpayerIdentifier')"></u-select>
  63. </u-form-item>
  64. <u-form-item
  65. v-show="vehicleAndVesselTaxForm.taxRelifFlag == 2 || vehicleAndVesselTaxForm.taxRelifFlag == 3"
  66. label="减免税凭证号" prop="extendChar2" class="modelformcss">
  67. <u-input placeholder="请输入减免税凭证号" v-model="vehicleAndVesselTaxForm.extendChar2"
  68. type="text"></u-input>
  69. </u-form-item>
  70. <u-form-item v-show="vehicleAndVesselTaxForm.taxRelifFlag == 4" label="完税凭证号" prop="paidFreeCertificate"
  71. class="modelformcss">
  72. <u-input placeholder="请输入完税凭证号" v-model="vehicleAndVesselTaxForm.paidFreeCertificate"
  73. type="text"></u-input>
  74. </u-form-item>
  75. <u-form-item
  76. v-show="vehicleAndVesselTaxForm.taxRelifFlag == 2 || vehicleAndVesselTaxForm.taxRelifFlag == 3"
  77. label="减免税原因" prop="relifReason" class="modelformcss">
  78. <u-input type="select" :select-open="relifReasonShow" v-model="model.relifReason"
  79. placeholder="请选择减免税原因" @click="relifReasonShow = true"></u-input>
  80. <u-select mode="single-column" :list="relifReasonoptions" v-model="relifReasonShow"
  81. label-name="dictTag" value-name="dictValue"
  82. @confirm="taxRelifFlagConfirm($event,'relifReason')"></u-select>
  83. </u-form-item>
  84. <u-form-item v-show="vehicleAndVesselTaxForm.taxRelifFlag != 1" label="税务机关代码" prop="taxComCode"
  85. class="modelformcss">
  86. <u-input placeholder="请输入税务机关代码" v-model="vehicleAndVesselTaxForm.taxComCode" type="text"></u-input>
  87. </u-form-item>
  88. <u-form-item v-show="vehicleAndVesselTaxForm.taxRelifFlag != 1" label="税务机关名称" prop="taxComName"
  89. class="modelformcss">
  90. <u-input placeholder="请输入税务机关名称" v-model="vehicleAndVesselTaxForm.taxComName" type="text"></u-input>
  91. </u-form-item>
  92. <u-form-item v-show="vehicleAndVesselTaxForm.taxRelifFlag == 4" label="完税凭证填发日期" prop="taxDocumentDate"
  93. class="modelformcss">
  94. <u-input type="select" :select-open="taxDocumentDateShow"
  95. v-model="vehicleAndVesselTaxForm.taxDocumentDate" placeholder="请选择时间"
  96. @click="taxDocumentDateShow = true"></u-input>
  97. <u-picker v-model="taxDocumentDateShow" mode="time" :params="params1"
  98. @confirm="taxDocumentDateconfirm"></u-picker>
  99. </u-form-item>
  100. <u-form-item v-show="vehicleAndVesselTaxForm.taxRelifFlag == 4" label="完税凭证地区" prop="taxPaidAreaCode"
  101. class="modelformcss">
  102. <u-input type="select" :select-open="taxPaidAreaCodeShow" v-model="model.taxPaidAreaCode"
  103. placeholder="请选择地区" @click="taxPaidAreaCodeShow = true"></u-input>
  104. <u-picker mode="region" v-model="taxPaidAreaCodeShow" :params="params2"
  105. @confirm="taxPaidAreaCodeconfirm"></u-picker>
  106. </u-form-item>
  107. <u-form-item v-show="vehicleAndVesselTaxForm.taxRelifFlag == 3" label="减税比例" prop="taxRelief"
  108. class="modelformcss">
  109. <u-input placeholder="请输入0~1的小数" v-model="vehicleAndVesselTaxForm.taxRelief" type="text"></u-input>
  110. </u-form-item>
  111. </u-form>
  112. </view>
  113. <view class="business-insurance">
  114. <view class="common-title d-flex a-center">商业险 <view class="icon iconfont icon-Group-"
  115. style="margin-left: 15upx;color: #aaa;font-weight: normal;" @tap="BITips"></view>
  116. </view>
  117. <u-form ref="uForm" label-width="200px" v-if="BIInsureList.amount!=0">
  118. <u-form-item label="商业险投保日期" class="modelformcss">
  119. <u-input type="select" :select-open="systartShow" v-model="systartDate" placeholder="请选择开始时间"
  120. @click="systartShow = true"></u-input>
  121. <u-picker v-model="systartShow" mode="time" :params="params" @confirm="systartconfirm"></u-picker>
  122. </u-form-item>
  123. <u-form-item label="商业险投保日期" class="modelformcss">
  124. <u-input type="select" :select-open="syendShow" v-model="syendDate" placeholder="请选择开始时间"
  125. @click="syendShow = true"></u-input>
  126. <u-picker v-model="syendShow" mode="time" :params="params" @confirm="syendconfirm"></u-picker>
  127. </u-form-item>
  128. </u-form>
  129. <view class="car-ins-cell d-flex j-sb common-ins-cell" @tap="adjustCIItem('BIInsureList')">
  130. <view class="cell-title d-flex a-center j-center">商业险</view>
  131. <view class="cell-desc d-flex a-center j-center">{{BIInsureList.amountDesc}}
  132. <view class="icon iconfont icon-youjiantou" style="font-size: 24upx;margin-left: 20upx;"></view>
  133. </view>
  134. </view>
  135. </view>
  136. <view class="business-insurance">
  137. <block v-for="(insureItem,index) in insureList" :key="index">
  138. <template v-if="insureItem.amount != 0">
  139. <view class="car-ins-cell d-flex j-sb common-ins-cell" @tap="adjustBIItem(index)">
  140. <view class="cell-title d-flex a-center j-center">{{insureItem.kindName}}</view>
  141. <view class="cell-desc d-flex a-center j-center">{{insureItem.amountDesc}}
  142. <view class="icon iconfont icon-youjiantou" style="font-size: 24upx;margin-left: 20upx;">
  143. </view>
  144. </view>
  145. </view>
  146. </template>
  147. </block>
  148. <view v-if="insureCodeList.length>0">
  149. <view class="car-ins-cell d-flex j-sb common-ins-cell" style="border:none;">
  150. <view class="cell-title d-flex a-center j-center">增值服务</view>
  151. <view class="cell-desc d-flex a-center j-center">赠送</view>
  152. </view>
  153. <view
  154. style="margin:0 30upx 30upx; padding: 15upx;color: #A6A6A6;font-size: 24upx;background-color: #F8FAFC;">
  155. 注:包含道路救援/安全检测/代为驾驶/代为送检,投保以上商业主0险免费赠送,各家保司各个地区旅游差异,具体以保单信息为准</view>
  156. </view>
  157. </view>
  158. <view>
  159. <view class="plan-ins-title own-ins-title d-flex j-sb" v-if="insureCodeList.length < insureList.length">
  160. <view class="title-left d-flex a-center j-center main-text-color">未选险种</view>
  161. </view>
  162. <block v-for="(insureItem,index) in insureList" :key="index">
  163. <template
  164. v-if="(insureItem.amount == 0) && (insureItem.isMainRisk || (insureItem.isMainRisk && (insureCodeList.indexOf(insureItem.mainRiskCodeList)>=0))) ">
  165. <view class="car-ins-cell d-flex j-sb common-ins-cell" @tap="adjustBIItem(index)">
  166. <view class="cell-title d-flex a-center j-center">{{insureItem.kindName}}</view>
  167. <view class="cell-desc d-flex a-center j-center">{{insureItem.amountDesc}}
  168. <view class="icon iconfont icon-youjiantou" style="font-size: 24upx;margin-left: 20upx;">
  169. </view>
  170. </view>
  171. </view>
  172. </template>
  173. </block>
  174. </view>
  175. <view class="bottom-btn">
  176. <button type="primary" class="main-bg-color" @tap="toQuote">确定</button>
  177. </view>
  178. <wyb-popup ref="popupInsure" type="center" mode="size-fixed" height="700" width="600" radius="6">
  179. <view class="popupBody">
  180. <view class="popHeader d-flex a-center j-center">
  181. 投保方案建议
  182. </view>
  183. <scroll-view scroll-top="0" scroll-y="true" class="popupScroll">
  184. <view class="title">行驶城市</view>
  185. <view class="desc">可根据投保城市经济情况和自身经济情况,选择机动车第三者责任保险、车上人员责任保险(司机)、车上人员责任保险(乘客)等保障,建议保额相对高一些。</view>
  186. <view class="title">车辆情况</view>
  187. <view class="desc">可根据自己车辆年龄、价格、日常行驶路况、生活环境,选择机动车损失保险、全车盗抢、玻璃破碎、划痕、涉水损失险,高价格车辆建议配置保障。</view>
  188. <view class="title">费用承担</view>
  189. <view class="desc">如您不幸发生保险事故时,希望获得全额赔偿,不承担自费,可选择购买不计免赔。</view>
  190. </scroll-view>
  191. <view class="popBottom d-flex a-center j-center main-text-color" @tap="adjustPopupInsureSubmit">我知道了
  192. </view>
  193. </view>
  194. </wyb-popup>
  195. <!-- 交强选择方案 -->
  196. <wyb-popup ref="popupCI" type="bottom" mode="size-fixed" height="900" radius="6" :showCloseIcon="true">
  197. <view class="popup-content">
  198. <view class="popHeader d-flex a-center j-center">
  199. 选择方案
  200. </view>
  201. <scroll-view scroll-top="0" scroll-y="true" class="popContent">
  202. <view class="popContentTitle">{{insureItem.kindName}}</view>
  203. <view style="color: #999;font-size: 24upx;">{{insureItem.desc}}</view>
  204. <view>
  205. <block v-for="(amt,index) in insureItem.amtList" :key="index">
  206. <view class="amtSingle">
  207. <view :class="(amt.label== insureItem.amountDesc)?'active':''"
  208. @tap="adjustCIItemLabel(index)">{{amt.label}}</view>
  209. </view>
  210. </block>
  211. </view>
  212. </scroll-view>
  213. <view class="popBottom">
  214. <button class="main-bg-color" type="primary"
  215. @tap="adjustCIItemLabelSubmit(insureItem.kindCode)">完成</button>
  216. </view>
  217. </view>
  218. </wyb-popup>
  219. <!-- 商业选择方案 -->
  220. <wyb-popup ref="popupBI" type="bottom" mode="size-fixed" height="900" radius="6" :showCloseIcon="true">
  221. <view class="popup-content">
  222. <view class="popHeader d-flex a-center j-center">
  223. 选择方案
  224. </view>
  225. <scroll-view scroll-top="0" scroll-y="true" class="popContent">
  226. <view class="popContentTitle">{{insureItem.kindName}}</view>
  227. <view style="color: #999;font-size: 24upx;">{{insureItem.desc}}</view>
  228. <view>
  229. <block v-for="(amt,index) in insureItem.amtList" :key="index">
  230. <view class="amtSingle">
  231. <view :class="(amt.label== insureItem.amountDesc)?'active':''"
  232. @tap="adjustBIItemLabel(index)">{{amt.label}}</view>
  233. </view>
  234. </block>
  235. </view>
  236. </scroll-view>
  237. <view class="popBottom">
  238. <button class="main-bg-color" type="primary" @tap="adjustBIItemLabelSubmit()">完成</button>
  239. </view>
  240. </view>
  241. </wyb-popup>
  242. </view>
  243. </template>
  244. <script>
  245. import wybPopup from '@/components/modules/carInsure/wyb-popup/wyb-popup.vue'
  246. var dateTime = new Date();
  247. dateTime.setTime(dateTime.getTime() + 24 * 60 * 60 * 1000);
  248. var tomorrow = dateTime.getFullYear() + "-" + (((dateTime.getMonth() + 1) < 10) ? ("0" + (dateTime.getMonth() + 1)) :
  249. (dateTime.getMonth() + 1)) + "-" + ((dateTime.getDate() < 10) ? ("0" + dateTime.getDate() + ' 00:00') :
  250. dateTime
  251. .getDate() + ' 00:00:00');
  252. export default {
  253. components: {
  254. wybPopup
  255. },
  256. data() {
  257. return {
  258. model: {
  259. taxRelifFlag: "正常交税",
  260. taxpayerIdentifier: "身份证",
  261. relifReason: "",
  262. taxPaidAreaCode: "",
  263. },
  264. //车船税form
  265. vehicleAndVesselTaxForm: {
  266. taxRelifFlag: "1", //类型
  267. identifyNumber: "", //纳税人识别号
  268. taxpayerIdentifier: "01", //纳税人证件类型
  269. taxpayerName: "", //纳税人名称
  270. extendChar2: "", //减免税凭证号
  271. paidFreeCertificate: "", //完税凭证号
  272. relifReason: "", //减免税原因
  273. taxComCode: "", //税务机关代码
  274. taxComName: "", ///税务机关名称
  275. taxDocumentDate: "", //完税日期
  276. taxPaidAreaCode: "", //完税凭证地区代码
  277. taxRelief: "", //减税比例
  278. },
  279. carInfoPositiveList: [], //车辆
  280. ownerInfoPositiveList: [], //车主
  281. policyHolderInfoPositiveList: [], //投保人
  282. insuredPersonInfoPositiveList: [], //被保人
  283. form: {},
  284. taxPaidAreaCodeShow: false, //完税凭证地区
  285. taxDocumentDateShow: false, //完税凭证填发日期
  286. taxRelifFlagShow: false, //车船税类型
  287. taxpayerIdentifierShow: false, //纳税人证件类型
  288. relifReasonShow: false, //减免税原因代码
  289. jqstartShow: false, //交强起保日期
  290. jqendShow: false, //交强终保日期
  291. systartShow: false, //商业起保日期
  292. syendShow: false, //商业终保日期
  293. params: {
  294. year: true, //年
  295. month: true, //月
  296. day: true, //日
  297. hour: true, //时
  298. minute: true, //分
  299. second: true, //秒
  300. },
  301. params1: {
  302. year: true, //年
  303. month: true, //月
  304. day: true, //日
  305. },
  306. params2: {
  307. province: true,
  308. city: false,
  309. area: false
  310. },
  311. carInfo: {}, //车辆信息
  312. ownerInfo: {}, //车主信息
  313. policyHolderInfo: {}, //投保人信息
  314. insuredPersonInfo: {}, //被保人信息
  315. riskList: [], //险种大类信息
  316. kindList: [], //商业险险别
  317. jqstartDate: tomorrow, //交强始
  318. jqendDate: " ", //交强终
  319. systartDate: tomorrow, //商业始
  320. syendDate: "", //商业终
  321. BIStartDate: tomorrow,
  322. insureItem: {}, //popup弹出框的参数
  323. insureCodeList: ["A", "B", "D3", "D4"],
  324. CIInsureList: {
  325. amount: "1",
  326. amountDesc: "投保",
  327. amtList: [{
  328. "label": "不投保",
  329. "value": "0"
  330. }, {
  331. "label": "投保",
  332. "value": "1"
  333. }],
  334. kindCode: "0507",
  335. kindName: "交强险",
  336. desc: "国家强制规定购买的险种,对第三方的人身或财产损失提供基本保障"
  337. },
  338. BIInsureList: {
  339. amount: "1",
  340. amountDesc: "投保",
  341. amtList: [{
  342. "label": "不投保",
  343. "value": "0"
  344. }, {
  345. "label": "投保",
  346. "value": "1"
  347. }],
  348. kindCode: "0510",
  349. kindName: "商业险",
  350. desc: "国家强制规定购买的险种,对第三方的人身或财产损失提供基本保障"
  351. },
  352. insureList: [{
  353. amount: "1",
  354. amountDesc: "投保",
  355. amtList: [{
  356. "label": "不投保",
  357. "value": "0"
  358. }, {
  359. "label": "投保",
  360. "value": "1"
  361. }],
  362. kindCode: "A",
  363. isMainRisk: true,
  364. kindName: "机动车损失险",
  365. desc: "保险期间内,被保险人或被保险机动车驾驶人在使用被保险机动车过程中,因自然灾害、意外事故、机动车被盗窃、抢劫、抢夺等情况(详见保险条款)造成被保险机动车直接损失,且不属于免除保险人责任的范围,保险人依照本保险合同的约定负责赔偿的险种。"
  366. },
  367. {
  368. amount: "1000000",
  369. amountDesc: "100万",
  370. amtList: [{
  371. label: "不投保",
  372. value: "0"
  373. },
  374. {
  375. label: "50万",
  376. value: "500000"
  377. },
  378. {
  379. label: "100万",
  380. value: "1000000"
  381. },
  382. {
  383. label: "150万",
  384. value: "1500000"
  385. },
  386. {
  387. label: "200万",
  388. value: "2000000"
  389. },
  390. {
  391. label: "250万",
  392. value: "2500000"
  393. },
  394. {
  395. label: "300万",
  396. value: "3000000"
  397. },
  398. {
  399. label: "500万",
  400. value: "5000000"
  401. },
  402. {
  403. label: "1000万",
  404. value: "10000000"
  405. }
  406. ],
  407. kindCode: "B",
  408. isMainRisk: true,
  409. kindName: "第三者责任险",
  410. desc: "保险期间内,被保险人或其允许的驾驶人在使用被保险机动车过程中发生意外事故,致使第三者遭受人身伤亡或财产直接损毁,依法应当对第三者承担的损害赔偿责任,且不属于免除保险人责任的范围,保险人依照本保险合同的约定,对于超过机动车交通事故责任强制保险各分项赔偿限额的部分负责赔偿的险种。"
  411. },
  412. {
  413. amount: "10000",
  414. amountDesc: "1万",
  415. amtList: [{
  416. label: "不投保",
  417. value: "0"
  418. },
  419. {
  420. label: "1万",
  421. value: "10000"
  422. },
  423. {
  424. label: "2万",
  425. value: "20000"
  426. },
  427. {
  428. label: "3万",
  429. value: "30000"
  430. },
  431. {
  432. label: "4万",
  433. value: "40000"
  434. },
  435. {
  436. label: "5万",
  437. value: "50000"
  438. },
  439. {
  440. label: "6万",
  441. value: "60000"
  442. },
  443. {
  444. label: "7万",
  445. value: "70000"
  446. },
  447. {
  448. label: "8万",
  449. value: "80000"
  450. },
  451. {
  452. label: "9万",
  453. value: "90000"
  454. },
  455. {
  456. label: "10万",
  457. value: "100000"
  458. },
  459. {
  460. label: "15万",
  461. value: "150000"
  462. },
  463. {
  464. label: "20万",
  465. value: "200000"
  466. },
  467. {
  468. label: "25万",
  469. value: "250000"
  470. },
  471. {
  472. label: "30万",
  473. value: "300000"
  474. },
  475. {
  476. label: "35万",
  477. value: "350000"
  478. },
  479. {
  480. label: "40万",
  481. value: "400000"
  482. },
  483. {
  484. label: "45万",
  485. value: "450000"
  486. },
  487. {
  488. label: "50万",
  489. value: "500000"
  490. },
  491. ],
  492. kindCode: "D3",
  493. isMainRisk: true,
  494. kindName: "司机责任险",
  495. desc: "保险期间内,被保险人或其允许的驾驶人在使用被保险机动车过程中发生意外事故,致使车上人员遭受人身伤亡,且不属于免除保险人责任的范围,依法应当对车上人员承担的损害赔偿责任,保险人依照本保险合同的约定负责赔偿的险种。"
  496. },
  497. {
  498. amount: "10000",
  499. amountDesc: "1万",
  500. amtList: [{
  501. "label": "不投保",
  502. "value": "0"
  503. }, {
  504. "label": "1万",
  505. "value": "10000"
  506. }, {
  507. "label": "2万",
  508. "value": "20000"
  509. }, {
  510. "label": "4万",
  511. "value": "40000"
  512. }, {
  513. "label": "5万",
  514. "value": "50000"
  515. }, {
  516. "label": "10万",
  517. "value": "100000"
  518. }, {
  519. "label": "15万",
  520. "value": "150000"
  521. }, {
  522. "label": "20万",
  523. "value": "200000"
  524. }],
  525. kindCode: "D4",
  526. isMainRisk: true,
  527. kindName: "乘客责任险",
  528. desc: "保险期间内,被保险人或其允许的驾驶人在使用被保险机动车过程中发生意外事故,致使车上人员遭受人身伤亡,且不属于免除保险人责任的范围,依法应当对车上人员承担的损害赔偿责任,保险人依照本保险合同的约定负责赔偿的险种。"
  529. },
  530. {
  531. amount: "0",
  532. amountDesc: "不投保",
  533. amtList: [{
  534. "label": "不投保",
  535. "value": "0"
  536. }, {
  537. "label": "2000",
  538. "value": "2000"
  539. }, {
  540. "label": "5000",
  541. "value": "5000"
  542. }, {
  543. "label": "1万",
  544. "value": "10000"
  545. }],
  546. desc: "保险期间内,被保险机动车在被保险人或被保险机动车驾驶人使用过程中,发生无明显碰撞痕迹的车身划痕损失,保险人按照保险合同约定负责赔偿的险种",
  547. isMainRisk: true,
  548. kindCode: "L",
  549. kindName: "车身划痕险",
  550. mainRiskCodeList: "A"
  551. },
  552. {
  553. amount: "0",
  554. amountDesc: "不投保",
  555. amtList: [{
  556. "label": "不投保",
  557. "value": "0"
  558. }, {
  559. "label": "5%",
  560. "value": "5"
  561. }, {
  562. "label": "10%",
  563. "value": "10"
  564. }, {
  565. "label": "15%",
  566. "value": "15"
  567. }, {
  568. "label": "20%",
  569. "value": "20"
  570. }],
  571. desc: "被保险机动车发生主险约定的保险事故,保险人按照主险的约定计算赔款后,扣减本特约条款约定的免赔的险种。",
  572. isMainRisk: true,
  573. kindCode: "MJ1",
  574. kindName: "绝对免赔率特约险(车损)",
  575. mainRiskCodeList: "A"
  576. },
  577. {
  578. amount: "0",
  579. amountDesc: "不投保",
  580. amtList: [{
  581. "label": "不投保",
  582. "value": "0"
  583. }, {
  584. "label": "5%",
  585. "value": "5"
  586. }, {
  587. "label": "10%",
  588. "value": "10"
  589. }, {
  590. "label": "15%",
  591. "value": "15"
  592. }, {
  593. "label": "20%",
  594. "value": "20"
  595. }],
  596. desc: "被保险机动车发生主险约定的保险事故,保险人按照主险的约定计算赔款后,扣减本特约条款约定的免赔的险种。",
  597. isMainRisk: true,
  598. kindCode: "MJ2",
  599. kindName: "绝对免赔率特约险(三者)",
  600. mainRiskCodeList: "B"
  601. },
  602. {
  603. amount: "0",
  604. amountDesc: "不投保",
  605. amtList: [{
  606. "label": "不投保",
  607. "value": "0"
  608. }, {
  609. "label": "5%",
  610. "value": "5"
  611. }, {
  612. "label": "10%",
  613. "value": "10"
  614. }, {
  615. "label": "15%",
  616. "value": "15"
  617. }, {
  618. "label": "20%",
  619. "value": "20"
  620. }],
  621. desc: "被保险机动车发生主险约定的保险事故,保险人按照主险的约定计算赔款后,扣减本特约条款约定的免赔的险种。",
  622. isMainRisk: true,
  623. kindCode: "MJ3",
  624. kindName: "绝对免赔率特约险(司机)",
  625. mainRiskCodeList: "D3"
  626. },
  627. {
  628. amount: "0",
  629. amountDesc: "不投保",
  630. amtList: [{
  631. "label": "不投保",
  632. "value": "0"
  633. }, {
  634. "label": "5%",
  635. "value": "5"
  636. }, {
  637. "label": "10%",
  638. "value": "10"
  639. }, {
  640. "label": "15%",
  641. "value": "15"
  642. }, {
  643. "label": "20%",
  644. "value": "20"
  645. }],
  646. desc: "被保险机动车发生主险约定的保险事故,保险人按照主险的约定计算赔款后,扣减本特约条款约定的免赔的险种。",
  647. isMainRisk: true,
  648. kindCode: "MJ4",
  649. kindName: "绝对免赔率特约险(乘客)",
  650. mainRiskCodeList: "D4"
  651. },
  652. {
  653. amount: "0",
  654. amountDesc: "不投保",
  655. coveragePremium: 0,
  656. amtList: [{
  657. label: "不投保",
  658. value: "0"
  659. },
  660. {
  661. label: "1万",
  662. value: "10000"
  663. },
  664. {
  665. label: "2万",
  666. value: "20000"
  667. },
  668. {
  669. label: "4万",
  670. value: "40000"
  671. },
  672. {
  673. label: "5万",
  674. value: "50000"
  675. },
  676. {
  677. label: "8万",
  678. value: "80000"
  679. },
  680. {
  681. label: "10万",
  682. value: "100000"
  683. },
  684. {
  685. label: "20万",
  686. value: "200000"
  687. },
  688. {
  689. label: "30万",
  690. value: "300000"
  691. },
  692. {
  693. label: "50万",
  694. value: "500000"
  695. },
  696. {
  697. label: "100万",
  698. value: "1000000"
  699. },
  700. {
  701. label: "200万",
  702. value: "2000000"
  703. },
  704. {
  705. label: "300万",
  706. value: "3000000"
  707. },
  708. ],
  709. kindCode: "SY_FJ_YBW1",
  710. isMainRisk: true,
  711. kindName: "附加医保-三者",
  712. desc: "附加医保外医疗费用责任险(机动车第三者责任保险)"
  713. },
  714. {
  715. amount: "0",
  716. amountDesc: "不投保",
  717. coveragePremium: 0,
  718. amtList: [{
  719. label: "不投保",
  720. value: "0"
  721. },
  722. {
  723. label: "1万",
  724. value: "10000"
  725. },
  726. {
  727. label: "2万",
  728. value: "20000"
  729. },
  730. {
  731. label: "4万",
  732. value: "40000"
  733. },
  734. {
  735. label: "5万",
  736. value: "50000"
  737. },
  738. {
  739. label: "8万",
  740. value: "80000"
  741. },
  742. {
  743. label: "10万",
  744. value: "100000"
  745. },
  746. {
  747. label: "20万",
  748. value: "200000"
  749. },
  750. {
  751. label: "30万",
  752. value: "300000"
  753. },
  754. {
  755. label: "50万",
  756. value: "500000"
  757. },
  758. {
  759. label: "100万",
  760. value: "1000000"
  761. },
  762. {
  763. label: "200万",
  764. value: "2000000"
  765. },
  766. {
  767. label: "300万",
  768. value: "3000000"
  769. },
  770. ],
  771. kindCode: "SY_FJ_YBW2",
  772. isMainRisk: true,
  773. kindName: "附加医保-座位险(乘客)",
  774. desc: "附加医保外医疗费用责任险(机动车第三者责任保险)"
  775. },
  776. {
  777. amount: "0",
  778. amountDesc: "不投保",
  779. coveragePremium: 0,
  780. amtList: [{
  781. label: "不投保",
  782. value: "0"
  783. },
  784. {
  785. label: "1万",
  786. value: "10000"
  787. },
  788. {
  789. label: "2万",
  790. value: "20000"
  791. },
  792. {
  793. label: "4万",
  794. value: "40000"
  795. },
  796. {
  797. label: "5万",
  798. value: "50000"
  799. },
  800. {
  801. label: "8万",
  802. value: "80000"
  803. },
  804. {
  805. label: "10万",
  806. value: "100000"
  807. },
  808. {
  809. label: "20万",
  810. value: "200000"
  811. },
  812. {
  813. label: "30万",
  814. value: "300000"
  815. },
  816. {
  817. label: "50万",
  818. value: "500000"
  819. },
  820. {
  821. label: "100万",
  822. value: "1000000"
  823. },
  824. {
  825. label: "200万",
  826. value: "2000000"
  827. },
  828. {
  829. label: "300万",
  830. value: "3000000"
  831. },
  832. ],
  833. kindCode: "SY_FJ_YBW3",
  834. isMainRisk: true,
  835. kindName: "附加医保-座位险(司机)",
  836. desc: "附加医保外医疗费用责任险(机动车第三者责任保险)"
  837. },
  838. {
  839. amount: "0",
  840. amountDesc: "不投保",
  841. amtList: [{
  842. label: "不投保",
  843. value: "0"
  844. },
  845. {
  846. label: "50万",
  847. value: "500000"
  848. },
  849. {
  850. label: "100万",
  851. value: "1000000"
  852. },
  853. {
  854. label: "150万",
  855. value: "1500000"
  856. },
  857. {
  858. label: "200万",
  859. value: "2000000"
  860. },
  861. {
  862. label: "250万",
  863. value: "2500000"
  864. },
  865. {
  866. label: "300万",
  867. value: "3000000"
  868. },
  869. {
  870. label: "500万",
  871. value: "5000000"
  872. },
  873. {
  874. label: "1000万",
  875. value: "10000000"
  876. }
  877. ],
  878. desc: "保险期间内,被保险人或其允许的驾驶人在法定节假日期间使用被保险机动车发生机动车第三者责任保险范围内的事故,并经公安部门或保险人查勘确认的,被保险机动车第三者责任保险所适用的责任限额在保险单载明的基础上增加一倍的险种",
  879. isMainRisk: true,
  880. kindCode: "BD",
  881. kindName: "法定节假日限额翻倍险",
  882. mainRiskCodeList: "B"
  883. }
  884. ],
  885. /* 数据字典 */
  886. taxRelifFlagoptions: [],
  887. taxpayerIdentifieroptions: [],
  888. relifReasonoptions: [],
  889. /* 数据字典 */
  890. }
  891. },
  892. // 监听导航栏的按钮
  893. onNavigationBarButtonTap(e) {
  894. if (e.index == 0) {
  895. this.navigate({
  896. url: '/pages/index/index'
  897. }, "switchTab", true);
  898. }
  899. },
  900. onShow() {
  901. dateTime = new Date();
  902. dateTime.setTime(dateTime.getTime() + 24 * 60 * 60 * 1000);
  903. },
  904. onLoad() {
  905. this.getDicType("taxRelifFlag"); //车船税类型
  906. this.getDicType("taxpayerIdentifier"); //纳税人证件类型
  907. this.getDicType("relifReason"); //减免税原因代码
  908. this.jqstartDate = this.nextday();
  909. this.jqendDate = this.oneYearPast(this.jqstartDate);
  910. this.systartDate = this.nextday();
  911. this.syendDate = this.oneYearPast(this.jqstartDate);
  912. const eventChannel = this.getOpenerEventChannel()
  913. // 监听acceptData事件,获取上一页面通过eventChannel传送到当前页面的数据
  914. eventChannel.on('acceptData', (data) => {
  915. console.log(data)
  916. if (!!data) {
  917. //读取上一个页面传过来数据(车辆信息,人员信息,险种信息)
  918. this.carInfo = data.carInfo; //车辆信息
  919. this.ownerInfo = data.ownerInfo; //车主信息
  920. this.policyHolderInfo = data.policyHolderInfo; //投保人信息
  921. this.vehicleAndVesselTaxForm.identifyNumber = this.policyHolderInfo.identifyNumber;
  922. this.vehicleAndVesselTaxForm.taxpayerName = this.policyHolderInfo.name;
  923. this.insuredPersonInfo = data.insuredPersonInfo; //被保人信息
  924. this.riskList = data.riskList; //险种大类
  925. this.kindList = data.kindList; //商业险险别
  926. this.carInfoPositiveList = data.carInfoPositiveList; //车辆
  927. this.ownerInfoPositiveList = data.ownerInfoPositiveList; //车主
  928. this.policyHolderInfoPositiveList = data.policyHolderInfoPositiveList; //投保
  929. this.insuredPersonInfoPositiveList = data.insuredPersonInfoPositiveList; //被保人
  930. if (this.riskList.length > 0) {
  931. this.insureCodeList = [];
  932. this.riskList.map(ele => {
  933. switch (ele.riskCode) {
  934. case '0507':
  935. this.CIInsureList.amount = "1";
  936. this.CIInsureList.amountDesc = "投保";
  937. this.jqstartDate = ele.startDate;
  938. this.jqendDate = ele.endDate;
  939. break;
  940. case '0510':
  941. this.BIInsureList.amount = "1";
  942. this.BIInsureList.amountDesc = "投保";
  943. this.systartDate = ele.startDate;
  944. this.syendDate = ele.endDate;
  945. break;
  946. default:
  947. break;
  948. }
  949. })
  950. this.kindList.map(ele => {
  951. this.insureList.map(ele1 => {
  952. if (ele.kindCode == ele1.kindCode) {
  953. switch (ele.kindCode) {
  954. case 'A':
  955. ele1.amount = '1';
  956. ele1.amountDesc = '投保'
  957. break;
  958. case 'D4':
  959. case "SY_FJ_YBW2":
  960. ele1.amount = ele.unitAmount;
  961. ele1.amountDesc = this.toChinesNum(ele.unitAmount)
  962. break;
  963. case "MJ1":
  964. case "MJ2":
  965. case "MJ3":
  966. case "MJ4":
  967. ele1.amount = ele.deductibleRate;
  968. ele1.amountDesc = ele.deductibleRate + '%'
  969. break;
  970. default:
  971. ele1.amount = ele.amount;
  972. ele1.amountDesc = this.toChinesNum(ele.amount)
  973. break;
  974. }
  975. }
  976. })
  977. })
  978. }
  979. }
  980. })
  981. },
  982. computed: {
  983. startDate() {
  984. return this.getDate('start');
  985. },
  986. endDate() {
  987. return this.getDate('end');
  988. }
  989. },
  990. methods: {
  991. taxRelifFlagConfirm(val, name) {
  992. this.vehicleAndVesselTaxForm[name] = val[0].value;
  993. this.model[name] = val[0].label;
  994. },
  995. /* 数据字典 */
  996. async getDicType(type) {
  997. let res = await this.$http.get('/sysDict/dictDetails/' + type);
  998. if (res.code == 200) {
  999. this[type + 'options'] = res.data.ddList;
  1000. }
  1001. },
  1002. jqstartconfirm(e) {
  1003. this.jqstartDate = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
  1004. this.jqendDate = this.oneYearPast(this.jqstartDate)
  1005. },
  1006. jqendconfirm(e) {
  1007. this.jqendDate = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
  1008. },
  1009. systartconfirm(e) {
  1010. this.systartDate = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
  1011. this.syendDate = this.oneYearPast(this.systartDate)
  1012. },
  1013. syendconfirm(e) {
  1014. this.syendDate = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
  1015. },
  1016. taxDocumentDateconfirm(e) {
  1017. this.vehicleAndVesselTaxForm.taxDocumentDate = e.year + '-' + e.month + '-' + e.day;
  1018. },
  1019. taxPaidAreaCodeconfirm(e) {
  1020. this.vehicleAndVesselTaxForm.taxPaidAreaCode = e.province.value;
  1021. this.model.taxPaidAreaCode = e.province.label;
  1022. },
  1023. insureTip() {
  1024. this.$refs.popupInsure.show() // 显示
  1025. },
  1026. adjustPopupInsureSubmit() {
  1027. this.$refs.popupInsure.hide() // 显示
  1028. },
  1029. // 交强险提示
  1030. CITips() {
  1031. uni.showModal({
  1032. title: "交强险",
  1033. content: "指“机动车交通事故责任强制保险”,是由保险公司对被保险机动车发生道路交通事故造成受害人(不包括本车人员和被保险人)的人身伤亡、财产损失,在责任限额内予以赔偿的强制性责任保险。",
  1034. showCancel: false,
  1035. confirmText: "我知道了"
  1036. })
  1037. },
  1038. // 商业险提示
  1039. BITips() {
  1040. uni.showModal({
  1041. title: "商业险",
  1042. content: "指给车辆加上一份全面保障。详细险种包含:第三者责任险、盗抢险、车上人员责任险、车辆损失险、车身划痕损失险、自燃损失险、涉水险等,是您和爱车的必要保障。",
  1043. showCancel: false,
  1044. confirmText: "我知道了"
  1045. })
  1046. },
  1047. //弹出popup框并显示基本信息
  1048. adjustBIItem(index) {
  1049. var a = {};
  1050. Object.assign(a, this.insureList[index])
  1051. this.insureItem = a;
  1052. this.$refs.popupBI.show() // 显示
  1053. },
  1054. //popup内容的label改变
  1055. adjustBIItemLabel(index) {
  1056. this.insureItem.amount = this.insureItem.amtList[index].value;
  1057. this.insureItem.amountDesc = this.insureItem.amtList[index].label;
  1058. },
  1059. // 提交popup的label修改
  1060. adjustBIItemLabelSubmit() {
  1061. for (let i = 0; i < this.insureList.length; i++) {
  1062. if (this.insureItem.kindCode == this.insureList[i].kindCode) {
  1063. this.insureList[i].amount = this.insureItem.amount;
  1064. this.insureList[i].amountDesc = this.insureItem.amountDesc;
  1065. if (this.insureItem.kindCode == 'B') {
  1066. if (this.insureItem.amount != 0) {
  1067. this.insureList[9].amtList[1].value = this.insureItem.amount;
  1068. } else {
  1069. this.insureList[9].amtList[1].value = '1';
  1070. }
  1071. }
  1072. if (this.insureList[i].isMainRisk && this.insureList[i].amount == '0') {
  1073. for (let j = 0; j < this.insureList.length; j++) {
  1074. if ((!this.insureList[j].isMainRisk) && (this.insureList[j].mainRiskCodeList == this
  1075. .insureList[i].kindCode)) {
  1076. this.insureList[j].amount = this.insureList[j].amtList[0].value;
  1077. this.insureList[j].amountDesc = this.insureList[j].amtList[0].label;
  1078. }
  1079. }
  1080. }
  1081. var codeList = []
  1082. for (let m = 0; m < this.insureList.length; m++) {
  1083. if (this.insureList[m].amount != '0') {
  1084. codeList.push(this.insureList[m].kindCode);
  1085. }
  1086. }
  1087. this.insureCodeList = [];
  1088. Object.assign(this.insureCodeList, codeList)
  1089. if (this.insureCodeList.length > 0) {
  1090. this.BIInsureList.amount = '1';
  1091. this.BIInsureList.amountDesc = '投保';
  1092. } else {
  1093. this.BIInsureList.amount = '0';
  1094. this.BIInsureList.amountDesc = '不投保';
  1095. }
  1096. break;
  1097. }
  1098. }
  1099. this.$refs.popupBI.hide();
  1100. },
  1101. getDate(type) {
  1102. const date = new Date();
  1103. if (type === 'start') {
  1104. date.setTime(date.getTime());
  1105. } else if (type === 'end') {
  1106. date.setTime(date.getTime() + 24 * 60 * 60 * 1000 * 90);
  1107. }
  1108. let year = date.getFullYear();
  1109. let month = date.getMonth() + 1;
  1110. let day = date.getDate();
  1111. month = month > 9 ? month : '0' + month;;
  1112. day = day > 9 ? day : '0' + day;
  1113. return `${year}-${month}-${day}`;
  1114. },
  1115. //日期的选择
  1116. bindDateChange(e, startDateType) {
  1117. const date = new Date();
  1118. const date1 = date.getTime();
  1119. const date2 = date.getTime() + 24 * 60 * 60 * 1000 * 90;
  1120. const date3 = new Date(e.detail.value).getTime();
  1121. if (((date3 - date1) > 0) && ((date3 - date2) > 0)) {
  1122. return uni.showToast({
  1123. icon: "none",
  1124. title: "投保日期须在90天内"
  1125. })
  1126. }
  1127. this[startDateType] = e.detail.value;
  1128. },
  1129. //交强险弹出框
  1130. adjustCIItem(type) {
  1131. var a = {};
  1132. Object.assign(a, this[type]);
  1133. this.insureItem = a;
  1134. this.$refs.popupCI.show() // 显示
  1135. },
  1136. adjustCIItemLabel(index) {
  1137. this.insureItem.amount = this.insureItem.amtList[index].value;
  1138. this.insureItem.amountDesc = this.insureItem.amtList[index].label;
  1139. },
  1140. adjustCIItemLabelSubmit(kindCode) {
  1141. var a = {};
  1142. if (kindCode == '0507') {
  1143. this.CIInsureList = {};
  1144. Object.assign(a, this.insureItem)
  1145. this.CIInsureList = a;
  1146. }
  1147. if (kindCode == '0510') {
  1148. if (this.insureItem.amount == '0') {
  1149. this.insureCodeList = [];
  1150. for (let i = 0; i < this.insureList.length; i++) {
  1151. this.insureList[i].amount = '0';
  1152. this.insureList[i].amountDesc = '不投保';
  1153. }
  1154. } else {
  1155. // 车损险
  1156. this.insureList[0].amount = 1;
  1157. this.insureList[0].amountDesc = "投保";
  1158. // 三者险
  1159. this.insureList[1].amount = 1000000;
  1160. this.insureList[1].amountDesc = "100万";
  1161. // 司机险
  1162. this.insureList[2].amount = 10000;
  1163. this.insureList[2].amountDesc = "1万";
  1164. // 乘客险
  1165. this.insureList[3].amount = 10000;
  1166. this.insureList[3].amountDesc = "1万";
  1167. this.insureList[4].amount = 0;
  1168. this.insureList[4].amountDesc = "不投保";
  1169. }
  1170. this.BIInsureList = {};
  1171. Object.assign(a, this.insureItem)
  1172. this.BIInsureList = a;
  1173. }
  1174. this.$refs.popupCI.hide() // 显示
  1175. },
  1176. //跳转报价页面
  1177. toQuote() {
  1178. var riskList = []; //险种大类信息
  1179. var kindList = []; //商业险险别
  1180. if (this.CIInsureList.amount == '1') {
  1181. this.jqstartDate = this.transformTime(this.jqstartDate);
  1182. this.jqendDate = this.transformTime(this.jqendDate);
  1183. riskList.push({
  1184. amount: "200000",
  1185. premium: "0",
  1186. riskCode: "0507",
  1187. startDate: this.jqstartDate,
  1188. endDate: this.jqendDate,
  1189. instantFlag: "0"
  1190. })
  1191. }
  1192. if (this.BIInsureList.amount == '1') {
  1193. this.systartDate = this.transformTime(this.systartDate);
  1194. this.syendDate = this.transformTime(this.syendDate);
  1195. riskList.push({
  1196. startDate: this.systartDate,
  1197. endDate: this.syendDate,
  1198. quotePreceptName: "",
  1199. quotePreceptCode: "",
  1200. instantFlag: "0",
  1201. premium: "0",
  1202. riskCode: "0510"
  1203. })
  1204. this.insureList.map((ele, index) => {
  1205. if (
  1206. ele.amount != "0" &&
  1207. (ele.kindCode == "D4" || ele.kindCode == "SY_FJ_YBW2")
  1208. ) {
  1209. kindList.push({
  1210. unitAmount: this.insureList[index].amount,
  1211. kindCode: this.insureList[index].kindCode,
  1212. kindName: this.insureList[index].kindName
  1213. });
  1214. } else if (
  1215. ele.amount != "0" &&
  1216. (ele.kindCode == "MJ1" ||
  1217. ele.kindCode == "MJ2" ||
  1218. ele.kindCode == "MJ3" ||
  1219. ele.kindCode == "MJ4")
  1220. ) {
  1221. kindList.push({
  1222. deductibleRate: this.insureList[index].amount,
  1223. kindCode: this.insureList[index].kindCode,
  1224. kindName: this.insureList[index].kindName
  1225. });
  1226. } else if (ele.amount != "0") {
  1227. kindList.push({
  1228. amount: this.insureList[index].amount,
  1229. kindCode: this.insureList[index].kindCode,
  1230. kindName: this.insureList[index].kindName
  1231. });
  1232. }
  1233. return ele;
  1234. });
  1235. }
  1236. if (riskList.length == 0) {
  1237. return uni.showToast({
  1238. icon: "none",
  1239. title: "请至少选择一种主险"
  1240. })
  1241. }
  1242. // console.log(riskList, kindList)
  1243. this.navigate({
  1244. url: '/pages/carInsure1/quote1',
  1245. success: (res) => {
  1246. res.eventChannel.emit("acceptData", {
  1247. carInfo: this.carInfo,
  1248. ownerInfo: this.ownerInfo,
  1249. policyHolderInfo: this.policyHolderInfo,
  1250. insuredPersonInfo: this.insuredPersonInfo,
  1251. riskList: riskList,
  1252. kindList: kindList,
  1253. carInfoPositiveList: this.carInfoPositiveList, //车辆
  1254. ownerInfoPositiveList: this.ownerInfoPositiveList, //车主
  1255. vehicleAndVesselTaxForm: this.vehicleAndVesselTaxForm, //车船税信息
  1256. policyHolderInfoPositiveList: this.policyHolderInfoPositiveList, //投保人
  1257. insuredPersonInfoPositiveList: this.insuredPersonInfoPositiveList, //被保人
  1258. })
  1259. }
  1260. }, "navigateTo", true);
  1261. },
  1262. //计算输入时间一年后的的前一天(输入的参数为字符串("2019-03-02")最终输出也为日期的字符串)
  1263. oneYearPast(time) {
  1264. var date = new Date(time);
  1265. date.setSeconds(date.getSeconds() - 1);
  1266. date.setFullYear(date.getFullYear() + 1); //一年后
  1267. date.setTime(date.getTime()); //一年后的前一天
  1268. var strYear = date.getFullYear();
  1269. var strDay = date.getDate();
  1270. var strMonth = date.getMonth() + 1;
  1271. var hh = date.getHours();
  1272. var minutes = date.getMinutes(); // 分
  1273. var Seconds = date.getSeconds();
  1274. if (hh < 10) {
  1275. hh = "0" + hh;
  1276. }
  1277. if (minutes < 10) {
  1278. minutes = "0" + minutes;
  1279. }
  1280. if (Seconds < 10) {
  1281. Seconds = "0" + Seconds;
  1282. }
  1283. if (strMonth < 10) {
  1284. strMonth = "0" + strMonth;
  1285. }
  1286. if (strDay < 10) {
  1287. strDay = "0" + strDay;
  1288. }
  1289. var datastr =
  1290. strYear + "-" + strMonth + "-" + strDay + " " + hh + ":" + minutes + ":" + Seconds;
  1291. return datastr;
  1292. },
  1293. //次日
  1294. nextday() {
  1295. var date = new Date();
  1296. date.setFullYear(date.getFullYear());
  1297. date.setTime(date.getTime() + 24 * 60 * 60 * 1000);
  1298. var strYear = date.getFullYear();
  1299. var strDay = date.getDate();
  1300. var strMonth = date.getMonth() + 1;
  1301. var hh = date.getHours();
  1302. if (hh < 10) {
  1303. hh = "0" + hh;
  1304. }
  1305. if (strMonth < 10) {
  1306. strMonth = "0" + strMonth;
  1307. }
  1308. if (strDay < 10) {
  1309. strDay = "0" + strDay;
  1310. }
  1311. var datastr = strYear + "-" + strMonth + "-" + strDay + " " + "00:00:00";
  1312. return datastr;
  1313. },
  1314. //时间转换
  1315. transformTime(date) {
  1316. var d = new Date(date);
  1317. var strYear = d.getFullYear();
  1318. var strMonth = d.getMonth() + 1;
  1319. var strDay = d.getDate();
  1320. var hh = d.getHours();
  1321. var minutes = d.getMinutes(); // 分
  1322. var Seconds = d.getSeconds();
  1323. if (hh < 10) {
  1324. hh = "0" + hh;
  1325. }
  1326. if (minutes < 10) {
  1327. minutes = "0" + minutes;
  1328. }
  1329. if (Seconds < 10) {
  1330. Seconds = "0" + Seconds;
  1331. }
  1332. if (strMonth < 10) {
  1333. strMonth = "0" + strMonth;
  1334. }
  1335. if (strDay < 10) {
  1336. strDay = "0" + strDay;
  1337. }
  1338. var datetime =
  1339. strYear + "-" + strMonth + "-" + strDay + " " + hh + ":" + minutes + ":" + Seconds;
  1340. return datetime;
  1341. },
  1342. toChinesNum(num) {
  1343. let changeNum = [
  1344. "零", "1", "2", "3", "4", "5", "6", "7", "8", "9"
  1345. ];
  1346. let unit = ["", "0", "00", "000", "0000"];
  1347. num = parseInt(num);
  1348. let getWan = temp => {
  1349. let strArr = temp
  1350. .toString()
  1351. .split("")
  1352. .reverse();
  1353. let newNum = "";
  1354. let newArr = [];
  1355. strArr.forEach((item, index) => {
  1356. newArr.unshift(
  1357. item === "0" ? changeNum[item] : changeNum[item] + unit[index]
  1358. );
  1359. });
  1360. let numArr = [];
  1361. newArr.forEach((m, n) => {
  1362. if (m !== "零") numArr.push(n);
  1363. });
  1364. if (newArr.length > 1) {
  1365. newArr.forEach((m, n) => {
  1366. if (newArr[newArr.length - 1] === "零") {
  1367. if (n <= numArr[numArr.length - 1]) {
  1368. newNum += m;
  1369. }
  1370. } else {
  1371. newNum += m;
  1372. }
  1373. });
  1374. } else {
  1375. newNum = newArr[0];
  1376. }
  1377. return newNum;
  1378. };
  1379. let overWan = Math.floor(num / 10000);
  1380. let noWan = num % 10000;
  1381. if (noWan.toString().length < 4) {
  1382. noWan = "0" + noWan;
  1383. }
  1384. return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num);
  1385. },
  1386. }
  1387. }
  1388. </script>
  1389. <style lang="scss" scoped>
  1390. @import '@/style/mixin.scss';
  1391. /* 整个页面的统一样式 Start */
  1392. .page {
  1393. padding-bottom: 200upx;
  1394. }
  1395. /* 整个页面的统一样式 End */
  1396. .plan-ins-title {
  1397. background-color: #F4F5F7;
  1398. height: 88upx;
  1399. color: #666;
  1400. font-size: 32upx;
  1401. line-height: 88upx;
  1402. font-weight: 400;
  1403. padding: 0 30upx;
  1404. }
  1405. .plan-ins-title .title-right {
  1406. color: #aaa;
  1407. }
  1408. .compulsory-insurance,
  1409. .business-insurance {
  1410. border-bottom: 15upx solid #eee;
  1411. }
  1412. .common-title {
  1413. font-size: 32upx;
  1414. padding: 0upx 32upx;
  1415. height: 90upx;
  1416. border-bottom: 1px solid #eee;
  1417. font-weight: bold;
  1418. }
  1419. .common-ins-cell {
  1420. font-size: 30upx;
  1421. padding: 0upx 30upx;
  1422. height: 90upx;
  1423. border-bottom: 1px solid #eee;
  1424. }
  1425. /* 底部按钮Start */
  1426. .bottom-btn {
  1427. background-color: #fff;
  1428. position: fixed;
  1429. bottom: 0;
  1430. left: 0;
  1431. right: 0;
  1432. padding: 30upx 30upx;
  1433. z-index: 99;
  1434. }
  1435. /* 底部按钮End */
  1436. /* 交强险和商业险弹出框Start */
  1437. .popup-content {
  1438. position: relative;
  1439. }
  1440. .popHeader {
  1441. box-sizing: border-box;
  1442. font-size: 32upx;
  1443. font-weight: bold;
  1444. height: 120upx;
  1445. border-bottom: 1px solid #eee;
  1446. }
  1447. .popup-content .popContent {
  1448. padding: 0upx 30upx;
  1449. height: 620upx;
  1450. box-sizing: border-box;
  1451. }
  1452. .popup-content .popContent .popContentTitle {
  1453. font-weight: bold;
  1454. font-size: 32upx;
  1455. margin: 20upx 0upx 5upx 0upx;
  1456. }
  1457. .popup-content .popContent .amtSingle {
  1458. width: 25%;
  1459. box-sizing: border-box;
  1460. display: inline-block;
  1461. padding: 15upx;
  1462. text-align: center;
  1463. vertical-align: middle;
  1464. }
  1465. .popup-content .popContent .amtSingle>view {
  1466. font-size: 28upx;
  1467. border: 1px solid #eee;
  1468. border-radius: 10upx;
  1469. }
  1470. .popup-content .popContent .amtSingle>view.active {
  1471. background: rgba($themeColor, .08);
  1472. color: $themeColor;
  1473. border: 1px solid rgba($themeColor, .01);
  1474. font-weight: 700;
  1475. }
  1476. .popup-content .popBottom {
  1477. margin: 30upx 30upx 0 30upx;
  1478. padding-bottom: 30upx;
  1479. }
  1480. /* 交强险和商业险弹出框End */
  1481. /* 投保方案建议弹出框Start */
  1482. .popupBody {
  1483. position: relative;
  1484. }
  1485. .popupBody .popHeader {
  1486. border: none;
  1487. }
  1488. .popupBody .popBottom {
  1489. position: fixed;
  1490. box-sizing: border-box;
  1491. bottom: 0;
  1492. width: 100%;
  1493. height: 100upx;
  1494. border-top: 1px solid #f6f6f6;
  1495. font-weight: 700;
  1496. font-size: 36upx;
  1497. }
  1498. .popupBody .popupScroll {
  1499. height: 485upx;
  1500. padding: 0 30upx 0 30upx;
  1501. box-sizing: border-box;
  1502. }
  1503. .popupScroll .title {
  1504. font-weight: 700;
  1505. font-size: 30upx;
  1506. }
  1507. .popupScroll .desc {
  1508. font-size: 28upx;
  1509. }
  1510. .modelformcss {
  1511. padding: 5px 15px;
  1512. }
  1513. </style>