企业认证+我的修改

main
lijingyu007 6 months ago
parent 9fe99b581e
commit adaa1bee50
  1. 294
      pages/personal/personal.vue
  2. 2
      pages/personal/setup/Information.vue
  3. 158
      pages/personal/setup/certification.vue
  4. 282
      pages/personal/setup/companyApply.vue
  5. 33
      pages/personal/setup/companyMsg.vue

@ -17,12 +17,33 @@
</p>
<p v-else style='margin-bottom:5px;font-size:17px;font-weight:600;'>{{nickName}}</p>
<view style="display: flex;align-items: center;">
<p v-if='phoneuserinfo.userName'
<!-- <p v-if='phoneuserinfo.userName'
style='color:rgb(0 0 0/0.7);margin-right:10px;font-size:15px;'>UID:
{{phoneuserinfo.userName}}
</p>
<u-tag :text="testerStatustext" plan type="info" shape='circle' color='#FEFEFE'
bg-color='#1A81F9' border-color='transparent' @click="nextcert" />
</p> -->
<block v-if="!applyInfo.applyId && !applyInfo.companyApplyId">
<view class="unapply" @click="goApply">
未认证
</view>
</block>
<block v-else-if="applyInfo.applyId">
<view class="userapply" @click="goUserApply">
<image src="../../static/crowd/PAYB.png" mode=""></image>
<view class="userapplytext">
个人
</view>
</view>
</block>
<block v-else-if="applyInfo.companyApplyId">
<view class="companyapply" @click="goCompanyApply">
<image src="../../static/crowd/PAYB.png" mode=""></image>
<view class="companyapplytext">
企业
</view>
</view>
</block>
<!-- <u-tag :text="testerStatustext" plan type="info" shape='circle' color='#FEFEFE'
bg-color='#1A81F9' border-color='transparent' @click="nextcert" /> -->
</view>
</view>
</view>
@ -41,7 +62,7 @@
<view class="cytitle">
常用功能
</view>
<view class="cycontent">
<view class="cycontentgrid">
<view class="cycontentit" @click="servier('myper')">
<image src="../../static/index/zc.png" class="cycontentitimg" mode=""></image>
<view class="cycontentittext">
@ -70,32 +91,42 @@
</view>
</view>
<view class="changyong changyong1">
<view class="cyboxtop">
<view class="cytitle">
基本功能
</view>
<view class="cycontent">
<view class="cycontentgrid">
<view class="cycontentit" @click="orders">
<image src="../../static/index/zc.png" class="cycontentitimg" mode=""></image>
<view class="cycontentittext">
我的订单
</view>
</view>
<view class="cycontentit" @click="servier('peixunban')">
<view class="cycontentit" @click="servier('peixunban')" v-if="signuplistLength != 0">
<image src="../../static/index/zc.png" class="cycontentitimg" mode=""></image>
<view class="cycontentittext">
报名管理
</view>
</view>
<view class="cycontentit" @click="servier('notes')">
<view v-if="applyInfo.companyApplyId" class="cycontentit cycontentitcompany"
@click="servier('companynotes')">
<view class="cycontentitcompanyws" v-if="applyInfo.companyDesc && applyInfo.companyDesc == '无'">
待完善
</view>
<image src="../../static/index/zc.png" class="cycontentitimg" mode=""></image>
<view class="cycontentittext">
企业简介
</view>
</view>
<view v-else class="cycontentit" @click="servier('notes')">
<image src="../../static/index/zc.png" class="cycontentitimg" mode=""></image>
<view class="cycontentittext">
个人简历
</view>
</view>
<view class="cycontentit" @click="servier('usepeople')">
<view class="cycontentit" @click="servier('usepeople')" v-if="useListLength != 0">
<image src="../../static/index/zc.png" class="cycontentitimg" mode=""></image>
<view class="cycontentittext">
用人记录
@ -103,95 +134,10 @@
</view>
</view>
</view>
</view>
<!-- <view style='width:94vw;margin:10px 3vw 0 3vw;'>
<view class="handle" style='padding:15px 12px 5px 15px; '>
<text style='font-weight:bold;font-size:15px;'>推荐功能</text>
<view class="advance" @click="servier('message')">
<img src="http://image.keyitest.cn/static/my/mmessage.png" alt="" />
<view class="medaget">
<p>消息中心</p>
<u-icon name="arrow-right" color="#CCCCCC" style="margin-top: 2px;"></u-icon>
</view>
</view>
<view class="advance" @click="servier('bcrowd')">
<img src="http://image.keyitest.cn/static/my/mbcrowd.png" alt="" />
<view class="medaget">
<p>我的众包</p>
<u-icon name="arrow-right" color="#CCCCCC" style="margin-top: 2px;"></u-icon>
</view>
</view>
<view class="advance" @click="servier('authentication')">
<img src="http://image.keyitest.cn/static/my/mauthentication.png" alt="" />
<view class="medaget">
<p>实名认证</p>
<u-icon name="arrow-right" color="#CCCCCC" style="margin-top: 2px;"></u-icon>
</view>
</view>
<view class="advance" @click="servier('peixunban')">
<img src="http://image.keyitest.cn/static/index/renliwb/peixunbanlogo.png" alt="" />
<view class="medaget">
<p>我的培训班</p>
<u-icon name="arrow-right" color="#CCCCCC" style="margin-top: 2px;"></u-icon>
</view>
</view>
<view class="advance" @click="orders">
<img src="http://image.keyitest.cn/static/index/renliwb/orderlogo.png" alt="" />
<view class="medaget">
<p>我的订单</p>
<u-icon name="arrow-right" color="#CCCCCC" style="margin-top: 2px;"></u-icon>
</view>
</view>
<view class="advance" @click="servier('usepeople')">
<img src="http://image.keyitest.cn/static/index/renliwb/yongrenlogo.png" alt="" />
<view class="medaget">
<p>我的用人需求</p>
<u-icon name="arrow-right" color="#CCCCCC" style="margin-top: 2px;"></u-icon>
</view>
</view>
<view class="advance" @click="servier('myreview')">
<img src="http://image.keyitest.cn/static/index/renliwb/reviewlogo.png" alt="" />
<view class="medaget">
<p>我的评价</p>
<u-icon name="arrow-right" color="#CCCCCC" style="margin-top: 2px;"></u-icon>
</view>
</view>
<view class="advance" @click="servier('notes')">
<img src="http://image.keyitest.cn/static/my/mnotes.png" alt="" />
<view class="medaget">
<p>个人简历</p>
<u-icon name="arrow-right" color="#CCCCCC" style="margin-top: 2px;"></u-icon>
</view>
</view>
<view class="advance" @click="servier('myper')">
<img src="http://image.keyitest.cn/static/my/mmyper.png" alt="" />
<view class="medaget">
<p>我的钱包</p>
<u-icon name="arrow-right" color="#CCCCCC" style="margin-top: 2px;"></u-icon>
</view>
</view>
<view class="advance" @click="servier('setmy')">
<img src="http://image.keyitest.cn/static/my/msetmy.png" alt="" />
<view class="medaget">
<p>设置</p>
<u-icon name="arrow-right" color="#CCCCCC" style="margin-top: 2px;"></u-icon>
</view>
</view>
<view class="advance" @click="servier('pcweb')">
<img src="http://image.keyitest.cn/static/my/mpcweb.png" alt="" />
<view class="medaget" style="border-bottom: none;">
<p>PC网页版</p>
<u-icon name="arrow-right" color="#CCCCCC" style="margin-top: 2px;"></u-icon>
</view>
</view>
</view>
</view> -->
<view style="height:15px"> </view>
@ -216,7 +162,10 @@
testerStatustext: '',
avatar: '',
nickName: '',
base: this.http.baseUrl
base: this.http.baseUrl,
applyInfo: {}, //
signuplistLength: 0, //
useListLength: 0, //
}
},
onShow() {
@ -228,32 +177,62 @@
this.http.quickGet(`/tester/cert/apply/${this.phoneuserinfo.userId}`, true).then(res => {
console.log('实名认证信息---', res)
if (res.data.code == 200) {
let testerdata = res.data.data;
if (testerdata) {
if (testerdata.status == 1) {
this.testerStatustext = '已认证'
} else {
this.testerStatustext = '未认证'
}
} else {
this.testerStatustext = '未认证'
this.applyInfo = res.data.data
if (res.data.data.companyStatus == 1 && this.phoneuserinfo.companyStatus != 2) {
this.phoneuserinfo.companyStatus = 2
uni.setStorageSync('wxUserInfo', this.phoneuserinfo)
}
} else {
this.testerStatustext = '未认证'
}
})
this.getNum()
} else {
this.phoneuserinfo = null
this.signuplistLength = 0
this.useListLength = 0
}
},
onLoad() {},
methods: {
//
async getNum() {
this.http.quickGet(`/train/myTrainingList`, true).then(res => {
this.signuplistLength = res.data.rows.length
})
const id = uni.getStorageSync('wxUserInfo').userId
const {
data
} = await this.http.quickGet(`/labor/my/demand/${id}`, true)
this.useListLength = data.rows.length
},
//
goApply() {
uni.navigateTo({
url: '/pages/personal/setup/applyType'
})
},
goUserApply() {
uni.navigateTo({
url: '/pages/personal/setup/certification'
})
},
goCompanyApply() {
uni.navigateTo({
url: '/pages/personal/setup/companyApply'
})
},
//
goSetUp() {
uni.navigateTo({
url: '/pages/personal/setup/index'
})
},
//
goUserInfo() {
uni.navigateTo({
url: '/pages/personal/setup/Information'
@ -350,6 +329,10 @@
uni.navigateTo({
url: '/pages/personal/setup/certification'
})
} else if (type == 'companynotes') {
uni.navigateTo({
url: '/pages/personal/setup/companyMsg'
})
} else if (type == 'notes') {
uni.navigateTo({
url: '/pages/personal/personalresume/personalresume'
@ -389,6 +372,68 @@
</script>
<style lang="scss">
//
.unapply {
width: 86rpx;
height: 32rpx;
line-height: 32rpx;
background: linear-gradient(90deg, #99A4B3, #77818D);
border-radius: 16rpx;
text-align: center;
font-weight: 500;
font-size: 22rpx;
color: #FEFEFE;
}
.userapply {
display: flex;
align-items: center;
image {
width: 27rpx;
height: 27rpx;
margin-right: 10rpx;
}
.userapplytext {
width: 86rpx;
height: 32rpx;
background: linear-gradient(90deg, #5EA6FD, #1A81F9);
border-radius: 16rpx;
line-height: 32rpx;
text-align: center;
font-weight: 500;
font-size: 22rpx;
color: #FEFEFE;
}
}
.companyapply {
display: flex;
align-items: center;
image {
width: 27rpx;
height: 27rpx;
margin-right: 10rpx;
}
.companyapplytext {
width: 86rpx;
height: 32rpx;
background: linear-gradient(90deg, #F9BD55, #F49C45);
border-radius: 16rpx;
line-height: 32rpx;
text-align: center;
font-weight: 500;
font-size: 22rpx;
color: #FEFEFE;
}
}
.seticon {
position: fixed;
top: 93rpx;
@ -396,6 +441,7 @@
width: 35rpx;
height: 35rpx;
}
.changyong {
width: 700rpx;
height: 230rpx;
@ -405,10 +451,12 @@
padding: 0 25rpx;
box-sizing: border-box;
margin: -120rpx auto 0 auto;
.cyboxtop {
display: flex;
flex-direction: column;
}
.cytitle {
font-weight: bold;
font-size: 30rpx;
@ -416,14 +464,33 @@
padding: 30rpx 0 10rpx 0;
}
.cycontent {
display: flex;
align-items: center;
justify-content: space-between;
padding: 25rpx;
.cycontentgrid {
padding: 25rpx 0;
box-sizing: border-box;
flex: 1;
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
.cycontentitcompany {
position: relative;
.cycontentitcompanyws {
position: absolute;
right: -20rpx;
top: -20rpx;
width: 80rpx;
height: 30rpx;
border-radius: 15rpx;
border: 1px solid #F49D46;
font-weight: 500;
font-size: 20rpx;
color: #F49F46;
line-height: 30rpx;
text-align: center;
}
}
.cycontentit {
display: flex;
flex-direction: column;
@ -447,8 +514,9 @@
.changyong1 {
margin: 40rpx auto 0 auto;
margin: 40rpx auto 0 auto;
}
.topbg {
width: 100vw;
height: 45vw;

@ -111,7 +111,7 @@
// }else{
// setavatar=this.http.baseUrl+avatar
// }
setavatar = avatar
setavatar = this.http.baseUrl + avatar
}else{
setavatar=''
}

@ -16,75 +16,16 @@
<u-input style="width:100%;" :disabled='istest' v-model="certobj.idNumber" placeholder='输入身份证号' />
</view>
</u-form-item>
<!-- <u-form-item label="所在城市:" prop="city" border-bottom='false' required='true'>
<view v-if="istest" class="sinput">
<u-input style="width:100%;" :disabled='istest' v-model="certobj.city" placeholder='输入所在城市' />
</view>
<view v-else class="sinput">
<u-input style="width:100%;" v-model="certobj.city" type="select" @click="cityshow = true" placeholder='输入所在城市' />
<u-select v-model="cityshow" :list="cityList" @confirm="citychange" mode="mutil-column-auto" ></u-select>
</view>
</u-form-item>
<u-form-item label="个人技能:" prop="testSkills" border-bottom='false' required='true'>
<view class="sinput">
<u-input style="width:100%;" :disabled='istest' v-model="certobj.testSkills" placeholder='输入个人技能'/>
</view>
</u-form-item>
<view class="sintitle" style="margin-top:15px;margin-left: -20px;">
<img src="/static/index/jnzs.png" alt="">
<p style="color:#fa3534;margin-right:3px">* </p>
<p>技能证书</p>
</view>
<u-form-item prop="certificateUrl" border-bottom='false' >
<u-upload width='100px' height='100px'
:action="action"
:disabled='istest'
:header="headers"
:auto-upload="true"
:show-progress="false"
max-count="1"
:deletable="true"
:file-list="certobj.certificateUrl"
@on-success="(data,index,lists) => {fielUploadSuc(data,index,lists) }"
@on-remove="(index, lists, name)=>{deleteUpfile(index)}"
@on-error="(data,index, lists)=>{errorUpfile(data,index, lists)}"
>
<view slot="addBtn" class="slot-btn" >
<img v-if="certobj.certificateUrl" :src="certobj.certificateUrl" mode="aspectFill" style="width: 100px;height: 100px;">
<div v-else class="upliacla">
<p style="font-size: 18px;">+</p>
<p>选择图片</p>
</div>
</view>
</u-upload>
<div v-if="certobj.certificateUrl&&istest">
<img v-if="certobj.certificateUrl.length>35" :src="certobj.certificateUrl" style="width: 100px;height: 100px;">
<p class="wuploa" v-else>未上传证书</p>
</div>
</u-form-item>
<view class="sintitle" style="margin-top:15px;margin-left: -20px;">
<img src="/static/index/gzjl.png" alt="">
<p>工作经历
<span style="font-size: 13px;color:#B3B3B3;margin-left: 5px;"> (非必填</span>
</p>
</view>
<u-form-item prop="workExperience" border-bottom='false' >
<view class="sinputrt">
<u-input style="width:100%;" :disabled='istest' v-model="certobj.workExperience" placeholder='输入内容...' type="textarea" auto-height="true"/>
</view>
</u-form-item>-->
</u-form>
<view style="margin-top: 30px;" v-if="testerStatus==3" >
<span ></span>
<span style="color:#fa3534">{{testerdata.auditOpinion?testerdata.auditOpinion:''}}</span>
<span style="color:#fa3534">{{testerdata.auditOpinion?testerdata.auditOpinion:''}}</span>
<span>审核未能通过请完善后再提交</span>
</view>
</view>
<view class="bottbtn" v-if="testerStatus==0" @click="resource">确定</view>
<view class="bottbtn" v-if="testerStatus==1" style="background: linear-gradient(90deg, #e8a034,#ff9900)">审核中</view>
<!-- <view class="bottbtn" v-if="testerStatus==1" style="background: linear-gradient(90deg, #e8a034,#ff9900)">审核中</view> -->
<view class="bottbtn" v-if="testerStatus==2" style="background: #909399">已认证</view>
<view class="bottbtn" v-if="testerStatus==3" @click="resource">修改</view>
<view style="height:10px"></view>
@ -99,13 +40,7 @@
cityshow:false,
certobj:{applyId:'',name:'',idNumber:'',city:'',certificateUrl:'',testSkills:'',workExperience:''},
wxUserInfo:null,
action: 'https://www.keyitest.cn/prod-api/upload',
headers:{
// 'TENANT-ID': 3, 'accept': '*/*',
// 'Connection': 'keep-alive','Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryDX4wOxgD9mzUzAIF',
// 'Origin': 'https://www.keyitest.cn', 'Accept-Encoding': 'gzip, deflate, br',
// 'Accept-Language': 'zh,zh-CN;q=0.9', 'Host': 'https://www.keyitest.cn',
// 'Referer':'https://www.keyitest.cn',
Authorization:'Bearer '+uni.getStorageSync('accessToken'),
},
@ -152,22 +87,15 @@
this.testerdata=res.data.data;
if(this.testerdata){
let {applyId,name,idNumber}=this.testerdata;
this.certobj={applyId,name,idNumber}
}
console.log('this.certobj---',this.certobj)
if(this.testerdata){
if(this.testerdata.status==0){
this.testerStatus=1
this.istest=true
this.cityshow=false
this.testerStatus=3
this.istest=false
}else if(this.testerdata.status==1){
this.testerStatus=2
let setidNumber=this.certobj.idNumber.slice(0,2)+'************'+this.certobj.idNumber.slice(14)
this.certobj.idNumber=setidNumber
this.istest=true
this.cityshow=false
}else if(this.testerdata.status==2){
this.testerStatus=3
}else{
@ -191,7 +119,6 @@
name:this.certobj.name,
idNumber:this.certobj.idNumber,
}
console.log('认证信息',data)
// return;
if(this.testerStatus==0){
// return;/tester/cert/update
@ -200,12 +127,9 @@
this.$refs.uToast.show({
title: '认证成功',
type: 'success',
url: '/pages/personal/personal',
isTab:true,
})
uni.redirectTo({
url: '/pages/personal/setup/certification' //
});
} else {
this.$refs.uToast.show({
title: res.data.msg,
@ -213,51 +137,16 @@
isTab:true,
})
}
let userId=this.wxUserInfo.userId
this.http.quickGet(`/tester/cert/apply/${userId}`,true).then(res=>{
this.testerdata=res.data.data;
if(this.testerdata){
let {applyId,name,idNumber}=this.testerdata;
this.certobj={applyId,name,idNumber}
}
console.log('this.certobj---',this.certobj)
if(this.testerdata){
if(this.testerdata.status==0){
this.testerStatus=1
this.istest=true
this.cityshow=false
}else if(this.testerdata.status==1){
this.testerStatus=2
let setidNumber=this.certobj.idNumber.slice(0,2)+'************'+this.certobj.idNumber.slice(14)
this.certobj.idNumber=setidNumber
this.istest=true
this.cityshow=false
}else if(this.testerdata.status==2){
this.testerStatus=3
}else{
this.testerStatus=0
}
}
})
})
}else{
this.http.quickPost(`/tester/cert/update`,data,true).then(res=>{
console.log('更新认证信息',res)
if(res.data.code==200){
this.$refs.uToast.show({
title: '认证成功',
type: 'success',
url: '/pages/personal/personal',
isTab:true,
})
uni.redirectTo({
url: '/pages/personal/setup/certification' //
});
}else{
this.$refs.uToast.show({
title: res.data.msg,
@ -265,37 +154,6 @@
isTab:true,
})
}
let userId=this.wxUserInfo.userId
this.http.quickGet(`/tester/cert/apply/${userId}`,true).then(res=>{
this.testerdata=res.data.data;
if(this.testerdata){
let {applyId,name,idNumber}=this.testerdata;
this.certobj={applyId,name,idNumber}
}
console.log('this.certobj---',this.certobj)
if(this.testerdata){
if(this.testerdata.status==0){
this.testerStatus=1
this.istest=true
this.cityshow=false
}else if(this.testerdata.status==1){
this.testerStatus=2
let setidNumber=this.certobj.idNumber.slice(0,2)+'************'+this.certobj.idNumber.slice(14)
this.certobj.idNumber=setidNumber
this.istest=true
this.cityshow=false
}else if(this.testerdata.status==2){
this.testerStatus=3
}else{
this.testerStatus=0
}
}
})
})
}
}else{

@ -1,30 +1,55 @@
<template>
<view class="companyApply">
<u-form :model="form" ref="form" label-position='top' label-width='150' border-bottom='false'>
<u-form-item label="企业证件照全称(必填)" prop="name" border-bottom='false' required='true'>
<u-input border style="width:100%;" :disabled='istest' v-model="form.name" placeholder='输入企业证件照' />
</u-form-item>
<u-form-item label="法人姓名" prop="idNumber" border-bottom='false' required='true'>
<u-input border style="width:100%;" :disabled='istest' v-model="form.idNumber" placeholder='输入法人姓名' />
</u-form-item>
<u-form-item label="上传营业执照正本" prop="idNumber" border-bottom='false' required='true'>
<u-upload width='100px' height='100px' :action="action" :disabled='istest' :header="headers"
:auto-upload="true" :show-progress="false" max-count="1" :deletable="true"
:file-list="form.certificateUrl"
@on-success="(data,index,lists) => {fielUploadSuc(data,index,lists) }"
@on-remove="(index, lists, name)=>{deleteUpfile(index)}"
@on-error="(data,index, lists)=>{errorUpfile(data,index, lists)}">
<!-- <view slot="addBtn" class="slot-btn">
<img v-if="form.certificateUrl" :src="form.certificateUrl" mode="aspectFill"
style="width: 100px;height: 100px;">
<div v-else class="upliacla">
<p style="font-size: 18px;">+</p>
<p>选择图片</p>
</div>
</view> -->
</u-upload>
</u-form-item>
</u-form>
<view class="contentBox">
<view class="sintitle">
<img src="/static/index/grxx.png" alt="">
<p>认证信息</p>
</view>
<u-form :model="form" ref="form" :rules="rules" label-position='top' label-width='150'
border-bottom='false'>
<u-form-item label="企业证件照全称(必填)" prop="name" border-bottom='false'>
<u-input border style="width:100%;" :disabled='form.companyStatus == 0||form.companyStatus == 1 '
v-model="form.name" placeholder='输入企业证件照全称' />
</u-form-item>
<u-form-item label="法人姓名" prop="contactName" border-bottom='false'>
<u-input border style="width:100%;" :disabled='form.companyStatus == 0 || form.companyStatus == 1'
v-model="form.contactName" placeholder='输入法人姓名' />
</u-form-item>
<u-form-item label="上传营业执照正本(证件须保持正向,不能翻转倾斜)" prop="businessLicenseUrl" border-bottom='false'>
<u-upload ref="upload" width='200px' height='100px' :action="action" :header="headers"
:auto-upload="true" :show-progress="false" max-count="1"
:deletable="form.companyStatus == 0 || form.companyStatus == 1 ? false: true"
:file-list="form.businessLicenseUrl"
@on-success="(data,index,lists) => {fielUploadSuc(data,index,lists) }"
@on-remove="(index, lists, name)=>{deleteUpfile(index)}"
@on-error="(data,index, lists)=>{errorUpfile(data,index, lists)}">
<!-- <view slot="addBtn" class="slot-btn">
<img v-if="form.businessLicenseUrl" :src="form.businessLicenseUrl" mode="aspectFill"
style="width: 200px;height: 100px;">
<div v-else class="upliacla">
<p style="font-size: 18px;">+</p>
<p>选择图片</p>
</div>
</view> -->
</u-upload>
</u-form-item>
</u-form>
<!-- 按钮 -->
<view class="companyBtn" @click="submitApply" v-if=" !form.companyApplyId">
提交审核
</view>
<view class="companyBtn" @click="submitApply" v-else-if="form.companyStatus == 2">
重新提交
</view>
<view class="companyBtn companyBtn1" v-else-if="form.companyStatus == 0">
审核中
</view>
<view class="companyBtn" style="background: #909399" v-else-if="form.companyStatus == 1">
已认证
</view>
</view>
</view>
</template>
@ -36,21 +61,137 @@
Authorization: 'Bearer ' + uni.getStorageSync('accessToken'),
},
form: {},
action: this.http.baseUrl + '/upload'
rules: {
name: [{
required: true,
message: '请输入企业全称',
trigger: 'blur',
}],
contactName: [{
required: true,
message: '请输入法人姓名',
trigger: 'blur',
}],
},
action: this.http.baseUrl + '/upload',
}
},
onLoad() {},
onLoad() {
this.getApplyDetail()
},
onReady() {
this.$refs.form.setRules(this.rules);
},
methods: {
// companyStatus 0 1 2
getApplyDetail() {
const phoneuserinfo = uni.getStorageSync('wxUserInfo');
this.http.quickGet(`/tester/cert/apply/${phoneuserinfo.userId}`, true).then(res => {
if (res.data.code == 200) {
this.form = res.data.data
if (res.data.data.companyApplyId) {
this.form = {
...res.data.data,
name: res.data.data.companyContactName,
contactName: res.data.data.companyName,
businessLicenseUrl: [{
url: this.http.baseUrl + res.data.data
.companyBusinessLicense
}]
}
}
}
})
},
//
submitApply() {
this.$refs.form.validate(valid => {
if (valid) {
if (this.form.companyApplyId) {
//
//
let newUrl;
if (typeof(this.form.businessLicenseUrl) == 'string') {
if (!this.form.businessLicenseUrl) {
return uni.showToast({
icon: 'none',
title: '请上传营业执照'
})
}
newUrl = [this.form.businessLicenseUrl]
} else {
if (!this.form.businessLicenseUrl[0].url) {
return uni.showToast({
icon: 'none',
title: '请上传营业执照'
})
}
const url = this.form.businessLicenseUrl[0].url
const index = url.indexOf('/profile')
newUrl = [url.substring(index)]
}
const dataUpdata = {
applyId: this.form.companyApplyId,
name: this.form.name,
contactName: this.form.contactName,
businessLicenseUrl: newUrl,
}
this.http.quickPost('/companyApply/edit', dataUpdata, true).then(res => {
uni.showToast({
icon: 'none',
title: '修改成功,请耐心等待审核',
duration: 2000,
})
setTimeout(() => {
uni.switchTab({
url: '/pages/personal/personal'
})
}, 2000)
})
} else {
//
if (!this.form.businessLicenseUrl) {
return uni.showToast({
icon: 'none',
title: '请上传营业执照'
})
}
const data = {
name: this.form.name,
contactName: this.form.contactName,
businessLicenseUrl: [this.form.businessLicenseUrl],
}
this.http.quickPost('/companyApply/apply', data, true).then(res => {
uni.showToast({
icon: 'none',
title: '提交成功,请耐心等待审核',
duration: 2000,
})
setTimeout(() => {
uni.switchTab({
url: '/pages/personal/personal'
})
}, 2000)
})
}
}
})
},
fielUploadSuc(data, index) {
if (data.code === 200) {
this.form.certificateUrl = data.filePath
this.form.businessLicenseUrl = data.filePath
}
},
deleteUpfile(index, lists) {
this.form.certificateUrl = ''
this.form.businessLicenseUrl = ''
},
errorUpfile(data, index) {},
}
@ -58,8 +199,89 @@
</script>
<style lang="scss" scoped>
.contentBox ::v-deep.u-form-left__content__label {
font-weight: bold;
font-size: 30rpx;
color: #000000;
}
.sintitle {
display: flex;
align-items: center;
/* height: 50px; */
background: #F2F4F7;
/* background:#20529c; */
border-radius: 4rpx;
padding: 7px 15px;
}
.sintitle img {
width: 20px;
height: 18px;
margin-right: 5px;
}
.sintitle p {
font-size: 15px;
color: #000000;
font-weight: bold;
}
.companyApply {
padding: 25rpx;
box-sizing: border-box;
height: 100%;
}
.contentBox {
width: 100%;
height: 100%;
background: #FFFFFF;
padding: 25rpx;
box-sizing: border-box;
.companyBtn {
width: 100%;
height: 70rpx;
background: linear-gradient(90deg, #5EA6FD, #1A81F9);
border-radius: 35rpx;
line-height: 70rpx;
text-align: center;
color: #FFFFFF;
}
.companyBtn1 {
background: linear-gradient(90deg, #F9BD55, #F49C45);
}
}
.slot-btn {
width: 200px;
height: 100px;
zIndex: 99;
/* display: flex;
justify-content: center;
align-items: center;
background: rgb(244, 245, 246);
border-radius: 10rpx; */
}
.slot-btn__hover {
background-color: rgb(235, 236, 238);
}
.upliacla {
width: 200px;
height: 100px;
/* line-height:100px; */
border-radius: 4px;
background: #f4f5f6;
color: #606266;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
</style>

@ -30,6 +30,9 @@
}
}
},
onLoad() {
this.getApplyDetail()
},
onReady() {
this.$refs.form.setRules(this.rules)
},
@ -37,14 +40,36 @@
//
saveCompanyDesc() {
this.$refs.form.validate().then(res => {
const data = {}
this.http.quickPost('/companyInfo/update', this.data).then(re => {
console.log(re);
const data = {
applyId: this.form.companyApplyId,
companyDesc: this.form.companyDesc,
userId: this.form.userId
}
this.http.quickPost('/companyInfo/update', data, true).then(re => {
uni.showToast({
icon: 'none',
title: '修改成功',
duration: 2000,
})
setTimeout(() => {
uni.switchTab({
url: '/pages/personal/personal'
})
}, 2000)
})
}).catch(errors => {
})
}
},
getApplyDetail() {
const phoneuserinfo = uni.getStorageSync('wxUserInfo');
this.http.quickGet(`/tester/cert/apply/${phoneuserinfo.userId}`, true).then(res => {
if (res.data.code == 200) {
this.form = res.data.data
// this.form.companyDesc = res.data.data.companyDesc
}
})
},
}
}
</script>

Loading…
Cancel
Save