insureItems1.vue 50 KB

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