2023-01-31 11:45:04 +08:00

572 lines
31 KiB
HTML

{extend name="common/base"/}
{block name="style"}
<style type="text/css">
.editormd-code-toolbar select {
display: inline-block
}
.editormd li {
list-style: inherit;
}
</style>
{/block}
<!-- 主体 -->
{block name="body"}
<div class="layui-form p-4">
<h3 class="pb-3">用户信息</h3>
<div class="layui-tab layui-tab-card">
<ul class="layui-tab-title">
<li class="layui-this">个人信息</li>
<!-- <li>家庭信息</li> -->
<li>种植信息</li>
<li>保险信息</li>
<li>健康信息</li>
</ul>
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
<form class="layui-form p-4">
<div class="layui-form-item">
<label class="layui-form-label">用户</label>
<div class="layui-input-block">
<input type="text" value="{$user.name}" autocomplete="off" class="layui-input" disabled>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">民族</label>
<div class="layui-input-block">
<select name="nation" lay-verify="required">
{volist name='all_category' id='vo'}
{if $vo.type == 'nation'}
<option value="{$vo.id}" {if $vo.id==$user['nation']} selected{/if}>{$vo.name}</option>
{/if}
{/volist}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">婚姻情况</label>
<div class="layui-input-block">
<select name="marital_status" lay-verify="required">
{volist name='all_category' id='vo'}
{if $vo.type == 'marriage'}
<option value="{$vo.id}" {if $vo.id==$user['marital_status']} selected{/if}>{$vo.name}
</option>
{/if}
{/volist}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">政治面貌</label>
<div class="layui-input-block">
<select name="political_outlook" lay-verify="required">
{volist name='all_category' id='vo'}
{if $vo.type == 'zzmm'}
<option value="{$vo.id}" {if $vo.id==$user['political_outlook']} selected{/if}>
{$vo.name}</option>
{/if}
{/volist}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">手机号码</label>
<div class="layui-input-block">
<input type="text" name="phone" value="{$user.phone}" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">身份证号</label>
<div class="layui-input-block">
<input type="text" name="idcard" value="{$user.idcard}" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">性别</label>
<div class="layui-input-block">
<select name="gender" lay-verify="required">
<option value="1" {if 1==$user['gender']} selected{/if}></option>
<option value="2" {if 2==$user['gender']} selected{/if}></option>
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">年龄</label>
<div class="layui-input-block">
<input type="text" value="{$user.age}" name="age" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">文化程度</label>
<div class="layui-input-block">
<select name="education" lay-verify="required">
{volist name='all_category' id='vo'}
{if $vo.type == 'education'}
<option value="{$vo.id}" {if $vo.id==$user['education']} selected{/if}>{$vo.name}
</option>
{/if}
{/volist}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">职业</label>
<div class="layui-input-block">
<select name="occupation" lay-verify="required">
{volist name='all_category' id='vo'}
{if $vo.type == 'occupation'}
<option value="{$vo.id}" {if $vo.id==$user['occupation']} selected{/if}>{$vo.name}
</option>
{/if}
{/volist}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">房屋情况</label>
<div class="layui-input-block">
<select name="house_msg" lay-verify="required">
{volist name='all_category' id='vo'}
{if $vo.type == 'house'}
<option value="{$vo.id}" {if $vo.id==$user['house_msg']} selected{/if}>{$vo.name}
</option>
{/if}
{/volist}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">车辆情况</label>
<div class="layui-input-block">
<select name="car_msg" lay-verify="required">
{volist name='all_category' id='vo'}
{if $vo.type == 'car'}
<option value="{$vo.id}" {if $vo.id==$user['car_msg']} selected{/if}>{$vo.name}</option>
{/if}
{/volist}
</select>
</div>
</div>
<div class="pt-3">
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform1">立即提交</button>
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
</div>
</form>
</div>
<div class="layui-tab-item">
<form class="layui-form p-4">
<div class="layui-form-item">
<label class="layui-form-label">土地外租</label>
<div class="layui-input-block">
<select name="is_wz" class="form-control selectpicker">
<option value=""></option>
<option value="1" {if $planting['is_wz']==1} selected {/if}></option>
<option value="0" {if $planting['is_wz']==0} selected {/if}></option>
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">土地性质</label>
<div class="layui-input-block">
<select name="nature_of_land" class="form-control selectpicker">
<option value=""></option>
{volist name="all_category" id="vo"}
{if $vo.type == 'nature_of_land'}
<option value="{$vo.id}" {if $vo.id eq $planting['nature_of_land']} selected {/if}>{$vo.name}</option>
{/if}
{/volist}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">土地面积</label>
<div class="layui-input-block">
<input type="text" name="land_area" value="{$planting['land_area']}" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item" id="nzw">
<label class="layui-form-label">农作物信息</label>
{volist name="planting.crops_msg" key="key" id="vo"}
<div2 class="aa" {if $key==1} style="display: inline-block;" {else} style="display: inline-block;margin-left: 100px;" {/if}>
<div class="layui-input-inline">
农作物名称 <input type="text" name="crops_msg[{$key-1}][name]" autocomplete="off" class="layui-input" value="{$vo.name}">
</div>
<div class="layui-input-inline">
数量 <input type="text" name="crops_msg[{$key-1}][num]" autocomplete="off" class="layui-input" value="{$vo.num}">
</div>
<div class="layui-input-inline">
面积 <input type="text" name="crops_msg[{$key-1}][mianji]" autocomplete="off" class="layui-input" value="{$vo.mianji}">
</div>
<button type="button" class="layui-btn layui-btn-normal a2" style="position: relative; top:18px">删除</button>
</div2>
{/volist}
<button type="button" class="layui-btn layui-btn-normal" id="a1" style="display: block; margin-left: 100px;">添加</button>
</div>
<div class="pt-3">
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform2">立即提交</button>
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
</div>
</form>
</div>
<div class="layui-tab-item">
<form class="layui-form p-4">
<div class="layui-form-item">
<label class="layui-form-label">养老保险状态</label>
<div class="layui-input-block">
<select name="endowment_insurance_status" class="form-control selectpicker" >
<option value=""></option>
<option value="1" {if $insurancearr.endowment_insurance_status ==1} selected {/if}>已交</option>
<option value="2" {if $insurancearr.endowment_insurance_status ==2} selected {/if}>未交</option>
<option value="3" {if $insurancearr.endowment_insurance_status ==3} selected {/if}>代缴</option>
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">参保类型</label>
<div class="layui-input-block">
<select name="insurance_type" class="form-control selectpicker" >
<option value=""></option>
{foreach name="all_category" item="vo"}
{if $vo.type == 'Medical_insurance_type'}
<option value="{$vo.id}" {if $vo.id eq $insurancearr.insurance_type} selected {/if}>{$vo.name}</option>
{/if}
{/foreach}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">是否残疾</label>
<div class="layui-input-block">
<select name="whether_disabled" class="form-control selectpicker" >
<option value=""></option>
{foreach name="all_category" item="vo"}
{if $vo.type == 'whether_disabled'}
<option value="{$vo.id}" {if $vo.id eq $insurancearr.whether_disabled} selected {/if}>{$vo.name}</option>
{/if}
{/foreach}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">残疾证号</label>
<div class="layui-input-block">
<input type="text" value="{$insurancearr['disability_num']}" autocomplete="off" class="layui-input" name="disability_num">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">残疾等级</label>
<div class="layui-input-block">
<select name="disability_type" class="form-control selectpicker" >
<option value=""></option>
{foreach name="all_category" item="vo"}
{if $vo.type == 'grade'}
<option value="{$vo.id}" {if $vo.id eq $insurancearr.disability_level} selected {/if}>{$vo.name}</option>
{/if}
{/foreach}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">农业保险</label>
<div class="layui-input-block">
<select name="ny_insurance" class="form-control selectpicker" >
<option value=""></option>
{foreach name="all_category" item="vo"}
{if $vo.type == 'Insurance' && $vo.pid == 194}
<option value="{$vo.id}" {if $vo.id eq $insurancearr.ny_insurance} selected {/if}>{$vo.name}</option>
{/if}
{/foreach}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">商业保险</label>
<div class="layui-input-block">
<select name="sy_insurance" class="form-control selectpicker" >
<option value=""></option>
{foreach name="all_category" item="vo"}
{if $vo.type == 'Insurance' && $vo.pid == 193}
<option value="{$vo.id}" {if $vo.id eq $insurancearr.sy_insurance} selected {/if}>{$vo.name}</option>
{/if}
{/foreach}
</select>
</div>
</div>
<div class="pt-3">
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform3">立即提交</button>
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
</div>
</form>
</div>
<div class="layui-tab-item">
<form class="layui-form p-4">
<div class="layui-form-item">
<label class="layui-form-label">血型</label>
<div class="layui-input-block">
<select name="blood_type" class="form-control selectpicker" >
<option value=""></option>
{foreach name="all_category" item="vo"}
{if $vo.type == 'blood_type'}
<option value="{$vo.id}" {if $healthyarr.blood_type ==$vo.id} selected {/if} >{$vo.name}</option>
{/if}
{/foreach}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">药物过敏史</label>
<div class="layui-input-block">
<select name="drug_allergy" class="form-control selectpicker" >
<option value=""></option>
{foreach name="all_category" item="vo"}
{if $vo.type == 'drug_allergy'}
<option value="{$vo.id}" {if $healthyarr.drug_allergy ==$vo.id} selected {/if}>{$vo.name}</option>
{/if}
{/foreach}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">暴露史</label>
<div class="layui-input-block">
<select name="exposure_history" class="form-control selectpicker" >
<option value=""></option>
{foreach name="all_category" item="vo"}
{if $vo.type == 'drug_allergy'}
<option value="{$vo.id}" {if $healthyarr.exposure_history ==$vo.id} selected {/if}>{$vo.name}</option>
{/if}
{/foreach}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">疾病史</label>
<div class="layui-input-block">
<select name="history_of_disease" class="form-control selectpicker" >
<option value=""></option>
{foreach name="all_category" item="vo"}
{if $vo.type == 'history_of_disease'}
<option value="{$vo.id}" {if $healthyarr.history_of_disease ==$vo.id} selected {/if}>{$vo.name}</option>
{/if}
{/foreach}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">手术史</label>
<div class="layui-input-block">
<select name="history_of_surgery" class="form-control selectpicker" >
<option value=""></option>
<option value="1" {if $healthyarr.history_of_surgery ==1} selected {/if}></option>
<option value="0" {if $healthyarr.history_of_surgery ==0} selected {/if}></option>
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">家族史</label>
<div class="layui-input-block">
<select name="family_history" class="form-control selectpicker" >
<option value=""></option>
{foreach name="all_category" item="vo"}
{if $vo.type == 'familyHistory'}
<option value="{$vo.id}" {if $healthyarr.family_history ==$vo.id} selected {/if}>{$vo.name}</option>
{/if}
{/foreach}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">家族疾病</label>
<div class="layui-input-block">
<select name="familial_diseases" class="form-control selectpicker" >
<option value=""></option>
{foreach name="all_category" item="vo"}
{if $vo.type == 'history_of_disease'}
<option value="{$vo.id}" {if $healthyarr.familial_diseases ==$vo.id} selected {/if}>{$vo.name}</option>
{/if}
{/foreach}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">遗传病史</label>
<div class="layui-input-block">
<select name="genetic_history" class="form-control selectpicker" >
<option value=""></option>
{foreach name="all_category" item="vo"}
{if $vo.type == 'history_of_disease'}
<option value="{$vo.id}" {if $healthyarr.genetic_history ==$vo.id} selected {/if} >{$vo.name}</option>
{/if}
{/foreach}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">疾病名称</label>
<div class="layui-input-block">
<select name="genetic_name" class="form-control selectpicker" >
<option value=""></option>
{foreach name="all_category" item="vo"}
{if $vo.type == 'history_of_disease'}
<option value="{$vo.id}" {if $healthyarr.genetic_name ==$vo.id} selected {/if}>{$vo.name}</option>
{/if}
{/foreach}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">厨房排风设施</label>
<div class="layui-input-block">
<select name="cfpfss" class="form-control selectpicker" >
<option value=""></option>
{foreach name="all_category" item="vo"}
{if $vo.type == 'cfpfss'}
<option value="{$vo.id}" {if $healthyarr.cfpfss ==$vo.id} selected {/if}>{$vo.name}</option>
{/if}
{/foreach}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">燃料类型</label>
<div class="layui-input-block">
<select name="fuel_type" class="form-control selectpicker" >
<option value=""></option>
{foreach name="all_category" item="vo"}
{if $vo.type == 'fuel_type'}
<option value="{$vo.id}" {if $healthyarr.fuel_type ==$vo.id} selected {/if} >{$vo.name}</option>
{/if}
{/foreach}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">饮水情况</label>
<div class="layui-input-block">
<select name="drinking_water" class="form-control selectpicker" >
<option value=""></option>
{foreach name="all_category" item="vo"}
{if $vo.type == 'drinking_water'}
<option value="{$vo.id}" {if $healthyarr.drinking_water ==$vo.id} selected {/if}>{$vo.name}</option>
{/if}
{/foreach}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">厕所情况</label>
<div class="layui-input-block">
<select name="toilet_msg" class="form-control selectpicker" >
<option value=""></option>
{foreach name="all_category" item="vo"}
{if $vo.type == 'toilet_msg'}
<option value="{$vo.id}" {if $healthyarr.toilet_msg ==$vo.id} selected {/if}>{$vo.name}</option>
{/if}
{/foreach}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">禽畜栏</label>
<div class="layui-input-block">
<select name="poultry_corral" class="form-control selectpicker" >
<option value=""></option>
{foreach name="all_category" item="vo"}
{if $vo.type == 'poultry_corral'}
<option value="{$vo.id}" {if $healthyarr.poultry_corral ==$vo.id} selected {/if}>{$vo.name}</option>
{/if}
{/foreach}
</select>
</div>
</div>
<div class="pt-3">
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform4">立即提交</button>
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
</div>
</form>
</div>
<div class="layui-tab-item">
5
</div>
</div>
</div>
{/block}
<!-- /主体 -->
<!-- 脚本 -->
{block name="script"}
<script>
var moduleInit = ['tool'];
function ceshi(e){
$(e).parent().remove();
}
function gouguInit () {
var form = layui.form, tool = layui.tool;
var htmlid= $("#nzw").children("div2").length;
$("#a1").on("click", function(e) {
var html=`
<div2 id="aa`+htmlid+`" class="aa`+htmlid+`" style="display: inline-block;
margin-left: 100px;">
<div class="layui-input-inline">
农作物名称 <input type="text" name="crops_msg[`+htmlid+`][name]" autocomplete="off" class="layui-input">
</div>
<div class="layui-input-inline">
数量 <input type="text" name="crops_msg[`+htmlid+`][num]" autocomplete="off" class="layui-input">
</div>
<div class="layui-input-inline">
面积 <input type="text" name="crops_msg[`+htmlid+`][mianji]" autocomplete="off" class="layui-input">
</div>
<div class="layui-btn layui-btn-normal" onclick="ceshi(this)" style="position: relative;top:18px">删除</div>
</div2>
`
$("#nzw").append(html);
++htmlid
});
//监听提交
form.on('submit(webform1)', function (data) {
let callback = function (e) {
layer.msg(e.msg);
if (e.code == 0) {
tool.sideClose(1000);
}
}
tool.post("{$url[6]}?type=1&user_id={$user_id}", data.field, callback);
return false;
});
form.on('submit(webform2)', function (data) {
let callback = function (e) {
layer.msg(e.msg);
if (e.code == 0) {
tool.sideClose(1000);
}
}
tool.post("{$url[6]}?type=2&user_id={$user_id}", data.field, callback);
return false;
});
form.on('submit(webform3)', function (data) {
let callback = function (e) {
layer.msg(e.msg);
if (e.code == 0) {
tool.sideClose(1000);
}
}
tool.post("{$url[6]}?type=3&user_id={$user_id}", data.field, callback);
return false;
});
form.on('submit(webform4)', function (data) {
let callback = function (e) {
layer.msg(e.msg);
if (e.code == 0) {
tool.sideClose(1000);
}
}
tool.post("{$url[6]}?type=4&user_id={$user_id}", data.field, callback);
return false;
});
}
</script>
{/block}
<!-- /脚本 -->