bill.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <template>
  2. <view class="bill-box flex-common-css box-sizing-border iPhone-bottom">
  3. <Nav title='账单' titleColor='#333'></Nav>
  4. <view class="box-head">
  5. <view class="box-head-1">
  6. <view class="sys-size-32 view-box" :class="navId === item.id?'sys-color-black-3 sys-weight-600':'sys-color-gray-9'"
  7. v-for="(item,i) in navList" :key="i" @click="selectTo(1,item,i)">{{item.name}}</view>
  8. <view class="xian" :class="navIndex === 0?'left-1':'left-2'"></view>
  9. </view>
  10. <view class="box-head-2 box-sizing-border">
  11. <view class="date-view sys-size-28 sys-color-gray-3" @click="selectTo(2)">
  12. {{fromData.time}}
  13. <uni-icons class='ml-4' type="bottom" size="12" color="#333"></uni-icons>
  14. </view>
  15. <view class="sys-size-28 sys-color-gray-9">仅展示当月订单</view>
  16. </view>
  17. </view>
  18. <view v-if="false" class="no-view sys-size-40 sys-color-gray-9">暂无数据</view>
  19. <scroll-view v-else scroll-y="true" class="box-sizing-border list-scroll">
  20. <view class="list-box" v-for="(item,i) in 10" :key="i">
  21. <image v-if="navIndex===0" src="@/static/img/wallet/j.png" mode=""></image>
  22. <image v-else src="@/static/img/wallet/bb.png" mode=""></image>
  23. <view class="box-right">
  24. <view class="box-right-1 mb-4">
  25. <view class="sys-size-32 sys-color-gray-3">收益</view>
  26. <view class="sys-size-36 sys-color-4BC285 sys-weight-600">+100</view>
  27. <!-- <view class="sys-size-36 sys-color-gray-3 sys-weight-600">-100</view> -->
  28. </view>
  29. <view class="sys-size-24 sys-color-gray-9">4月23日 12:06</view>
  30. </view>
  31. </view>
  32. </scroll-view>
  33. <view class="pop-view" v-if="isPop">
  34. <view class="pop-1"></view>
  35. <view class="pop-title sys-size-32 sys-color-gray-3 sys-weight-600 sys-background-gray-f">
  36. 选择时间
  37. <uni-icons class='close-icon' type="closeempty" size="14" color="#333" @click="selectTo(2)"></uni-icons>
  38. </view>
  39. <view class="pop-list sys-background-gray-f">
  40. <view class="list-box sys-size-26" v-for="(item,i) in dateList" @click="selectTo(2,item)">{{item}}</view>
  41. </view>
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. import tools from "@/service/tools";
  47. export default {
  48. data(){
  49. return{
  50. isPop:false,
  51. page:1,
  52. total:0,
  53. list:[],
  54. navId:1,
  55. navIndex:0,
  56. navList:[{name:'JM币',id:1},{name:'波点',id:2},],
  57. dateList:[],
  58. endTime:'',
  59. fromData:{
  60. time:'',
  61. },
  62. }
  63. },
  64. mounted() {
  65. this.endTime = tools.getDateYM();
  66. this.fromData.time = this.endTime;
  67. this.dateList = tools.getCustomTimeList('2020-01',this.endTime,'y-m')
  68. },
  69. methods:{
  70. selectTo(type,item,i){
  71. if(type === 1){
  72. if(this.navId != item.id){
  73. this.navId = item.id;
  74. this.navIndex = i;
  75. this.fromData.time = this.endTime;
  76. this.page = 1;
  77. this.list = [];
  78. }
  79. }else if(type === 2){
  80. if(item){
  81. this.fromData.time = item;
  82. this.page = 1;
  83. this.list = [];
  84. }
  85. this.isPop = !this.isPop;
  86. }
  87. },
  88. },
  89. }
  90. </script>
  91. <style scoped lang="scss">
  92. .bill-box{
  93. .ml-4{
  94. margin-left: 4rpx;
  95. }
  96. .mb-4{
  97. margin-bottom: 4rpx;
  98. }
  99. .pop-view{
  100. width: 100%;
  101. height: 100vh;
  102. background-color: rgba(0, 0, 0, 0.5);
  103. position: absolute;
  104. top: 0;
  105. left: 0;
  106. z-index: 201;
  107. display: flex;
  108. flex-direction: column;
  109. .pop-1{
  110. height: 30%;
  111. }
  112. .pop-title{
  113. height: 90rpx;
  114. line-height: 90rpx;
  115. text-align: center;
  116. border-bottom: 1px solid #e3e3e3;
  117. position: relative;
  118. border-radius: 16rpx 16rpx 0 0;
  119. .close-icon{
  120. position: absolute;
  121. right: 32rpx;
  122. }
  123. }
  124. .pop-list{
  125. flex: 1;
  126. overflow: auto;
  127. .list-box{
  128. height: 90rpx;
  129. line-height: 90rpx;
  130. text-align: center;
  131. border-bottom: 1px solid #e3e3e3;
  132. }
  133. }
  134. }
  135. .no-view{
  136. text-align: center;
  137. margin-top: 200rpx;
  138. }
  139. .list-scroll{
  140. flex: 1;
  141. overflow: auto;
  142. padding: 8rpx 32rpx;
  143. .list-box{
  144. box-sizing: border-box;
  145. padding: 32rpx 0;
  146. border-bottom: 1rpx solid #EEEEEE;
  147. display: flex;
  148. image{
  149. width: 96rpx;
  150. height: 96rpx;
  151. margin-right: 20rpx;
  152. }
  153. .box-right{
  154. flex: 1;
  155. .box-right-1{
  156. display: flex;
  157. justify-content: space-between;
  158. }
  159. }
  160. }
  161. }
  162. .box-head{
  163. .box-head-1{
  164. width: 100%;
  165. height: 94rpx;
  166. display: flex;
  167. position: relative;
  168. border-bottom: 1rpx solid #EEEEEE;
  169. .view-box{
  170. flex: 1;
  171. line-height: 94rpx;
  172. text-align: center;
  173. }
  174. .xian{
  175. width: 40rpx;
  176. height: 4rpx;
  177. background-color: #333;
  178. position: absolute;
  179. bottom: 0;
  180. }
  181. .left-1{
  182. left: 168rpx;
  183. transition: all 0.5s;
  184. }
  185. .left-2{
  186. left: 545rpx;
  187. transition: all 0.5s;
  188. }
  189. }
  190. .box-head-2{
  191. display: flex;
  192. justify-content: space-between;
  193. align-items: center;
  194. padding: 38rpx 32rpx 0 32rpx;
  195. .date-view{
  196. width: 200rpx;
  197. height: 56rpx;
  198. line-height: 56rpx;
  199. text-align: center;
  200. background: #F2F2F2;
  201. border-radius: 200rpx;
  202. }
  203. }
  204. }
  205. }
  206. </style>