diff --git a/src/project/pingchang/AppPartyAuth/AppPartyAuth.vue b/src/project/pingchang/AppPartyAuth/AppPartyAuth.vue index cc1a03d..033c2bf 100644 --- a/src/project/pingchang/AppPartyAuth/AppPartyAuth.vue +++ b/src/project/pingchang/AppPartyAuth/AppPartyAuth.vue @@ -67,14 +67,14 @@ export default { if(!this.isChecked) { return this.$u.toast('请勾选用户服务及隐私协议') } - this.$instance.post(`/app/appwechatuser/idNumberAttestation`, { + this.$instance.post(`/app/appwechatuser/partyIdentification`, { idNumber, name }).then(res => { if (res.code == 0) { if (res.data == 2 || res.data == 0) { this.$store.dispatch('getUserInfo') uni.redirectTo({ - url: `./partyAuthSuccess?status=${res.data}`, success: () => { + url: `./partyAuthApply?status=${res.data}`, success: () => { if (res.data == 0) { uni.setStorageSync("authForm", {idNumber, name}) } diff --git a/src/project/pingchang/AppPartyAuth/partyAuthApply.vue b/src/project/pingchang/AppPartyAuth/partyAuthApply.vue index 9e54f47..677245a 100644 --- a/src/project/pingchang/AppPartyAuth/partyAuthApply.vue +++ b/src/project/pingchang/AppPartyAuth/partyAuthApply.vue @@ -31,7 +31,7 @@

手机号码

- +
@@ -42,9 +42,8 @@

党组织

- - + +
@@ -58,7 +57,7 @@
- {{ form.nucleicAcidDate }} + {{ form.joinPartyTime }} 请选择
@@ -73,7 +72,7 @@

党员类型

- +
@@ -103,6 +102,12 @@ export default { form: { name: '', idNumber: '', + phone: '', + partyOrgId: '', + partyOrgName: '', + joinPartyTime: '', + partyType: '', + partyStatus: '0', } } }, @@ -113,76 +118,62 @@ export default { }, 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.name = query.name this.form.idNumber = query.idNumber }) + uni.setNavigationBarTitle({ + title: '申请党员' + }); }, methods: { onDateChange(e) { - this.form.nucleicAcidDate = `${e.year}-${e.month}-${e.day}` + this.form.joinPartyTime = `${e.year}-${e.month}-${e.day}` }, handleSelectParty(v) { - console.log(v); + this.form.partyOrgId = v.id + this.form.partyOrgName = v.name }, - submit() { - if (!this.form.temperature) { - return this.$toast('请输入当前体温') + if (!this.form.name) { + return this.$toast('请输入党员姓名') } - if (!this.form.contactPatients) { - return this.$toast('请选择14天内是否接触新冠确诊或疑似患者') + if (!this.form.idNumber) { + return this.$toast('身份证号') } - if (!this.form.healthList.length) { - return this.$toast('请选择当前健康状况') - } else { - this.form.health = this.form.healthList.toString() + if (!this.form.phone.length) { + return this.$toast('请输入手机号') } - if(!this.form.nucleicAcidDate) { - return this.$toast('请选择核酸检测日期') + if(!this.form.partyOrgId) { + return this.$toast('请选择党组织') } - if (!this.form.nucleicAcidResult) { - return this.$toast('请选择核酸检测结果') + if(!this.form.joinPartyTime) { + return this.$toast('请选择入党时间') } - if (!this.form.jkmType) { - return this.$toast('请选择健康码类型') + if(!this.form.partyType) { + 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.$instance.post(`/app/appepidemicpreventionhealthreportinfo/addReportInfo`, { + this.$instance.post(`/app/appparty/addOrUpdateForWX`, { ...this.form, - jkmUrl: this.form.jkmUrlArr[0].url, - nucleicAcidUrl: this.form.nucleicAcidUrlArr[0].url, - nucleicAcidDate: this.form.nucleicAcidDate + ' 00:00:00' }).then(res => { if (res.code == 0) { uni.$emit('update') this.$toast('提交成功') setTimeout(() => { - uni.navigateBack() + this.$store.dispatch('getUserInfo') + uni.redirectTo({url: "./partyAuthSuccess"}) }, 400) } this.$hideLoading() diff --git a/src/project/pingchang/AppPartyAuth/partyAuthSuccess.vue b/src/project/pingchang/AppPartyAuth/partyAuthSuccess.vue index 8b7bdc1..cdd24db 100644 --- a/src/project/pingchang/AppPartyAuth/partyAuthSuccess.vue +++ b/src/project/pingchang/AppPartyAuth/partyAuthSuccess.vue @@ -39,7 +39,7 @@ export default { return this.user.partyStatusForWX == 3 }, isReview() { - return this.user.partyStatusForWX == 0 + return this.user.partyStatusForWX == 1 }, }, onShow() { diff --git a/src/project/pingchang/AppPartyAuth/selectPartyOrg.vue b/src/project/pingchang/AppPartyAuth/selectPartyOrg.vue index 7e77bbd..5612e99 100644 --- a/src/project/pingchang/AppPartyAuth/selectPartyOrg.vue +++ b/src/project/pingchang/AppPartyAuth/selectPartyOrg.vue @@ -40,20 +40,16 @@ slectList: [], userList: [], parentId: '', - isFormMap: 0, //1为网格地图 一级不允许选中 } }, - onLoad(option) { - if (option.isFormMap) { - this.isFormMap = option.isFormMap - } + onLoad() { this.getPartyOrg() + this.SelectParty = uni.getStorageSync("lastSelectedParty") || {} }, methods: { getPartyOrg() { this.$instance.post(`/app/partyOrganization/queryPartyOrganizationServiceList`).then((res) => { if (res?.data) { - console.log(res); let parents = res.data.map(e => e.parentId) this.allData = res.data.map(e => ({...e, hasChildren: parents.includes(e.id)})) this.treeInit() @@ -61,23 +57,22 @@ }) }, treeInit() { - // let last = uni.getStorageSync("lastSelectedParty") - // if (last) { - // this.$instance.post("/app/appgirdinfo/listFatherGirdInfo", null, { - // params: {id: last} - // }).then(res => { - // if (res?.data) { - // this.slectList = [{name: '可选范围', id: ''}, res.data].flat() - // this.getPartyAndParent({id: last}) - // } - // }) - // this.getPartyAndParent({id: last}) - // } else { - this.treeList = this.allData.filter(e => !e.parentId) - this.treeList.map((item) => item.isChecked = false) - let obj = {name: '可选范围', id: ''} - this.slectList.push(obj) - // } + let last = uni.getStorageSync("lastSelectedParty") + if (last) { + console.log(last); + this.allData.map((item) => { + if(item.id == last.id) { + item.isChecked = true + } else { + item.isChecked = false + } + }) + } else { + this.allData.map((item) => item.isChecked = false) + } + this.treeList = this.allData.filter(e => !e.parentId) + let obj = {name: '可选范围', id: ''} + this.slectList.push(obj) }, itemClick(row) { if (row.hasChildren) { @@ -125,8 +120,8 @@ }, submit() { console.log(this.SelectParty); - if (this.SelectParty.id != null) { - uni.setStorageSync("lastSelectedParty", this.SelectParty.parentId) + if (this.SelectParty.id) { + uni.setStorageSync("lastSelectedParty", this.SelectParty) uni.navigateBack({ success: () => { uni.$emit("pagePicker:custom", this.SelectParty)