insureItems.vue 48 KB

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