zhaoxiaoqiang
2021-04-12 f401147f1459d5a5c68c702abf67b46c240f7b0c
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
<!--
 * @Author: 小明丶
 * @Date: 2019-08-19 16:20:48
 * @LastEditors: 小明丶
 * @LastEditTime: 2019-09-06 15:42:01
 * @Description: 信用卡分期——订单详情
 -->
<template>
    <div class="credit-detail-box h-100-g">
        <v-navbar title="订单详情" fixed></v-navbar>
        <div class="content">
            <div class="cell-group">
                <van-cell :value="form.userName" title='用户名称' readonly></van-cell>
                <van-cell :value="form.mblNo" title='手机号' readonly></van-cell>
            </div>
 
            <div class="cell-group">
                <van-cell :value="form.settAmt" title='商品金额' readonly></van-cell>
                <van-cell :value="form.insAmt" title='还款总额' readonly></van-cell>
                <van-cell :value="form.insTermStr" title='分期期数' readonly></van-cell>
                <van-cell :value="form.dealTime" title='交易时间' readonly></van-cell>
                <van-cell :value="form.goodsName" title='商品信息' readonly></van-cell>
                <van-cell :value="form.statusStr" :value-class="statusColor" title='订单状态' readonly></van-cell>
            </div>
 
             <div class="cell-group" >
                <van-cell :value="form.chanName || '无'" title='办理渠道' readonly></van-cell>
                <van-cell :value="form.merName || '无'" title='办理商户' readonly></van-cell>
                <van-cell :value="form.storeName || '无'" title='办理门店' readonly></van-cell>
                <van-cell :value="form.recordPerson || '无'" title='办单员' readonly></van-cell>
            </div>
 
            <div class="cell-group" v-if="form.feeRate != null">
                <van-cell :value="form.feeRate" title='费率' readonly></van-cell>
            </div>
        </div>
    </div>
</template>
 
<script>
    import {
        mapState
    } from 'vuex';
    export default {
        data() {
            return {
                form: {},
                statusColor:''
            }
        },
        computed: {
            id() {
                return this.$route.query.id
            },
            ...mapState(['userinfo'])
        },
        created() {
            this.init()
        },
        methods: {
            init() {
                this.$api.getCreditDetail(this.id).then((res) => {
                    this.form = res.body || {};
                    if(this.form && this.form.status) {
                        if (this.form.status == 1) {
                            this.statusColor = 'status-val-done';
                        } else if (this.form.status == 2) {
                            this.statusColor = 'status-val-error';
                        } else if (this.form.status == 3) {
                            this.statusColor = 'status-val-refund';
                        } else if (this.form.status == 0) {
                            this.statusColor = 'status-val-wait';
                        } else {
                            this.statusColor = 'status-val-done';
                        }
                    }
                }).catch((err) => {
 
                });
            },
        },
    }
</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;
    }
    .credit-detail-box {
        padding-top: 44px;
        background-color: @c-bg-f5;
 
        .content {
            padding: 10px 8px;
        }
 
        .cell-group {
            margin-bottom: 10px;
        }
    }
</style>