insureItems1.vue 53 KB

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