Browse Source

上传修改

master
前端-胡立永 2 months ago
parent
commit
7354075164
5 changed files with 556 additions and 317 deletions
  1. +2
    -1
      api/api.js
  2. +12
    -0
      api/model/examination.js
  3. +8
    -5
      pages/index/consult.vue
  4. +469
    -0
      pages_order/work/postConsult - 副本.vue
  5. +65
    -311
      pages_order/work/postConsult.vue

+ 2
- 1
api/api.js View File

@ -7,7 +7,8 @@ let debounce = {}
const models = [
'score', 'boss', 'login', 'vip', 'company', 'work','index-lzx', 'resume',
'config'
'config',
'examination',
]
const config = {


+ 12
- 0
api/model/examination.js View File

@ -0,0 +1,12 @@
// 考证咨询
const api = {
// 考证咨询-根据id查询证书详情
queryCertById: {
url: '/employ/examination/queryCertById',
method: 'GET',
},
}
export default api

+ 8
- 5
pages/index/consult.vue View File

@ -6,9 +6,10 @@
<view class="list">
<view class="item"
v-for="(item, index) in list" :key="index"
@click="$utils.navigateTo('/pages_order/work/postConsult')">
@click="$utils.navigateTo('/pages_order/work/postConsult?id=' + item.id)">
<image :src="item.headImage"
mode="aspectFill"></image>
class="image"
mode="widthFix"></image>
<view class="info">
<view class="title">
@ -71,18 +72,20 @@
.list{
.item{
display: flex;
margin: 30rpx;
.image{
width: 200rpx;
height: 100%;
min-height: 300rpx;
border-radius: 20rpx;
margin-right: 20rpx;
}
.info{
.title{
font-weight: 900;
}
.text{
font-size: 26rpx;
color: #777;
}
}
}


+ 469
- 0
pages_order/work/postConsult - 副本.vue View File

@ -0,0 +1,469 @@
<template>
<view class="page">
<navbar
title="需提交的材料"
leftClick
@leftClick="$utils.navigateBack"
/>
<view class="form">
<!-- <view class="form-item">
<view class="title">
请提交所需要的相对于的材料
</view>
<view class="tips">
信息仅用于考证咨询方面保证您的信息安全
</view>
</view>
<view class="form-item">
<uv-upload
:fileList="fileList"
:maxCount="1"
width="690rpx"
height="280rpx"
multiple
@afterRead="afterRead"
@delete="deleteImage">
<view class="upload">
<image src="../static/auth/cart.png"
mode="aspectFit"
style="width: 390rpx;height: 280rpx;" />
<view class="btn-add">
点击上传
</view>
</view>
</uv-upload>
</view>
<view class="form-item">
<view class="tips"
style="text-align: center;padding: 20rpx 0;">
(确保文字清晰可辨避免遮挡不全反光)
</view>
</view> -->
<!-- <view class="form-item">
<view class="label">
头像
</view>
<view class="input">
<image src="../static/postConsult/4.png" mode="aspectFill"></image>
</view>
<view class="icon">
<uv-icon
name="arrow-right"
size="30rpx"
></uv-icon>
</view>
</view> -->
<view class="form-item">
<view class="label">
真实姓名
</view>
<view class="input">
<input type="text"
placeholder="请输入真实姓名"
v-model="form.name"/>
</view>
</view>
<view class="form-item">
<view class="label">
手机号
</view>
<view class="input">
<input type="text"
placeholder="请输入手机号"
v-model="form.phone"/>
</view>
</view>
<view class="form-item">
<view class="label">
身份证号码
</view>
<view class="input">
<input type="text"
placeholder="请输入身份证号码"
v-model="form.phone"/>
</view>
</view>
<view class="form-item">
<view class="label">
工作单位
</view>
<view class="input">
<input type="text"
placeholder="请输入工作单位"
v-model="form.phone"/>
</view>
</view>
<view class="form-item">
<view class="label required">
个人信息<text>用于下载学时证明考试使用</text>
</view>
</view>
<view class="form-item">
<view class="label required">
个人免冠照<text>白底彩照1张</text>
</view>
<view class="input">
<uv-upload
:fileList="fileList"
name="fileList"
:maxCount="1"
width="120rpx"
height="120rpx"
multiple
@afterRead="afterRead"
@delete="deleteImage">
<view class="upload">
<image src="../static/postConsult/4.png"
mode="aspectFit"
style="width: 120rpx;height: 120rpx;" />
</view>
</uv-upload>
</view>
<view class="icon">
<uv-icon
name="arrow-right"
size="30rpx"
></uv-icon>
</view>
</view>
<view class="form-item">
<view class="label required">
身份证正面
</view>
<view class="input">
<uv-upload
:fileList="fileFrontList"
name="fileFrontList"
:maxCount="1"
width="120rpx"
height="120rpx"
multiple
@afterRead="afterRead"
@delete="deleteImage">
<view class="upload">
<image src="../static/postConsult/2.png"
mode="aspectFit"
style="width: 120rpx;height: 120rpx;" />
</view>
</uv-upload>
</view>
<view class="icon">
<uv-icon
name="arrow-right"
size="30rpx"
></uv-icon>
</view>
</view>
<!-- 身份证反面 -->
<view class="form-item">
<view class="label required">
身份证反面
</view>
<view class="input">
<uv-upload
:fileList="fileReverseList"
name="fileReverseList"
:maxCount="1"
width="120rpx"
height="120rpx"
multiple
@afterRead="afterRead"
@delete="deleteImage">
<view class="upload">
<image src="../static/postConsult/3.png"
mode="aspectFit"
style="width: 120rpx;height: 120rpx;" />
</view>
</uv-upload>
</view>
<view class="icon">
<uv-icon
name="arrow-right"
size="30rpx"
></uv-icon>
</view>
</view>
<!-- 申请表电子表格 -->
<view class="form-item">
<view class="label required">
申请表电子表格<text>申请表电子表格填写完打印出来本人签字及日期单位右边加盖公章1份</text>
</view>
<view class="input">
<uv-upload
:fileList="fileReverseList"
name="fileReverseList"
:maxCount="1"
width="120rpx"
height="120rpx"
multiple
@afterRead="afterRead"
@delete="deleteImage">
<view class="upload">
<image src="../static/postConsult/1.png"
mode="aspectFit"
style="width: 120rpx;height: 120rpx;" />
</view>
</uv-upload>
</view>
<view class="icon">
<uv-icon
name="arrow-right"
size="30rpx"
></uv-icon>
</view>
</view>
<!-- 初中以上学历证书 -->
<view class="form-item">
<view class="label required">
初中以上学历证书<text>或户口本本人那页复印件1份)</text>
</view>
<view class="input">
<uv-upload
:fileList="fileEducationalList"
name="fileEducationalList"
:maxCount="1"
width="120rpx"
height="120rpx"
multiple
@afterRead="afterRead"
@delete="deleteImage">
<view class="upload">
<image src="../static/postConsult/5.png"
mode="aspectFit"
style="width: 120rpx;height: 120rpx;" />
</view>
</uv-upload>
</view>
<view class="icon">
<uv-icon
name="arrow-right"
size="30rpx"
></uv-icon>
</view>
</view>
<!-- 营业执照复印件1份 -->
<view class="form-item">
<view class="label required">
营业执照复印件1份
</view>
<view class="input">
<uv-upload
:fileList="fileBusinessList"
name="fileBusinessList"
:maxCount="1"
width="120rpx"
height="120rpx"
multiple
@afterRead="afterRead"
@delete="deleteImage">
<view class="upload">
<image src="../static/postConsult/6.png"
mode="aspectFit"
style="width: 120rpx;height: 120rpx;" />
</view>
</uv-upload>
</view>
<view class="icon">
<uv-icon
name="arrow-right"
size="30rpx"
></uv-icon>
</view>
</view>
<!-- 个人健康书面承诺 -->
<view class="form-item">
<view class="label required">
个人健康书面承诺1份
</view>
<view class="input">
<uv-upload
:fileList="filePromiseList"
name="filePromiseList"
:maxCount="1"
width="120rpx"
height="120rpx"
multiple
@afterRead="afterRead"
@delete="deleteImage">
<view class="upload">
<image src="../static/auth/cart.png"
mode="aspectFit"
style="width: 120rpx;height: 120rpx;" />
</view>
</uv-upload>
</view>
<view class="icon">
<uv-icon
name="arrow-right"
size="30rpx"
></uv-icon>
</view>
</view>
</view>
<view class="uni-color-btn" @click="addMaterial()">
提交
</view>
<view class="uni-uncolor-btn"
@click="$refs.customerServicePopup.open()">
联系客服
</view>
<view class="form-item">
<view class="tips"
style="text-align: center;padding: 20rpx 0;">
如有疑问请联系客服
</view>
</view>
<customerServicePopup ref="customerServicePopup"/>
</view>
</template>
<script>
import customerServicePopup from '@/components/config/customerServicePopup.vue'
export default {
components : {
customerServicePopup
},
data() {
return {
form : {
name : ''
},
fileList : [],//
fileFrontList : [],//
fileReverseList : [],//
fileApplicationList : [],//
fileEducationalList : [],//
fileBusinessList : [],//1
filePromiseList : [],//1
}
},
methods: {
deleteImage(e){
this[e.name].splice(e.index, 1)
},
afterRead(e){
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self[e.name].push({
url
})
})
})
},
addMaterial(){
this.form.imageCardFront = this.fileFrontList.map((item) => item.url).join(",")
this.form.imageCardfBack = this.fileReverseList.map((item) => item.url).join(",")
if(this.$utils.verificationAll(this.form,{
name:'请输入用户名称',
phone:'请输入电话',
imageCardFront:'请选择身份证正面照复印件',
imageCardfBack:'请选择身份证反面照复印件'
})) {
return
}
this.$api('addMaterial',this.form, res =>{
if(res.code == 200){
uni.showToast({
title:'提交成功!等待审核',
icon: 'none'
})
}
})
},
}
}
</script>
<style scoped lang="scss">
.page{
min-height: 100vh;
.required::before{
content: '*';
color: #f00;
}
.form-item{
padding: 30rpx 0;
display: flex;
align-items: center;
border-bottom: 1rpx solid #00000009;
font-size: 28rpx;
.label{
font-weight: 600;
margin-right: 50rpx;
text{
font-size: 24rpx;
font-weight: 500;
}
}
.input{
margin-left: auto;
flex-shrink: 0;
image{
}
input{
text-align: right;
}
}
.icon{
margin-left: 10rpx;
}
}
.tips{
font-size: 26rpx;
color: #777;
padding-bottom: 20rpx;
}
.form {
padding: 0 30rpx;
background-color: #fff;
margin: 20rpx;
border-radius: 20rpx;
.upload{
display: flex;
justify-content: center;
align-items: center;
// width: 690rpx;
width: 120rpx;
height: 120rpx;
border-radius: 50%;
overflow: hidden;
background-color: #f3f3f3;
border-radius: 10rpx;
// .btn-add{
// margin: auto;
// padding: 10rpx 20rpx;
// background-color: $uni-color;
// color: #fff;
// border-radius: 10rpx;
// }
}
}
}
</style>

