insureItems.vue 47 KB

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