党员申请自动带入名字身份证

This commit is contained in:
shijingjing
2022-12-02 10:23:27 +08:00
parent 630fb6a04c
commit 3ae8441ccd
3 changed files with 8 additions and 43 deletions

View File

@@ -71,7 +71,7 @@ export default {
if (res.code == 0) {
this.$store.dispatch('getUserInfo')
if (res.data == 3 || res.data == 0) {
uni.redirectTo({url: `./partyAuthApply`})
uni.redirectTo({url: `./partyAuthApply?name=${name}&idNumber=${idNumber}`})
} else {
uni.redirectTo({url: "./partyAuthSuccess"})
}

View File

@@ -113,12 +113,16 @@ export default {
computed: {
...mapState(['user'])
},
onLoad() {
onLoad(o) {
console.log(o);
uni.setNavigationBarTitle({
title: '申请党员'
});
if(this.user.partyId?.length > 0) {
this.getDetail()
} else {
this.form.name = o.name
this.form.idNumber = o.idNumber
}
},
methods: {
@@ -132,15 +136,8 @@ export default {
getDetail() {
this.$instance.post(`/app/appparty/detail?id=${this.user.partyId}`).then(res=> {
if(res?.data) {
this.form.id = res.data.id
this.form.name = res.data.name
this.form.idNumber = res.data.idNumber
this.form.phone = res.data.phone
this.form.partyOrgId = res.data.partyOrgId
this.form.partyOrgName = res.data.partyOrgName
this.form.joinPartyTime = res.data.joinPartyTime
this.form.partyType = res.data.partyType
this.form.partyStatus = res.data.partyStatus
this.form = res.data
delete this.form.auditOpinion
}
})
},
@@ -168,7 +165,6 @@ export default {
...this.form,
}).then(res => {
if (res.code == 0) {
uni.$emit('update')
this.$toast('提交成功')
this.$store.dispatch('getUserInfo')
uni.removeStorageSync('lastSelectedParty');

View File

@@ -9,7 +9,6 @@
<b v-text="user.realName"/>
<div class="color-999">{{ $dict.getLabel('sex', detail.sex) }} {{detail.age}}</div>
</div>
<!-- <div class="blue" v-if="isOwner">户主</div> -->
</div>
</div>
<div class="card">
@@ -20,18 +19,6 @@
<div v-else v-text="detail[row.prop]||'-'"/>
</view>
</div>
<!-- <div class="card">
<b class="title" v-text="`联络方式`"/>
<view class="item" :class="{spb:!row.topLabel,flex:!row.topLabel}" v-for="row in contract" :key="row.prop">
<span class="color-999" v-text="row.label"/>
<div v-text="detail[row.prop]||'-'"/>
</view>
</div> -->
<!-- <div class="fixed-bottom">
<u-button type="primary" @click="apply">
<text style="font-size: 16px" v-text="`申请修改`"/>
</u-button>
</div> -->
</section>
</template>
@@ -44,31 +31,16 @@ export default {
return {
detail: {},
baseInfo: [
// {label: "年龄", prop: "age"},
{label: "身份证号", prop: "idNumber"},
{label: "联系方式", prop: "phone"},
{label: "党组织", prop: "partyOrgName"},
{label: "入党时间", prop: "joinPartyTime"},
{label: "党员类型", prop: "partyType", dict: "partyType"},
],
// contract: [
// {label: "联系方式", prop: "phone"},
// {label: "现住址", prop: "currentAreaName"},
// {label: "详细住址", prop: "currentAddress", topLabel: true},
// {label: "户籍地址", prop: "householdAreaName"},
// {label: "详细地址", prop: "householdAddress", topLabel: true},
// ]
}
},
computed: {
...mapState(['user']),
// sexAge() {
// let {idNumber, gender} = this.$idCardNoUtil.getIdCardInfo(this.user.idNumber), age = this.$calcAge(idNumber)
// return `${this.$dict.getLabel("sex", gender) || ""} ${age ? age + "岁" : ""}`
// },
// isOwner() {
// return this.detail.householdName == 1
// }
},
onLoad() {
this.$dict.load('partyType','sex')
@@ -82,9 +54,6 @@ export default {
}
})
},
apply() {
uni.navigateTo({url: "./partyAuthApply"})
}
}
}
</script>