监测对象

This commit is contained in:
liuye
2022-03-26 16:33:51 +08:00
parent 7e063e5a9a
commit 78f966b276
9 changed files with 416 additions and 354 deletions

View File

@@ -8,7 +8,7 @@
<span>监测对象类型</span>
</div>
<div class="right">
<AiSelect dict="fpType" v-model="form.type"></AiSelect>
<AiSelect dict="fpType" v-model="form.objectType"></AiSelect>
</div>
</div>
</div>
@@ -16,10 +16,10 @@
<div class="form-item__wrapper">
<div class="left">
<i>*</i>
<span>户主姓名</span>
<span>姓名</span>
</div>
<div class="right">
<input placeholder="请输入" type="text" v-model="form.phone" :maxlength="8"
<input placeholder="请输入" type="text" v-model="form.name" :maxlength="8"
placeholder-style="color: #999; font-size: 30rpx;"/>
</div>
</div>
@@ -31,8 +31,8 @@
<span>身份证号</span>
</div>
<div class="right">
<input placeholder="请输入" type="idcard" v-model="form.phone" :maxlength="18"
placeholder-style="color: #999; font-size: 30rpx;"/>
<input placeholder="请输入" type="idcard" v-model="form.idNumber" :maxlength="18"
placeholder-style="color: #999; font-size: 30rpx;" @input="changeIdNumber" />
</div>
</div>
</div>
@@ -43,8 +43,7 @@
<span>性别</span>
</div>
<div class="right">
<input placeholder="自动识别" type="idcard" v-model="form.phone" disabled
placeholder-style="color: #999; font-size: 30rpx;"/>
<span :style="form.sex === '' ? 'color:#999;' : 'color:#333;' ">{{$dict.getLabel('sex', form.sex) || '自动识别'}}</span>
</div>
</div>
</div>
@@ -69,9 +68,9 @@
<span>现住址</span>
</div>
<div class="right">
<AiAreaPicker ref="address" class="aiArea" :fullName.sync="form.addressArea" :value="form.addressAreaId" :areaId="$areaId" mode="custom" all @select="onAreaChange">
<AiAreaPicker ref="address" class="aiArea" :fullName.sync="form.currentAreaName" v-model="form.currentAreaId" :areaId="$areaId" all @select="onAreaChange">
<div class="aiArea">
<span class="label" v-if="form.addressArea">{{ form.addressArea }}</span>
<span class="label" v-if="form.currentAreaName">{{ form.currentAreaName }}</span>
<i v-else>请选择</i>
<u-icon name="arrow-right" color="#ddd"/>
</div>
@@ -88,7 +87,7 @@
<span>民族</span>
</div>
<div class="right">
<AiSelect dict="fpType" v-model="form.type"></AiSelect>
<AiSelect dict="fpNation" v-model="form.nation"></AiSelect>
</div>
</div>
</div>
@@ -99,7 +98,7 @@
<span>政治面貌</span>
</div>
<div class="right">
<AiSelect dict="fpType" v-model="form.type"></AiSelect>
<AiSelect dict="fpPoliticalOutlook" v-model="form.politicsStatus"></AiSelect>
</div>
</div>
</div>
@@ -110,7 +109,7 @@
<span>文化程度</span>
</div>
<div class="right">
<AiSelect dict="fpType" v-model="form.type"></AiSelect>
<AiSelect dict="fpEducation" v-model="form.education"></AiSelect>
</div>
</div>
</div>
@@ -121,7 +120,7 @@
<span>详细地址</span>
</div>
<div class="right">
<input placeholder="请输入" v-model="form.address" placeholder-style="color: #999; font-size: 30rpx;"/>
<input placeholder="请输入" v-model="form.currentAddress" placeholder-style="color: #999; font-size: 30rpx;"/>
</div>
</div>
</div>
@@ -136,11 +135,11 @@
</div>
</div>
<div class="upload">
<AiUploader :def.sync="form.files" multiple placeholder="上传图片" :limit="9" action="/admin/file/add2"></AiUploader>
<AiUploader :def.sync="form.files" multiple placeholder="上传图片" :limit="1" action="/admin/file/add2"></AiUploader>
</div>
</div>
<div class="form-group">
<div class="form-group" v-if="isEdit">
<div class="form-item">
<div class="form-item__wrapper">
<div class="left">
@@ -148,7 +147,18 @@
<span>在校情况</span>
</div>
<div class="right">
<AiSelect dict="fpType" v-model="form.type"></AiSelect>
<AiSelect dict="fpStudentsInSchool" v-model="form.schoolStatus"></AiSelect>
</div>
</div>
</div>
<div class="form-item">
<div class="form-item__wrapper">
<div class="left">
<i style="opacity: 0;">*</i>
<span>健康状况</span>
</div>
<div class="right">
<AiSelect dict="fpHealth" v-model="form.healthyStatus"></AiSelect>
</div>
</div>
</div>
@@ -159,7 +169,7 @@
<span>劳动技能</span>
</div>
<div class="right">
<AiSelect dict="fpType" v-model="form.type"></AiSelect>
<AiSelect dict="fpLaborSkills" v-model="form.labourStatus"></AiSelect>
</div>
</div>
</div>
@@ -170,7 +180,7 @@
<span>务工区域</span>
</div>
<div class="right">
<input placeholder="请输入" v-model="form.address" placeholder-style="color: #999; font-size: 30rpx;"/>
<input placeholder="请输入" v-model="form.workArea" placeholder-style="color: #999; font-size: 30rpx;"/>
</div>
</div>
</div>
@@ -181,12 +191,12 @@
<span>务工时间/</span>
</div>
<div class="right">
<input placeholder="请输入" v-model="form.address" type="number" placeholder-style="color: #999; font-size: 30rpx;" maxlength="2"/>
<input placeholder="请输入" v-model="form.workeMonths" type="number" placeholder-style="color: #999; font-size: 30rpx;" maxlength="2"/>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="form-group" v-if="isEdit">
<div class="form-item">
<div class="form-item__wrapper">
<div class="left">
@@ -194,8 +204,8 @@
<span>是否参加医保</span>
</div>
<div class="right">
<div class="check-item" :class="form.medicalInsurance == 1 ? 'check-active' : '' " @click="form.medicalInsurance=1"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.medicalInsurance != 1 ? 'check-active' : '' " @click="form.medicalInsurance=0"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.basicMedicalTreatment == '01' ? 'check-active' : '' " @click="form.basicMedicalTreatment='01'"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.basicMedicalTreatment != '01' ? 'check-active' : '' " @click="form.basicMedicalTreatment='02'"><img src="./components/img/check-icon.png" alt=""></div>
</div>
</div>
</div>
@@ -206,8 +216,8 @@
<span>是否参加大病保险</span>
</div>
<div class="right">
<div class="check-item" :class="form.sicknessInsurance == 1 ? 'check-active' : '' " @click="form.sicknessInsurance=1"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.sicknessInsurance != 1 ? 'check-active' : '' " @click="form.sicknessInsurance=0"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.seriousIllnessInsurance == '01' ? 'check-active' : '' " @click="form.seriousIllnessInsurance='01'"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.seriousIllnessInsurance != '01' ? 'check-active' : '' " @click="form.seriousIllnessInsurance='02'"><img src="./components/img/check-icon.png" alt=""></div>
</div>
</div>
</div>
@@ -218,8 +228,8 @@
<span>是否参加养老保险</span>
</div>
<div class="right">
<div class="check-item" :class="form.endowmentInsurance == 1 ? 'check-active' : '' " @click="form.endowmentInsurance=1"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.endowmentInsurance != 1 ? 'check-active' : '' " @click="form.endowmentInsurance=0"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.endowmentInsurance == '01' ? 'check-active' : '' " @click="form.endowmentInsurance='01'"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.endowmentInsurance != '01' ? 'check-active' : '' " @click="form.endowmentInsurance='02'"><img src="./components/img/check-icon.png" alt=""></div>
</div>
</div>
</div>
@@ -230,8 +240,8 @@
<span>是否享受最低生活保障</span>
</div>
<div class="right">
<div class="check-item" :class="form.subsistenceAllowance == 1 ? 'check-active' : '' " @click="form.subsistenceAllowance=1">享受<img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.subsistenceAllowance != 1 ? 'check-active' : '' " @click="form.subsistenceAllowance=0">未享受<img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.subsistenceAllowance == '01' ? 'check-active' : '' " @click="form.subsistenceAllowance='01'">享受<img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.subsistenceAllowance != '01' ? 'check-active' : '' " @click="form.subsistenceAllowance='02'">未享受<img src="./components/img/check-icon.png" alt=""></div>
</div>
</div>
</div>
@@ -242,15 +252,15 @@
<span>是否特困供养</span>
</div>
<div class="right">
<div class="check-item" :class="form.destitute == 1 ? 'check-active' : '' " @click="form.destitute=1"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.destitute != 1 ? 'check-active' : '' " @click="form.destitute=0"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.specialPovertySupport == '01' ? 'check-active' : '' " @click="form.specialPovertySupport='01'"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.specialPovertySupport != '01' ? 'check-active' : '' " @click="form.specialPovertySupport='02'"><img src="./components/img/check-icon.png" alt=""></div>
</div>
</div>
</div>
</div>
<div class="btn" hover-class="text" @click="submit"> {{ isEdit ? '保存' : '申请纳入监测' }}</div>
<div class="btn" hover-class="text" @click="submit"> {{ girdInfo.checkType == 2 ? '保存' : '申请纳入监测' }}</div>
</div>
</template>
@@ -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
}
})
},
}
}
</script>

