insuranceInfo.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541
  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>--</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.amount)}}</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" v-if="insFeeOrders">
  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" v-if="insFeeOrders">
  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">¥{{insFeeOrders.totalExportPremium}}</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>{{costs.ciPremium}} * {{costRatio.jqCommissionRatio}}% =
  157. {{insFeeOrders.jqCommissionPremium}}</text>
  158. </view>
  159. <view class="item dis a-start j-s" v-if="costRatio.jqFollowRatio">
  160. <text>交强险跟单</text>
  161. <text>{{costs.ciPremium}} * {{costRatio.jqFollowRatio}}% = {{insFeeOrders.jqFollowPremium}}</text>
  162. </view>
  163. <view class="item dis a-start j-s ">
  164. <text class="mr-2">交强险保费</text>
  165. <text style="margin-right: auto;">¥{{costs.ciPremium}}</text>
  166. <view class="item dis a-c j-end">
  167. <text class="mr-2" style="font-weight: 500;color: #666;">费用</text>
  168. <text>¥{{insFeeOrders.jqExportPremium}}</text>
  169. </view>
  170. </view>
  171. <u-divider lineColor="#eee" style="margin: 0;"></u-divider>
  172. <view class="item dis a-start j-s mt-3">
  173. <text>商业险手续费</text>
  174. <text>{{costs.biPremium}} * {{costRatio.syCommissionRatio}}% =
  175. {{insFeeOrders.syCommissionPremium}}</text>
  176. </view>
  177. <view class="item dis a-start j-s " v-if="costRatio.syFollowRatio">
  178. <text>商业险跟单</text>
  179. <text>{{costs.biPremium}} * {{costRatio.syFollowRatio}}% = {{insFeeOrders.syFollowPremium}}</text>
  180. </view>
  181. <view class="item dis a-start j-s ">
  182. <text class="mr-2">商业险保费</text>
  183. <text style="margin-right: auto;">¥{{costs.biPremium}}</text>
  184. <view class="item dis a-c j-end">
  185. <text class="mr-2" style="font-weight: 500;color: #666;">费用</text>
  186. <text>¥{{insFeeOrders.syExportPremium}}</text>
  187. </view>
  188. </view>
  189. </view>
  190. </view>
  191. <view class="tab dis f-c">
  192. <view class="header-title" style="background: linear-gradient( 180deg, #F3F9FF 0%, #FFFFFF 100%)">保费因素
  193. </view>
  194. <view class="items dis f-c ">
  195. <view class="item dis a-c j-s" v-if="scoreVo.jqScore">
  196. <text>交强评分</text>
  197. <text>{{scoreVo.jqScore}}</text>
  198. </view>
  199. <view class="item dis a-c j-s" v-if="scoreVo.syScore">
  200. <text>商业评分</text>
  201. <text>{{scoreVo.syScore}}</text>
  202. </view>
  203. <view class="item dis a-start j-s" v-if="scoreVo.ciClaims">
  204. <text>交强出险次数</text>
  205. <text>{{scoreVo.ciClaims}}</text>
  206. </view>
  207. <view class="item dis a-start j-s" v-if="scoreVo.biClaims">
  208. <text>商业出险次数</text>
  209. <text>{{scoreVo.biClaims}}</text>
  210. </view>
  211. <view class="item dis a-start j-s" v-if="scoreVo.lossRation">
  212. <text>总赔付率</text>
  213. <text>{{scoreVo.lossRation}}</text>
  214. </view>
  215. <view class="item dis a-start j-s" v-if="scoreVo.jqLossRation">
  216. <text>交强赔付率</text>
  217. <text>{{scoreVo.jqLossRation}}</text>
  218. </view>
  219. <view class="item dis a-start j-s" v-if="scoreVo.syLossRation">
  220. <text>商业赔付率</text>
  221. <text>{{scoreVo.syLossRation}}</text>
  222. </view>
  223. <view class="item dis a-start j-s">
  224. <text>总折扣率</text>
  225. <text></text>
  226. </view>
  227. <view class="item dis a-start j-s" v-if="costs.ciRatio">
  228. <text>交强折扣</text>
  229. <text>{{costs.ciRatio}}</text>
  230. </view>
  231. <view class="item dis a-start j-s" v-if="costs.biRatio">
  232. <text>商业折扣</text>
  233. <text>{{costs.biRatio}}</text>
  234. </view>
  235. </view>
  236. </view>
  237. </view>
  238. </template>
  239. <script>
  240. import {
  241. turnBase64Image
  242. } from '@/plugins/utils.js';
  243. export default {
  244. name: 'name', //插件名称
  245. props: {
  246. ciRiskInfoVo: {
  247. type: Object,
  248. default: null,
  249. },
  250. //费用信息
  251. insFeeOrders: {
  252. type: Object,
  253. default: null,
  254. },
  255. // 费用比例信息
  256. costRatio: {
  257. type: Object,
  258. default: null,
  259. },
  260. //车船税信息
  261. vehicleAndVesselTaxVo: {
  262. type: Object,
  263. default: null,
  264. },
  265. car_tax_codeoptions: Array,
  266. biRiskInfoVo: {
  267. type: Object,
  268. default: null,
  269. },
  270. costs: { //报价金额数据
  271. type: Object,
  272. default: null,
  273. },
  274. policy: { //保单号数据
  275. type: Object,
  276. default: null,
  277. },
  278. scoreVo: { //保费因素
  279. type: Object,
  280. default: null,
  281. },
  282. kindInfoVo: { //险别
  283. type: Array,
  284. default: () => {
  285. return [];
  286. }
  287. },
  288. accidentalDrivings: { //驾意险信息
  289. trpe: Array,
  290. default: () => {
  291. return [];
  292. }
  293. }
  294. },
  295. computed: {
  296. taxRelifFlagName() {
  297. let info = this.car_tax_codeoptions.find(ele => ele.value === this.vehicleAndVesselTaxVo.taxRelifFlag)
  298. return info.description;
  299. }
  300. },
  301. data() {
  302. return {
  303. value: "",
  304. editimg: '', //修改图标
  305. specialAgreementimg: '', //特约图片
  306. };
  307. },
  308. async mounted() {
  309. console.log(1);
  310. this.editimg = await turnBase64Image('/static/icon/edit.png')
  311. this.specialAgreementimg = await turnBase64Image('/static/image/specialAgreement.png')
  312. },
  313. methods: {
  314. convertedValue(num) {
  315. if (num < 10000) {
  316. return num.toString();
  317. } else if (num < 100000000) {
  318. return (Math.floor(num / 10000 * 10) / 10) + '万';
  319. } else {
  320. return (Math.floor(num / 100000000 * 10) / 10) + '亿';
  321. }
  322. },
  323. viewDiscount() {
  324. this.$emit('viewDiscount')
  325. },
  326. updateDiscount() {
  327. this.$emit('updateDiscount')
  328. },
  329. vvTaxDetails() {
  330. this.$emit('vvTaxDetails')
  331. },
  332. customerRightsDetail() {
  333. this.$emit('customerRightsDetail')
  334. }
  335. }
  336. };
  337. </script>
  338. <!--使用scss,只在本组件生效-->
  339. <style lang="scss" scoped>
  340. $price-color: #FF540A;
  341. .price {
  342. color: $price-color !important;
  343. }
  344. .Info {
  345. padding: 20rpx 0;
  346. box-sizing: border-box;
  347. .score {
  348. padding: 0 20rpx;
  349. box-sizing: border-box;
  350. .item {
  351. margin-bottom: 30rpx;
  352. text:first-child {
  353. font-size: 30rpx;
  354. color: #666;
  355. }
  356. text:last-child {
  357. font-size: 30rpx;
  358. color: #333;
  359. font-weight: bold;
  360. }
  361. }
  362. }
  363. .quote-time {
  364. padding: 0 20rpx;
  365. box-sizing: border-box;
  366. .item {
  367. margin-bottom: 30rpx;
  368. >text:first-child {
  369. font-size: 30rpx;
  370. color: #666;
  371. }
  372. .Right {
  373. font-size: 30rpx;
  374. color: #333;
  375. font-weight: bold;
  376. width: 70%;
  377. text-align: right;
  378. word-wrap: break-word;
  379. /* 允许换行 */
  380. }
  381. }
  382. }
  383. }
  384. .colorBlock {
  385. width: 54rpx;
  386. height: 54rpx;
  387. background: #FDE935;
  388. border-radius: 10rpx 10rpx 10rpx 10rpx;
  389. margin-left: 12rpx;
  390. image {
  391. width: 34rpx;
  392. height: 34rpx;
  393. }
  394. }
  395. .tab {
  396. background-color: #fff;
  397. padding: 20rpx;
  398. box-sizing: border-box;
  399. border-radius: 0 0 10rpx 10rpx;
  400. .header-title {
  401. background: linear-gradient(180deg, #FFFCEA 0%, #FFFFFF 100%);
  402. border-radius: 20rpx 20rpx 0rpx 0rpx;
  403. font-size: 32rpx;
  404. color: #333;
  405. font-weight: bold;
  406. padding: 20rpx;
  407. box-sizing: border-box;
  408. }
  409. .items {
  410. padding: 0 20rpx;
  411. box-sizing: border-box;
  412. .item {
  413. margin-bottom: 30rpx;
  414. >:first-child {
  415. font-size: 30rpx;
  416. color: #666;
  417. .vvTax-Tag {
  418. padding: 4rpx 20rpx;
  419. box-sizing: border-box;
  420. background: #FF5B45;
  421. border-radius: 20rpx 20rpx 20rpx 20rpx;
  422. font-size: 26rpx;
  423. color: #fff;
  424. line-height: 1.2;
  425. }
  426. }
  427. >:nth-child(2) {
  428. font-size: 30rpx;
  429. color: #333;
  430. font-weight: bold;
  431. text-align: right;
  432. }
  433. }
  434. .table {
  435. width: 100%;
  436. border-radius: 4rpx;
  437. border: 1rpx solid #FFD9D9;
  438. .header {
  439. background-color: #FFF8F8;
  440. border-radius: 4rpx 4rpx 0 0;
  441. .th {
  442. padding: 15rpx;
  443. box-sizing: border-box;
  444. text-align: center;
  445. font-size: 28rpx;
  446. color: #FF5B45;
  447. flex: 1;
  448. }
  449. .th.special {
  450. flex: 2;
  451. }
  452. }
  453. .tr {
  454. .td {
  455. padding: 15rpx;
  456. box-sizing: border-box;
  457. text-align: center;
  458. font-size: 28rpx;
  459. flex: 1;
  460. }
  461. .td.special {
  462. flex: 2;
  463. }
  464. }
  465. .tr:nth-child(odd) {
  466. background-color: #FBFBFB;
  467. }
  468. }
  469. }
  470. }
  471. .specialAgreement {
  472. image {
  473. width: 115rpx;
  474. height: 26rpx;
  475. }
  476. .btn {
  477. border-radius: 40rpx 40rpx 40rpx 40rpx;
  478. border: 1rpx solid #DDDDDD;
  479. padding: 6rpx 20rpx;
  480. box-sizing: border-box;
  481. text {
  482. font-size: 28rpx;
  483. color: #666;
  484. margin-right: 10rpx;
  485. }
  486. }
  487. }
  488. .customerRights {
  489. .title {
  490. font-size: 30rpx;
  491. color: #666;
  492. }
  493. .customerRights-price {
  494. font-size: 30rpx;
  495. color: #333;
  496. font-weight: bold;
  497. margin-left: auto;
  498. }
  499. .u-icon {
  500. margin-top: 2rpx;
  501. }
  502. }
  503. </style>