+
+
保存
@@ -286,7 +668,7 @@ export default {
return {
form: {
name: '',
- householdRelation: '',
+ objectType: '',
idNumber: '',
sex: '',
phone: '',
@@ -301,16 +683,32 @@ export default {
labourStatus: '',
workArea: '',
workeMonths: '',
- basicMedicalTreatment: '02',
- seriousIllnessInsurance: '02',
- endowmentInsurance: '02',
- subsistenceAllowance: '02',
- specialPovertySupport: '02',
+ basicMedicalTreatment: '',
+ seriousIllnessInsurance: '',
+ endowmentInsurance: '',
+ subsistenceAllowance: '',
+ specialPovertySupport: '',
girdId: '',
girdName: '',
healthyStatus: '',
+ age: '',
birthday: '',
isHousehold: '',
+ photo: '',
+ riskType: '',
+ detail: '',
+ disabilityType: '', // 残疾类型
+ disabilityCertificateYear: '',
+ basicsCheck: '', // 基础保险
+ guaranteeCheck: '', // 保障措施
+ mandarin: '',
+ employmentChannels: '',
+ migrantEnterprises: '',
+ publicWelfarePosts: '',
+ publicWelfarePostsMonths: '',
+ foreignWorkers: '',
+ foreignWorkersAddress: '',
+ houseIdNumber: '',
},
id: '',
$areaId: '',
@@ -320,6 +718,30 @@ export default {
householdIdNumber: '',
objectType: '',
userList: [],
+ photo: [],
+ userList: [],
+ flag: false,
+ helthList: [],
+ namelist:[],
+ basicsCheckList: [
+ {dictName: '城乡居民基本医疗保险', checked: false},
+ {dictName: '城镇职工基本医疗保险',checked: false},
+ {dictName: '大病保险',checked: false},
+ {dictName: '商业补充医疗保险',checked: false},
+ {dictName: '城乡居民基本养老保险',checked: false},
+ {dictName: '城镇职工基本养老保险',checked: false},
+ {dictName: '享受人身意外保险补贴',checked: false},
+ ],
+ basicsList: [],
+ guaranteeCheckList: [
+ {dictName: '享受农村最低生活保障', checked: false},
+ {dictName: '是否特困供养人员', checked: false},
+ {dictName: '分散供养五保户转集中供养(减少)', checked: false},
+ {dictName: '是否接受医疗救助', checked: false},
+ {dictName: '是否接受其它健康扶贫', checked: false},
+ ],
+ guaranteeList: [],
+ isAdd: 'false',
}
},
@@ -347,6 +769,13 @@ export default {
this.isEdit = true
}
})
+ this.$dict.getDict('fpHealth').map((item) =>{
+ this.helthList.push({
+ dictName: item.dictName,
+ dictValue: item.dictValue,
+ checked: false,
+ })
+ })
if (query.index > -1) {
this.isEdit = true
this.index = Number(query.index)
@@ -364,6 +793,33 @@ export default {
},
methods: {
+ onAreaChange(e) {
+ this.form.currentAreaId = e
+ },
+ userClick(row, i) {
+ if (!this.helthList[i].checked) {
+ this.helthList[i].checked = true // 确定
+ this.namelist.push({ dictValue: row.dictValue, dictName: row.dictName }) // 赋值
+ } else {
+ this.helthList[i].checked = false // 取消
+ this.namelist.map((item, index) => {
+ if (item.dictValue == row.dictValue) {
+ this.namelist.splice(index, 1)
+ }
+ })
+
+ }
+ this.form.healthyStatus = this.namelist.map(v=>v.dictValue).join(',')
+ },
+
+ // 医疗保险
+ basicsCheck(row, i) {
+ this.basicsCheckList[i].checked = !this.basicsCheckList[i].checked
+ },
+ // 保障措施
+ guaranteeCheck(row, i) {
+ this.guaranteeCheckList[i].checked = !this.guaranteeCheckList[i].checked
+ },
getInfo(id) {
this.$http.post(`/app/apppreventionreturntopoverty/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) {
@@ -387,7 +843,16 @@ export default {
}
},
+ checkInit(formName, list, index) {
+ if(list[index].checked) {
+ this.form[formName] = '01'
+ }else {
+ this.form[formName] = '02'
+ }
+ },
+
submit() {
+
const rules = this.rules()
for (let v of Object.keys(rules)) {
@@ -395,12 +860,10 @@ export default {
return this.$u.toast(rules[v])
}
}
-
let regTel = /^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/
if (this.form.phone.length == 11 && !regTel.test(this.form.phone)) {
return this.$u.toast('请输入正确的手机号')
}
-
if(!/[^0]0{0,2}$/.test(this.form.currentAreaId)) {
return this.$u.toast('现住址必须选到村级')
}
@@ -408,20 +871,62 @@ export default {
if(this.form.files.length) {
this.form.photo = this.form.files[0].url
}
+ if(this.photo.length) {
+ this.form.photo = this.photo[0].accessUrl
+ }
+
this.form.girdId = this.girdInfo.girdId
this.form.girdName = this.girdInfo.girdName
- this.form.householdIdNumber = this.householdIdNumber
- this.form.objectType = this.objectType
- this.form.isHousehold = 0
+ // this.form.householdIdNumber = this.form.idNumber
+ // this.form.householdRelation = '01'
+ // this.form.isHousehold = 1
+ this.current = 1
+
+ // if(!this.form.riskType) {
+ // return this.$u.toast('请选择风险因素')
+ // }
+
+ this.basicsCheckList.map((item, index) => {
+ if (item.checked) {
+ this.basicsList.push(index)
+ }
+ })
+
+ this.form.basicsCheck = this.basicsList.join(',')
+
+ this.guaranteeCheckList.map((item, index) => {
+ if (item.checked) {
+ this.guaranteeList.push(index)
+ }
+ })
+
+ this.form.guaranteeCheck = this.guaranteeList.join(',')
+
+ this.checkInit('jcbxCxyiliao',this.basicsCheckList, 0)
+ this.checkInit('jcbxCzyiliao',this.basicsCheckList, 1)
+ this.checkInit('jcbxDabing',this.basicsCheckList, 2)
+ this.checkInit('jcbxShangye',this.basicsCheckList, 3)
+ this.checkInit('jcbxCxyanglao',this.basicsCheckList, 4)
+ this.checkInit('jcbxCzyanglao',this.basicsCheckList, 5)
+ this.checkInit('jcbxRenshenyiwai',this.basicsCheckList, 6)
+
+ this.checkInit('bzcsNongcundibao',this.guaranteeCheckList, 0)
+ this.checkInit('bzcsTekungongyang',this.guaranteeCheckList, 1)
+ this.checkInit('bzcsWubaohu',this.guaranteeCheckList, 2)
+ this.checkInit('bzcsYiliaojiuzhu',this.guaranteeCheckList, 3)
+ this.checkInit('bzcsQita',this.guaranteeCheckList, 4)
+
this.$http.post('/app/apppreventionreturntopoverty/addByEwechat', {
...this.form,
- id: this.id || ''
+ id: this.id || '',
+ girdId: this.user.girdCheckType == 1? this.user.girdId:'',
+ householdIdNumber: this.householdIdNumber
}).then(res => {
- if (res.code === 0) {
+ if (res.code == 0) {
this.$u.toast(this.isEdit ? '保存成功' : '提交成功')
uni.$emit('reload')
uni.navigateBack({
- delta: 1
+ delta: 2
})
}
}).catch((err) => {
@@ -438,8 +943,9 @@ export default {
},
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)) {
+ // 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]$/;
+ // .length == 18 && !reg.test(this.form.idNumber)
+ if (!this.form.idNumber) {
return this.$u.toast('请输入正确的身份证号码')
}
var info = this.$idCardNoUtil.getIdCardInfo(this.form.idNumber)
@@ -488,6 +994,30 @@ export default {
border-bottom: 1px solid #E4E5E6;
}
+ .form-item__wrappers {
+ padding-right:30px;
+ box-sizing: border-box;
+ .top {
+ font-size: 32px;
+ padding: 32px 0;
+ }
+ .bottoms{
+ padding-bottom: 20px;
+ .cards {
+ padding: 20px;
+ box-sizing: border-box;
+ border: 1px solid #CCCCCC;
+ border-radius: 16px;
+ margin-bottom: 16px;
+ .changeActive {
+ color: #1174FE;
+ border: 1px solid #1174FE;
+ }
+ }
+
+ }
+ }
+
.right {
height: 112px;
line-height: 112px;
@@ -515,7 +1045,7 @@ export default {
}
}
.check-item:nth-of-type(1) {
- margin-right: 22px;
+ margin-right: 36px;
}
.check-active{
background: #E7F1FE;
@@ -552,12 +1082,6 @@ export default {
font-size: 32px;
}
}
-
- &:last-child {
- .form-item__wrapper {
- border: none;
- }
- }
}
}