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.

285 lines
5.6 KiB

9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 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="searchMonth" 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. searchMonth: '',
  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.searchMonth = this.params.searchMonth = uni.$u.timeFormat(Date.now(), 'yyyy/mm');
  94. console.log(this.params.searchMonth)
  95. this.initList()
  96. },
  97. onPullDownRefresh() {
  98. this.initList()
  99. },
  100. onReachBottom() {
  101. if(this.total>this.list.length) {
  102. this.settle_listFn()
  103. }
  104. },
  105. methods: {
  106. searchFn(val) {
  107. this.params.queryCondition = val
  108. this.initList()
  109. },
  110. initList() {
  111. this.list = []
  112. this.params.pageNo = 1
  113. this.settle_listFn()
  114. },
  115. // tab切换
  116. changeTab(val) {
  117. if(this.params.payStep == val.id) return
  118. this.params.payStep = val.id
  119. this.initList()
  120. },
  121. // 选择时间选择器里的时间
  122. confirmDatePicker(val) {
  123. this.showDatePicker = false
  124. let date = uni.$u.date(val.value, 'yyyy/mm')
  125. this.searchMonth = this.params.searchMonth = date
  126. console.log(this.params.searchMonth)
  127. this.initList()
  128. },
  129. // 请求数据
  130. async settle_listFn() {
  131. let obj = Object.assign({},this.params)
  132. if(obj.payStep==0) delete obj.payStep
  133. obj.searchMonth = obj.searchMonth.replace('/','')
  134. // delete obj.searchMonth
  135. const {
  136. data: res
  137. } = await settle_list(obj)
  138. let list = res.list
  139. this.params.pageNo ++
  140. if(list&&list.length) {
  141. this.list.push(...list)
  142. }
  143. if(this.list.length>=res.total) {
  144. this.status='nomore'
  145. }
  146. this.total = res.total
  147. }
  148. }
  149. }
  150. </script>
  151. <style lang="scss" scoped>
  152. .pageBgImg {
  153. height: 100%;
  154. }
  155. // .scroll-view_w {
  156. // width: 100%;
  157. // margin: 30rpx 0 0rpx 0;
  158. .tabs {
  159. display: flex;
  160. flex-wrap: nowrap;
  161. justify-content: space-between;
  162. padding: 30rpx 0;
  163. width: 100%;
  164. .tab {
  165. width: 118rpx;
  166. height: 60rpx;
  167. border-radius: 8rpx;
  168. border: 2rpx solid #FFFFFF;
  169. font-size: 28rpx;
  170. color: #fff;
  171. text-align: center;
  172. line-height: 60rpx;
  173. flex-shrink: 0;
  174. &.active {
  175. background-color: #fff;
  176. color: $themC;
  177. }
  178. &.all {
  179. width: 96rpx;
  180. }
  181. }
  182. }
  183. // }
  184. .month_row {
  185. display: flex;
  186. align-items: center;
  187. color: $themC;
  188. padding: 20rpx 0 0rpx 0;
  189. .month {
  190. font-size: 36rpx;
  191. margin-right: 10rpx;
  192. // font-weight: 600;
  193. }
  194. .unit {
  195. font-size: 30rpx;
  196. margin: 0 4rpx;
  197. }
  198. }
  199. .total {
  200. padding: 20rpx 0;
  201. }
  202. .card {
  203. margin-bottom: 24rpx;
  204. }
  205. .popupCon {
  206. height: 430rpx;
  207. .popTab {
  208. display: flex;
  209. padding: 40rpx 32rpx;
  210. .tabItem {
  211. font-size: 32rpx;
  212. color: #333;
  213. margin-right: 60rpx;
  214. &.active {
  215. color: $themC;
  216. position: relative;
  217. &::before {
  218. content: '';
  219. position: absolute;
  220. bottom: -20rpx;
  221. left: 50%;
  222. transform: translateX(-50%);
  223. width: 128rpx;
  224. height: 4rpx;
  225. background: #1989FA;
  226. border-radius: 3rpx;
  227. }
  228. }
  229. }
  230. }
  231. }
  232. .tabCon {
  233. display: flex;
  234. align-items: center;
  235. padding-left: 32rpx;
  236. padding-top: 20rpx;
  237. .dateBtn {
  238. width: 280rpx;
  239. height: 80rpx;
  240. border-radius: 10rpx;
  241. border: 2rpx solid #1989FA;
  242. line-height: 80rpx;
  243. text-align: center;
  244. color: $themC;
  245. font-size: 32rpx;
  246. &.hui {
  247. border: 2rpx solid #E8E9EC;
  248. }
  249. }
  250. .to {
  251. font-size: 32rpx;
  252. margin: 0 40rpx;
  253. }
  254. }
  255. .btnBg {
  256. width: 396rpx;
  257. margin: 34rpx auto 42rpx auto;
  258. }
  259. </style>