<block wx:if="{{list.length==0}}">
    <view class="head">
        <view class="count">{{language['请添加项目']||'请添加项目'}}</view>
        <view class="expand">
            <navigator wx:if="{{disabled}}" url="#" class="but" bindtap="addProject">
                <van-icon name="plus" />
            </navigator>
        </view>
    </view>
    <My_empty />
</block>

<van-tabs active="{{sa_projectid}}" wx:elif="{{list.length>1}}" nav-class='tabs' color='#3874F6' title-active-color='#3874F6' bind:change='onChange'>
    <van-tab title="{{item.projectname}}" wx:for="{{list}}" wx:key="sa_projectid" name='{{item.sa_projectid}}' />
</van-tabs>
<block wx:if="{{project}}">
    <view class="head">
        <view class="count">{{project.projectname}}</view>
        <view class="expand">
            <navigator wx:if="{{disabled}}" url="#" class="but" bindtap="toAddProduct">
                <van-icon name="plus" />
            </navigator>
        </view>
    </view>
    <view class="discount">
        <view class="label" style="margin-left: 30rpx;">{{language['折扣(%)']||'折扣(%)'}}：</view>
        <input class="input" disabled='{{!disabled}}' type="digit" value="{{project.zk}}" bindblur='onBlur' />
        <view class="label" style="margin-left: 97rpx;">{{language['金额']||'金额'}}：</view>
        <view class="price">{{project.shouAmount}}</view>
    </view>
    <Product list="{{productList}}" disabled='{{disabled}}' sa_salesforecastprojectid='{{project.sa_salesforecastprojectid}}' catchchangeAmount='updateAmount' />
</block>