<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="https://www.thymeleaf.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="https://www.thymeleaf.org ">
<head>
    <title>采美365网--医疗美容生活美容正品采购平台</title>
    <template th:replace="components/head-link"></template>
    <link th:href="@{/css/base/center.css(v=${version})}" rel="stylesheet" type="text/css">
    <link th:href="@{/css/user-center/order/detail.css(v=${version})}" rel="stylesheet" type="text/css">

</head>
<body>
<!-- 引用头部 -->
<template th:replace="components/header"></template>

<div id="orderPage">
    <div class="navLayout" v-cloak>
        <div v-if="isPC" class="crumbs">
            <span>我的交易</span>
            <span>&gt;</span>
            <span>我的订单</span>
            <span>&gt;</span>
            <span>订单详情</span>
        </div>
        <div class="wrap clear">
            <!--左侧导航-->
            <template th:replace="user-center/components/tableft"></template>
            <div class="right">
                <!--loading-->
                <div v-if="isRequset" class="loading">
                    <img src="/img/base/loading.gif">
                </div>
                <div class="order-container clear" v-else>
                    <!--数据为空-->
                    <div class="section">
                        <div class="section-info shadow">
                            <div class="order-title">
                                <span class="bag" v-if="orderInfo.orderSubmitType == 3 || orderInfo.orderSubmitType == 4">协销</span>
                                <span class="bag" v-if="orderInfo.orderSubmitType == 0 || orderInfo.orderSubmitType == 1 || orderInfo.orderSubmitType == 2">自主</span>
                                <div class="title-name">
                                    <p>订单编号：<span>{{orderInfo.orderNo}}</span></p>
                                    <p class="state">{{orderInfo.status | stateExp}}</p>
                                </div>
                                <div class="title-type" v-if="orderInfo.secondHandOrderFlag == 1"></div>
                                <div class="title-time">
                                    <p>下单时间：<span>{{orderInfo.orderTime}}</span></p>
                                </div>
                            </div>
                            <div class="order-content">
                                <div class="order-item">
                                    <p class="org">订单标识：<span class="org">{{orderIdentificationId}}</span></p>
                                    <p class="copy" @click="copyOrderBtnSubmitFn">复制</p>
                                </div>
                                <div class="order-item">
                                    <p>收货人：<span class="none">{{userInfo.shouHuoRen}}</span> </p>
                                    <p>电话：<span class="none">{{userInfo.mobile}}</span> </p>
                                    <p class="address">地址：<span class="none">{{userInfo.province}}{{userInfo.city}}{{userInfo.town}}{{userInfo.address}}</span> </p>
                                </div>
                                <div class="order-item">
                                    <p>订单总额：<span class="red">￥{{orderInfo.payTotalFee | NumFormat}}</span> </p>
                                    <p>应付总额：
                                        <span class="red">￥{{orderInfo.payableAmount | NumFormat}}</span>
                                        <span v-if="orderInfo.balancePayFee>0">(账户余额抵扣：￥{{orderInfo.balancePayFee | NumFormat}})</span>
                                    </p>
                                    <p>已支付：<span class="red">￥{{orderInfo.receiptAmount | NumFormat}}</span> </p>
                                    <p>待付金额：<span class="red">￥{{orderInfo.pendingPayments | NumFormat}}</span> </p>
                                </div>
                                <div class="order-item">
                                    <p v-if="orderInfo.freePostFlag == '0'">运费：<span class="none">包邮</span> </p>
                                    <p v-if="orderInfo.freePostFlag == '-1'">运费：<span class="none">到付</span> </p>
                                    <p v-if="orderInfo.freePostFlag == '1'">运费：<span class="none">￥{{orderInfo.freight | NumFormat}}</span> </p>
                                    <p v-if="orderInfo.discountFee!=0">经理折扣：<span class="none">￥{{orderInfo.discountFee | NumFormat}}</span> </p>
                                    <p>促销满减：<span class="none">￥{{orderInfo.promotionFullReduction | NumFormat}}</span> </p>
                                    <p>赠品数：<span class="none">{{orderInfo.presentCount}}</span></p>
                                </div>
                            </div>
                        </div>
                        <div class="section-list shadow">
                            <div class="section-shopinfo" v-for="(shop, index) in shopOrderList" :key="index">
                                <div class="title">
                                    <img :src="shop.shopLogo" alt="" class="logo">
                                    <p class="name">{{shop.shopName}}</p>
                                    <!--店铺促销-->
                                    <div v-if="shop.shopPromotion" class="priceTag">
                                        <i @click="toggleThisLadder($event)" class="tag icon mIcon" v-text="shop.shopPromotion.name"></i>
                                        <div class="promotion mFixed">
                                            <div>
                                                <p class="t">
                                                    <em v-if="shop.shopPromotion.mode==2">{{shop.shopPromotion.name+'，满 ¥'+toFloat(shop.shopPromotion.touchPrice)+' 减 ¥'+toFloat(shop.shopPromotion.reducedPrice)}}</em>
                                                    <em v-if="shop.shopPromotion.mode==3">{{shop.shopPromotion.name+'，满 ¥'+toFloat(shop.shopPromotion.touchPrice)+' 赠送商品'}}</em>
                                                </p>
                                                <p>促销时间：<em v-if="shop.shopPromotion.status==1">不限时</em><em v-else>{{shop.shopPromotion.beginTime.substr(0,10)+' ~ '+shop.shopPromotion.endTime.substr(0,10)}}</em></p>
                                                <p class="c"><a class="close" @click="hideThisLadder($event)" href="JavaScript:void(0);">了解</a></p>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="product">
                                    <div class="section-prosinfo" v-for="(pros, pIndex) in shop.orderProductList" :key="pIndex">
                                        <div class="product-t clear">
                                            <div class="image">
                                                <img :src="pros.productImage" alt="">
                                                <span v-if="pros.productType==2||pros.productType==1" class="tip">赠品</span>
                                            </div>
                                            <div class="text">
                                                <p class="tit">{{pros.name}}</p>
                                                <div class="info">
                                                    <p v-if="pros.productCategory != 2">规格：<span class="none">{{pros.productUnit ? pros.productUnit : ''}}</span> </p>
                                                    <p>数量：<span class="none">{{pros.num}}</span> </p>
                                                    <p>单价：<span class="none">￥{{pros.price | NumFormat}}</span></p>
                                                    <p>税率：<span class="none">{{pros.taxRate}}%</span></p>
                                                    <p>折扣：<span class="none">{{pros.discount == null ? '0' : pros.discount}}%</span></p>
                                                    <p>折后单价：<span class="none">￥{{pros.discountPrice | NumFormat}}</span></p>
                                                    <!-- 促销活动 -->
                                                    <div v-if="pros.productPromotion && pros.productPromotion.type !=3" class="priceTag">
                                                        <i v-if="pros.productPromotion.type==1 && pros.productPromotion.mode==1" @click="toggleThisLadder($event)" class="tag icon mIcon" v-text="pros.productPromotion.name+'：¥'+toFloat(pros.productPromotion.touchPrice)"></i>
                                                        <i v-else class="tag icon mIcon" @click="toggleThisLadder($event)" v-text="pros.productPromotion?pros.productPromotion.name:''"></i>
                                                        <div class="promotion mFixed">
                                                            <div>
                                                                <p class="t">
                                                                    <em v-if="pros.productPromotion.type==1 && pros.productPromotion.mode==1">{{pros.productPromotion.name+'：¥'+toFloat(pros.productPromotion.touchPrice)}}</em>
                                                                    <em v-if="pros.productPromotion.mode==2">{{pros.productPromotion.name+'，满 ¥'+toFloat(pros.productPromotion.touchPrice)+' 减 ¥'+toFloat(pros.productPromotion.reducedPrice)}}</em>
                                                                    <em v-if="pros.productPromotion.mode==3">{{pros.productPromotion.name+'，满 ¥'+toFloat(pros.productPromotion.touchPrice)+' 赠送商品'}}</em>
                                                                </p>
                                                                <p>促销时间：<em v-if="pros.productPromotion.status==1">不限时</em><em v-else>{{pros.productPromotion.beginTime.substr(0,10)+' ~ '+pros.productPromotion.endTime.substr(0,10)}}</em></p>
                                                                <p class="c"><a class="close" @click="hideThisLadder($event)" href="JavaScript:void(0);">了解</a></p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="price">
                                                    <p>合计: <span class="red">￥{{pros.totalFee | NumFormat}}</span></p>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="shopinfo-bott clear">
                                    <div class="bott-top">
                                        <div class="count" :class="shop.promotionFullReduction == 0 ? 'none' : ''">共<span class="red">{{shop.itemCount}}</span>件商品</div>
                                        <div class="total">
                                            <p class="sum-none" v-if="shop.promotionFullReduction>0">
                                                <span class="money-sign">￥</span>
                                                <span class="money">{{ (shop.totalAmount+shop.promotionFullReduction) | NumFormat }}</span>
                                                <span class="money-reduced">减<span>￥{{ (shop.promotionFullReduction) | NumFormat}}</span></span>
                                            </p>
                                            <p :class="shop.promotionFullReduction == 0 ? 'none' : ''"><span>合计：</span><span class="red">￥{{shop.totalAmount | NumFormat}}</span></p>
                                        </div>
                                    </div>
                                    <div v-if="shop.note" class="bott-bot">
                                         <p>备注: <span>{{shop.note ? shop.note : '无'}}</span></p>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="section-invoice shadow">
                            <div class="tit"><p>发票信息</p><!--<i class="icon mIcon"></i>--></div>
                            <div class="invoice-content" v-if="orderInvoice&&orderInvoice.type==2">
                                <p>公司抬头: <span>{{orderInvoice.invoiceTitle}}</span></p>
                                <p>纳锐人识别号: <span>{{orderInvoice.corporationTaxNum}}}</span></p>
                                <p>注册地址: <span>{{orderInvoice.registeredAddress}}</span></p>
                                <p>注册电话: <span>{{orderInvoice.registeredPhone}}</span></p>
                                <p>开户银行: <span>{{orderInvoice.openBank}}</span></p>
                                <p>银行账号: <span>{{orderInvoice.bankAccountNo}}</span></p>
                            </div>
                            <div class="invoice-none" v-else>
                                <p>不要发票</p>
                            </div>
                        </div>
                        <div class="section-payment shadow">
                            <div class="payment-transfer">
                                <div class="payment-transfer-main" id="paymentTransferMain">
                                    <div class="label"><P class="label-title"><i class="icon mIcon"></i>除了线上支付，您还可以通过直接转账的方式付款</P></div>
                                    <div class="label"><P class="label-t">转账信息</P></div>
                                    <div class="label">
                                        <P class="text">开户行：中信银行（深圳泰然支行）</P>
                                        <P class="text">银行卡号：6217 6803 0362 0897</P>
                                        <P class="text">户名：周仁声</P>
                                    </div>
                                    <div class="label">
                                        <P class="text-p">订单标识：<span class="red">{{orderIdentificationId}}</span><a href="javascript: void(0);" class="copy" @click="copyOrderBtnSubmitFn">复制</a></P>
                                    </div>
                                    <div class="label"><P class="label-t">特别注意</P></div>
                                    <div class="label"><P class="label-c">请在转账备注中填写上述订单标识，方便财务快速审核，提高发货速度</P></div>
                                </div>
                            </div>
                        </div>
                        <div class="section-paymentlist shadow" v-if='orderInfo.receiptAmount>0' >
                            <div class="record-title mfbt">
                                <div class="record-title-l">支付记录</div>
                                <div class="record-title-r">
                                    已支付：<span class="red">￥{{ orderInfo.receiptAmount != null ? orderInfo.receiptAmount.toFixed(2) : '0.00'}}</span>
                                </div>
                            </div>
                            <div class="record-list" v-if="discernReceiptList.length>0">
                                <div class="record-item" v-for="(item,index) in discernReceiptList" :key="index">
                                    <div class="item-time mm">￥{{item.associateAmount | NumFormat}}</div>
                                    <div class="item-time pp">{{item.payType}}</div>
                                    <div class="item-time tt">{{item.receiptDate}}</div>
                                </div>
                            </div>
                            <div class="record-empty" v-else>
                                <p>暂无支付记录</p>
                            </div>
                        </div>
                        <div class="section-paymentlist shadow" v-if='orderInfo.returnedPurchaseFee != null'>
                            <div class="record-title">
                                <div class="record-title-l">退款记录</div>
                                <div class="record-title-r">
                                    已退款：<span class="red">￥{{ orderInfo.returnedPurchaseFee != null ? orderInfo.returnedPurchaseFee.toFixed(2) : '0.00'}}</span>
                                </div>
                            </div>
                            <div class="record-list" v-if="returnedPurchaseList.length>0">
                                <div class="record-item" v-for="(item,index) in returnedPurchaseList" :key="index">
                                    <div class="item-rec mm">{{item.returnedWay =='4' ? '无支付无退款' : '￥'+item.refundFee.toFixed(2)}}</div>
                                    <div class="item-rec tt">{{item.confirmReturnTime}}</div>
                                </div>
                            </div>
                            <div class="record-empty" v-else>
                                <p>暂无退款记录</p>
                            </div>
                        </div>
                        <div class="section-botton shadow" :class="isFiexd ? 'fiexd' : 'float'">
                            <div class="inner">
                                <a class="btn primary" href="javascript: void(0);" v-if="['11','12','13','21','22','23','111'].indexOf(orderInfo.status)!=-1" @click="hanldPayOrderFn()">支付订单</a>
                                <a class="btn cancel" href="javascript: void(0);" v-if="['0','111'].indexOf(orderInfo.status)!=-1" @click="hanldCancelOrderFn()">取消订单</a>
                                <a class="btn primary" href="javascript: void(0);" v-if="['0'].indexOf(orderInfo.status)!=-1"  @click="hanldConfirmOrderFn()">确认订单</a>
                                <a class="btn cancel" href="javascript: void(0);" v-if="['6'].indexOf(orderInfo.status)!=-1" @click="hanldDeleteOrderFn()">删除订单</a>
                                <a class="btn cancel" href="javascript: void(0);"  v-if="['4','5','12','13','33','22','23','32','77'].indexOf(orderInfo.status)!=-1" @click="hanldQueryExpressFn()">查看物流</a>
                                <a class="btn primary" href="javascript: void(0);"  v-if="['33'].indexOf(orderInfo.status)!=-1" @click="hanldReceivingOrderFn()">确认收货</a>
                                <div class="shopinfo" v-if="['11','12','13','21','22','23','111'].indexOf(orderInfo.status)!=-1">
                                    <p class="price-total">待付金额：<span class="red">￥{{orderInfo.pendingPayments | NumFormat}}</span> </p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 引入底部 -->
<template th:replace="components/footer"></template>
<template th:replace="components/foot-link"></template>
<script charset="utf-8" type="text/javascript" th:src="@{/js/center.js(v=${version})}"></script>
<script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/order.service.js(v=${version})}"></script>
<script charset="utf-8" type="text/javascript" th:src="@{/js/user-center/order/detail.js(v=${version})}"></script>
</body>
</html>
