btxtgxq-system-population/src/main/resources/templates/populationinfo/save.html
java_cuibaocheng@163.com f2e4f0cbf2 人口基本信息-修改地区类型保存Bug
人口基本信息-修改人口信息身份证自动识别性别/生日Bug
2023-11-15 18:20:33 +08:00

1628 lines
102 KiB
HTML

<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<base th:href="${#request.getContextPath() + '/'}">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
<link rel="stylesheet" href="assets/js/vendor/zTree3/css/metroStyle/metroStyle.css"/>
<link rel="stylesheet" href="assets/layuiadmin/modules/cascader.css" media="all">
<style>
.layui-form-pane .layui-input-block {
margin-left: 140px;
left: -1px;
}
.layui-form-pane .layui-form-label {
width: 140px;
}
</style>
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-card">
<div class="layui-card-header">
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
<a href="javascript:void(0);"><cite>新增内容</cite></a>
</span>
</div>
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-row layui-col-space10">
<div class="layui-col-md8 layui-col-xs8" >
<div class="layui-row">
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-form-item">
<label class="layui-form-label">姓名<span style="color: red">*</span></label>
<div class="layui-input-block">
<input type="text" id="name" name="name" class="layui-input" value="" placeholder="请输入姓名" maxlength="50">
</div>
</div>
</div>
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-form-item">
<label class="layui-form-label">证件类型<span style="color: red">*</span></label>
<div class="layui-input-block layui-form" id="idcardTypeSelectTemplateBox" lay-filter="idcardTypeSelectTemplateBox"></div>
<script id="idcardTypeSelectTemplate" type="text/html">
<select id="idcardType" name="idcardType">
<option value="">请选择证件类型</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
{{# } }}
</select>
</script>
</div>
</div>
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-form-item">
<label class="layui-form-label">证件<span style="color: red">*</span></label>
<div class="layui-input-block">
<input type="text" id="idcard" name="idcard" class="layui-input" value="" placeholder="请输入证件" maxlength="50">
</div>
</div>
</div>
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-form-item">
<label class="layui-form-label">出生日期<span style="color: red">*</span></label>
<div class="layui-input-block">
<input type="text" id="birthday" readonly style="cursor:pointer;" name="birthday" class="layui-input" value="" placeholder="请输入出生日期" maxlength="20">
</div>
</div>
</div>
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-form-item">
<label class="layui-form-label">性别<span style="color: red">*</span></label>
<div class="layui-input-block layui-form" id="sexSelectTemplateBox" lay-filter="sexSelectTemplateBox"></div>
<script id="sexSelectTemplate" type="text/html">
<select id="sex" name="sex">
<option value="">请选择性别</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
{{# } }}
</select>
</script>
</div>
</div>
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-form-item">
<label class="layui-form-label">民族<span style="color: red">*</span></label>
<div class="layui-input-block layui-form" id="nationSelectTemplateBox" lay-filter="nationSelectTemplateBox"></div>
<script id="nationSelectTemplate" type="text/html">
<select id="nation" name="nation">
<option value="">请选择民族</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
{{# } }}
</select>
</script>
</div>
</div>
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-form-item">
<label class="layui-form-label">文化程度<span style="color: red">*</span></label>
<div class="layui-input-block layui-form" id="educationSelectTemplateBox" lay-filter="educationSelectTemplateBox"></div>
<script id="educationSelectTemplate" type="text/html">
<select id="education" name="education">
<option value="">请选择文化程度</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
{{# } }}
</select>
</script>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item layui-form-text ">
<label class="layui-form-label">就读院校及专业</label>
<div class="layui-input-block layui-text">
<textarea id="description" name="description" class="layui-textarea" placeholder="请输入就读院校及专业(需注明学历)" maxlength="1000"></textarea>
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-form-item">
<label class="layui-form-label">所属党派<span style="color: red">*</span></label>
<div class="layui-input-block layui-form" id="organizationSelectTemplateBox" lay-filter="organizationSelectTemplateBox"></div>
<script id="organizationSelectTemplate" type="text/html">
<select id="organization" name="organization">
<option value="">请选择所属党派</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
{{# } }}
</select>
</script>
</div>
</div>
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-form-item">
<label class="layui-form-label">宗教信仰<span style="color: red">*</span></label>
<div class="layui-input-block layui-form" id="religionSelectTemplateBox" lay-filter="religionSelectTemplateBox"></div>
<script id="religionSelectTemplate" type="text/html">
<select id="religion" name="religion">
<option value="">请选择宗教信仰</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
{{# } }}
</select>
</script>
</div>
</div>
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-form-item">
<label class="layui-form-label">婚姻状况<span style="color: red">*</span></label>
<div class="layui-input-block layui-form" id="marriageStatusSelectTemplateBox" lay-filter="marriageStatusSelectTemplateBox"></div>
<script id="marriageStatusSelectTemplate" type="text/html">
<select id="marriageStatus" name="marriageStatus">
<option value="">请选择婚姻状况</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
{{# } }}
</select>
</script>
</div>
</div>
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-form-item">
<label class="layui-form-label">婚变日期</label>
<div class="layui-input-block">
<input type="text" id="marriageChangeTime" readonly style="cursor:pointer;" name="marriageChangeTime" class="layui-input" value="" placeholder="请输入婚变日期" maxlength="20">
</div>
</div>
</div>
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-form-item">
<label class="layui-form-label">初婚日期</label>
<div class="layui-input-block">
<input type="text" id="marriageFirstTime" readonly style="cursor:pointer;" name="marriageFirstTime" class="layui-input" value="" placeholder="请输入初婚日期" maxlength="20">
</div>
</div>
</div>
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-form-item">
<label class="layui-form-label">社会保险情况<span style="color: red">*</span></label>
<div class="layui-input-block layui-form" id="socialSecuritySelectTemplateBox" lay-filter="socialSecuritySelectTemplateBox"></div>
<script id="socialSecuritySelectTemplate" type="text/html">
<select id="socialSecurity" name="socialSecurity">
<option value="">请选择社会保险情况</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
{{# } }}
</select>
</script>
</div>
</div>
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-form-item">
<label class="layui-form-label">健康状况<span style="color: red">*</span></label>
<div class="layui-input-block layui-form" id="healthStatusSelectTemplateBox" lay-filter="healthStatusSelectTemplateBox"></div>
<script id="healthStatusSelectTemplate" type="text/html">
<select id="healthStatus" name="healthStatus">
<option value="">请选择健康状况</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
{{# } }}
</select>
</script>
</div>
</div>
<div class="layui-col-md8 layui-col-xs8" >
<div class="layui-form-item" pane="">
<label class="layui-form-label">就业状态<span style="color: red">*</span></label>
<div class="layui-input-block">
<input type="radio" name="departmentType" value="已就业" title="已就业">
<input type="radio" name="departmentType" value="未就业" title="未就业">
<input type="radio" name="departmentType" value="灵活就业" title="灵活就业">
<input type="radio" name="departmentType" value="退休" title="退休">
</div>
</div>
</div>
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-form-item">
<label class="layui-form-label">工作单位</label>
<div class="layui-input-block">
<input type="text" id="department" name="department" class="layui-input" value="" placeholder="请输入工作单位" maxlength="100">
</div>
</div>
</div>
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-form-item">
<label class="layui-form-label">工作职务</label>
<div class="layui-input-block">
<input type="text" id="pastion" name="pastion" class="layui-input" value="" placeholder="请输入工作职务" maxlength="50">
</div>
</div>
</div>
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-form-item">
<label class="layui-form-label">专业技术职称</label>
<div class="layui-input-block">
<input type="text" id="pastionTitle" name="pastionTitle" class="layui-input" value="" placeholder="请输入专业技术职称" maxlength="100">
</div>
</div>
</div>
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-form-item">
<label class="layui-form-label">专长</label>
<div class="layui-input-block">
<input type="text" id="expertise" name="expertise" class="layui-input" value="" placeholder="请输入专长" maxlength="100">
</div>
</div>
</div>
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-form-item">
<label class="layui-form-label">联系电话<span style="color: red">*</span></label>
<div class="layui-input-block">
<input type="text" id="phone" name="phone" class="layui-input" value="" placeholder="请输入联系电话" maxlength="20">
</div>
</div>
</div>
<div class="layui-col-md4 layui-col-xs4" >
<label class="layui-form-label">与户主关系<span style="color: red">*</span></label>
<div class="layui-input-block layui-form" id="relationshipSelectTemplateBox" lay-filter="relationshipSelectTemplateBox"></div>
<script id="relationshipSelectTemplate" type="text/html">
<select id="relationship" name="relationship">
<option value="">请选择与户主关系</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
{{# } }}
</select>
</script>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item" pane="">
<label class="layui-form-label">标签</label>
<div class="layui-input-block layui-form" id="labelSelectTemplateBox" lay-filter="labelSelectTemplateBox" pane=""></div>
<script id="labelSelectTemplate" type="text/html">
{{# for(var i = 0, item; item = d[i++];) { }}
<input type="checkbox" name="label[{{item.id}}]" value="{{item.id}}" title="{{item.name}}">
{{# } }}
</script>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md3 layui-col-xs3" >
<div class="layui-form-item">
<label class="layui-form-label">父亲姓名</label>
<div class="layui-input-block">
<input type="hidden" id="fatherId" name="fatherId" class="layui-input" value="" maxlength="50">
<input type="text" id="fatherName" name="fatherName" class="layui-input" value="" placeholder="输入父亲姓名" maxlength="50">
</div>
</div>
</div>
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-form-item">
<label class="layui-form-label">父亲证件</label>
<div class="layui-input-block">
<input type="text" id="fatherIdcard" name="fatherIdcard" class="layui-input" value="" placeholder="请输入父亲证件" maxlength="50">
</div>
</div>
</div>
<div class="layui-col-md3 layui-col-xs3" >
<div class="layui-form-item">
<label class="layui-form-label">父亲电话</label>
<div class="layui-input-block">
<input type="text" id="fatherPhone" name="fatherPhone" class="layui-input" value="" placeholder="输入父亲电话" maxlength="20">
</div>
</div>
</div>
<div class="layui-col-md2 layui-col-xs2" style="text-align: center;">
<div class="layui-form-item" style="height: 33px;padding-top: 3px;" pane="">
<button type="button" class="layui-btn layui-btn-sm query-population" data-population="father">搜索</button>
<button type="button" class="layui-btn layui-btn-sm layui-btn-danger clear-population" data-population="father">清空</button>
</div>
</div>
</div>
<div class="layui-row" pane="">
<div class="layui-col-md3 layui-col-xs3" >
<div class="layui-form-item">
<label class="layui-form-label">母亲姓名</label>
<div class="layui-input-block">
<input type="hidden" id="motherId" name="motherId" class="layui-input" value="" maxlength="50">
<input type="text" id="motherName" name="motherName" class="layui-input" value="" placeholder="输入母亲姓名" maxlength="50">
</div>
</div>
</div>
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-form-item">
<label class="layui-form-label">母亲证件</label>
<div class="layui-input-block">
<input type="text" id="motherIdcard" name="motherIdcard" class="layui-input" value="" placeholder="请输入母亲证件" maxlength="50">
</div>
</div>
</div>
<div class="layui-col-md3 layui-col-xs3" >
<div class="layui-form-item">
<label class="layui-form-label">母亲电话</label>
<div class="layui-input-block">
<input type="text" id="motherPhone" name="motherPhone" class="layui-input" value="" placeholder="输入母亲电话" maxlength="20">
</div>
</div>
</div>
<div class="layui-col-md2 layui-col-xs2" style="text-align: center;">
<div class="layui-form-item" style="height: 33px;padding-top: 3px;" pane="">
<button type="button" class="layui-btn layui-btn-sm query-population" data-population="mother">搜索</button>
<button type="button" class="layui-btn layui-btn-sm layui-btn-danger clear-population" data-population="mother">清空</button>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item ">
<label class="layui-form-label">户籍地址<span style="color: red">*</span></label>
<div class="layui-input-block">
<input type="hidden" id="domicileAreaCode" name="domicileAreaCode" class="layui-input" value="" maxlength="500">
<input type="text" id="domicileAreaName" readonly style="cursor: pointer" name="domicileAreaName" class="layui-input" value="" placeholder="请选择户籍地址" maxlength="500">
</div>
</div>
</div>
<div class="layui-col-md6 layui-col-xs6" >
<div class="layui-form-item ">
<label class="layui-form-label">户籍详细地址</label>
<div class="layui-input-block">
<input type="text" id="domicileAddress" name="domicileAddress" class="layui-input" value="" placeholder="请输入需要补充的详细地址" maxlength="500">
</div>
</div>
</div>
<div class="layui-col-md6 layui-col-xs6" >
<div class="layui-form-item ">
<label class="layui-form-label">籍贯地址</label>
<div class="layui-input-block">
<input type="text" id="originAddress" name="originAddress" class="layui-input" value="" placeholder="请输入籍贯地址" maxlength="500">
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-form-item">
<label class="layui-form-label">流动日期</label>
<div class="layui-input-block">
<input type="text" id="flowTime" readonly style="cursor:pointer;" name="flowTime" class="layui-input" value="" placeholder="请输入流动日期" maxlength="20">
</div>
</div>
</div>
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-form-item">
<label class="layui-form-label">流动原因</label>
<div class="layui-input-block layui-form" id="flowReasonSelectTemplateBox" lay-filter="flowReasonSelectTemplateBox"></div>
<script id="flowReasonSelectTemplate" type="text/html">
<select id="flowReason" name="flowReason">
<option value="">请选择流动原因</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
{{# } }}
</select>
</script>
</div>
</div>
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-form-item">
<label class="layui-form-label">其他原因</label>
<div class="layui-input-block">
<input type="text" id="flowReasontext" name="flowReasontext" class="layui-input" value="" placeholder="请输入其他流动原因" maxlength="100">
</div>
</div>
</div>
</div>
</div>
<div class="layui-col-md4 layui-col-xs4" >
<div class="layui-row">
<div class="layui-col-md12 layui-col-xs12">
<div class="layui-tab">
<ul class="layui-tab-title">
<li class="layui-this">老年人</li>
<li>残疾人</li>
<li>服役/退役</li>
<li>社会救助</li>
</ul>
<div class="layui-tab-content" style="height: 522px; overflow: auto;border: 1px solid #EEE;">
<div class="layui-tab-item layui-show">
<div class="layui-row">
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item" pane="">
<label class="layui-form-label">是否为老年人</label>
<div class="layui-input-block">
<input type="radio" name="isOldage" value="是" title="是">
<input type="radio" name="isOldage" value="否" title="否">
</div>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item">
<label class="layui-form-label">老人类别</label>
<div class="layui-input-block layui-form" id="oldageTypeSelectTemplateBox" lay-filter="oldageTypeSelectTemplateBox"></div>
<script id="oldageTypeSelectTemplate" type="text/html">
<select id="oldageType" name="oldageType">
<option value="">请选择老人类别</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
{{# } }}
</select>
</script>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item">
<label class="layui-form-label">离退休前单位</label>
<div class="layui-input-block">
<input type="text" id="oldageDepartment" name="oldageDepartment" class="layui-input" value="" placeholder="请输入离退休前单位" maxlength="100">
</div>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item">
<label class="layui-form-label">生活照料情况</label>
<div class="layui-input-block layui-form" id="oldageLiftSelectTemplateBox" lay-filter="oldageLiftSelectTemplateBox"></div>
<script id="oldageLiftSelectTemplate" type="text/html">
<select id="oldageLift" name="oldageLift">
<option value="">请选择生活照料情况</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
{{# } }}
</select>
</script>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item">
<label class="layui-form-label">健康状况</label>
<div class="layui-input-block layui-form" id="oldageHealthStatusSelectTemplateBox" lay-filter="oldageHealthStatusSelectTemplateBox"></div>
<script id="oldageHealthStatusSelectTemplate" type="text/html">
<select id="oldageHealthStatus" name="oldageHealthStatus">
<option value="">请选择健康状况</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
{{# } }}
</select>
</script>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item">
<label class="layui-form-label">生活自理能力</label>
<div class="layui-input-block layui-form" id="oldageSelfcareSelectTemplateBox" lay-filter="oldageSelfcareSelectTemplateBox"></div>
<script id="oldageSelfcareSelectTemplate" type="text/html">
<select id="oldageSelfcare" name="oldageSelfcare">
<option value="">请选择生活自理能力</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
{{# } }}
</select>
</script>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item">
<label class="layui-form-label">居住状况</label>
<div class="layui-input-block layui-form" id="oldageLiveSelectTemplateBox" lay-filter="oldageLiveSelectTemplateBox"></div>
<script id="oldageLiveSelectTemplate" type="text/html">
<select id="oldageLive" name="oldageLive">
<option value="">请选择居住状况</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
{{# } }}
</select>
</script>
</div>
</div>
</div>
</div>
<!-- 残疾人表单 -->
<div class="layui-tab-item">
<div class="layui-row">
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item" pane="">
<label class="layui-form-label">是否为残疾人</label>
<div class="layui-input-block">
<input type="radio" name="isDisability" value="是" title="是">
<input type="radio" name="isDisability" value="否" title="否">
</div>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item">
<label class="layui-form-label">残疾类别</label>
<div class="layui-input-block layui-form" id="disabilityTypeSelectTemplateBox" lay-filter="disabilityTypeSelectTemplateBox"></div>
<script id="disabilityTypeSelectTemplate" type="text/html">
<select id="disabilityType" name="disabilityType">
<option value="">请选择残疾类别</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
{{# } }}
</select>
</script>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item">
<label class="layui-form-label">残疾等级</label>
<div class="layui-input-block layui-form" id="disabilityLevelSelectTemplateBox" lay-filter="disabilityLevelSelectTemplateBox"></div>
<script id="disabilityLevelSelectTemplate" type="text/html">
<select id="disabilityLevel" name="disabilityLevel">
<option value="">请选择残疾等级</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
{{# } }}
</select>
</script>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item">
<label class="layui-form-label">残疾证号</label>
<div class="layui-input-block">
<input type="text" id="disabilityNumber" name="disabilityNumber" class="layui-input" value="" placeholder="请输入残疾证号" maxlength="50">
</div>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item">
<label class="layui-form-label">残疾车牌号</label>
<div class="layui-input-block">
<input type="text" id="disabilityCarnumber" name="disabilityCarnumber" class="layui-input" value="" placeholder="请输入残疾车牌号" maxlength="50">
</div>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item">
<label class="layui-form-label">居住地址</label>
<div class="layui-input-block">
<input type="hidden" id="disabilityAreaCode" name="disabilityAreaCode" class="layui-input" value="" maxlength="50">
<input type="text" id="disabilityAreaName" readonly style="cursor: pointer;" name="disabilityAreaName" class="layui-input" value="" placeholder="请输入居住地址" maxlength="50">
</div>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item">
<label class="layui-form-label">收入情况</label>
<div class="layui-input-block layui-form" id="disabilityIncomeSelectTemplateBox" lay-filter="disabilityIncomeSelectTemplateBox"></div>
<script id="disabilityIncomeSelectTemplate" type="text/html">
<select id="disabilityIncome" name="disabilityIncome">
<option value="">请选择收入情况</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
{{# } }}
</select>
</script>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item">
<label class="layui-form-label">住房来源</label>
<div class="layui-input-block layui-form" id="disabilityHouseSelectTemplateBox" lay-filter="disabilityHouseSelectTemplateBox"></div>
<script id="disabilityHouseSelectTemplate" type="text/html">
<select id="disabilityHouse" name="disabilityHouse">
<option value="">请选择住房来源</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
{{# } }}
</select>
</script>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item">
<label class="layui-form-label">办证时间</label>
<div class="layui-input-block">
<input type="text" id="disabilityTime" readonly style="cursor:pointer;" name="disabilityTime" class="layui-input" value="" placeholder="请输入办证时间" maxlength="20">
</div>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item">
<label class="layui-form-label">监护人或配偶姓名</label>
<div class="layui-input-block">
<input type="text" id="disabilityGuardian" name="disabilityGuardian" class="layui-input" value="" placeholder="请输入监护人或配偶姓名" maxlength="50">
</div>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item">
<label class="layui-form-label">监护人联系电话</label>
<div class="layui-input-block">
<input type="text" id="disabilityGuardianPhone" name="disabilityGuardianPhone" class="layui-input" value="" placeholder="请输入监护人联系电话" maxlength="50">
</div>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item">
<div class="layui-form-item">
<label class="layui-form-label">监护人关系</label>
<div class="layui-input-block layui-form" id="disabilityGuardianRelationSelectTemplateBox" lay-filter="disabilityGuardianRelationSelectTemplateBox"></div>
<script id="disabilityGuardianRelationSelectTemplate" type="text/html">
<select id="disabilityGuardianRelation" name="disabilityGuardianRelation">
<option value="">请选择监护人关系</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
{{# } }}
</select>
</script>
</div>
</div>
</div>
</div>
</div>
<!-- 服役/退役 -->
<div class="layui-tab-item">
<div class="layui-row">
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item" pane="">
<label class="layui-form-label">是否为服役/退役</label>
<div class="layui-input-block">
<input type="radio" name="isMilitary" value="是" title="是">
<input type="radio" name="isMilitary" value="否" title="否">
</div>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item">
<label class="layui-form-label">批准退出现役日期</label>
<div class="layui-input-block">
<input type="text" id="militaryTime" readonly style="cursor:pointer;" name="militaryTime" class="layui-input" value="" placeholder="请输入批准退出现役日期" maxlength="20">
</div>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item">
<label class="layui-form-label">退出现役时职级</label>
<div class="layui-input-block layui-form" id="militaryPositionSelectTemplateBox" lay-filter="militaryPositionSelectTemplateBox"></div>
<script id="militaryPositionSelectTemplate" type="text/html">
<select id="militaryPosition" name="militaryPosition">
<option value="">请选择退出现役时职级</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
{{# } }}
</select>
</script>
</div>
</div>
</div>
</div>
<!-- 社会救助 -->
<div class="layui-tab-item">
<div class="layui-row">
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item" pane="">
<label class="layui-form-label">是否为社会救助</label>
<div class="layui-input-block">
<input type="radio" name="isSuccour" value="是" title="是">
<input type="radio" name="isSuccour" value="否" title="否">
</div>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item" pane="">
<label class="layui-form-label">低保户</label>
<div class="layui-input-block">
<input type="radio" name="succourDibao" value="是" title="是">
<input type="radio" name="succourDibao" value="否" title="否">
</div>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item" pane="">
<label class="layui-form-label">医疗救助</label>
<div class="layui-input-block">
<input type="radio" name="succourHelp" value="是" title="是">
<input type="radio" name="succourHelp" value="否" title="否">
</div>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item" pane="">
<label class="layui-form-label">困难职工</label>
<div class="layui-input-block">
<input type="radio" name="succourDifficulty" value="是" title="是">
<input type="radio" name="succourDifficulty" value="否" title="否">
</div>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item" pane="">
<label class="layui-form-label">老龄补贴</label>
<div class="layui-input-block">
<input type="radio" name="succourSubsidy" value="是" title="是">
<input type="radio" name="succourSubsidy" value="否" title="否">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="layui-row" style="margin-top: 20px">
<div class="layui-col-md12 layui-col-xs12">
<div class="layui-tab">
<ul class="layui-tab-title">
<li class="layui-this">党员</li>
<li class="">其他</li>
</ul>
<div class="layui-tab-content" style="border: 1px solid #EEE;">
<div class="layui-tab-item layui-show">
<!-- 党员 -->
<div class="layui-row">
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item" pane="">
<label class="layui-form-label">是否为党员</label>
<div class="layui-input-block">
<input type="radio" name="isParty" value="是" title="是">
<input type="radio" name="isParty" value="否" title="否">
</div>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item">
<label class="layui-form-label">党组织名称</label>
<div class="layui-input-block">
<input type="text" id="partyOrganization" name="partyOrganization" class="layui-input" value="" placeholder="请输入党组织名称" maxlength="200">
</div>
</div>
</div>
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item">
<label class="layui-form-label">入党时间</label>
<div class="layui-input-block">
<input type="text" id="partyTime" readonly style="cursor:pointer;" name="partyTime" class="layui-input" value="" placeholder="请输入入党时间" maxlength="20">
</div>
</div>
</div>
</div>
</div>
<div class="layui-tab-item">
<div class="layui-row">
<div class="layui-col-md12 layui-col-xs12" >
<div class="layui-form-item layui-form-text ">
<label class="layui-form-label">其他</label>
<div class="layui-input-block layui-text">
<textarea id="othertext" style="min-height: 106px;" name="othertext" class="layui-textarea" placeholder="请输入其他说明" maxlength="1000"></textarea>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label"><span style="color: red">*</span>所属区域</label>-->
<!-- <div class="layui-input-block">-->
<!-- <input type="text" id="areaCodeCascader" name="areaCodeCascader" class="layui-input" lay-verify="required"-->
<!-- autocomplete="off" value="" placeholder="点击选择所属区域" readonly>-->
<!-- </div>-->
<!-- </div>-->
<div class="layui-form-item layui-layout-admin">
<div class="layui-input-block">
<div class="layui-footer" style="left: 0;">
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交新增</button>
<button type="button" class="layui-btn layui-btn-danger" lay-submit lay-filter="submitTempForm">暂存内容</button>
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<div id="companiesTree" class="companiesTree" style="display: none;background: #f9f9f9; position: absolute;z-index: 10;height: 250px;overflow: auto;overflow-x: hidden;">
<ul id="treeDemo" class="ztree" style="width:400px;">
</ul>
</div>
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script src="assets/js/idCardUtils.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'form', 'laydate', 'ztree', 'laytpl', 'cascader'], function(){
var $ = layui.$;
var form = layui.form;
var laytpl = layui.laytpl;
var laydate = layui.laydate;
var wangEditor = window.wangEditor;
var wangEditorObj = {};
var cascader = layui.cascader;
var viewerObj = {};
function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name));
}
/* var areaFielaMap = new Map();
function initArea(rootId, id) {
var areaCodeCascader = cascader({
elem: "#" + id,
props: {
lazy: true,
checkStrictly: true,
expandTrigger: 'hover',
lazyLoad: function(node, resolve) {
var nodes =[];
console.log(node);
if(typeof (node.value) === 'undefined'){
top.restAjax.get(top.restAjax.path('api/areatree/newtree?id={id}', [rootId]), {}, null, function(code, data) {
if(typeof (data) === 'undefined' || data.length == 0){
resolve(nodes);
}
$.each(data, function(i,e){
nodes.push(e);
resolve(nodes);
})
}, function(code, data) {
top.dialog.msg(data.msg);
});
}else{
var value = node.value;
top.restAjax.get(top.restAjax.path('api/areatree/newtree?id={id}', [value]), {}, null, function(code, data) {
if(typeof (data) === 'undefined' || data.length == 0){
resolve(nodes);
}
$.each(data, function(i,e){
nodes.push(e);
resolve(nodes);
})
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
}
}
});
setTimeout(function(){
areaCodeCascader.change(function(value, node){
alert(1);
areaCodeCascader.blur();
});
},100);
}
initArea("0" , "areaCodeCascader");*/
$('#domicileAreaName').on("click", function () {
initHuJiAreaTree("domicile");
var cityObj = $(this);
var cityOffset = cityObj.offset();
var width = Number(cityObj.width()) + 13;
$("#companiesTree").css({width: width + "px", left: cityOffset.left + "px", top: cityOffset.top + cityObj.outerHeight() + "px" }).slideDown("fast");
$("body").bind("mousedown", onBodyDown);
});
$('#disabilityAreaName').on("click", function () {
initAreaTree("disability");
var cityObj = $(this);
var cityOffset = cityObj.offset();
var width = Number(cityObj.width()) + 13;
$("#companiesTree").css({width: width + "px", left: cityOffset.left + "px", top: cityOffset.top + cityObj.outerHeight() + "px" }).slideDown("fast");
$("body").bind("mousedown", onBodyDown);
});
function hideMenu() {
$("#companiesTree").fadeOut("fast");
$("body").unbind("mousedown", onBodyDown);
}
function onBodyDown(event) {
if (!(event.target.id == "menuBtn" || event.target.id == "companiesTree" || $(event.target).parents("#companiesTree").length > 0)) {
hideMenu();
}
}
function initAreaTree(name) {
var setting = {
view: {
nameIsHTML: true
},
data : {
simpleData : {
enable : true
}
},
async: {
enable: true,
url:"api/areatree/tree",
autoParam:["id", "name", "pId", "level"]
},
callback : {
onClick : function (e, treeId, treeNode) {
var count = treeNode.title.split('/').length -1;
if (count > 0) {
$('#' + name + "AreaName").val(treeNode.title);
$('#' + name + "AreaCode").val(treeNode.areaCode);
hideMenu();
}else{
layer.msg("区域选择错误");
}
}
}
};
$.fn.zTree.init($("#treeDemo"), setting, null);
}
function initHuJiAreaTree(name) {
var setting = {
view: {
nameIsHTML: true
},
data : {
simpleData : {
enable : true
}
},
async: {
enable: true,
url:"api/areatree/list",
autoParam:["id", "name", "pId", "level"]
},
callback : {
onClick : function (e, treeId, treeNode) {
var count = treeNode.title.split('/').length -1;
if (count > 1) {
$('#' + name + "AreaName").val(treeNode.title);
$('#' + name + "AreaCode").val(treeNode.areaCode);
hideMenu();
}else{
layer.msg("区域选择错误");
}
}
}
};
$.fn.zTree.init($("#treeDemo"), setting, null);
}
try{
var data = window.localStorage.getItem("tempSavePopulation");
if(data != null && data != undefined && data != 'null') {
var dataObj = eval("(" + data + ")");
layer.confirm("是否继续编辑上次暂存的内容?", {
title: '提示',
icon: 3,
btn: ['是的', '不用', '删除'] //可以无限个按钮
,btn3: function(index, layero){
try{
window.localStorage.setItem("tempSavePopulation", null);
layer.msg("删除暂存内容成功");
layer.close(index);
initPageData({});
}catch(err){
layer.msg("您的浏览器不支持暂存内容");
}
}
}, function(index, layero){
layer.close(index);
// 表单初始化
initPageData(dataObj);
}, function(index){
layer.close(index);
initPageData({});
});
}else{
initPageData({});
}
}catch(err){
initPageData({});
}
// 初始化出生日期
function initBirthday(value) {
// 日期选择
laydate.render({
elem: '#birthday',
format: 'yyyy-MM-dd',
value: value
});
}
// 初始化婚变日期
function initMarriageChangeTime(value) {
// 日期选择
laydate.render({
elem: '#marriageChangeTime',
format: 'yyyy-MM-dd',
value: value
});
}
// 初始化初婚日期
function initMarriageFirstTime(value) {
// 日期选择
laydate.render({
elem: '#marriageFirstTime',
format: 'yyyy-MM-dd',
value: value
});
}
// 初始化流动日期
function initFlowTime(value) {
// 日期选择
laydate.render({
elem: '#flowTime',
format: 'yyyy-MM-dd',
value: value
});
}
// 初始化残疾人办证时间
function initDisabilityTime(value) {
// 日期选择
laydate.render({
elem: '#disabilityTime',
format: 'yyyy-MM-dd',
value: value
});
}
// 初始化批准退出现役日期
function initMilitaryTime(value) {
// 日期选择
laydate.render({
elem: '#militaryTime',
format: 'yyyyMM',
type:'month',
value: value
});
}
// 初始化批准退出现役日期
function initPartyTime(value) {
// 日期选择
laydate.render({
elem: '#partyTime',
format: 'yyyy-MM-dd',
value: value
});
}
// 初始化证件类型下拉选择
function initIdcardTypeSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/76c5044f-805a-4313-b1e8-79e966b97c0d', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('idcardTypeSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('idcardTypeSelectTemplateBox').innerHTML = html;
});
form.render('select', 'idcardTypeSelectTemplateBox');
var selectObj = {};
selectObj['idcardType'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化性别下拉选择
function initSexSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/4ef46940-76ab-4758-b5f0-0cbc93ffc660', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('sexSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('sexSelectTemplateBox').innerHTML = html;
});
form.render('select', 'sexSelectTemplateBox');
var selectObj = {};
selectObj['sex'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化民族下拉选择
function initNationSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/a981579c-572b-4fd1-8e76-5d17df97f6a4', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('nationSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('nationSelectTemplateBox').innerHTML = html;
});
form.render('select', 'nationSelectTemplateBox');
var selectObj = {};
selectObj['nation'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化标签
function initLabelSelect(selectValues) {
top.restAjax.get(top.restAjax.path('api/populationinfo/label', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('labelSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('labelSelectTemplateBox').innerHTML = html;
});
form.render('checkbox', 'labelSelectTemplateBox');
if(selectValues) {
var checkboxValue = selectValues.split(',');
var checkboxObj = {};
for(var j = 0, checkbox = checkboxValue[j]; checkbox = checkboxValue[j++];) {
checkboxObj['label['+ checkbox +']'] = true;
}
form.val('dataForm', checkboxObj);
}
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化文化程度下拉选择
function initEducationSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/d6b9f026-6ea9-456a-b48b-0c18d502523b', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('educationSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('educationSelectTemplateBox').innerHTML = html;
});
form.render('select', 'educationSelectTemplateBox');
var selectObj = {};
selectObj['education'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化所属党派下拉选择
function initOrganizationSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/b2c96de0-3df8-41db-99b1-bc4e24ac6c24', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('organizationSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('organizationSelectTemplateBox').innerHTML = html;
});
form.render('select', 'organizationSelectTemplateBox');
var selectObj = {};
selectObj['organization'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化宗教信仰下拉选择
function initReligionSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/792e5742-d302-4943-b04c-161f406ea7ca', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('religionSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('religionSelectTemplateBox').innerHTML = html;
});
form.render('select', 'religionSelectTemplateBox');
var selectObj = {};
selectObj['religion'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化婚姻状况下拉选择
function initMarriageStatusSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/91bdd01b-e9d2-4a2b-98b5-45e25d3cd8ae', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('marriageStatusSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('marriageStatusSelectTemplateBox').innerHTML = html;
});
form.render('select', 'marriageStatusSelectTemplateBox');
var selectObj = {};
selectObj['marriageStatus'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化社会保险情况下拉选择
function initSocialSecuritySelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/8b91f082-57d0-475c-aa86-665b9b28e12e', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('socialSecuritySelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('socialSecuritySelectTemplateBox').innerHTML = html;
});
form.render('select', 'socialSecuritySelectTemplateBox');
var selectObj = {};
selectObj['socialSecurity'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化健康状况下拉选择
function initHealthStatusSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/c32ecdca-c99e-478c-801d-f3c66a106042', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('healthStatusSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('healthStatusSelectTemplateBox').innerHTML = html;
});
form.render('select', 'healthStatusSelectTemplateBox');
var selectObj = {};
selectObj['healthStatus'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化与户主关系下拉选择
function initRelationshipSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/4c21d91a-d5e1-4cfc-a18a-d63272763cdb', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('relationshipSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('relationshipSelectTemplateBox').innerHTML = html;
});
form.render('select', 'relationshipSelectTemplateBox');
var selectObj = {};
selectObj['relationship'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化流动原因下拉选择
function initFlowReasonSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/1bc43423-37cf-44c9-99b1-963ac0ece09b', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('flowReasonSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('flowReasonSelectTemplateBox').innerHTML = html;
});
form.render('select', 'flowReasonSelectTemplateBox');
var selectObj = {};
selectObj['flowReason'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化老人类别下拉选择
function initOldageTypeSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/c0dfe952-55d0-494f-8e55-24be6471b72e', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('oldageTypeSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('oldageTypeSelectTemplateBox').innerHTML = html;
});
form.render('select', 'oldageTypeSelectTemplateBox');
var selectObj = {};
selectObj['oldageType'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化生活照料情况下拉选择
function initOldageLiftSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/c176d9e1-3c3e-49ac-9c6a-b886dcf46a33', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('oldageLiftSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('oldageLiftSelectTemplateBox').innerHTML = html;
});
form.render('select', 'oldageLiftSelectTemplateBox');
var selectObj = {};
selectObj['oldageLift'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化健康状况下拉选择
function initOldageHealthStatusSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/c32ecdca-c99e-478c-801d-f3c66a106042', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('oldageHealthStatusSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('oldageHealthStatusSelectTemplateBox').innerHTML = html;
});
form.render('select', 'oldageHealthStatusSelectTemplateBox');
var selectObj = {};
selectObj['oldageHealthStatus'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化生活自理能力下拉选择
function initOldageSelfcareSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/cd70da85-02b5-4ab2-a952-ecd55b02ab75', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('oldageSelfcareSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('oldageSelfcareSelectTemplateBox').innerHTML = html;
});
form.render('select', 'oldageSelfcareSelectTemplateBox');
var selectObj = {};
selectObj['oldageSelfcare'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化居住状况下拉选择
function initOldageLiveSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/c3448e2e-098d-4125-b85a-ba5090b020b8', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('oldageLiveSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('oldageLiveSelectTemplateBox').innerHTML = html;
});
form.render('select', 'oldageLiveSelectTemplateBox');
var selectObj = {};
selectObj['oldageLive'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化残疾类别下拉选择
function initDisabilityTypeSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/6f108f64-efd3-4874-80d6-2db4501a0c26', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('disabilityTypeSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('disabilityTypeSelectTemplateBox').innerHTML = html;
});
form.render('select', 'disabilityTypeSelectTemplateBox');
var selectObj = {};
selectObj['disabilityType'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化残疾等级下拉选择
function initDisabilityLevelSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/a06ac7ee-6a88-48e2-8afb-3b03825363ff', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('disabilityLevelSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('disabilityLevelSelectTemplateBox').innerHTML = html;
});
form.render('select', 'disabilityLevelSelectTemplateBox');
var selectObj = {};
selectObj['disabilityLevel'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化收入情况下拉选择
function initDisabilityIncomeSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/79b14144-9d11-4574-a9f6-1bbc50350d21', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('disabilityIncomeSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('disabilityIncomeSelectTemplateBox').innerHTML = html;
});
form.render('select', 'disabilityIncomeSelectTemplateBox');
var selectObj = {};
selectObj['disabilityIncome'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化住房来源下拉选择
function initDisabilityHouseSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/a2274e03-35ab-4014-b887-858eab5f91a7', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('disabilityHouseSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('disabilityHouseSelectTemplateBox').innerHTML = html;
});
form.render('select', 'disabilityHouseSelectTemplateBox');
var selectObj = {};
selectObj['disabilityHouse'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化监护人关系下拉选择
function initDisabilityGuardianRelationSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/7f72a30e-27ff-42e1-9a33-5a5915bdf4bc', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('disabilityGuardianRelationSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('disabilityGuardianRelationSelectTemplateBox').innerHTML = html;
});
form.render('select', 'disabilityGuardianRelationSelectTemplateBox');
var selectObj = {};
selectObj['disabilityGuardianRelation'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化退出现役时职级下拉选择
function initMilitaryPositionSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/f6398a59-b2f8-4498-90b4-ae82c05903da', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('militaryPositionSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('militaryPositionSelectTemplateBox').innerHTML = html;
});
form.render('select', 'militaryPositionSelectTemplateBox');
var selectObj = {};
selectObj['militaryPosition'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 身份证号改变时发生
$('#idcard').on("input propertychange", function () {
var idCardNo = $(this).val();
if (idCardNo.length == 15 || idCardNo.length == 18) {
if (idCardNoUtil.checkIdCardNo(idCardNo)) {
//获取身份证信息
var idCardInfo = idCardNoUtil.getIdCardInfo(idCardNo);
$("#birthday").val(idCardInfo.birthday);
form.val('dataForm', {'sex': idCardInfo.gender});
}
}
});
$('.query-population').on("click", function () {
var population = $(this).data("population");
window.sessionStorage.setItem("tempQueryPopulationInfo", null);
top.layer.open({
type: 2,
title: "查找基础人口信息",
closeBtn: 1,
area: ['90%', '90%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/populationinfo/query', []),
end: function() {
try{
var data = window.sessionStorage.getItem("tempQueryPopulationInfo");
if(data != null && data != undefined && data != 'null') {
var dataObj = eval("(" + data + ")");
if($('#idcard').val() == dataObj.idcard) {
top.layer.msg("不能这么个填哇!");
return;
}
if(population == 'mother' && dataObj.sex.indexOf("女") == -1) {
top.layer.msg("不能这么个填哇!");
return;
}
if(population == 'father' && dataObj.sex.indexOf("男") == -1) {
top.layer.msg("不能这么个填哇!");
return;
}
$("#" + population + "Id").val(dataObj.populationInfoId);
$("#" + population + "Name").val(dataObj.name);
$("#" + population + "Idcard").val(dataObj.idcard);
$("#" + population + "Phone").val(dataObj.phone);
}
}catch(err){
top.layer.msg('查询失败');
}
}
});
});
$('.clear-population').on("click", function () {
var population = $(this).data("population");
$("#" + population + "Id").val("");
$("#" + population + "Name").val("");
$("#" + population + "Idcard").val("");
$("#" + population + "Phone").val("");
});
function initPageData(data) {
var dataFormData = {};
for(var i in data) {
dataFormData[i] = data[i] +'';
}
form.val('dataForm', dataFormData);
form.render(null, 'dataForm');
initIdcardTypeSelect(data['idcardType']);
initSexSelect(data['sex']);
initNationSelect(data['nation']);
initLabelSelect(data['label']);
initEducationSelect(data['education']);
initOrganizationSelect(data['organization']);
initReligionSelect(data['religion']);
initMarriageStatusSelect(data['marriageStatus']);
initSocialSecuritySelect(data['socialSecurity']);
initHealthStatusSelect(data['healthStatus']);
initRelationshipSelect(data['relationship']);
initFlowReasonSelect(data['flowReason']);
initOldageTypeSelect(data['oldageType']);
initOldageLiftSelect(data['oldageLift']);
initOldageHealthStatusSelect(data['oldageHealthStatus']);
initOldageSelfcareSelect(data['oldageSelfcare']);
initOldageLiveSelect(data['oldageLive']);
initDisabilityTypeSelect(data['disabilityType']);
initDisabilityLevelSelect(data['disabilityLevel']);
initDisabilityIncomeSelect(data['disabilityIncome']);
initDisabilityHouseSelect(data['disabilityHouse']);
initDisabilityGuardianRelationSelect(data['disabilityGuardianRelation']);
initMilitaryPositionSelect(data['militaryPosition']);
// 初始化出生日期
initBirthday(data['birthday']);
// 初始化婚变日期
initMarriageChangeTime(data['marriageChangeTime']);
// 初始化初婚日期
initMarriageFirstTime(data['marriageFirstTime']);
// 初始化流动日期
initFlowTime(data['flowTime']);
// 初始化残疾人办证时间
initDisabilityTime(data['disabilityTime']);
// 初始化批准退出现役日期
initMilitaryTime(data['militaryTime']);
// 初始化批准退出现役日期
initPartyTime(data['partyTime']);
}
// 提交表单
form.on('submit(submitTempForm)', function(formData) {
try{
window.localStorage.setItem("tempSavePopulation", JSON.stringify(formData.field));
layer.msg("暂存内容已更新");
}catch(err){
layer.msg("您的浏览器不支持暂存内容");
}
});
// 提交表单
form.on('submit(submitForm)', function(formData) {
top.dialog.confirm(top.dataMessage.commit, function(index) {
top.dialog.close(index);
var loadLayerIndex;
formData.field['label'] = top.restAjax.checkBoxToString(formData.field, 'label');
top.restAjax.post(top.restAjax.path('api/populationinfo/save', []), formData.field, null, function(code, data) {
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
time: 0,
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
shade: 0.3,
yes: function(index) {
top.dialog.close(index);
window.location.reload();
},
btn2: function() {
closeBox();
}
});
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
});
return false;
});
$('.close').on('click', function() {
closeBox();
});
// 校验
form.verify({
});
});
</script>
</body>
</html>