修改身份信息和社保信息

This commit is contained in:
dengxin
2024-03-28 21:03:22 +08:00
parent 880396f213
commit 56998e84c2
2 changed files with 384 additions and 352 deletions

View File

@@ -4707,7 +4707,7 @@ const laborType = [
"残疾人", "残疾人",
"外来农民工", "外来农民工",
]; ];
const insureType = ["已缴纳城乡居民社保", "已缴纳灵活就业社保"]; const insureType = ["已缴纳城乡居民社保", "已缴纳灵活就业社保","已缴纳城镇企业职工社保"];
export default { export default {
ind, ind,

View File

@@ -5,8 +5,8 @@
<view class="headuser"> <view class="headuser">
<image src="@/static/img/head.svg" class="headuserImg" mode=""></image> <image src="@/static/img/head.svg" class="headuserImg" mode=""></image>
<view v-if="auth.realNameState" class="name"> <view v-if="auth.realNameState" class="name">
<view class="userName">{{authInfo.realName}}</view> <view class="userName">{{ authInfo.realName }}</view>
<view class="userInfo">{{idNumberFilter(authInfo.idNumber)}}</view> <view class="userInfo">{{ idNumberFilter(authInfo.idNumber) }}</view>
</view> </view>
<view v-else class="name"> <view v-else class="name">
<view class="userName">姓名</view> <view class="userName">姓名</view>
@@ -88,26 +88,28 @@
<image src="@/static/img/right.svg" mode=""></image> <image src="@/static/img/right.svg" mode=""></image>
</view> </view>
</view> --> </view> -->
<view class="list"> <view class="list">
<view class="name"> <view class="name">
姓名 姓名
</view> </view>
<text v-if="auth.realNameState" style="color: #1b66ff;">{{auth.authInfo.realName}}</text> <text v-if="auth.realNameState" style="color: #1b66ff;">{{ auth.authInfo.realName }}</text>
<input v-else type="text" value="" placeholder="请输入真实姓名" @input="setName" placeholder-style="color:#cccccc;" /> <input v-else type="text" value="" placeholder="请输入真实姓名" @input="setName"
placeholder-style="color:#cccccc;" />
</view> </view>
<view> <view>
<view class="list"> <view class="list">
<view class="name"> <view class="name">
身份证号 身份证号
</view> </view>
<text v-if="auth.realNameState" style="color: #1b66ff;">{{idNumberFilter(auth.authInfo.idNumber)}}</text> <text v-if="auth.realNameState" style="color: #1b66ff;">{{ idNumberFilter(auth.authInfo.idNumber)
<input v-else type="idcard" value="" placeholder="请输入身份证号" @input="setCard" style="text-transform:uppercase" }}</text>
placeholder-style="color:#cccccc;" /> <input v-else type="idcard" value="" placeholder="请输入身份证号" @input="setCard"
style="text-transform:uppercase" placeholder-style="color:#cccccc;" />
</view> </view>
<view v-if="error" class="error">身份证填写有误</view> <view v-if="error" class="error">身份证填写有误</view>
</view> </view>
<picker :range="identityList" @change="identityChange" :value="index"> <picker :range="identityList" @change="identityChange" :value="indexId">
<view class="list"> <view class="list">
<view class="listLeft"> <view class="listLeft">
<view class="name"> <view class="name">
@@ -134,7 +136,9 @@
</view> </view>
<view class="listRight"> <view class="listRight">
<view class="listRightContent"> <view class="listRightContent">
<view class="" v-if="auth.insureState">{{insureList[indexBao]}}</view> <view class="" v-if="auth.insureState">{{ insureList[indexBao] ? insureList[indexBao] :
authInfo.politics
}}</view>
<view class="" v-else>未选择</view> <view class="" v-else>未选择</view>
</view> </view>
<image src="@/static/img/right.svg" mode=""></image> <image src="@/static/img/right.svg" mode=""></image>
@@ -178,370 +182,398 @@
</template> </template>
<script> <script>
import textdata from '@/common/textdata.js' import textdata from '@/common/textdata.js'
import { import {
mapGetters setInfo
} from 'vuex' } from '@/api/federation.js'
import { import {
idNumberFilter mapGetters
} from '@/untils/format.js' } from 'vuex'
import {
import { idNumberFilter
check18IdCardNo, } from '@/untils/format.js'
validatenull
} from '@/untils/validate.js'
export default { import {
data() { check18IdCardNo,
return { validatenull
laborType: textdata.laborType, } from '@/untils/validate.js'
index: 0,
insureType: textdata.insureType, export default {
data() {
name: '', return {
card: '', laborType: textdata.laborType,
loading: false, index: 0,
error: false, insureType: textdata.insureType,
identityList: textdata.laborType,
insureList: textdata.insureType, name: '',
realIndex: 0, card: '',
}; loading: false,
}, error: false,
onLoad() { identityList: textdata.laborType,
// this.$store.dispatch('setAutograph') insureList: textdata.insureType,
}, realIndex: 0,
computed: {
...mapGetters(['auth', 'authInfo', 'autograph']), subIdentity: "",
indexbao() { subSocial: "",
if (this.auth.insureState) { };
return this.authInfo.bakValue - 1 },
} else { onLoad() {
return 0 // this.$store.dispatch('setAutograph')
} },
}, computed: {
...mapGetters(['auth', 'authInfo']), ...mapGetters(['auth', 'authInfo', 'autograph']),
check() { indexId() {
return check18IdCardNo(this.card) && !validatenull(this.name) if (this.index > 0) {
}, return this.index
indexBao() { } else if (this.authInfo.nation) {
if (this.auth.insureState) { if (this.identityList.findIndex(item => item === this.authInfo.nation) >= 0) {
return this.authInfo.bakValue - 1 return this.identityList.findIndex(item => item === this.authInfo.nation)
} else {
return 0
} }
return 0;
} {
return 0
} }
}, },
methods: { ...mapGetters(['auth', 'authInfo']),
setSeal(){ check() {
if (this.auth.realNameState) { return check18IdCardNo(this.card) && !validatenull(this.name)
uni.navigateTo({ },
url: '/pageMy/setUserBase/seal/index' indexBao() {
}) if (this.auth.insureState && this.authInfo.bakValue >= 0) {
} else { return this.authInfo.bakValue - 1
uni.showToast({ } else if (this.authInfo.politics) {
title: '请先完成实名认证', if (this.insureList.findIndex(item => item === this.authInfo.politics) >= 0) {
icon: 'none' return this.insureList.findIndex(item => item === this.authInfo.politics)
})
} }
}, return 0;
setIcCard: function() { } else {
if (this.auth.realNameState) { return 0
uni.navigateTo({ }
url: '/pageMy/setUserBase/icCard/index'
})
} else {
uni.showToast({
title: '请先完成实名认证',
icon: 'none'
})
}
},
goRealName: function() {
uni.navigateTo({
url: '/pageMy/setUserBase/realName'
})
},
bindPickerChangeBao: function(e) {
uni.showLoading()
this.$store.dispatch('authInsure', e.target.value * 1 + 1).then(resp => {
uni.hideLoading()
}).catch(() => {
uni.hideLoading()
})
},
bindPickerChange: function(e) {
uni.showLoading()
this.$store.dispatch('authLabor').then(resp => {
this.index = e.target.value;
uni.hideLoading()
}).catch(() => {
uni.hideLoading()
})
},
idNumberFilter,
setName: function(e) {
this.name = e.detail.value;
},
setCard: function(e) {
this.card = e.detail.value.toUpperCase();
this.error = !check18IdCardNo(this.card)
return e.detail.value.toUpperCase()
},
goSet: function() {
this.loading = true
this.$store.dispatch('authRealName', {
name: this.name,
idNumber: this.card
})
.then(() => {
this.loading = false
uni.navigateBack()
}).catch(() => {
this.loading = false
})
},
idNumberFilter,
identityChange(val) {
console.log("val",val);
uni.showLoading();
this.$store.dispatch('authLabor').then(() => {
this.realIndex = val.detail.value;
uni.hideLoading();
}).catch(() => {
uni.hideLoading();
})
},
insureChange(val) {
uni.showLoading();
this.$store.dispatch('authInsure', val.detail.value * 1 + 1).then(() => {
uni.hideLoading();
}).catch(()=>{
uni.hideLoading();
})
},
} }
}; },
methods: {
setSeal() {
if (this.auth.realNameState) {
uni.navigateTo({
url: '/pageMy/setUserBase/seal/index'
})
} else {
uni.showToast({
title: '请先完成实名认证',
icon: 'none'
})
}
},
setIcCard: function () {
if (this.auth.realNameState) {
uni.navigateTo({
url: '/pageMy/setUserBase/icCard/index'
})
} else {
uni.showToast({
title: '请先完成实名认证',
icon: 'none'
})
}
},
goRealName: function () {
uni.navigateTo({
url: '/pageMy/setUserBase/realName'
})
},
bindPickerChangeBao: function (e) {
uni.showLoading()
this.$store.dispatch('authInsure', e.target.value * 1 + 1).then(resp => {
uni.hideLoading()
}).catch(() => {
uni.hideLoading()
})
},
bindPickerChange: function (e) {
uni.showLoading()
this.$store.dispatch('authLabor').then(resp => {
this.index = e.target.value;
uni.hideLoading()
}).catch(() => {
uni.hideLoading()
})
},
idNumberFilter,
setName: function (e) {
this.name = e.detail.value;
},
setCard: function (e) {
this.card = e.detail.value.toUpperCase();
this.error = !check18IdCardNo(this.card)
return e.detail.value.toUpperCase()
},
goSet: function () {
this.loading = true
this.$store.dispatch('authRealName', {
name: this.name,
idNumber: this.card
})
.then(() => {
this.loading = false
uni.navigateBack()
}).catch(() => {
this.loading = false
})
},
idNumberFilter,
async identityChange(val) {
const value = this.identityList.filter((item, index) => index === val.detail.value)
this.subIdentity = value.join('')
// await setInfo({ nation: this.subIdentity, politics: this.subSocial })
await setInfo({ nation: value.join(''), politics: "" })
console.log(value.join(''), '00000000000000');
uni.showLoading();
this.$store.dispatch('authLabor').then(() => {
this.realIndex = val.detail.value;
uni.hideLoading();
}).catch(() => {
uni.hideLoading();
})
},
async insureChange(val) {
console.log("", val, '-----');
const value = this.insureList.filter((item, index) => index === val.detail.value)
this.subSocial = value.join('')
// await setInfo({ nation: this.subIdentity, politics: this.subSocial })
await setInfo({ nation: "", politics: value.join('') })
uni.showLoading();
this.$store.dispatch('authInsure', val.detail.value * 1 + 1).then(() => {
uni.hideLoading();
}).catch(() => {
uni.hideLoading();
})
},
}
};
</script> </script>
<style> <style>
.nochoose { .nochoose {
color: #1b66ff; color: #1b66ff;
} }
.listRight { .listRight {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 28rpx; font-size: 28rpx;
color: #999999; color: #999999;
} }
.listRight image { .listRight image {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
margin-left: 15rpx; margin-left: 15rpx;
} }
.listContent { .listContent {
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 28rpx; font-size: 28rpx;
color: #666666; color: #666666;
} }
.list { .list {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 32rpx; font-size: 32rpx;
color: #333333; color: #333333;
padding: 30rpx; padding: 30rpx;
line-height: 50rpx; line-height: 50rpx;
} }
.border { .border {
margin-left: 30rpx; margin-left: 30rpx;
width: 720rpx; width: 720rpx;
height: 2rpx; height: 2rpx;
background-color: #f2f2f2; background-color: #f2f2f2;
/* border-bottom: 1rpx solid #dddddd; */ /* border-bottom: 1rpx solid #dddddd; */
} }
.tx image { .tx image {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
margin-right: 10rpx; margin-right: 10rpx;
} }
.tx { .tx {
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 24rpx; font-size: 24rpx;
color: #ffffff; color: #ffffff;
padding: 30rpx; padding: 30rpx;
padding-top: 0; padding-top: 0;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-start; justify-content: flex-start;
} }
.userInfo { .userInfo {
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 26rpx; font-size: 26rpx;
color: #ffffff; color: #ffffff;
font-weight: normal; font-weight: normal;
} }
.name { .name {
margin-left: 20rpx; margin-left: 20rpx;
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
font-size: 36rpx; font-size: 36rpx;
color: #ffffff; color: #ffffff;
font-weight: bold; font-weight: bold;
line-height: 50rpx; line-height: 50rpx;
} }
.headuserImg { .headuserImg {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
} }
.headuser { .headuser {
padding: 30rpx; padding: 30rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-start; justify-content: flex-start;
} }
.stamp { .stamp {
position: absolute; position: absolute;
top: 30rpx; top: 30rpx;
right: 30rpx; right: 30rpx;
/* opacity: 0.6; */ /* opacity: 0.6; */
width: 200rpx; width: 200rpx;
height: 200rpx; height: 200rpx;
} }
.logo { .logo {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 0; left: 0;
opacity: 0.1; opacity: 0.1;
width: 200rpx; width: 200rpx;
height: 200rpx; height: 200rpx;
} }
.head { .head {
width: 690rpx; width: 690rpx;
height: 250rpx; height: 250rpx;
padding-top: 30rpx; padding-top: 30rpx;
margin: 30rpx; margin: 30rpx;
margin-top: 0; margin-top: 0;
border-radius: 15rpx; border-radius: 15rpx;
position: relative; position: relative;
background: #1b66ff; background: #1b66ff;
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.3); box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.3);
} }
.body { .body {
background-color: #fefefe; background-color: #fefefe;
padding-top: 30rpx; padding-top: 30rpx;
} }
page { page {
background-color: #f6f6f6; background-color: #f6f6f6;
} }
.bottombtn { .bottombtn {
background-color: #1B66FF; background-color: #1B66FF;
color: #fff; color: #fff;
text-align: center; text-align: center;
border-radius: 10rpx; border-radius: 10rpx;
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
font-size: 32rpx; font-size: 32rpx;
height: 90rpx; height: 90rpx;
line-height: 90rpx; line-height: 90rpx;
} }
.btn { .btn {
background-color: #fefefe; background-color: #fefefe;
width: 690rpx; width: 690rpx;
padding: 30rpx; padding: 30rpx;
padding-bottom: 80rpx; padding-bottom: 80rpx;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
} }
.name { .name {
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 32rpx; font-size: 32rpx;
color: #333333; color: #333333;
width: 200rpx; width: 200rpx;
} }
.error { .error {
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 26rpx; font-size: 26rpx;
color: red; color: red;
margin: 5px 0 0 200rpx; margin: 5px 0 0 200rpx;
padding-bottom: 5px; padding-bottom: 5px;
} }
.list { .list {
padding: 20rpx; padding: 20rpx;
padding-left: 0; padding-left: 0;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
border-bottom: 1rpx solid #f2f2f2; border-bottom: 1rpx solid #f2f2f2;
font-size: 28rpx; font-size: 28rpx;
} }
.pickerList { .pickerList {
padding: 20rpx; padding: 20rpx;
padding-left: 0; padding-left: 0;
border-bottom: 1rpx solid #f2f2f2; border-bottom: 1rpx solid #f2f2f2;
} }
.listRight { .listRight {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 28rpx; font-size: 28rpx;
color: #999999; color: #999999;
} }
.listRightContent { .listRightContent {
color: #1b66ff; color: #1b66ff;
} }
.listRight image { .listRight image {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
margin-left: 15rpx; margin-left: 15rpx;
} }
.listContent { .listContent {
color: #999; color: #999;
font-size: 28rpx; font-size: 28rpx;
} }
.body { .body {
background-color: #fefefe; background-color: #fefefe;
padding-left: 20rpx; padding-left: 20rpx;
margin-top: 20rpx; margin-top: 20rpx;
} }
.nocheck { .nocheck {
opacity: 0.3; opacity: 0.3;
} }
page { page {
background-color: #f6f6f6; background-color: #f6f6f6;
} }
</style> </style>