customerAudit.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <template>
  2. <view class="content">
  3. <view class="datalist" v-for="(item,index) in dataList">
  4. <view class="item">
  5. <view class="item_top">
  6. <view class="item_name">{{item.customerName}}</view>
  7. <view class="item_audit" ><span @click="auditSubmit(item)">审核</span></view>
  8. </view>
  9. <view class="item_lower">
  10. <view class="item_phone">{{item.customerPhone}}</view>
  11. <view class="item_date">{{item.updateDate}}</view>
  12. </view>
  13. </view>
  14. </view>
  15. <view v-show="isLoadMore">
  16. <uni-load-more :status="loadStatus"></uni-load-more>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. import {
  22. mapState
  23. } from 'vuex';
  24. export default {
  25. data() {
  26. return {
  27. dataList: [],
  28. currentPage:1,
  29. pageSize:10,
  30. isLoadMore: false, //是否加载中
  31. loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
  32. }
  33. },
  34. onShow() {
  35. this.getList()
  36. },
  37. onLoad() {},
  38. computed: {
  39. ...mapState(['hasLogin', 'userInfo']),
  40. },
  41. //下拉刷新
  42. onPullDownRefresh() {
  43. this.currentPage = 1
  44. this.pageSize = 10
  45. this.isLoadMore = false
  46. this.loadStatus = 'loading'
  47. this.getList()
  48. setTimeout(function() {
  49. uni.stopPullDownRefresh();
  50. }, 1000);
  51. },
  52. onReachBottom() { //上拉触底函数
  53. if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
  54. this.isLoadMore = true
  55. this.currentPage += 1
  56. this.getList()
  57. }
  58. },
  59. methods: {
  60. getList() {
  61. uni.showLoading({
  62. title: '加载中',
  63. mask: true
  64. })
  65. this.$api.doRequest('get', '/identityAuthenticationInfo/selectIdentityAuthenticationInfoPc', {
  66. currentPage: this.currentPage,
  67. pageSize: this.pageSize,
  68. searchType: 1, //searchType:1待审核
  69. compId: uni.getStorageSync('pcUserInfo').compId,
  70. searchKeyWord: "个人"
  71. }).then(res1 => {
  72. uni.hideLoading()
  73. if (res1.data.code == 200) {
  74. if (res1.data.data.records.length > 0) {
  75. this.isLoadMore = false
  76. this.loadStatus = 'loading'
  77. } else {
  78. this.isLoadMore = true
  79. this.loadStatus = 'nomore'
  80. }
  81. if (this.currentPage == 1) {
  82. this.dataList = res1.data.data.records
  83. } else {
  84. this.dataList = this.dataList.concat(res1.data.data.records)
  85. }
  86. }
  87. })
  88. },
  89. auditSubmit(val) {
  90. let obj = JSON.stringify(val)
  91. uni.navigateTo({
  92. url: '/pages/erpbusiness/customerSee?data=' + obj
  93. })
  94. }
  95. }
  96. }
  97. </script>
  98. <style lang="scss" scoped>
  99. .content {
  100. padding: 30rpx 20rpx;
  101. }
  102. .datalist {
  103. .item {
  104. margin-bottom: 20rpx;
  105. background-color: #ffffff;
  106. padding: 30rpx 20rpx;
  107. border-radius: 10rpx;
  108. height: 200rpx;
  109. padding: 40rpx 40rpx;
  110. }
  111. .item_top,
  112. .item_lower {
  113. display: flex;
  114. }
  115. .item_lower{
  116. margin-top: 30rpx;
  117. }
  118. .item_name,
  119. .item_phone,
  120. .item_date,
  121. .item_audit {
  122. width: 50%;
  123. }
  124. .item_name{
  125. font-size: 36rpx;
  126. font-weight: 600;
  127. }
  128. .item_audit{
  129. font-size: 36rpx;
  130. font-weight: 600;
  131. color: #5C76DF ;
  132. }
  133. .item_phone,.item_date{
  134. color: #878C9C;
  135. font-size: 28rpx;
  136. }
  137. .item_date,
  138. .item_audit {
  139. text-align: right;
  140. }
  141. }
  142. </style>