View File

@@ -9,7 +9,8 @@
<div class="item-wrapper">
<div class="item-header item-avatar">
<div class="left">
<image :src="$cdn + 'avatar.png'"/>
<!-- <img :src="info.photo" alt="" v-if="info.photo" /> -->
<img :src="$cdn + 'avatar.png'" />
<div class="left-right">
<h2>{{ info.name }}</h2>
<p>{{ info.phone }}</p>
@@ -19,11 +20,11 @@
</div>
<div class="item-info">
<label>现住地址</label>
<span>{{ info.addressArea }}</span>
<span>{{ info.countyName + info.townName + info.villageName }}</span>
</div>
<div class="item-info">
<label>详细地址</label>
<span>{{ info.address }}</span>
<span>{{ info.currentAddress }}</span>
</div>
<div class="more-info" v-if="viewAll">
<div class="item-info">
@@ -52,7 +53,7 @@
</div>
<div class="item-info">
<label>医疗参保</label>
<span>{{ $dict.getLabel('fpYesOrNo', info.seriousIllnessInsurance) }}</span>
<span>{{ $dict.getLabel('fpYesOrNo', info.basicMedicalTreatment) }}</span>
</div>
<div class="item-info">
<label>享受最低生活保障</label>
@@ -114,7 +115,7 @@
info.family && info.family.length ? '已填写' : '未填写'
}})</i>
</div>
<span @click="linkTo('./MonitorFamilyMember?id=' + info.id)">编辑</span>
<span @click="linkTo(`./MonitorFamilyMember?id=${info.id}&houseIdNumber=${info.idNumber}&objectType=${info.objectType}`)">编辑</span>
</div>
<div class="item-info">
<label>未参加医疗参保</label>
@@ -133,11 +134,11 @@
isFamilySituation ? '已填写' : '未填写'
}})</i>
</div>
<span @click="linkTo('./MonitorFamilySituation?id=' + info.id)">编辑</span>
<span @click="linkTo(`./MonitorFamilySituation?id=${info.id}&girdId=${girdInfo.girdId}&girdName=${girdInfo.girdName}`)">编辑</span>
</div>
<div class="item-info">
<label>是否危房</label>
<span>{{ $dict.getLabel('fpYesOrNo', info.dilapidatedHouse) || '-' }}</span>
<span>{{ $dict.getLabel('fpYesOrNo', info.dilapidatedHousehold) || '-' }}</span>
</div>
<div class="item-info">
<label>饮用水安全问题</label>
@@ -150,34 +151,34 @@
<h2>收支情况</h2>
<i :style="{color: isIncome ? '#2EA222' : '#FF4466'}">({{ isIncome ? '已填写' : '未填写' }})</i>
</div>
<span @click="linkTo('./MonitorIncome?id=' + info.id)">编辑</span>
<span @click="linkTo(`./MonitorIncome?id=${info.id}&girdId=${girdInfo.girdId}&girdName=${girdInfo.girdName}`)">编辑</span>
</div>
<div class="item-info">
<label>家庭纯收入</label>
<span>{{ info.income6 }}</span>
<span>{{ info.income8 }}</span>
</div>
<div class="item-info">
<label>家庭人均纯收入</label>
<span>{{ info.income7 }}</span>
<span>{{ info.income9 }}</span>
</div>
</div>
<!-- <div class="item-wrapper">
<div class="item-wrapper">
<div class="item-header">
<div class="left">
<h2>结对帮扶</h2>
<h2>帮扶措施</h2>
<i :style="{color: isPoorStatus ? '#2EA222' : '#FF4466'}">({{ isPoorStatus ? '已填写' : '未填写' }})</i>
</div>
<span @click="linkTo('./MonitorPoorStatus?id=' + info.id)">编辑</span>
<span @click="linkTo(`./MonitorPoorStatus?id=${info.id}&girdId=${girdInfo.girdId}&girdName=${girdInfo.girdName}`)">编辑</span>
</div>
<div class="item-info">
<label>结对帮扶</label>
<span>{{ info.riskEliminationMethod ? '是' : '-' }}</span>
<label>产业帮扶</label>
<span>{{ $dict.getLabel('fpIndustrialAssistance', info.industrialAssistance) || '-' }}</span>
</div>
<div class="item-info">
<label>消除风险</label>
<span>{{ info.riskEliminationMethod ? '是' : '-' }}</span>
<label>健康帮扶</label>
<span>{{ $dict.getLabel('fpHealthAssistance', info.healthAssistance) || '-' }}</span>
</div>
</div> -->
</div>
</div>
<div class="tab-content__item" v-show="currIndex === 1">
<div class="log-item" v-for="(item, index) in list" :key="index">
@@ -195,8 +196,8 @@
</div>
</div>
<p>{{ item.detail }}</p>
<div class="imgs">
<image :src="img.url" @click="prevImg(item.imgs, img.url)" v-for="(img, index) in item.imgs"
<div class="imgs" v-if="item.filies && item.filies.length">
<image :src="img.url" @click="prevImg(item.imgs, img.url)" v-for="(img, index) in item.filies"
:key="index"/>
</div>
</div>
@@ -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&current=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&current=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;

