<timeRange id='TimeRange' dateTypes='{{dateTypes}}' dateType='{{dateType}}' bind:onChange='changeDate' />
<filtrate id='Filtrate' wx:if='{{typeList.length}}' list='{{typeList}}' type="{{content.where.type}}" title='合同类型' bind:onChange='changeType' />
<view class="global-card" style='margin-top:0;'>
    <view class="row">
        <view class="col" style='background-color: #3874F6;'>
            <view class="label">{{language['合同总数']||'合同总数'}}</view>
            <view class="value">{{list[0].allQty || 0}}</view>
        </view>
        <view class="col" style='background-color: #68C23A'>
            <view class="label">{{language['合同金额']||'合同金额'}}</view>
            <view class="value">{{list[0].sumSignAmount}}{{language['万']||'万'}}</view>
        </view>
    </view>
    <view class="row">
        <view class="col" style='background-color: #E6A33B;'>
            <view class="label">{{language['进行中合同总数']||'进行中合同总数'}}</view>
            <view class="value">{{list[0].inProgressQty}}</view>
        </view>
        <view class="col" style='background-color: #F56C6D'>
            <view class="label">{{language['进行中合同金额']||'进行中合同金额'}}</view>
            <view class="value">{{list[0].inProgressAmount}}{{language['万']||'万'}}</view>
        </view>
    </view>
    <view class="row">
        <view class="col" style='background-color: #3874F6;'>
            <view class="label">{{language['到期合同总数']||'到期合同总数'}}</view>
            <view class="value">{{list[0].expireQty}}</view>
        </view>
        <view class="col" style='background-color: #68C23A'>
            <view class="label">{{language['到期合同金额']||'到期合同金额'}}</view>
            <view class="value">{{list[0].expireAmount}}{{language['万']||'万'}}</view>
        </view>
    </view>
    <view class="row">
        <view class="col" style='background-color: #E6A33B;'>
            <view class="label">{{language['转订单合同数']||'转订单合同数'}}</view>
            <view class="value">{{list[0].convertOrderContractQty}}</view>
        </view>
        <view class="col" style='background-color: #F56C6D'>
            <view class="label">{{language['转订单合同金额']||'转订单合同金额'}}</view>
            <view class="value">{{list[0].convertOrderContractAmount}}{{language['万']||'万'}}</view>
        </view>
    </view>
</view>
<shrink title="合同明细" wx:if="{{list[0].allQty}}" open='{{showList}}' bind:onChange='shrinkChange'>
    <view style='padding-top: 20rpx;'>
        <navigator url="/packageA/contract/detail?id={{item.sa_contractid}}" class="global-card serve-item" wx:for='{{list}}' wx:key='sa_contractid'>
            <view class="title">{{item.billno}}</view>
            <view class="status" style="background-color:{{sColors[item.status]||'#3874F6'}}">
                {{language[item.status]||item.status}}
            </view>
            <view class="line">{{language['合同标题']||'合同标题'}}：{{item.title || ' --'}}</view>
            <view class="line">
                {{language['合同类型']||'合同类型'}}：{{language[item.type]||item.type}}
            </view>
            <view class="line">{{language['合同金额']||'合同金额'}}：{{item.signAmount || '0'}}</view>
            <view class="line">{{language['综合折扣']||'综合折扣'}}：{{item.avgdiscountrate || ' --'}}</view>
            <view class="line">
                {{language['合同有效期']||'合同有效期'}}：{{item.begdate+(language['至']||'至')+item.enddate }}
            </view>
            <view class="line">{{language['负责人']||'负责人'}}：{{item.name || ' --'}}</view>
        </navigator>
    </view>
</shrink>
<My_empty wx:else />