liangjin
2021-04-01 006010711477c17f05de52f074a284e0184923b5
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<!--
 * @Date: 2019-09-02 09:01:22
 * @LastEditors: 小明丶
 * @LastEditTime: 2019-09-04 10:50:04
 * @Description:
 -->
 
<template>
    <div class="gjzj-result-page">
        <x-header :title="'开通信用购'" :left-options="{backText:'',preventGoBack:true}"
                  @on-click-back="pageGoBack"></x-header>
        <div class="status-icon">
            <i v-if="openStatus === 1"
               class="iconfont scene_Staging-shenhezhong1"
               style="color: #896EDB;"
                ></i>
            <i v-if="openStatus === 2"
                class="iconfont scene_Staging-tijiaochenggong"
                style="color: #19BE6B;"
                ></i>
            <i v-if="openStatus === 3"
                class="iconfont scene_Staging-tijiaoshibai"
                style="color: #F76260;"
               ></i>
            <i v-if="openStatus === 4"
                 class="iconfont scene_Staging-tijiaoshibai"
                 style="color: #F76260;"
                 ></i>
    </div>
        <div class="tips">
            <p v-if="openStatus === 1">{{ statusType }}审批中</p>
            <p v-if="openStatus === 2"> {{ statusType }}审批通过</p>
            <p v-if="openStatus === 3"> {{ statusType}}审批失败</p>
            <p v-if="openStatus === 4">冻结</p>
        </div>
        <van-button round @click="handleBack">{{ buttonText }}</van-button>
    </div>
</template>
 
<script>
    export default {
        name: 'add-account',
        data() {
            return {
                // 0-待开通,1-审批中,2-审批通过,3-审批失败,4-冻结
                openStatus: 0, // 开通状态
                orgType:0,
                buttonText: '返回', // 底部按钮文字
                statusType: this.$route.query.statusType,
            };
        },
        computed:{
        },
        methods: {
            pageGoBack(){
                if(this.orgType==3) {
                    this.$router.push({
                        path: '/main/productManagement'
                    });
                }else if(this.orgType==4){
                    this.$router.push({
                        path: '/store/productManage'
                    });
                }else if(this.orgType==5){
                    this.$router.push({
                        path: '/store/productManage'
                    });
                }
            },
            handleBack () {
                // 如果是在开通中的话,那么底部有重新提交按钮
                // 点击重新提交,那么用户可以重新填写资料
                if(this.openStatus == 1 || this.openStatus == 2) {
                    if (this.orgType == 3) {
                        this.$router.replace({
                            path: '/main/productManagement'
                        });
                        this.$router.go(-1)
                    } else if (this.orgType == 4) {
                        this.$router.replace({
                            path: '/store/productManage'
                        });
                        this.$router.go(-1)
                    } else if (this.orgType == 5) {
                        this.$router.replace({
                            path: '/store/productManage'
                        });
                        this.$router.go(-1)
                    }
                } else if(this.openStatus == 3 || this.openStatus == 4){
                    if (this.orgType == 3) {
                        let query = {
                            typeId:'200005',
                            openStatus: this.openStatus,
                            orgType: this.orgType
                        }
                        this.$router.push({
                            path:'/xyg/merOpen',
                            query
                        });
                    } else if (this.orgType == 4) {
                        let query = {
                            typeId:'200005',
                            openStatus: this.openStatus,
                            orgType: this.orgType
                        }
                        this.$router.push({
                            path:'/xyg/storeOpen',
                            query
                        });
                    } else if (this.orgType == 5) {
                        let query = {
                            typeId:'200005',
                            openStatus: this.openStatus,
                            orgType: this.orgType
                        }
                        this.$router.push({
                            path:'/xyg/mgrOpen',
                            query
                        });
                    }
                }
            },
        },
        created() {
            console.log(this.statusType)
            this.openStatus = Number(this.$route.query.openStatus);
            this.orgType = Number(this.$route.query.orgType);
            if(this.openStatus == 1 || this.openStatus == 2) {
                this.buttonText = '返回';
            }else if(this.openStatus == 3 || this.openStatus == 4){
                this.buttonText = '再次提交';
            }
        }
    };
</script>
 
<style lang="less" scoped>
    .gjzj-result-page {
        height: 100%;
        padding-top: 54px;
        background-color: #f1f1f1;
        .status-icon {
            padding-top: 20px;
            text-align: center;
        }
        .iconfont {
            font-size: 64px;
            color: #BFA073;
        }
        .scene_Staging-shibai1 {
            color: #F76260;
        }
        .tips {
            color: #999;
            font-size: 14px;
            line-height: 1.6;
            text-align: center;
        }
    }
    .van-button {
        width: 90%;
        margin: 0 5%;
        margin-top: 60px;
        color: white !important;
        background: #896edb;
        }
</style>