123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203 |
- <template>
- <view class="">
- <u-navbar
- title="交易明细"
- :placeholder="true"
- :autoBack="true"
- @leftClick="leftClick"
- :safeAreaInsetTop="true"
- >
- </u-navbar>
- <view class="tabs-wrap">
- <u-tabs
- :list="tabsList"
- lineColor="#EF2121"
- :activeStyle="{color:'#333','font-weight': '600','font-size':'30rpx'}"
- :itemStyle="{width:'28%','padding-bottom':'20rpx'}"
- :inactiveStyle="{color:'#999'}"
- @click="tabsClick"></u-tabs>
- </view>
- <mescroll-body class="" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
- <view class="page-wrap" v-if="dataList.length>0" >
- <view class="list">
- <view class="item u-flex u-row-between" v-for="item in dataList" :key="item.id">
- <view class="left">
- <view class="name">{{item.title}}</view>
- <view class="time">{{item.createTime}}</view>
- </view>
- <view class="right">
- <text class="num plus" v-if="item.type==1">+{{item.num}}</text>
- <text class="num" v-else-if="item.type==2">-{{item.num}}</text>
- <text class="num" v-else-if="item.type==3" style="color:#444">{{item.num}}</text>
- <view class="remark">{{item.remark}}</view>
- </view>
-
- </view>
- </view>
- </view>
- </mescroll-body>
- </view>
- </template>
- <script>
-
- import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
- export default {
- mixins: [MescrollMixin],
- data() {
- return {
- credit:'',
- downOption: {},
-
- upOption: {
- page: {
- size: 10
- },
- noMoreSize: 5,
- empty: {
- tip: '暂无相关数据'
- }
- },
- tabsList:[{name:'全部',recordType:undefined},{name:'收入',recordType:1},{name:'支出',recordType:2}],
- params:{
- type:''
- },
- activeIndex:0,
- dataList: []
- }
- },
- onShow() {
-
- },
- onLoad() {
- this.params.type = this.tabsList[this.activeIndex].recordType;
-
- },
- methods: {
- leftClick(e){
- let pages = getCurrentPages();
- if(pages.length==1){
- uni.$u.route('/pages/index/index')
- }else{
- uni.navigateBack()
- };
- },
-
- </script>
- <style>
- page{
- background-color: #f5f5f5;
- }
- </style>
- <style lang="scss" scoped>
- .credit{
- padding: 20rpx;
- background-color: #fff;
- border-radius: 8rpx;
- margin: 0 20rpx 20rpx;
- font-size: 36rpx;
- font-weight: 600;
- color: #00A447;
- }
- .tabs-wrap{
- background-color: #fff;
- margin-bottom: 10rpx;
- }
- .list{
- border-radius: 8rpx;
- padding: 0 20rpx 20rpx;
- background-color: #fff;
- .item{
- padding: 20rpx 0;
- border-bottom: 0.5px solid #ddd;
- .name{
- font-size: 30rpx;
- font-weight: 400;
- color: #333333;
- line-height: 42rpx;
- margin-bottom: 8rpx;
- }
- .time{
- font-size: 24rpx;
- font-weight: 400;
- color: #999999;
- line-height: 33rpx;
- }
- .right{
- text-align: right;
- .remark{
- font-size: 24rpx;
- font-weight: 400;
- color: #999999;
- }
- }
- .num{
- font-size: 30rpx;
- font-weight: 600;
- color: #FFB100;
- &.plus{
- color: #00A447;
- }
- }
- }
- }
- </style>
|