<view class="head">
    <picker mode="selector" range='{{accountList}}' range-key='accountname' value='{{active}}' bindchange='changeAccount'>
        <navigator class="line-1" url="#">{{accountList[active].accountname}}</navigator>
    </picker>
    <view style="display: flex;align-items: center;">
        <picker mode="date" end='{{enddate||dateEnd}}' data-name="begindate" bindchange='changeDate'>
            <navigator url="#">{{begindate||'开始日期'}}</navigator>
        </picker>
        <text style="padding: 0 20rpx;">-</text>
        <picker mode="date" start='{{begindate}}' end='{{dateEnd}}' data-name="enddate" bindchange='changeDate'>
            <navigator url="#">{{enddate||'截止日期'}}</navigator>
        </picker>
    </view>
</view>

<swiper class="swiper-box" current='{{active}}' circular indicator-dots indicator-active-color='var(--assist)' bindchange='changeAccount'>
    <swiper-item wx:for="{{accountList}}" wx:key="name">
        <view class="upper">
            <view class="name">
                {{item.accountname}}(元)
            </view>
            <view class="price">
                {{item.balance}}
            </view>
        </view>
        <view class="lower">
            <view class="item">
                <view class="name">信用额度(元)</view>
                <view class="price">
                    {{item.creditquota}}
                </view>
            </view>
            <view class="item">
                <view class="name">可用额度(元)</view>
                <view class="price">
                    {{item.usable}}
                </view>
            </view>
        </view>
        <image class="image" mode="aspectFill" src="/static/image/qia.png" />
        <view class="top" />
        <view class="angle" />
        <view class="bottom" />
    </swiper-item>
</swiper>
<view class="total">
    收入总计:{{expend}}，支出总计:{{earning}}
</view>

<navigator url="#" class="record" wx:for="{{recordList}}" wx:key="sa_accountclassid">
    <view class="content">
        <view class="title">{{item.type==0?'支出':'收入'}}{{item.source?'-'+item.source:""}}</view>
        <view class="exp">{{item.accountname}}：{{item.showBalance}}</view>
        <view class="exp">分类：{{item.class || ' --'}}</view>
        <view class="exp">分类明细：{{item.subclass || ' --'}}</view>
        <view class="exp">交易备注：{{item.remarks || ' --'}}</view>
        <view class="exp">{{item.createdate}}</view>
    </view>

    <view class="price" style="color:{{item.type==0?'#DB0D27':'var(--success)'}};">
        {{item. amount}}
    </view>
</navigator>

<Yl_Empty wx:if="{{recordList.length==0}}" />