zhaoxiaoqiang
2022-11-10 902ca4d6d5350e409c6e5558d638a62f769642a4
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
<!--
 * @Author: 小明丶
 * @Date: 2020-05-25 16:38:26
 * @LastEditors: zxq
 * @LastEditTime: 2022-07-13 14:14:09
 * @Description: 审批结果页面
-->
<template>
  <div class="approval-results-page">
    <v-navbar title="订单申请"></v-navbar>
    <div class="steps-box">
      <div class="steps" :style="{ width: projId == 100001 ? '70%' : '50%' }">
        <p></p>
        <div class="step-3">3</div>
        <div class="step-4">4</div>
        <div :style="{ left: '170px' }" :class="{ 'step-5': projId == 100001, 'step-6': projId == 100000 }">5</div>
        <div class="step-6" v-if="projId == 100001">6</div>
      </div>
      <div class="zanwei"></div>
    </div>
    <!-- 审核结果 -->
    <div class="mation-box" v-if="state == 1">
      <p>审核中</p>
      <p v-if="stepId==100010002">正在审核您的资料,请耐心等待</p>
      <p v-else>正在进行大数据评估,请耐心等待</p>
      <img src="../../../static/img/shz.png" />
    </div>
    <div class="mation-box" v-if="state == 2">
      <p>审核未通过</p>
      <p>您的资料未通过审核</p>
      <img src="../../../static/img/shsb.png" />
    </div>
    <div class="mation-box" v-if="state == 3">
      <p>审核通过</p>
      <p>恭喜您,申请已通过!</p>
      <img src="../../../static/img/shcg.png" />
    </div>
    <div class="mation-box" v-if="state == 4">
      <p>资料重传</p>
      <p>图片未通过审核,请重新上传</p>
      <img src="../../../static/img/zlcc.png" />
    </div>
    <div class="mation-box" v-if="state == 5">
      <p>影像资料上传</p>
      <p>还未上传影像资料</p>
      <img src="../../../static/img/zlcc.png" />
    </div>
    <template v-if="state == 1">
      <div class="text-box" style="margin-top:20px">
        <p v-if="stepId==100010002">提示:审核时间平均为15分钟,但在订单较多时,审核时间可能会被延长,我们会尽快为您完成审核,感谢您的理解!(退出页面不影响继续审核)</p>
        <p v-else>提示:评估时间平均为3分钟,您可离开页面后再返回查看评估结果。若您评估结果为通过的,您可能需要根据页面提示进行下一步操作,感谢您的支持</p>
      </div>
      <div v-if="stepId==100010002" class="text-box">
        <p>人工审核时间:09:00-20:00,非人工审核时间提交的订单,我们会在次日上班后第一时间处理。</p>
      </div>
    </template>
    <template v-if="state == 2">
      <div class="text-box" style="margin-top:20px">
        <p>提示:根据目前您提供的资料和信息,我们暂时不能为您提供服务,对此我们深表遗憾,希望您能谅解,期待再次合作!</p>
      </div>
    </template>
    <!-- <template v-if="state == 3">
      <div class="our-code-box" v-if="code">
          <p>您的分期交易验证码为</p>
          <p>
              <span>【</span>
              <span class="code">{{code}}</span>
              <span>】</span>
          </p>
      </div>
      <div v-else class="our-code-box">
        <p>订单已核销</p>
      </div>
      <div class="text-box" style="margin-top:20px">
        <p>温馨提示:如您确认本次业务为您本人操作且同意按期还款,请将验证码告诉培训机构工作人员!</p>
      </div>
    </template> -->
    <template v-if="state == 4">
      <div class="text-box" style="margin-top:20px">
        <p>提示:{{ text }}</p>
      </div>
    </template>
 
    <div class="btn-box">
      <button @click="goPage">{{ btnText }}</button>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      state: "",
      code: "",
      text: "",
      timer:null,
      stepId:"",
      stepName:""
    };
  },
  computed: {
    btnText() {
      console.log(this.state+'computed')
      if (this.state == 1) {
        return "刷新";
      }
      if (this.state == 2) {
        return "返回首页";
      }
      if (this.state == 3) {
        return "返回首页";
      }
      if (this.state == 4||this.state == 5) {
        return "前往上传";
      }
    },
    projId() {
      return localStorage.getItem("projId");
    },
  },
  watch:{
    state(val){
      if(val==1){
         this.timer = setInterval(()=>{
             this.initPage();
         },5000)
      }else{
        clearInterval(this.timer);
      }
    }
  },
  created() {
     this.initPage();
  },
  methods: {
    //跳转
    goPage() {
      if (this.state == 1) {
        window.location.reload(true); //强制从服务器重新加载当前页面
      }
      if (this.state == 2) {
        this.$router.push("/home/index");
      }
      if (this.state == 3) {
        this.$router.push("/home/index");
      }
      if (this.state == 4||this.state==5) {
        //跳回资料上传页面
        this.$router.push("/order-handling/image-upload");
      }
    },
    initPage(){
       this.$api.initAuditInfo().then(({body}) => {
          this.state = body.auditStatus; 
          this.code = body.pickCode;
          this.text = body.auditMsg;
          this.stepId = body.stepId;//审核步骤 100010001-机审,100010002-人工审核
          this.stepName = body.stepName;
       });
    }
  },
  destroyed(){
    clearInterval(this.timer);
  }
};
</script>
<style lang="less" scoped>
.approval-results-page {
  & {
    min-height: 100vh;
  }
  .steps-box {
    .steps {
      width: 70%;
      height: 65px;
      position: relative;
 
      p {
        border-bottom: 1px dashed #b3b3b3;
        height: 32px;
      }
      .step-3 {
        text-align: center;
        line-height: 30px;
        color: #fff;
        width: 30px;
        height: 30px;
        background: rgba(113, 123, 133, 1);
        border-radius: 50%;
        position: absolute;
        left: 18px;
        top: 19px;
      }
      .step-4 {
        text-align: center;
        line-height: 28px;
        width: 28px;
        height: 28px;
        background: rgba(113, 123, 133, 1);
        border: 0;
        border-radius: 50%;
        color: #fff;
        position: absolute;
        left: 90px;
        top: 19px;
      }
      .step-5 {
        text-align: center;
        line-height: 28px;
        width: 28px;
        height: 28px;
        color: #fff;
        background: rgba(113, 123, 133, 1);
        border: 1px solid rgba(113, 123, 133, 1);
        border-radius: 50%;
        position: absolute;
        left: 170px;
        top: 19px;
      }
      .step-6 {
        text-align: center;
        line-height: 28px;
        width: 28px;
        height: 28px;
        background: rgba(81, 148, 254, 1);
        border: 1px solid rgba(113, 123, 133, 1);
        box-shadow: 0px 0px 8px 0px rgba(81, 148, 254, 0.64);
        border-radius: 50%;
        position: absolute;
        left: 240px;
        top: 19px;
        color: #fff;
      }
      .step-6-width {
        left: 170px;
      }
    }
  }
  .mation-box {
    & {
      width: 343px;
      height: 79px;
      background: rgba(255, 255, 255, 1);
      box-shadow: 0px 0px 10px 0px rgba(47, 103, 192, 0.1);
      border-radius: 5px;
      box-sizing: border-box;
      padding: 16px;
      position: relative;
      margin: auto;
    }
    p:nth-of-type(1) {
      font-size: 16px;
      font-family: PingFang SC;
      font-weight: 500;
      color: rgba(51, 51, 51, 1);
      margin-bottom: 10px;
    }
    p:nth-of-type(2) {
      font-size: 12px;
      font-family: PingFang SC;
      font-weight: 500;
      color: rgba(153, 153, 153, 1);
    }
    img {
      width: 48px;
      height: 45px;
      position: absolute;
      right: 24px;
      top: 12px;
    }
  }
  .our-code-box {
    & {
      text-align: center;
      margin-top: 36px;
    }
    p:nth-of-type(1) {
      font-size: 14px;
      font-family: PingFang SC;
      font-weight: 500;
      color: rgba(51, 51, 51, 1);
    }
    p:nth-of-type(2) {
      span:nth-of-type(1),
      span:nth-of-type(3) {
        color: #333333;
        font-size: 14px;
      }
      .code {
        font-size: 14px;
        font-family: PingFang SC;
        font-weight: 500;
        color: #5194fe;
      }
    }
  }
  .text-box {
    width: 343px;
    margin: auto;
    font-size: 12px;
    font-family: PingFang SC;
    font-weight: 500;
    color: rgba(153, 153, 153, 1);
    line-height: 17px;
    p {
      word-wrap: break-word;
      word-break: break-all;
    }
  }
  .btn-box {
    & {
      text-align: center;
      margin-top: 56px;
    }
    button {
      width: 320px;
      height: 44px;
      background: rgba(81, 148, 254, 1);
      border-radius: 22px;
      outline: none;
      border: 0;
      color: #fff;
    }
  }
}
</style>