insureItems1.vue 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731
  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. default:
  1076. ele1.amount = ele.amount;
  1077. ele1.amountDesc = this.toChinesNum(ele.amount)
  1078. break;
  1079. }
  1080. }
  1081. })
  1082. })
  1083. var notselected = this.insureList.filter(item1 => !this.kindList.some(item2 => item2
  1084. .kindCode === item1.kindCode))
  1085. console.log(notselected)
  1086. notselected.map(ele => {
  1087. ele.amount = '0';
  1088. ele.amountDesc = '不投保'
  1089. })
  1090. // console.log(this.insureList)
  1091. }
  1092. }
  1093. })
  1094. },
  1095. computed: {
  1096. startDate() {
  1097. return this.getDate('start');
  1098. },
  1099. endDate() {
  1100. return this.getDate('end');
  1101. }
  1102. },
  1103. methods: {
  1104. jqImmediate(e) {
  1105. if (e.detail.value) {
  1106. const date = new Date();
  1107. date.setHours(date.getHours() + 2);
  1108. date.setMinutes(0)
  1109. date.setSeconds(0)
  1110. this.jqstartDate = this.transformTime(date)
  1111. this.jqendDate = this.oneYearPast(date);
  1112. } else {
  1113. this.jqstartDate = this.nextday();
  1114. this.jqendDate = this.oneYearPast(this.jqstartDate);
  1115. }
  1116. },
  1117. syImmediate(e) {
  1118. if (e.detail.value) {
  1119. const date = new Date();
  1120. date.setHours(date.getHours() + 2);
  1121. date.setMinutes(0)
  1122. date.setSeconds(0)
  1123. this.systartDate = this.transformTime(date)
  1124. this.syendDate = this.oneYearPast(date);
  1125. } else {
  1126. this.systartDate = this.nextday();
  1127. this.syendDate = this.oneYearPast(this.systartDate);
  1128. }
  1129. },
  1130. taxRelifFlagConfirm(val, name) {
  1131. this.vehicleAndVesselTaxForm[name] = val[0].value;
  1132. this.model[name] = val[0].label;
  1133. },
  1134. /* 数据字典 */
  1135. async getDicType(type) {
  1136. let res = await this.$http.get('/sysDict/dictDetails/' + type);
  1137. if (res.code == 200) {
  1138. this[type + 'options'] = res.data.ddList;
  1139. }
  1140. },
  1141. jqstartconfirm(e) {
  1142. this.jqstartDate = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
  1143. this.jqendDate = this.oneYearPast(this.jqstartDate)
  1144. },
  1145. jqendconfirm(e) {
  1146. this.jqendDate = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
  1147. },
  1148. systartconfirm(e) {
  1149. this.systartDate = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
  1150. this.syendDate = this.oneYearPast(this.systartDate)
  1151. },
  1152. syendconfirm(e) {
  1153. this.syendDate = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
  1154. },
  1155. taxDocumentDateconfirm(e) {
  1156. this.vehicleAndVesselTaxForm.taxDocumentDate = e.year + '-' + e.month + '-' + e.day;
  1157. },
  1158. taxPaidAreaCodeconfirm(e) {
  1159. this.vehicleAndVesselTaxForm.taxPaidAreaCode = e.province.value;
  1160. this.model.taxPaidAreaCode = e.province.label;
  1161. },
  1162. insureTip() {
  1163. this.$refs.popupInsure.show() // 显示
  1164. },
  1165. adjustPopupInsureSubmit() {
  1166. this.$refs.popupInsure.hide() // 显示
  1167. },
  1168. // 交强险提示
  1169. CITips() {
  1170. uni.showModal({
  1171. title: "交强险",
  1172. content: "指“机动车交通事故责任强制保险”,是由保险公司对被保险机动车发生道路交通事故造成受害人(不包括本车人员和被保险人)的人身伤亡、财产损失,在责任限额内予以赔偿的强制性责任保险。",
  1173. showCancel: false,
  1174. confirmText: "我知道了"
  1175. })
  1176. },
  1177. // 商业险提示
  1178. BITips() {
  1179. uni.showModal({
  1180. title: "商业险",
  1181. content: "指给车辆加上一份全面保障。详细险种包含:第三者责任险、盗抢险、车上人员责任险、车辆损失险、车身划痕损失险、自燃损失险、涉水险等,是您和爱车的必要保障。",
  1182. showCancel: false,
  1183. confirmText: "我知道了"
  1184. })
  1185. },
  1186. //弹出popup框并显示基本信息
  1187. adjustBIItem(index) {
  1188. var a = {};
  1189. Object.assign(a, this.insureList[index])
  1190. this.insureItem = a;
  1191. this.$refs.popupBI.show() // 显示
  1192. },
  1193. //popup内容的label改变
  1194. adjustBIItemLabel(index) {
  1195. this.insureItem.amount = this.insureItem.amtList[index].value;
  1196. this.insureItem.amountDesc = this.insureItem.amtList[index].label;
  1197. },
  1198. // 提交popup的label修改
  1199. adjustBIItemLabelSubmit() {
  1200. for (let i = 0; i < this.insureList.length; i++) {
  1201. if (this.insureItem.kindCode == this.insureList[i].kindCode) {
  1202. this.insureList[i].amount = this.insureItem.amount; /* 保额 */
  1203. this.insureList[i].amountDesc = this.insureItem.amountDesc; /* 保额名称 */
  1204. if (this.insureItem.kindCode == 'B') {
  1205. if (this.insureItem.amount != 0) {
  1206. this.insureList[9].amtList[1].value = this.insureItem.amount;
  1207. } else {
  1208. this.insureList[9].amtList[1].value = '1';
  1209. }
  1210. }
  1211. if (this.insureList[i].isMainRisk && this.insureList[i].amount == '0') {
  1212. for (let j = 0; j < this.insureList.length; j++) {
  1213. if ((!this.insureList[j].isMainRisk) && (this.insureList[j].mainRiskCodeList == this
  1214. .insureList[i].kindCode)) {
  1215. this.insureList[j].amount = this.insureList[j].amtList[0].value;
  1216. this.insureList[j].amountDesc = this.insureList[j].amtList[0].label;
  1217. }
  1218. }
  1219. }
  1220. var codeList = []
  1221. for (let m = 0; m < this.insureList.length; m++) {
  1222. if (this.insureList[m].amount != '0') {
  1223. codeList.push(this.insureList[m].kindCode);
  1224. }
  1225. }
  1226. this.insureCodeList = [];
  1227. Object.assign(this.insureCodeList, codeList)
  1228. if (this.insureCodeList.length > 0) {
  1229. this.BIInsureList.amount = '1';
  1230. this.BIInsureList.amountDesc = '投保';
  1231. } else {
  1232. this.BIInsureList.amount = '0';
  1233. this.BIInsureList.amountDesc = '不投保';
  1234. }
  1235. break;
  1236. }
  1237. }
  1238. this.$refs.popupBI.hide();
  1239. },
  1240. numberBoxChange(val) {
  1241. console.log(val)
  1242. if (val.value > 0) {
  1243. this.insureItem.amount = val.value;
  1244. this.insureItem.amountDesc = val.value + '次';
  1245. } else {
  1246. this.insureItem.amount = 0;
  1247. this.insureItem.amountDesc = '不投保';
  1248. }
  1249. },
  1250. getDate(type) {
  1251. const date = new Date();
  1252. if (type === 'start') {
  1253. date.setTime(date.getTime());
  1254. } else if (type === 'end') {
  1255. date.setTime(date.getTime() + 24 * 60 * 60 * 1000 * 90);
  1256. }
  1257. let year = date.getFullYear();
  1258. let month = date.getMonth() + 1;
  1259. let day = date.getDate();
  1260. month = month > 9 ? month : '0' + month;;
  1261. day = day > 9 ? day : '0' + day;
  1262. return `${year}-${month}-${day}`;
  1263. },
  1264. //日期的选择
  1265. bindDateChange(e, startDateType) {
  1266. const date = new Date();
  1267. const date1 = date.getTime();
  1268. const date2 = date.getTime() + 24 * 60 * 60 * 1000 * 90;
  1269. const date3 = new Date(e.detail.value).getTime();
  1270. if (((date3 - date1) > 0) && ((date3 - date2) > 0)) {
  1271. return uni.showToast({
  1272. icon: "none",
  1273. title: "投保日期须在90天内"
  1274. })
  1275. }
  1276. this[startDateType] = e.detail.value;
  1277. },
  1278. //交强险弹出框
  1279. adjustCIItem(type) {
  1280. var a = {};
  1281. Object.assign(a, this[type]);
  1282. this.insureItem = a;
  1283. this.$refs.popupCI.show() // 显示
  1284. },
  1285. adjustCIItemLabel(index) {
  1286. this.insureItem.amount = this.insureItem.amtList[index].value;
  1287. this.insureItem.amountDesc = this.insureItem.amtList[index].label;
  1288. },
  1289. adjustCIItemLabelSubmit(kindCode) {
  1290. var a = {};
  1291. if (kindCode == '0507') {
  1292. this.CIInsureList = {};
  1293. Object.assign(a, this.insureItem)
  1294. this.CIInsureList = a;
  1295. }
  1296. if (kindCode == '0510') {
  1297. if (this.insureItem.amount == '0') {
  1298. this.insureCodeList = [];
  1299. for (let i = 0; i < this.insureList.length; i++) {
  1300. this.insureList[i].amount = '0';
  1301. this.insureList[i].amountDesc = '不投保';
  1302. }
  1303. } else {
  1304. // 车损险
  1305. this.insureList[0].amount = 1;
  1306. this.insureList[0].amountDesc = "投保";
  1307. // 三者险
  1308. this.insureList[1].amount = 1000000;
  1309. this.insureList[1].amountDesc = "100万";
  1310. // 司机险
  1311. this.insureList[2].amount = 10000;
  1312. this.insureList[2].amountDesc = "1万";
  1313. // 乘客险
  1314. this.insureList[3].amount = 10000;
  1315. this.insureList[3].amountDesc = "1万";
  1316. this.insureList[4].amount = 0;
  1317. this.insureList[4].amountDesc = "不投保";
  1318. }
  1319. this.BIInsureList = {};
  1320. Object.assign(a, this.insureItem)
  1321. this.BIInsureList = a;
  1322. }
  1323. this.$refs.popupCI.hide() // 显示
  1324. },
  1325. //跳转报价页面
  1326. toQuote() {
  1327. var riskList = []; //险种大类信息
  1328. var kindList = []; //商业险险别
  1329. if (this.CIInsureList.amount == '1') {
  1330. this.jqstartDate = this.transformTime(this.jqstartDate);
  1331. this.jqendDate = this.transformTime(this.jqendDate);
  1332. riskList.push({
  1333. amount: "200000",
  1334. premium: "0",
  1335. riskCode: "0507",
  1336. startDate: this.jqstartDate,
  1337. endDate: this.jqendDate,
  1338. instantFlag: "0"
  1339. })
  1340. }
  1341. if (this.BIInsureList.amount == '1') {
  1342. this.systartDate = this.transformTime(this.systartDate);
  1343. this.syendDate = this.transformTime(this.syendDate);
  1344. riskList.push({
  1345. startDate: this.systartDate,
  1346. endDate: this.syendDate,
  1347. quotePreceptName: "",
  1348. quotePreceptCode: "",
  1349. instantFlag: "0",
  1350. premium: "0",
  1351. riskCode: "0510"
  1352. })
  1353. this.insureList.map((ele, index) => {
  1354. if (
  1355. ele.amount != "0" &&
  1356. (ele.kindCode == "D4" || ele.kindCode == "SY_FJ_YBW2")
  1357. ) {
  1358. kindList.push({
  1359. unitAmount: this.insureList[index].amount,
  1360. kindCode: this.insureList[index].kindCode,
  1361. kindName: this.insureList[index].kindName
  1362. });
  1363. } else if (
  1364. ele.amount != "0" &&
  1365. (ele.kindCode == "MJ1" ||
  1366. ele.kindCode == "MJ2" ||
  1367. ele.kindCode == "MJ3" ||
  1368. ele.kindCode == "MJ4")
  1369. ) {
  1370. kindList.push({
  1371. deductibleRate: this.insureList[index].amount,
  1372. kindCode: this.insureList[index].kindCode,
  1373. kindName: this.insureList[index].kindName
  1374. });
  1375. } else if (
  1376. ele.amount != "0" &&
  1377. (ele.kindCode == "TY1" ||
  1378. ele.kindCode == "TY2" ||
  1379. ele.kindCode == "TY3" ||
  1380. ele.kindCode == "TY4")
  1381. ) {
  1382. kindList.push({
  1383. serviceTimes: String(this.insureList[index].amount),
  1384. kindCode: this.insureList[index].kindCode,
  1385. kindName: this.insureList[index].kindName
  1386. });
  1387. } else if (ele.amount != "0") {
  1388. kindList.push({
  1389. amount: this.insureList[index].amount,
  1390. kindCode: this.insureList[index].kindCode,
  1391. kindName: this.insureList[index].kindName
  1392. });
  1393. }
  1394. return ele;
  1395. });
  1396. }
  1397. if (riskList.length == 0) {
  1398. return uni.showToast({
  1399. icon: "none",
  1400. title: "请至少选择一种主险"
  1401. })
  1402. }
  1403. // console.log(riskList, kindList)
  1404. this.navigate({
  1405. url: '/pages/carInsure1/quote1',
  1406. success: (res) => {
  1407. res.eventChannel.emit("acceptData", {
  1408. carInfo: this.carInfo,
  1409. ownerInfo: this.ownerInfo,
  1410. policyHolderInfo: this.policyHolderInfo,
  1411. insuredPersonInfo: this.insuredPersonInfo,
  1412. riskList: riskList,
  1413. kindList: kindList,
  1414. carInfoPositiveList: this.carInfoPositiveList, //车辆
  1415. ownerInfoPositiveList: this.ownerInfoPositiveList, //车主
  1416. vehicleAndVesselTaxForm: this.vehicleAndVesselTaxForm, //车船税信息
  1417. policyHolderInfoPositiveList: this.policyHolderInfoPositiveList, //投保人
  1418. insuredPersonInfoPositiveList: this.insuredPersonInfoPositiveList, //被保人
  1419. })
  1420. }
  1421. }, "navigateTo", true);
  1422. },
  1423. //计算输入时间一年后的的前一天(输入的参数为字符串("2019-03-02")最终输出也为日期的字符串)
  1424. oneYearPast(time) {
  1425. var date = new Date(time);
  1426. date.setSeconds(date.getSeconds() - 1);
  1427. date.setFullYear(date.getFullYear() + 1); //一年后
  1428. date.setTime(date.getTime()); //一年后的前一天
  1429. var strYear = date.getFullYear();
  1430. var strDay = date.getDate();
  1431. var strMonth = date.getMonth() + 1;
  1432. var hh = date.getHours();
  1433. var minutes = date.getMinutes(); // 分
  1434. var Seconds = date.getSeconds();
  1435. if (hh < 10) {
  1436. hh = "0" + hh;
  1437. }
  1438. if (minutes < 10) {
  1439. minutes = "0" + minutes;
  1440. }
  1441. if (Seconds < 10) {
  1442. Seconds = "0" + Seconds;
  1443. }
  1444. if (strMonth < 10) {
  1445. strMonth = "0" + strMonth;
  1446. }
  1447. if (strDay < 10) {
  1448. strDay = "0" + strDay;
  1449. }
  1450. var datastr =
  1451. strYear + "-" + strMonth + "-" + strDay + " " + hh + ":" + minutes + ":" + Seconds;
  1452. return datastr;
  1453. },
  1454. //次日
  1455. nextday() {
  1456. var date = new Date();
  1457. date.setFullYear(date.getFullYear());
  1458. date.setTime(date.getTime() + 24 * 60 * 60 * 1000);
  1459. var strYear = date.getFullYear();
  1460. var strDay = date.getDate();
  1461. var strMonth = date.getMonth() + 1;
  1462. var hh = date.getHours();
  1463. if (hh < 10) {
  1464. hh = "0" + hh;
  1465. }
  1466. if (strMonth < 10) {
  1467. strMonth = "0" + strMonth;
  1468. }
  1469. if (strDay < 10) {
  1470. strDay = "0" + strDay;
  1471. }
  1472. var datastr = strYear + "-" + strMonth + "-" + strDay + " " + "00:00:00";
  1473. return datastr;
  1474. },
  1475. //时间转换
  1476. transformTime(date) {
  1477. var d = new Date(date);
  1478. var strYear = d.getFullYear();
  1479. var strMonth = d.getMonth() + 1;
  1480. var strDay = d.getDate();
  1481. var hh = d.getHours();
  1482. var minutes = d.getMinutes(); // 分
  1483. var Seconds = d.getSeconds();
  1484. if (hh < 10) {
  1485. hh = "0" + hh;
  1486. }
  1487. if (minutes < 10) {
  1488. minutes = "0" + minutes;
  1489. }
  1490. if (Seconds < 10) {
  1491. Seconds = "0" + Seconds;
  1492. }
  1493. if (strMonth < 10) {
  1494. strMonth = "0" + strMonth;
  1495. }
  1496. if (strDay < 10) {
  1497. strDay = "0" + strDay;
  1498. }
  1499. var datetime =
  1500. strYear + "-" + strMonth + "-" + strDay + " " + hh + ":" + minutes + ":" + Seconds;
  1501. return datetime;
  1502. },
  1503. toChinesNum(num) {
  1504. let changeNum = [
  1505. "零", "1", "2", "3", "4", "5", "6", "7", "8", "9"
  1506. ];
  1507. let unit = ["", "0", "00", "000", "0000"];
  1508. num = parseInt(num);
  1509. let getWan = temp => {
  1510. let strArr = temp
  1511. .toString()
  1512. .split("")
  1513. .reverse();
  1514. let newNum = "";
  1515. let newArr = [];
  1516. strArr.forEach((item, index) => {
  1517. newArr.unshift(
  1518. item === "0" ? changeNum[item] : changeNum[item] + unit[index]
  1519. );
  1520. });
  1521. let numArr = [];
  1522. newArr.forEach((m, n) => {
  1523. if (m !== "零") numArr.push(n);
  1524. });
  1525. if (newArr.length > 1) {
  1526. newArr.forEach((m, n) => {
  1527. if (newArr[newArr.length - 1] === "零") {
  1528. if (n <= numArr[numArr.length - 1]) {
  1529. newNum += m;
  1530. }
  1531. } else {
  1532. newNum += m;
  1533. }
  1534. });
  1535. } else {
  1536. newNum = newArr[0];
  1537. }
  1538. return newNum;
  1539. };
  1540. let overWan = Math.floor(num / 10000);
  1541. let noWan = num % 10000;
  1542. if (noWan.toString().length < 4) {
  1543. noWan = "0" + noWan;
  1544. }
  1545. return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num);
  1546. },
  1547. }
  1548. }
  1549. </script>
  1550. <style lang="scss" scoped>
  1551. @import '@/style/mixin.scss';
  1552. /deep/ .uni-switch-input-checked {
  1553. background-color: $themeColor !important;
  1554. border-color: $themeColor !important;
  1555. }
  1556. /* 整个页面的统一样式 Start */
  1557. .page {
  1558. padding-bottom: 200upx;
  1559. }
  1560. /* 整个页面的统一样式 End */
  1561. .plan-ins-title {
  1562. background-color: #F4F5F7;
  1563. height: 88upx;
  1564. color: #666;
  1565. font-size: 32upx;
  1566. line-height: 88upx;
  1567. font-weight: 400;
  1568. padding: 0 30upx;
  1569. }
  1570. .plan-ins-title .title-right {
  1571. color: #aaa;
  1572. }
  1573. .compulsory-insurance,
  1574. .business-insurance {
  1575. border-bottom: 15upx solid #eee;
  1576. }
  1577. .common-title {
  1578. font-size: 32upx;
  1579. padding: 0upx 32upx;
  1580. height: 90upx;
  1581. border-bottom: 1px solid #eee;
  1582. font-weight: bold;
  1583. }
  1584. .common-ins-cell {
  1585. font-size: 30upx;
  1586. padding: 0upx 30upx;
  1587. height: 90upx;
  1588. border-bottom: 1px solid #eee;
  1589. }
  1590. /* 底部按钮Start */
  1591. .bottom-btn {
  1592. background-color: #fff;
  1593. position: fixed;
  1594. bottom: 0;
  1595. left: 0;
  1596. right: 0;
  1597. padding: 30upx 30upx;
  1598. z-index: 99;
  1599. }
  1600. /* 底部按钮End */
  1601. /* 交强险和商业险弹出框Start */
  1602. .popup-content {
  1603. position: relative;
  1604. }
  1605. .popHeader {
  1606. box-sizing: border-box;
  1607. font-size: 32upx;
  1608. font-weight: bold;
  1609. height: 120upx;
  1610. border-bottom: 1px solid #eee;
  1611. }
  1612. .popup-content .popContent {
  1613. padding: 0upx 30upx;
  1614. height: 620upx;
  1615. box-sizing: border-box;
  1616. }
  1617. .popup-content .popContent .popContentTitle {
  1618. font-weight: bold;
  1619. font-size: 32upx;
  1620. margin: 20upx 0upx 5upx 0upx;
  1621. }
  1622. .popup-content .popContent .amtSingle {
  1623. width: 25%;
  1624. box-sizing: border-box;
  1625. display: inline-block;
  1626. padding: 15upx;
  1627. text-align: center;
  1628. vertical-align: middle;
  1629. }
  1630. .popup-content .popContent .amtSingle>view {
  1631. font-size: 28upx;
  1632. border: 1px solid #eee;
  1633. border-radius: 10upx;
  1634. }
  1635. .popup-content .popContent .amtSingle>view.active {
  1636. background: rgba($themeColor, .08);
  1637. color: $themeColor;
  1638. border: 1px solid rgba($themeColor, .01);
  1639. font-weight: 700;
  1640. }
  1641. .popup-content .popBottom {
  1642. margin: 30upx 30upx 0 30upx;
  1643. padding-bottom: 30upx;
  1644. }
  1645. /* 交强险和商业险弹出框End */
  1646. /* 投保方案建议弹出框Start */
  1647. .popupBody {
  1648. position: relative;
  1649. }
  1650. .popupBody .popHeader {
  1651. border: none;
  1652. }
  1653. .popupBody .popBottom {
  1654. position: fixed;
  1655. box-sizing: border-box;
  1656. bottom: 0;
  1657. width: 100%;
  1658. height: 100upx;
  1659. border-top: 1px solid #f6f6f6;
  1660. font-weight: 700;
  1661. font-size: 36upx;
  1662. }
  1663. .popupBody .popupScroll {
  1664. height: 485upx;
  1665. padding: 0 30upx 0 30upx;
  1666. box-sizing: border-box;
  1667. }
  1668. .popupScroll .title {
  1669. font-weight: 700;
  1670. font-size: 30upx;
  1671. }
  1672. .popupScroll .desc {
  1673. font-size: 28upx;
  1674. }
  1675. .modelformcss {
  1676. padding: 5px 15px;
  1677. }
  1678. </style>