index.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <template>
  2. <view class="container">
  3. <view style="background-color: #fff;">
  4. <uni-search-bar bgColor="#F6F6F6 " v-model="searchValue" placeholder="请输入保单信息" @confirm="searchChange"
  5. cancelButton="none" @clear="searchChange">
  6. </uni-search-bar>
  7. </view>
  8. <z-paging ref="paging" v-model="dataList" @query="getList" :fixed="false" :auto-show-back-to-top="true"
  9. :empty-view-text="'暂无数据'" :hide-empty-view="false" :auto-show-system-loading="true">
  10. <view class="list">
  11. <view class="tab-bar-item" v-for="(item, index) in dataList" :key="index" @click="inEdit(item)">
  12. <view class="list-item">
  13. <view style="font-weight: 800;">
  14. {{item.claimNo}}
  15. </view>
  16. <view style="color: #B5B4B4;">
  17. {{item.submitTime}}
  18. </view>
  19. </view>
  20. <view class="list-item">
  21. <view class="">
  22. 电话: {{item.consumerPhone}}
  23. </view>
  24. </view>
  25. <view class="list-item">
  26. <view style="font-weight: 800;color: #03803B;">
  27. {{item.vehicleNumber||'暂无车牌'}}
  28. </view>
  29. <view class="">
  30. 轮胎规格:{{item.tyreSpecs||'-'}}
  31. </view>
  32. </view>
  33. <view class="list-item-end">
  34. <view class="">
  35. 轮胎:{{item.tireQuantity||0}}条
  36. </view>
  37. <view style="display: flex;align-items: center;color: #03803B;">
  38. <image style="width: 32rpx;height: 32rpx;margin-right: 18rpx;"
  39. src="@/static/images/home/claim/ap.png" />
  40. <text v-if="item.auditStatus==0" style="color:#e6a23c">
  41. 待审核
  42. </text>
  43. <text v-if="item.auditStatus==1" style="color:#409EFF">
  44. 审核中
  45. </text>
  46. <text v-if="item.auditStatus==2" style="color:#67c23a">
  47. 已通过
  48. </text>
  49. <text v-if="item.auditStatus==3" style="color:#f56c6c">
  50. 已拒绝
  51. </text>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. </z-paging>
  57. </view>
  58. </template>
  59. <script>
  60. import {
  61. getList
  62. } from '@/api/home/claim.js'
  63. export default {
  64. data() {
  65. return {
  66. searchValue:"",
  67. dataList: [],
  68. }
  69. },
  70. onLoad() {
  71. },
  72. onShow() {
  73. if (uni.getStorageSync('isUpdate')) {
  74. this.$nextTick(() => {
  75. if (this.$refs.paging) {
  76. this.$refs.paging.reload();
  77. }
  78. });
  79. uni.removeStorageSync('isUpdate')
  80. }
  81. },
  82. filters: {
  83. statusMap(value) {
  84. const statusList = ['待审核', '审核中', '已通过', '已拒绝']
  85. return statusList[value] || '未知状态'
  86. }
  87. },
  88. methods: {
  89. addDetails() {
  90. uni.navigateTo({
  91. url: '/pages/home/insurancePolicy/details'
  92. });
  93. },
  94. inEdit(row) {
  95. uni.navigateTo({
  96. url: '/pages/home/insurancePolicy/details?id=' + row.id,
  97. });
  98. },
  99. searchChange() {
  100. this.$refs.paging.reload()
  101. },
  102. async getList(pageNo, pageSize) {
  103. try {
  104. const obj = {
  105. current: pageNo,
  106. size: pageSize,
  107. claimType:2,
  108. searchCriteria:this.searchValue
  109. }
  110. const res = await getList(obj)
  111. this.$refs.paging.complete(res.data.records)
  112. } catch (e) {
  113. this.$refs.paging.complete(false)
  114. uni.showToast({
  115. title: '加载失败',
  116. icon: 'none'
  117. })
  118. }
  119. },
  120. goBack() {
  121. uni.navigateBack({
  122. delta: 1,
  123. });
  124. }
  125. }
  126. }
  127. </script>
  128. <style lang="scss" scoped>
  129. .scroll-view {
  130. flex: 1;
  131. height: 100%;
  132. /* 关键样式:防止内容被裁剪 */
  133. overflow-anchor: none;
  134. }
  135. .container {
  136. height: 100vh;
  137. display: flex;
  138. flex-direction: column;
  139. }
  140. .loading,
  141. .no-more {
  142. text-align: center;
  143. padding: 20px;
  144. color: #999;
  145. }
  146. .uni-lastmsg {
  147. width: 80rpx;
  148. white-space: nowrap;
  149. overflow: hidden;
  150. text-overflow: ellipsis;
  151. display: block;
  152. /* 需明确设置display */
  153. }
  154. .uni-lastmsg2 {
  155. width: 140rpx;
  156. white-space: nowrap;
  157. overflow: hidden;
  158. text-overflow: ellipsis;
  159. display: block;
  160. /* 需明确设置display */
  161. }
  162. .nav-right {
  163. width: 37rpx;
  164. height: 42rpx;
  165. }
  166. .list {
  167. width: 100%;
  168. .tab-bar-item {
  169. background-color: #fff;
  170. margin-top: 30rpx;
  171. padding: 0rpx 62rpx;
  172. font-size: 28rpx;
  173. line-height: 32rpx;
  174. color: #5F5F5F;
  175. font-weight: 400;
  176. .list-item {
  177. display: flex;
  178. justify-content: space-between;
  179. align-items: center;
  180. width: 100%;
  181. height: 100rpx;
  182. border-bottom: 2px solid #F6F6F6;
  183. }
  184. .list-item-end {
  185. display: flex;
  186. justify-content: space-between;
  187. align-items: center;
  188. width: 100%;
  189. height: 100rpx;
  190. }
  191. }
  192. }
  193. </style>