<import src="../../common/common.wxml" />
<answer id='answer'></answer>
<view class="flex navs">
	<view bindtap="nav" data-index="0" class="{{nav==0?'active':'size-colo'}}">全部订单</view>
	<view bindtap="nav" data-index="1" class="{{nav==1?'active':'size-colo'}}">待付款</view>
	<view bindtap="nav" data-index="2" class="{{nav==2?'active':'size-colo'}}">待发货</view>
	<view bindtap="nav" data-index="3" class="{{nav==3?'active':'size-colo'}}">待收货</view>
	<view bindtap="nav" data-index="4" class="{{nav==4?'active':'size-colo'}}">已完成</view>
</view>
<block wx:if="{{showview}}">
	<view wx:if='{{list.length==0}}'>
		<template is="noRecord" data="{{...noRecord}}" />
	</view>
	<view wx:else>
		<block wx:for="{{list}}" wx:key="key">
			<view class="dingdan">
				<block>
					<view class="num flex">
						<text>订单编号：{{item.ordernumber}}</text>
						<text wx-if="{{item.status==1}}">待付款</text>
						<text  wx-if="{{item.status==2}}">待发货</text>
						<text  wx-if="{{item.status==3}}">待收货</text>
						<text  wx-if="{{item.status==4}}">已完成</text>
						<text  wx-if="{{item.status==5}}">订单过期</text>
						<text  wx-if="{{item.status==7}}">订单作废</text>
					</view>
					<block wx:for="{{item.prescription}}" wx:key="index" wx:for-item="itemName">
						<view class="list ">
							<view class="list-item {{index+1<item.prescription.length?'list-line':''}}">
								<view class="bor">
									<image src="{{itemName.picture}}"></image>
								</view>
								<view class="xq">
									<view class="name web-font">{{itemName.name}}</view>
									<view class="dz">{{itemName.firm}}</view>
									<view class="dz">{{itemName.norms}}</view>
									<view class="jg">
										<text>￥</text>
										<text>{{itemName.price}}</text>
									</view>
								</view>
								<view class="list-num">x {{itemName.num}}</view>
							</view>
						</view>
					</block>
				</block>
				<view class="zj flex">
					<text>共 {{item.total}} 件商品 实付款: </text>
					<text class="red">￥{{item.money}}</text>
					<text>（含运费￥12.00）</text>
				</view>
				<view class="dele flex">
					<view class="delebtn" bindtap="deleBtn" data-ordernumber="{{item.ordernumber}}" wx:if="{{item.status==1 || item.status==4 || item.status==5||item.status==7}}">删除订单</view>
					<view class="btns flex">
						<view class="ckwl" wx:if="{{item.status==2}}" bindtap="editAddress" data-ordernumber="{{item.ordernumber}}" data-address="{{item.address}}">修改地址</view>
						<view class="ckwl" wx:if="{{item.status==2}}" bindtap="goLogistics" data-img="{{item.prescription[0].picture}}" data-id="{{item.id}}" data-status="{{item.status}}" data-src="/packageA/logistics/logistics" data-num="{{item.express_order_new}}" data-com="{{item.com}}" data-address="{{item.address}}" data-tel="{{item.address.phone}}" data-ordernumber="{{item.ordernumber}}">查看物流</view>
						<view class="ckwl" wx:if="{{item.status==3 || item.status==4}}" bindtap="goLogistics" data-status="{{item.status}}" data-img="{{item.prescription[0].picture}}" data-src="/packageA/logistics/logistics" data-num="{{item.express_order_new}}" data-com="{{item.com}}" data-address="{{item.address}}" data-tel="{{item.address.phone}}" data-ordernumber="{{item.ordernumber}}">查看物流</view>
						<view class="ljzf" wx:if="{{item.status==3}}" bindtap="confirmReceipt" data-num="{{item.ordernumber}}">确认收货</view>
						<view class="ljzf" wx:if="{{item.status==2||item.status==3 || item.status==4}}" bindtap="goOrderDetail" data-id="{{item.id}}">订单详情</view>
						<view class="ljzf" wx:if="{{item.status==1}}" bindtap="goPay" data-id="{{item.yfid}}" data-isquick="{{item.modular}}">立即支付</view>
						<view class="ljzf1" wx:if="{{item.status==5}}">订单过期</view>
						<view class="ljzf1" wx:if="{{item.status==7}}">订单作废</view>
					</view>
				</view>
			</view>
		</block>
	</view>
</block>
<block wx:else>
	<template is="loading" data="{{...loading}}" />
</block>
<view class="hight"></view>