insureItems.vue 47 KB

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