+ 65
- 311
pages_order/work/postConsult.vue View File

@ -7,294 +7,26 @@
/>
<view class="form">
<!-- <view class="form-item">
<view class="title">
请提交所需要的相对于的材料
</view>
<view class="tips">
信息仅用于考证咨询方面保证您的信息安全
</view>
</view>
<view class="form-item">
<uv-upload
:fileList="fileList"
:maxCount="1"
width="690rpx"
height="280rpx"
multiple
@afterRead="afterRead"
@delete="deleteImage">
<view class="upload">
<image src="../static/auth/cart.png"
mode="aspectFit"
style="width: 390rpx;height: 280rpx;" />
<view class="btn-add">
点击上传
</view>
</view>
</uv-upload>
</view>
<view class="form-item">
<view class="tips"
style="text-align: center;padding: 20rpx 0;">
(确保文字清晰可辨避免遮挡不全反光)
</view>
</view> -->
<!-- <view class="form-item">
<view class="label">
头像
</view>
<view class="input">
<image src="../static/postConsult/4.png" mode="aspectFill"></image>
</view>
<view class="icon">
<uv-icon
name="arrow-right"
size="30rpx"
></uv-icon>
</view>
</view> -->
<view class="form-item">
<view class="label">
真实姓名
</view>
<view class="input">
<input type="text"
placeholder="请输入真实姓名"
v-model="form.name"/>
</view>
</view>
<view class="form-item">
<view class="label">
手机号
</view>
<view class="input">
<input type="text"
placeholder="请输入手机号"
v-model="form.phone"/>
</view>
</view>
<view class="form-item">
<view class="label">
身份证号码
</view>
<view class="input">
<input type="text"
placeholder="请输入身份证号码"
v-model="form.phone"/>
</view>
</view>
<view class="form-item">
<view class="form-item"
:key="item.id"
v-for="(item, index) in formList">
<view class="label">
工作单位
{{ item.title }}<text>{{ item.descrip }}</text>
</view>
<view class="input">
<view class="input"
v-if="item.type == 0">
<input type="text"
placeholder="请输入工作单位"
v-model="form.phone"/>
:placeholder="'请输入' + item.title"
v-model="form[item.keyName]"/>
</view>
</view>
<view class="form-item">
<view class="label required">
个人信息<text>用于下载学时证明考试使用</text>
</view>
</view>
<view class="form-item">
<view class="label required">
个人免冠照<text>白底彩照1张</text>
</view>
<view class="input">
<uv-upload
:fileList="fileList"
name="fileList"
:maxCount="1"
width="120rpx"
height="120rpx"
multiple
@afterRead="afterRead"
@delete="deleteImage">
<view class="upload">
<image src="../static/postConsult/4.png"
mode="aspectFit"
style="width: 120rpx;height: 120rpx;" />
</view>
</uv-upload>
</view>
<view class="icon">
<uv-icon
name="arrow-right"
size="30rpx"
></uv-icon>
</view>
</view>
<view class="form-item">
<view class="label required">
身份证正面
</view>
<view class="input">
<uv-upload
:fileList="fileFrontList"
name="fileFrontList"
:maxCount="1"
width="120rpx"
height="120rpx"
multiple
@afterRead="afterRead"
@delete="deleteImage">
<view class="upload">
<image src="../static/postConsult/2.png"
mode="aspectFit"
style="width: 120rpx;height: 120rpx;" />
</view>
</uv-upload>
</view>
<view class="icon">
<uv-icon
name="arrow-right"
size="30rpx"
></uv-icon>
</view>
</view>
<!-- 身份证反面 -->
<view class="form-item">
<view class="label required">
身份证反面
</view>
<view class="input">
<uv-upload
:fileList="fileReverseList"
name="fileReverseList"
:maxCount="1"
width="120rpx"
height="120rpx"
multiple
@afterRead="afterRead"
@delete="deleteImage">
<view class="upload">
<image src="../static/postConsult/3.png"
mode="aspectFit"
style="width: 120rpx;height: 120rpx;" />
</view>
</uv-upload>
</view>
<view class="icon">
<uv-icon
name="arrow-right"
size="30rpx"
></uv-icon>
</view>
</view>
<!-- 申请表电子表格 -->
<view class="form-item">
<view class="label required">
申请表电子表格<text>申请表电子表格填写完打印出来本人签字及日期单位右边加盖公章1份</text>
</view>
<view class="input">
<uv-upload
:fileList="fileReverseList"
name="fileReverseList"
:maxCount="1"
width="120rpx"
height="120rpx"
multiple
@afterRead="afterRead"
@delete="deleteImage">
<view class="upload">
<image src="../static/postConsult/1.png"
mode="aspectFit"
style="width: 120rpx;height: 120rpx;" />
</view>
</uv-upload>
</view>
<view class="icon">
<uv-icon
name="arrow-right"
size="30rpx"
></uv-icon>
</view>
</view>
<!-- 初中以上学历证书 -->
<view class="form-item">
<view class="label required">
初中以上学历证书<text>或户口本本人那页复印件1份)</text>
</view>
<view class="input">
<uv-upload
:fileList="fileEducationalList"
name="fileEducationalList"
:maxCount="1"
width="120rpx"
height="120rpx"
multiple
@afterRead="afterRead"
@delete="deleteImage">
<view class="upload">
<image src="../static/postConsult/5.png"
mode="aspectFit"
style="width: 120rpx;height: 120rpx;" />
</view>
</uv-upload>
</view>
<view class="icon">
<uv-icon
name="arrow-right"
size="30rpx"
></uv-icon>
</view>
</view>
<!-- 营业执照复印件1份 -->
<view class="form-item">
<view class="label required">
营业执照复印件1份
</view>
<view class="input">
<uv-upload
:fileList="fileBusinessList"
name="fileBusinessList"
:maxCount="1"
width="120rpx"
height="120rpx"
multiple
@afterRead="afterRead"
@delete="deleteImage">
<view class="upload">
<image src="../static/postConsult/6.png"
mode="aspectFit"
style="width: 120rpx;height: 120rpx;" />
</view>
</uv-upload>
</view>
<view class="icon">
<uv-icon
name="arrow-right"
size="30rpx"
></uv-icon>
</view>
</view>
<!-- 个人健康书面承诺 -->
<view class="form-item">
<view class="label required">
个人健康书面承诺1份
</view>
<view class="input">
<view class="input"
v-else>
<uv-upload
:fileList="filePromiseList"
name="filePromiseList"
:fileList="fileMapList[item.keyName]"
:name="item.keyName"
:maxCount="1"
width="120rpx"
height="120rpx"
@ -302,13 +34,14 @@
@afterRead="afterRead"
@delete="deleteImage">
<view class="upload">
<image src="../static/auth/cart.png"
<image :src="item.image"
mode="aspectFit"
style="width: 120rpx;height: 120rpx;" />
</view>
</uv-upload>
</view>
<view class="icon">
<view class="icon"
v-if="item.type == 1">
<uv-icon
name="arrow-right"
size="30rpx"
@ -317,8 +50,11 @@
</view>
</view>
<view class="uni-color-btn" @click="addMaterial()">
<view class="uni-color-btn"
v-if="formList.length > 0"
@click="addMaterial()">
提交
</view>
@ -327,11 +63,10 @@
联系客服
</view>
<view class="form-item">
<view class="tips"
style="text-align: center;padding: 20rpx 0;">
如有疑问请联系客服
</view>
<view class="tips"
style="text-align: center;padding: 20rpx 0;
width: 750rpx;">
如有疑问请联系客服
</view>
<customerServicePopup ref="customerServicePopup"/>
@ -347,44 +82,41 @@
data() {
return {
form : {
name : ''
},
fileList : [],//
fileFrontList : [],//
fileReverseList : [],//
fileApplicationList : [],//
fileEducationalList : [],//
fileBusinessList : [],//1
filePromiseList : [],//1
fileMapList : {},
formList : [],
id : 0,
verification : {},
}
},
onLoad({id}) {
this.id = id
this.queryCertById()
},
methods: {
deleteImage(e){
this[e.name].splice(e.index, 1)
this.fileMapList[e.name].splice(e.index, 1)
},
afterRead(e){
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self[e.name].push({
self.fileMapList[e.name].push({
url
})
})
})
},
addMaterial(){
this.form.imageCardFront = this.fileFrontList.map((item) => item.url).join(",")
this.form.imageCardfBack = this.fileReverseList.map((item) => item.url).join(",")
this.formList.forEach(n => {
if(n.type == 1){
this.form[n.keyName] = this.fileMapList[n.keyName]
.map((item) => item.url).join(",")
}
})
if(this.$utils.verificationAll(this.form,{
name:'请输入用户名称',
phone:'请输入电话',
imageCardFront:'请选择身份证正面照复印件',
imageCardfBack:'请选择身份证反面照复印件'
})) {
if(this.$utils.verificationAll(this.form, this.verification)) {
return
}
this.$api('addMaterial',this.form, res =>{
@ -392,7 +124,29 @@
uni.showToast({
title:'提交成功!等待审核',
icon: 'none'
})
})
setTimeout(uni.navigateBack, 1000, -1)
}
})
},
queryCertById(){
this.$api('queryCertById', {
cerId : this.id,
}, res => {
if(res.code == 200){
this.formList = res.result.employMaterialList
res.result.employMaterialList.forEach(n => {
if(n.type == 0){
this.verification[n.keyName] = '请输入' + n.title
this.form[n.keyName] = ''
}else{
this.verification[n.keyName] = '请上传' + n.title
// this.fileMapList[n.keyName] = []
this.$set(this.fileMapList, n.keyName, [])
}
})
}
})
},


Loading…
Cancel
Save