|
|
@@ -0,0 +1,611 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <van-nav-bar title="信息采集" @click-left="$router.back()" left-arrow fixed placeholder safe-area-inset-top />
|
|
|
+ <van-form @submit="saveFollowUp">
|
|
|
+ <div class="main">
|
|
|
+ <vanUploader :text="'图片'" :maxCount="1" @getfileList="getfileList"></vanUploader>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">姓名<span>*</span>:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field name="name" v-model="form.name" :rules="[{ required: true }]" placeholder="请输入姓名" />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">性别<span>*</span>:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field name="gender" v-model="modelValue.genderValue" :rules="[{ required: true }]" placeholder="请选择性别" @click="modelValue.genderShow = true" disabled />
|
|
|
+ <van-popup v-model="modelValue.genderShow" position="bottom" :style="{ height: '40%' }">
|
|
|
+ <van-picker default-index="0" visible-item-count="6" show-toolbar :columns="genderList"
|
|
|
+ value-key="text" @cancel="modelValue.genderShow = false" @confirm="onGenderShow"/>
|
|
|
+ </van-popup>
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">民族:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field name="nation" v-model="form.nation" :rules="[{ required: false }]" placeholder="请选择民族" @click="modelValue.nationShow = true" disabled />
|
|
|
+ <van-popup v-model="modelValue.nationShow" position="bottom" :style="{ height: '40%' }">
|
|
|
+ <van-picker visible-item-count="6" show-toolbar :columns="mzlist"
|
|
|
+ value-key="label" @cancel="modelValue.nationShow = false" @confirm="onNationShow"/>
|
|
|
+ </van-popup>
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">身份证号<span>*</span>:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field name="idcard" type="number" v-model="form.idCard" :rules="[{ validator, required: true, message: '请输入正确身份证号'}]" placeholder="请输入身份证号" />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">出生日期:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field name="birthday" v-model="form.birthday" :rules="[{ required: false }]" placeholder="出生日期" readonly />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">户籍地址<span>*</span>:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field name="region" v-model="modelValue.regionValue" :rules="[{ required: true }]"
|
|
|
+ placeholder="请选择" disabled @click="modelValue.regionShow = true" />
|
|
|
+ </van-col>
|
|
|
+ <van-popup v-model="modelValue.regionShow" round position="bottom">
|
|
|
+ <van-cascader
|
|
|
+ v-model="modelValue.sigleRegionValue"
|
|
|
+ title="请选择所在地区"
|
|
|
+ :options="regionList"
|
|
|
+ :field-names="regionFieldNames"
|
|
|
+ @close="modelValue.regionShow = false"
|
|
|
+ @change="onRegionChange"
|
|
|
+ @finish="onRegionFinish"
|
|
|
+ />
|
|
|
+ </van-popup>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-field name="address" v-model="form.address" :rules="[{ required: true }]" placeholder="请输入详细地址" />
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">儿童类型<span>*</span>:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field name="child" v-model="form.typeDesc" @click="modelValue.childShow = true" :rules="[{ required: true }]"
|
|
|
+ placeholder="请选择" disabled />
|
|
|
+ </van-col>
|
|
|
+ <van-popup v-model="modelValue.childShow" position="bottom" :style="{ height: '50%' }">
|
|
|
+ <van-picker :visible-item-count="6" show-toolbar :columns="childList"
|
|
|
+ @confirm="onChildShow" @cancel="modelValue.childShow = false" value-key="name" />
|
|
|
+ </van-popup>
|
|
|
+ </van-row>
|
|
|
+
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">帮扶单位:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field name="assist" v-model="form.stationDesc" @click="modelValue.assistShow = true" :rules="[{ required: true }]"
|
|
|
+ placeholder="请选择" disabled />
|
|
|
+ </van-col>
|
|
|
+ <van-popup v-model="modelValue.assistShow" position="bottom" :style="{ height: '50%' }">
|
|
|
+ <van-picker :visible-item-count="8" show-toolbar :columns="assistList"
|
|
|
+ @confirm="onAssistShow" @cancel="modelValue.assistShow = false" value-key="name" />
|
|
|
+ </van-popup>
|
|
|
+ </van-row>
|
|
|
+
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">儿童主任<span>*</span>:</van-col>
|
|
|
+ <van-col span="15">
|
|
|
+ <van-field name="director" v-model="modelValue.directorTvalue" @input="onDirectorChange" :rules="[{ required: true }]" placeholder="请输入姓名" :disabled="!directorLink">
|
|
|
+ </van-field>
|
|
|
+ <van-popup v-model="modelValue.directorShow" position="bottom" :style="{ height: '40%' }">
|
|
|
+ <van-picker visible-item-count="6" show-toolbar :columns="directorList"
|
|
|
+ value-key="name" @cancel="modelValue.directorShow = false" @confirm="onDirectorShow"/>
|
|
|
+ </van-popup>
|
|
|
+ </van-col>
|
|
|
+ <van-col span="3" v-if="directorLink">
|
|
|
+ <van-button size="small" @click="onDirectorSearch">搜索</van-button>
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">联系电话<span>*</span>:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field name="phone" v-model="form.mobile" :rules="[{ required: true }]" placeholder="联系电话" disabled />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">健康状况<span>*</span>:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field name="health" v-model="modelValue.healthValue" :rules="[{ required: true }]"
|
|
|
+ placeholder="请选择健康状况" @click="modelValue.healthShow = true" disabled />
|
|
|
+ <van-popup v-model="modelValue.healthShow" position="bottom" :style="{ height: '40%' }">
|
|
|
+ <van-picker visible-item-count="6" show-toolbar :columns="healthList"
|
|
|
+ value-key="text" @cancel="modelValue.healthShow = false" @confirm="onHealthShow"/>
|
|
|
+ </van-popup>
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">患病情况:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field name="disease" v-model="form.illness" type="textarea" rows="1" :rules="[{ required: false }]"
|
|
|
+ placeholder="请输入" />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">身高:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field name="height" v-model="form.height" :rules="[{ required: false }]"
|
|
|
+ placeholder="请输入" />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">体重:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field name="weight" v-model="form.weight" :rules="[{required: false}]"
|
|
|
+ placeholder="请输入" />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">就读学校:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field name="school" v-model="form.school" :rules="[{ required: false }]"
|
|
|
+ placeholder="请输入" />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">年级:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field name="grade" v-model="form.grades" :rules="[{ required: false }]"
|
|
|
+ placeholder="请输入" />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">家庭情况:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field name="family" v-model="form.familyDesc" type="textarea" rows="1" :rules="[{ required: false }]"
|
|
|
+ placeholder="请输入" />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">残疾等级:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field name="disability" v-model="modelValue.disabilityValue" :rules="[{ required: false }]"
|
|
|
+ placeholder="请选择残疾等级" @click="modelValue.disabilityShow = true" disabled />
|
|
|
+ <van-popup v-model="modelValue.disabilityShow" position="bottom" :style="{ height: '40%' }">
|
|
|
+ <van-picker visible-item-count="6" show-toolbar :columns="disabilityList"
|
|
|
+ value-key="label" @cancel="modelValue.disabilityShow = false" @confirm="onDisabilityShow"/>
|
|
|
+ </van-popup>
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">残疾证书号:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field name="disabilityID" v-model="form.disabilityCertificate" :rules="[{ required: false}]"
|
|
|
+ placeholder="请输入" />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">是否享受低保:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field name="basic">
|
|
|
+ <template #input>
|
|
|
+ <van-radio-group v-model="form.subsistence" direction="horizontal">
|
|
|
+ <van-radio name='1' shape="square" icon-size="16px">是</van-radio>
|
|
|
+ <van-radio name='0' shape="square" icon-size="16px">否</van-radio>
|
|
|
+ </van-radio-group>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ </van-field>
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">是否享受重度残疾人护理补贴:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field name="nurse">
|
|
|
+ <template #input>
|
|
|
+ <van-radio-group v-model="form.disabledSerious" direction="horizontal">
|
|
|
+ <van-radio name="1" shape="square" icon-size="16px">是</van-radio>
|
|
|
+ <van-radio name="0" shape="square" icon-size="16px">否</van-radio>
|
|
|
+ </van-radio-group>
|
|
|
+ </template>
|
|
|
+ </van-field>
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+
|
|
|
+ <van-row class="cell">
|
|
|
+ <van-col span="6">是否享受残疾人补贴:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field name="subsidize">
|
|
|
+ <template #input>
|
|
|
+ <van-radio-group v-model="form.disabled" direction="horizontal">
|
|
|
+ <van-radio name="1" shape="square" icon-size="16px">是</van-radio>
|
|
|
+ <van-radio name="0" shape="square" icon-size="16px">否</van-radio>
|
|
|
+ </van-radio-group>
|
|
|
+ </template>
|
|
|
+ </van-field>
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <!-- <van-row class="cell">
|
|
|
+ <van-col span="6">随访记录:</van-col>
|
|
|
+ <van-col span="18">
|
|
|
+ <van-field class="textarea" :rules="[{ required: true }]" v-model="form.remark" rows="1"
|
|
|
+ type="textarea" placeholder="请输入随访记录" />
|
|
|
+ </van-col>
|
|
|
+ </van-row> -->
|
|
|
+ </div>
|
|
|
+ <div class="but">
|
|
|
+ <van-button native-type="submit" :disabled="disabled">确 定</van-button>
|
|
|
+ </div>
|
|
|
+ </van-form>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import {mzlist} from './mzlist.js'
|
|
|
+import {validateIDcard} from '@/utils/validate.js'
|
|
|
+import { listArea, childType, organization, listEmployeeByName, createChildBaseInfo} from '../../api/index.js'
|
|
|
+import vanUploader from '../../components/vanUploader.vue'
|
|
|
+export default {
|
|
|
+ components: { vanUploader },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ userInfo:{},
|
|
|
+ directorLink:'',
|
|
|
+ form:{
|
|
|
+ childId:'133',
|
|
|
+ photoImgUrl:'',//头像图片URL
|
|
|
+ name:'',//姓名
|
|
|
+ gender:'',//性别
|
|
|
+ nation:'',//民族
|
|
|
+ nationType:'',//民族ID
|
|
|
+ idCard:'',//身份证号
|
|
|
+ birthday:'',//出生日期
|
|
|
+ provinceName:'',//省份名称
|
|
|
+ provinceId:'',//省份ID
|
|
|
+ cityName:'',//市名称
|
|
|
+ cityId:'',//市ID
|
|
|
+ countryName:'',//区名称
|
|
|
+ countryId:'',//区ID
|
|
|
+ streetName:'',//街道名称
|
|
|
+ streetId:'',//街道ID
|
|
|
+ communityName:'',//社区名称
|
|
|
+ communityId:'',//社区ID
|
|
|
+ address:'',//详细地址
|
|
|
+ typeDesc:'',//儿童类型
|
|
|
+ type:'',//儿童类型 id
|
|
|
+ stationDesc:'',//帮扶单位
|
|
|
+ stationId:'',//帮扶单位id
|
|
|
+ tutelageId:'',//儿童主任ID
|
|
|
+ mobile:'',//联系电话
|
|
|
+ healthStatus:'',//健康状况
|
|
|
+ illness:'',//患病情况
|
|
|
+ height:'',//身高
|
|
|
+ weight:'',//体重
|
|
|
+ school:'',//就读学校
|
|
|
+ grades:'',//年级
|
|
|
+ familyDesc:'',//家庭情况
|
|
|
+ disabilityLevel:'',//残疾等级
|
|
|
+ disabilityCertificate:'',//残疾证书号
|
|
|
+ subsistence:'',//低保状态 0 否 1 是
|
|
|
+ disabledSerious:'',//重度残疾状态 0 否 1 是
|
|
|
+ disabled:'',//残疾状态 0 否 1 是
|
|
|
+
|
|
|
+ },
|
|
|
+ modelValue:{
|
|
|
+ nationShow:false,
|
|
|
+ genderShow:false,
|
|
|
+ genderValue:'',
|
|
|
+ regionShow:false,
|
|
|
+ regionValue:'',
|
|
|
+ sigleRegionValue:'',
|
|
|
+ childShow:false,
|
|
|
+ assistShow:false,
|
|
|
+ directorShow:false,
|
|
|
+ directorTvalue:'',
|
|
|
+ healthShow:false,
|
|
|
+ healthValue:'',
|
|
|
+ disabilityShow:false,
|
|
|
+ disabilityValue:'',
|
|
|
+ },
|
|
|
+ genderList:[
|
|
|
+ {
|
|
|
+ text:'男',
|
|
|
+ value:'1'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text:'女',
|
|
|
+ value:'0'
|
|
|
+ },
|
|
|
+ ], //性别
|
|
|
+ mzlist:mzlist,//民族
|
|
|
+ regionList:[],//地区
|
|
|
+ regionFieldNames:{
|
|
|
+ text: 'name',
|
|
|
+ value: 'id',
|
|
|
+ children: 'items',
|
|
|
+ },
|
|
|
+ directorList:[],//儿童主任
|
|
|
+ childList:[],//儿童类型
|
|
|
+ assistList:[],//帮扶单位
|
|
|
+ healthList:[
|
|
|
+ {
|
|
|
+ text:'健康',
|
|
|
+ value:'1'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text:'患病',
|
|
|
+ value:'2'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text:'残疾',
|
|
|
+ value:'3'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+
|
|
|
+ disabilityList: [
|
|
|
+ { value: 1, label: '一级' },
|
|
|
+ { value: 2, label: '二级' },
|
|
|
+ { value: 3, label: '三级' },
|
|
|
+ { value: 4, label: '四级' },
|
|
|
+ { value: 5, label: '五级' },
|
|
|
+ { value: 6, label: '六级' },
|
|
|
+ { value: 7, label: '七级' },
|
|
|
+ { value: 8, label: '八级' },
|
|
|
+ { value: 9, label: '九级' },
|
|
|
+ { value: 10, label: '十级' },
|
|
|
+ ],
|
|
|
+
|
|
|
+ show: false,
|
|
|
+ disabled: false,
|
|
|
+ minDate: new Date(2020, 0, 1),
|
|
|
+ maxDate: new Date(),
|
|
|
+ customFieldName: {
|
|
|
+ text: 'name',
|
|
|
+ id: 'id',
|
|
|
+ },
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.userInfo = JSON.parse(sessionStorage.getItem('userInfo'))
|
|
|
+ this.directorLink = this.userInfo.roleIdStr == '14' ? false : true
|
|
|
+ this.modelValue.directorTvalue = this.userInfo.roleIdStr == '14' ? this.userInfo.name :''
|
|
|
+ this.form.mobile = this.userInfo.roleIdStr == '14' ? this.userInfo.phone :''
|
|
|
+ this.listAreaF()
|
|
|
+ this.childTypeF()
|
|
|
+ this.organizationF()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ async listAreaF() {
|
|
|
+ let res = await listArea({ parentId: '' })
|
|
|
+ res.data.forEach(item => {
|
|
|
+ item.items = null
|
|
|
+ this.regionList.push(item)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ async childTypeF() {
|
|
|
+ let res = await childType()
|
|
|
+ this.childList = res.data
|
|
|
+ },
|
|
|
+ async organizationF() {
|
|
|
+ let res = await organization()
|
|
|
+ this.assistList = res.data
|
|
|
+ },
|
|
|
+
|
|
|
+ onGenderShow(e) {
|
|
|
+ this.modelValue.genderShow = false
|
|
|
+ this.modelValue.genderValue = e.text
|
|
|
+ this.form.gender = e.value
|
|
|
+ },
|
|
|
+ onNationShow(e) {
|
|
|
+ this.modelValue.nationShow = false
|
|
|
+ this.form.nation = e.label
|
|
|
+ this.form.nationType = e.value
|
|
|
+ },
|
|
|
+ onChildShow(e) {
|
|
|
+ this.modelValue.childShow = false
|
|
|
+ this.form.typeDesc = e.name
|
|
|
+ this.form.type = e.id
|
|
|
+ },
|
|
|
+ onAssistShow(e) {
|
|
|
+ this.modelValue.assistShow = false
|
|
|
+ this.form.stationDesc = e.name
|
|
|
+ this.form.stationId = e.id
|
|
|
+ },
|
|
|
+ onHealthShow(e) {
|
|
|
+ this.modelValue.healthShow = false
|
|
|
+ this.modelValue.healthValue = e.text
|
|
|
+ this.form.healthStatus = e.value
|
|
|
+ },
|
|
|
+ onDisabilityShow(e) {
|
|
|
+ this.modelValue.disabilityShow = false
|
|
|
+ this.modelValue.disabilityValue = e.label
|
|
|
+ this.form.disabilityLevel = e.value
|
|
|
+
|
|
|
+ },
|
|
|
+ onDirectorShow(e) {
|
|
|
+ console.log(e)
|
|
|
+ this.modelValue.directorShow = false
|
|
|
+ this.form.tutelageId = e.id
|
|
|
+ this.form.mobile = e.mobile
|
|
|
+ this.modelValue.directorTvalue = e.name
|
|
|
+ },
|
|
|
+ onDirectorChange(e) {
|
|
|
+ // 儿童主任输入值变化
|
|
|
+ console.log('儿童主任输入值变化')
|
|
|
+ console.log(e)
|
|
|
+ this.form.mobile = ''
|
|
|
+ },
|
|
|
+ // 儿童主任
|
|
|
+ async onDirectorSearch() {
|
|
|
+ console.log(this.modelValue.directorTvalue)
|
|
|
+ if(this.modelValue.directorTvalue) {
|
|
|
+ let employee = await listEmployeeByName({ name: this.modelValue.directorTvalue, roleId: '14', status: 1 })
|
|
|
+ this.directorList = employee.data
|
|
|
+ this.modelValue.directorShow = true
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ async onRegionChange({ value, selectedOptions, tabIndex }) {
|
|
|
+ let res = await listArea({ parentId: value })
|
|
|
+ if(res.data.length>0) {
|
|
|
+ res.data.forEach((item,index) => {
|
|
|
+ res.data[index].items = item.children || null
|
|
|
+ })
|
|
|
+ this.addTree(selectedOptions, res.data, value)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ addTree(selectedOptions, children, id) {
|
|
|
+ selectedOptions.forEach(item => {
|
|
|
+ if (item.id == id) {
|
|
|
+ item.items = children
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onRegionFinish({ selectedOptions, tabIndex }) {
|
|
|
+ console.log('结束:')
|
|
|
+ console.log(selectedOptions)
|
|
|
+ if(tabIndex>3) {
|
|
|
+ this.form.provinceName = selectedOptions[0].name
|
|
|
+ this.form.provinceId = selectedOptions[0].id
|
|
|
+ this.form.cityName = selectedOptions[1].name
|
|
|
+ this.form.cityId = selectedOptions[1].id
|
|
|
+ this.form.countryName = selectedOptions[2].name
|
|
|
+ this.form.countryId = selectedOptions[2].id
|
|
|
+ this.form.streetName = selectedOptions[3].name
|
|
|
+ this.form.streetId = selectedOptions[3].id
|
|
|
+ this.form.communityName = selectedOptions[4].name
|
|
|
+ this.form.communityId = selectedOptions[4].id
|
|
|
+ this.modelValue.regionValue = selectedOptions.map(option => option.name).join('')
|
|
|
+ this.modelValue.regionShow = false
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ validator(value) {
|
|
|
+ console.log(value)
|
|
|
+ let type
|
|
|
+ let self = this
|
|
|
+ validateIDcard(null,value, function(e){
|
|
|
+ if(e) {
|
|
|
+ self.form.birthday =
|
|
|
+ value.substring(6, 10) +
|
|
|
+ '-' +
|
|
|
+ value.substring(10, 12) +
|
|
|
+ '-' +
|
|
|
+ value.substring(12, 14)
|
|
|
+ }else {
|
|
|
+ self.form.birthday =''
|
|
|
+ }
|
|
|
+ type = e
|
|
|
+ })
|
|
|
+ return type
|
|
|
+ },
|
|
|
+
|
|
|
+ timeFormat(time) {
|
|
|
+ // 时间格式化 2019-09-08
|
|
|
+ let year = time.getFullYear()
|
|
|
+ let month = time.getMonth() + 1
|
|
|
+ if (month < 10) {
|
|
|
+ month = '0' + month
|
|
|
+ }
|
|
|
+
|
|
|
+ let day = time.getDate()
|
|
|
+ if (day < 10) {
|
|
|
+ day = '0' + day
|
|
|
+ }
|
|
|
+ return year + '-' + month + '-' + day
|
|
|
+ },
|
|
|
+ async saveFollowUp(e) {
|
|
|
+ console.log(this.form)
|
|
|
+ console.log(e)
|
|
|
+ console.log('请选择一张图片')
|
|
|
+ console.log(this.form.photoImgUrl)
|
|
|
+ if (!this.form.photoImgUrl) {
|
|
|
+ this.$toast.fail('请选择一张图片')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var data = JSON.parse(JSON.stringify(this.form))
|
|
|
+ data.birthday = ''
|
|
|
+ const res = await createChildBaseInfo(data)
|
|
|
+ if (res.code == '0000') {
|
|
|
+ this.$toast.success('成功')
|
|
|
+ // this.$router.go(-1)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getfileList(v, index) {
|
|
|
+ console.log(v)
|
|
|
+ console.log(index)
|
|
|
+ if (index == undefined) {
|
|
|
+ if (
|
|
|
+ v.indexOf('.png') != -1 ||
|
|
|
+ v.indexOf('.jpg') != -1 ||
|
|
|
+ v.indexOf('.jpeg') != -1
|
|
|
+ ){
|
|
|
+ this.form.photoImgUrl = v
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+}
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+
|
|
|
+.van-row {
|
|
|
+ font-size: 30px;
|
|
|
+ text-align: left;
|
|
|
+}
|
|
|
+
|
|
|
+.row {
|
|
|
+ .van-col {
|
|
|
+ line-height: 60px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.main {
|
|
|
+ padding: 0 20px;
|
|
|
+}
|
|
|
+
|
|
|
+.cell {
|
|
|
+ border-bottom: 1px solid #eee;
|
|
|
+ padding: 5px 0;
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .van-col {
|
|
|
+ min-height: 80px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ span {
|
|
|
+ color: #f62a59;
|
|
|
+ }
|
|
|
+ .van-button {
|
|
|
+ font-size: 25px;
|
|
|
+ background-color: #1677ff;
|
|
|
+ .van-button__text {
|
|
|
+ color: #ffffff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.but {
|
|
|
+ text-align: center;
|
|
|
+ .van-button {
|
|
|
+ width: 620px;
|
|
|
+ margin: 24px auto;
|
|
|
+ color: #fff;
|
|
|
+ background-color: #1677ff;
|
|
|
+ border-radius: 12px;
|
|
|
+ font-size: 30px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep .van-field__control {
|
|
|
+ color: #333;
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep .van-field__control:disabled {
|
|
|
+ color: #333;
|
|
|
+ -webkit-text-fill-color: unset;
|
|
|
+}</style>
|