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

156 lines
5.2 KiB

7 months ago
4 months ago
7 months ago
4 months ago
7 months ago
4 months ago
7 months ago
4 months ago
7 months ago
4 months ago
7 months ago
4 months ago
7 months ago
4 months ago
7 months ago
3 months ago
7 months ago
4 months ago
7 months ago
3 months ago
7 months ago
4 months ago
7 months ago
4 months ago
7 months ago
4 months ago
7 months ago
4 months ago
7 months ago
4 months ago
7 months ago
4 months ago
7 months ago
3 months ago
4 months ago
7 months ago
3 months ago
7 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
7 months ago
  1. <template>
  2. <view>
  3. <view class="se-bgc-orange se-pos se-h-200">
  4. <view class="se-pos-cb se-flex se-flex-h-sb se-w-vw-90 se-py-30 se-bgc-white se-fs-28 se-br-20 se-bs" style="bottom: -100rpx;">
  5. <view class="se-flex se-flex-v-sa se-b-r se-flex-1">
  6. <view class="se-flex se-fs-26 se-fw-6 se-c-black">
  7. 总余额(
  8. </view>
  9. <view class="se-c-orange se-fs-26 se-c-orange se-mt-20">
  10. {{money}}
  11. </view>
  12. <view class="se-fs-24 se-mt-10 se-px-30 se-py-10 se-b-orange se-c-orange se-br-10 se-fw-6">
  13. 提现
  14. </view>
  15. </view>
  16. <view class="se-flex se-flex-v-sa se-flex-1">
  17. <view class="se-flex se-fs-26 se-fw-6 se-c-black">
  18. 累计提现
  19. </view>
  20. <view class="se-c-orange se-fs-26 se-c-orange se-mt-20">
  21. {{moneyLog}}
  22. </view>
  23. <view class="se-fs-24 se-mt-10 se-px-30 se-py-10 se-b-orange se-c-orange se-br-10 se-fw-6">
  24. 提现记录
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. <view class="se-flex-h-sb se-pt-130 se-pb-20 se-px-40">
  30. <view class="se-c-black se-fs-30 se-fw-5">
  31. 金额明细
  32. </view>
  33. <view class="se-flex">
  34. <view class="se-flex se-ml-10 se-b-orange se-c-orange se-br-10 se-flex-h-c se-px-10 se-py-8 se-fs-20" @click="startShow=true">
  35. <text class="se-mr-8">{{startDate}}</text>
  36. <u-icon name="arrow-down" size="10" color="#ff7a31"></u-icon>
  37. </view>
  38. <!-- <view class="se-flex se-ml-10 se-b-orange se-c-orange se-br-10 se-flex-h-c se-px-10 se-py-8 se-fs-20">
  39. <text class="se-mr-8">{{month}}</text>
  40. <u-icon name="arrow-down" size="10" color="#ff7a31"></u-icon>
  41. </view> -->
  42. <view class="se-flex se-ml-10 se-c-orange se-flex-h-c se-px-10 se-py-8 se-fs-20">
  43. <text></text>
  44. </view>
  45. <view class="se-flex se-ml-10 se-b-orange se-c-orange se-br-10 se-flex-h-c se-px-10 se-py-8 se-fs-20" @click="endShow=true">
  46. <text class="se-mr-8">{{endDate}}</text>
  47. <u-icon name="arrow-down" size="10" color="#ff7a31"></u-icon>
  48. </view>
  49. </view>
  50. </view>
  51. <view class="se-m-20 se-bgc-white se-br-10">
  52. <view class="se-b-b se-m-20 se-py-20 se-px-20 se-flex-h-sb" v-for="(items,indexs) in records" :key="indexs" @click="onMasterDetail(items)">
  53. <view class="se-flex se-flex-v">
  54. <view class="se-flex">
  55. <text class="se-fw-6 se-c-33 se-fs-30">{{items.title}}</text>
  56. </view>
  57. <view class="se-c-text-third se-fs-22 se-mt-20">
  58. <text >{{items.createTime}}</text>
  59. </view>
  60. </view>
  61. <view class="se-c-33 se-fs-30 se-fw-5" :class="items.type==0?'se-c-red':'se-c-green'">
  62. {{items.type==0?'-':'+'}}
  63. {{items.money}}
  64. </view>
  65. </view>
  66. </view>
  67. <u-empty v-if="records && records.length==0" mode="list"></u-empty>
  68. <view class="se-h-200"></view>
  69. <u-picker :show="startShow" ref="uPicker" :columns="dates" @cancel="startShow=false" @confirm="startDateConfirm"></u-picker>
  70. <u-picker :show="endShow" ref="uPicker" :columns="dates" @cancel="endShow=false" @confirm="endDateConfirm"></u-picker>
  71. </view>
  72. </template>
  73. <script>
  74. import {
  75. payLog
  76. } from "@/common/api.js"
  77. export default{
  78. data(){
  79. return{
  80. startShow:false,
  81. endShow:false,
  82. year:this.$dayjs().format('YYYY'),
  83. month:this.$dayjs().format('MM'),
  84. day:this.$dayjs().format('DD'),
  85. dates:[
  86. ['2024','2025','2026','2027','2028'],
  87. ['01','02','03','04','05','06','07','08','09','10','11','12'],
  88. ['01','02','03','04','05','06','07','08','09','10','11','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30'],
  89. ],
  90. pageNo:1,
  91. pageSize:20,
  92. startTime:"",
  93. startDate:"",
  94. endTime:"",
  95. endDate:"",
  96. money:0,
  97. moneyLog:0,
  98. records:[]
  99. }
  100. },
  101. mounted() {
  102. this.startTime = this.$dayjs().subtract(1, 'day').valueOf();
  103. this.startDate = this.$dayjs().subtract(1, 'day').format('YYYY-MM-DD')
  104. this.endTime = this.$dayjs().valueOf();
  105. this.endDate = this.$dayjs().format('YYYY-MM-DD')
  106. this.onPayLog();
  107. },
  108. onReachBottom() {
  109. let that = this
  110. that.pageNo = that.pageNo + 1
  111. that.onPayLog()
  112. },
  113. methods:{
  114. onPayLog(){
  115. let that = this
  116. let params = {
  117. pageNo:that.pageNo,
  118. pageSize:that.pageSize,
  119. startTime:that.startDate+" 00:00:00",
  120. endTime:that.endDate+" 23:59:59"
  121. }
  122. payLog(params).then(response=>{
  123. console.info("payLog",response)
  124. that.money = response.result.money?response.result.money:0
  125. that.moneyLog = response.result.moneyLog?response.result.moneyLog:0
  126. if(that.pageNo==1){
  127. that.records = response.result.log.records
  128. }else{
  129. that.records = that.records.concat(response.result.log.records)
  130. }
  131. }).catch(error=>{
  132. })
  133. },
  134. startDateConfirm(event){
  135. this.startTime = this.$dayjs(event.value[0]+"-"+event.value[1]+"-"+event.value[2]).valueOf();
  136. this.startDate = event.value[0]+"-"+event.value[1]+"-"+event.value[2]
  137. this.startShow = false
  138. this.onPayLog();
  139. },
  140. endDateConfirm(event){
  141. this.endTime = this.$dayjs(event.value[0]+"-"+event.value[1]+"-"+event.value[2]).valueOf();
  142. this.endDate = event.value[0]+"-"+event.value[1]+"-"+event.value[2]
  143. this.endShow = false
  144. this.onPayLog();
  145. }
  146. }
  147. }
  148. </script>
  149. <style>
  150. page{
  151. background-color: #f5f5f5;
  152. }
  153. </style>