3877470c by 杨炀

1. 签证服务 登录后使用

2. 签证服务-关于护照上传的修改
1 parent dcc48c2b
...@@ -88,7 +88,7 @@ export function countryList() { ...@@ -88,7 +88,7 @@ export function countryList() {
88 } 88 }
89 export function associationList() { 89 export function associationList() {
90 return request({ 90 return request({
91 url: `/system/association/getList`, 91 url: `/system/mna/getList`,
92 method: 'get' 92 method: 'get'
93 }) 93 })
94 } 94 }
......
...@@ -29,14 +29,14 @@ ...@@ -29,14 +29,14 @@
29 ref="imageUpload" 29 ref="imageUpload"
30 :multiple="limit > 1" 30 :multiple="limit > 1"
31 :action="actionUrl || uploadImgUrl" 31 :action="actionUrl || uploadImgUrl"
32 list-type="picture-card" 32 :list-type="listType"
33 :on-success="handleUploadSuccess" 33 :on-success="handleUploadSuccess"
34 :before-upload="handleBeforeUpload" 34 :before-upload="handleBeforeUpload"
35 :limit="limit" 35 :limit="limit"
36 :on-error="handleUploadError" 36 :on-error="handleUploadError"
37 :on-exceed="handleExceed" 37 :on-exceed="handleExceed"
38 :before-remove="handleDelete" 38 :before-remove="handleDelete"
39 :show-file-list="true" 39 :show-file-list="showFileList"
40 :headers="headers" 40 :headers="headers"
41 :on-preview="handlePictureCardPreview" 41 :on-preview="handlePictureCardPreview"
42 :file-list="fileListInUpload" 42 :file-list="fileListInUpload"
...@@ -45,7 +45,13 @@ ...@@ -45,7 +45,13 @@
45 :disabled="disabled" 45 :disabled="disabled"
46 :accept="accept" 46 :accept="accept"
47 > 47 >
48 <el-icon class="avatar-uploader-icon"><plus /></el-icon> 48 <el-icon v-if="listType=='picture-card'" class="avatar-uploader-icon"><plus /></el-icon>
49 <el-link v-else class="mr10" type="primary">
50 <el-icon>
51 <Upload/>
52 </el-icon>
53 {{ buttonText }}
54 </el-link>
49 </el-upload> 55 </el-upload>
50 </el-row> 56 </el-row>
51 57
...@@ -98,6 +104,10 @@ const props = defineProps({ ...@@ -98,6 +104,10 @@ const props = defineProps({
98 type: String, 104 type: String,
99 default: 'image' 105 default: 'image'
100 }, 106 },
107 listType: {
108 type: String,
109 default: 'picture-card'
110 },
101 // 文件类型, 例如['png', 'jpg', 'jpeg'] 111 // 文件类型, 例如['png', 'jpg', 'jpeg']
102 fileType: { 112 fileType: {
103 type: Array, 113 type: Array,
...@@ -112,9 +122,17 @@ const props = defineProps({ ...@@ -112,9 +122,17 @@ const props = defineProps({
112 type: Boolean, 122 type: Boolean,
113 default: false 123 default: false
114 }, 124 },
125 showFileList: {
126 type: Boolean,
127 default: true
128 },
115 action: { 129 action: {
116 type: String, 130 type: String,
117 default: '' 131 default: ''
132 },
133 buttonText:{
134 type: String,
135 default: '上传文件'
118 } 136 }
119 }) 137 })
120 const actionUrl = computed(() => { 138 const actionUrl = computed(() => {
......
...@@ -168,6 +168,14 @@ function popRemark(type) { ...@@ -168,6 +168,14 @@ function popRemark(type) {
168 ElMessage.warning('请切换英文页面办理') 168 ElMessage.warning('请切换英文页面办理')
169 return 169 return
170 } else { 170 } else {
171 if (!user) {
172 ElMessage({
173 type: 'warning',
174 message: language.value == 0 ? '请先登录' : 'Please log in first',
175 })
176 return
177 }
178
171 applyInvitation() 179 applyInvitation()
172 return 180 return
173 } 181 }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
8 8
9 <div class="text-center pd20" v-if="showR"> 9 <div class="text-center pd20" v-if="showR">
10 <img class="mauto" src="@/assets/dance/ok.png"/> 10 <img class="mauto" src="@/assets/dance/ok.png"/>
11 <!-- 提交成功等待审核--> 11 <!-- 提交成功等待审核-->
12 <h3 v-if="form.status"> 12 <h3 v-if="form.status">
13 <span v-if="form.status==0">In Approval</span> 13 <span v-if="form.status==0">In Approval</span>
14 <span v-if="form.status==1">Approved</span> 14 <span v-if="form.status==1">Approved</span>
...@@ -40,19 +40,21 @@ ...@@ -40,19 +40,21 @@
40 </el-form-item> 40 </el-form-item>
41 <el-form-item :label="language==0?'是否需要中文邀请函':'Chinese Invitation'" required prop="chinese"> 41 <el-form-item :label="language==0?'是否需要中文邀请函':'Chinese Invitation'" required prop="chinese">
42 <el-radio-group v-model="form.chinese"> 42 <el-radio-group v-model="form.chinese">
43 <el-radio :value="1">{{ language==0?'是':'Yes' }}</el-radio> 43 <el-radio :value="1">{{ language == 0 ? '是' : 'Yes' }}</el-radio>
44 <el-radio :value="0">{{ language==0?'否':'No' }}</el-radio> 44 <el-radio :value="0">{{ language == 0 ? '否' : 'No' }}</el-radio>
45 </el-radio-group> 45 </el-radio-group>
46 </el-form-item> 46 </el-form-item>
47 47
48 <!-- 一般信息--> 48 <!-- 一般信息-->
49 <el-form-item :label="language==0?'国家/地区协会名':'MNA/Team Name'" :required="form.applicatType!=2" prop="associationCode"> 49 <el-form-item :label="language==0?'国家/地区协会名':'MNA/Team Name'" :required="form.applicatType!=2"
50 prop="associationCode">
50 <el-select v-model="form.associationCode" filterable> 51 <el-select v-model="form.associationCode" filterable>
51 <el-option v-for="item in mnaList" :key="item.code" :label="language==0?item.nameCn:item.nameEn" 52 <el-option v-for="item in mnaList" :key="item.code" :label="language==0?item.nameCn:item.nameEn"
52 :value="item.code"/> 53 :value="item.code"/>
53 </el-select> 54 </el-select>
54 </el-form-item> 55 </el-form-item>
55 <el-form-item :label="language==0?'国家/地区协会地址':'MNA/Team Address'" :required="form.applicatType!=2" prop="associationAddress"> 56 <el-form-item :label="language==0?'国家/地区协会地址':'MNA/Team Address'" :required="form.applicatType!=2"
57 prop="associationAddress">
56 <el-input v-model="form.associationAddress"/> 58 <el-input v-model="form.associationAddress"/>
57 </el-form-item> 59 </el-form-item>
58 <el-form-item :label="language==0?'邮箱':'Email'" required prop="email"> 60 <el-form-item :label="language==0?'邮箱':'Email'" required prop="email">
...@@ -80,18 +82,24 @@ ...@@ -80,18 +82,24 @@
80 <el-input v-model="form.embassyEmail"/> 82 <el-input v-model="form.embassyEmail"/>
81 </el-form-item> 83 </el-form-item>
82 84
83 <!--上传护照,多张--> 85 <!--上传护照,多张-->
84 <div class="cptVisaInfoBosTable"> 86 <div class="cptVisaInfoBosTable">
85 <el-form-item :label="language==0?'有效证件':'Passport Copy'" required> 87 <el-form-item :label="language==0?'有效证件':'Passport Copy'" required>
86 <ImageUpload v-model="form.passportCopy" :is-show-tip="false" 88 <ImageUpload v-model="form.passportCopy" :is-show-tip="false"
87 :action="'/league/visa/getPersonInfoFromCert/3'" 89 :action="'/league/visa/getPersonInfoFromCert/3'"
88 paramName="pic" 90 paramName="pic" list-type="text" :show-file-list="false"
89 :button-text="language==0?'上传':'Upload'" @response="getPassportInfo" 91 :button-text="language==0?'上传':'Upload'" @response="getPassportInfo"
90 /> 92 />
91 </el-form-item> 93 </el-form-item>
92 <!--识别信息--> 94 <!--识别信息-->
93 <div v-if="form.cptVisaInfoBos?.length>0" class="border"> 95 <div v-if="form.cptVisaInfoBos?.length>0" class="border">
94 <el-table :data="form.cptVisaInfoBos" border size="small"> 96 <el-table :data="form.cptVisaInfoBos" border size="small">
97 <el-table-column prop="passportCopy" :label="language==0?'护照':'Passport Copy'" min-width="100">
98 <template #default="scope">
99 <el-image style="width: 60px"
100 :src="fillImgUrl(scope.row.passportCopy)"/>
101 </template>
102 </el-table-column>
95 <el-table-column prop="position" :label="'position'" min-width="100"> 103 <el-table-column prop="position" :label="'position'" min-width="100">
96 <template #default="scope"> 104 <template #default="scope">
97 <el-input v-model="scope.row.position" size="small"/> 105 <el-input v-model="scope.row.position" size="small"/>
...@@ -163,18 +171,16 @@ ...@@ -163,18 +171,16 @@
163 </template> 171 </template>
164 </el-table-column> 172 </el-table-column>
165 </el-table> 173 </el-table>
166
167 </div> 174 </div>
168 175
169 </div> 176 </div>
170 <!-- 补充材料--> 177 <!-- 补充材料-->
171 <el-form-item :label="language==0?'补充材料':'Additional Documents'" prop="files"> 178 <el-form-item :label="language==0?'补充材料':'Additional Documents'" prop="files">
172 <file-upload v-model="form.files" :limit="1" :is-show-tip="false" 179 <file-upload v-model="form.files" :limit="1" :is-show-tip="false"
173 :button-text="language==0?'上传':'Upload'"/> 180 :button-text="language==0?'上传':'Upload'"/>
174 </el-form-item> 181 </el-form-item>
175 182
176 183
177
178 <div class="text-center"> 184 <div class="text-center">
179 <el-button type="primary" size="large" @click="submit" round class="btn-lineG"> 185 <el-button type="primary" size="large" @click="submit" round class="btn-lineG">
180 {{ language == 0 ? '提交' : 'SUBMIT' }} 186 {{ language == 0 ? '提交' : 'SUBMIT' }}
...@@ -194,12 +200,15 @@ import {ElMessage, ElMessageBox} from "element-plus"; ...@@ -194,12 +200,15 @@ import {ElMessage, ElMessageBox} from "element-plus";
194 import {addInvitation, associationList, countryList, getVisaInfo} from "@/apiPc/match"; 200 import {addInvitation, associationList, countryList, getVisaInfo} from "@/apiPc/match";
195 import ImageUpload from '@/components/ImageUpload/index.vue' 201 import ImageUpload from '@/components/ImageUpload/index.vue'
196 import useUserStore from "@/store/modules/user"; 202 import useUserStore from "@/store/modules/user";
203 import _ from 'lodash'
204 import FileUpload from "@/components/FileUpload";
205
197 const user = useUserStore().user 206 const user = useUserStore().user
198 const {proxy} = getCurrentInstance() 207 const {proxy} = getCurrentInstance()
199 const language = useStorage('language', 0) 208 const language = useStorage('language', 0)
200 const form = ref({ 209 const form = ref({
201 gender:'0', 210 gender: '0',
202 cptVisaInfoBos:[] 211 cptVisaInfoBos: []
203 }) 212 })
204 const show = ref(false) 213 const show = ref(false)
205 const showR = ref(false) 214 const showR = ref(false)
...@@ -219,7 +228,6 @@ const rules = ref( ...@@ -219,7 +228,6 @@ const rules = ref(
219 departure: [{required: true, trigger: 'change', message: language.value == 0 ? '请选择' : 'Please choose'},], 228 departure: [{required: true, trigger: 'change', message: language.value == 0 ? '请选择' : 'Please choose'},],
220 }) 229 })
221 const open = (params) => { 230 const open = (params) => {
222 console.log(params)
223 show.value = true 231 show.value = true
224 title.value = params.title 232 title.value = params.title
225 cptId.value = params.cptId 233 cptId.value = params.cptId
...@@ -235,9 +243,8 @@ function getVisa() { ...@@ -235,9 +243,8 @@ function getVisa() {
235 getVisaInfo({ 243 getVisaInfo({
236 userId: user.userId, 244 userId: user.userId,
237 cptId: cptId.value 245 cptId: cptId.value
238 }).then(res=>{ 246 }).then(res => {
239 console.log(res) 247 if (res.data && res.data.status != 2) {
240 if(res.data && res.data.status!=2){
241 showR.value = true 248 showR.value = true
242 form.value = res.data 249 form.value = res.data
243 } else { 250 } else {
...@@ -245,19 +252,22 @@ function getVisa() { ...@@ -245,19 +252,22 @@ function getVisa() {
245 } 252 }
246 }) 253 })
247 } 254 }
255
248 function getCountryList() { 256 function getCountryList() {
249 countryList().then(res => { 257 countryList().then(res => {
250 countrys.value = res.data 258 countrys.value = res.data
251 }) 259 })
252 } 260 }
261
253 function getMNAList() { 262 function getMNAList() {
254 associationList().then(res=>{ 263 associationList().then(res => {
255 mnaList.value = res.data 264 mnaList.value = res.data
256 }) 265 })
257 } 266 }
267
258 const submit = () => { 268 const submit = () => {
259 console.log(form.value) 269 console.log(form.value)
260 if (form.value.email.indexOf('@') == -1) { 270 if (form.value.email?.indexOf('@') == -1) {
261 if (language.value == 0) { 271 if (language.value == 0) {
262 ElMessage.warning('请填写正确的邮箱') 272 ElMessage.warning('请填写正确的邮箱')
263 } else { 273 } else {
...@@ -265,9 +275,6 @@ const submit = () => { ...@@ -265,9 +275,6 @@ const submit = () => {
265 } 275 }
266 return 276 return
267 } 277 }
268 // if (Array.isArray(form.value.passportCopy)) {
269 // form.value.passportCopy = form.value.passportCopy[0].url
270 // }
271 if (form.value.files && Array.isArray(form.value.files)) { 278 if (form.value.files && Array.isArray(form.value.files)) {
272 form.value.files = form.value.files[0]?.url 279 form.value.files = form.value.files[0]?.url
273 } 280 }
...@@ -282,7 +289,7 @@ const submit = () => { ...@@ -282,7 +289,7 @@ const submit = () => {
282 }).then(() => { 289 }).then(() => {
283 form.value.cptId = cptId.value 290 form.value.cptId = cptId.value
284 addInvitation(form.value).then((res) => { 291 addInvitation(form.value).then((res) => {
285 ElMessage.success(language.value == 0 ?'提交成功':'Successfully!') 292 ElMessage.success(language.value == 0 ? '提交成功' : 'Successfully!')
286 showR.value = true 293 showR.value = true
287 }) 294 })
288 }) 295 })
...@@ -291,39 +298,58 @@ const submit = () => { ...@@ -291,39 +298,58 @@ const submit = () => {
291 } 298 }
292 299
293 const getPassportInfo = (res) => { 300 const getPassportInfo = (res) => {
294 console.log(res.data) 301 if (res.data) {
295 if(res.data){
296 var obj = { 302 var obj = {
297 position:'', 303 position: '',
298 lastName:'', 304 lastName: '',
299 fristName:res.data.name, 305 fristName: res.data.name,
300 sex:res.data.sex, 306 sex: res.data.sex,
301 birthday:res.data.birth?.slice(0,10), 307 birthday: res.data.birth?.slice(0, 10),
302 nationality:'', 308 nationality: '',
303 passportNo:res.data.code, 309 passportNo: res.data.code,
304 issueDate:'', 310 issueDate: '',
305 expiryDate:'', 311 expiryDate: '',
312 passportCopy: res.data.pic
306 } 313 }
307 form.value.cptVisaInfoBos.push(obj) 314 form.value.cptVisaInfoBos.push(obj)
308 } else { 315 } else {
309 ElMessage.error(res.msg) 316 ElMessage.error(res.msg)
310 } 317 }
311 } 318 }
312 function delPassportInfo(row) {
313 319
320 function delPassportInfo(row) {
321 console.log(row,form.value.cptVisaInfoBos)
322 form.value.cptVisaInfoBos = _.remove(form.value.cptVisaInfoBos, row)
314 } 323 }
315 324
316 </script> 325 </script>
317 326
318 <style scoped lang="scss"> 327 <style scoped lang="scss">
319 .tip{font-size: 12px;} 328 :deep(.el-upload--picture-card) {
329 --el-upload-picture-card-size: 60px;
330 }
331
332 .tip {
333 font-size: 12px;
334 }
335
320 .boxInvitation { 336 .boxInvitation {
321 width: 96%; 337 width: 96%;
322 margin:20px auto 0; 338 margin: 20px auto 0;
323 } 339 }
324 h4{font-size: 15px;line-height: 1.6;} 340
325 .cptVisaInfoBosTable{padding: 15px;margin-bottom: 20px; 341 h4 {
342 font-size: 15px;
343 line-height: 1.6;
344 }
345
346 .cptVisaInfoBosTable {
347 padding: 15px;
348 margin-bottom: 20px;
326 border: 1px dashed #ebeef5; 349 border: 1px dashed #ebeef5;
327 :deep(.el-table .el-table__header-wrapper th){font-size: 12px;} 350
351 :deep(.el-table .el-table__header-wrapper th) {
352 font-size: 12px;
353 }
328 } 354 }
329 </style> 355 </style>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!