<view class="user">
    <navigator hover-class="none" url="./detailed/index" class="user-order">
        <image src="/static/icons/stock_order.png" mode=""></image>
    </navigator>
    <image class="user-head" src="{{avatar ? avatar : '/static/imgs/default_myHead.png'}}"></image>
    <view class="user-member" wx:if="{{identity.order == '2'}}">
        <image src="/static/icons/stock_icon.png" mode=""></image>
    </view>
</view>

<view class="stock-top">
    <view class="top-title">
        <text>库存总数量</text>(单位：箱)
    </view>
    <view class="top-number">
        <image src="/static/icons/water.png" mode="widthFix"></image>{{stockData.residue}}
    </view>
</view>

<view class="stock-label">
    <view class="stock-cont">
        <view class="stock-item">
            <image class="stock-icon" src="/static/icons/stock_icon_01.png" mode="widthFix"></image>
            <view class="stock-number">{{stockData.hold}}<text>箱</text></view>
            <view class="stock-tips">已提数量</view>
        </view>
        <view class="stock-item">
            <image class="stock-icon" src="/static/icons/stock_icon_02.png" mode="widthFix"></image>
            <view class="stock-number">{{stockData.residue}}<text>箱</text></view>
            <view class="stock-tips">待提数量</view>
        </view>
        <view class="stock-btn">
            <navigator hover-class="none" url="./take/index" class="btn">
                <text>申请提货</text>
                <image src="/static/icons/arrow.png"></image>
            </navigator>
            <navigator hover-class="none" url="./site/index" class="btn">
                <text>地址管理</text>
                <image src="/static/icons/arrow_grey.png"></image>
            </navigator>
        </view>
    </view>
</view>

<view class="record">
    <view class="title">
        <view class="name">
            <image src="/static/icons/stock_nav.png" mode="widthFix"></image> 提货记录
        </view>
        <navigator hover-class="none" url="./list/index" class="more" wx:if="{{listArr.length > 0}}">
            查看全部
            <image src="/static/icons/arrow_more.png"></image>
        </navigator>
    </view>
    <view class="list" wx:if="{{listArr.length > 0}}">
        <view class="item" wx:for="{{listArr}}" wx:key="listArr">
            <view class="item-top">
                <view class="item-name">
                    提货量
                </view>
                <view class="item-number">
                    {{item.items[0].qty}}<text>(箱)</text>
                </view>
            </view>
            <view class="item-label">
                <view class="item-left">申请时间</view>
                <view class="item-right">{{item.created_at}}</view>
            </view>
            <view class="item-label">
                <view class="item-left">申请状态</view>
                <view class="item-right item-state green" wx:if="{{item.can.cancel}}">{{item.state}}</view>
                <view class="item-right item-state yellow" wx:elif="{{item.can.sign}}">{{item.state}}</view>
                <view class="item-right item-state" wx:else>{{item.state}}</view>
            </view>
        </view>
        <view class="pagesLoding" wx:if="{{lodingStats}}">
			<block wx:if="{{page.has_more}}">
				<image class="pagesLoding-icon" src="/static/icon/refresh_loding.gif" mode="widthFix"></image>加载中...
			</block>
			<block wx:else>
				没有更多了~
			</block>
		</view>
    </view>
    <!-- 暂无内容 -->
	<view class="recommend-hint" wx:else>
		<image src="/static/imgs/text_null.png"></image>
		<view>~抱歉，暂无内容~</view>
	</view>
</view>