epmet pc工作端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1403 lines
70 KiB

<template>
<div class="div_form">
<div class="form">
<el-form :model="form" :rules="rules" label-width="105px" ref="addForm">
<h5 style="margin-top: 6px;">基础信息登记</h5>
<div class="basicInfo">
<el-row type="flex" justify="space-between">
<el-col :span="6">
<el-form-item label="姓名" prop="baseInfoDto.name" class="font-color-orange">
<el-input class="list_item_width_1" v-model="form.baseInfoDto.name" placeholder="请输入内容"
size="small" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="证件类型" prop="baseInfoDto.idType" class="font-color-orange">
<el-select v-model="form.baseInfoDto.idType" placeholder="请选择" size="small"
class="list_item_width_1" clearable>
<el-option v-for="(item, index) in idTypeList" :key="index" :label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="证件号" prop="baseInfoDto.idNum" class="font-color-orange">
<el-input v-model="form.baseInfoDto.idNum" placeholder="请输入内容" clearable size="small"
class="list_item_width_1" @blur="handleValidBlur"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="国籍" prop="baseInfoDto.nationality" class="font-color-orange">
<el-select v-model="form.baseInfoDto.nationality" placeholder="请选择" size="small"
class="list_item_width_1" clearable>
<el-option v-for="(item, index) in dicts.nationalityList" :key="index"
:label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="space-between">
<el-col :span="6">
<el-form-item label="联系电话" prop="baseInfoDto.mobile" class="font-color-orange">
<el-input class="list_item_width_1" v-model="form.baseInfoDto.mobile"
placeholder="请输入内容" size="small" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="性别">
<el-select v-model="form.baseInfoDto.gender" placeholder="请选择" size="small"
class="list_item_width_1" clearable>
<el-option v-for="(item, index) in genderList" :key="index" :label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="出生日期">
<el-date-picker v-model.trim="form.baseInfoDto.birthday" class="list_item_width_1"
type="date" size="small" clearable placeholder="选择日期" format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="民族">
<el-select v-model="form.baseInfoDto.nation" placeholder="请选择" size="small"
class="list_item_width_1" clearable>
<el-option v-for="(item, index) in dicts.nationList" :key="index"
:label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="space-between">
<el-col :span="6">
<el-form-item label="文化程度">
<el-select v-model="form.eduInfoDto.cultureLevel" placeholder="请选择" size="small"
class="list_item_width_1" clearable>
<el-option v-for="(item, index) in dicts.educationList" :key="index"
:label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="婚姻状况">
<el-select v-model="form.familyInfoDto.marriage" placeholder="请选择" size="small"
class="list_item_width_1" clearable>
<el-option v-for="(item, index) in dicts.marriageList" :key="index"
:label="item.label" :value="item.value"
@click.native="handelClickMarriage(item.value)"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6"
v-if="form.familyInfoDto.marriage == 'chuhun' || form.familyInfoDto.marriage == 'zaihun' || form.familyInfoDto.marriage == 'fuhun'">
<el-form-item label="配偶情况">
<el-select v-model="form.familyInfoDto.spouseSituation" placeholder="请选择" size="small"
class="list_item_width_1" clearable>
<el-option v-for="(item, index) in dicts.spouseSituationList" :key="index"
:label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="籍贯">
<el-input v-model="form.baseInfoDto.nativePlace" placeholder="请输入内容" clearable
size="small" class="list_item_width_1"></el-input>
<el-radio v-model="form.baseInfoDto.localResidenceFlag" style="margin-left: 10px;"
@click.native="handleLocalRadio($event)" :label="1">本地</el-radio>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="备注">
<el-input type="textarea" class="item_width_1" :rows="3" placeholder="请输入内容"
v-model="form.baseInfoDto.remark" clearable>
</el-input>
</el-form-item>
</div>
<h5>居住信息登记</h5>
<div class="house">
<section v-for="(item, index) in this.form.resideInfoDtos" :key="index">
<el-row type="flex" justify="start" style="margin-bottom: 24px;">
<el-col :span="8">
<el-form-item label="所属组织" class="font-color-orange" style="margin:0px "
:prop="`resideInfoDtos[${index}].gridId`" :rules="[
{ required: true, message: '请选择所属组织', trigger: 'blur' },
]">
<el-cascader class="u-item-width-agency" ref="myCascader" clearable size="small"
v-model="form.resideInfoDtos[index].gridId" :options="orgOptions"
:props="orgOptionProps" @change="handleChangeAgency(index)"></el-cascader>
</el-form-item>
</el-col>
<el-col :span="16" style="display: flex;">
<el-form-item :prop="`resideInfoDtos[${index}].villageId`" label="所属房屋"
style="margin:0px " label-width="100px" class="font-color-orange" :rules="[
{ required: true, message: '请选择小区', trigger: 'blur' },
]">
<el-select v-model.trim="form.resideInfoDtos[index].villageId" placeholder="请选择小区"
size="small" class="u-item-width-communitycascader f-bto0" clearable>
<el-option v-for="item in item.optionsV" :key="item.value" :label="item.label"
:value="item.value" @click.native="handleChangeV(index)">
</el-option>
</el-select>
</el-form-item>
<el-form-item :prop="`resideInfoDtos[${index}].buildId`" label-width="0"
style="margin:0px" :rules="[
{ required: true, message: '请选择楼栋', trigger: 'blur' },
]">
<el-select v-model.trim="form.resideInfoDtos[index].buildId" placeholder="楼号"
size="small" clearable @change="handleChangeB(index)"
class="u-item-width-buildcascader f-bto0">
<el-option v-for="item in item.optionsB" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item :prop="`resideInfoDtos[${index}].unitId`" label-width="0"
style="margin:0px" :rules="[
{ required: true, message: '请选择单元', trigger: 'blur' },
]">
<el-select v-model.trim="form.resideInfoDtos[index].unitId" placeholder="单元"
size="small" clearable class="u-item-width-buildcascader f-bto0"
@change="handleChangeD(index)">
<el-option v-for="item in item.optionsD" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item :prop="`resideInfoDtos[${index}].homeId`" label-width="0"
style="margin:0px " :rules="[
{ required: true, message: '请选择房屋', trigger: 'blur' },
]">
<el-select v-model.trim="form.resideInfoDtos[index].homeId" placeholder="房号"
size="small" clearable class="u-item-width-buildcascader f-bto0"
@change="handleChangeH(index)">
<el-option v-for="item in item.optionsH" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-button type="primary" size="mini" icon="el-icon-plus" circle
@click="handelClickAddHouse" style="margin-left: 16px; height: 30px;"></el-button>
<el-button type="danger" v-if="form.resideInfoDtos.length > 1" size="small"
icon="el-icon-minus" @click="handelClickDelHouse(index)" style="height: 30px;"
circle>
</el-button>
</el-col>
</el-row>
<el-row type="flex" justify="space-between">
<el-col :span="6">
<el-form-item label="人房关系" class="font-color-blue">
<el-select v-model="form.resideInfoDtos[index].resiHouseRel" placeholder="请选择"
size="small" class="list_item_width_1"
@change="handelChangeResiHouseRel($event, index)" clearable>
<el-option v-for="(item, i) in dicts.resiHouseRelList" :key="i"
:label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="人户状况" class="font-color-blue">
<el-select v-model="form.resideInfoDtos[index].householdSituation" placeholder="请选择"
size="small" class="list_item_width_1" clearable>
<el-option v-for="(item, index) in dicts.householdSituationList" :key="index"
:label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="与户主关系" class="font-color-blue font-color-blue2">
<el-select v-model="form.resideInfoDtos[index].houseHolderRel" placeholder="请选择"
size="small" class="list_item_width_1" clearable>
<el-option v-for="(item, index) in dicts.houseHolderRelList" :key="index"
:label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6" v-if="form.resideInfoDtos[index].householdSituation == 'rzhbz'">
<el-form-item label="户籍所在地">
<el-input class="list_item_width_1"
v-model="form.resideInfoDtos[index].placeOfDomicile" placeholder="请输入内容"
size="small" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6" v-else-if="form.resideInfoDtos[index].householdSituation == 'hzrbz'">
<el-form-item label="现居住地址">
<el-input class="list_item_width_1"
v-model="form.resideInfoDtos[index].currentResidence" placeholder="请输入内容"
size="small" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6" v-else-if="form.resideInfoDtos[index].householdSituation == 'rhdbz'">
<el-form-item label="迁出时间">
<el-date-picker v-model.trim="form.resideInfoDtos[index].outOfTime"
class="list_item_width_1" type="date" size="small" clearable placeholder="选择日期"
format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6" v-else>
</el-col>
</el-row>
</section>
</div>
<h5>拓展信息登记</h5>
<div class="expand">
<el-row type="flex" justify="space-between">
<el-col :span="6">
<el-form-item label="宗教信仰">
<el-input class="list_item_width_1" v-model="form.religionDto.religion"
placeholder="请输入内容" size="small" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="就业状态" class="font-color-blue">
<el-select v-model="form.workInfoDto.careerStatus" placeholder="请选择" size="small"
class="list_item_width_1" clearable>
<el-option v-for="(item, index) in dicts.careerStatusList" :key="index"
:label="item.label" :value="item.value"
@click.native="handelClickCareerStatus(item.value)"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6"
v-if="form.workInfoDto.careerStatus >= 1 && form.workInfoDto.careerStatus <= 5">
<el-form-item label="工作单位">
<el-input class="list_item_width_1" v-model="form.workInfoDto.workUnit"
placeholder="请输入内容" size="small" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6"
v-if="form.workInfoDto.careerStatus >= 1 && form.workInfoDto.careerStatus <= 5">
<el-form-item label="职业">
<el-input class="list_item_width_1" v-model="form.workInfoDto.occupation"
placeholder="请输入内容" size="small" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6"
v-if="(form.workInfoDto.careerStatus == 0 || form.workInfoDto.careerStatus == 6) && form.workInfoDto.careerStatus">
<el-form-item label="原工作单位">
<el-input class="list_item_width_1" v-model="form.unemployedDto.originWorkUnit"
placeholder="请输入内容" size="small" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6"
v-if="(form.workInfoDto.careerStatus == 0 || form.workInfoDto.careerStatus == 6) && form.workInfoDto.careerStatus">
<el-form-item label="失业时间">
<el-date-picker v-model.trim="form.unemployedDto.unemploymentTime"
class="list_item_width_1" type="date" size="small" clearable placeholder="选择日期"
format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12" v-if='!form.workInfoDto.careerStatus'></el-col>
</el-row>
<el-row v-if="form.workInfoDto.careerStatus >= 1 && form.workInfoDto.careerStatus <= 5">
<el-col :span="6"
v-if="form.workInfoDto.careerStatus >= 1 && form.workInfoDto.careerStatus <= 5">
<el-form-item label="月收入">
<el-input class="list_item_width_1" v-model="form.economyDto.monthIncome"
placeholder="请输入内容" size="small" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="18">
</el-col>
</el-row>
<el-row type="flex" justify=""
v-if="(form.workInfoDto.careerStatus == 0 || form.workInfoDto.careerStatus == 6) && form.workInfoDto.careerStatus">
<el-col :span="6">
<el-form-item label="失业证号">
<el-input class="list_item_width_1" v-model="form.unemployedDto.unemploymentNum"
placeholder="请输入内容" size="small" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="失业原因">
<el-select v-model="form.unemployedDto.unemploymentReason" placeholder="请选择"
size="small" class="list_item_width_1" clearable>
<el-option v-for="(item, index) in dicts.unemploymentReasonList" :key="index"
:label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="再就业优惠证号" label-width="120px">
<el-input class="list_item_width_1" v-model="form.unemployedDto.employmentNum"
placeholder="请输入内容" size="small" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="技术特长">
<el-input class="list_item_width_1" v-model="form.unemployedDto.specialSkill"
placeholder="请输入内容" size="small" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex"
v-if="(form.workInfoDto.careerStatus == 0 || form.workInfoDto.careerStatus == 6) && form.workInfoDto.careerStatus">
<el-col :span="6">
<el-form-item label="是否领取失业金" label-width="120px">
<el-radio-group v-model="form.unemployedDto.unempCompensationFlag">
<el-radio :label="item.value" v-for="item in disabilityFlagList" :key="item.value">{{
item.label
}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否就业困难对象" label-width="150px">
<el-radio-group v-model="form.unemployedDto.employmentHardFlag">
<el-radio :label="item.value" v-for="item in disabilityFlagList" :key="item.value">{{
item.label
}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="劳动就业愿望">
<el-select v-model="form.workInfoDto.employmentWish" placeholder="请选择" size="small"
class="list_item_width_1" clearable>
<el-option v-for="(item, index) in dicts.employmentWishList" :key="index"
:label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="">
<el-col :span="6">
<el-form-item label="有无赡养人">
<el-radio-group v-model="form.familyInfoDto.elderlyFlag">
<el-radio :label="item.value" v-for="item in hasOptions" :key="item.value"
@click.native="handelClickelderly">{{ item.label
}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="6" v-if="form.familyInfoDto.elderlyFlag == 1">
<el-form-item label="与赡养人关系">
<el-select v-model="form.familyInfoDto.elderlyRelation" placeholder="请选择" size="small"
class="list_item_width_1" clearable>
<el-option v-for="(item, index) in dicts.houseHolderRelList" :key="index"
:label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6" v-if="form.familyInfoDto.elderlyFlag == 1">
<el-form-item label="赡养人联系电话" label-width="150px">
<el-input class="list_item_width_1" v-model="form.familyInfoDto.dependantMobile"
placeholder="请输入内容" size="small" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
</div>
<h5>人员标签</h5>
<div class="stafftag">
<stafftag :formType="'add'" @showDialog="showDialog"></stafftag>
</div>
</el-form>
<el-row style="margin:24px">
<el-col :span="24" align="center">
<el-button size="small" class="diy-button--white" @click="handlerCancle" plain>取消</el-button>
<el-button type="primary" size="small" :loading="btnLoading"
@click="handleClickSubmit">保存</el-button>
<el-button type="primary" size="small" :loading="btnLoading"
@click="handleClickSubmit('house')">提交并补充家庭人员信息</el-button>
</el-col>
</el-row>
</div>
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" destroy-on-close width="1028px">
<resi-expand ref="resiExpand" @submitExpand="submitExpand" @hideExpand="hideExpand"
:operationType="'add'"></resi-expand>
</el-dialog>
</div>
</template>
<script>
import { requestGet, requestPost } from "@/js/dai/request";
import { isCard, isPassport, isMobile, isPhone, isHKPassport, isTwPassport, isSoldier } from '@/utils/validate'
import { computedCard } from '@/utils/index'
import { idTypeList, genderList, hasOptions ,disabilityFlagList} from "@/js/columns/constants";
import stafftag from "../modules/portrayal/jumin/cpts/staffTag.vue";
import resiExpand from './resiExpand';
export default {
data() {
return {
dialogVisible: false,
dialogTitle: '',
formList: [],
orgOptions: [],
orgOptionProps: {
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
emitPath: false,
multiple: false,
checkStrictly: true
},
form: {
baseInfoDto: {
name: null,//姓名
idType: null,//证件类型
idNum: null,//身份证号
nationality: null,//国籍
mobile: null,//手机号
gender: null,//性别
birthday: null,//出生日期
nation: null,//民族
localResidenceFlag: 0,//是否本地户籍
nativePlace: null,//籍贯,
remark: null,//备注
categoryInfo: {
partyFlag: 0,
subsistenceAllowanceFlag: 0,
ensureHouseFlag: 0,
unemployedFlag: 0,
fertileWomanFlag: 0,
veteranFlag: 0,
unitedFrontFlag: 0,
petitionOfficerFlag: 0,
volunteerFlag: 0,
oldPeopleFlag: 0,
emptyNesterFlag: 0,
specialSupportFlag: 0,
disabledFlag: 0,
dementedFlag: 0,
disabilityFlag: 0,
seriousIllnessFlag: 0,
chronicDiseaseFlag: 0,
specialCrowdFlag: 0,
tenantFlag: 0,
floatingFlag: 0,
liveAloneFlag: 0,
publicWelfareFlag: 0,
buildingChiefFlag: 0,
unitChiefFlag: 0,
riskyFlag: 0,
delFlag: 0,
}
},
eduInfoDto: {
cultureLevel: null,//文化程度
},
familyInfoDto: {
marriage: null,//婚姻状况
spouseSituation: null,//配偶情况
elderlyFlag: null,//有无赡养人
elderlyRelation: null,//与赡养人关系
dependantMobile: null,//赡养人联系电话
},
resideInfoDtos: [
{
agencyName: this.$store.state.user.agencyName,
agencyId: this.$store.state.user.agencyId,
gridId: null,//所属网格id
villageId: null,//小区id
buildId: null,//楼栋id
unitId: null,//单元id
moveOutFlag: null,
outOfTime: null,//迁出时间
homeId: null, //房屋id
placeOfDomicile: null,//户籍所在地
currentResidence: null,//现居住地
householdSituation: null,//人户状况
houseHolderRel: null,//与户主关系
resiHouseRel: null,//人房关系
optionsV: [],
optionsB: [],
optionsH: [],
optionsD: [],
}
],
religionDto: {
religion: null,//宗教信仰
},
workInfoDto: {
careerStatus: null,//就业状况
workUnit: null,//工作单位
occupation: null,//职业
},
specialDto: {
specialCategoryCodes: []
},
unemployedDto: {
originWorkUnit: null,//原工作单位
unemploymentTime: null,//失业时间yyyy-MM-dd
unemploymentNum: null,//失业证号
employmentNum: null,//再就业优惠证号
specialSkill: null,//技术特长
unempCompensationFlag: null,//是否领取失业补助金
unemploymentReason: null,//失业原因【字典表】code
employmentHardFlag: null,//是否就业困难对象;1是0不是
employmentWish: null,//劳动能力就业愿望
},
economyDto: {
monthIncome: null,//月收入
}
},
footerInputList: [
{
id: 'healthDto',
children: [
{
label: "残疾类别",
itemType: "select1",
formName: "disabilityCategoryCode",
opctionUrl: 'sys/dict/data/dictlist',
opctionParams: { dictType: 'disability_category_code' },
opction: []
},
{
label: "残疾等级",
itemType: "select1",
formName: "disabilityLevel",
opctionUrl: 'sys/dict/data/dictlist',
opctionParams: { dictType: 'disability_level' },
opction: []
},
{
label: "残疾证号",
itemType: "input1",
formName: "disabilityNum",
},
{
label: "残疾说明",
itemType: "input1",
formName: "disabilityDesc",
},
{
label: "监护人",
itemType: "radio1",
formName: "guardianFlag",
opction: [
{ label: '有', formName: '', value: 1 },
{ label: '无', formName: '', value: 0 }
]
},
{
label: "监护人姓名",
itemType: "input1",
formName: "guardianName",
},
{
label: "监护人联系电话",
itemType: "input1",
formName: "guardianMobile",
},
{
label: "技能特长",
itemType: "radio1",
formName: "specialSkillFlag",
opction: [
{ label: '有', formName: '', value: 1 },
{ label: '无', formName: '', value: 0 }
]
},
{
label: "劳动能力",
itemType: "radio1",
formName: "workCapacityFlag",
opction: [
{ label: '有', formName: '', value: 1 },
{ label: '无', formName: '', value: 0 }
]
},
]
},
{
id: 'seriousIllnessDto',
children: [
{
label: "所患大病",
itemType: "checkbox",
formName: "illnessCodes",
opctionUrl: 'sys/dict/data/dictlist',
opctionParams: { dictType: 'illness_code' },
opction: []
},]
},
{
id: 'chronicDiseaseDto',
children: [
{
label: "所患慢病",
itemType: "checkbox",
formName: "chronicDiseaseCodes",
opctionUrl: 'sys/dict/data/dictlist',
opctionParams: { dictType: 'chronic_disease_code' },
opction: []
},
]
},
{
id: 'deathDto',
children: [
{
label: "死亡时间",
itemType: "datepicker1",
formName: "deathTime",
},
]
},
{
id: 'oldPeopleDto',
children: [
{
label: "老年人分类",
itemType: "select1",
multiple: true,
formName: "oldPeopleCategories",
opctionUrl: 'sys/dict/data/dictlist',
opctionParams: { dictType: 'oldPeople_categories' },
},
{
label: "居住情况",
itemType: "select1",
formName: "resideSituation",
opctionUrl: 'sys/dict/data/dictlist',
opctionParams: { dictType: 'reside_situation' },
},
{
label: "高龄补助",
itemType: "inputNum",
formName: "oldSubsidy",
},
]
},
{
id: 'subsistenceAllowanceDto',
children: [
{
label: "低保类别",
itemType: "select1",
formName: "category",
opctionUrl: 'sys/dict/data/dictlist',
opctionParams: { dictType: 'subsistence_allowance_category' },
},
{
label: "低保享受原因",
itemType: "checkbox",
formName: "reasons",
opctionUrl: 'sys/dict/data/dictlist',
opctionParams: { dictType: 'subsistence_allowance_reasons' },
opction: []
},
]
},
{
id: "parymemberInfoDto",
children: [
{
label: "入党时间",
itemType: "datepicker1",
formName: "joinTime",
opction: [
]
},
{
label: "转正时间",
itemType: "datepicker1",
formName: "positiveTime",
opction: [
]
},
{
label: "所属党组织",
itemType: "cascader1",
formName: "partyOrgId",
opction: [
]
},
{
label: "流动党员",
itemType: "radio1",
formName: "flowFlag",
opction: [
{ label: '是', value: 1 },
{ label: '否', value: 0 },
]
},
{
label: "流动党员活动证号",
itemType: "input1",
formName: "flowActNum",
},
{
label: "职务",
itemType: "select1",
formName: "partyJob",
opctionUrl: 'sys/dict/data/dictlist',
opctionParams: { dictType: 'party_job' },
opction: [
]
},
{
label: "工作职责",
itemType: "input1",
formName: "duty",
},
{
label: "是否退休",
itemType: "radio1",
formName: "retiredFlag",
opction: [
{ label: '是', value: 1 },
{ label: '否', value: 0 },
]
}, {
label: "党员中心户",
itemType: "radio1",
formName: "centerFlag",
opction: [
{ label: '是', value: 1 },
{ label: '否', value: 0 },
]
}, {
label: "免学习",
itemType: "radio1",
formName: "studyNotNeed",
opction: [
{ label: '是', value: 1 },
{ label: '否', value: 0 },
]
}, {
label: "入党时所在党支部",
itemType: "input1",
formName: "joinBranchName",
}, {
label: "组织关系转入社区时间",
itemType: "datepicker1",
formName: "joinCommunityTime",
opction: [
]
},
]
},
{
id: 'ensureHouseDto',
children: [
{
label: "所在社区",
itemType: "input1",
formName: "liveCommunity",
},
{
label: "住房性质",
itemType: "select1",
formName: "housingNature",
opctionUrl: 'sys/dict/data/house',
opctionParams: { formCode: "resi_base_info" },
opction: [
]
}
]
},
{
id: 'veteranDto',
children: [
{
label: "入伍时间",
itemType: "datepicker1",
formName: "joinArmyTime",
opction: [
]
},
{
label: "退伍时间",
itemType: "datepicker1",
formName: "leaveArmyTime",
opction: [
]
},
{
label: "服役单位",
itemType: "input1",
formName: "serviceUnit",
},
{
label: "接收单位",
itemType: "input1",
formName: "receiveUnit",
},
{
label: "待安置补助金",
itemType: "inputNum",
formName: "settlementAmount",
opction: [
]
},
{
label: "培训状况",
itemType: "input1",
formName: "trainDesc",
},
{
label: "现就业情况",
itemType: "input1",
formName: "employmentSituation",
},
{
label: "是否办理公益性岗位",
itemType: "radio1",
formName: "pubWelfareJobFlag",
opction: [
{ label: '是', value: 1 },
{ label: '否', value: 0 },
]
}
]
},
{
id: 'unitedFrontDto',
children: [{
label: "统战类型",
itemType: "input1",
formName: "unitedFrontType",
}]
},
{
id: 'volunteerDto',
children: [
{
label: "志愿者类别",
itemType: "checkbox",
formName: "volunteerCategory",
opctionUrl: 'sys/dict/data/dictlist',
opctionParams: { dictType: "VOLUNTEER_CATEGORY" },
opction: [
]
}
]
},
{
id: 'specialSupportDto',
children: [
{//0
label: "特扶类别",
itemType: "select1",
formName: "specialSupportType",
opction: [
{
value: '1',
label: '失独'
},
{
value: '2',
label: '伤残'
}
]
},
{//1
label: "子女姓名",
itemType: "input1",
formName: "childName",
opction: [
]
},
{//2
label: "子女性别",
itemType: "select1",
formName: "childGender",
opction: [
{
value: '1',
label: '男'
},
{
value: '2',
label: '女'
}
]
},
{
label: "子女死亡日期",
itemType: "datepicker1",
formName: "certificateDate",
opction: [],
},
{
label: "子女伤残类别",
itemType: "select1",
formName: "childDisabilityCategoryCode",
opctionUrl: 'sys/dict/data/dictlist',
opctionParams: { dictType: 'disability_category_code' },
opction: []
},
{
label: "子女伤残等级",
itemType: "select1",
formName: "childDisabilityLevel",
opctionUrl: 'sys/dict/data/dictlist',
opctionParams: { dictType: 'disability_level' },
opction: []
}
]
},
],
idTypeList,
genderList,
hasOptions,
disabilityFlagList,
btnLoading: false,
rules: {
'baseInfoDto.name': [{ required: true, message: '请输入姓名', trigger: 'blur' }],
'baseInfoDto.idType': [{ required: true, message: '请选择证件类型', trigger: 'blur' }],
'baseInfoDto.idNum': [{ required: true, message: '请输入证件号码', trigger: 'blur' }],
'baseInfoDto.mobile': [{ required: true, message: '请输入电话', trigger: 'blur' }],
'baseInfoDto.nationality': [{ required: true, message: '请选择国籍', trigger: 'blur' }],
},
dicts: {
educationList: [],//文化程度
nationList: [],//民族
nationalityList: [],//国籍
marriageList: [],//婚姻状况
householdSituationList: [],//人户状况
houseHolderRelList: [],//与户主关系
careerStatusList: [],//就业状况
spouseSituationList: [],//配偶情况
unemploymentReasonList: [],//失业原因
employmentWishList: [],//就业意愿
resiHouseRelList: [
{
label: '自住',
value: 0
},
{
label: '租住',
value: 1
}
]
},
};
},
created() {
this.getDicts()
this.getOrgTreeList()
},
methods: {
async getDicts() {
try {
const requests = [
this.$http.post("sys/dict/data/dictlist", {
dictType: "nationality",
}),
this.$http.post("sys/dict/data/nation", {
formCode: "resi_base_info",
}),
this.$http.post("sys/dict/data/education", {
formCode: "resi_base_info",
}),
this.$http.post("sys/dict/data/dictlist", {
dictType: "marriage",
}),
this.$http.post("sys/dict/data/dictlist", {
dictType: "household_situation",
}),
this.$http.post("sys/dict/data/relationship", {
formCode: "resi_base_info",
}),
this.$http.post("sys/dict/data/dictlist", {
dictType: "career_status",
}),
this.$http.post("sys/dict/data/dictlist", {
dictType: "spouse_situation",
}),
this.$http.post("sys/dict/data/dictlist", {
dictType: "unemployment_reason",
}),
this.$http.post("sys/dict/data/dictlist", {
dictType: "career_goals",
}),
];
const dictKeys = ["nationalityList", "nationList", "educationList", "marriageList", 'householdSituationList', 'houseHolderRelList', 'careerStatusList', 'spouseSituationList', 'unemploymentReasonList', 'employmentWishList']; // 对应的键名
const results = await Promise.all(requests);
results.forEach((result, index) => {
if (result.data.code === 0) {
this.dicts[dictKeys[index]].push(...result.data.data);
} else {
console.log(`获取${dictKeys[index]}失败: ${result.data.msg}`);
}
});
} catch (error) {
console.log("获取字典失败: ", error);
}
},
getOrgTreeList() {
this.$http
.post('/gov/org/customeragency/agencygridtree', {})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
console.log('获取组织树成功', res.data);
this.orgOptions = [];
this.orgOptions.push(res.data);
}
})
.catch(() => {
return this.$message.error('网络错误');
});
},
handelChangeResiHouseRel(val, index) {
this.form.resideInfoDtos[index].householdSituation = val == 0 ? 'rhyz' : 'rzhbz'
},
handleChangeV(index) {
console.log(this.form.resideInfoDtos[index].villageId);
this.form.resideInfoDtos[index].buildId = ''
this.form.resideInfoDtos[index].unitId = ''
this.form.resideInfoDtos[index].homeId = ''
this.getBuildList(index)
this.getUniList(index)
this.getHouseList(index)
},
handleChangeB(index) {
this.form.resideInfoDtos[index].unitId = ''
this.form.resideInfoDtos[index].homeId = ''
this.getUniList(index)
this.getHouseList(index)
},
handleChangeD(index) {
this.form.resideInfoDtos[index].homeId = ''
this.getHouseList(index)
},
handleChangeH(i) {
// let item = this.optionsH.find((item, index) => index === i);
// if (item && item.type == '1') {
// // this.form.IS_TENANT = '1'
// console.log('item-----', item)
// }
// else
// this.form.IS_TENANT = '0'
},
handleChangeAgency(index) {
let obj = this.$refs[`myCascader`][index].getCheckedNodes()[0] ? this.$refs['myCascader'][index].getCheckedNodes()[0].data : null;
if (obj) {
if (obj.level === 'grid') {
this.form.resideInfoDtos[index].gridId = obj.agencyId;
this.form.resideInfoDtos[index].agencyId = obj.pid
this.form.resideInfoDtos[index].villageId = '';
this.form.resideInfoDtos[index].buildId = '';
this.form.resideInfoDtos[index].unitId = '';
this.form.resideInfoDtos[index].homeId = '';
this.getValiheList(index);
} else {
// this.selGridId = []
this.form.resideInfoDtos[index].gridId = ''
this.form.resideInfoDtos[index].agencyId = ''
this.$message.info('请选择网格')
return false
}
}
},
getValiheList(index) {
console.log(this.form.resideInfoDtos[index].gridId, '小区接口');
console.log(this.form.resideInfoDtos);
const { user } = this.$store.state
this.$http.post('/actual/base/communityQuarters/listQuartersOptions', { gridId: this.form.resideInfoDtos[index].gridId, agencyId: user.agencyId }).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.form.resideInfoDtos[index].optionsV = []
this.form.resideInfoDtos[index].optionsV.push(...res.data)
}
}).catch((err) => {
console.log(err);
return this.$message.error('网络错误')
})
},
getBuildList(index) {
this.$http.post('/actual/base/communityBuilding/buildingoption', { quartersId: this.form.resideInfoDtos[index].villageId }).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.form.resideInfoDtos[index].optionsB = res.data
}
}).catch(() => {
return this.$message.error('网络错误')
})
},
getUniList(index) {
this.$http.post('/actual/base/communityBuildingUnit/unitoption', { buildingId: this.form.resideInfoDtos[index].buildId }).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.form.resideInfoDtos[index].optionsD = res.data
}
}).catch(() => {
return this.$message.error('网络错误')
})
},
getHouseList(index) {
this.$http.post('/actual/base/communityHouse/houseoption', { unitId: this.form.resideInfoDtos[index].unitId }).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.form.resideInfoDtos[index].optionsH = res.data
}
}).catch(() => {
return this.$message.error('网络错误')
})
},
handelClickAddHouse() {
this.form.resideInfoDtos.push(
{
agencyName: this.$store.state.user.agencyName,
agencyId: this.$store.state.user.agencyId,
gridId: null,//所属网格id
villageId: null,//小区id
buildId: null,//楼栋id
unitId: null,//单元id
moveOutFlag: null,
outOfTime: null,//迁出时间
homeId: null, //房屋id
placeOfDomicile: null,//户籍所在地
currentResidence: null,//现居住地
householdSituation: null,//人户状况
houseHolderRel: null,//与户主关系
resiHouseRel: null,//人房关系
optionsV: [],
optionsB: [],
optionsH: [],
optionsD: [],
}
)
},
handelClickDelHouse(i) {
this.form.resideInfoDtos = this.form.resideInfoDtos.filter((item, index) => index != i)
},
handleValidBlur() {
if (this.form.baseInfoDto.idType != 1) return
this.getResidentInfoByIdNum()
if (!isCard(this.form.baseInfoDto.idNum) && !isPassport(this.form.baseInfoDto.idNum)) return
const { user } = this.$store.state
let huji = '', i = 0
if (user.areaCodePath && user.areaCodePath.length > 0) {
i = user.areaCodePath.length - 1
huji = user.areaCodePath[i].length > 6 ? user.areaCodePath[i].substr(0, 6) : user.areaCodePath[i]
}
if (this.form.baseInfoDto.idNum.length === 18 || this.form.baseInfoDto.idNum.length === 15) {
const _id = this.form.baseInfoDto.idNum.substr(0, 6)
const { sex, birth, age } = computedCard(this.form.baseInfoDto.idNum)
this.form.baseInfoDto.birthday = birth
this.form.baseInfoDto.gender = sex == 1 ? '1' : '2'
this.form.baseInfoDto.categoryInfo.oldPeopleFlag = age >= 60 ? 1 : 0
// this.form.IS_BDHJ = huji == _id ? '1' : ''
// 身份证前端验证角色方法 因原型没有注释
// this.validateIdcard(this.form.idNum)
}
},
async getResidentInfoByIdNum(){
try {
let url = '/actual/base/residentBaseInfo/getResidentInfoByIdNum'
let parm = {
idType: this.form.baseInfoDto.idType,
idNum: this.form.baseInfoDto.idNum
}
let { code, data, msg } = await requestGet(url,parm)
if (code == 0 && data != null) {
this.$confirm(`该居民已存在于“${data.name}”是否继续填写`, {
confirmButtonText: '前往修改',
cancelButtonText: '继续填写',
type: 'warning'
}).then(() => {
this.$router.push({ name: 'edit-resi', query: { id: data.id }, params: { idNum: data.idNum, mobile: data.mobile } });
}).catch(() => {
});
} else if (code >= 8000) {
this.$message.error(msg);
this.btnLoading = false;
}
}
catch (error) {
// this.$message.error(msg);
console.log(msg);
}
},
handleLocalRadio(e) {
if (e.target.type === 'radio') return
this.form.baseInfoDto.localResidenceFlag = this.form.baseInfoDto.localResidenceFlag === 0 ? 1 : 0;
console.log(this.form.baseInfoDto.localResidenceFlag);
},
handelClickMarriage() {
this.form.familyInfoDto.spouseSituation = null
},
handelClickelderly() {
this.form.familyInfoDto.elderlyRelation = null
this.form.familyInfoDto.dependantMobile = null
},
handelClickCareerStatus(val) {
this.form.unemployedDto = {
originWorkUnit: null,//原工作单位
unemploymentTime: null,//失业时间yyyy-MM-dd
unemploymentNum: null,//失业证号
employmentNum: null,//再就业优惠证号
specialSkill: null,//技术特长
unempCompensationFlag: null,//是否领取失业补助金
unemploymentReason: null,//失业原因【字典表】code
employmentHardFlag: null,//是否就业困难对象;1是0不是
employmentWish: null,//劳动能力就业愿望
}
this.form.workInfoDto = {
careerStatus: val,//就业状况
workUnit: null,//工作单位
occupation: null,//职业
}
if (val == 0) {
this.form.baseInfoDto.categoryInfo.unemployedFlag = 1
}else{
this.form.baseInfoDto.categoryInfo.unemployedFlag = 0
}
},
handlerCancle() {
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(
(item) => item.name !== 'add-resi'
);
let tab =
this.$store.state.contentTabs[
this.$store.state.contentTabs.length - 1
];
this.$router.push({
name: tab.name,
params: { ...tab.params },
query: { ...tab.query },
});
},
handleClickSubmit(house) {
this.$refs['addForm'].validate((valid) => {
if (valid) {
this.form.resideInfoDtos.forEach(item => {
delete item.optionsV;
delete item.optionsB;
delete item.optionsH;
delete item.optionsD;
});
this.submitForm(house);
}
})
},
async submitForm(house) {
this.btnLoading = true;
try {
let url = '/actual/base/residentBaseInfo/save'
let parm = {
...this.form
}
let { code, data, msg } = await requestPost(url, parm)
if (code == 0) {
if (house != 'house') {
this.$message.success('保存成功');
this.$refs['addForm'].resetFields();
this.handlerCancle();
} else {
this.$message.success('保存成功');
let homeArr = JSON.parse(JSON.stringify(this.form.resideInfoDtos));
this.$refs['addForm'].resetFields();
this.form.resideInfoDtos = homeArr
}
this.btnLoading = false;
} else if (code >= 8000) {
this.$message.error(msg);
this.btnLoading = false;
}
}
catch (error) {
this.$message.error(msg);
}
},
showDialog({ index, value }, event) {
if (value == 1) {
value = 'parymemberInfoDto'
this.form.baseInfoDto.categoryInfo.partyFlag = 1;
} else if (value == 0) {
this.form.baseInfoDto.categoryInfo.partyFlag = 0;
} else if (value == 2) {
this.form.baseInfoDto.categoryInfo.partyFlag = 2;
}
if (index != 3 && index) {
this.form.baseInfoDto.categoryInfo[value] = event ? 1 : 0;
} else if (index == 3) {
if (event) {
this.form.baseInfoDto.categoryInfo.specialCrowdFlag = 1;
if (value == 'unitedFrontFlag' || value == 'petitionOfficerFlag') {
this.form.baseInfoDto.categoryInfo[value] = 1
}
this.form.specialDto.specialCategoryCodes.push(value);
} else {
this.form.specialDto.specialCategoryCodes = this.form.specialDto.specialCategoryCodes.filter(item => item != value);
if (value == 'unitedFrontFlag' || value == 'petitionOfficerFlag') {
this.form.baseInfoDto.categoryInfo[value] = 0
}
}
}
const map = {
'parymemberInfoDto': { formId: 'parymemberInfoDto', formType: 'parymemberInfoDto', title: '党员信息' },
'disabilityFlag': { formId: 'healthDto', formType: 'healthDto', title: '残疾信息' },
'seriousIllnessFlag': { formId: 'seriousIllnessDto', formType: 'seriousIllnessDto', title: '大病信息' },
'chronicDiseaseFlag': { formId: 'chronicDiseaseDto', formType: 'chronicDiseaseDto', title: '慢病信息' },
'deathFlag': { formId: 'deathDto', formType: 'deathDto', title: '死亡' },
'oldPeopleFlag': { formId: 'oldPeopleDto', formType: 'oldPeopleDto', title: '老年人信息' },
'subsistenceAllowanceFlag': { formId: 'subsistenceAllowanceDto', formType: 'subsistenceAllowanceDto', title: '低保人员信息' },
'veteranFlag': { formId: 'veteranDto', formType: 'veteranDto', title: '退役军人信息' },
'ensureHouseFlag': { formId: 'ensureHouseDto', formType: 'ensureHouseDto', title: '保障性住房信息' },
'specialSupportFlag': { formId: 'specialSupportDto', formType: 'specialSupportDto', title: '特扶人员' },
'unitedFrontFlag': { formId: 'unitedFrontDto', formType: 'unitedFrontDto', title: '统战人员' },
'volunteerFlag': { formId: 'volunteerDto', formType: 'volunteerDto', title: '志愿者' },
};
if (map[value]) {
this.dialogTitle = map[value].title;
this.dialogVisible = (event == true || value == 'parymemberInfoDto') && this.dialogTitle != '';
this.$nextTick(() => {
this.$refs['resiExpand'].formList = [this.footerInputList.find(item => item.id === map[value].formId)];
this.$refs['resiExpand'].formType = map[value].formType;
this.$refs['resiExpand'].showForm()
});
}
},
// 提交扩展信息
submitExpand(form, formType) {
this.form[formType] = form[formType];
this.dialogVisible = false;
},
hideExpand(formType) {
delete this.form[formType]
this.dialogVisible = false;
}
},
components: { stafftag, resiExpand },
computed: {},
watch: {},
}
</script>
<style lang='scss' scoped>
@import "@/assets/scss/modules/management/form-main.scss";
@import "@/assets/scss/pages/resiAdd.scss";
</style>