<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>
    <picker mode="date" fields='month' end='dateEnd' bindchange='changeDate'>
        <navigator url="#">{{ymonth}}月</navigator>
    </picker>
</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.creditquota+item.balance}}
                </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}}</view>
        <view class="exp">{{item.accountname}}：{{item.amount}}</view>
        <view class="exp">交易备注：{{item.remarks || ' --'}}</view>
        <view class="exp">{{item.createdate}}</view>
    </view>
    <view class="price" style="color:{{item.balance>=0?'#DB0D27':'var(--success)'}} ;">
        ￥{{item. balance}}
    </view>
</navigator>

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