partner - 副本.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <template>
  2. <view class="" >
  3. <public-module></public-module>
  4. <u-tabs :list="list" :is-scroll="false" :current="source" @change="change"></u-tabs>
  5. <view class="body" style="background: #F8FAFE;padding:12px">
  6. <view class=" dis a-c j-s">
  7. <u-search v-model="pageRequest.userName" style ='borderRadius: 0px 0px 0px 0px"' @search="search"
  8. :height='68' bg-color="#fff" :show-action="false"
  9. :input-style="{background:'transparent'}" placeholder-color="#ccc"
  10. :input-align="inputAlign"
  11. :action-style="{background:'#fff'}" placeholder="请输入合伙人姓名"></u-search>
  12. <text style="margin-left:55px" class="button1">共 {{totalSize}}个</text>
  13. </view>
  14. <view class="teamStatistics " >
  15. <view class="statisticsTitle">
  16. <view >机构名称</view>
  17. <view >合伙人姓名</view>
  18. <view >贡献金额</view>
  19. </view>
  20. <block v-for="(item,index) in directLsit" :key="index">
  21. <view class="" style="padding: 0 10px;">
  22. <view class="statisticsContent " :class="index==teamTabIndex?'active':''">
  23. <view >{{item.deptName}}</view>
  24. <view >{{item.userName}}</view>
  25. <view >{{item.sumpremium}} </view>
  26. </view>
  27. </view>
  28. </block>
  29. <u-loadmore style="margin-top: 5px;" v-if="directLsit.length!=0" :status="status" />
  30. <o-empty v-if="directLsit.length==0" />
  31. </view>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. export default{
  37. data(){
  38. return{
  39. teamTabIndex: 0,
  40. directLsit: [],
  41. source:0,
  42. totalPages:0,
  43. totalSize:0,
  44. status: 'loadmore',
  45. pageRequest: { //查询的默认条件
  46. pageNum: 1,
  47. pageSize: 20,
  48. userName:''
  49. },
  50. inputAlign: 'left',
  51. list: [{
  52. name: '直接合伙人'
  53. }, {
  54. name: '间接合伙人'
  55. }],
  56. }
  57. },
  58. async onLoad(params) {
  59. this.queryData()
  60. },
  61. methods:{
  62. search(e) {
  63. this.pageRequest.userName=e
  64. this.queryData()
  65. },
  66. change(index) {
  67. this.pageRequest.userName=''
  68. this.source = index;
  69. this.pageRequest.pageNum = 1;
  70. this.pageRequest.pageSize = 20;
  71. this.queryData()
  72. },
  73. onReachBottom() {
  74. if (this.pageRequest.pageNum >= this.totalPages) return;
  75. this.status = 'loading';
  76. this.pageRequest.pageNum = ++this.pageRequest.pageNum;
  77. setTimeout(async () => {
  78. let res = await this.$http.post('/sysPartner/querySysPartnerAPPPage', {
  79. ...this.pageRequest,
  80. source:this.source
  81. });
  82. if (res.code == '200') {
  83. this.totalSize = res.data.totalSize;
  84. this.directLsit = [...this.directLsit, ...res.data.content];
  85. }
  86. if (this.pageRequest.pageNum >= this.totalPages) this.status = 'nomore';
  87. else this.status = 'loading';
  88. }, 1000)
  89. },
  90. onSelected(e) { //选择
  91. this.showDatePicker = false;
  92. if (e) {
  93. this.dateRange = e.value;
  94. this.queryData();
  95. }
  96. },
  97. async queryData() {
  98. let params = {
  99. source:this.source,
  100. ...this.pageRequest
  101. }
  102. let res = await this.$http.post('/sysPartner/querySysPartnerAPPPage', params);
  103. if (res.code == '200') {
  104. this.directLsit=res.data.content
  105. this.totalPages = res.data.totalPages;
  106. this.totalSize = res.data.totalSize;
  107. if (this.pageRequest.pageNum >= res.data.totalPages) this.status = 'nomore';
  108. else this.status = 'loadmore';
  109. }
  110. },
  111. onShowDatePicker() { //显示
  112. this.showDatePicker = true;
  113. },
  114. }
  115. }
  116. </script>
  117. <style lang="scss" scoped>
  118. .teamStatistics {
  119. width: 100%;
  120. height: auto;
  121. background: #FFFFFF;
  122. box-shadow: 0px 4px 10px 0px #DAE3F4;
  123. border-radius: 6px;
  124. }
  125. .body .teamStatistics .statisticsTitle {
  126. height: 70upx;
  127. margin-top: 10px;
  128. box-sizing: border-box;
  129. line-height: 70upx;
  130. font-size: 24rpx;
  131. border-radius: 6px 6px 0 0;
  132. color: #232832;
  133. }
  134. .body .teamStatistics .statisticsContent {
  135. box-sizing: border-box;
  136. height: 70upx;
  137. text-align: center;
  138. line-height: 70upx;
  139. font-size: 26rpx;
  140. color: #232832;
  141. view{
  142. text-align: center;
  143. line-height: 70upx;
  144. }
  145. }
  146. .body .teamStatistics .statisticsTitle,
  147. .body .teamStatistics .statisticsContent {
  148. display: flex;
  149. flex-wrap: nowrap;
  150. justify-content: space-between;
  151. }
  152. .body .teamStatistics .statisticsTitle>view,
  153. .body .teamStatistics .statisticsContent>view {
  154. width: 33.33%;
  155. text-align: center;
  156. font-size: 12px;
  157. }
  158. .statisticsDate {
  159. color: rgba(51,51,51,0.8);
  160. height: 34px;
  161. border-radius: 6px;
  162. }
  163. .teamStatistics .statisticsTitle {
  164. height: 70upx;
  165. margin-top: 10px;
  166. box-sizing: border-box;
  167. line-height: 70upx;
  168. font-size: 24rpx;
  169. background: linear-gradient( 180deg, #DAE0EE 0%, #E9ECF4 100%);
  170. border-radius: 6px 6px 0 0;
  171. color: #232832;
  172. view{
  173. text-align: center;
  174. line-height: 35px;
  175. }
  176. view:nth-child(1){
  177. background: #EBEFF8 ;
  178. line-height: 35px;
  179. }
  180. view:nth-child(2){
  181. background: #FEF0E1 ;
  182. color: #EF871C;
  183. }
  184. view:nth-child(3){
  185. background: #E6FAE3;
  186. color: #3AC716;
  187. }
  188. }
  189. .button1{
  190. background: #EEF0FD;
  191. color: #3640F0;
  192. font-size: 11px;
  193. padding:5px 10px
  194. }
  195. </style>