panhui %!s(int64=5) %!d(string=hai) anos
pai
achega
81715bdcaa

+ 1 - 1
package.json

@@ -38,7 +38,7 @@
     "@megalo/api": "latest",
     "@megalo/vhtml-plugin": "latest",
     "@vant/weapp": "^1.4.4",
-    "date-fns": "^2.15.0",
+    "date-fns": "^2.16.1",
     "megalo": "latest",
     "octoparse": "^0.4.2",
     "style-resources-loader": "^1.3.3",

+ 213 - 145
project.config.json

@@ -1,146 +1,214 @@
 {
-	"description": "项目配置文件",
-	"packOptions": {
-		"ignore": []
-	},
-	"setting": {
-		"urlCheck": false,
-		"es6": true,
-		"enhance": false,
-		"postcss": true,
-		"preloadBackgroundData": false,
-		"minified": true,
-		"newFeature": true,
-		"coverView": true,
-		"autoAudits": false,
-		"showShadowRootInWxmlPanel": true,
-		"scopeDataCheck": false,
-		"checkInvalidKey": true,
-		"checkSiteMap": true,
-		"uploadWithSourceMap": true,
-		"babelSetting": {
-			"ignore": [],
-			"disablePlugins": [],
-			"outputPath": ""
-		}
-	},
-	"compileType": "miniprogram",
-	"libVersion": "2.11.0",
-	"appid": "wx31f7e5e3081d6927",
-	"projectname": "%E6%8D%B7%E9%80%94JETOUR",
-	"cloudfunctionTemplateRoot": "",
-	"watchOptions": {
-		"ignore": []
-	},
-	"debugOptions": {
-		"hidedInDevtools": []
-	},
-	"scripts": {},
-	"simulatorType": "wechat",
-	"simulatorPluginLibVersion": {},
-	"condition": {
-		"search": {
-			"current": -1,
-			"list": []
-		},
-		"conversation": {
-			"current": -1,
-			"list": []
-		},
-		"plugin": {
-			"current": -1,
-			"list": []
-		},
-		"game": {
-			"list": []
-		},
-		"gamePlugin": {
-			"current": -1,
-			"list": []
-		},
-		"miniprogram": {
-			"current": -1,
-			"list": [
-				{
-					"id": -1,
-					"name": "我的",
-					"pathName": "pages/my",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "购车",
-					"pathName": "pages/car",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "途享",
-					"pathName": "pages/tuxiang",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "注册",
-					"pathName": "pages/register",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "登录",
-					"pathName": "pages/login",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "试驾",
-					"pathName": "pages/testDrive",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "选择城市",
-					"pathName": "pages/cityChoose",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "经销商",
-					"pathName": "pages/dealer",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "商品详情",
-					"pathName": "pages/detail",
-					"query": "id=1568948578421550",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "计算器",
-					"pathName": "pages/calculator",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "提交订单",
-					"pathName": "pages/submit",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "添加购车人",
-					"pathName": "pages/addressEdit",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "视频",
-					"pathName": "pages/video",
-					"scene": null
-				}
-			]
-		}
-	}
-}
+    "description": "项目配置文件",
+    "packOptions": {
+        "ignore": []
+    },
+    "setting": {
+        "urlCheck": false,
+        "es6": true,
+        "enhance": false,
+        "postcss": true,
+        "preloadBackgroundData": false,
+        "minified": true,
+        "newFeature": true,
+        "coverView": true,
+        "autoAudits": false,
+        "showShadowRootInWxmlPanel": true,
+        "scopeDataCheck": false,
+        "checkInvalidKey": true,
+        "checkSiteMap": true,
+        "uploadWithSourceMap": true,
+        "babelSetting": {
+            "ignore": [],
+            "disablePlugins": [],
+            "outputPath": ""
+        }
+    },
+    "compileType": "miniprogram",
+    "libVersion": "2.11.0",
+    "appid": "wx31f7e5e3081d6927",
+    "projectname": "%E6%8D%B7%E9%80%94JETOUR",
+    "cloudfunctionTemplateRoot": "",
+    "watchOptions": {
+        "ignore": []
+    },
+    "debugOptions": {
+        "hidedInDevtools": []
+    },
+    "scripts": {},
+    "simulatorType": "wechat",
+    "simulatorPluginLibVersion": {},
+    "condition": {
+        "search": {
+            "current": -1,
+            "list": []
+        },
+        "conversation": {
+            "current": -1,
+            "list": []
+        },
+        "plugin": {
+            "current": -1,
+            "list": []
+        },
+        "game": {
+            "list": []
+        },
+        "gamePlugin": {
+            "current": -1,
+            "list": []
+        },
+        "miniprogram": {
+            "current": -1,
+            "list": [
+                {
+                    "id": -1,
+                    "name": "我的",
+                    "pathName": "pages/my",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "购车",
+                    "pathName": "pages/car",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "途享",
+                    "pathName": "pages/tuxiang",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "注册",
+                    "pathName": "pages/register",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "登录",
+                    "pathName": "pages/login",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "试驾",
+                    "pathName": "pages/testDrive",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "选择城市",
+                    "pathName": "pages/cityChoose",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "经销商",
+                    "pathName": "pages/dealer",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "商品详情",
+                    "pathName": "pages/detail",
+                    "query": "id=1568948578421550",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "计算器",
+                    "pathName": "pages/calculator",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "提交订单",
+                    "pathName": "pages/submit",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "添加购车人",
+                    "pathName": "pages/addressEdit",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "视频",
+                    "pathName": "pages/video",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "其他订单列表",
+                    "pathName": "pages/order/orderList",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "订单列表",
+                    "pathName": "pages/order/orderListCoupe",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "其他订单详情",
+                    "pathName": "pages/order/orderDetailDefault",
+                    "query": "orderId=5083",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "其他订单退款详情",
+                    "pathName": "pages/order/backOrderDetailDefault",
+                    "query": "orderId=2042",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "发票信息",
+                    "pathName": "pages/order/invoiceDetail",
+                    "query": "orderId=5083",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "退订详情",
+                    "pathName": "pages/order/backOrderDetail",
+                    "query": "backOrderId=69",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "生产流程",
+                    "pathName": "pages/order/transparent",
+                    "query": "orderNo=732203855097495552",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "物流信息",
+                    "pathName": "pages/order/logistics",
+                    "query": "orderNo=710492836902076416",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "贷款信息",
+                    "pathName": "pages/order/information",
+                    "query": "url=http%3A//60.167.19.94%3A6060/open/mobileApi/member/login/quickLogin%3FquickLoginkey%3D758727841583071232",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "申请退款",
+                    "pathName": "pages/order/refundOrder",
+                    "query": "orderId=5083&money=9.90",
+                    "scene": null
+                }
+            ]
+        }
+    }
+}

+ 1 - 0
src/App.vue