View File

@@ -2,7 +2,7 @@
<div class="List">
<div v-if="isAdmin">
<AiTopFixed>
<div class="area">
<!-- <div class="area">
<i>可选范围</i>
<span class="separat">/</span>
<AiAreaPicker ref="area" class="aiArea" :value="areaId" :areaId="user.areaId" :name.sync="areaName" mode="custom"
@@ -11,7 +11,7 @@
<i v-else>请选择</i>
</AiAreaPicker>
</div>
<div class="line"></div>
<div class="line"></div> -->
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bar-width="150" @change="change"></u-tabs>
<div class="seach-obj">
<u-search v-model="keyword" :clearabled="true" placeholder="请输入姓名/身份证号" :show-action="false" bg-color="#F5F5F5"
@@ -32,13 +32,13 @@
</div>
<div class="right-bottom">
<p>{{ item.idNumber || '' }}</p>
<p>{{ item.currentAddress || '' }} {{ item.address || '' }}</p>
<p>{{ item.countyName + item.townName + item.villageName }}{{ item.currentAddress || '' }}</p>
</div>
</div>
</div>
</div>
<AiEmpty class="emptyWrap" v-else></AiEmpty>
<AiFixedBtn>
<AiFixedBtn v-if="checkType == 1">
<div class="addBtn iconfont iconfont-iconfangda" @tap="toAdd"></div>
</AiFixedBtn>
</div>
@@ -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
},

