diff --git a/src/apps/AppMonitoringObject/Add.vue b/src/apps/AppMonitoringObject/Add.vue index 77b3f871..cc33b58b 100644 --- a/src/apps/AppMonitoringObject/Add.vue +++ b/src/apps/AppMonitoringObject/Add.vue @@ -8,7 +8,7 @@ 监测对象类型
- +
@@ -16,10 +16,10 @@
* - 户主姓名 + 姓名
-
@@ -31,8 +31,8 @@ 身份证号
- +
@@ -43,8 +43,7 @@ 性别
- + {{$dict.getLabel('sex', form.sex) || '自动识别'}}
@@ -69,9 +68,9 @@ 现住址
- +
- {{ form.addressArea }} + {{ form.currentAreaName }} 请选择
@@ -88,7 +87,7 @@ 民族
- +
@@ -99,7 +98,7 @@ 政治面貌
- +
@@ -110,7 +109,7 @@ 文化程度
- +
@@ -121,7 +120,7 @@ 详细地址
- +
@@ -136,11 +135,11 @@
- +
-
+
@@ -148,7 +147,18 @@ 在校情况
- + +
+
+
+
+
+
+ * + 健康状况 +
+
+
@@ -159,7 +169,7 @@ 劳动技能
- +
@@ -170,7 +180,7 @@ 务工区域
- +
@@ -181,12 +191,12 @@ 务工时间/月
- +
-
+
@@ -194,8 +204,8 @@ 是否参加医保
-
-
+
+
@@ -206,8 +216,8 @@ 是否参加大病保险
-
-
+
+
@@ -218,8 +228,8 @@ 是否参加养老保险
-
-
+
+
@@ -230,8 +240,8 @@ 是否享受最低生活保障
-
享受
-
未享受
+
享受
+
未享受
@@ -242,15 +252,15 @@ 是否特困供养
-
-
+
+
-
{{ isEdit ? '保存' : '申请纳入监测' }}
+
{{ girdInfo.checkType == 2 ? '保存' : '申请纳入监测' }}
@@ -260,54 +270,88 @@ export default { data() { return { form: { - addressAreaId: '', - address: '', - addressArea: '', - move: '02', - place: '', - placeAreaId: '', - placeArea: '', - type: '', - files: [] + name: '', + objectType: '', + idNumber: '', + sex: '', + phone: '', + currentAreaId: '', + currentAreaName: '', + nation: '', + politicsStatus: '', + education: '', + currentAddress: '', + files: [], + schoolStatus: '', + labourStatus: '', + workArea: '', + workeMonths: '', + basicMedicalTreatment: '02', + seriousIllnessInsurance: '02', + endowmentInsurance: '02', + subsistenceAllowance: '02', + specialPovertySupport: '02', + girdId: '', + girdName: '', + healthyStatus: '', }, $areaId: '', isEdit: false, id: '', - areaName: '', + girdInfo: {} } }, - created() { - this.areaName = this.$store.state.user.areaFullName - this.$dict.load(['fpType', 'fpYesOrNo']) - }, - onLoad(query) { - if (query.id) { - this.isEdit = true - this.id = query.id + this.isGirdUser() + this.$dict.load(['fpType', 'riskEliminationMethod', 'fpRiskType', 'fpYesOrNo', 'fpNation', 'fpEducation', 'fpStudentsInSchool', 'fpHealth', + 'fpLaborSkills', 'fpPoliticalOutlook', 'sex', 'fpHealth']).then(() => { + if (query.id) { + this.isEdit = true + this.id = query.id + this.getInfo(this.id) + }else { + this.currentAreaName = this.$store.state.user.areaFullName + } + }) + + }, - this.getInfo(this.id) - } - document.title = query.id ? '编辑监测对象' : '添加监测对象' + onShow() { + document.title = this.id ? '编辑监测对象' : '添加监测对象' }, methods: { + rules() { + return { + objectType: '请选择监测对象类型', + name: '请输入姓名', + idNumber: '请输入身份证号', + phone: '请输入联系方式', + currentAreaId: '请选择现住址', + } + }, + submit() { - if (!this.form.type) { - return this.$u.toast('请选择监测类型') + const rules = this.rules() + + for (let v of Object.keys(rules)) { + if (!this.form[v]) { + return this.$u.toast(rules[v]) + } + } + if(!/[^0]0{0,2}$/.test(this.form.currentAreaId)) { + return this.$u.toast('现住址必须选到村级') } - if (!this.form.phone) { - return this.$u.toast('请输入联系方式') + if(this.form.files.length) { + this.form.photo = this.form.files[0].url } - if (!this.form.addressAreaId) { - return this.$u.toast('请选择住址') - } - - uni.showLoading() - this.$http.post('/app/apppreventionreturntopoverty/addOrUpdate', { + this.form.girdId = this.girdInfo.girdId + this.form.girdName = this.girdInfo.girdName + this.form.householdIdNumber = this.form.idNumber + this.$http.post('/app/apppreventionreturntopoverty/addByEwechat', { ...this.form, id: this.isEdit ? this.id : '' }).then(res => { @@ -318,12 +362,11 @@ export default { delta: 1 }) } - uni.hideLoading() }) }, onAreaChange(e) { - this.form.addressAreaId = e + this.form.currentAreaId = e }, onChange(e) { @@ -337,9 +380,28 @@ export default { ...this.form, ...res.data } + + if(this.form.photo) { + this.form.files = [{url: this.form.photo}] + } } }) - } + }, + changeIdNumber() { + let reg = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; + if (this.form.idNumber.length == 18 && !reg.test(this.form.idNumber)) { + return this.$u.toast('请输入正确的身份证号码') + } + var info = this.$idCardNoUtil.getIdCardInfo(this.form.idNumber) + this.form.sex = info.gender + }, + isGirdUser() { + this.$http.post('/app/appgirdmemberinfo/checkLogOnUser').then((res) => { + if (res.code == 0) { + this.girdInfo = res.data + } + }) + }, } } diff --git a/src/apps/AppMonitoringObject/Detail.vue b/src/apps/AppMonitoringObject/Detail.vue index c40d3f60..6bd1bf89 100644 --- a/src/apps/AppMonitoringObject/Detail.vue +++ b/src/apps/AppMonitoringObject/Detail.vue @@ -9,7 +9,8 @@
- + +

