党员认证

This commit is contained in:
shijingjing
2022-11-11 15:08:54 +08:00
parent cbd1484160
commit 91c4b50066
4 changed files with 56 additions and 70 deletions

View File

@@ -67,14 +67,14 @@ export default {
if(!this.isChecked) { if(!this.isChecked) {
return this.$u.toast('请勾选用户服务及隐私协议') return this.$u.toast('请勾选用户服务及隐私协议')
} }
this.$instance.post(`/app/appwechatuser/idNumberAttestation`, { this.$instance.post(`/app/appwechatuser/partyIdentification`, {
idNumber, name idNumber, name
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
if (res.data == 2 || res.data == 0) { if (res.data == 2 || res.data == 0) {
this.$store.dispatch('getUserInfo') this.$store.dispatch('getUserInfo')
uni.redirectTo({ uni.redirectTo({
url: `./partyAuthSuccess?status=${res.data}`, success: () => { url: `./partyAuthApply?status=${res.data}`, success: () => {
if (res.data == 0) { if (res.data == 0) {
uni.setStorageSync("authForm", {idNumber, name}) uni.setStorageSync("authForm", {idNumber, name})
} }

View File

@@ -31,7 +31,7 @@
<h2>手机号码</h2> <h2>手机号码</h2>
</div> </div>
<div class="form-item__right"> <div class="form-item__right">
<input placeholder="请输入" v-model="form.idNumber" :maxlength="11"/> <input placeholder="请输入" v-model="form.phone" :maxlength="11"/>
</div> </div>
</div> </div>
</div> </div>
@@ -42,9 +42,8 @@
<h2>党组织</h2> <h2>党组织</h2>
</div> </div>
<div class="form-item__right"> <div class="form-item__right">
<AiPagePicker type="custom" @select="handleSelectParty" <AiPagePicker type="custom" @select="handleSelectParty" :ops="{url:'./selectPartyOrg',label:'name',}">
:ops="{url:'./selectPartyOrg',label: 'name'}"> <AiMore v-model="form.partyOrgName"/>
<AiMore v-model="form.name"/>
</AiPagePicker> </AiPagePicker>
</div> </div>
</div> </div>
@@ -58,7 +57,7 @@
<div class="form-item__right"> <div class="form-item__right">
<div class="ai-area" @click="isShowDate = true"> <div class="ai-area" @click="isShowDate = true">
<div class="ai-area__wrapper"> <div class="ai-area__wrapper">
<span class="label" v-if="form.nucleicAcidDate">{{ form.nucleicAcidDate }}</span> <span class="label" v-if="form.joinPartyTime">{{ form.joinPartyTime }}</span>
<i v-else>请选择</i> <i v-else>请选择</i>
<u-icon name="arrow-right" color="#ddd"/> <u-icon name="arrow-right" color="#ddd"/>
</div> </div>
@@ -73,7 +72,7 @@
<h2>党员类型</h2> <h2>党员类型</h2>
</div> </div>
<div class="form-item__right"> <div class="form-item__right">
<AiSelect dict="fpType" v-model="form.objectType"></AiSelect> <AiSelect dict="partyType" v-model="form.partyType"></AiSelect>
</div> </div>
</div> </div>
</div> </div>
@@ -103,6 +102,12 @@ export default {
form: { form: {
name: '', name: '',
idNumber: '', idNumber: '',
phone: '',
partyOrgId: '',
partyOrgName: '',
joinPartyTime: '',
partyType: '',
partyStatus: '0',
} }
} }
}, },
@@ -113,76 +118,62 @@ export default {
}, },
onLoad(query) { onLoad(query) {
this.$dict.load(['epidemicTouchInFourteen','EP_healthType','EP_nucleicAcidResult','EP_jkmType','EP_vaccinationCount']).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
}) })
uni.setNavigationBarTitle({
title: '申请党员'
});
}, },
methods: { methods: {
onDateChange(e) { onDateChange(e) {
this.form.nucleicAcidDate = `${e.year}-${e.month}-${e.day}` this.form.joinPartyTime = `${e.year}-${e.month}-${e.day}`
}, },
handleSelectParty(v) { handleSelectParty(v) {
console.log(v); this.form.partyOrgId = v.id
this.form.partyOrgName = v.name
}, },
submit() { submit() {
if (!this.form.temperature) { if (!this.form.name) {
return this.$toast('请输入当前体温') return this.$toast('请输入党员姓名')
} }
if (!this.form.contactPatients) { if (!this.form.idNumber) {
return this.$toast('请选择14天内是否接触新冠确诊或疑似患者') return this.$toast('身份证号')
} }
if (!this.form.healthList.length) { if (!this.form.phone.length) {
return this.$toast('请选择当前健康状况') return this.$toast('请输入手机号')
} else {
this.form.health = this.form.healthList.toString()
} }
if(!this.form.nucleicAcidDate) { if(!this.form.partyOrgId) {
return this.$toast('请选择核酸检测日期') return this.$toast('请选择党组织')
} }
if (!this.form.nucleicAcidResult) { if(!this.form.joinPartyTime) {
return this.$toast('请选择核酸检测结果') return this.$toast('请选择入党时间')
} }
if (!this.form.jkmType) { if(!this.form.partyType) {
return this.$toast('请选择健康码类型') return this.$toast('请选择党员类型')
} }
if (!this.form.vaccinationCount) {
return this.$toast('请选择已接种疫苗次数')
}
if (!this.form.jkmUrlArr.length) {
return this.$toast('请上传健康码截图')
}
if (!this.form.nucleicAcidUrlArr.length) {
return this.$toast('请上核酸检测结果截图')
}
this.$loading() this.$loading()
this.$instance.post(`/app/appepidemicpreventionhealthreportinfo/addReportInfo`, { this.$instance.post(`/app/appparty/addOrUpdateForWX`, {
...this.form, ...this.form,
jkmUrl: this.form.jkmUrlArr[0].url,
nucleicAcidUrl: this.form.nucleicAcidUrlArr[0].url,
nucleicAcidDate: this.form.nucleicAcidDate + ' 00:00:00'
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
uni.$emit('update') uni.$emit('update')
this.$toast('提交成功') this.$toast('提交成功')
setTimeout(() => { setTimeout(() => {
uni.navigateBack() this.$store.dispatch('getUserInfo')
uni.redirectTo({url: "./partyAuthSuccess"})
}, 400) }, 400)
} }
this.$hideLoading() this.$hideLoading()

View File

@@ -39,7 +39,7 @@ export default {
return this.user.partyStatusForWX == 3 return this.user.partyStatusForWX == 3
}, },
isReview() { isReview() {
return this.user.partyStatusForWX == 0 return this.user.partyStatusForWX == 1
}, },
}, },
onShow() { onShow() {

View File

@@ -40,20 +40,16 @@
slectList: [], slectList: [],
userList: [], userList: [],
parentId: '', parentId: '',
isFormMap: 0, //1为网格地图 一级不允许选中
} }
}, },
onLoad(option) { onLoad() {
if (option.isFormMap) {
this.isFormMap = option.isFormMap
}
this.getPartyOrg() this.getPartyOrg()
this.SelectParty = uni.getStorageSync("lastSelectedParty") || {}
}, },
methods: { methods: {
getPartyOrg() { getPartyOrg() {
this.$instance.post(`/app/partyOrganization/queryPartyOrganizationServiceList`).then((res) => { this.$instance.post(`/app/partyOrganization/queryPartyOrganizationServiceList`).then((res) => {
if (res?.data) { if (res?.data) {
console.log(res);
let parents = res.data.map(e => e.parentId) let parents = res.data.map(e => e.parentId)
this.allData = res.data.map(e => ({...e, hasChildren: parents.includes(e.id)})) this.allData = res.data.map(e => ({...e, hasChildren: parents.includes(e.id)}))
this.treeInit() this.treeInit()
@@ -61,23 +57,22 @@
}) })
}, },
treeInit() { treeInit() {
// let last = uni.getStorageSync("lastSelectedParty") let last = uni.getStorageSync("lastSelectedParty")
// if (last) { if (last) {
// this.$instance.post("/app/appgirdinfo/listFatherGirdInfo", null, { console.log(last);
// params: {id: last} this.allData.map((item) => {
// }).then(res => { if(item.id == last.id) {
// if (res?.data) { item.isChecked = true
// this.slectList = [{name: '可选范围', id: ''}, res.data].flat() } else {
// this.getPartyAndParent({id: last}) item.isChecked = false
// } }
// }) })
// this.getPartyAndParent({id: last}) } else {
// } else { this.allData.map((item) => item.isChecked = false)
this.treeList = this.allData.filter(e => !e.parentId) }
this.treeList.map((item) => item.isChecked = false) this.treeList = this.allData.filter(e => !e.parentId)
let obj = {name: '可选范围', id: ''} let obj = {name: '可选范围', id: ''}
this.slectList.push(obj) this.slectList.push(obj)
// }
}, },
itemClick(row) { itemClick(row) {
if (row.hasChildren) { if (row.hasChildren) {
@@ -125,8 +120,8 @@
}, },
submit() { submit() {
console.log(this.SelectParty); console.log(this.SelectParty);
if (this.SelectParty.id != null) { if (this.SelectParty.id) {
uni.setStorageSync("lastSelectedParty", this.SelectParty.parentId) uni.setStorageSync("lastSelectedParty", this.SelectParty)
uni.navigateBack({ uni.navigateBack({
success: () => { success: () => {
uni.$emit("pagePicker:custom", this.SelectParty) uni.$emit("pagePicker:custom", this.SelectParty)