performance.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <view>
  3. <view class="info-wrap">
  4. <u-navbar
  5. title="我的业绩"
  6. title-color="#fff"
  7. :custom-back="customBack"
  8. :border-bottom="false"
  9. back-icon-color="#CCE8FF"
  10. :background="{background: 'none' }"></u-navbar>
  11. <view class="info">
  12. <view class="payee-no">工号:{{vuexUser.payeeNo}}</view>
  13. <!-- <view class="current-time">{{$u.timeFormat(currentTime, 'yyyy年mm月dd日 hh:MM:ss')}}</view> -->
  14. </view>
  15. </view>
  16. <!-- <view class="calendar-wrap">
  17. <u-calendar v-model="calendarShow" mode="date" @change="calendarChange"></u-calendar>
  18. </view> -->
  19. <view class="statistics">
  20. <view class="statistics-title">实收数(聚合)</view>
  21. <view class="statistics-total">
  22. <span class="number">1380.30</span>
  23. </view>
  24. <view class="statistics-item u-flex">
  25. <view class="statistics-item-cell">
  26. <view class="til">入场数</view>
  27. <view class="con">26</view>
  28. </view>
  29. <view class="statistics-item-cell">
  30. <view class="til">出场数</view>
  31. <view class="con">18</view>
  32. </view>
  33. <view class="statistics-item-cell">
  34. <view class="til">应收数</view>
  35. <view class="con">2215.00</view>
  36. </view>
  37. </view>
  38. </view>
  39. <view class="time" @click="selectTime">
  40. {{pickerYear}}{{pickerMonth}}<span class="dd">{{pickerDay}}</span>
  41. <u-icon name="arrow-down-fill" color="#3D3D3D" size="28"></u-icon>
  42. </view>
  43. <u-picker v-model="pickerShow" mode="time" :params="pickerParams" @confirm="confirmTime"></u-picker>
  44. <u-toast ref="uToast" />
  45. </view>
  46. </template>
  47. <script>
  48. export default{
  49. data(){
  50. return{
  51. vuexUser:'',
  52. currentTime: new Date().getTime(),
  53. calendarShow:true,
  54. pickerShow:false,
  55. pickerParams: {
  56. year: true,
  57. month: true,
  58. day: true,
  59. hour: false,
  60. minute: false,
  61. second: false
  62. },
  63. pickerYear:'',
  64. pickerMonth:'',
  65. pickerDay:'',
  66. achievementData:'',
  67. }
  68. },
  69. onLoad(){
  70. this.vuexUser = this.$store.state.vuex_user;
  71. let date = new Date().getTime();
  72. this.pickerYear = this.$u.timeFormat(date, 'yyyy');
  73. this.pickerMonth = this.$u.timeFormat(date, 'mm');
  74. this.pickerDay = this.$u.timeFormat(date, 'dd');
  75. this.handleAchievement();
  76. },
  77. onShow(){
  78. },
  79. methods:{
  80. customBack(){
  81. this.$u.route({
  82. // type:'switchTab',
  83. url: 'pages/index/index'
  84. });
  85. },
  86. calendarChange(e){
  87. console.log('e',e);
  88. this.calendarShow = true;
  89. },
  90. selectTime(){
  91. this.pickerShow = true;
  92. },
  93. confirmTime(e){
  94. console.log('confirmTime e',e);
  95. this.pickerYear = e.year;
  96. this.pickerMonth = e.month;
  97. this.pickerDay = e.day;
  98. },
  99. handleAchievement(){
  100. this.$u.api.achievement()
  101. .then(res=>{
  102. this.$refs.uToast.show({
  103. title: res.msg,
  104. type: 'success',
  105. });
  106. console.log('achievement',res)
  107. }).catch(err=>{
  108. this.$refs.uToast.show({
  109. title: err.msg,
  110. type: 'error',
  111. });
  112. console.log('achievement ',err)
  113. });
  114. }
  115. },
  116. computed:{
  117. theTime(){
  118. return this.pickerYear+this.pickerMonth+this.pickerDay
  119. }
  120. }
  121. }
  122. </script>
  123. <style lang="scss" scoped>
  124. @import './performance.scss'
  125. </style>