修改身份信息和社保信息

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 {
ind,

View File

@@ -94,20 +94,22 @@
姓名
</view>
<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 class="list">
<view class="name">
身份证号
</view>
<text v-if="auth.realNameState" style="color: #1b66ff;">{{idNumberFilter(auth.authInfo.idNumber)}}</text>
<input v-else type="idcard" value="" placeholder="请输入身份证号" @input="setCard" style="text-transform:uppercase"
placeholder-style="color:#cccccc;" />
<text v-if="auth.realNameState" style="color: #1b66ff;">{{ idNumberFilter(auth.authInfo.idNumber)
}}</text>
<input v-else type="idcard" value="" placeholder="请输入身份证号" @input="setCard"
style="text-transform:uppercase" placeholder-style="color:#cccccc;" />
</view>
<view v-if="error" class="error">身份证填写有误</view>
</view>
<picker :range="identityList" @change="identityChange" :value="index">
<picker :range="identityList" @change="identityChange" :value="indexId">
<view class="list">
<view class="listLeft">
<view class="name">
@@ -134,7 +136,9 @@
</view>
<view class="listRight">
<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>
<image src="@/static/img/right.svg" mode=""></image>
@@ -179,6 +183,9 @@
<script>
import textdata from '@/common/textdata.js'
import {
setInfo
} from '@/api/federation.js'
import {
mapGetters
} from 'vuex'
@@ -205,6 +212,9 @@
identityList: textdata.laborType,
insureList: textdata.insureType,
realIndex: 0,
subIdentity: "",
subSocial: "",
};
},
onLoad() {
@@ -212,10 +222,15 @@
},
computed: {
...mapGetters(['auth', 'authInfo', 'autograph']),
indexbao() {
if (this.auth.insureState) {
return this.authInfo.bakValue - 1
} else {
indexId() {
if (this.index > 0) {
return this.index
} else if (this.authInfo.nation) {
if (this.identityList.findIndex(item => item === this.authInfo.nation) >= 0) {
return this.identityList.findIndex(item => item === this.authInfo.nation)
}
return 0;
} {
return 0
}
},
@@ -224,8 +239,13 @@
return check18IdCardNo(this.card) && !validatenull(this.name)
},
indexBao() {
if (this.auth.insureState) {
if (this.auth.insureState && this.authInfo.bakValue >= 0) {
return this.authInfo.bakValue - 1
} else if (this.authInfo.politics) {
if (this.insureList.findIndex(item => item === this.authInfo.politics) >= 0) {
return this.insureList.findIndex(item => item === this.authInfo.politics)
}
return 0;
} else {
return 0
}
@@ -303,8 +323,14 @@
})
},
idNumberFilter,
identityChange(val) {
console.log("val",val);
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;
@@ -313,7 +339,13 @@
uni.hideLoading();
})
},
insureChange(val) {
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();