{{ info.name }}

{{ info.phone }}

@@ -19,11 +20,11 @@
- {{ info.addressArea }} + {{ info.countyName + info.townName + info.villageName }}
- {{ info.address }} + {{ info.currentAddress }}
@@ -52,7 +53,7 @@
- {{ $dict.getLabel('fpYesOrNo', info.seriousIllnessInsurance) }} + {{ $dict.getLabel('fpYesOrNo', info.basicMedicalTreatment) }}
@@ -114,7 +115,7 @@ info.family && info.family.length ? '已填写' : '未填写' }})
- 编辑 + 编辑
@@ -133,11 +134,11 @@ isFamilySituation ? '已填写' : '未填写' }})
- 编辑 + 编辑
- {{ $dict.getLabel('fpYesOrNo', info.dilapidatedHouse) || '-' }} + {{ $dict.getLabel('fpYesOrNo', info.dilapidatedHousehold) || '-' }}
@@ -150,34 +151,34 @@

收支情况

({{ isIncome ? '已填写' : '未填写' }})
- 编辑 + 编辑
- {{ info.income6 }}元 + {{ info.income8 }}元
- {{ info.income7 }}元 + {{ info.income9 }}元
- +
@@ -195,8 +196,8 @@

{{ item.detail }}

-
- +
@@ -235,7 +236,8 @@ export default { list: [], isFrom: false, viewAll: false, - checkType: '' + checkType: '', + girdInfo: {} } }, @@ -277,7 +279,7 @@ export default { this.isFrom = true } this.$dict.load(['fpType', 'riskEliminationMethod', 'fpRiskType', 'fpYesOrNo', 'fpNation', 'fpEducation', 'fpStudentsInSchool', 'fpHealth', - 'fpLaborSkills', 'fpPoliticalOutlook']).then(() => { + 'fpLaborSkills', 'fpPoliticalOutlook', 'fpIndustrialAssistance', 'fpHealthAssistance']).then(() => { this.isGirdUser() this.getInfo() }) @@ -296,6 +298,7 @@ export default { this.$http.post('/app/appgirdmemberinfo/checkLogOnUser').then((res) => { if (res.code == 0) { this.checkType = res.data.checkType + this.girdInfo = res.data } }) }, @@ -362,20 +365,9 @@ export default { let ylbxCount = 0 let ylCount = 0 - // if(res.data.familyList && res.data.familyList.length) { - // res.data.familyList.forEach(item => { - // if (item.medicalInsurance === '02') { - // ylbxCount = ylbxCount + 1 - // } - // if (item.endowmentInsurance === '02') { - // ylCount = ylCount + 1 - // } - // }) - // } - if(res.data.family && res.data.family.length) { res.data.family.forEach(item => { - if (item.medicalInsurance === '02') { + if (item.basicMedicalTreatment === '02') { ylbxCount = ylbxCount + 1 } if (item.endowmentInsurance === '02') { @@ -388,19 +380,12 @@ export default { this.info.ylCount = ylCount this.pageShow = true } - - uni.hideLoading() }) - // this.$http.post(`/app/apppreventionreturntopovertylog/list?pid=${this.id}&size=1000¤t=1`).then(res => { - // if (res.code === 0) { - // this.list = res.data.records.map(item => { - // return { - // ...item, - // imgs: JSON.parse(item.picture) - // } - // }) - // } - // }) + this.$http.post(`/app/apppreventionreturntopovertylog/list?pid=${this.id}&size=1000¤t=1`).then(res => { + if (res.code === 0) { + this.list = res.data.records || [] + } + }) }, examine(text, pass) { @@ -570,7 +555,7 @@ export default { .item-avatar { height: 192px; - image { + img { width: 112px; height: 112px; margin-right: 24px; diff --git a/src/apps/AppMonitoringObject/List.vue b/src/apps/AppMonitoringObject/List.vue index ffbda197..8b0f235e 100644 --- a/src/apps/AppMonitoringObject/List.vue +++ b/src/apps/AppMonitoringObject/List.vue @@ -2,7 +2,7 @@
-
+

{{ item.idNumber || '' }}

-

{{ item.currentAddress || '' }} {{ item.address || '' }}

+

{{ item.countyName + item.townName + item.villageName }}{{ item.currentAddress || '' }}

- +
@@ -72,7 +72,8 @@ export default { currentTabs: 0, areaId: '', areaName: '', - isAdmin: false + isAdmin: false, + checkType: '' } }, computed: { @@ -99,6 +100,7 @@ export default { if (res.code == 0) { if (res.data.checkType != '0') { this.isAdmin = true + this.checkType = res.data.checkType this.getList() } } @@ -116,7 +118,7 @@ export default { params: { current: this.current, size: 15, - status: this.currentTabs == 1 ? '3' : '1', + status: this.currentTabs, // addressAreaId: this.areaId, name: this.keyword }, diff --git a/src/apps/AppMonitoringObject/MonitorAddFamilyMember.vue b/src/apps/AppMonitoringObject/MonitorAddFamilyMember.vue index 820bbed6..4847dd82 100644 --- a/src/apps/AppMonitoringObject/MonitorAddFamilyMember.vue +++ b/src/apps/AppMonitoringObject/MonitorAddFamilyMember.vue @@ -1,5 +1,5 @@ @@ -266,76 +270,86 @@ export default { data() { return { form: { - destitute: '', - education: '', - endowmentInsurance: '', - health: '', - idNumber: '', - laborSkills: '', - medicalInsurance: '', name: '', - nation: '', - politicalOutlook: '', - relationship: '', - relocation: '', + householdRelation: '', + idNumber: '', sex: '', - sicknessInsurance: '', - studentsInSchool: '', - subsistenceAllowance: '', + phone: '', + currentAreaId: '', + currentAreaName: '', + nation: '', + politicsStatus: '', + education: '', + currentAddress: '', + files: [], + schoolStatus: '', + labourStatus: '', workArea: '', - workingMonths: '' + workeMonths: '', + basicMedicalTreatment: '02', + seriousIllnessInsurance: '02', + endowmentInsurance: '02', + subsistenceAllowance: '02', + specialPovertySupport: '02', + girdId: '', + girdName: '', + healthyStatus: '', }, id: '', - info: {}, + $areaId: '', isEdit: false, - index: '' + id: '', + girdInfo: {}, + householdIdNumber: '', + objectType: '' } }, onLoad(query) { - uni.showLoading() - this.id = query.id - this.$dict.load(['fpRelationship', 'sex', 'fpNation', 'fpHealth', 'fpEducation', 'fpYesOrNo', 'fpLaborSkills', 'fpPoliticalOutlook', - 'fpRelationship', 'fpStudentsInSchool', 'fpFnancialAssistance', 'fpHealthAssistance', 'fpHousingSecurity']).then(() => { - this.getInfo(query.id) + this.householdIdNumber = query.houseIdNumber + this.objectType = query.objectType + this.$dict.load(['fpRelationship','riskEliminationMethod', 'fpRiskType', 'fpYesOrNo', 'fpNation', 'fpEducation', 'fpStudentsInSchool', 'fpHealth', + 'fpLaborSkills', 'fpPoliticalOutlook', 'sex', 'fpHealth']).then(() => { + if(query.id) { + this.id = query.id + this.getInfo(query.id) + } }) - document.title = query.index ? '编辑家庭成员' : '添加家庭成员' - if (query.index > -1) { this.isEdit = true this.index = Number(query.index) } + + this.isGirdUser() + this.$areaId = this.$store.state.user.areaId + uni.$on('reload', () => { + this.getInfo() + }) + }, + + onShow() { + document.title = this.id ? '编辑家庭成员' : '添加家庭成员' }, methods: { getInfo(id) { this.$http.post(`/app/apppreventionreturntopoverty/queryDetailById?id=${id}`).then(res => { if (res.code === 0) { - if (this.isEdit) { - this.form = { - ...res.data.familyList[this.index] - } + this.form = { ...res.data } + if(this.form.photo) { + this.form.files = [{url: this.form.photo}] } - this.info = res.data } - - uni.hideLoading() }) }, rules() { return { - relationship: '请选择与户主关系', + householdRelation: '请选择与户主关系', name: '请输入姓名', idNumber: '请输入身份证号', - sex: '请选择性别', - studentsInSchool: '请选择在校情况', - health: '请选择健康状况', - medicalInsurance: '请选择是否参加医保', - sicknessInsurance: '请选择是否参加大病保险', - endowmentInsurance: '请选择是否参加养老保险', - subsistenceAllowance: '请选择是否享受最低生活保障', - destitute: '请选择是否特困供养', + phone: '请输入联系方式', + currentAreaId: '请选择现住址', } }, @@ -348,28 +362,47 @@ export default { } } - uni.showLoading() - let familyList = this.info.familyList - if (this.isEdit) { - familyList[this.index] = this.form - } else { - familyList.push(this.form) + if(!/[^0]0{0,2}$/.test(this.form.currentAreaId)) { + return this.$u.toast('现住址必须选到村级') } - this.$http.post('/app/apppreventionreturntopoverty/addOrUpdate', { - ...this.info, - familyList, - id: this.id + + if(this.form.files.length) { + this.form.photo = this.form.files[0].url + } + this.form.girdId = this.girdInfo.girdId + this.form.girdName = this.girdInfo.girdName + this.form.householdIdNumber = this.householdIdNumber + this.form.objectType = this.objectType + this.$http.post('/app/apppreventionreturntopoverty/addByEwechat', { + ...this.form, + id: this.id || '' }).then(res => { if (res.code === 0) { - this.$u.toast(this.isEdit ? '编辑成功' : '提交成功') + this.$u.toast(this.isEdit ? '保存成功' : '提交成功') uni.$emit('reload') uni.navigateBack({ delta: 1 }) } - uni.hideLoading() }) - } + }, + + isGirdUser() { + this.$http.post('/app/appgirdmemberinfo/checkLogOnUser').then((res) => { + if (res.code == 0) { + this.girdInfo = res.data + } + }) + }, + + changeIdNumber() { + let reg = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; + if (this.form.idNumber.length == 18 && !reg.test(this.form.idNumber)) { + return this.$u.toast('请输入正确的身份证号码') + } + var info = this.$idCardNoUtil.getIdCardInfo(this.form.idNumber) + this.form.sex = info.gender + }, } } diff --git a/src/apps/AppMonitoringObject/MonitorAddLog.vue b/src/apps/AppMonitoringObject/MonitorAddLog.vue index 8d0ab0ec..ddc4c6b2 100644 --- a/src/apps/AppMonitoringObject/MonitorAddLog.vue +++ b/src/apps/AppMonitoringObject/MonitorAddLog.vue @@ -13,7 +13,7 @@ (最多9张)
- +
提交
@@ -27,8 +27,7 @@ export default { return { detail: '', pid: '', - id: '', - picture: [] + filies: [] } }, @@ -37,34 +36,19 @@ export default { }, onLoad(query) { - if (query.id) { - this.getInfo(query.id) - this.id = query.id - } this.pid = query.pid }, methods: { - getInfo(id) { - this.$http.post(`/app/apppreventionreturntopovertylog/queryDetailById?id=${id}`).then(res => { - if (res.code === 0) { - this.detail = res.data.detail - this.picture = JSON.parse(res.data.picture) - } - }) - }, submit() { if (!this.detail) { return this.$u.toast('请输入帮扶内容') } - - uni.showLoading() this.$http.post('/app/apppreventionreturntopovertylog/addOrUpdate', { detail: this.detail, - picture: JSON.stringify(this.picture), + filies: this.filies, pid: this.pid, - id: this.id || '' }).then(res => { if (res.code === 0) { this.$u.toast(this.isEdit ? '保存成功' : '提交成功') @@ -73,7 +57,6 @@ export default { delta: 1 }) } - uni.hideLoading() }) } } diff --git a/src/apps/AppMonitoringObject/MonitorFamilyMember.vue b/src/apps/AppMonitoringObject/MonitorFamilyMember.vue index 214f157e..10278ae6 100644 --- a/src/apps/AppMonitoringObject/MonitorFamilyMember.vue +++ b/src/apps/AppMonitoringObject/MonitorFamilyMember.vue @@ -21,23 +21,23 @@
- {{ $dict.getLabel('fpPoliticalOutlook', item.politicalOutlook) }} + {{ $dict.getLabel('fpPoliticalOutlook', item.politicsStatus) }}
{{ $dict.getLabel('fpEducation', item.education) }}
- - {{ $dict.getLabel('fpStudentsInSchool', item.studentsInSchool) }} + + {{ $dict.getLabel('fpStudentsInSchool', item.schoolStatus) }}
- {{ $dict.getLabel('fpHealth', item.health) }} + {{ $dict.getLabel('fpHealth', item.healthyStatus) }}
- {{ $dict.getLabel('fpLaborSkills', item.laborSkills) }} + {{ $dict.getLabel('fpLaborSkills', item.labourStatus) }}
@@ -45,15 +45,15 @@
- {{ item.workingMonths }}月 + {{ item.workeMonths }}月
- {{ $dict.getLabel('fpYesOrNo', item.medicalInsurance) }} + {{ $dict.getLabel('fpYesOrNo', item.basicMedicalTreatment) }}
- {{ $dict.getLabel('fpYesOrNo', item.sicknessInsurance) }} + {{ $dict.getLabel('fpYesOrNo', item.seriousIllnessInsurance) }}
@@ -65,7 +65,7 @@
- {{ $dict.getLabel('fpYesOrNo', item.destitute) }} + {{ $dict.getLabel('fpYesOrNo', item.specialPovertySupport) }}
@@ -98,7 +98,9 @@ export default { list: [], id: '', info: {}, - pageShow: false + pageShow: false, + houseIdNumber: '', + objectType: '', } }, @@ -107,51 +109,45 @@ export default { }, onLoad(query) { - uni.showLoading() - this.id = query.id - this.$dict.load(['fpRelationship', 'sex', 'fpNation', 'fpHealth', 'fpEducation', 'fpYesOrNo', 'fpLaborSkills', 'fpPoliticalOutlook', - 'fpRelationship', 'fpStudentsInSchool', 'fpFnancialAssistance', 'fpHealthAssistance', 'fpHousingSecurity']).then(() => { - this.getInfo(query.id) + this.houseIdNumber = query.houseIdNumber + this.objectType = query.objectType + this.$dict.load(['fpRelationship','riskEliminationMethod', 'fpRiskType', 'fpYesOrNo', 'fpNation', 'fpEducation', 'fpStudentsInSchool', 'fpHealth', + 'fpLaborSkills', 'fpPoliticalOutlook', 'sex', 'fpHealth']).then(() => { + if(query.id) { + this.id = query.id + this.getInfo() + } }) uni.$on('reload', () => { - this.getInfo(query.id) + this.getInfo() }) }, methods: { toAdd() { uni.navigateTo({ - url: './MonitorAddFamilyMember?id=' + this.id + // url: './MonitorAddFamilyMember?id=' + this.id + url: `./MonitorAddFamilyMember?houseIdNumber=${this.houseIdNumber}&objectType=${this.objectType}` }) }, toEdit(index) { this.$confirm('确定编辑该数据?').then(() => { uni.navigateTo({ - url: `./MonitorAddFamilyMember?id=${this.id}&index=${index}` + url: `./MonitorAddFamilyMember?id=${this.list[index].id}&houseIdNumber=${this.houseIdNumber}&objectType=${this.objectType}` }) - }).catch(() => { }) }, remove(index) { - this.$confirm('确定删除该数据?').then(() => { - let familyList = JSON.parse(JSON.stringify(this.list)) - familyList.splice(index, 1) - uni.showLoading() - this.$http.post('/app/apppreventionreturntopoverty/addOrUpdate', { - ...this.info, - familyList, - id: this.id - }).then(res => { + this.$confirm('', '确定删除该数据?').then(() => { + this.$http.post(`/app/apppreventionreturntopoverty/delete?ids=${this.list[index].id}`).then(res => { if (res.code === 0) { this.$u.toast('删除成功') - this.getInfo(this.id) + uni.$emit('reload') } - uni.hideLoading() }) - }).catch(() => { }) }, @@ -159,22 +155,21 @@ export default { this.list[index].isShow = !this.list[index].isShow }, - getInfo(id) { - this.$http.post(`/app/apppreventionreturntopoverty/queryDetailById?id=${id}`).then(res => { + getInfo() { + this.$http.post(`/app/apppreventionreturntopoverty/queryDetailById?id=${this.id}`).then(res => { if (res.code === 0) { this.info = res.data - this.list = res.data.familyList.map(item => { - return { - ...item, - isShow: false, - age: this.$calcAge(item.idNumber) - } - }) - + if(res.data.family && res.data.family.length) { + this.list = res.data.family.map(item => { + return { + ...item, + isShow: false, + age: this.$calcAge(item.idNumber) + } + }) + } this.pageShow = true } - - uni.hideLoading() }) } } diff --git a/src/apps/AppMonitoringObject/MonitorFamilySituation.vue b/src/apps/AppMonitoringObject/MonitorFamilySituation.vue index b809be64..2a34d601 100644 --- a/src/apps/AppMonitoringObject/MonitorFamilySituation.vue +++ b/src/apps/AppMonitoringObject/MonitorFamilySituation.vue @@ -8,7 +8,7 @@ 监测对象类型
- +
@@ -19,8 +19,8 @@ 是否危房
-
-
+
+
@@ -31,8 +31,8 @@ 是否饮水安全问题
-
-
+
+
@@ -43,8 +43,8 @@ 是否搬迁
-
-
+
+
@@ -60,21 +60,31 @@ export default { data() { return { form: { - dilapidatedHouse: '', - drinkingWaterSafety: '', - riskType: '' + objectType: '', + dilapidatedHousehold: '02', + drinkingWaterSafety: '02', + move: '02' }, - id: '' + id: '', + girdId: '', + girdName: '', } }, onLoad(query) { - this.$dict.load(['fpYesOrNo', 'fpRiskType']) - uni.showLoading() + this.$dict.load(['fpYesOrNo', 'fpRiskType']).then(() => { + this.getInfo(query.id) + }) this.id = query.id - this.getInfo(query.id) - document.title = query.id ? '编辑家庭情况' : '添加家庭情况' + this.girdId = query.girdId + this.girdName = query.girdName + + + }, + + onShow() { + document.title = '编辑家庭情况' }, methods: { @@ -92,19 +102,19 @@ export default { }, submit() { - uni.showLoading() - this.$http.post('/app/apppreventionreturntopoverty/addOrUpdate', { + this.form.girdId = this.girdId + this.form.girdName = this.girdName + this.$http.post('/app/apppreventionreturntopoverty/addByEwechat', { ...this.form, id: this.id }).then(res => { if (res.code === 0) { - this.$u.toast(this.isEdit ? '保存成功' : '提交成功') + this.$u.toast('保存成功') uni.$emit('reload') uni.navigateBack({ delta: 1 }) } - uni.hideLoading() }) }, } diff --git a/src/apps/AppMonitoringObject/MonitorIncome.vue b/src/apps/AppMonitoringObject/MonitorIncome.vue index 4a4adfaf..559f6ed0 100644 --- a/src/apps/AppMonitoringObject/MonitorIncome.vue +++ b/src/apps/AppMonitoringObject/MonitorIncome.vue @@ -75,7 +75,7 @@ 合规自然支出
-
@@ -96,18 +96,24 @@ export default { income3: '', income4: '', income5: '', - income8: '', - income9: '' + income6: '', + income7: '' }, - id: '' + id: '', + girdId: '', + girdName: '', } }, onLoad(query) { - uni.showLoading() this.id = query.id + this.girdId = query.girdId + this.girdName = query.girdName this.getInfo(query.id) - document.title = query.id ? '编辑收支情况' : '添加收支情况' + }, + + onShow() { + document.title = '编辑收支情况' }, methods: { @@ -119,25 +125,23 @@ export default { ...res.data } } - - uni.hideLoading() }) }, submit() { - uni.showLoading() - this.$http.post('/app/apppreventionreturntopoverty/addOrUpdate', { + this.form.girdId = this.girdId + this.form.girdName = this.girdName + this.$http.post('/app/apppreventionreturntopoverty/addByEwechat', { ...this.form, id: this.id }).then(res => { if (res.code === 0) { - this.$u.toast(this.isEdit ? '保存成功' : '提交成功') + this.$u.toast('保存成功') uni.$emit('reload') uni.navigateBack({ delta: 1 }) } - uni.hideLoading() }) } } diff --git a/src/apps/AppMonitoringObject/MonitorPoorStatus.vue b/src/apps/AppMonitoringObject/MonitorPoorStatus.vue index e17941ec..7e07c3af 100644 --- a/src/apps/AppMonitoringObject/MonitorPoorStatus.vue +++ b/src/apps/AppMonitoringObject/MonitorPoorStatus.vue @@ -136,20 +136,26 @@ export default { educationalAssistance: '', financialAssistance: '', socialAssistance: '', - publicWelfarePostAssistance: '' + publicWelfarePostAssistance: '', }, - id: '' + id: '', + girdId: '', + girdName: '', } }, onLoad(query) { - uni.showLoading() this.$dict.load(['fpYesOrNo', 'fpRiskEliminationMethod', 'fpIndustrialAssistance', 'fpHealthAssistance', 'fpEmploymentAssistance', 'fpEducationalAssistance', 'fpFinancialAssistance', 'fpSocialAssistance', 'fpPublicWelfarePostAssistance']).then(() => { this.getInfo(query.id) }) this.id = query.id - document.title = query.id ? '编辑风险解除' : '添加风险解除' + this.girdId = query.girdId + this.girdName = query.girdName + }, + + onShow() { + document.title = '编辑帮扶措施' }, methods: { @@ -165,8 +171,6 @@ export default { this.form.isRisk = '01' } } - - uni.hideLoading() }) }, @@ -178,35 +182,19 @@ export default { }, submit() { - if (!this.form.isRisk) { - return this.$u.toast('请选择是否消除风险') - } - - if (this.form.isRisk === '01') { - if (!this.form.riskEliminationMethod) { - return this.$u.toast('请选择风险消除方式') - } - - if (!this.form.riskEliminationDate) { - return this.$u.toast('请选择风险消除时间') - } - } - - uni.showLoading() - this.$http.post('/app/apppreventionreturntopoverty/addOrUpdate', { + this.form.girdId = this.girdId + this.form.girdName = this.girdName + this.$http.post('/app/apppreventionreturntopoverty/addByEwechat', { ...this.form, - riskEliminationMethod: this.form.isRisk ? this.form.riskEliminationMethod : '', id: this.id, - status: this.form.isRisk === '01' ? 1 : '' }).then(res => { if (res.code === 0) { - this.$u.toast(this.isEdit ? '保存成功' : '提交成功') + this.$u.toast('保存成功') uni.$emit('reload') uni.navigateBack({ delta: 1 }) } - uni.hideLoading() }) } }