View File

@@ -1,5 +1,5 @@
<template>
<div class="add">
<div class="add">
<div class="form-group">
<div class="form-item">
<div class="form-item__wrapper">
@@ -8,12 +8,10 @@
<span>与户主关系</span>
</div>
<div class="right">
<AiSelect dict="fpRelationship" v-model="form.relationship"></AiSelect>
<AiSelect dict="fpRelationship" v-model="form.householdRelation"></AiSelect>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="form-item">
<div class="form-item__wrapper">
<div class="left">
@@ -21,7 +19,8 @@
<span>姓名</span>
</div>
<div class="right">
<input placeholder="请输入" v-model="form.name" placeholder-style="color: #999; font-size: 30rpx;"/>
<input placeholder="请输入" type="text" v-model="form.name" :maxlength="8"
placeholder-style="color: #999; font-size: 30rpx;"/>
</div>
</div>
</div>
@@ -32,7 +31,8 @@
<span>身份证号</span>
</div>
<div class="right">
<input placeholder="请输入" v-model="form.idNumber" placeholder-style="color: #999; font-size: 30rpx;"/>
<input placeholder="请输入" type="idcard" v-model="form.idNumber" :maxlength="18"
placeholder-style="color: #999; font-size: 30rpx;" @input="changeIdNumber" />
</div>
</div>
</div>
@@ -43,40 +43,7 @@
<span>性别</span>
</div>
<div class="right">
<AiSelect dict="sex" v-model="form.sex"></AiSelect>
</div>
</div>
</div>
<div class="form-item">
<div class="form-item__wrapper">
<div class="left">
<i style="opacity: 0;">*</i>
<span>民族</span>
</div>
<div class="right">
<AiSelect dict="fpNation" v-model="form.nation"></AiSelect>
</div>
</div>
</div>
<div class="form-item">
<div class="form-item__wrapper">
<div class="left">
<i style="opacity: 0;">*</i>
<span>政治面貌</span>
</div>
<div class="right">
<AiSelect dict="fpPoliticalOutlook" v-model="form.politicalOutlook"></AiSelect>
</div>
</div>
</div>
<div class="form-item">
<div class="form-item__wrapper">
<div class="left">
<i style="opacity: 0;">*</i>
<span>文化程度</span>
</div>
<div class="right">
<AiSelect dict="fpEducation" v-model="form.education"></AiSelect>
<span :style="form.sex === '' ? 'color:#999;' : 'color:#333;' ">{{$dict.getLabel('sex', form.sex) || '自动识别'}}</span>
</div>
</div>
</div>
@@ -101,9 +68,9 @@
<span>现住址</span>
</div>
<div class="right">
<AiAreaPicker ref="address" class="aiArea" :fullName.sync="form.addressArea" :value="form.addressAreaId" :areaId="$areaId" mode="custom" all @select="onAreaChange">
<AiAreaPicker ref="address" class="aiArea" :fullName.sync="form.currentAreaName" v-model="form.currentAreaId" :areaId="$areaId" mode="custom" all @select="onAreaChange">
<div class="aiArea">
<span class="label" v-if="form.addressArea">{{ form.addressArea }}</span>
<span class="label" v-if="form.currentAreaName" style="color:#333;">{{ form.currentAreaName }}</span>
<span v-else>请选择</span>
<u-icon name="arrow-right" color="#ddd"/>
</div>
@@ -111,6 +78,41 @@
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="form-item">
<div class="form-item__wrapper">
<div class="left">
<i style="opacity: 0;">*</i>
<span>民族</span>
</div>
<div class="right">
<AiSelect dict="fpNation" v-model="form.nation"></AiSelect>
</div>
</div>
</div>
<div class="form-item">
<div class="form-item__wrapper">
<div class="left">
<i style="opacity: 0;">*</i>
<span>政治面貌</span>
</div>
<div class="right">
<AiSelect dict="fpPoliticalOutlook" v-model="form.politicsStatus"></AiSelect>
</div>
</div>
</div>
<div class="form-item">
<div class="form-item__wrapper">
<div class="left">
<i style="opacity: 0;">*</i>
<span>文化程度</span>
</div>
<div class="right">
<AiSelect dict="fpEducation" v-model="form.education"></AiSelect>
</div>
</div>
</div>
<div class="form-item">
<div class="form-item__wrapper">
<div class="left">
@@ -118,7 +120,7 @@
<span>详细地址</span>
</div>
<div class="right">
<input placeholder="请输入" v-model="form.address" placeholder-style="color: #999; font-size: 30rpx;"/>
<input placeholder="请输入" v-model="form.currentAddress" placeholder-style="color: #999; font-size: 30rpx;"/>
</div>
</div>
</div>
@@ -133,29 +135,30 @@
</div>
</div>
<div class="upload">
<AiUploader :def.sync="form.files" multiple placeholder="上传图片" :limit="9" action="/admin/file/add2"></AiUploader>
<AiUploader :def.sync="form.files" multiple placeholder="上传图片" :limit="1" action="/admin/file/add2"></AiUploader>
</div>
</div>
<div class="form-group">
<div class="form-item">
<div class="form-item__wrapper">
<div class="left">
<i>*</i>
<i style="opacity: 0;">*</i>
<span>在校情况</span>
</div>
<div class="right">
<AiSelect dict="fpStudentsInSchool" v-model="form.studentsInSchool"></AiSelect>
<AiSelect dict="fpStudentsInSchool" v-model="form.schoolStatus"></AiSelect>
</div>
</div>
</div>
<div class="form-item">
<div class="form-item__wrapper">
<div class="left">
<i>*</i>
<i style="opacity: 0;">*</i>
<span>健康状况</span>
</div>
<div class="right">
<AiSelect dict="fpHealth" v-model="form.health"></AiSelect>
<AiSelect dict="fpHealth" v-model="form.healthyStatus"></AiSelect>
</div>
</div>
</div>
@@ -166,7 +169,7 @@
<span>劳动技能</span>
</div>
<div class="right">
<AiSelect dict="fpLaborSkills" v-model="form.laborSkills"></AiSelect>
<AiSelect dict="fpLaborSkills" v-model="form.labourStatus"></AiSelect>
</div>
</div>
</div>
@@ -185,11 +188,10 @@
<div class="form-item__wrapper">
<div class="left">
<i style="opacity: 0;">*</i>
<span>务工时()</span>
<span>务工时/</span>
</div>
<div class="right">
<input placeholder="请输入" type="number" v-model="form.workingMonths"
placeholder-style="color: #999; font-size: 30rpx;"/>
<input placeholder="请输入" v-model="form.workeMonths" type="number" placeholder-style="color: #999; font-size: 30rpx;" maxlength="2"/>
</div>
</div>
</div>
@@ -202,8 +204,8 @@
<span>是否参加医保</span>
</div>
<div class="right">
<div class="check-item" :class="form.medicalInsurance == 1 ? 'check-active' : '' " @click="form.medicalInsurance=1"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.medicalInsurance != 1 ? 'check-active' : '' " @click="form.medicalInsurance=0"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.basicMedicalTreatment == '01' ? 'check-active' : '' " @click="form.basicMedicalTreatment='01'"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.basicMedicalTreatment != '01' ? 'check-active' : '' " @click="form.basicMedicalTreatment='02'"><img src="./components/img/check-icon.png" alt=""></div>
</div>
</div>
</div>
@@ -214,8 +216,8 @@
<span>是否参加大病保险</span>
</div>
<div class="right">
<div class="check-item" :class="form.sicknessInsurance == 1 ? 'check-active' : '' " @click="form.sicknessInsurance=1"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.sicknessInsurance != 1 ? 'check-active' : '' " @click="form.sicknessInsurance=0"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.seriousIllnessInsurance == '01' ? 'check-active' : '' " @click="form.seriousIllnessInsurance='01'"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.seriousIllnessInsurance != '01' ? 'check-active' : '' " @click="form.seriousIllnessInsurance='02'"><img src="./components/img/check-icon.png" alt=""></div>
</div>
</div>
</div>
@@ -226,8 +228,8 @@
<span>是否参加养老保险</span>
</div>
<div class="right">
<div class="check-item" :class="form.endowmentInsurance == 1 ? 'check-active' : '' " @click="form.endowmentInsurance=1"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.endowmentInsurance != 1 ? 'check-active' : '' " @click="form.endowmentInsurance=0"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.endowmentInsurance == '01' ? 'check-active' : '' " @click="form.endowmentInsurance='01'"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.endowmentInsurance != '01' ? 'check-active' : '' " @click="form.endowmentInsurance='02'"><img src="./components/img/check-icon.png" alt=""></div>
</div>
</div>
</div>
@@ -238,8 +240,8 @@
<span>是否享受最低生活保障</span>
</div>
<div class="right">
<div class="check-item" :class="form.subsistenceAllowance == 1 ? 'check-active' : '' " @click="form.subsistenceAllowance=1">享受<img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.subsistenceAllowance != 1 ? 'check-active' : '' " @click="form.subsistenceAllowance=0">未享受<img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.subsistenceAllowance == '01' ? 'check-active' : '' " @click="form.subsistenceAllowance='01'">享受<img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.subsistenceAllowance != '01' ? 'check-active' : '' " @click="form.subsistenceAllowance='02'">未享受<img src="./components/img/check-icon.png" alt=""></div>
</div>
</div>
</div>
@@ -250,13 +252,15 @@
<span>是否特困供养</span>
</div>
<div class="right">
<div class="check-item" :class="form.destitute == 1 ? 'check-active' : '' " @click="form.destitute=1"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.destitute != 1 ? 'check-active' : '' " @click="form.destitute=0"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.specialPovertySupport == '01' ? 'check-active' : '' " @click="form.specialPovertySupport='01'"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.specialPovertySupport != '01' ? 'check-active' : '' " @click="form.specialPovertySupport='02'"><img src="./components/img/check-icon.png" alt=""></div>
</div>
</div>
</div>
</div>
<div class="btn" @click="submit">提交</div>
<div class="btn" hover-class="text" @click="submit">保存</div>
</div>
</template>
@@ -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
},
}
}
</script>

