珠宝小程序前端代码
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.

235 lines
5.1 KiB

3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
  1. <template>
  2. <view class="running-water">
  3. <!-- 导航栏 -->
  4. <navbar title="流水记录" leftClick @leftClick="$utils.navigateBack" bgColor="#E3441A" color="#fff" />
  5. <view class="bg"></view>
  6. <view class="money-info-wrapper">
  7. <view class="money-info">
  8. <view class="total-brokerage">
  9. <view class="title">总佣金</view>
  10. <view class="total-money">{{ totalMoney }}</view>
  11. <!-- <view class="btn">
  12. <view @click="$utils.navigateTo('/pages_order/mine/withdraw')" class="">
  13. 提现
  14. </view>
  15. </view> -->
  16. </view>
  17. <view class="total-withdraw">
  18. <view class="title">累计提现</view>
  19. <view class="total-money">{{ totalWithdraw }}</view>
  20. <!-- <view class="btn">
  21. <view class="">
  22. 提现记录
  23. </view>
  24. </view> -->
  25. </view>
  26. </view>
  27. </view>
  28. <view class="date-select">
  29. <!-- <view class="select-title">
  30. 金额明细
  31. </view> -->
  32. <view class="year-info"
  33. @click="openCalendars">
  34. <view class="time-unit">
  35. <!-- format('YYYY-MM-DD HH:mm:ss') -->
  36. {{ $dayjs(beforeDate).format('YYYY') }}
  37. <uv-icon name="arrow-down-fill"></uv-icon>
  38. </view>
  39. <view class="time-unit">
  40. {{ $dayjs(beforeDate).format('MM') }}
  41. <uv-icon name="arrow-down-fill"></uv-icon>
  42. </view>
  43. <text class="interval"></text>
  44. <view class="time-unit">
  45. {{ $dayjs(afterDate).format('YYYY') }}
  46. <uv-icon name="arrow-down-fill"></uv-icon>
  47. </view>
  48. <view class="time-unit">
  49. {{ $dayjs(afterDate).format('MM') }}
  50. <uv-icon name="arrow-down-fill"></uv-icon>
  51. </view>
  52. </view>
  53. </view>
  54. <view class="tab-box">
  55. <view class="tab-box1">
  56. <uv-cell center border :title="item.title" v-for="(item, index) in list" :key="index"
  57. :value="x[item.type] + item.money" :label="item.createTime" />
  58. </view>
  59. <view style="padding: 100rpx 0;" v-if="list.length == 0">
  60. <uv-empty mode="history" textSize="28rpx" iconSize="100rpx" />
  61. </view>
  62. </view>
  63. <Calendars ref="calendars" @select="handleSelectCalendars"></Calendars>
  64. </view>
  65. </template>
  66. <script>
  67. import mixinsList from "@/mixins/list.js"
  68. import Calendars from "@/components/calendars/index.vue"
  69. export default {
  70. mixins: [mixinsList],
  71. components: {
  72. Calendars
  73. },
  74. data() {
  75. return {
  76. x: ['+', '-', '-', '+'],
  77. mixinsListApi: "getWaterPageList",
  78. beforeDate: new Date(), //开始日期
  79. afterDate: new Date(), //结束日期
  80. totalMoney : 0,
  81. totalWithdraw : 0,
  82. }
  83. },
  84. methods: {
  85. //打开日历
  86. openCalendars() {
  87. if (this?.$refs?.calendars) {
  88. this.$refs.calendars.open();
  89. }
  90. },
  91. // 选择了日期
  92. handleSelectCalendars(day) {
  93. console.log(day);
  94. // let beforeDate = this.getYearMonth(day?.range?.before)
  95. // let afterDate = this.getYearMonth(day?.range?.after)
  96. // this.beforeYear = beforeDate.year;
  97. // this.beforeMonth = beforeDate.month;
  98. // this.afterYear = afterDate.year;
  99. // this.afterMonth = afterDate.month;
  100. },
  101. getDataThen(list, total, result){
  102. this.totalMoney = result.totalMoney
  103. this.totalWithdraw = result.totalWithdraw
  104. this.list = result.page.records
  105. this.total = result.page.total
  106. },
  107. }
  108. }
  109. </script>
  110. <style lang="scss" scoped>
  111. .running-water {
  112. width: 750rpx;
  113. background: #F5F5F5;
  114. margin: 0 auto;
  115. min-height: 100vh;
  116. .bg {
  117. background: $uni-color;
  118. padding: 100rpx 0rpx;
  119. box-sizing: border-box;
  120. }
  121. .money-info-wrapper {
  122. padding: 0rpx 20rpx;
  123. box-sizing: border-box;
  124. background: white;
  125. height: 130rpx;
  126. .money-info {
  127. display: flex;
  128. flex-wrap: wrap;
  129. background: white;
  130. border-radius: 20rpx;
  131. overflow: hidden;
  132. transform: translateY(-60%);
  133. box-shadow: 0rpx 0rpx 10rpx rgba(0, 0, 0, .1);
  134. .total-brokerage,
  135. .total-withdraw {
  136. width: 50%;
  137. text-align: center;
  138. padding: 20rpx 0rpx;
  139. .title {
  140. font-size: 34rpx;
  141. }
  142. .total-money {
  143. color: $uni-color;
  144. font-size: 36rpx;
  145. margin: 20rpx 0rpx;
  146. }
  147. .btn {
  148. display: flex;
  149. justify-content: center;
  150. align-items: center;
  151. view {
  152. width: 40%;
  153. border: 1px solid $uni-color;
  154. padding: 10rpx;
  155. color: $uni-color;
  156. border-radius: 10rpx;
  157. }
  158. }
  159. }
  160. }
  161. }
  162. .date-select {
  163. padding: 0rpx 20rpx;
  164. box-sizing: border-box;
  165. background: white;
  166. padding-bottom: 20rpx;
  167. display: flex;
  168. justify-content: center;
  169. .select-title {}
  170. .year-info {
  171. display: flex;
  172. color: $uni-color;
  173. font-size: 26rpx;
  174. .time-unit {
  175. display: flex;
  176. align-items: center;
  177. justify-content: space-between;
  178. border: 1px solid $uni-color;
  179. margin: 0rpx 10rpx;
  180. border-radius: 10rpx;
  181. box-sizing: border-box;
  182. padding: 7rpx 12rpx;
  183. &::v-deep .uv-icon {
  184. display: flex;
  185. align-items: center;
  186. }
  187. &::v-deep .uv-icon__icon {
  188. color: $uni-color !important;
  189. margin-left: 5rpx;
  190. font-size: 20rpx !important;
  191. }
  192. }
  193. .interval {
  194. display: flex;
  195. align-items: center;
  196. }
  197. }
  198. }
  199. .tab-box {
  200. margin: 20rpx;
  201. background-color: #fff;
  202. border-radius: 20rpx;
  203. overflow: hidden;
  204. }
  205. }
  206. </style>