<nav type="back" title="订单详情" background-color="#e6e6e6"></nav>
<scroll-view scroll-y="{{true}}" style="background:#fff;">
    <view class="pay_wrap">
        <view class="line"></view>
        <!-- 地址 -->
        <view class="address" bindtap="toAddress">
            <block wx:if="{{address}}">
                <van-icon size="60rpx" class="address_icon" name="https://file-cloud.fmode.cn/MldI5PBNt7/20211008/012c91105654.png" />
                <view class="address_info">
                    <view class="info_top">
                        <view class="name">{{address.name}}</view>
                        <view class="mobile">{{address.mobile}}</view>
                    </view>
                    <view class="info_content">
                        {{address.province_name}}{{address.city_name}}{{address.district_name}}{{address.address}}
                    </view>
                    <view class="tips">收货不便时，可选择暂存服务</view>
                </view>
                <van-icon size="60rpx" class="address_icon" name="https://file-cloud.fmode.cn/MldI5PBNt7/20211008/v1bjgu114143.png" />
            </block>
            <block wx:if="{{!address}}">
                <van-icon size="60rpx" class="address_icon" name="https://file-cloud.fmode.cn/MldI5PBNt7/20211008/012c91105654.png" />
                <view class="address_select">
                    <view>请选择收货地址</view>
                </view>
                <van-icon size="60rpx" class="address_icon" name="https://file-cloud.fmode.cn/MldI5PBNt7/20211008/v1bjgu114143.png" />
            </block>
        </view>
        <!-- 商品信息 -->
        <view class="goods_box">
            <view class="title">
                <van-icon class="logo" size="40rpx" name="{{companyInfo.logo}}" />
                <view>{{companyInfo.title}}</view>
            </view>
            <view class="goods_info">
                <image class="goods_image" mode="scaleToFill" src="{{order.image}}"></image>
                <view class="goods_detail">
                    <view class="goods_name">{{order.name}}</view>
                    <view class="goods_desc">{{order.desc}}</view>
                    <view class="goods_tips">发货时间：付款后72小时内</view>
                </view>
            </view>
            <view class="goods_count" wx:if="{{!show}}">
                <view>购买数量</view>
                <view>{{order.count}}</view>
            </view>
            <view class="goods_count" wx:if="{{!show}}">
                <view>支付金额</view>
                <view>{{order.price}}</view>
            </view>
            <view class="goods_count">
                <view>订单编号</view>
                <view>{{order.orderNum}}</view>
            </view>
            <view class="goods_count">
                <view>下单时间</view>
                <view>{{order.orderTime}}</view>
            </view>
            <view class="goods_count">
                <view>配送服务</view>
                <view>快递 包邮</view>
            </view>
            <block wx:if="{{order.status==300 || order.status==400}}">
                <view class="goods_count">
                    <view>快递公司</view>
                    <view>{{order.shipper?order.shipper:'暂无'}}</view>
                </view>
                <view class="goods_count">
                    <view>快递单号</view>
                    <view>{{order.trackingNumber?order.trackingNumber:"暂无"}}</view>
                </view>
            </block>
            <view class="goods_remark">
                <view>订单备注</view>
                <input value="{{remark}}" type="text" placeholder="请填写订单备注" />
            </view>
        </view>
        <view class="pay_btm">
            <van-submit-bar price="{{ (goods.price * num * 100) + serviceFee - discount*100}}" button-text="提交订单" bind:submit="onSubmit" />
        </view>
    </view>
</scroll-view>
<view class="btn">
    <view class="status" wx:if="{{order.status == 200}}">待发货</view>
    <view class="status" wx:elif="{{order.status == 300}}">待收货</view>
    <view class="status" wx:elif="{{order.status == 700}}">待评价</view>
    <view class="status" wx:elif="{{order.status == 800}}">已完成</view>
    <view class="status" wx:elif="{{order.status == 500}}">退款中</view>
    <view class="status" wx:elif="{{order.status == 600}}">已退款</view>
    <view class="refund" wx:if="{{order.status == 200 || order.status == 300 || order.status == 700}}" bind:tap="refund">
        申请退款
    </view>
    <view class="refund" wx:if="{{order.status == 500}}">已申请退款</view>
</view>