View File

@@ -13,7 +13,7 @@
<i>最多9张</i>
</div>
<div>
<AiUploader :limit="9" multiple :def.sync="picture"></AiUploader>
<AiUploader :limit="9" multiple :def.sync="filies"></AiUploader>
</div>
</div>
<div class="btn" @click="submit">提交</div>
@@ -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()
})
}
}

View File

@@ -21,23 +21,23 @@
</div>
<div class="item-info__item">
<label>政治面貌</label>
<span>{{ $dict.getLabel('fpPoliticalOutlook', item.politicalOutlook) }}</span>
<span>{{ $dict.getLabel('fpPoliticalOutlook', item.politicsStatus) }}</span>
</div>
<div class="item-info__item">
<label>文化程度</label>
<span>{{ $dict.getLabel('fpEducation', item.education) }}</span>
</div>
<div class="item-info__item">
<label>在校情况</label>
<span>{{ $dict.getLabel('fpStudentsInSchool', item.studentsInSchool) }}</span>
<label>在校情况</label>
<span>{{ $dict.getLabel('fpStudentsInSchool', item.schoolStatus) }}</span>
</div>
<div class="item-info__item">
<label>健康状况</label>
<span>{{ $dict.getLabel('fpHealth', item.health) }}</span>
<span>{{ $dict.getLabel('fpHealth', item.healthyStatus) }}</span>
</div>
<div class="item-info__item">
<label>劳动技能</label>
<span>{{ $dict.getLabel('fpLaborSkills', item.laborSkills) }}</span>
<span>{{ $dict.getLabel('fpLaborSkills', item.labourStatus) }}</span>
</div>
<div class="item-info__item">
<label>务工区域</label>
@@ -45,15 +45,15 @@
</div>
<div class="item-info__item">
<label>务工时间</label>
<span>{{ item.workingMonths }}</span>
<span>{{ item.workeMonths }}</span>
</div>
<div class="item-info__item">
<label>是否参加医疗参保</label>
<span>{{ $dict.getLabel('fpYesOrNo', item.medicalInsurance) }}</span>
<span>{{ $dict.getLabel('fpYesOrNo', item.basicMedicalTreatment) }}</span>
</div>
<div class="item-info__item">
<label>是否参加大病保险</label>
<span>{{ $dict.getLabel('fpYesOrNo', item.sicknessInsurance) }}</span>
<span>{{ $dict.getLabel('fpYesOrNo', item.seriousIllnessInsurance) }}</span>
</div>
<div class="item-info__item">
<label>是否参加养老保险</label>
@@ -65,7 +65,7 @@
</div>
<div class="item-info__item">
<label>是否特困供养</label>
<span>{{ $dict.getLabel('fpYesOrNo', item.destitute) }}</span>
<span>{{ $dict.getLabel('fpYesOrNo', item.specialPovertySupport) }}</span>
</div>
<div class="item-info__item">
</div>
@@ -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()
})
}
}

