<view class="page-order-detail">
	<view class="header-wrap" style="background-image:url('/assets/imgs/7_1_0/rf_bgc.jpg')">
		<view class="refund-status">
			<view class="look-logistics" wx-if="{{detail.status == 'D'}}">
				<navigator url="/pages/logistics/logistics?code={{detail.logistic.supplierCode}}&logisticsNo={{detail.logistic.code}}" hover-class="none">
					<button class="btn btn-primary btn-outline">查看物流</button>
				</navigator>
			</view>
			<!--订单状态(C:取消;N:新建,P:已支付;D:已发货;R:已收货) -->
			<view class="order-status" wx-if="{{detail.status == 'C'}}">
				<view class="status">交易关闭</view>
				<view class="desc">订单已关闭： 支付超时</view>
			</view>
			<view class="order-status" wx-if="{{detail.status == 'N'}}">
				<view class="status">待付款</view>
				<view class="desc">支付时间仅剩：2小时34分钟，超时将自动关闭</view>
			</view>
			<view class="order-status" wx-if="{{detail.status == 'P'}}">
				<view class="status">待发货</view>
				<view class="desc">商家安排发货中，请稍后</view>
			</view>
			<view class="order-status" wx-if="{{detail.status == 'D'}}">
				<view class="status">已发货</view>
				<view class="desc">{{detail.logistic.supplierName}}： {{detail.logistic.code}}</view>
			</view>
			<view class="order-status" wx-if="{{detail.status == 'R'}}">
				<view class="status">已完成</view>
				<view class="desc">{{detail.logistic.supplierName}}： {{detail.logistic.code}}</view>
			</view>
		</view>
	</view>
	<view class="address-info">
		<view class="address-name">
			<text>用户名称</text>
			<text class="user-phone">83832578475</text>
		</view>
		<view class="address-detail">
			上海市浦东新区碧波路690号
		</view>
		<view class="edit-address">
			<navigator url="/pages/addAddress/addAddress?id=1" hover-class="none">
				<button class="btn btn-default btn-sm">修改地址</button>
			</navigator>
		</view>
	</view>

	<view class="pro-wrap">
		<block wx:for="{{detail.skuVOList}}" wx:for-item="item" wx:key="">
			<view class="pro-list">
				<image class="pro-img" src="{{item.mainImgUrl}}" />
				<view class="pro-info">
					<view class="pro-name">{{item.productName}}</view>
					<view class="pro-desc">
						规格 {{item.skuSpec}}
					</view>
					<view class="pro-price">
						<text class="price">￥{{item.price}}</text>
						<text class="number">x {{item.count}}</text>
					</view>
				</view>
			</view>
		</block>
	</view>

	<view class="order-detail-info">
		<view class="order-pro-info">
			<view class="order-pro-list">
				<text>商品合计</text>
				<text>￥{{detail.payAmount}}</text>
			</view>
			<view class="order-pro-list">
				<text>运费</text>
				<text>￥{{detail.freightMoney}}</text>
			</view>
			<view class="order-pro-list">
				<text>活动折扣</text>
				<text>￥{{detail.payAmount}}</text>
			</view>
			<view class="order-pro-list">
				<text>优惠券优惠</text>
				<text>￥{{detail.discount}}</text>
			</view>
			<view class="order-pro-list">
				<text class="pay-amount">实付金额</text>
				<text class="order-price">￥{{detail.payAmount}}</text>
			</view>
		</view>
		<view class="order-number-info">
			<view class="order-number-item">
				<text class="order-number-label">订单编号</text>
				<text class="order-number-desc">{{detail.id}}</text>
				<view class="copy" bindtap="copy" data-content="{{detail.id}}">复制</view>
			</view>
			<view class="order-time">
				<text class="order-number-label">创建时间</text>
				<text class="order-number-desc">{{detail.createTime}}</text>
			</view>
		</view>
	</view>
	<!-- 底部按钮 -->
	<view class="button-wrap" wx-if="{{detail.status == 'C'}}">
		<button class="btn btn-primary btn-lg" data-id="{{detail.id}}" bindtap="handelDelOrder">删除订单</button>
	</view>
	<view class="button-wrap" wx-if="{{detail.status == 'N'}}">
		<button class="btn btn-primary btn-lg" data-id="{{detail.id}}" bindtap="handelToPay">立即支付</button>
		<button class="btn btn-lg btn-gray" data-id="{{detail.id}}" bindtap="handelCancelOrder">取消订单</button>
	</view>
	<view class="button-wrap" wx-if="{{detail.status == 'P'}}">
		<button class="btn btn-lg btn-gray" data-id="{{detail.id}}" data-detail="{{detail}}" bindtap="handelRequestRefund">申请退款</button>
	</view>
	<view class="button-wrap" wx-if="{{detail.status == 'D'}}">
		<button class="btn btn-primary btn-lg" data-id="{{detail.id}}" data-detail="{{detail}}" bindtap="handelRequestRefund">申请退款</button>
		<button class="btn btn-lg btn-gray" data-id="{{detail.id}}" bindtap="handelConfirmReceipt">确认收货</button>
	</view>
	<view class="button-wrap" wx-if="{{detail.status == 'R'}}">
		<button class="btn btn-lg btn-gray" data-id="{{detail.id}}" data-detail="{{detail}}" bindtap="handelRequestRefund">申请退款</button>
	</view>
</view>

