index.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <template>
  2. <view>
  3. <ujp-navbar title="企业员工管理">
  4. <view slot="right" style="margin-right: 20px;">
  5. <span
  6. @click="thisgotoUrl('pagesFinance/accountType8/personmanage/addinfo?p='+id+'&id=0')"
  7. class="newly" >新增</span>
  8. </view>
  9. </ujp-navbar>
  10. <view class="main">
  11. <view style="text-align: center;margin-top: 100px" v-if="!list.length">
  12. <img src="@/assets/img/blankpage.png">
  13. <view>查询为空</view>
  14. </view>
  15. <view class="userinfo" v-for="(item ,index) in list"
  16. :key="item.id" >
  17. <view class="infos">
  18. <view class="name">
  19. {{item.userName?item.userName:'未填写'}}
  20. </view>
  21. <view class="tel-plateNumber">
  22. <view class="plateNumber">
  23. <view class="">
  24. <i class="ri-roadster-line"></i>
  25. </view>
  26. <view class="num">{{item.entAccountEnabled?'充电员工':'普通员工'}}</view>
  27. </view>
  28. <view class="tel">
  29. <view class="">
  30. <i class="ri-smartphone-line"></i>
  31. </view>
  32. <view class="num">{{item.phone?item.phone:'未填写'}}</view>
  33. </view>
  34. </view>
  35. </view>
  36. <view
  37. @click="thisgotoUrl('pagesFinance/accountType8/personmanage/addinfo?p='+id+'&id='+item.id)"
  38. class="edit">
  39. 编辑
  40. </view>
  41. </view>
  42. <u-divider v-if="list.length&&list.length == recordsTotal" color="#B6BDC3" style="margin-top:20px;" bg-color="#f7f7f7">已经到底了</u-divider>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. import * as API from '@/apis/finance.js'
  48. export default {
  49. data() {
  50. return {
  51. id:"",
  52. pageIndex: 1,
  53. recordsTotal: 0,
  54. list:[],
  55. uuid:""
  56. }
  57. },
  58. onReachBottom() {
  59. if (this.list.length < this.recordsTotal) {
  60. this.myLoadmore();
  61. }
  62. },
  63. onReady() {
  64. // this.get
  65. // EventChannel.on("aaa", function(){
  66. // console.Log("1111111111")
  67. // })
  68. this.getList()
  69. },
  70. onLoad(op) {
  71. this.id=op.id
  72. },
  73. onShow(){
  74. var obj=this.carhelp.get("addOwnerInformation")
  75. if(obj&&obj.uuid==this.uuid){
  76. if(obj.selectObj.vipUserId){
  77. }
  78. this.list=[];
  79. this.pageIndex = 1;
  80. this.getList()
  81. }
  82. },
  83. methods: {
  84. thisgotoUrl(url){
  85. this.uuid=new Date().getTime()
  86. var curl=url+"&uuid="+this.uuid;
  87. uni.navigateTo({
  88. url:"/"+curl
  89. })
  90. },
  91. getList() {
  92. uni.showLoading({
  93. title: "加载中",
  94. mask: true,
  95. })
  96. API.vipUserLis({
  97. platform:this.id,
  98. pageIndex:this.pageIndex,
  99. pageSize:20
  100. }).then((res) => {
  101. this.list = [
  102. ...this.list,
  103. ...res.data.data
  104. ];
  105. this.recordsTotal = res.data.recordsTotal
  106. uni.hideLoading()
  107. }).catch(error => {
  108. uni.showToast({
  109. title: error
  110. })
  111. })
  112. },
  113. myLoadmore() {
  114. this.pageIndex += 1;
  115. this.getList()
  116. },
  117. }
  118. }
  119. </script>
  120. <style lang="scss" scoped>
  121. page{
  122. background-color: #f3f4f7;
  123. }
  124. .newly{
  125. font-size: 16px;
  126. color: rgba(0, 90, 217, 100);
  127. }
  128. .main{
  129. padding: 14px 16px;
  130. .userinfo{
  131. color: rgba(255, 255, 255, 100);
  132. padding: 14px 0 14px 20px;
  133. background: linear-gradient(to right,#7E8EB2,#C4CEE8);
  134. display: flex;
  135. justify-content: space-between;
  136. border-radius: 8px;
  137. margin-bottom: 8px;
  138. .infos{
  139. .name{
  140. font-size: 20px;
  141. }
  142. .tel-plateNumber{
  143. margin-top: 4px;
  144. line-height: 20px;
  145. display: flex;
  146. .plateNumber{
  147. margin-left: 20px;
  148. display: flex;
  149. }
  150. .tel{
  151. display: flex;
  152. }
  153. .num{
  154. margin-left: 4px;
  155. }
  156. .ri-smartphone-line,.ri-roadster-line{
  157. font-size: 16px;
  158. }
  159. }
  160. }
  161. .edit{
  162. margin: auto 0;
  163. width: 60px;
  164. border-radius: 50px 0px 0px 50px;
  165. background-color: #97A7C7 ;
  166. text-align: center;
  167. line-height: 28px;
  168. }
  169. }
  170. }
  171. </style>