insuranceInfo.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  1. <template>
  2. <view class="dis f-c Info">
  3. <view class="score">
  4. <view class="item">
  5. <text class="mr-2">评分</text>
  6. <text>{{scoreVo.score}}</text>
  7. </view>
  8. <view class="item" v-for="(item,index) in scoreVo.scoreJson" :key="index">
  9. <text class="mr-2">{{item.scoreName}}</text>
  10. <text>{{item.score}}</text>
  11. </view>
  12. <view class="item">
  13. <text class="mr-2">交强险系数</text>
  14. <text>0.751</text>
  15. </view>
  16. <view class="item dis a-c j-s">
  17. <text class="mr-2">商业险系数</text>
  18. <view class="" @click="viewDiscount">
  19. <u--input border="surround"
  20. :customStyle="{background:'rgba(253,233,53,0.05)',borderColor:'#FDE935 !important',padding:'4rpx 18rpx',pointerEvents: 'none'}"
  21. v-model="value" disabled disabledColor='rgba(253,233,53,0.05)'></u--input>
  22. </view>
  23. <view class="colorBlock dis a-c j-c " @tap="updateDiscount">
  24. <image :src="editimg" mode=""></image>
  25. </view>
  26. </view>
  27. </view>
  28. <u-divider lineColor="#eee" style="margin: 0;"></u-divider>
  29. <view class="quote-time mt-3">
  30. <view class="item dis a-start j-s" v-if="ciRiskInfoVo">
  31. <text>交强险</text>
  32. <view class="Right dis f-c ">
  33. <text>起 {{ciRiskInfoVo.startDate}}</text>
  34. <text>止 {{ciRiskInfoVo.endDate}}</text>
  35. </view>
  36. </view>
  37. <view class="item dis a-start j-s" v-if="biRiskInfoVo">
  38. <text>商业险</text>
  39. <view class="Right dis f-c ">
  40. <text>起 {{biRiskInfoVo.startDate}}</text>
  41. <text>止 {{biRiskInfoVo.endDate}}</text>
  42. </view>
  43. </view>
  44. <view class="item dis a-start j-s" v-if="policy.ciApplyNumber">
  45. <text>交强投保单号</text>
  46. <view class="Right dis f-c ">
  47. <text>{{policy.ciApplyNumber}}</text>
  48. </view>
  49. </view>
  50. <view class="item dis a-start j-s" v-if="policy.biApplyNumber">
  51. <text>商业投保单号</text>
  52. <view class="Right dis f-c ">
  53. <text>{{policy.biApplyNumber}}</text>
  54. </view>
  55. </view>
  56. <view class="item dis a-start j-s" v-if="policy.ciPolicyNumber">
  57. <text>交强保单号</text>
  58. <view class="Right dis f-c ">
  59. <text>{{policy.ciPolicyNumber}}</text>
  60. </view>
  61. </view>
  62. <view class="item dis a-start j-s" v-if="policy.biPolicyNumber">
  63. <text>商业保单号</text>
  64. <view class="Right dis f-c ">
  65. <text>{{policy.biPolicyNumber}}</text>
  66. </view>
  67. </view>
  68. </view>
  69. <view class="tab dis f-c">
  70. <view class="header-title" style="background: linear-gradient( 180deg, #FFF8F8 0%, #FFFFFF 100%)">报价方案
  71. </view>
  72. <view class="items dis f-c ">
  73. <view class="item dis a-c j-s">
  74. <text>保费合计</text>
  75. <text class="price">¥{{costs.sumPremium}}</text>
  76. </view>
  77. <view class="item dis a-c j-s" v-if="costs.ciPremium">
  78. <text>交强险</text>
  79. <text>¥{{costs.ciPremium}}</text>
  80. </view>
  81. <view class="item dis a-c j-s" v-if="costs.vvTax">
  82. <view class=" dis a-c ">车船税
  83. <view class="vvTax-Tag ml-1" @click="vvTaxDetails">
  84. {{taxRelifFlagName}}
  85. </view>
  86. </view>
  87. <text>¥{{costs.vvTax}}</text>
  88. </view>
  89. <view class="item dis a-start j-s" v-if="costs.biPremium">
  90. <text>商业险</text>
  91. <text>¥{{costs.biPremium}}</text>
  92. </view>
  93. <view class="item dis a-start j-s" v-if="costs.niPremium">
  94. <text>驾意险</text>
  95. <text>¥{{costs.niPremium}}</text>
  96. </view>
  97. <view class="table mb-3" v-if="kindInfoVo.length>0">
  98. <view class="header dis a-c j-s">
  99. <text class="th special">商业险</text>
  100. <text class="th">保额</text>
  101. <text class="th">保费</text>
  102. </view>
  103. <view class="tr dis a-c j-c" v-for="(item,index) in kindInfoVo" :key="index">
  104. <text class="td special">{{item.kindName}}</text>
  105. <text v-if="['A'].includes(item.kindCode)" class="td">投保</text>
  106. <text v-else-if="['D4', 'SY_FJ_YBW2'].includes(item.kindCode)"
  107. class="td">{{convertedValue(item.unitAmount)}}</text>
  108. <text v-else-if="['MJ1', 'MJ2', 'MJ3', 'MJ4'].includes(item.kindCode)"
  109. class="td">{{item.amount}}%</text>
  110. <text v-else-if="['TY1', 'TY2', 'TY3', 'TY4'].includes(item.kindCode)"
  111. class="td">{{item.serviceTimes}}次</text>
  112. <text v-else class="td">{{item.kindCode=='J1'?'--':convertedValue(item.amount)}}</text>
  113. <text class="td">{{item.premium?item.premium:'-'}}</text>
  114. </view>
  115. </view>
  116. <view class="table" v-if="accidentalDrivings.length>0">
  117. <view class="header dis a-c j-s">
  118. <text class="th special">驾意险</text>
  119. <text class="th">单价/数量</text>
  120. <text class="th">保费</text>
  121. </view>
  122. <view class="tr dis a-c j-c" v-for="(item,index) in accidentalDrivings" :key="index">
  123. <text class="td special">{{item.productName}}</text>
  124. <text class="td">{{item.quantity}}</text>
  125. <text class="td">{{item.sumAmount}}</text>
  126. </view>
  127. </view>
  128. <!-- 客户权益 -->
  129. <view class="customerRights dis a-c mt-2" @click="customerRightsDetail">
  130. <text class="title">客户权益</text>
  131. <text class="customerRights-price">¥{{insFeeOrders.availableAmount}}</text>
  132. <u-icon name="arrow-right" color="#2B313D" size="14"></u-icon>
  133. </view>
  134. <view class="specialAgreement dis a-c j-s mt-2">
  135. <image :src="specialAgreementimg" mode="" style="width: 115rpx;height: 26rpx;">
  136. </image>
  137. <view class="btn dis a-c j-s">
  138. <text>查看详情</text>
  139. <u-icon name="arrow-right" color="#666666" size="20rpx"></u-icon>
  140. </view>
  141. </view>
  142. </view>
  143. </view>
  144. <view class="tab dis f-c">
  145. <view class="header-title dis a-c j-s"
  146. style="background: linear-gradient( 180deg, #F3F9FF 0%, #FFFFFF 100%)">
  147. <text>费用信息</text>
  148. <view class="">
  149. <text class="mr-1" style="font-weight: 500;font-size: 28rpx;">费用总计</text>
  150. <text class="price">¥4862.33</text>
  151. </view>
  152. </view>
  153. <view class="items dis f-c ">
  154. <view class="item dis a-c j-s">
  155. <text>交强险手续费</text>
  156. <text>850.00 * 0.00% = 0.00</text>
  157. </view>
  158. <view class="item dis a-start j-s">
  159. <text>交强险跟单</text>
  160. <text>850.00 * 0.20% = 170.00</text>
  161. </view>
  162. <view class="item dis a-start j-s ">
  163. <text>交强险保费</text>
  164. <view class=" dis a-c j-end">
  165. <text style="margin-right: auto;">¥170.00</text>
  166. <text class="mr-2" style="font-weight: 500;color: #666;">费用</text>
  167. <text>¥170.00</text>
  168. </view>
  169. </view>
  170. <u-divider lineColor="#eee" style="margin: 0;"></u-divider>
  171. <view class="item dis a-start j-s mt-3">
  172. <text>商业险手续费</text>
  173. <text>{{scoreVo.jqScore}}ddd</text>
  174. </view>
  175. <view class="item dis a-start j-s ">
  176. <text>商业险跟单</text>
  177. <text>{{scoreVo.jqScore}}ddd</text>
  178. </view>
  179. <view class="item dis a-start j-s ">
  180. <text>商业险保费</text>
  181. <view class=" dis a-c j-end">
  182. <text style="margin-right: auto;">¥170.00</text>
  183. <text class="mr-2" style="font-weight: 500;color: #666;">费用</text>
  184. <text>¥170.00</text>
  185. </view>
  186. </view>
  187. </view>
  188. </view>
  189. <view class="tab dis f-c">
  190. <view class="header-title" style="background: linear-gradient( 180deg, #F3F9FF 0%, #FFFFFF 100%)">保费因素
  191. </view>
  192. <view class="items dis f-c ">
  193. <view class="item dis a-c j-s" v-if="scoreVo.jqScore">
  194. <text>交强评分</text>
  195. <text>{{scoreVo.jqScore}}</text>
  196. </view>
  197. <view class="item dis a-c j-s" v-if="scoreVo.syScore">
  198. <text>商业评分</text>
  199. <text>{{scoreVo.syScore}}</text>
  200. </view>
  201. <view class="item dis a-start j-s" v-if="scoreVo.ciClaims">
  202. <text>交强出险次数</text>
  203. <text>{{scoreVo.ciClaims}}</text>
  204. </view>
  205. <view class="item dis a-start j-s" v-if="scoreVo.biClaims">
  206. <text>商业出险次数</text>
  207. <text>{{scoreVo.biClaims}}</text>
  208. </view>
  209. <view class="item dis a-start j-s" v-if="scoreVo.lossRation">
  210. <text>总赔付率</text>
  211. <text>{{scoreVo.lossRation}}</text>
  212. </view>
  213. <view class="item dis a-start j-s" v-if="scoreVo.jqLossRation">
  214. <text>交强赔付率</text>
  215. <text>{{scoreVo.jqLossRation}}</text>
  216. </view>
  217. <view class="item dis a-start j-s" v-if="scoreVo.syLossRation">
  218. <text>商业赔付率</text>
  219. <text>{{scoreVo.syLossRation}}</text>
  220. </view>
  221. <view class="item dis a-start j-s">
  222. <text>总折扣率</text>
  223. <text></text>
  224. </view>
  225. <view class="item dis a-start j-s" v-if="costs.ciRatio">
  226. <text>交强折扣</text>
  227. <text>{{costs.ciRatio}}</text>
  228. </view>
  229. <view class="item dis a-start j-s" v-if="costs.biRatio">
  230. <text>商业折扣</text>
  231. <text>{{costs.biRatio}}</text>
  232. </view>
  233. </view>
  234. </view>
  235. </view>
  236. </template>
  237. <script>
  238. import {
  239. turnBase64Image
  240. } from '@/plugins/utils.js';
  241. export default {
  242. name: 'name', //插件名称
  243. props: {
  244. ciRiskInfoVo: {
  245. type: Object,
  246. default: null,
  247. },
  248. //费用信息
  249. insFeeOrders: {
  250. type: Object,
  251. default: null,
  252. },
  253. //车船税信息
  254. vehicleAndVesselTaxVo: {
  255. type: Object,
  256. default: null,
  257. },
  258. car_tax_codeoptions: Array,
  259. biRiskInfoVo: {
  260. type: Object,
  261. default: null,
  262. },
  263. costs: { //报价金额数据
  264. type: Object,
  265. default: null,
  266. },
  267. policy: { //保单号数据
  268. type: Object,
  269. default: null,
  270. },
  271. scoreVo: { //保费因素
  272. type: Object,
  273. default: null,
  274. },
  275. kindInfoVo: { //险别
  276. type: Array,
  277. default: () => {
  278. return [];
  279. }
  280. },
  281. accidentalDrivings: { //驾意险信息
  282. trpe: Array,
  283. default: () => {
  284. return [];
  285. }
  286. }
  287. },
  288. computed: {
  289. taxRelifFlagName() {
  290. let info = this.car_tax_codeoptions.find(ele => ele.value === this.vehicleAndVesselTaxVo.taxRelifFlag)
  291. return info.description;
  292. }
  293. },
  294. data() {
  295. return {
  296. value: "",
  297. editimg: '', //修改图标
  298. specialAgreementimg: '', //特约图片
  299. };
  300. },
  301. async mounted() {
  302. console.log(1);
  303. this.editimg = await turnBase64Image('/static/icon/edit.png')
  304. this.specialAgreementimg = await turnBase64Image('/static/image/specialAgreement.png')
  305. },
  306. methods: {
  307. convertedValue(num) {
  308. if (num < 10000) {
  309. return num.toString();
  310. } else if (num < 100000000) {
  311. return (Math.floor(num / 10000 * 10) / 10) + '万';
  312. } else {
  313. return (Math.floor(num / 100000000 * 10) / 10) + '亿';
  314. }
  315. },
  316. viewDiscount() {
  317. this.$emit('viewDiscount')
  318. },
  319. updateDiscount() {
  320. this.$emit('updateDiscount')
  321. },
  322. vvTaxDetails() {
  323. this.$emit('vvTaxDetails')
  324. },
  325. customerRightsDetail() {
  326. this.$emit('customerRightsDetail')
  327. }
  328. }
  329. };
  330. </script>
  331. <!--使用scss,只在本组件生效-->
  332. <style lang="scss" scoped>
  333. $price-color: #FF540A;
  334. .price {
  335. color: $price-color !important;
  336. }
  337. .Info {
  338. padding: 20rpx 0;
  339. box-sizing: border-box;
  340. .score {
  341. padding: 0 20rpx;
  342. box-sizing: border-box;
  343. .item {
  344. margin-bottom: 30rpx;
  345. text:first-child {
  346. font-size: 30rpx;
  347. color: #666;
  348. }
  349. text:last-child {
  350. font-size: 30rpx;
  351. color: #333;
  352. font-weight: bold;
  353. }
  354. }
  355. }
  356. .quote-time {
  357. padding: 0 20rpx;
  358. box-sizing: border-box;
  359. .item {
  360. margin-bottom: 30rpx;
  361. >text:first-child {
  362. font-size: 30rpx;
  363. color: #666;
  364. }
  365. .Right {
  366. font-size: 30rpx;
  367. color: #333;
  368. font-weight: bold;
  369. width: 70%;
  370. text-align: right;
  371. word-wrap: break-word;
  372. /* 允许换行 */
  373. }
  374. }
  375. }
  376. }
  377. .colorBlock {
  378. width: 54rpx;
  379. height: 54rpx;
  380. background: #FDE935;
  381. border-radius: 10rpx 10rpx 10rpx 10rpx;
  382. margin-left: 12rpx;
  383. image {
  384. width: 34rpx;
  385. height: 34rpx;
  386. }
  387. }
  388. .tab {
  389. background-color: #fff;
  390. padding: 20rpx;
  391. box-sizing: border-box;
  392. border-radius: 0 0 10rpx 10rpx;
  393. .header-title {
  394. background: linear-gradient(180deg, #FFFCEA 0%, #FFFFFF 100%);
  395. border-radius: 20rpx 20rpx 0rpx 0rpx;
  396. font-size: 32rpx;
  397. color: #333;
  398. font-weight: bold;
  399. padding: 20rpx;
  400. box-sizing: border-box;
  401. }
  402. .items {
  403. padding: 0 20rpx;
  404. box-sizing: border-box;
  405. .item {
  406. margin-bottom: 30rpx;
  407. >:first-child {
  408. font-size: 30rpx;
  409. color: #666;
  410. .vvTax-Tag {
  411. padding: 4rpx 20rpx;
  412. box-sizing: border-box;
  413. background: #FF5B45;
  414. border-radius: 20rpx 20rpx 20rpx 20rpx;
  415. font-size: 26rpx;
  416. color: #fff;
  417. line-height: 1.2;
  418. }
  419. }
  420. >:nth-child(2) {
  421. font-size: 30rpx;
  422. color: #333;
  423. font-weight: bold;
  424. text-align: right;
  425. }
  426. }
  427. .table {
  428. width: 100%;
  429. border-radius: 4rpx;
  430. border: 1rpx solid #FFD9D9;
  431. .header {
  432. background-color: #FFF8F8;
  433. border-radius: 4rpx 4rpx 0 0;
  434. .th {
  435. padding: 15rpx;
  436. box-sizing: border-box;
  437. text-align: center;
  438. font-size: 28rpx;
  439. color: #FF5B45;
  440. flex: 1;
  441. }
  442. .th.special {
  443. flex: 2;
  444. }
  445. }
  446. .tr {
  447. .td {
  448. padding: 15rpx;
  449. box-sizing: border-box;
  450. text-align: center;
  451. font-size: 28rpx;
  452. flex: 1;
  453. }
  454. .td.special {
  455. flex: 2;
  456. }
  457. }
  458. .tr:nth-child(odd) {
  459. background-color: #FBFBFB;
  460. }
  461. }
  462. }
  463. }
  464. .specialAgreement {
  465. image {
  466. width: 115rpx;
  467. height: 26rpx;
  468. }
  469. .btn {
  470. border-radius: 40rpx 40rpx 40rpx 40rpx;
  471. border: 1rpx solid #DDDDDD;
  472. padding: 6rpx 20rpx;
  473. box-sizing: border-box;
  474. text {
  475. font-size: 28rpx;
  476. color: #666;
  477. margin-right: 10rpx;
  478. }
  479. }
  480. }
  481. .customerRights {
  482. .title {
  483. font-size: 30rpx;
  484. color: #666;
  485. }
  486. .customerRights-price {
  487. font-size: 30rpx;
  488. color: #333;
  489. font-weight: bold;
  490. margin-left: auto;
  491. }
  492. .u-icon {
  493. margin-top: 2rpx;
  494. }
  495. }
  496. </style>