<van-sticky wx:if="{{sourceData.projectname}}">
    <view class="head">
        <view class="title line-1">项目：{{sourceData.projectname}}</view>
        <view class="line-1">项目编号：{{sourceData.projectnum}}</view>
        <view class="line-1">项目地址：{{sourceData.address}}</view>
    </view>
</van-sticky>
<view class="nav">
    <text>产品类别</text>
    <text>共{{list.length}}个</text>
</view>
<My_empty wx:if="{{list.length==0}}" />
<view class="item" wx:for="{{list}}" wx:key="itemclassnum">
    <view class="title">
        <view>{{item.itemclassname}}</view>
        <text wx:if="{{isEdit}}" class="iconfont icon-shanchu" style="color: #999999;" catchtap='deleteProduct' data-item="{{item}}" />
    </view>
    <view class="group">
        <view>
            <view class="label"><text>*</text>订单金额(万元)：</view>
            <input type="digit" data-index="{{index}}" disabled="{{!isEdit}}" data-name="orderamount" bindinput='inputChange' value="{{item.orderamount}}" />
        </view>
        <view>
            <view class="label"><text>*</text>出货金额(万元)：</view>
            <input type="digit" data-index="{{index}}" disabled="{{!isEdit}}" data-name="outamount" bindinput='inputChange' value="{{item.outamount}}" />
        </view>
        <view>
            <view class="label"><text>*</text>开票金额(万元)：</view>
            <input type="digit" data-index="{{index}}" disabled="{{!isEdit}}" data-name="invoiceamount" bindinput='inputChange' value="{{item.invoiceamount}}" />
        </view>
        <view>
            <view class="label">订货数量(个)：</view>
            <input type="digit" data-index="{{index}}" disabled="{{!isEdit}}" data-name="orderqty" bindinput='inputChange' value="{{item.orderqty}}" />
        </view>
        <view>
            <view class="label">出货数量(个)：</view>
            <input type="digit" data-index="{{index}}" disabled="{{!isEdit}}" data-name="outqty" bindinput='inputChange' value="{{item.outqty}}" />
        </view>
        <view>
            <view class="label">开票数量(个)：</view>
            <input type="digit" data-index="{{index}}" disabled="{{!isEdit}}" data-name="invoiceqty" bindinput='inputChange' value="{{item.invoiceqty}}" />
        </view>
    </view>
</view>

<view class="footer" wx:if="{{isEdit}}">
    <van-button type="default" plain round custom-class='add' bindtap="addProduct">添加产品</van-button>
    <van-button custom-class='change' disabled="{{disabled}}" bindtap="submit" loading='{{loading}}' loading-text="保存中...">保存</van-button>
</view>

<product id='Product' bindgetResult='getResult' />
<view style="height: 130rpx;" />