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.

164 lines
3.9 KiB

9 months ago
8 months ago
8 months ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
9 months ago
8 months ago
8 months ago
8 months ago
8 months ago
9 months ago
8 months ago
8 months ago
  1. <template>
  2. <view class="main" :style="{ background: `url(${imgUrl}) #f6f6f6 no-repeat`, backgroundSize: backgroundSize }">
  3. <!-- <operateCoach v-if="identity=='实操教练'"/>
  4. <principal v-if="identity=='校长'||identity=='驾校财务'"/> -->
  5. <view class="content">
  6. <view class="status_bar"></view>
  7. <view class="" style="height: 30rpx;"></view>
  8. <view class="userInfo">
  9. <view class="tit">Hi,{{ vuex_userInfo.name }}教练</view>
  10. <view class="flex userRow">
  11. <view class="schoolIcon">
  12. <image src="@/static/images/index/ic_jiaxiao.png" mode=""></image>
  13. </view>
  14. <view class="schoolName oneRowText">{{ vuex_userInfo.schoolName }}</view>
  15. <!-- <view class="tag">合作教练</view> -->
  16. </view>
  17. </view>
  18. <view class="card priceBox">
  19. <view class="blueLab">今日已结算金额</view>
  20. <view class="price">{{statistics.amount}}</view>
  21. <view class="flex-b">
  22. <view class="data">截止{{statistics.refreshDate}}</view>
  23. <view class="refresh" @click="getSettlementStatisticsFn">
  24. <view class="text">刷新</view>
  25. <view class="icon">
  26. <image src="@/static/images/index/ic_shuaxin.png" mode=""></image>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. <view class="h1"> 结算统计</view>
  32. <view class="tab_box">
  33. <tabDate />
  34. </view>
  35. <view class="card">
  36. <view class="chart">
  37. <columnChart />
  38. </view>
  39. </view>
  40. <view class="flex-b">
  41. <view class="h1">结算明细</view>
  42. <moreRight text="更多" @click.native="$goPage('/pages/indexEntry/settlement/settlement')"/>
  43. </view>
  44. <view class="record">
  45. <view class="card" v-for="(item,index) in list" :key="index">
  46. <stage :item="item"/>
  47. </view>
  48. </view>
  49. <view class="moreBtn" @click="$goPage('/pages/indexEntry/settlement/settlement')">查看更多</view>
  50. </view>
  51. <UserTab name ='统计'></UserTab>
  52. <u-popup :show="show" mode="center" round="20rpx">
  53. <view class="box">
  54. <view class="tit">您还未上传签名请尽快上传!</view>
  55. <view class="btnBg" @click="goPage">去签名</view>
  56. </view>
  57. </u-popup>
  58. </view>
  59. </template>
  60. <script>
  61. import stage from './comp/stage'
  62. import columnChart from './comp/columnChart'
  63. import tabDate from './comp/tabDate'
  64. import { imgUrl } from '@/config/site.config'
  65. import { needSign } from '@/config/api.js'
  66. import {
  67. getSettlementStatistics,
  68. settle_list
  69. } from '@/config/api.js'
  70. export default {
  71. components: {
  72. stage,
  73. columnChart,
  74. tabDate
  75. },
  76. data() {
  77. return {
  78. value1: '',
  79. currentTab: 1,
  80. statistics: {},
  81. list: [],
  82. imgUrl: imgUrl+'indexTopBanner.png',
  83. backgroundSize: '100% 492rpx',
  84. show: false,
  85. }
  86. },
  87. onShow() {
  88. uni.hideTabBar();
  89. this.getSettlementStatisticsFn()
  90. this.settle_listFn()
  91. },
  92. onLoad() {
  93. this.needSignFn()
  94. },
  95. mounted() {
  96. },
  97. methods: {
  98. // 是不是需要签
  99. async needSignFn() {
  100. const {data: res} = await needSign()
  101. if(res) {
  102. this.show = true
  103. }
  104. },
  105. goPage() {
  106. this.show = false
  107. this.$goPage('/pages/userCenter/signature/signature')
  108. },
  109. tabClick(num) {
  110. this.currentTab = num
  111. },
  112. async getSettlementStatisticsFn() {
  113. let obj = {
  114. searchDateType: uni.$u.timeFormat(Date.now(), 'yyyymm'),
  115. // coachId: this.vuex_coachId || ''
  116. }
  117. const {
  118. data: res
  119. } = await getSettlementStatistics(obj)
  120. this.statistics = res
  121. console.log(res)
  122. },
  123. async settle_listFn() {
  124. let obj = {
  125. "pageNo": 1,
  126. "pageSize": 10,
  127. }
  128. const {
  129. data: res
  130. } = await settle_list(obj)
  131. this.list = res.list || []
  132. }
  133. }
  134. }
  135. </script>
  136. <style lang="scss" scoped>
  137. @import './comp/comp.scss';
  138. .box {
  139. padding: 40rpx 50rpx;
  140. text-align: center;
  141. font-size: 28rpx;
  142. color: #333;
  143. .tit {
  144. padding: 30rpx 0 60rpx 0;
  145. color: $themC;
  146. font-weight: 700;
  147. }
  148. .btnBg {
  149. width: 370rpx;
  150. margin: auto;
  151. }
  152. }
  153. </style>