<!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/orderlist.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>
        </div>
        <div class="wrap clear">
            <!--左侧导航-->
            <template th:replace="user-center/components/tableft"></template>
            <div class="right">
                <div class="order-header">
                    <div class="header-tp">
                        <div class="header-tabs">
                            <div class="tabs-item"  v-for="(item, index) in orderTabBar" :key="index" @click="changeOrderFn(index,item.state)" :class="orderTabBarIndex == index ? 'active':''">
                                <a href="javascript: void(0);">{{item.text}}(<span>{{item.bages | NumBadge}}</span>)</a>
                            </div>
                        </div>
                        <div class="header-ser">
                            <a class="btn-server" href="/help/1019.html" target="_blank">联系客服</a>
                        </div>
                    </div>
                    <div class="header-bt">
                        <div class="header-search">
                            <div class="search">
                                <span class="label">订单编号:</span>
                                <input type="text" v-model="listQuery.searchNo" placeholder="输入订单编号进行搜索" class="search-input">
                            </div>
                            <div class="search-time">
                                <span class="label">下单时间:</span>
                                <div class="search-main">
                                    <div class="search-input">
                                        <input type="text" v-model="listQuery.beginTime" placeholder="订单开始时间" class="input">
                                        <i class="icon mIcon"></i>
                                    </div>
                                    <span class="line">至</span>
                                    <div class="search-input">
                                        <input type="text" v-model="listQuery.endTime" placeholder="订单结束时间" class="input">
                                        <i class="icon mIcon"></i>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="header-button">
                            <a class="btn-server" href="javascript: void(0);" target="_blank">搜索</a>
                        </div>
                    </div>
                </div>
                <!--loading-->
                <div v-if="isRequset" class="loading">
                    <img src="/img/base/loading.gif">
                </div>
                <div class="order-container clear" v-else>
                    <!--数据为空-->
                    <div class="section" v-if="orderList.length > 0">
                        <div class="user-main order" v-for="(order, index) in orderList" :key="index">
                            <div class="order-title">
                                <span class="bag" v-if="order.orderSubmitType == 3 || order.orderSubmitType == 4">自主</span>
                                <span class="bag" v-if="order.orderSubmitType == 0 || order.orderSubmitType == 1 || order.orderSubmitType == 2">协销</span>
                                <div class="title-name">
                                    <p>订单编号(标识)：<span>{{order.orderNo}}({{order.orderID}})</span></p>
                                    <p class="state">{{order.status | stateExp}}</p>
                                </div>
                                <div class="title-type" v-if="order.secondHandOrderFlag == 1"></div>
                                <div class="title-time">
                                    <p>{{order.orderTime}}</p>
                                </div>
                            </div>
                            <div class="order-content">
                                <div class="order-item">
                                    <p>税费: <span>￥{{order.expensesOfTaxation | NumFormat}}</span> </p>
                                    <p v-if="order.freePostFlag == '0'">运费:<span>包邮</span> </p>
                                    <p v-if="order.freePostFlag == '-1'">运费:<span>到付</span> </p>
                                    <p v-if="order.freePostFlag == '1'">运费:<span>￥{{order.freight | NumFormat}}</span> </p>
                                    <p v-if="order.discountFee!=0">经理折扣:<span>￥{{order.discountFee | NumFormat}}</span> </p>
                                    <p>促销满减:<span>￥{{order.payTotalFee | NumFormat}}</span> </p>
                                    <p>赠品数:10</p>
                                </div>
                                <div class="order-item">
                                    <p>订单总额:<span class="red">￥{{order.payTotalFee | NumFormat}}</span> </p>
                                </div>
                                <div class="order-item">
                                    <p>应付总额:<span class="red">￥{{order.payableAmount | NumFormat}}</span> </p>
                                    <p>已支付:<span class="red">￥{{order.receiptAmount | NumFormat}}</span> </p>
                                    <p>待付金额:<span class="red">￥{{order.pendingPayments | NumFormat}}</span> </p>
                                </div>
                                <div class="order-botton">
                                    <a class="btn cancel" href="javascript: void(0);" v-if="['0','111'].indexOf(order.status)!=-1" @click="hanldCancelOrderFn(order.orderID)">取消订单</a>
                                    <a class="btn primary" href="javascript: void(0);" v-if="['0'].indexOf(order.status)!=-1"  @click="hanldConfirmOrderFn(order.orderID)">确认订单</a>
                                    <a class="btn cancel" href="javascript: void(0);" v-if="['6'].indexOf(order.status)!=-1" @click="hanldDeleteOrderFn(order.orderID)">删除订单</a>
                            <!--    <a class="btn cancel" href="javascript: void(0);"  v-if="['4','5','12','13','33','22','23','32','77'].indexOf(order.status)!=-1" @click="hanldQueryExpressFn()">查看物流</a>-->
                                    <a class="btn primary" href="javascript: void(0);"  v-if="['33'].indexOf(order.status)!=-1" @click="hanldReceivingOrderFn(order.orderID)">确认收货</a>
                                    <a class="btn cancel" href="javascript: void(0);" @click="hanldDetilsOrderFn(order.orderID)">订单详情</a>
                                    <a class="btn primary" href="javascript: void(0);" v-if="['11','12','13','21','22','23','111'].indexOf(order.status)!=-1" @click="hanldPayOrderFn(order.orderID)">支付订单</a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div v-else class="empty">
                        <img src="/img/common/empty.png">
                        <div class="msg"><p>暂无数据</p></div>
                    </div>
                </div>
                <!--分页-->
                <div v-if="(!isPC) && noMore" class="noMore">---- 没有更多了 ----</div>
                <div v-if="isPC && pageTotal>1" class="pageWrap clear">
                    <a v-if="listQuery.pageNum>1" class="prev" @click="toPagination(listQuery.pageNum*1-1)" href="javascript:void(0);"></a>
                    <template v-for="n in showPageBtn">
                        <a v-if="n" :class="{'on':(n==listQuery.pageNum)}" @click="toPagination(n)" href="javascript:void(0);" v-text="n"></a>
                        <span v-else>···</span>
                    </template>
                    <a v-if="listQuery.pageNum<pageTotal" class="next" @click="toPagination(listQuery.pageNum*1+1)" href="javascript:void(0);"></a>
                    <span>共<b v-text="pageTotal>1?pageTotal:1"></b>页</span>
                    <span>跳至</span>
                    <input v-model="pageInput" @blur="checkNum()"/>
                    <span>页</span>&nbsp;
                    <a class="btn" href="javascript:void(0);" @click="toPagination(pageInput)">点击跳转</a>
                </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="">不抵扣,继续付款</div>
                <div class="btn btn-confim" @click="">抵扣,继续付款</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="">不抵扣,继续付款</div>
                <div class="btn btn-confim" @click="">抵扣</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>订单标识：<input id="paymentTransOrderID"  readonly="readonly"><span class="copy" id="copyOrderBtn">复制</span></p>
                    <p class="red">请在转账备注中填写上述订单标识，方便财务快速审核，提高发货速度</p>
                </div>
            </div>
            <div class="popup-button">
                <div class="btn btn-onlinePayConfim">确定</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/list.js(v=${version})}"></script>
</body>
</html>
