<!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/user-center/order/detail.css(v=${version})}" rel="stylesheet" type="text/css">

</head>
<body>
<!-- 引用头部 -->
<template th:replace="components/header"></template>
<div id="orderPage" v-cloak>
    <div class="navLayout" th:object="${pageInfo}">
        <div 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>{{orderInfo.orderTime}}</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>地址:<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 class="none" 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>税费: <span class="none">￥{{orderInfo.expensesOfTaxation | NumFormat}}</span> </p>
                                    <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.payTotalFee | 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 class="activity">
                                        <div class="tit"><p>店铺满减</p><i class="icon mIcon"></i></div>
                                        <div class="action">
                                            <p class="org">全店铺:满1000.00,减500.00</p>
                                            <p>促销时间:不限时</p>
                                            <p class="btn"><span>了解</span></p>
                                        </div>
                                    </div>
                                </div>
                                <div class="product">
                                    <div class="section-prosinfo" v-for="(pros, pIndex) in shop.orderProductList" :key="pIndex">
                                        <div class="product-t">
                                            <div class="image">
                                                <img :src="pros.productImage" alt="">
                                                <span class="tip">赠品</span>
                                            </div>
                                            <div class="text">
                                                <p class="tit">{{pros.name}}</p>
                                                <div class="info">
                                                    <div class="info-l">
                                                        <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>
                                                    </div>
                                                    <div class="info-r">
                                                        <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>
                                                    <div class="info-r">
                                                        <div class="activity">
                                                            <div class="tit">
                                                                <p>优惠价:￥<span>1200.00</span></p><i class="icon mIcon"></i></div>
                                                            <div class="action">
                                                                <p>促销时间:2020.6.28~2020.9.30</p>
                                                                <p class="btn"><span>了解</span></p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="product-b">
                                            <p>合计: <span class="red">￥{{pros.totalFee | NumFormat}}</span></p>
                                        </div>
                                    </div>
                                </div>
                                <div class="shopinfo-bott">
                                    <div class="bott-top">
                                        <p class="count">共计  <span class="red">{{shop.itemCount}}</span>商品</p>
                                        <p class="total">合计: <span class="red">￥{{shop.totalAmount | NumFormat}}</span></p>
                                    </div>
                                    <div class="bott-bot" v-if="shop.note!=''">
                                         <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" v-if="orderInvoice != null"></i></div>
                            <div class="invoice-none" v-if="orderInvoice != null">
                                <p>不开发票</p>
                            </div>
                            <div class="invoice-content" v-else>
                                <div class="invice-item">
                                    <p>公司抬头: <span>采美信息技术有限公司</span></p>
                                    <p>纳锐人识别号: <span>430527199206186615</span></p>
                                </div>
                                <div class="invice-item">
                                    <p>注册地址: <span>广东省深圳市福田区上步</span></p>
                                    <p>注册电话: <span>0755-2190777</span></p>
                                </div>
                                <div class="invice-item">
                                    <p>开户银行: <span>农业银行</span></p>
                                    <p>银行账号: <span>6228481456743154778</span></p>
                                </div>
                            </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">除了线上支付，您还可以通过直接转账的方式付款</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">订单标识：{{orderIdentificationId}}</P>
                                        <P class="text-p"><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">
                                <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>
                    <div class="section-botton shadow">
                        <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>
                </div>
            </div>
        </div>
    </div>
    <!--余额可抵扣部分-->
    <div class="popup" v-if="modelType==1">
        <div class="popup-layer bran">
            <div class="popup-title"> <p>提示</p> <i class="popup-close layui-layer-ico"></i></div>
            <div class="popup-content">
                <p>您有采美余额<span id="partMonery">￥200.00</span>暂未使用，是否需要抵扣订单？ 抵扣后您只需再支付<span id="partAmont">￥200.00</span></p>
            </div>
            <div class="popup-button">
                <div class="btn btn-cancel" @click="hanldCancelConfirm">不抵扣,继续付款</div>
                <div class="btn btn-confim" @click="hanldPaymentConfirm(1)">抵扣,继续付款</div>
            </div>
        </div>
    </div>
    <!--余额可抵扣全部-->
    <div class="popup" v-if="modelType==2">
        <div class="popup-layer bran">
            <div class="popup-title"> <p>提示</p> <i class="popup-close layui-layer-ico"></i></div>
            <div class="popup-content">
                <p>您有采美余额<span>￥200.00</span>暂未使用，是否需要抵扣订单？ 抵扣后订单支付完成</p>
            </div>
            <div class="popup-button">
                <div class="btn btn-cancel" @click="hanldCancelConfirm">不抵扣,继续付款</div>
                <div class="btn btn-confim" @click="hanldPaymentConfirm(2)">抵扣</div>
            </div>
        </div>
    </div>
    <!--线下转账提示-->
    <div class="popup" v-if="modelType==3">
        <div class="popup-layer bran">
            <div class="popup-title"> <p>提示</p> <i class="popup-close layui-layer-ico"></i></div>
            <div class="popup-content">
                <p>您已通过线下转账的方式支付了订单部分款项，剩余款项依然需要使用线下转账方式，给您带来的不便敬请谅解</p>
                <p>待付金额: <span id="onlineMoney"></span></p>
                <p><span class="down" id="showPpopupMsg">查看转账信息</span></p>
                <div class="popup-message">
                    <p>开户行：中信银行（深圳泰然支行）</p>
                    <p>银行卡号：6217 6803 0362 0897</p>
                    <p>户名：周仁声</p>
                    <p>订单标识：{{orderIdentificationId}}}<span class="copy" id="copyOrderBtn" @click="copyOrderBtnSubmitFn">复制</span></p>
                    <p class="red">请在转账备注中填写上述订单标识，方便财务快速审核，提高发货速度</p>
                </div>
            </div>
            <div class="popup-button">
                <div class="btn btn-onlinePayConfim" @click="hidePaymentConfirm">确定</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/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>
