insureItems1.vue 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564
  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. console.log(ele)
  954. switch (ele.kindCode) {
  955. case 'A':
  956. ele1.amount = '1';
  957. ele1.amountDesc = '投保'
  958. break;
  959. case 'D4':
  960. case "SY_FJ_YBW2":
  961. ele1.amount = ele.unitAmount;
  962. ele1.amountDesc = this.toChinesNum(ele.unitAmount)
  963. break;
  964. case "MJ1":
  965. case "MJ2":
  966. case "MJ3":
  967. case "MJ4":
  968. ele1.amount = ele.deductibleRate;
  969. ele1.amountDesc = ele.deductibleRate + '%'
  970. break;
  971. default:
  972. ele1.amount = ele.amount;
  973. ele1.amountDesc = this.toChinesNum(ele.amount)
  974. break;
  975. }
  976. }
  977. })
  978. })
  979. console.log(this.insureList)
  980. }
  981. }
  982. })
  983. },
  984. computed: {
  985. startDate() {
  986. return this.getDate('start');
  987. },
  988. endDate() {
  989. return this.getDate('end');
  990. }
  991. },
  992. methods: {
  993. taxRelifFlagConfirm(val, name) {
  994. this.vehicleAndVesselTaxForm[name] = val[0].value;
  995. this.model[name] = val[0].label;
  996. },
  997. /* 数据字典 */
  998. async getDicType(type) {
  999. let res = await this.$http.get('/sysDict/dictDetails/' + type);
  1000. if (res.code == 200) {
  1001. this[type + 'options'] = res.data.ddList;
  1002. }
  1003. },
  1004. jqstartconfirm(e) {
  1005. this.jqstartDate = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
  1006. this.jqendDate = this.oneYearPast(this.jqstartDate)
  1007. },
  1008. jqendconfirm(e) {
  1009. this.jqendDate = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
  1010. },
  1011. systartconfirm(e) {
  1012. this.systartDate = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
  1013. this.syendDate = this.oneYearPast(this.systartDate)
  1014. },
  1015. syendconfirm(e) {
  1016. this.syendDate = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
  1017. },
  1018. taxDocumentDateconfirm(e) {
  1019. this.vehicleAndVesselTaxForm.taxDocumentDate = e.year + '-' + e.month + '-' + e.day;
  1020. },
  1021. taxPaidAreaCodeconfirm(e) {
  1022. this.vehicleAndVesselTaxForm.taxPaidAreaCode = e.province.value;
  1023. this.model.taxPaidAreaCode = e.province.label;
  1024. },
  1025. insureTip() {
  1026. this.$refs.popupInsure.show() // 显示
  1027. },
  1028. adjustPopupInsureSubmit() {
  1029. this.$refs.popupInsure.hide() // 显示
  1030. },
  1031. // 交强险提示
  1032. CITips() {
  1033. uni.showModal({
  1034. title: "交强险",
  1035. content: "指“机动车交通事故责任强制保险”,是由保险公司对被保险机动车发生道路交通事故造成受害人(不包括本车人员和被保险人)的人身伤亡、财产损失,在责任限额内予以赔偿的强制性责任保险。",
  1036. showCancel: false,
  1037. confirmText: "我知道了"
  1038. })
  1039. },
  1040. // 商业险提示
  1041. BITips() {
  1042. uni.showModal({
  1043. title: "商业险",
  1044. content: "指给车辆加上一份全面保障。详细险种包含:第三者责任险、盗抢险、车上人员责任险、车辆损失险、车身划痕损失险、自燃损失险、涉水险等,是您和爱车的必要保障。",
  1045. showCancel: false,
  1046. confirmText: "我知道了"
  1047. })
  1048. },
  1049. //弹出popup框并显示基本信息
  1050. adjustBIItem(index) {
  1051. var a = {};
  1052. Object.assign(a, this.insureList[index])
  1053. this.insureItem = a;
  1054. this.$refs.popupBI.show() // 显示
  1055. },
  1056. //popup内容的label改变
  1057. adjustBIItemLabel(index) {
  1058. this.insureItem.amount = this.insureItem.amtList[index].value;
  1059. this.insureItem.amountDesc = this.insureItem.amtList[index].label;
  1060. },
  1061. // 提交popup的label修改
  1062. adjustBIItemLabelSubmit() {
  1063. for (let i = 0; i < this.insureList.length; i++) {
  1064. if (this.insureItem.kindCode == this.insureList[i].kindCode) {
  1065. this.insureList[i].amount = this.insureItem.amount;
  1066. this.insureList[i].amountDesc = this.insureItem.amountDesc;
  1067. if (this.insureItem.kindCode == 'B') {
  1068. if (this.insureItem.amount != 0) {
  1069. this.insureList[9].amtList[1].value = this.insureItem.amount;
  1070. } else {
  1071. this.insureList[9].amtList[1].value = '1';
  1072. }
  1073. }
  1074. if (this.insureList[i].isMainRisk && this.insureList[i].amount == '0') {
  1075. for (let j = 0; j < this.insureList.length; j++) {
  1076. if ((!this.insureList[j].isMainRisk) && (this.insureList[j].mainRiskCodeList == this
  1077. .insureList[i].kindCode)) {
  1078. this.insureList[j].amount = this.insureList[j].amtList[0].value;
  1079. this.insureList[j].amountDesc = this.insureList[j].amtList[0].label;
  1080. }
  1081. }
  1082. }
  1083. var codeList = []
  1084. for (let m = 0; m < this.insureList.length; m++) {
  1085. if (this.insureList[m].amount != '0') {
  1086. codeList.push(this.insureList[m].kindCode);
  1087. }
  1088. }
  1089. this.insureCodeList = [];
  1090. Object.assign(this.insureCodeList, codeList)
  1091. if (this.insureCodeList.length > 0) {
  1092. this.BIInsureList.amount = '1';
  1093. this.BIInsureList.amountDesc = '投保';
  1094. } else {
  1095. this.BIInsureList.amount = '0';
  1096. this.BIInsureList.amountDesc = '不投保';
  1097. }
  1098. break;
  1099. }
  1100. }
  1101. this.$refs.popupBI.hide();
  1102. },
  1103. getDate(type) {
  1104. const date = new Date();
  1105. if (type === 'start') {
  1106. date.setTime(date.getTime());
  1107. } else if (type === 'end') {
  1108. date.setTime(date.getTime() + 24 * 60 * 60 * 1000 * 90);
  1109. }
  1110. let year = date.getFullYear();
  1111. let month = date.getMonth() + 1;
  1112. let day = date.getDate();
  1113. month = month > 9 ? month : '0' + month;;
  1114. day = day > 9 ? day : '0' + day;
  1115. return `${year}-${month}-${day}`;
  1116. },
  1117. //日期的选择
  1118. bindDateChange(e, startDateType) {
  1119. const date = new Date();
  1120. const date1 = date.getTime();
  1121. const date2 = date.getTime() + 24 * 60 * 60 * 1000 * 90;
  1122. const date3 = new Date(e.detail.value).getTime();
  1123. if (((date3 - date1) > 0) && ((date3 - date2) > 0)) {
  1124. return uni.showToast({
  1125. icon: "none",
  1126. title: "投保日期须在90天内"
  1127. })
  1128. }
  1129. this[startDateType] = e.detail.value;
  1130. },
  1131. //交强险弹出框
  1132. adjustCIItem(type) {
  1133. var a = {};
  1134. Object.assign(a, this[type]);
  1135. this.insureItem = a;
  1136. this.$refs.popupCI.show() // 显示
  1137. },
  1138. adjustCIItemLabel(index) {
  1139. this.insureItem.amount = this.insureItem.amtList[index].value;
  1140. this.insureItem.amountDesc = this.insureItem.amtList[index].label;
  1141. },
  1142. adjustCIItemLabelSubmit(kindCode) {
  1143. var a = {};
  1144. if (kindCode == '0507') {
  1145. this.CIInsureList = {};
  1146. Object.assign(a, this.insureItem)
  1147. this.CIInsureList = a;
  1148. }
  1149. if (kindCode == '0510') {
  1150. if (this.insureItem.amount == '0') {
  1151. this.insureCodeList = [];
  1152. for (let i = 0; i < this.insureList.length; i++) {
  1153. this.insureList[i].amount = '0';
  1154. this.insureList[i].amountDesc = '不投保';
  1155. }
  1156. } else {
  1157. // 车损险
  1158. this.insureList[0].amount = 1;
  1159. this.insureList[0].amountDesc = "投保";
  1160. // 三者险
  1161. this.insureList[1].amount = 1000000;
  1162. this.insureList[1].amountDesc = "100万";
  1163. // 司机险
  1164. this.insureList[2].amount = 10000;
  1165. this.insureList[2].amountDesc = "1万";
  1166. // 乘客险
  1167. this.insureList[3].amount = 10000;
  1168. this.insureList[3].amountDesc = "1万";
  1169. this.insureList[4].amount = 0;
  1170. this.insureList[4].amountDesc = "不投保";
  1171. }
  1172. this.BIInsureList = {};
  1173. Object.assign(a, this.insureItem)
  1174. this.BIInsureList = a;
  1175. }
  1176. this.$refs.popupCI.hide() // 显示
  1177. },
  1178. //跳转报价页面
  1179. toQuote() {
  1180. var riskList = []; //险种大类信息
  1181. var kindList = []; //商业险险别
  1182. if (this.CIInsureList.amount == '1') {
  1183. this.jqstartDate = this.transformTime(this.jqstartDate);
  1184. this.jqendDate = this.transformTime(this.jqendDate);
  1185. riskList.push({
  1186. amount: "200000",
  1187. premium: "0",
  1188. riskCode: "0507",
  1189. startDate: this.jqstartDate,
  1190. endDate: this.jqendDate,
  1191. instantFlag: "0"
  1192. })
  1193. }
  1194. if (this.BIInsureList.amount == '1') {
  1195. this.systartDate = this.transformTime(this.systartDate);
  1196. this.syendDate = this.transformTime(this.syendDate);
  1197. riskList.push({
  1198. startDate: this.systartDate,
  1199. endDate: this.syendDate,
  1200. quotePreceptName: "",
  1201. quotePreceptCode: "",
  1202. instantFlag: "0",
  1203. premium: "0",
  1204. riskCode: "0510"
  1205. })
  1206. this.insureList.map((ele, index) => {
  1207. if (
  1208. ele.amount != "0" &&
  1209. (ele.kindCode == "D4" || ele.kindCode == "SY_FJ_YBW2")
  1210. ) {
  1211. kindList.push({
  1212. unitAmount: this.insureList[index].amount,
  1213. kindCode: this.insureList[index].kindCode,
  1214. kindName: this.insureList[index].kindName
  1215. });
  1216. } else if (
  1217. ele.amount != "0" &&
  1218. (ele.kindCode == "MJ1" ||
  1219. ele.kindCode == "MJ2" ||
  1220. ele.kindCode == "MJ3" ||
  1221. ele.kindCode == "MJ4")
  1222. ) {
  1223. kindList.push({
  1224. deductibleRate: this.insureList[index].amount,
  1225. kindCode: this.insureList[index].kindCode,
  1226. kindName: this.insureList[index].kindName
  1227. });
  1228. } else if (ele.amount != "0") {
  1229. kindList.push({
  1230. amount: this.insureList[index].amount,
  1231. kindCode: this.insureList[index].kindCode,
  1232. kindName: this.insureList[index].kindName
  1233. });
  1234. }
  1235. return ele;
  1236. });
  1237. }
  1238. if (riskList.length == 0) {
  1239. return uni.showToast({
  1240. icon: "none",
  1241. title: "请至少选择一种主险"
  1242. })
  1243. }
  1244. // console.log(riskList, kindList)
  1245. this.navigate({
  1246. url: '/pages/carInsure1/quote1',
  1247. success: (res) => {
  1248. res.eventChannel.emit("acceptData", {
  1249. carInfo: this.carInfo,
  1250. ownerInfo: this.ownerInfo,
  1251. policyHolderInfo: this.policyHolderInfo,
  1252. insuredPersonInfo: this.insuredPersonInfo,
  1253. riskList: riskList,
  1254. kindList: kindList,
  1255. carInfoPositiveList: this.carInfoPositiveList, //车辆
  1256. ownerInfoPositiveList: this.ownerInfoPositiveList, //车主
  1257. vehicleAndVesselTaxForm: this.vehicleAndVesselTaxForm, //车船税信息
  1258. policyHolderInfoPositiveList: this.policyHolderInfoPositiveList, //投保人
  1259. insuredPersonInfoPositiveList: this.insuredPersonInfoPositiveList, //被保人
  1260. })
  1261. }
  1262. }, "navigateTo", true);
  1263. },
  1264. //计算输入时间一年后的的前一天(输入的参数为字符串("2019-03-02")最终输出也为日期的字符串)
  1265. oneYearPast(time) {
  1266. var date = new Date(time);
  1267. date.setSeconds(date.getSeconds() - 1);
  1268. date.setFullYear(date.getFullYear() + 1); //一年后
  1269. date.setTime(date.getTime()); //一年后的前一天
  1270. var strYear = date.getFullYear();
  1271. var strDay = date.getDate();
  1272. var strMonth = date.getMonth() + 1;
  1273. var hh = date.getHours();
  1274. var minutes = date.getMinutes(); // 分
  1275. var Seconds = date.getSeconds();
  1276. if (hh < 10) {
  1277. hh = "0" + hh;
  1278. }
  1279. if (minutes < 10) {
  1280. minutes = "0" + minutes;
  1281. }
  1282. if (Seconds < 10) {
  1283. Seconds = "0" + Seconds;
  1284. }
  1285. if (strMonth < 10) {
  1286. strMonth = "0" + strMonth;
  1287. }
  1288. if (strDay < 10) {
  1289. strDay = "0" + strDay;
  1290. }
  1291. var datastr =
  1292. strYear + "-" + strMonth + "-" + strDay + " " + hh + ":" + minutes + ":" + Seconds;
  1293. return datastr;
  1294. },
  1295. //次日
  1296. nextday() {
  1297. var date = new Date();
  1298. date.setFullYear(date.getFullYear());
  1299. date.setTime(date.getTime() + 24 * 60 * 60 * 1000);
  1300. var strYear = date.getFullYear();
  1301. var strDay = date.getDate();
  1302. var strMonth = date.getMonth() + 1;
  1303. var hh = date.getHours();
  1304. if (hh < 10) {
  1305. hh = "0" + hh;
  1306. }
  1307. if (strMonth < 10) {
  1308. strMonth = "0" + strMonth;
  1309. }
  1310. if (strDay < 10) {
  1311. strDay = "0" + strDay;
  1312. }
  1313. var datastr = strYear + "-" + strMonth + "-" + strDay + " " + "00:00:00";
  1314. return datastr;
  1315. },
  1316. //时间转换
  1317. transformTime(date) {
  1318. var d = new Date(date);
  1319. var strYear = d.getFullYear();
  1320. var strMonth = d.getMonth() + 1;
  1321. var strDay = d.getDate();
  1322. var hh = d.getHours();
  1323. var minutes = d.getMinutes(); // 分
  1324. var Seconds = d.getSeconds();
  1325. if (hh < 10) {
  1326. hh = "0" + hh;
  1327. }
  1328. if (minutes < 10) {
  1329. minutes = "0" + minutes;
  1330. }
  1331. if (Seconds < 10) {
  1332. Seconds = "0" + Seconds;
  1333. }
  1334. if (strMonth < 10) {
  1335. strMonth = "0" + strMonth;
  1336. }
  1337. if (strDay < 10) {
  1338. strDay = "0" + strDay;
  1339. }
  1340. var datetime =
  1341. strYear + "-" + strMonth + "-" + strDay + " " + hh + ":" + minutes + ":" + Seconds;
  1342. return datetime;
  1343. },
  1344. toChinesNum(num) {
  1345. let changeNum = [
  1346. "零", "1", "2", "3", "4", "5", "6", "7", "8", "9"
  1347. ];
  1348. let unit = ["", "0", "00", "000", "0000"];
  1349. num = parseInt(num);
  1350. let getWan = temp => {
  1351. let strArr = temp
  1352. .toString()
  1353. .split("")
  1354. .reverse();
  1355. let newNum = "";
  1356. let newArr = [];
  1357. strArr.forEach((item, index) => {
  1358. newArr.unshift(
  1359. item === "0" ? changeNum[item] : changeNum[item] + unit[index]
  1360. );
  1361. });
  1362. let numArr = [];
  1363. newArr.forEach((m, n) => {
  1364. if (m !== "零") numArr.push(n);
  1365. });
  1366. if (newArr.length > 1) {
  1367. newArr.forEach((m, n) => {
  1368. if (newArr[newArr.length - 1] === "零") {
  1369. if (n <= numArr[numArr.length - 1]) {
  1370. newNum += m;
  1371. }
  1372. } else {
  1373. newNum += m;
  1374. }
  1375. });
  1376. } else {
  1377. newNum = newArr[0];
  1378. }
  1379. return newNum;
  1380. };
  1381. let overWan = Math.floor(num / 10000);
  1382. let noWan = num % 10000;
  1383. if (noWan.toString().length < 4) {
  1384. noWan = "0" + noWan;
  1385. }
  1386. return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num);
  1387. },
  1388. }
  1389. }
  1390. </script>
  1391. <style lang="scss" scoped>
  1392. @import '@/style/mixin.scss';
  1393. /* 整个页面的统一样式 Start */
  1394. .page {
  1395. padding-bottom: 200upx;
  1396. }
  1397. /* 整个页面的统一样式 End */
  1398. .plan-ins-title {
  1399. background-color: #F4F5F7;
  1400. height: 88upx;
  1401. color: #666;
  1402. font-size: 32upx;
  1403. line-height: 88upx;
  1404. font-weight: 400;
  1405. padding: 0 30upx;
  1406. }
  1407. .plan-ins-title .title-right {
  1408. color: #aaa;
  1409. }
  1410. .compulsory-insurance,
  1411. .business-insurance {
  1412. border-bottom: 15upx solid #eee;
  1413. }
  1414. .common-title {
  1415. font-size: 32upx;
  1416. padding: 0upx 32upx;
  1417. height: 90upx;
  1418. border-bottom: 1px solid #eee;
  1419. font-weight: bold;
  1420. }
  1421. .common-ins-cell {
  1422. font-size: 30upx;
  1423. padding: 0upx 30upx;
  1424. height: 90upx;
  1425. border-bottom: 1px solid #eee;
  1426. }
  1427. /* 底部按钮Start */
  1428. .bottom-btn {
  1429. background-color: #fff;
  1430. position: fixed;
  1431. bottom: 0;
  1432. left: 0;
  1433. right: 0;
  1434. padding: 30upx 30upx;
  1435. z-index: 99;
  1436. }
  1437. /* 底部按钮End */
  1438. /* 交强险和商业险弹出框Start */
  1439. .popup-content {
  1440. position: relative;
  1441. }
  1442. .popHeader {
  1443. box-sizing: border-box;
  1444. font-size: 32upx;
  1445. font-weight: bold;
  1446. height: 120upx;
  1447. border-bottom: 1px solid #eee;
  1448. }
  1449. .popup-content .popContent {
  1450. padding: 0upx 30upx;
  1451. height: 620upx;
  1452. box-sizing: border-box;
  1453. }
  1454. .popup-content .popContent .popContentTitle {
  1455. font-weight: bold;
  1456. font-size: 32upx;
  1457. margin: 20upx 0upx 5upx 0upx;
  1458. }
  1459. .popup-content .popContent .amtSingle {
  1460. width: 25%;
  1461. box-sizing: border-box;
  1462. display: inline-block;
  1463. padding: 15upx;
  1464. text-align: center;
  1465. vertical-align: middle;
  1466. }
  1467. .popup-content .popContent .amtSingle>view {
  1468. font-size: 28upx;
  1469. border: 1px solid #eee;
  1470. border-radius: 10upx;
  1471. }
  1472. .popup-content .popContent .amtSingle>view.active {
  1473. background: rgba($themeColor, .08);
  1474. color: $themeColor;
  1475. border: 1px solid rgba($themeColor, .01);
  1476. font-weight: 700;
  1477. }
  1478. .popup-content .popBottom {
  1479. margin: 30upx 30upx 0 30upx;
  1480. padding-bottom: 30upx;
  1481. }
  1482. /* 交强险和商业险弹出框End */
  1483. /* 投保方案建议弹出框Start */
  1484. .popupBody {
  1485. position: relative;
  1486. }
  1487. .popupBody .popHeader {
  1488. border: none;
  1489. }
  1490. .popupBody .popBottom {
  1491. position: fixed;
  1492. box-sizing: border-box;
  1493. bottom: 0;
  1494. width: 100%;
  1495. height: 100upx;
  1496. border-top: 1px solid #f6f6f6;
  1497. font-weight: 700;
  1498. font-size: 36upx;
  1499. }
  1500. .popupBody .popupScroll {
  1501. height: 485upx;
  1502. padding: 0 30upx 0 30upx;
  1503. box-sizing: border-box;
  1504. }
  1505. .popupScroll .title {
  1506. font-weight: 700;
  1507. font-size: 30upx;
  1508. }
  1509. .popupScroll .desc {
  1510. font-size: 28upx;
  1511. }
  1512. .modelformcss {
  1513. padding: 5px 15px;
  1514. }
  1515. </style>