select框类型的数据保存为汉字。
This commit is contained in:
parent
fe428cfd8d
commit
31b6ea7f05
@ -12,7 +12,7 @@
|
||||
<result column="id_card_of_householder" property="idCardOfHouseholder"/>
|
||||
<result column="id_card_of_householder" property="idCardOfHouseholder"/>
|
||||
<result column="people_same_census" property="peopleSameCensus"/>
|
||||
<result column="relationship_with_householder_dictionary_name" property="relationshipWithHouseholderDictionaryName"/>
|
||||
<result column="relationship_with_householder" property="relationshipWithHouseholder"/>
|
||||
<result column="full_name" property="fullName"/>
|
||||
<result column="gender" property="gender"/>
|
||||
<result column="telephone" property="telephone"/>
|
||||
@ -153,7 +153,6 @@
|
||||
t1.census_number,
|
||||
t1.id_card_of_householder,
|
||||
t1.relationship_with_householder,
|
||||
dt1.dictionary_name relationship_with_householder_dictionary_name,
|
||||
t1.people_same_census,
|
||||
t1.census_msg_id,
|
||||
t1.base_id,
|
||||
@ -165,12 +164,6 @@
|
||||
t2.current_residence
|
||||
FROM
|
||||
gen_census_msg t1
|
||||
LEFT JOIN
|
||||
data_dictionary dt1
|
||||
ON
|
||||
dt1.dictionary_id = t1.relationship_with_householder
|
||||
AND
|
||||
dt1.is_delete = 0
|
||||
LEFT JOIN gen_base_population_info t2 ON t1.base_id = t2.base_population_info_id AND t2.is_delete = 0
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
|
@ -212,7 +212,6 @@
|
||||
t1.people_same_census,
|
||||
t1.leading_name,
|
||||
t1.home_person_id,
|
||||
t2.dictionary_name AS relationship_with_home_people_name,
|
||||
t3.id_card_number,
|
||||
t3.full_name,
|
||||
t3.gender,
|
||||
@ -221,7 +220,6 @@
|
||||
t3.current_residence
|
||||
FROM
|
||||
gen_home_person t1
|
||||
LEFT JOIN data_dictionary t2 ON t1.relationship_with_home_people = t2.dictionary_id
|
||||
LEFT JOIN gen_base_population_info t3 ON t1.base_id = t3.base_population_info_id AND t3.is_delete = 0
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
|
@ -212,7 +212,6 @@
|
||||
t1.guardian_address,
|
||||
t1.guardian_phone,
|
||||
t1.key_teenagers_id,
|
||||
dt1.dictionary_name relationship_with_guardian_name,
|
||||
t2.full_name,
|
||||
t2.gender,
|
||||
t2.telephone,
|
||||
@ -220,7 +219,6 @@
|
||||
t2.current_residence
|
||||
FROM
|
||||
gen_key_teenagers t1
|
||||
LEFT JOIN data_dictionary dt1 ON dt1.dictionary_id = t1.relationship_with_guardian AND dt1.is_delete = 0
|
||||
LEFT JOIN gen_base_population_info t2 ON t1.base_id = t2.base_population_info_id AND t2.is_delete = 0
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
|
@ -223,7 +223,6 @@
|
||||
t1.to_china_purpose,
|
||||
t1.service_address,
|
||||
t1.nationality,
|
||||
t2.dictionary_name AS nationality_name,
|
||||
t1.card_year,
|
||||
t1.card_number,
|
||||
t1.leave_date,
|
||||
@ -244,7 +243,6 @@
|
||||
t1.overseas_personnel_id
|
||||
FROM
|
||||
gen_overseas_personnel t1
|
||||
LEFT JOIN data_dictionary t2 ON t1.nationality = t2.dictionary_id
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="keywords != null and keywords != ''">
|
||||
|
@ -21,7 +21,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm" id="dataForm">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
@ -127,7 +127,7 @@
|
||||
<select id="relationshipWithHouseholder" name="relationshipWithHouseholder" lay-verify="required">
|
||||
<option value="">请选择与户主关系</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
@ -252,10 +252,22 @@
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
|
||||
initData();
|
||||
|
||||
function valueFun(formData) {
|
||||
$("#dataForm").find('select').each(function(){
|
||||
var value;
|
||||
var selId;
|
||||
value = $(this).find('option:selected').text();
|
||||
selId = $(this).attr('id');
|
||||
formData.field['' + selId] = value;
|
||||
});
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
valueFun(formData);
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
|
@ -21,7 +21,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm" id="dataForm">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
@ -127,7 +127,7 @@
|
||||
<select id="relationshipWithHouseholder" name="relationshipWithHouseholder" lay-verify="required">
|
||||
<option value="">请选择与户主关系</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
@ -226,6 +226,24 @@
|
||||
});
|
||||
}
|
||||
|
||||
function backData(data) {
|
||||
$("#dataForm").find('select').each(function(){
|
||||
var selId;
|
||||
selId = $(this).attr('id');
|
||||
$('#' + selId + ' option').each(function () {
|
||||
for(var key in data) {
|
||||
if(key == selId) {
|
||||
if ($(this).text() == data[key]) {
|
||||
var val = $(this).val();
|
||||
var select = 'dd[lay-value=' + val + ']';
|
||||
$('#' + key).siblings("div.layui-form-select").find('dl').find(select).click();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
$('#submitBtn').addClass("layui-btn-disabled").attr("disabled",true);
|
||||
@ -239,6 +257,7 @@
|
||||
form.render(null, 'dataForm');
|
||||
initRelationshipWithHouseholderSelect(data['relationshipWithHouseholder']);
|
||||
queryBasePopulationInfo(data['idCardNumber']);
|
||||
backData(data);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
@ -249,8 +268,19 @@
|
||||
}
|
||||
initData();
|
||||
|
||||
function valueFun(formData) {
|
||||
$("#dataForm").find('select').each(function(){
|
||||
var value;
|
||||
var selId;
|
||||
value = $(this).find('option:selected').text();
|
||||
selId = $(this).attr('id');
|
||||
formData.field['' + selId] = value;
|
||||
});
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
valueFun(formData);
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
|
@ -21,7 +21,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm" id="dataForm">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
@ -273,8 +273,19 @@
|
||||
}
|
||||
initData();
|
||||
|
||||
function valueFun(formData) {
|
||||
$("#dataForm").find('select').each(function(){
|
||||
var value;
|
||||
var selId;
|
||||
value = $(this).find('option:selected').text();
|
||||
selId = $(this).attr('id');
|
||||
formData.field['' + selId] = value;
|
||||
});
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
valueFun(formData);
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
|
@ -21,7 +21,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm" id="dataForm">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
@ -241,6 +241,24 @@
|
||||
});
|
||||
}
|
||||
|
||||
function backData(data) {
|
||||
$("#dataForm").find('select').each(function(){
|
||||
var selId;
|
||||
selId = $(this).attr('id');
|
||||
$('#' + selId + ' option').each(function () {
|
||||
for(var key in data) {
|
||||
if(key == selId) {
|
||||
if ($(this).text() == data[key]) {
|
||||
var val = $(this).val();
|
||||
var select = 'dd[lay-value=' + val + ']';
|
||||
$('#' + key).siblings("div.layui-form-select").find('dl').find(select).click();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
$('#submitBtn').addClass("layui-btn-disabled").attr("disabled",true);
|
||||
@ -255,6 +273,7 @@
|
||||
initCardExpireDateDateTime();
|
||||
initRegisterDateDateTime();
|
||||
queryBasePopulationInfo(data['idCardNumber']);
|
||||
backData(data);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
@ -263,10 +282,22 @@
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
|
||||
initData();
|
||||
|
||||
function valueFun(formData) {
|
||||
$("#dataForm").find('select').each(function(){
|
||||
var value;
|
||||
var selId;
|
||||
value = $(this).find('option:selected').text();
|
||||
selId = $(this).attr('id');
|
||||
formData.field['' + selId] = value;
|
||||
});
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
valueFun(formData);
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
|
@ -21,7 +21,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm" id="dataForm">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
@ -118,7 +118,7 @@
|
||||
<select id="relationshipWithHomePeople" name="relationshipWithHomePeople" lay-verify="required">
|
||||
<option value="">请选择与留守人员关系</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
@ -318,8 +318,19 @@
|
||||
|
||||
initData();
|
||||
|
||||
function valueFun(formData) {
|
||||
$("#dataForm").find('select').each(function(){
|
||||
var value;
|
||||
var selId;
|
||||
value = $(this).find('option:selected').text();
|
||||
selId = $(this).attr('id');
|
||||
formData.field['' + selId] = value;
|
||||
});
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
valueFun(formData);
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
|
@ -21,7 +21,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm" id="dataForm">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
@ -118,7 +118,7 @@
|
||||
<select id="relationshipWithHomePeople" name="relationshipWithHomePeople" lay-verify="required">
|
||||
<option value="">请选择与留守人员关系</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
@ -291,6 +291,24 @@
|
||||
});
|
||||
}
|
||||
|
||||
function backData(data) {
|
||||
$("#dataForm").find('select').each(function(){
|
||||
var selId;
|
||||
selId = $(this).attr('id');
|
||||
$('#' + selId + ' option').each(function () {
|
||||
for(var key in data) {
|
||||
if(key == selId) {
|
||||
if ($(this).text() == data[key]) {
|
||||
var val = $(this).val();
|
||||
var select = 'dd[lay-value=' + val + ']';
|
||||
$('#' + key).siblings("div.layui-form-select").find('dl').find(select).click();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
$('#submitBtn').addClass("layui-btn-disabled").attr("disabled",true);
|
||||
@ -304,6 +322,7 @@
|
||||
form.render(null, 'dataForm');
|
||||
initRelationshipWithHomePeopleSelect(data['relationshipWithHomePeople']);
|
||||
queryBasePopulationInfo(data['idCardNumber']);
|
||||
backData(data);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
@ -312,10 +331,22 @@
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
|
||||
initData();
|
||||
|
||||
function valueFun(formData) {
|
||||
$("#dataForm").find('select').each(function(){
|
||||
var value;
|
||||
var selId;
|
||||
value = $(this).find('option:selected').text();
|
||||
selId = $(this).attr('id');
|
||||
formData.field['' + selId] = value;
|
||||
});
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
valueFun(formData);
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
|
@ -21,7 +21,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm" id="dataForm">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
@ -140,7 +140,7 @@
|
||||
<select id="relationshipWithGuardian" name="relationshipWithGuardian" lay-verify="required">
|
||||
<option value="">请选择与监护人关系</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
@ -320,10 +320,22 @@
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
|
||||
initData();
|
||||
|
||||
function valueFun(formData) {
|
||||
$("#dataForm").find('select').each(function(){
|
||||
var value;
|
||||
var selId;
|
||||
value = $(this).find('option:selected').text();
|
||||
selId = $(this).attr('id');
|
||||
formData.field['' + selId] = value;
|
||||
});
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
valueFun(formData);
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
|
@ -21,7 +21,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm" id="dataForm">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item">
|
||||
@ -140,7 +140,7 @@
|
||||
<select id="relationshipWithGuardian" name="relationshipWithGuardian" lay-verify="required">
|
||||
<option value="">请选择与监护人关系</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
@ -293,6 +293,24 @@
|
||||
});
|
||||
}
|
||||
|
||||
function backData(data) {
|
||||
$("#dataForm").find('select').each(function(){
|
||||
var selId;
|
||||
selId = $(this).attr('id');
|
||||
$('#' + selId + ' option').each(function () {
|
||||
for(var key in data) {
|
||||
if(key == selId) {
|
||||
if ($(this).text() == data[key]) {
|
||||
var val = $(this).val();
|
||||
var select = 'dd[lay-value=' + val + ']';
|
||||
$('#' + key).siblings("div.layui-form-select").find('dl').find(select).click();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
$('#submitBtn').addClass("layui-btn-disabled").attr("disabled",true);
|
||||
@ -306,6 +324,7 @@
|
||||
form.render(null, 'dataForm');
|
||||
initRelationshipWithGuardianSelect(data['relationshipWithGuardian']);
|
||||
queryBasePopulationInfo(data['idCardNumber']);
|
||||
backData(data);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
@ -314,10 +333,22 @@
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
|
||||
initData();
|
||||
|
||||
function valueFun(formData) {
|
||||
$("#dataForm").find('select').each(function(){
|
||||
var value;
|
||||
var selId;
|
||||
value = $(this).find('option:selected').text();
|
||||
selId = $(this).attr('id');
|
||||
formData.field['' + selId] = value;
|
||||
});
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
valueFun(formData);
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
|
@ -21,7 +21,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm" id="dataForm">
|
||||
<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg6">
|
||||
<label class="layui-form-label"><span style="color:red;">*</span>外文姓</label>
|
||||
@ -70,7 +70,7 @@
|
||||
<select id="nationality" name="nationality" lay-verify="required">
|
||||
<option value="">请选择国籍(地区)</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
@ -84,7 +84,7 @@
|
||||
<select id="religiousBelief" name="religiousBelief" lay-verify="required">
|
||||
<option value="">请选择宗教信仰</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
@ -96,7 +96,7 @@
|
||||
<select id="cardCode" name="cardCode" lay-verify="required">
|
||||
<option value="">请选择证件代码</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
@ -384,10 +384,22 @@
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
|
||||
initData();
|
||||
|
||||
function valueFun(formData) {
|
||||
$("#dataForm").find('select').each(function(){
|
||||
var value;
|
||||
var selId;
|
||||
value = $(this).find('option:selected').text();
|
||||
selId = $(this).attr('id');
|
||||
formData.field['' + selId] = value;
|
||||
});
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
valueFun(formData);
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
|
@ -21,7 +21,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm" id="dataForm">
|
||||
<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg6">
|
||||
<label class="layui-form-label"><span style="color:red;">*</span>外文姓</label>
|
||||
@ -70,7 +70,7 @@
|
||||
<select id="nationality" name="nationality" lay-verify="required">
|
||||
<option value="">请选择国籍(地区)</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
@ -84,7 +84,7 @@
|
||||
<select id="religiousBelief" name="religiousBelief" lay-verify="required">
|
||||
<option value="">请选择宗教信仰</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
@ -96,7 +96,7 @@
|
||||
<select id="cardCode" name="cardCode" lay-verify="required">
|
||||
<option value="">请选择证件代码</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
@ -219,64 +219,10 @@
|
||||
var laydate = layui.laydate;
|
||||
var overseasPersonnelId = top.restAjax.params(window.location.href).overseasPersonnelId;
|
||||
|
||||
var wangEditor = window.wangEditor;
|
||||
var wangEditorObj = {};
|
||||
var viewerObj = {};
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
function refreshDownloadTemplet(fileName, file) {
|
||||
var dataRander = {};
|
||||
dataRander[fileName] = file;
|
||||
|
||||
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
||||
document.getElementById(fileName +'FileBox').innerHTML = html;
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化文件列表
|
||||
function initFileList(fileName, ids, callback) {
|
||||
var dataForm = {};
|
||||
dataForm[fileName] = ids;
|
||||
form.val('dataForm', dataForm);
|
||||
|
||||
if(!ids) {
|
||||
refreshDownloadTemplet(fileName, []);
|
||||
if(callback) {
|
||||
callback(fileName, []);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
top.restAjax.get(top.restAjax.path('api/file/listfilebyfileid', []), {
|
||||
ids: ids
|
||||
}, null, function(code, data) {
|
||||
refreshDownloadTemplet(fileName, data);
|
||||
if(callback) {
|
||||
callback(fileName, data);
|
||||
}
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化视频
|
||||
function initVideo(fileName, data) {
|
||||
for(var i = 0, item; item = data[i++];) {
|
||||
var player = new ckplayer({
|
||||
container: '#'+ fileName + i,
|
||||
variable: 'player',
|
||||
flashplayer: false,
|
||||
video: {
|
||||
file: 'route/file/downloadfile/true/'+ item.fileId,
|
||||
type: 'video/mp4'
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化预计离开日期日期
|
||||
function initLeaveDateDate() {
|
||||
laydate.render({
|
||||
@ -371,6 +317,24 @@
|
||||
});
|
||||
}
|
||||
|
||||
function backData(data) {
|
||||
$("#dataForm").find('select').each(function(){
|
||||
var selId;
|
||||
selId = $(this).attr('id');
|
||||
$('#' + selId + ' option').each(function () {
|
||||
for(var key in data) {
|
||||
if(key == selId) {
|
||||
if ($(this).text() == data[key]) {
|
||||
var val = $(this).val();
|
||||
var select = 'dd[lay-value=' + val + ']';
|
||||
$('#' + key).siblings("div.layui-form-select").find('dl').find(select).click();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
var loadLayerIndex;
|
||||
@ -386,6 +350,7 @@
|
||||
initNationalitySelect(data['nationality']);
|
||||
initReligiousBeliefSelect(data['religiousBelief']);
|
||||
initCardCodeSelect(data['cardCode']);
|
||||
backData(data);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
@ -394,10 +359,22 @@
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
|
||||
initData();
|
||||
|
||||
function valueFun(formData) {
|
||||
$("#dataForm").find('select').each(function(){
|
||||
var value;
|
||||
var selId;
|
||||
value = $(this).find('option:selected').text();
|
||||
selId = $(this).attr('id');
|
||||
formData.field['' + selId] = value;
|
||||
});
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
valueFun(formData);
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
|
@ -21,7 +21,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm" id="dataForm">
|
||||
<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg6">
|
||||
<label class="layui-form-label">房屋编号</label>
|
||||
@ -67,7 +67,7 @@
|
||||
<select id="cardCode" name="cardCode" lay-verify="required">
|
||||
<option value="">请选择证件代码</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
@ -260,8 +260,19 @@
|
||||
map.addOverlay(marker);
|
||||
}
|
||||
|
||||
function valueFun(formData) {
|
||||
$("#dataForm").find('select').each(function(){
|
||||
var value;
|
||||
var selId;
|
||||
value = $(this).find('option:selected').text();
|
||||
selId = $(this).attr('id');
|
||||
formData.field['' + selId] = value;
|
||||
});
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
valueFun(formData);
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
|
@ -21,7 +21,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm" id="dataForm">
|
||||
<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg6">
|
||||
<label class="layui-form-label">房屋编号</label>
|
||||
@ -67,7 +67,7 @@
|
||||
<select id="cardCode" name="cardCode" lay-verify="required">
|
||||
<option value="">请选择证件代码</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
@ -219,6 +219,24 @@
|
||||
});
|
||||
}
|
||||
|
||||
function backData(data) {
|
||||
$("#dataForm").find('select').each(function(){
|
||||
var selId;
|
||||
selId = $(this).attr('id');
|
||||
$('#' + selId + ' option').each(function () {
|
||||
for(var key in data) {
|
||||
if(key == selId) {
|
||||
if ($(this).text() == data[key]) {
|
||||
var val = $(this).val();
|
||||
var select = 'dd[lay-value=' + val + ']';
|
||||
$('#' + key).siblings("div.layui-form-select").find('dl').find(select).click();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
var loadLayerIndex;
|
||||
@ -231,6 +249,7 @@
|
||||
form.render(null, 'dataForm');
|
||||
initCardCodeSelect(data['cardCode']);
|
||||
initMap(dataFormData['longitude'],dataFormData['latitude']);
|
||||
backData(data);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
@ -272,8 +291,19 @@
|
||||
map.addOverlay(marker);
|
||||
}
|
||||
|
||||
function valueFun(formData) {
|
||||
$("#dataForm").find('select').each(function(){
|
||||
var value;
|
||||
var selId;
|
||||
value = $(this).find('option:selected').text();
|
||||
selId = $(this).attr('id');
|
||||
formData.field['' + selId] = value;
|
||||
});
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
valueFun(formData);
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
|
Loading…
Reference in New Issue
Block a user