View File

@@ -8,7 +8,7 @@
<span>监测对象类型</span>
</div>
<div class="right">
<AiSelect dict="fpType" v-model="form.type"></AiSelect>
<AiSelect dict="fpType" v-model="form.objectType"></AiSelect>
</div>
</div>
</div>
@@ -19,8 +19,8 @@
<span>是否危房</span>
</div>
<div class="right">
<div class="check-item" :class="form.dilapidatedHouse == 1 ? 'check-active' : '' " @click="form.dilapidatedHouse=1"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.dilapidatedHouse != 1 ? 'check-active' : '' " @click="form.dilapidatedHouse=0"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.dilapidatedHousehold == '01' ? 'check-active' : '' " @click="form.dilapidatedHousehold='01'"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.dilapidatedHousehold != '01' ? 'check-active' : '' " @click="form.dilapidatedHousehold='02'"><img src="./components/img/check-icon.png" alt=""></div>
</div>
</div>
</div>
@@ -31,8 +31,8 @@
<span>是否饮水安全问题</span>
</div>
<div class="right">
<div class="check-item" :class="form.drinkingWaterSafety == 1 ? 'check-active' : '' " @click="form.drinkingWaterSafety=1"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.drinkingWaterSafety != 1 ? 'check-active' : '' " @click="form.drinkingWaterSafety=0"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.drinkingWaterSafety == '01' ? 'check-active' : '' " @click="form.drinkingWaterSafety='01'"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.drinkingWaterSafety != '01' ? 'check-active' : '' " @click="form.drinkingWaterSafety='02'"><img src="./components/img/check-icon.png" alt=""></div>
</div>
</div>
</div>
@@ -43,8 +43,8 @@
<span>是否搬迁</span>
</div>
<div class="right">
<div class="check-item" :class="form.drinkingWaterSafety == 1 ? 'check-active' : '' " @click="form.drinkingWaterSafety=1"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.drinkingWaterSafety != 1 ? 'check-active' : '' " @click="form.drinkingWaterSafety=0"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.move == '01' ? 'check-active' : '' " @click="form.move='01'"><img src="./components/img/check-icon.png" alt=""></div>
<div class="check-item" :class="form.move !='01' ? 'check-active' : '' " @click="form.move='02'"><img src="./components/img/check-icon.png" alt=""></div>
</div>
</div>
</div>
@@ -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()
})
},
}

View File

@@ -75,7 +75,7 @@
<span>合规自然支出</span>
</div>
<div class="right">
<input placeholder="请输入" v-model="form.income9" type="number"
<input placeholder="请输入" v-model="form.income7" type="number"
placeholder-style="color: #999; font-size: 30rpx;"/>
</div>
</div>
@@ -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()
})
}
}

View File

@@ -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()
})
}
}