@@ -39,6 +39,7 @@ export default {
                                     if (res.authSetting['scope.userInfo']) {
                                         wx.getUserInfo({
                                             success: e => {
+                                                this.$store.commit('setUserIcon', e.userInfo.avatarUrl);
                                                 this.$http
                                                     .post('/applets/dealuserinfo', {
                                                         ...e,

+ 1 - 1
src/components/OrderCard.vue

@@ -35,7 +35,7 @@
 
         <div class="totalMoney">订金: {{ depositPrice }}</div>
         <div class="btnList" v-if="isBack">
-            <van-button :color="$colors.prim" size="small" round @click.stop="toProgress">
+            <van-button :color="$colors.prim" size="small" round @click.stop="goDetail">
                 退订详情
             </van-button>
         </div>

+ 214 - 0
src/components/OrderCardDefault.vue

@@ -0,0 +1,214 @@
+<template>
+    <div class="orderCard" @click="goDetail">
+        <div class="top">
+            <span class="code">订单号: {{ info.orderCode }}</span>
+            <template>
+                <span class="status">{{ statusText }}</span>
+            </template>
+        </div>
+
+        <div class="carCenter" :key="item.id" v-for="item in orderSkus">
+            <van-image width="89" height="89" :src="item.skuImage" />
+            <div class="name">
+                <span class="type">[预售]</span>
+                <span>{{ item.skuName }}</span>
+            </div>
+            <div class="num">x{{ item.num }}</div>
+        </div>
+
+        <div class="totalMoney">{{ isBack ? `退款金额:${backPrice}` : `合计:${totalMoney}` }}</div>
+
+        <div class="btnList">
+            <template v-if="!isBack">
+                <template v-if="info.status === '1'">
+                    <van-button
+                        v-if="info.orderType !== '1'"
+                        size="small"
+                        round
+                        type="default"
+                        @click.stop="cancelOrder"
+                        >取消订单</van-button
+                    >
+                    <van-button
+                        v-if="info.presaleOrderCanPay"
+                        :color="$colors.prim"
+                        size="small"
+                        round
+                        @click.stop="toPay"
+                    >
+                        支付
+                    </van-button>
+                </template>
+                <template v-else-if="info.status === '2'">
+                    <van-button v-if="info.canRefund" size="small" round type="default" @click.stop="toRefundOrder"
+                        >申请退款</van-button
+                    >
+                </template>
+                <template v-else-if="info.status === '3'">
+                    <van-button size="small" round :color="$colors.prim" type="default" @click.stop="toCheckLogistics"
+                        >查看物流</van-button
+                    >
+                </template>
+                <template v-else-if="info.status === '4'">
+                    <van-button v-if="info.canReturn" size="small" round type="default" @click.stop="toReturnOrder"
+                        >申请退货</van-button
+                    >
+
+                    <van-button
+                        v-if="info.evaluationStatus === '0'"
+                        size="small"
+                        round
+                        :color="$colors.prim"
+                        type="default"
+                        @click.stop="toevaluation"
+                        >评价晒单</van-button
+                    >
+                    <van-button v-else size="small" round type="default" @click.stop="toevaluationDetail"
+                        >查看评价</van-button
+                    >
+
+                    <van-button v-if="info.canRefund" size="small" round type="default" @click.stop="toRefundOrder"
+                        >申请退款</van-button
+                    >
+                </template>
+            </template>
+            <template v-else>
+                <van-button
+                    v-if="['1', '4', '6', '7'].indexOf(info.status) !== -1"
+                    size="small"
+                    round
+                    type="default"
+                    @click.stop="toRefundOrder"
+                    >查看进度</van-button
+                >
+                <van-button
+                    v-if="['2', '3', '5', '8', '9'].indexOf(info.status) !== -1"
+                    size="small"
+                    round
+                    type="default"
+                    @click.stop="toRefundOrder"
+                    >查看结果</van-button
+                >
+                <van-button
+                    v-if="info.status === '6'"
+                    size="small"
+                    round
+                    type="default"
+                    :color="$colors.prim"
+                    @click.stop="toRefundOrder"
+                    >填写物流信息</van-button
+                >
+            </template>
+        </div>
+        <van-dialog id="van-dialog" />
+    </div>
+</template>
+
+<script>
+import Order from '../mixins/OrderDefault';
+export default {
+    props: ['info', 'isBack'],
+    mixins: [Order]
+};
+</script>
+
+<style lang="less">
+.orderCard {
+    background: #ffffff;
+    border: 1px solid #ebebeb;
+    border-radius: 5px;
+    box-shadow: 0 0 10px 2px #ebebeb;
+    padding: 16px 10px;
+}
+.btnList {
+    display: flex;
+    justify-content: flex-end;
+    margin-top: 5px;
+    ._van-button + ._van-button {
+        margin-left: 10px;
+    }
+}
+.top2 {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    flex-wrap: wrap;
+    padding-bottom: 5px;
+    .code {
+        font-size: 12px;
+        color: #959595;
+        line-height: 18px;
+    }
+
+    .status {
+        font-size: 13px;
+        color: #6e6e76;
+        line-height: 18px;
+    }
+}
+.top {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    flex-wrap: wrap;
+    padding-bottom: 16px;
+
+    .code {
+        font-size: 12px;
+        color: #959595;
+        line-height: 18px;
+    }
+
+    .status {
+        font-size: 13px;
+        color: #6e6e76;
+        line-height: 18px;
+    }
+
+    .warning {
+        width: 100%;
+        text-align: right;
+        font-size: 13px;
+        color: #e76850;
+        line-height: 18px;
+        margin-top: 9px;
+
+        &.yellow {
+            color: #e76850;
+        }
+    }
+}
+
+.carCenter {
+    display: flex;
+    .name {
+        flex-grow: 1;
+        margin-left: 20px;
+        max-width: 134px;
+        font-size: 14px;
+        color: #333333;
+        line-height: 18px;
+    }
+
+    .num {
+        font-size: 12px;
+        color: #868686;
+        line-height: 18px;
+        flex-grow: 1;
+        text-align: right;
+    }
+}
+
+.totalMoney {
+    font-size: 18px;
+    color: #333333;
+    line-height: 35px;
+    text-align: right;
+}
+
+.dialog-index--custom-class-name {
+    .dialog-index--van-dialog__confirm {
+        color: @prim !important;
+    }
+}
+</style>

+ 7 - 0
src/main.js

@@ -57,12 +57,19 @@ export default {
             'pages/addressEdit',
             'pages/addressList',
             'pages/order/orderListCoupe',
+            'pages/order/orderList',
             'pages/order/orderDetail',
+            'pages/order/backOrderDetail',
+            'pages/order/backOrderDetailDefault',
+            'pages/order/orderDetailDefault',
+            'pages/order/invoiceDetail',
             'pages/order/configurationinfo',
+            'pages/order/information',
             'pages/order/cancelOrder',
             'pages/order/backMoney',
             'pages/order/logistics',
             'pages/order/transparent',
+            'pages/order/refundOrder',
             'pages/video'
         ],
         tabBar: {

+ 51 - 31
src/mixins/Order.js

@@ -1,5 +1,6 @@
-import { statusMap } from '../utils/AppState';
+import { statusMap, reasonMap } from '../utils/AppState';
 import Dialog from '../vant/dialog/dialog';
+import { getFactory, getLogistics } from '../utils/SpecialApi';
 export default {
     data() {
         return {
@@ -19,6 +20,7 @@ export default {
                 '5': '线下审核通过',
                 '6': '线下审核不通过'
             },
+            reasonMap,
             isExamineTxt: { '0': ' ', '1': ' ' }
         };
     },
@@ -101,6 +103,19 @@ export default {
                 })
             );
         },
+        backPrice() {
+            if (this.backInfo && this.backInfo.backPrice) {
+                return (
+                    '¥' +
+                    (this.backInfo.backPrice || 0).toLocaleString(undefined, {
+                        minimumFractionDigits: 2,
+                        maximumFractionDigits: 2
+                    })
+                );
+            } else {
+                return '¥0';
+            }
+        },
         loanPrice() {
             return (
                 '¥' +
@@ -128,6 +143,20 @@ export default {
             } else {
                 return '';
             }
+        },
+        backReason() {
+            if (this.backInfo && this.backInfo.reason) {
+                return this.reasonMap[this.backInfo.reason];
+            } else {
+                return '';
+            }
+        },
+        account() {
+            if (this.backInfo && this.backInfo.account) {
+                return this.backInfo.account.substr(this.backInfo.account.length - 4);
+            } else {
+                return '';
+            }
         }
     },
     methods: {
@@ -146,49 +175,40 @@ export default {
         //提交资料
         discloseInformation() {
             console.log(this.info.url);
-            wx.downloadFile({
-                url: '	https://upage.imtt.qq.com/m_imtt/m_download_back/index_page.html', //仅为示例,并非真实的资源
-                success(res) {
-                    const filePath = res.tempFilePath;
-                    wx.openDocument({
-                        filePath: filePath,
-                        success: function(res) {
-                            console.log('打开文档成功');
-                        }
-                    });
-                }
-            });
+            if (this.info.url) {
+                const url = escape(this.info.url);
+                this.goNext('/pages/order/information?url=' + url);
+            }
         },
         //查看配置订单
         toConfigurationInfo() {
-            console.log('aaaa');
             this.goNext('/pages/order/configurationinfo?orderId=' + this.info.id);
         },
         goDetail() {
-            this.goNext('/pages/order/orderDetail?orderId=' + this.info.id);
+            if (!this.isBack) {
+                this.goNext('/pages/order/orderDetail?orderId=' + this.info.id);
+            } else {
+                this.goNext('/pages/order/backOrderDetail?backOrderId=' + this.backInfo.id);
+            }
         },
         //透明工厂
         transparentFactory() {
-            this.$http
-                .get('http://factory.jetour.com.cn/getDeliveryInfo?callback=?&orderNo=' + this.info.code)
-                .then(res => {
-                    if (res.data.length === 0) {
-                        this.showToastError('暂无信息,请耐心等待');
-                    } else {
-                        this.goNext('/pages/order/transparent?orderNo=' + this.info.code);
-                    }
+            getFactory(this.info.code)
+                .then(() => {
+                    this.goNext('/pages/order/transparent?orderNo=' + this.info.code);
+                })
+                .catch(() => {
+                    this.showToastError('暂无信息,请耐心等待');
                 });
         },
         //物流信息
         loadLogistics() {
-            this.$http
-                .get('http://factory.jetour.com.cn/getCarNodeInfo?callback=?&orderNo=' + this.info.code)
-                .then(res => {
-                    if (res.data.length === 0 || !res.data.listRecord || res.data.listRecord.length === 0) {
-                        this.showToastError('暂无信息,请耐心等待');
-                    } else {
-                        this.goNext('/pages/order/logistics?orderNo=' + this.info.code);
-                    }
+            getLogistics(this.info.code)
+                .then(() => {
+                    this.goNext('/pages/order/logistics?orderNo=' + this.info.code);
+                })
+                .catch(() => {
+                    this.showToastError('暂无信息,请耐心等待');
                 });
         },
         showFailReason() {

+ 109 - 0
src/mixins/OrderDefault.js

@@ -0,0 +1,109 @@
+import { orderStatus, backorderstatus } from '../utils/AppState';
+
+export default {
+    data() {
+        return {
+            orderStatus,
+            backorderstatus
+        };
+    },
+    computed: {
+        orderSkus() {
+            return this.info.orderSkus || [];
+        },
+        statusText() {
+            let text = '';
+            if (this.info.status && !this.isBack) {
+                text = this.orderStatus[this.info.status];
+
+                if (this.info.orderType == '5' && this.info.status == '2' && this.info.lotteryStatus == '0') {
+                    text = '待抽奖';
+                }
+            } else if (this.info.status) {
+                return this.backorderstatus[this.info.status];
+            }
+
+            return text;
+        },
+        backPrice() {
+            return '¥' + (this.info.backPrice || 0).toFixed(2);
+        },
+        totalMoney() {
+            return '¥' + (this.info.price || 0).toFixed(2);
+        },
+        freightPrice() {
+            return '¥' + (this.info.freightPrice || 0).toFixed(2);
+        },
+        concessionalRate() {
+            return '¥' + (this.info.concessionalRate || 0).toFixed(2);
+        },
+        originalPrice() {
+            return '¥' + (this.info.originalPrice || 0).toFixed(2);
+        },
+        modifyPrice() {
+            return '¥' + (this.info.modifyPrice || 0).toFixed(2);
+        },
+        presalePrice() {
+            return '¥' + (this.info.presalePrice || 0).toFixed(2);
+        },
+        presalePriceMul() {
+            return '¥' + ((this.info.price || 0) - (this.info.presalePrice || 0)).toFixed(2);
+        },
+        orderAttr() {
+            return this.info.orderAttr || {};
+        },
+        logisticsCompanyName() {
+            if (
+                this.info.logisticsTemplate &&
+                this.info.logisticsTemplate.logisticsCompany &&
+                this.info.logisticsTemplate.logisticsCompany.name
+            ) {
+                return this.info.logisticsTemplate.logisticsCompany.name;
+            } else {
+                return '';
+            }
+        },
+        payType() {
+            return this.info.payType == '0' ? '在线支付' : '货到付款';
+        },
+        invoiceInfo() {
+            if (this.orderAttr.invoiceType == '0') {
+                return '不开发票';
+            } else if (this.orderAttr.invoiceType == '1') {
+                return '增值税普票';
+            } else if (this.orderAttr.invoiceType == '2') {
+                return '增值税专票';
+            } else {
+                return '';
+            }
+        },
+        backOrderLogs() {
+            return this.info.backOrderLogs || [];
+        }
+    },
+    methods: {
+        goDetail() {
+            if (this.isBack) {
+                this.goNext(`/pages/order/backOrderDetailDefault?orderId=${this.info.id}`);
+            } else {
+                this.goNext(`/pages/order/orderDetailDefault?orderId=${this.info.id}`);
+            }
+        },
+        goSukDetail(skuId) {
+            this.goNext('/pages/detail?id=' + skuId);
+        },
+        toPay() {
+            let price = this.info.price;
+            if (this.info.orderType == '1') {
+                price = this.info.presalePrice;
+            }
+        },
+        cancelOrder() {},
+        toRefundOrder() {
+            this.goNext(`/pages/order/refundOrder?orderId=${this.info.id}&money=${this.info.price}`);
+        },
+        toCheckLogistics() {},
+        toevaluation() {},
+        toevaluationDetail() {},
+    }
+};

+ 1 - 0
src/pages/login.vue

@@ -57,6 +57,7 @@ export default {
                     if (this.$store.state.loginInfo && this.$store.state.loginInfo.hasUnionId) {
                         return Promise.resolve();
                     } else {
+                        this.$store.commit('setUserIcon', e.userInfo.avatarUrl);
                         return this.$http.post('/applets/dealuserinfo', {
                             ...e.detail,
                             userInfo: JSON.stringify(e.detail.userInfo)

+ 3 - 3
src/pages/my.vue

@@ -7,7 +7,7 @@
     <div>
         <div class="top" v-if="userInfo">
             <img
-                :src="userInfo.image ? userInfo.image : require('../static/imgs/user.png')"
+                :src="userInfo.image ? userInfo.image : userIcon || require('../static/imgs/user.png')"
                 class="avatar"
                 mode="aspectFill"
             />
@@ -23,7 +23,7 @@
                 <img src="../static/imgs/user1.png" class="icon" mode="widthFix" />
             </div>
         </div>
-        <div class="cell">
+        <div class="cell" @click="goNext('/pages/order/orderList')">
             <div class="title">其他订单</div>
             <div class="desc">
                 <img src="../static/imgs/user2.png" class="icon" mode="widthFix" />
@@ -54,7 +54,7 @@ export default {
         this.$store.dispatch('getUserInfo');
     },
     computed: {
-        ...mapState(['userInfo'])
+        ...mapState(['userInfo', 'userIcon'])
     },
     methods: {
         call() {

+ 354 - 0
src/pages/order/backOrderDetail.vue

@@ -0,0 +1,354 @@
+<config>
+{
+	'navigationBarTitleText': '退订详情',
+}
+</config>
+<template>
+    <div class="orderDetail">
+        <div class="order-item card">
+            <div class="orderTop">
+                <span>订单详情</span>
+                <span class="type">{{ info.payType == '1' ? '全款' : '贷款' }}</span>
+            </div>
+            <div class="orderCenter">
+                <van-image width="89" height="89" :src="car.mobileUrl" />
+                <div class="center">
+                    <div class="toname">{{ car.name }}</div>
+                    <div class="sub">
+                        {{ text }}
+                    </div>
+                </div>
+                <div class="money">
+                    <div class="toname">
+                        {{ totalPrice }}
+                    </div>
+                    <div class="sub">×1</div>
+                </div>
+            </div>
+            <div class="orderMoney">订金: {{ depositPrice }}</div>
+        </div>
+
+        <div class="card">
+            <div class="cardName">退订进度</div>
+            <div class="hr" style="margin-bottom:12px"></div>
+
+            <div class="progresses">
+                <div class="progress finish">
+                    <div class="time">
+                        <span>{{ createTime.day }}</span>
+                        <span>{{ createTime.time }}</span>
+                    </div>
+                    <div class="text">
+                        申请退订金审核 <span v-if="backInfo.name">({{ backInfo.name }})</span>
+                    </div>
+                </div>
+                <div name="one" class="progress" :class="[backInfo.status === '1' ? 'active' : 'finish']">
+                    <div class="time">
+                        <span>{{ createTime.day }}</span>
+                        <span>{{ createTime.time }}</span>
+                    </div>
+                    <div class="text">待审核</div>
+                </div>
+                <div name="two" class="progress active" v-if="backInfo.status === '3'">
+                    <div class="time">
+                        <span>{{ auditTime.day }}</span>
+                        <span>{{ auditTime.time }}</span>
+                    </div>
+                    <div class="text">审核不通过</div>
+                </div>
+                <template v-else-if="backInfo.status === '2'">
+                    <div name="two" class="progress" :class="[finishTime ? 'finish' : 'active']">
+                        <div class="time">
+                            <span>{{ auditTime.day }}</span>
+                            <span>{{ auditTime.time }}</span>
+                        </div>
+                        <div class="text">审核通过</div>
+                    </div>
+                    <div name="four" class="progress active" v-if="finishTime">
+                        <div class="time">
+                            <span>{{ finishTime.day }}</span>
+                            <span>{{ finishTime.time }}</span>
+                        </div>
+                        <div class="text">已退款</div>
+                    </div>
+                </template>
+                <template v-else-if="backInfo.status === '1'">
+                    <div name="two" class="progress">
+                        <div class="time">
+                            <span>{{ defaultTime.day }}</span>
+                            <span>{{ defaultTime.time }}</span>
+                        </div>
+                        <div class="text">审核通过/审核不通过</div>
+                    </div>
+                    <div name="four" class="progress">
+                        <div class="time">
+                            <span>{{ defaultTime.day }}</span>
+                            <span>{{ defaultTime.time }}</span>
+                        </div>
+                        <div class="text">已退款</div>
+                    </div>
+                </template>
+            </div>
+        </div>
+
+        <div class="card">
+            <div class="info-content" id="others">
+                <div class="info-item">
+                    <span class="name">退单编号:{{ backInfo.backCode }}</span>
+                </div>
+                <div class="info-item">
+                    <span class="name">订单编号:{{ backInfo.orderCode }} </span>
+                </div>
+                <div class="info-item">
+                    <span class="name">退订原因:{{ backReason }}</span>
+                </div>
+                <div class="info-item">
+                    <span class="name">退订金额:{{ backPrice }} </span>
+                </div>
+                <div class="info-item">
+                    <span class="name">退款账号:**** **** **** {{ account }}</span>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+import Order from '../../mixins/Order';
+import { changeDayTime } from '../../utils/Time';
+export default {
+    data() {
+        return {
+            info: {},
+            backInfo: {}
+        };
+    },
+    mixins: [Order],
+    computed: {
+        createTime() {
+            return changeDayTime(this.backInfo.createTime);
+        },
+        auditTime() {
+            return changeDayTime(this.backInfo.auditTime);
+        },
+        finishTime() {
+            if (this.backInfo.finishTime) {
+                return changeDayTime(this.backInfo.finishTime);
+            } else {
+                return '';
+            }
+        },
+        defaultTime() {
+            return changeDayTime('');
+        }
+    },
+    onShow() {
+        if (this.$mp.query.backOrderId) {
+            this.$http
+                .get('/applets/backorder/querycarbackorderinfo', {
+                    backOrderId: this.$mp.query.backOrderId
+                })
+                .then(res => {
+                    this.backInfo = res.data;
+                    this.info = res.data.carOrder;
+                    console.log(this.info);
+                });
+        }
+    }
+};
+</script>
+<style lang="less">
+page {
+    background: @bg2;
+}
+
+.btnList {
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    display: flex;
+
+    ._van-button {
+        flex-grow: 1;
+    }
+    .van-button {
+        height: 55px;
+    }
+}
+</style>
+<style lang="less" scoped>
+.orderDetail {
+    padding: 15px;
+}
+
+.btn {
+    height: 55px;
+}
+.card {
+    border: 1px solid #ebebeb;
+    border-radius: 5px;
+    background: #ffffff;
+    box-shadow: 0 0 10px 2px #ebebeb;
+    padding: 0 10px;
+}
+
+.hr {
+    height: 1px;
+    background: #ebebeb;
+}
+.card + .card {
+    margin-top: 10px;
+}
+
+.info-item {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+
+    .name {
+        font-size: 13px;
+        color: #6e6e76;
+        line-height: 30px;
+    }
+
+    .val {
+        font-size: 15px;
+        color: #333333;
+        line-height: 30px;
+    }
+}
+.info-content {
+    padding: 10px 0;
+}
+
+.orderTop {
+    display: flex;
+    justify-content: space-between;
+
+    font-size: 12px;
+    color: #969696;
+    line-height: 36px;
+
+    .type {
+        font-size: 13px;
+        color: #6e6e76;
+        line-height: 36px;
+    }
+}
+
+.orderCenter {
+    display: flex;
+    .center {
+        flex-grow: 1;
+        padding: 0 20px;
+    }
+    .toname {
+        font-size: 15px;
+        color: #000000;
+        line-height: 47px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+    }
+    .sub {
+        font-size: 12px;
+        color: #868686;
+        line-height: 18px;
+    }
+    .money {
+        flex-shrink: 0;
+        text-align: right;
+    }
+}
+
+.orderMoney {
+    font-size: 18px;
+    font-weight: bold;
+    color: #343434;
+    line-height: 35px;
+    text-align: right;
+    padding: 10px 0;
+}
+
+.cardName {
+    font-size: 13px;
+    font-weight: bold;
+    color: #343434;
+    line-height: 36px;
+}
+
+.progresses {
+    .progress {
+        display: flex;
+
+        &:not(:last-child) {
+            .time {
+                &::after {
+                    content: '';
+                    position: absolute;
+                    right: 25px;
+                    width: 1px;
+                    height: 100%;
+                    background: #c0c0c0;
+                    top: 10px;
+                }
+            }
+        }
+
+        &.active {
+            .time {
+                color: @prim;
+            }
+            .text {
+                color: @prim;
+                &::before {
+                    background: @prim;
+                }
+            }
+        }
+
+        &.finish {
+            .time {
+                color: #333333;
+            }
+            .text {
+                color: #333333;
+                &::before {
+                    background: #bfbfbf;
+                }
+            }
+        }
+
+        .time {
+            display: flex;
+            flex-direction: column;
+            align-items: flex-end;
+            font-size: 13px;
+            color: #b5b5b5;
+            line-height: 15px;
+            padding-right: 50px;
+            padding-bottom: 20px;
+            position: relative;
+        }
+
+        .text {
+            font-size: 13px;
+            color: #b5b5b5;
+            line-height: 15px;
+            flex-grow: 1;
+            position: relative;
+            &::before {
+                content: '';
+                position: absolute;
+                top: 2px;
+                left: -30px;
+                width: 10px;
+                height: 10px;
+                background: #e5e5e5;
+                border: 1px solid #ffffff;
+                border-radius: 50%;
+            }
+        }
+    }
+}
+</style>

+ 253 - 0
src/pages/order/backOrderDetailDefault.vue

@@ -0,0 +1,253 @@
+<config>
+{
+'navigationBarTitleText': '进度详情',
+}
+</config>
+<template>
+    <div class="detail">
+        <div class="card">
+            <div class="top">
+                <span class="code">订单号: {{ info.orderCode }}</span>
+                <span class="status">{{ statusText }}</span>
+            </div>
+
+            <div class="carCenter" :key="item.id" v-for="item in orderSkus">
+                <van-image width="89" height="89" :src="item.skuImage" />
+                <div class="name">
+                    {{ item.skuName }}
+                </div>
+                <div class="num">x{{ item.num }}</div>
+            </div>
+
+            <div class="money">退款金额:{{ backPrice }}</div>
+        </div>
+
+        <div class="card">
+            <div class="title">
+                退定进度
+            </div>
+
+            <div class="hr"></div>
+
+            <div class="time-item" v-for="(item, index) in backOrderLogs" :key="index">
+                <span class="time">{{ item.createTime }}</span>
+                <span class="name">{{ getLogTitle(item, info) }}</span>
+            </div>
+        </div>
+
+        <div class="card">
+            <div class="info-content">
+                <div class="info-item">退货原因 : {{ backReason }}</div>
+                <div class="info-item">
+                    退货方式 : 快递
+                </div>
+                <div class="info-item">凭据类型 : {{ proofType }}</div>
+                <div class="info-item">问题说明 : {{ info.desc }}</div>
+                <div class="info-item">
+                    <div>
+                        问题凭证 :
+                    </div>
+                    <div class="imgs">
+                        <van-image v-for="(item, index) in picsLists" :key="index" width="89" height="89" :src="item" />
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div class="btnList">
+            <van-button v-if="info.status === '6'" block @click="toCheckLogistics" square :color="$colors.prim"
+                >填写物流信息</van-button
+            >
+        </div>
+    </div>
+</template>
+<script>
+import Order from '../../mixins/OrderDefault';
+import { backReason, proofType } from '../../utils/AppState';
+export default {
+    mixins: [Order],
+    data() {
+        return {
+            info: {},
+            isBack: true
+        };
+    },
+    computed: {
+        backReason() {
+            if (this.info.reason) {
+                return backReason[this.info.reason];
+            } else {
+                return '';
+            }
+        },
+        proofType() {
+            if (this.info.credential) {
+                return proofType[this.info.credential];
+            } else {
+                return '';
+            }
+        },
+        picsLists() {
+            return this.info.picsLists || [];
+        }
+    },
+    onShow() {
+        this.$http
+            .get('/applets/querybackdetail', {
+                id: this.$mp.query.orderId
+            })
+            .then(res => {
+                this.info = res.data;
+            });
+    },
+    methods: {
+        getLogTitle(log, backOrder) {
+            switch (log.status) {
+                case '9':
+                    return '拒绝退货(操作:平台)';
+                case '8':
+                    return '退款' + backOrder.realBackPrice.toFixed(2) + '元成功(操作:平台)';
+                case '7':
+                    return '填写快递信息(操作:顾客)';
+                case '6':
+                    return '审核通过(操作:平台)';
+                case '5':
+                    return '拒绝退货(操作:平台)';
+                case '4':
+                    return '申请退货审核(操作:顾客)';
+                case '3':
+                    return '退款审核不通过(操作:平台)';
+                case '2':
+                    return '退款' + backOrder.backPrice.toFixed(2) + '元成功(操作:平台)';
+                case '1':
+                    return '申请退款审核(操作:顾客)';
+                default:
+                    return '';
+            }
+        }
+    }
+};
+</script>
+
+<style lang="less">
+page {
+    background: @bg2;
+}
+.card {
+    border: 1px solid #ebebeb;
+    border-radius: 5px;
+    background: #ffffff;
+    box-shadow: 0 0 10px 2px #ebebeb;
+    padding: 0 10px;
+}
+.btnList {
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    display: flex;
+
+    ._van-button {
+        flex-grow: 1;
+    }
+    .van-button {
+        height: 55px;
+    }
+}
+
+.detail {
+    padding: 15px;
+}
+.info-content {
+    padding: 10px 0;
+}
+.top {
+    display: flex;
+    justify-content: space-between;
+
+    .code {
+        font-size: 12px;
+        color: #959595;
+        line-height: 36px;
+    }
+
+    .status {
+        font-size: 13px;
+        font-weight: 400;
+        color: #0f9999;
+        line-height: 36px;
+    }
+}
+
+.carCenter {
+    padding: 5px 0;
+    display: flex;
+
+    .name {
+        flex-grow: 1;
+        font-size: 14px;
+        color: #333333;
+        line-height: 18px;
+        padding: 0 20px;
+    }
+
+    .num {
+        font-size: 12px;
+        color: #868686;
+        line-height: 18px;
+        text-align: right;
+    }
+}
+
+.money {
+    font-size: 18px;
+    font-weight: bold;
+    color: #333333;
+    line-height: 35px;
+    text-align: right;
+}
+
+.title {
+    font-size: 13px;
+    font-weight: bold;
+    color: #333333;
+    line-height: 36px;
+}
+.hr {
+    height: 1px;
+    background: #ebebeb;
+}
+.card + .card {
+    margin-top: 10px;
+}
+
+.time-item {
+    font-size: 13px;
+    color: #999999;
+    line-height: 15px;
+    padding: 10px 0;
+    .time {
+        margin-right: 35px;
+    }
+
+    &:last-child {
+        .name {
+            color: @prim;
+        }
+    }
+}
+
+.info-item {
+    font-size: 13px;
+    color: #6e6e76;
+    line-height: 30px;
+
+    .imgs {
+        display: flex;
+
+        ._van-image {
+            margin-left: 10px;
+            margin-top: 10px;
+        }
+    }
+}
+</style>

+ 23 - 0
src/pages/order/information.vue

@@ -0,0 +1,23 @@
+<config>
+{
+'navigationBarTitleText': '填写个人信息',
+'disableScroll': true
+}
+</config>
+<template>
+    <web-view :src="url"></web-view>
+</template>
+<script>
+export default {
+    data() {
+        return {
+            url: ''
+        };
+    },
+    onLoad() {
+        if (this.$mp.query.url) {
+            this.url = unescape(this.$mp.query.url);
+        }
+    }
+};
+</script>

+ 84 - 0
src/pages/order/invoiceDetail.vue

@@ -0,0 +1,84 @@
+<config>
+{
+'navigationBarTitleText': '发票信息',
+}
+</config>
+<template>
+    <van-cell-group>
+        <van-cell title="发票类型" :value="invoiceInfo"></van-cell>
+        <template v-if="info.invoiceType === '1'">
+            <van-cell title="发票抬头" :value="orderAttr.invoiceTitle"></van-cell>
+            <van-cell title="抬头类型" :value="invoiceTitleType"></van-cell>
+            <van-cell title="发票内容" :value="invoiceContent"></van-cell>
+            <van-cell
+                v-if="orderAttr.invoiceTitleType == '1'"
+                title="纳税人识别码"
+                :value="orderAttr.invoiceTaxid"
+            ></van-cell>
+        </template>
+        <template v-else-if="info.invoiceType === '2'">
+            <van-cell title="单位名称" :value="orderAttr.invoiceCompanyName"></van-cell>
+            <van-cell title="纳税人识别码" :value="orderAttr.invoiceTaxid"></van-cell>
+            <van-cell title="注册地址" :value="orderAttr.invoiceRegisterAddress"></van-cell>
+            <van-cell title="注册电话" :value="orderAttr.invoiceRegisterMobile"></van-cell>
+            <van-cell title="开户银行" :value="orderAttr.invoiceOpenBank"></van-cell>
+            <van-cell title="银行账户" :value="orderAttr.invoiceBankAccount"></van-cell>
+            <van-cell title="发票内容" :value="invoiceContent"></van-cell>
+        </template>
+    </van-cell-group>
+</template>
+<script>
+export default {
+    data() {
+        return {
+            info: {},
+            invoiceTitleTypes: { '1': '企业', '2': '个人' },
+            invoiceContents: { '1': '商品明细', '2': '商品类别' }
+        };
+    },
+    computed: {
+        invoiceInfo() {
+            if (this.orderAttr.invoiceType == '0') {
+                return '不开发票';
+            } else if (this.orderAttr.invoiceType == '1') {
+                return '增值税普票';
+            } else if (this.orderAttr.invoiceType == '2') {
+                return '增值税专票';
+            } else {
+                return '';
+            }
+        },
+        orderAttr() {
+            return this.info.orderAttr || {};
+        },
+        invoiceTitleType() {
+            if (this.orderAttr.invoiceTitleType) {
+                return this.invoiceTitleTypes[this.orderAttr.invoiceTitleTypes];
+            } else {
+                return '';
+            }
+        },
+        invoiceContent() {
+            if (this.orderAttr.invoiceContent) {
+                return this.invoiceContents[this.orderAttr.invoiceContent];
+            } else {
+                return '';
+            }
+        }
+    },
+    onShow() {
+        this.$http
+            .get('/applets/orderdetail', {
+                orderId: this.$mp.query.orderId
+            })
+            .then(res => {
+                this.info = res.data;
+            });
+    }
+};
+</script>
+<style lang="less">
+page {
+    background-color: @bg2;
+}
+</style>

+ 139 - 22
src/pages/order/logistics.vue

@@ -1,9 +1,6 @@
 <config>
 {
 'navigationBarTitleText': '物流状态',
-"usingComponents": {
-  "van-steps": "../../vant/steps/index"
-}
 }
 </config>
 <template>
@@ -11,15 +8,28 @@
         <div class="card">
             <div class="cardTop">订单编号:{{ orderNo }}</div>
 
-            <div class="shouhuo">
-                <div class="box">收</div>
-                <div class="name">安徽省芜湖市鸠江区捷途官抖 街道,捷途4S店</div>
+            <div class="steps">
+                <div class="step finish">
+                    <div class="time"></div>
+                    <div class="box">收</div>
+                    <div class="name">{{ info.toAddress }}</div>
+                </div>
+                <div class="step dot" v-for="(item, index) in steps" :key="item.id" :class="{ active: index === 0 }">
+                    <div class="time">
+                        <span>{{ item.day }}</span>
+                        <span>{{ item.time }}</span>
+                    </div>
+                    <div class="name">{{ item.description }}</div>
+                </div>
             </div>
-            <van-steps :steps="steps" :active="active" direction="vertical" :active-color="$colors.prim" />
         </div>
+        <van-dialog id="van-dialog" />
     </div>
 </template>
 <script>
+import { getLogistics } from '../../utils/SpecialApi';
+import { changeDayTime } from '../../utils/Time';
+import Dialog from '../../vant/dialog/dialog';
 export default {
     data() {
         return {
@@ -27,27 +37,38 @@ export default {
             orderNo: '',
             steps: [
                 {
-                    text: '安徽省芜湖市捷途营业点',
-                    desc: '2019-06-30 12:39'
-                },
-                {
-                    text: '安徽省芜湖市捷途营业点',
-                    desc: '2019-06-30 12:39'
-                },
-                {
-                    text: '安徽省芜湖市捷途营业点',
-                    desc: '2019-06-30 12:39'
-                },
-                {
-                    text: '安徽省芜湖市捷途营业点',
-                    desc: '2019-06-30 12:39'
+                    createdTime: 1592354545056,
+                    deliveryNo: '19277FY202006110001',
+                    description: '2020.06.17到长春',
+                    id: 118
                 }
-            ]
+            ],
+            info: {}
         };
     },
     onShow() {
         if (this.$mp.query.orderNo) {
             this.orderNo = this.$mp.query.orderNo;
+
+            getLogistics(this.orderNo)
+                .then(res => {
+                    console.log(res);
+                    this.steps = res.listRecord.map(item => {
+                        return {
+                            ...item,
+                            ...changeDayTime(item.createdTime, '', false)
+                        };
+                    });
+                    this.info = res;
+                })
+                .catch(e => {
+                    Dialog.alert({
+                        title: '暂无信息,请耐心等待',
+                        className: 'custom-class-name'
+                    }).then(() => {
+                        this.navigateBack(0);
+                    });
+                });
         }
     }
 };
@@ -102,4 +123,100 @@ page {
         margin-left: 7px;
     }
 }
+.steps {
+    padding-top: 20px;
+    padding-bottom: 10px;
+}
+.step {
+    display: flex;
+    position: relative;
+    .time {
+        font-size: 13px;
+        color: #b5b5b5;
+        line-height: 15px;
+        display: flex;
+        flex-direction: column;
+        align-items: flex-end;
+        padding-bottom: 46px;
+        position: relative;
+        min-height: 25px;
+    }
+
+    &:not(:last-child) {
+        .time {
+            &::after {
+                content: '';
+                position: absolute;
+                width: 1px;
+                height: 100%;
+                background: #bfbfbf;
+                top: 20px;
+                right: -23px;
+            }
+        }
+    }
+
+    .name {
+        font-size: 13px;
+        color: #b5b5b5;
+        line-height: 15px;
+        padding-left: 46px;
+        position: relative;
+    }
+
+    .time {
+        min-width: 75px;
+    }
+
+    &.finish {
+        .name {
+            color: #333333;
+        }
+    }
+
+    &.dot {
+        .name {
+            &::before {
+                content: '';
+                position: absolute;
+                width: 10px;
+                height: 10px;
+                background: #e5e5e5;
+                border: 1px solid #ffffff;
+                border-radius: 50%;
+                top: 19px;
+                left: 18px;
+            }
+        }
+    }
+
+    &.active {
+        .name {
+            color: #00a29a;
+            &::before {
+                background: #00a29a;
+            }
+        }
+        .time {
+            color: #00a29a;
+        }
+    }
+
+    .box {
+        width: 33px;
+        height: 33px;
+        background: #c0c0c0;
+        border: 1px solid #ffffff;
+        border-radius: 50%;
+
+        font-size: 13px;
+        font-weight: bold;
+        color: #ffffff;
+        line-height: 33px;
+        text-align: center;
+        position: absolute;
+        top: -5px;
+        left: 81px;
+    }
+}
 </style>

+ 308 - 0
src/pages/order/orderDetailDefault.vue

@@ -0,0 +1,308 @@
+<config>
+{
+'navigationBarTitleText': '订单详情',
+}
+</config>
+<template>
+    <div>
+        <div class="cart-group">
+            <div class="cart-group-item" id="orderCode">订单编号:{{ info.orderCode }}</div>
+        </div>
+        <div class="cart-group" v-if="info.status == '2' && info.orderType == '7'">
+            <div class="cart-group-item">
+                <span class="hui">兑换码</span>
+                <div class="form-href no-href" id="exchangeCode">{{ info.writeOffCode }}</div>
+            </div>
+        </div>
+        <div id="receiveAddress" class="cart-group" v-if="info.orderType !== '6'">
+            <div class="receiver-info">
+                <van-icon color="#999" name="location-o" />
+                <div class=" delivery-lite-info">
+                    <div class="top">收货人: {{ orderAttr.receiptName }} {{ orderAttr.receiptMobile }}</div>
+                    <div class="address hui">
+                        <span id="address">{{ orderAttr.receiptAddress }}{{ orderAttr.receiptDetailAddress }}</span>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div class="cart-group" v-if="info.waybillCode">
+            <div class="delivery-lite-info">
+                <div class="expressCompany">物流公司:{{ logisticsCompanyName }}</div>
+                <div class="waybillCode">货运单号:{{ info.waybillCode }}</div>
+            </div>
+        </div>
+        <div class="cart-group noPadding">
+            <div class="cart-group">
+                <div class="cart-group-item" id="storeName">{{ info.storeName }}</div>
+            </div>
+            <div class="sku">
+                <div class="carCenter" :key="item.id" v-for="item in orderSkus" @click="goSukDetail(item.skuId)">
+                    <van-image width="89" height="89" :src="item.skuImage" />
+                    <div class="center">
+                        <div class="name">
+                            <span>{{ item.skuName }}</span>
+                        </div>
+                        <div class="num">x{{ item.num }}</div>
+                        <div class="price red">¥{{ item.price }}</div>
+                    </div>
+                    <van-icon name="arrow" />
+                </div>
+            </div>
+
+            <div class="cart-group">
+                <div class="cart-group-item">
+                    <div class="hui">支付方式</div>
+                    <div class="form-href no-href" id="payType">{{ payType }}</div>
+                </div>
+            </div>
+
+            <div class="cart-group" id="showDealerInfo" v-if="info.dealerInfo">
+                <div>
+                    <div>经销商</div>
+                    <div class="hui" style="margin-top:5px">{{ info.dealerInfo }}</div>
+                </div>
+            </div>
+
+            <div class="cart-group">
+                <div class="cart-group-item">
+                    <span>订单备注</span>
+                    <span>{{ orderAttr.remark }}</span>
+                </div>
+            </div>
+        </div>
+        <van-cell-group>
+            <van-cell
+                is-link
+                title="发票信息"
+                :value="invoiceInfo"
+                :url="`/pages/order/invoiceDetail?orderId=${info.id}`"
+            ></van-cell>
+            <template v-if="info.orderType === '1'">
+                <template v-if="info.presaleStatus === '0'">
+                    <van-cell link title="阶段一:支付订金(待付款)" :value="presalePrice"></van-cell>
+                    <van-cell link title="阶段二:支付尾款(待付款)" :value="presalePriceMul"></van-cell>
+                </template>
+                <template v-else-if="info.presaleStatus === '1'">
+                    <van-cell link title="阶段一:支付订金(已完成)" :value="presalePriceMul"></van-cell>
+                    <van-cell link title="阶段二:支付尾款(待付款)" :value="presalePrice"></van-cell>
+                </template>
+
+                <template v-else>
+                    <van-cell link title="阶段一:支付订金(已完成)" :value="presalePriceMul"></van-cell>
+                    <van-cell link title="阶段二:支付尾款(已完成)" :value="presalePrice"></van-cell>
+                </template>
+            </template>
+        </van-cell-group>
+
+        <div class="cart-group" style="margin-top:10px">
+            <div class="detail">
+                <div class="detail-item">
+                    <div>商品总额</div>
+                    <div>
+                        <span class="price" id="price">{{ originalPrice }}</span>
+                    </div>
+                </div>
+                <div class="detail-item">
+                    <div>运费</div>
+                    <div>
+                        <span class="price red" id="fee">+{{ freightPrice }}</span>
+                    </div>
+                </div>
+                <div class="detail-item">
+                    <div>优惠</div>
+                    <div>
+                        <span class="price red" id="discount">-{{ concessionalRate }}</span>
+                    </div>
+                </div>
+                <div v-if="info.modifyPrice" class="detail-item">
+                    <div>修改金额</div>
+                    <div>
+                        <span class="price red" id="modifyPrice">-{{ modifyPrice }}</span>
+                    </div>
+                </div>
+                <div class="detail-item">
+                    <div>实付金额</div>
+                    <div>
+                        <span class="price red" id="lastprice">{{ totalMoney }}</span>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div class="cart-group" style="margin-top: 0;border-bottom: 0">
+            <div class="cart-group-item">
+                <div>下单时间</div>
+                <div class="form-href no-href" id="orderCreateTime">{{ info.createTime }}</div>
+            </div>
+        </div>
+
+        <div class="btn"></div>
+        <div class="btnList">
+            <template v-if="info.status === '1'">
+                <van-button v-if="info.orderType !== '1'" block @click="cancelOrder" square color="#000"
+                    >取消订单</van-button
+                >
+                <van-button v-if="info.presaleOrderCanPay" @click="toPay" block square :color="$colors.prim"
+                    >支付</van-button
+                >
+            </template>
+            <template v-else-if="info.status === '2'">
+                <van-button v-if="info.canRefund" block @click="toRefundOrder" square color="#000">申请退款</van-button>
+            </template>
+            <template v-else-if="info.status === '3'">
+                <van-button block @click="toCheckLogistics" square :color="$colors.prim">查看物流</van-button>
+            </template>
+            <template v-else-if="info.status === '4'">
+                <van-button v-if="info.canReturn" block @click="toReturnOrder" square color="#000">申请退货</van-button>
+
+                <van-button v-if="info.evaluationStatus == '0'" block @click="toevaluation" square :color="$colors.prim"
+                    >评价晒单</van-button
+                >
+                <van-button v-else block @click="toevaluationDetail" square :color="$colors.prim">查看评价</van-button>
+
+                <van-button v-if="info.canRefund" block @click="toRefundOrder" square color="#000">申请退款</van-button>
+            </template>
+        </div>
+    </div>
+</template>
+<script>
+import Order from '../../mixins/OrderDefault';
+export default {
+    data() {
+        return {
+            info: {}
+        };
+    },
+    mixins: [Order],
+    onShow() {
+        this.$http
+            .get('/applets/orderdetail', {
+                orderId: this.$mp.query.orderId
+            })
+            .then(res => {
+                this.info = res.data;
+                console.log(this.info);
+            });
+    }
+};
+</script>
+
+<style lang="less">
+page {
+    background-color: @bg2;
+}
+.cart-group {
+    position: relative;
+    font-size: 14px;
+    background: #fff;
+    border-bottom: 1px solid #eee;
+
+    padding: 15px;
+    margin-bottom: 10px;
+
+    &.noPadding {
+        padding: 0;
+        border-bottom-width: 0;
+    }
+    .cart-group {
+        margin-bottom: 0;
+    }
+}
+
+.cart-group-item {
+    display: flex;
+    justify-content: space-between;
+}
+
+.hui {
+    color: #999;
+}
+
+.mb {
+    margin-bottom: 10px;
+}
+
+.receiver-info {
+    display: flex;
+    align-items: flex-end;
+
+    .delivery-lite-info {
+        margin-left: 10px;
+
+        .top {
+            color: #000;
+            font-weight: bold;
+        }
+
+        .address {
+            font-size: 12px;
+            margin-top: 10px;
+        }
+    }
+}
+
+.waybillCode {
+    margin-top: 10px;
+}
+
+.carCenter {
+    display: flex;
+    padding: 5px 15px;
+    .center {
+        flex-grow: 1;
+        margin-left: 5px;
+    }
+    .name {
+        flex-grow: 1;
+        font-size: 12px;
+        color: #333333;
+        line-height: 18px;
+    }
+
+    .num {
+        font-size: 12px;
+        color: #868686;
+        line-height: 18px;
+    }
+
+    .price {
+    }
+
+    ._van-icon {
+        align-self: center;
+        margin-left: 10px;
+    }
+}
+
+.sku {
+    border-bottom: 1px solid #eee;
+}
+
+.red {
+    color: #e4393c;
+}
+
+.detail-item {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+}
+
+.btnList {
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    display: flex;
+
+    ._van-button {
+        flex-grow: 1;
+    }
+    .van-button {
+        height: 55px;
+    }
+}
+
+.btn {
+    height: 55px;
+}
+</style>

+ 93 - 4
src/pages/order/orderList.vue

@@ -1,16 +1,105 @@
 <config>
 {
-'navigationBarTitleText': 'COUPE订单',
+	'navigationBarTitleText': '其他订单',
+	'enablePullDownRefresh':true
 }
 </config>
+
 <template>
-    <div></div>
+    <div class="order">
+        <van-sticky>
+            <van-tabs
+                :active="active"
+                :color="$colors.prim"
+                line-height="2px"
+                :line-width="30"
+                @change="active = $event.detail.name"
+                tab-active-class="activeTab"
+                tab-class="tab"
+            >
+                <van-tab :title="item.name" v-for="item in types" :key="item.status"></van-tab>
+            </van-tabs>
+        </van-sticky>
+
+        <div class="loading" v-if="loading">
+            <van-loading size="24px">加载中...</van-loading>
+        </div>
+
+        <van-empty description="无数据" v-if="empty" />
+
+        <div class="list">
+            <order-card v-for="item in list" :key="item.id" :info="item" :isBack="isBack"></order-card>
+        </div>
+    </div>
 </template>
 <script>
+import OrderList from '../../mixins/OrderList';
+import OrderCard from '../../components/OrderCardDefault';
 export default {
+    mixins: [OrderList],
     data() {
-        return {};
+        return {
+            active: 0,
+            types: [
+                { name: '全部', status: '-1' },
+                { name: '待付款', status: '1' },
+                { name: '已付款', status: '2' },
+                { name: '退款/退货', url: '/applets/backorderlist', isBack: true }
+            ],
+            defaultList: true
+        };
     },
-    onShow() {}
+    computed: {
+        queryData() {
+            return {
+                status: this.types[this.active].status || ''
+            };
+        },
+        url() {
+            if (this.types[this.active].url) {
+                return this.types[this.active].url;
+            } else {
+                return '/applets/querycustomerorders';
+            }
+        },
+        isBack() {
+            if (this.types[this.active].isBack) {
+                return true;
+            } else {
+                return false;
+            }
+        }
+    },
+    components: {
+        OrderCard
+    }
 };
 </script>
+
+<style lang="less">
+.order {
+    .tab {
+        color: #666666;
+        font-weight: bold;
+        font-size: 14px;
+
+        &.activeTab {
+            color: @prim;
+        }
+    }
+}
+
+.loading {
+    padding: 10px;
+    display: flex;
+    justify-content: center;
+}
+
+.list {
+    padding: 15px;
+
+    .orderCard + .orderCard {
+        margin-top: 15px;
+    }
+}
+</style>

+ 1 - 1
src/pages/order/orderListCoupe.vue

@@ -44,7 +44,7 @@ export default {
     mixins: [OrderList],
     data() {
         return {
-            active: 2,
+            active: 1,
             types: [
                 { name: '贷款订单', payType: '2', url: '/applets/carorder/findmycarorderlist' },
                 { name: '全款订单', payType: '1', url: '/applets/carorder/findmycarorderlist' },

+ 122 - 0
src/pages/order/refundOrder.vue

@@ -0,0 +1,122 @@
+<config>
+{
+'navigationBarTitleText': '申请退款',
+}
+</config>
+<template>
+    <div>
+        <div class="tips">
+            申请退款原因
+        </div>
+        <van-radio-group :value="result" @change="result = $event.detail">
+            <van-cell-group>
+                <van-cell title="不想买了" clickable data-name="1" @click="choose">
+                    <van-radio slot="right-icon" name="1" :checked-color="$colors.prim" />
+                </van-cell>
+                <van-cell title="收货人信息有误" clickable data-name="2" @click="choose">
+                    <van-radio slot="right-icon" name="2" :checked-color="$colors.prim" />
+                </van-cell>
+                <van-cell title="未按指定时间发货" clickable data-name="3" @click="choose">
+                    <van-radio slot="right-icon" name="3" :checked-color="$colors.prim" />
+                </van-cell>
+                <van-cell title="其他" clickable data-name="4" @click="choose" :border="false">
+                    <van-radio slot="right-icon" name="4" :checked-color="$colors.prim" />
+                </van-cell>
+            </van-cell-group>
+        </van-radio-group>
+        <van-cell class="hui" use-label-slot>
+            <span slot="label">
+                退款金额:<span style="color:red">{{ price }}</span>
+            </span>
+        </van-cell>
+
+        <van-cell class="hui" :border="false" label="原因说明"> </van-cell>
+        <van-field
+            type="textarea"
+            placeholder="请输入退款原因"
+            @change="message = $event.detail"
+            :maxlength="200"
+            show-word-limit
+            :border="false"
+        />
+        <div class="btnList">
+            <van-button @click="apply" square block :color="$colors.prim">提交退款申请</van-button>
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data() {
+        return {
+            price: '',
+            message: '',
+            result: ''
+        };
+    },
+    onShow() {
+        if (this.$mp.query.money) {
+            this.price = this.$mp.query.money;
+        }
+    },
+    methods: {
+        apply() {
+            if (!this.result) {
+                this.showToastError('请选择退款原因');
+                return;
+            }
+
+            if (!this.message) {
+                this.showToastError('请填写退款说明');
+                return;
+            }
+
+            this.$http
+                .post('/applets/applyrefund', {
+                    orderId: this.$mp.query.orderId,
+                    reason: this.result,
+                    desc: this.message
+                })
+                .then(res => {
+                    if (res.data > 0) {
+                        this.showToastError('申请退款成功', 'success');
+                        this.navigateBack(500);
+                    } else {
+                        this.showToastError('申请退款失败');
+                    }
+                });
+        },
+        choose(event) {
+            const { name } = event.currentTarget.dataset;
+            this.result = name;
+        }
+    }
+};
+</script>
+<style lang="less">
+page {
+    background-color: @bg2;
+}
+
+.tips {
+    font-size: 15px;
+    color: #6e6e76;
+    line-height: 12px;
+    padding: 40px 17px 10px;
+}
+.btnList {
+    position: fixed;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .van-button {
+        height: 55px;
+    }
+}
+
+.hui {
+    .van-cell {
+        background-color: transparent;
+    }
+}
+</style>

+ 49 - 25
src/pages/order/transparent.vue

@@ -14,53 +14,64 @@
             <div class="steps">
                 <div class="step-info" v-for="(item, index) in steps" :key="index">
                     <div class="step-name">
-                        {{ item.text }}
-                        <span>已完成</span>
+                        {{ item.description }}
+                        <span>{{ item.status }}</span>
                     </div>
 
                     <div class="step-imgs">
-                        <div
-                            @click="showIndex(imgIndex, item.imgs)"
-                            v-for="(img, imgIndex) in item.imgs"
+                        <van-image
+                            @click="showIndex(imgIndex, item.imageUrls)"
+                            v-for="(img, imgIndex) in item.imageUrls"
                             :key="imgIndex"
-                            class="imgBox"
-                        >
-                            <van-image width="70" height="70" fit="cover" :src="img" />
-                        </div>
+                            width="70"
+                            height="70"
+                            :radius="4"
+                            fit="cover"
+                            :src="img"
+                        />
                     </div>
                 </div>
             </div>
         </div>
+        <van-dialog id="van-dialog" />
     </div>
 </template>
 <script>
+import { getFactory } from '../../utils/SpecialApi';
+import Dialog from '../../vant/dialog/dialog';
 export default {
     data() {
         return {
             orderNo: '',
             steps: [
                 {
-                    text: '生产零部件准备',
-                    imgs: [
-                        'http://shopimg.jetour.com.cn/20190831/1567214392516.jpg',
-                        'http://shopimg.jetour.com.cn/20190831/1567214392516.jpg',
-                        'http://shopimg.jetour.com.cn/20190831/1567214392516.jpg'
-                    ]
-                },
-                {
-                    text: '生产计划导入',
-                    imgs: ['http://shopimg.jetour.com.cn/20190831/1567214392516.jpg']
-                },
-                {
-                    text: '焊装',
-                    imgs: ['http://shopimg.jetour.com.cn/20190831/1567214392516.jpg']
+                    description: '生产零部件准备',
+                    imageUrls: [
+                        'http://shopimg.jetour.com.cn//factory/20200427/5ddcadcc-23c3-471b-ab66-5cc7fa054ce1.jpg'
+                    ],
+                    orderNo: '732203855097495552',
+                    status: '已完成',
+                    version: 0,
+                    videoUrl: ''
                 }
             ]
         };
     },
-    onShow() {
+    onLoad() {
         if (this.$mp.query.orderNo) {
             this.orderNo = this.$mp.query.orderNo;
+            getFactory(this.orderNo)
+                .then(res => {
+                    this.steps = res;
+                })
+                .catch(e => {
+                    Dialog.alert({
+                        title: '暂无信息,请耐心等待',
+                        className: 'custom-class-name'
+                    }).then(() => {
+                        this.navigateBack(0);
+                    });
+                });
         }
     },
     methods: {
@@ -126,7 +137,7 @@ page {
 
 .step-info {
     position: relative;
-    padding: 15px 30px;
+    padding: 15px 30px 0px;
     &:not(:last-child) {
         &::before {
             content: '';
@@ -172,6 +183,19 @@ page {
     .imgBox {
         flex-shrink: 0;
         margin-left: 10px;
+        border-radius: 4px;
+        overflow: hidden;
+    }
+}
+
+._van-image {
+    margin-left: 10px;
+    margin-top: 10px;
+}
+
+.dialog-index--custom-class-name {
+    .dialog-index--van-dialog__confirm {
+        color: @prim !important;
     }
 }
 </style>

+ 1 - 0
src/pages/register.vue

@@ -107,6 +107,7 @@ export default {
                     if (this.$store.state.loginInfo && this.$store.state.loginInfo.hasUnionId) {
                         return Promise.resolve();
                     } else {
+                        this.$store.commit('setUserIcon', e.userInfo.avatarUrl);
                         return this.$http.post('/applets/dealuserinfo', {
                             ...e.detail,
                             userInfo: JSON.stringify(e.detail.userInfo)

+ 5 - 1
src/store/index.js

@@ -6,7 +6,8 @@ export default new Vuex.Store({
         safeAreaTop: 0,
         safeAreaBottom: 0,
         userInfo: null,
-        loginInfo: null
+        loginInfo: null,
+        userIcon: ''
     },
     mutations: {
         setSafeAreaTop(state, val) {
@@ -23,6 +24,9 @@ export default new Vuex.Store({
         },
         setLoginInfo(state, loginInfo) {
             state.loginInfo = loginInfo;
+        },
+        setUserIcon(state, icon) {
+            state.userIcon = icon;
         }
     },
     actions: {

+ 49 - 1
src/utils/AppState.js

@@ -6,4 +6,52 @@ const statusMap = {
     '5': '交易关闭'
 };
 
-export { statusMap };
+const reasonMap = {
+    '1': '72小时无理由退款',
+    '2': '订单信息有误',
+    '3': '贷款审核不通过',
+    '4': '其他'
+};
+
+// 订单状态 普通订单
+const orderStatus = {
+    '1': '待付款',
+    '2': '待发货',
+    '3': '待收货',
+    '4': '已完成',
+    '5': '交易关闭',
+    '6': '交易关闭',
+    '7': '交易关闭'
+};
+// 退款订单状态 普通订单
+const backorderstatus = {
+    '1': '退款申请',
+    '2': '退款成功',
+    '3': '退款拒绝',
+    '4': '退货申请',
+    '5': '退货拒绝',
+    '6': '待用户填写物流',
+    '7': '待商家收货',
+    '8': '退货完成',
+    '9': '退货失败'
+};
+
+// 退单原因
+const backReason = {
+    '1': '不想买了',
+    '2': '收货人信息有误',
+    '3': '未按指定时间发货',
+    '4': '其他',
+    '5': '不想买了',
+    '6': '商品质量问题',
+    '7': '收到商品与描述不符',
+    '8': '其他'
+};
+
+const proofType = {
+    0: '没有任何凭证',
+    1: '有发票',
+    2: '有质检报告'
+};
+
+export { statusMap, reasonMap, orderStatus, backorderstatus, backReason, proofType };

+ 61 - 0
src/utils/SpecialApi.js

@@ -0,0 +1,61 @@
+// 生产状态
+function getFactory(orderNo) {
+    return new Promise((resolve, reject) => {
+        wx.request({
+            method: 'get',
+            url: 'https://factory.jetour.com.cn/getCarNodeInfo',
+            data: { orderNo: orderNo },
+            dataType: 'json',
+            header: {
+                Accept: 'application/json'
+            },
+            success: res => {
+                console.log(res);
+                if (res.data.length > 0) {
+                    let str = res.data.replace(/null\(/, '');
+                    str = str.replace(/\)/, '');
+                    let data = JSON.parse(str).data;
+                    if (data.length > 0) {
+                        resolve(data);
+                    } else {
+                        reject();
+                    }
+                } else {
+                    reject();
+                }
+            }
+        });
+    });
+}
+
+// 物流信息
+function getLogistics(orderNo) {
+    return new Promise((resolve, reject) => {
+        wx.request({
+            method: 'get',
+            url: 'https://factory.jetour.com.cn/getDeliveryInfo',
+            data: { orderNo: orderNo },
+            dataType: 'json',
+            header: {
+                Accept: 'application/json'
+            },
+            success: res => {
+                console.log(res);
+                if (res.data.length > 0) {
+                    let str = res.data.replace(/null\(/, '');
+                    str = str.replace(/\)/, '');
+                    let data = JSON.parse(str).data;
+                    if (data) {
+                        resolve(data);
+                    } else {
+                        reject();
+                    }
+                } else {
+                    reject();
+                }
+            }
+        });
+    });
+}
+
+export { getFactory, getLogistics };

+ 18 - 0
src/utils/Time.js

@@ -0,0 +1,18 @@
+import { format, parse } from 'date-fns';
+
+function changeDayTime(time, formatStr = 'yyyy-MM-dd HH:mm:ss', needParse = true) {
+    if (time) {
+        let _time = needParse ? parse(time, formatStr, new Date()) : time;
+        return {
+            day: format(_time, 'yyyy-MM-dd'),
+            time: format(_time, 'HH:mm')
+        };
+    } else {
+        return {
+            day: '0000-00-00',
+            time: '00:00'
+        };
+    }
+}
+
+export { changeDayTime };