liangjin
2021-04-04 6ab8cacad8580c7d297609d6583b46b89310ff6f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!--
 * @Author: 小明丶
 * @Date: 2019-08-19 16:20:48
 * @LastEditors: 小明丶
 * @LastEditTime: 2019-09-06 15:38:14
 * @Description: 购机直降——订单详情
 -->
<template>
    <div class="hb-detail-box h-100-g">
        <v-navbar title="订单详情" fixed></v-navbar>
        <div class="content">
            <div class="cell-group">
                <van-cell  title='客户信息' readonly isTitle></van-cell>
                <van-cell :value="form.userName" title='用户名称' readonly ></van-cell>
                <van-cell :value="form.mblNo" title='手机号' readonly ></van-cell>
                <van-cell :value="form.statusStr" title='订单状态' readonly ></van-cell>
                <van-cell v-if="form.rejMessage" :value="form.rejMessage" title='拒绝原因 ' readonly ></van-cell>
            </div>
 
            <div class="cell-group">
                <van-cell title='合约信息' readonly isTitle></van-cell>
                <van-cell :value="form.contName" title='合约套餐' readonly ></van-cell>
                <van-cell :value="form.settAmt + '元'" title='结算金额' readonly ></van-cell>
                <van-cell :value="form.monthlyFees+ '元'" title='月缴话费' readonly ></van-cell>
                <!--<van-cell :value="form.monthlyPayments+ '元'" title='月还款额' readonly ></van-cell>-->
                <van-cell :value="form.insTermStr" title='期数' readonly ></van-cell>
            </div>
 
            <div class="cell-group">
                <van-cell  title='商品信息' readonly isTitle></van-cell>
                <van-cell :value="form.goodsBrand" title='品牌' readonly ></van-cell>
                <van-cell :value="form.goodsName" title='名称' readonly ></van-cell>
                <van-cell :value="form.goodsModel" title='型号' readonly ></van-cell>
                <van-cell :value="form.goodsPrice +'元'" title='价格' readonly ></van-cell>
                <van-cell :value="form.goodsImei" title='IMEI' readonly ></van-cell>
            </div>
 
        </div>
 
        <!-- <f-button class="btn-upload" v-if="orderInfo.uploadBtn == 1" @on-click="$router.push(`/contract-order-upload/${orderInfo.orderId}`)" >上传合约凭证</f-button> -->
        <f-confirm v-model="showModal" @on-confirm='confirmYes' :showCancelBtn='true'>
            <div>是否确认退货</div>
        </f-confirm>
        <van-button class="btn" v-if="form.uploadBtn == 1" @click="go">上传合约凭证</van-button>
        <van-button class="btn-return" v-if="canRefund == 1" round @click="returnGoods">退货</van-button>
    </div>
</template>
 
<script>
    import Vue from "vue";
    import { Dialog } from "vant";
    Vue.use(Dialog);
    export default {
        data(){
            return {
                form:{},
                canRefund: 0,
                orderId: this.$route.query.id,
                showModal: false
            }
        },
        created(){
            this.init()
        },
        methods:{
            init() {
                this.$api.getZxhDetail(this.$route.query.id).then(res => {
                        this.form = res.body;
                        this.canRefund = res.body.canRefund;
                });
            },
            // 跳转到上传合约凭证页面
            go(){
                this.$router.push(`/hryd/upload/${this.form.orderId}`)
            },
            //退货
            returnGoods() {
                this.showModal = true;
                },
 
            confirmYes () {
                this.$api.h_refund({ orderId: this.orderId }).then(res => {
                        this.init();
                    });
            }
        }
    }
</script>
<style lang="less" scoped>
    .status-val-done {
        color:#19BE6B;
    }
    .status-val-refund {
        color:#FF9900;
    }
    .status-val-wait {
        color:#FF9900;
    }
    .status-val-error {
        color:#ED4014;
    }
    .hb-detail-box {
        padding-top: 44px;
        background-color: @c-bg-f5;
 
        .content {
            padding: 10px 8px;
        }
 
        .cell-group {
            margin-bottom: 10px;
        }
    }
    .btn{
        width: 320px;
        background: @c-bg-default;
        color: @c-text-fff;
        display: block;
        margin: 30px auto;
    }
    .btn-return {
        width: 84%;
        margin: 0 8%;
        background: @c-default;
        color: @c-text-fff;
        display: block;
        margin-top: 15px;
        }
</style>