itemDetails.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <template>
  2. <view>
  3. <view class="list" style="margin-bottom: 30rpx;">
  4. <u-empty v-if='dataList.length==0' mode="data">
  5. </u-empty>
  6. <view class="tab-bar-item" v-for="(item, index) in dataList" :key="index" @click="inEdit(item)">
  7. <view class="list-item">
  8. <view style="font-weight: 800;">
  9. {{item.insuranceNo}}
  10. </view>
  11. <view style="color: #B5B4B4;">
  12. {{item.claimDate}}
  13. </view>
  14. </view>
  15. <view class="list-item">
  16. <view class="">
  17. 理赔单号:{{item.claimNo||'暂无理赔单号'}}
  18. </view>
  19. </view>
  20. <view class="list-item-end">
  21. <view class="">
  22. 理赔原因:{{item.claimReason||'暂无原因'}}
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. import {
  31. itemList
  32. } from '@/api/home/insurance.js'
  33. export default {
  34. data() {
  35. return {
  36. dataList: [],
  37. }
  38. },
  39. onLoad(option) {
  40. console.log(option)
  41. if (option && option.id) {
  42. this.itemList(option.id)
  43. }
  44. },
  45. methods: {
  46. inEdit(row) {
  47. uni.navigateTo({
  48. url: '/pages/home/claim/details?id=' + row.claimId,
  49. });
  50. },
  51. itemList(id) {
  52. const obj = {
  53. insuranceId: id
  54. }
  55. this.loading = true
  56. uni.showLoading({
  57. title: '加载中',
  58. mask: true
  59. });
  60. itemList(obj).then(res => {
  61. this.dataList = res.data
  62. })
  63. .finally(() => {
  64. uni.hideLoading()
  65. });
  66. }
  67. }
  68. }
  69. </script>
  70. <style lang="scss" scoped>
  71. .loading,
  72. .no-more {
  73. text-align: center;
  74. padding: 20px;
  75. color: #999;
  76. }
  77. .uni-lastmsg {
  78. width: 80rpx;
  79. white-space: nowrap;
  80. overflow: hidden;
  81. text-overflow: ellipsis;
  82. display: block;
  83. /* 需明确设置display */
  84. }
  85. .uni-lastmsg2 {
  86. width: 140rpx;
  87. white-space: nowrap;
  88. overflow: hidden;
  89. text-overflow: ellipsis;
  90. display: block;
  91. /* 需明确设置display */
  92. }
  93. .nav-right {
  94. width: 37rpx;
  95. height: 42rpx;
  96. }
  97. .list {
  98. width: 100%;
  99. .tab-bar-item {
  100. background-color: #fff;
  101. margin-top: 30rpx;
  102. padding: 0rpx 62rpx;
  103. font-size: 28rpx;
  104. line-height: 32rpx;
  105. color: #5F5F5F;
  106. font-weight: 400;
  107. .list-item {
  108. display: flex;
  109. justify-content: space-between;
  110. align-items: center;
  111. width: 100%;
  112. height: 100rpx;
  113. border-bottom: 2px solid #F6F6F6;
  114. }
  115. .list-item-end {
  116. display: flex;
  117. justify-content: space-between;
  118. align-items: center;
  119. width: 100%;
  120. height: 100rpx;
  121. }
  122. }
  123. }
  124. </style>