zhaoxiaoqiang
2022-08-02 505e112fd1518ac966b540a48c6ca1809e1b6703
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
<!--
 * @Author: 小明丶
 * @Date: 2020-05-25 14:42:58
 * @LastEditors: 小明丶
 * @LastEditTime: 2020-07-06 09:30:49
 * @Description: 图像上传页面
-->
<template>
  <div class="image-upload-page">
    <v-navbar title="订单申请" :back="url"></v-navbar>
    <div class="steps-box">
      <div class="steps">
        <p></p>
        <div class="step-3">3</div>
        <div class="step-4">4</div>
        <div class="step-5">5</div>
        <div class="step-6">6</div>
      </div>
      <div class="zanwei"></div>
    </div>
    <div class="mation-box">
      <p>图片资料上传</p>
      <p>请确保图片清晰可见,以便顺利申请</p>
    </div>
    <div class="upload-box">
      <UploadFile
        :fileType="1"
        title="首付凭证"
        :hasTips="true"
        :typeId="this.$route.query.typeId"
        :sourceType="this.$route.query.zfbVersion"
        :picList="uploadObj.contImgUrls"
      ></UploadFile>
      <UploadFile
        :fileType="2"
        title="现场合照"
        :hasTips="true"
        :typeId="this.$route.query.typeId"
        :sourceType="this.$route.query.zfbVersion"
        :picList="uploadObj.localeImgUrls"
      ></UploadFile>
      <UploadFile
        :fileType="3"
        title="资料证明"
        :hasTips="false"
        :typeId="this.$route.query.typeId"
        :sourceType="this.$route.query.zfbVersion"
        :picList="uploadObj.proofImgUrls"
      ></UploadFile>
    </div>
    <div class="btn-box">
        <button @click="submitApp">提交申请</button>
    </div>
  </div>
</template>
<script>
import UploadFile from "../../components/upload/uploadImg";
export default {
    components:{
        UploadFile
    },
  data() {
    return {
      url:'',
      uploadObj: {
        contImgUrls:[],//首付凭证
        localeImgUrls:[],//现场合照
        proofImgUrls:[],//证明资料
      }
    };
  },
  beforeRouteEnter (to, from, next) {
    // ...
    next(vm=>{
      if(from.path=='/order-handling/contract-signing'){
        vm.url = '/order-handling/contract-signing'
        //window.sessionStorage.backUrl = '/order-handling/image-upload'
      }
    })
  },
  methods:{
      submitApp(){
          let v = this.$tool
          if(this.uploadObj.contImgUrls.length == 0){
            v.toast('请上传首付凭证')
            return
          }
          if(this.uploadObj.localeImgUrls.length == 0){
            v.toast('请上现场合照')
            return
          }
          this.$api.saveImgInfo({
            ...this.uploadObj
          }).then(res=>{
            this.$router.push('/order-handling/approval-results')
          })
      }
  }
};
</script>
<style lang="less" scoped>
.image-upload-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;
        background: rgba(81, 148, 254, 1);
        box-shadow: 0px 0px 8px 0px rgba(81, 148, 254, 0.64);
        border-radius: 50%;
        position: absolute;
        left: 170px;
        top: 19px;
        color: #fff;
      }
      .step-6 {
        text-align: center;
        line-height: 28px;
        width: 28px;
        height: 28px;
        background: rgba(255, 255, 255, 1);
        border: 1px solid rgba(113, 123, 133, 1);
        border-radius: 50%;
        position: absolute;
        left: 240px;
        top: 19px;
      }
    }
  }
  .mation-box {
    padding: 16px 18px;
    box-sizing: border-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;
    margin: auto;
    p:nth-of-type(1) {
      margin-bottom: 10px;
      font-size: 16px;
      font-family: PingFang SC;
      font-weight: 500;
      color: rgba(51, 51, 51, 1);
    }
    p:nth-of-type(2) {
      font-size: 13px;
      font-family: PingFang SC;
      font-weight: 500;
      color: rgba(153, 153, 153, 1);
    }
  }
  .upload-box{
      padding: 16px;
  }
  .btn-box{
      &{
          text-align: center;
          padding-bottom: 32px;
      }
      button{
            width:325px;
            height:44px;
            background:rgba(81,148,254,1);
            border-radius:22px;
            outline: none;
            border: 0;
            color: #fff;
      }
  }
}
</style>