index.vue 4.5 KB

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