index.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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&pid='+pid)"
  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+'&pid='+pid)"
  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. pid:"",
  53. pageIndex: 1,
  54. recordsTotal: 0,
  55. list:[],
  56. uuid:""
  57. }
  58. },
  59. onReachBottom() {
  60. if (this.list.length < this.recordsTotal) {
  61. this.myLoadmore();
  62. }
  63. },
  64. onReady() {
  65. // this.get
  66. // EventChannel.on("aaa", function(){
  67. // console.Log("1111111111")
  68. // })
  69. this.getList()
  70. },
  71. onLoad(op) {
  72. this.pid=op.pid
  73. this.id=op.id
  74. },
  75. onShow(){
  76. var obj=this.carhelp.get("addOwnerInformation")
  77. if(obj&&obj.uuid==this.uuid){
  78. if(obj.selectObj.vipUserId){
  79. }
  80. this.list=[];
  81. this.pageIndex = 1;
  82. this.getList()
  83. }
  84. },
  85. methods: {
  86. thisgotoUrl(url){
  87. this.uuid=new Date().getTime()
  88. var curl=url+"&uuid="+this.uuid;
  89. uni.navigateTo({
  90. url:"/"+curl
  91. })
  92. },
  93. getList() {
  94. uni.showLoading({
  95. title: "加载中",
  96. mask: true,
  97. })
  98. API.vipUserLis({
  99. platform:this.id,
  100. pageIndex:this.pageIndex,
  101. pageSize:20
  102. }).then((res) => {
  103. this.list = [
  104. ...this.list,
  105. ...res.data.data
  106. ];
  107. this.recordsTotal = res.data.recordsTotal
  108. uni.hideLoading()
  109. }).catch(error => {
  110. uni.showToast({
  111. title: error
  112. })
  113. })
  114. },
  115. myLoadmore() {
  116. this.pageIndex += 1;
  117. this.getList()
  118. },
  119. }
  120. }
  121. </script>
  122. <style lang="scss" scoped>
  123. page{
  124. background-color: #f3f4f7;
  125. }
  126. .newly{
  127. font-size: 16px;
  128. color: rgba(0, 90, 217, 100);
  129. }
  130. .main{
  131. padding: 14px 16px;
  132. .userinfo{
  133. color: rgba(255, 255, 255, 100);
  134. padding: 14px 0 14px 20px;
  135. background: linear-gradient(to right,#7E8EB2,#C4CEE8);
  136. display: flex;
  137. justify-content: space-between;
  138. border-radius: 8px;
  139. margin-bottom: 8px;
  140. .infos{
  141. .name{
  142. font-size: 20px;
  143. }
  144. .tel-plateNumber{
  145. margin-top: 4px;
  146. line-height: 20px;
  147. display: flex;
  148. .plateNumber{
  149. margin-left: 20px;
  150. display: flex;
  151. }
  152. .tel{
  153. display: flex;
  154. }
  155. .num{
  156. margin-left: 4px;
  157. }
  158. .ri-smartphone-line,.ri-roadster-line{
  159. font-size: 16px;
  160. }
  161. }
  162. }
  163. .edit{
  164. margin: auto 0;
  165. width: 60px;
  166. border-radius: 50px 0px 0px 50px;
  167. background-color: #97A7C7 ;
  168. text-align: center;
  169. line-height: 28px;
  170. }
  171. }
  172. }
  173. </style>