You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

283 lines
5.5 KiB

8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
  1. <template>
  2. <!-- 结算明细 -->
  3. <view class="pageBg">
  4. <view class="pageBgImg">
  5. <topNavbar title="结算明细"></topNavbar>
  6. <view class="pad">
  7. <searchRow placeholder="搜索学员姓名/学员手机号" @searchFn="searchFn"/>
  8. <view class="tabs">
  9. <view class="tab" v-for="(item,index) in tabData" :key="index" @click="changeTab(item)"
  10. :class="{active: params.payStep==item.id}" :id="'tab'+item.id">{{ item.text }}</view>
  11. </view>
  12. </view>
  13. <!-- <scroll-view class="scroll-view_w" scroll-x="true" scroll-with-animation
  14. :scroll-into-view="'tab'+params.payStep" scroll-left="140"> -->
  15. <!-- </scroll-view> -->
  16. </view>
  17. <view class="content pad">
  18. <view class="month_row" @click="showDatePicker=true">
  19. <view class="month">{{params.searchMonth}}</view>
  20. <!-- <view class="unit"></view> -->
  21. <view class="">{{ selectDate }}</view>
  22. <view class="iconFont">
  23. <u-icon name="arrow-down" color="#686B73" size="14"></u-icon>
  24. </view>
  25. </view>
  26. <view class="total">结算金额共计: 待对接</view>
  27. <view class="record" v-if="list.length">
  28. <view class="card" v-for="(item,index) in list" :key="index"
  29. @click="$goPage('/pages/indexEntry/settlement/detail/detail')">
  30. <stage :item="item"/>
  31. </view>
  32. </view>
  33. <nodata v-if="!list.length&&status=='nomore'"></nodata>
  34. </view>
  35. <u-datetime-picker :show="showDatePicker" v-model="value1" mode="year-month" :visibleItemCount="4"
  36. :closeOnClickOverlay="false" @confirm="confirmDatePicker" @cancel="cancelDatePicker"></u-datetime-picker>
  37. </view>
  38. </template>
  39. <script>
  40. import stage from '../../tabbar/statistics/comp/stage.vue'
  41. import {
  42. settle_list
  43. } from '@/config/api.js'
  44. export default {
  45. components: {
  46. stage
  47. },
  48. data() {
  49. return {
  50. date3: '',
  51. date2: '',
  52. date1: '',
  53. value1: '',
  54. showDatePicker: false,
  55. show: false,
  56. tabData: [{
  57. text: '全部',
  58. id: 0
  59. },
  60. {
  61. text: '阶段一',
  62. id: 1
  63. },
  64. {
  65. text: '阶段二',
  66. id: 2
  67. },
  68. {
  69. text: '阶段三',
  70. id: 3
  71. },
  72. {
  73. text: '阶段四',
  74. id: 4
  75. }
  76. ],
  77. currentPopTab: 2,
  78. currentBtnDate: 1,
  79. selectDate: '', //筛选日期
  80. params: {
  81. "pageNo": 1,
  82. "pageSize": 20,
  83. "queryCondition": "",
  84. // "coachId": '',
  85. "payStep": 0,
  86. "searchMonth": ''
  87. },
  88. list: [],
  89. status: 'loading'
  90. }
  91. },
  92. onLoad() {
  93. this.params.searchMonth = uni.$u.timeFormat(Date.now(), 'yyyy/mm');
  94. this.initList()
  95. },
  96. onPullDownRefresh() {
  97. this.initList()
  98. },
  99. onReachBottom() {
  100. if(this.total>this.list.length) {
  101. this.settle_listFn()
  102. }
  103. },
  104. methods: {
  105. searchFn(val) {
  106. this.params.queryCondition = val
  107. this.initList()
  108. },
  109. initList() {
  110. this.list = []
  111. this.params.pageNo = 1
  112. this.settle_listFn()
  113. },
  114. // tab切换
  115. changeTab(val) {
  116. if(this.params.payStep == val.id) return
  117. this.params.payStep = val.id
  118. this.initList()
  119. },
  120. // 选择时间选择器里的时间
  121. confirmDatePicker(val) {
  122. this.showDatePicker = false
  123. let date = uni.$u.date(val.value, 'yyyy/mm')
  124. this.params.searchMonth = date
  125. this.initList()
  126. },
  127. // 请求数据
  128. async settle_listFn() {
  129. let obj = Object.assign({},this.params)
  130. if(obj.payStep==0) delete obj.payStep
  131. obj.searchMonth = obj.searchMonth.replace('/','')
  132. // delete obj.searchMonth
  133. const {
  134. data: res
  135. } = await settle_list(obj)
  136. let list = res.list
  137. this.params.pageNo ++
  138. if(list&&list.length) {
  139. this.list.push(...list)
  140. }
  141. if(this.list.length>=res.total) {
  142. this.status='nomore'
  143. }
  144. this.total = res.total
  145. }
  146. }
  147. }
  148. </script>
  149. <style lang="scss" scoped>
  150. .pageBgImg {
  151. height: 100%;
  152. }
  153. // .scroll-view_w {
  154. // width: 100%;
  155. // margin: 30rpx 0 0rpx 0;
  156. .tabs {
  157. display: flex;
  158. flex-wrap: nowrap;
  159. justify-content: space-between;
  160. padding: 30rpx 0;
  161. width: 100%;
  162. .tab {
  163. width: 118rpx;
  164. height: 60rpx;
  165. border-radius: 8rpx;
  166. border: 2rpx solid #FFFFFF;
  167. font-size: 28rpx;
  168. color: #fff;
  169. text-align: center;
  170. line-height: 60rpx;
  171. flex-shrink: 0;
  172. &.active {
  173. background-color: #fff;
  174. color: $themC;
  175. }
  176. &.all {
  177. width: 96rpx;
  178. }
  179. }
  180. }
  181. // }
  182. .month_row {
  183. display: flex;
  184. align-items: center;
  185. color: $themC;
  186. padding: 20rpx 0 0rpx 0;
  187. .month {
  188. font-size: 36rpx;
  189. margin-right: 10rpx;
  190. // font-weight: 600;
  191. }
  192. .unit {
  193. font-size: 30rpx;
  194. margin: 0 4rpx;
  195. }
  196. }
  197. .total {
  198. padding: 20rpx 0;
  199. }
  200. .card {
  201. margin-bottom: 24rpx;
  202. }
  203. .popupCon {
  204. height: 430rpx;
  205. .popTab {
  206. display: flex;
  207. padding: 40rpx 32rpx;
  208. .tabItem {
  209. font-size: 32rpx;
  210. color: #333;
  211. margin-right: 60rpx;
  212. &.active {
  213. color: $themC;
  214. position: relative;
  215. &::before {
  216. content: '';
  217. position: absolute;
  218. bottom: -20rpx;
  219. left: 50%;
  220. transform: translateX(-50%);
  221. width: 128rpx;
  222. height: 4rpx;
  223. background: #1989FA;
  224. border-radius: 3rpx;
  225. }
  226. }
  227. }
  228. }
  229. }
  230. .tabCon {
  231. display: flex;
  232. align-items: center;
  233. padding-left: 32rpx;
  234. padding-top: 20rpx;
  235. .dateBtn {
  236. width: 280rpx;
  237. height: 80rpx;
  238. border-radius: 10rpx;
  239. border: 2rpx solid #1989FA;
  240. line-height: 80rpx;
  241. text-align: center;
  242. color: $themC;
  243. font-size: 32rpx;
  244. &.hui {
  245. border: 2rpx solid #E8E9EC;
  246. }
  247. }
  248. .to {
  249. font-size: 32rpx;
  250. margin: 0 40rpx;
  251. }
  252. }
  253. .btnBg {
  254. width: 396rpx;
  255. margin: 34rpx auto 42rpx auto;
  256. }
  257. </style>