党员认证

This commit is contained in:
shijingjing
2022-11-14 10:40:13 +08:00
parent 91c4b50066
commit f02a10b7a9
4 changed files with 54 additions and 71 deletions

View File

@@ -11,7 +11,6 @@
:custom-style="{height:'72px'}" v-model="idNumber" maxlength="18"/> :custom-style="{height:'72px'}" v-model="idNumber" maxlength="18"/>
</div> </div>
<div class="btn" @click="confirm()">提交</div> <div class="btn" @click="confirm()">提交</div>
<!-- <div class="promise">以上信息将为你严格保密</div> -->
<div class="bottom-text"> <div class="bottom-text">
<u-checkbox v-model="isChecked"></u-checkbox> <u-checkbox v-model="isChecked"></u-checkbox>
<span @click="isChecked=!isChecked">阅读并同意</span> <span @click="isChecked=!isChecked">阅读并同意</span>
@@ -35,15 +34,15 @@ export default {
isChecked: false, isChecked: false,
}; };
}, },
onLoad() { onShow() {
// 0未认证 1认证中 2已认证 3认证失败 // 0未认证 1认证中 2已认证 3认证失败
let { partyStatusForWX } = this.user let { partyStatusForWX } = this.user
if (partyStatusForWX == 2) { if (partyStatusForWX == 0) {
uni.redirectTo({url: "./partyAuthInfo"})
} else if (partyStatusForWX == 0) {
// 停留此页 // 停留此页
} else if(partyStatusForWX == 1) { } else if(partyStatusForWX == 1) {
uni.redirectTo({url: "./partyAuthSuccess"}) uni.redirectTo({url: "./partyAuthSuccess"})
} else if (partyStatusForWX == 2) {
uni.redirectTo({url: "./partyAuthInfo"})
} else if(partyStatusForWX == 3) { } else if(partyStatusForWX == 3) {
uni.redirectTo({url: "./partyAuthSuccess"}) uni.redirectTo({url: "./partyAuthSuccess"})
} }
@@ -60,7 +59,6 @@ export default {
if (!idNumber) { if (!idNumber) {
return this.$u.toast('请填写身份证号码') return this.$u.toast('请填写身份证号码')
} }
if (!this.$idCardNoUtil.checkIdCardNo(idNumber)) { if (!this.$idCardNoUtil.checkIdCardNo(idNumber)) {
return this.$u.toast('请输入正确的身份证号码') return this.$u.toast('请输入正确的身份证号码')
} }

View File

@@ -117,12 +117,15 @@ export default {
...mapState(['user']) ...mapState(['user'])
}, },
onLoad(query) { onShow(query) {
this.$dict.load(['partyType']).then(()=> { // this.$dict.load(['partyType']).then(()=> {
this.form.reportUserId = query.id // this.form.reportUserId = query.id
this.form.name = query.name // this.form.name = query.name
this.form.idNumber = query.idNumber // this.form.idNumber = query.idNumber
}) // })
if(this.user.partyId) {
this.getDetail()
}
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: '申请党员' title: '申请党员'
}); });
@@ -138,6 +141,14 @@ export default {
this.form.partyOrgName = v.name this.form.partyOrgName = v.name
}, },
getDetail() {
this.$instance.post(`/app/appparty/detail?id=${this.user.partyId}`).then(res=> {
if(res?.data) {
this.form = res.data
}
})
},
submit() { submit() {
if (!this.form.name) { if (!this.form.name) {

View File

@@ -7,9 +7,9 @@
<div class="flex fill"> <div class="flex fill">
<div class="fill"> <div class="fill">
<b v-text="user.realName"/> <b v-text="user.realName"/>
<div class="color-999" v-text="sexAge"/> <div class="color-999">{{ $dict.getLabel('sex', detail.sex) }} {{detail.age}}</div>
</div> </div>
<div class="blue" v-if="isOwner">户主</div> <!-- <div class="blue" v-if="isOwner">户主</div> -->
</div> </div>
</div> </div>
<div class="card"> <div class="card">
@@ -20,18 +20,18 @@
<div v-else v-text="detail[row.prop]||'-'"/> <div v-else v-text="detail[row.prop]||'-'"/>
</view> </view>
</div> </div>
<div class="card"> <!-- <div class="card">
<b class="title" v-text="`联络方式`"/> <b class="title" v-text="`联络方式`"/>
<view class="item" :class="{spb:!row.topLabel,flex:!row.topLabel}" v-for="row in contract" :key="row.prop"> <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"/> <span class="color-999" v-text="row.label"/>
<div v-text="detail[row.prop]||'-'"/> <div v-text="detail[row.prop]||'-'"/>
</view> </view>
</div> </div> -->
<div class="fixed-bottom"> <!-- <div class="fixed-bottom">
<u-button type="primary" @click="apply"> <u-button type="primary" @click="apply">
<text style="font-size: 16px" v-text="`申请修改`"/> <text style="font-size: 16px" v-text="`申请修改`"/>
</u-button> </u-button>
</div> </div> -->
</section> </section>
</template> </template>
@@ -44,45 +44,41 @@ export default {
return { return {
detail: {}, detail: {},
baseInfo: [ baseInfo: [
// {label: "年龄", prop: "age"},
{label: "身份证号", prop: "idNumber"}, {label: "身份证号", prop: "idNumber"},
{label: "籍贯", prop: "birthplaceAreaName"},
{label: "民族", prop: "nation", dict: "nation"},
{label: "文化程度", prop: "education", dict: "education"},
{label: "政治面貌", prop: "politicsStatus", dict: "politicsStatus"},
{label: "兵役状况", prop: "militaryStatus", dict: "militaryStatus"},
{label: "宗教信仰", prop: "faithType", dict: "faithType"},
{label: "职业", prop: "job", dict: "job"},
],
contract: [
{label: "联系方式", prop: "phone"}, {label: "联系方式", prop: "phone"},
{label: "现住址", prop: "currentAreaName"}, {label: "党组织", prop: "partyOrgName"},
{label: "详细住址", prop: "currentAddress", topLabel: true}, {label: "入党时间", prop: "joinPartyTime"},
{label: "户籍地址", prop: "householdAreaName"}, {label: "党员类型", prop: "partyType", dict: "partyType"},
{label: "详细地址", prop: "householdAddress", topLabel: true}, ],
] // contract: [
// {label: "联系方式", prop: "phone"},
// {label: "现住址", prop: "currentAreaName"},
// {label: "详细住址", prop: "currentAddress", topLabel: true},
// {label: "户籍地址", prop: "householdAreaName"},
// {label: "详细地址", prop: "householdAddress", topLabel: true},
// ]
} }
}, },
computed: { computed: {
...mapState(['user']), ...mapState(['user']),
sexAge() { // sexAge() {
let {idNumber, gender} = this.$idCardNoUtil.getIdCardInfo(this.user.idNumber), age = this.$calcAge(idNumber) // let {idNumber, gender} = this.$idCardNoUtil.getIdCardInfo(this.user.idNumber), age = this.$calcAge(idNumber)
return `${this.$dict.getLabel("sex", gender) || ""} ${age ? age + "岁" : ""}` // return `${this.$dict.getLabel("sex", gender) || ""} ${age ? age + "岁" : ""}`
}, // },
isOwner() { // isOwner() {
return this.detail.householdName == 1 // return this.detail.householdName == 1
} // }
}, },
onLoad() { onLoad() {
this.$dict.load("sex", "nation", "education", "politicsStatus", "militaryStatus", "faithType", "job") this.$dict.load('partyType','sex')
this.getResident() this.getDetail()
}, },
methods: { methods: {
getResident() { getDetail() {
this.$instance.post("/app/appresident/detailForWx", null, { this.$instance.post(`/app/appparty/detail?id=${this.user.partyId}`).then(res=> {
params: {id: this.user.residentId}
}).then(res => {
if(res?.data) { if(res?.data) {
this.detail = res.data.resident this.detail = res.data
} }
}) })
}, },
@@ -97,7 +93,6 @@ export default {
.partyAuthInfo { .partyAuthInfo {
background: #F3F6F9; background: #F3F6F9;
min-height: 100vh; min-height: 100vh;
padding-bottom: 280px;
.avatar { .avatar {
display: inline-block; display: inline-block;

View File

@@ -43,31 +43,10 @@ export default {
}, },
}, },
onShow() { onShow() {
// let titles = ''
// if(this.user.partyStatusForWX == 1){
// titles = '认证中'
// } else if(this.user.partyStatusForWX == 2) {
// titles = '认证成功'
// } else if(this.user.partyStatusForWX == 3) {
// titles = '认证失败'
// }
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: '党员认证' title: '党员认证'
}); });
}, },
onLoad() {
let title = ''
if(this.user.partyStatusForWX == 1){
title = '认证中'
} else if(this.user.partyStatusForWX == 2) {
title = '认证成功'
} else if(this.user.partyStatusForWX == 3) {
title = '认证失败'
}
uni.setNavigationBarTitle({
title: title
});
},
methods: { methods: {
rewrite() { rewrite() {
uni.redirectTo({url: "./partyAuthApply"}) uni.redirectTo({url: "./partyAuthApply"})