index.vue 4.2 KB

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