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="id_card_of_householder" property="idCardOfHouseholder"/>
|
<result column="id_card_of_householder" property="idCardOfHouseholder"/>
|
||||||
<result column="people_same_census" property="peopleSameCensus"/>
|
<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="full_name" property="fullName"/>
|
||||||
<result column="gender" property="gender"/>
|
<result column="gender" property="gender"/>
|
||||||
<result column="telephone" property="telephone"/>
|
<result column="telephone" property="telephone"/>
|
||||||
@ -153,7 +153,6 @@
|
|||||||
t1.census_number,
|
t1.census_number,
|
||||||
t1.id_card_of_householder,
|
t1.id_card_of_householder,
|
||||||
t1.relationship_with_householder,
|
t1.relationship_with_householder,
|
||||||
dt1.dictionary_name relationship_with_householder_dictionary_name,
|
|
||||||
t1.people_same_census,
|
t1.people_same_census,
|
||||||
t1.census_msg_id,
|
t1.census_msg_id,
|
||||||
t1.base_id,
|
t1.base_id,
|
||||||
@ -165,12 +164,6 @@
|
|||||||
t2.current_residence
|
t2.current_residence
|
||||||
FROM
|
FROM
|
||||||
gen_census_msg t1
|
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
|
LEFT JOIN gen_base_population_info t2 ON t1.base_id = t2.base_population_info_id AND t2.is_delete = 0
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
|
@ -212,7 +212,6 @@
|
|||||||
t1.people_same_census,
|
t1.people_same_census,
|
||||||
t1.leading_name,
|
t1.leading_name,
|
||||||
t1.home_person_id,
|
t1.home_person_id,
|
||||||
t2.dictionary_name AS relationship_with_home_people_name,
|
|
||||||
t3.id_card_number,
|
t3.id_card_number,
|
||||||
t3.full_name,
|
t3.full_name,
|
||||||
t3.gender,
|
t3.gender,
|
||||||
@ -221,7 +220,6 @@
|
|||||||
t3.current_residence
|
t3.current_residence
|
||||||
FROM
|
FROM
|
||||||
gen_home_person t1
|
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
|
LEFT JOIN gen_base_population_info t3 ON t1.base_id = t3.base_population_info_id AND t3.is_delete = 0
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
|
@ -212,7 +212,6 @@
|
|||||||
t1.guardian_address,
|
t1.guardian_address,
|
||||||
t1.guardian_phone,
|
t1.guardian_phone,
|
||||||
t1.key_teenagers_id,
|
t1.key_teenagers_id,
|
||||||
dt1.dictionary_name relationship_with_guardian_name,
|
|
||||||
t2.full_name,
|
t2.full_name,
|
||||||
t2.gender,
|
t2.gender,
|
||||||
t2.telephone,
|
t2.telephone,
|
||||||
@ -220,7 +219,6 @@
|
|||||||
t2.current_residence
|
t2.current_residence
|
||||||
FROM
|
FROM
|
||||||
gen_key_teenagers t1
|
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
|
LEFT JOIN gen_base_population_info t2 ON t1.base_id = t2.base_population_info_id AND t2.is_delete = 0
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
|
@ -223,7 +223,6 @@
|
|||||||
t1.to_china_purpose,
|
t1.to_china_purpose,
|
||||||
t1.service_address,
|
t1.service_address,
|
||||||
t1.nationality,
|
t1.nationality,
|
||||||
t2.dictionary_name AS nationality_name,
|
|
||||||
t1.card_year,
|
t1.card_year,
|
||||||
t1.card_number,
|
t1.card_number,
|
||||||
t1.leave_date,
|
t1.leave_date,
|
||||||
@ -244,7 +243,6 @@
|
|||||||
t1.overseas_personnel_id
|
t1.overseas_personnel_id
|
||||||
FROM
|
FROM
|
||||||
gen_overseas_personnel t1
|
gen_overseas_personnel t1
|
||||||
LEFT JOIN data_dictionary t2 ON t1.nationality = t2.dictionary_id
|
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
<if test="keywords != null and keywords != ''">
|
<if test="keywords != null and keywords != ''">
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-card-body" style="padding: 15px;">
|
<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-row">
|
||||||
<div class="layui-col-md3">
|
<div class="layui-col-md3">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
@ -127,7 +127,7 @@
|
|||||||
<select id="relationshipWithHouseholder" name="relationshipWithHouseholder" lay-verify="required">
|
<select id="relationshipWithHouseholder" name="relationshipWithHouseholder" lay-verify="required">
|
||||||
<option value="">请选择与户主关系</option>
|
<option value="">请选择与户主关系</option>
|
||||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||||
{{# } }}
|
{{# } }}
|
||||||
</select>
|
</select>
|
||||||
</script>
|
</script>
|
||||||
@ -252,10 +252,22 @@
|
|||||||
top.dialog.close(loadLayerIndex);
|
top.dialog.close(loadLayerIndex);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
initData();
|
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) {
|
form.on('submit(submitForm)', function(formData) {
|
||||||
|
valueFun(formData);
|
||||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-card-body" style="padding: 15px;">
|
<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-row">
|
||||||
<div class="layui-col-md3">
|
<div class="layui-col-md3">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
@ -127,7 +127,7 @@
|
|||||||
<select id="relationshipWithHouseholder" name="relationshipWithHouseholder" lay-verify="required">
|
<select id="relationshipWithHouseholder" name="relationshipWithHouseholder" lay-verify="required">
|
||||||
<option value="">请选择与户主关系</option>
|
<option value="">请选择与户主关系</option>
|
||||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||||
{{# } }}
|
{{# } }}
|
||||||
</select>
|
</select>
|
||||||
</script>
|
</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() {
|
function initData() {
|
||||||
$('#submitBtn').addClass("layui-btn-disabled").attr("disabled",true);
|
$('#submitBtn').addClass("layui-btn-disabled").attr("disabled",true);
|
||||||
@ -239,6 +257,7 @@
|
|||||||
form.render(null, 'dataForm');
|
form.render(null, 'dataForm');
|
||||||
initRelationshipWithHouseholderSelect(data['relationshipWithHouseholder']);
|
initRelationshipWithHouseholderSelect(data['relationshipWithHouseholder']);
|
||||||
queryBasePopulationInfo(data['idCardNumber']);
|
queryBasePopulationInfo(data['idCardNumber']);
|
||||||
|
backData(data);
|
||||||
}, function(code, data) {
|
}, function(code, data) {
|
||||||
top.dialog.msg(data.msg);
|
top.dialog.msg(data.msg);
|
||||||
}, function() {
|
}, function() {
|
||||||
@ -248,9 +267,20 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
initData();
|
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) {
|
form.on('submit(submitForm)', function(formData) {
|
||||||
|
valueFun(formData);
|
||||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-card-body" style="padding: 15px;">
|
<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-row">
|
||||||
<div class="layui-col-md3">
|
<div class="layui-col-md3">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
@ -273,8 +273,19 @@
|
|||||||
}
|
}
|
||||||
initData();
|
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) {
|
form.on('submit(submitForm)', function(formData) {
|
||||||
|
valueFun(formData);
|
||||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-card-body" style="padding: 15px;">
|
<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-row">
|
||||||
<div class="layui-col-md3">
|
<div class="layui-col-md3">
|
||||||
<div class="layui-form-item">
|
<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() {
|
function initData() {
|
||||||
$('#submitBtn').addClass("layui-btn-disabled").attr("disabled",true);
|
$('#submitBtn').addClass("layui-btn-disabled").attr("disabled",true);
|
||||||
@ -255,6 +273,7 @@
|
|||||||
initCardExpireDateDateTime();
|
initCardExpireDateDateTime();
|
||||||
initRegisterDateDateTime();
|
initRegisterDateDateTime();
|
||||||
queryBasePopulationInfo(data['idCardNumber']);
|
queryBasePopulationInfo(data['idCardNumber']);
|
||||||
|
backData(data);
|
||||||
}, function(code, data) {
|
}, function(code, data) {
|
||||||
top.dialog.msg(data.msg);
|
top.dialog.msg(data.msg);
|
||||||
}, function() {
|
}, function() {
|
||||||
@ -263,10 +282,22 @@
|
|||||||
top.dialog.close(loadLayerIndex);
|
top.dialog.close(loadLayerIndex);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
initData();
|
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) {
|
form.on('submit(submitForm)', function(formData) {
|
||||||
|
valueFun(formData);
|
||||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-card-body" style="padding: 15px;">
|
<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-row">
|
||||||
<div class="layui-col-md3">
|
<div class="layui-col-md3">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
@ -118,7 +118,7 @@
|
|||||||
<select id="relationshipWithHomePeople" name="relationshipWithHomePeople" lay-verify="required">
|
<select id="relationshipWithHomePeople" name="relationshipWithHomePeople" lay-verify="required">
|
||||||
<option value="">请选择与留守人员关系</option>
|
<option value="">请选择与留守人员关系</option>
|
||||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||||
{{# } }}
|
{{# } }}
|
||||||
</select>
|
</select>
|
||||||
</script>
|
</script>
|
||||||
@ -318,8 +318,19 @@
|
|||||||
|
|
||||||
initData();
|
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) {
|
form.on('submit(submitForm)', function(formData) {
|
||||||
|
valueFun(formData);
|
||||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-card-body" style="padding: 15px;">
|
<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-row">
|
||||||
<div class="layui-col-md3">
|
<div class="layui-col-md3">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
@ -118,7 +118,7 @@
|
|||||||
<select id="relationshipWithHomePeople" name="relationshipWithHomePeople" lay-verify="required">
|
<select id="relationshipWithHomePeople" name="relationshipWithHomePeople" lay-verify="required">
|
||||||
<option value="">请选择与留守人员关系</option>
|
<option value="">请选择与留守人员关系</option>
|
||||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||||
{{# } }}
|
{{# } }}
|
||||||
</select>
|
</select>
|
||||||
</script>
|
</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() {
|
function initData() {
|
||||||
$('#submitBtn').addClass("layui-btn-disabled").attr("disabled",true);
|
$('#submitBtn').addClass("layui-btn-disabled").attr("disabled",true);
|
||||||
@ -304,6 +322,7 @@
|
|||||||
form.render(null, 'dataForm');
|
form.render(null, 'dataForm');
|
||||||
initRelationshipWithHomePeopleSelect(data['relationshipWithHomePeople']);
|
initRelationshipWithHomePeopleSelect(data['relationshipWithHomePeople']);
|
||||||
queryBasePopulationInfo(data['idCardNumber']);
|
queryBasePopulationInfo(data['idCardNumber']);
|
||||||
|
backData(data);
|
||||||
}, function(code, data) {
|
}, function(code, data) {
|
||||||
top.dialog.msg(data.msg);
|
top.dialog.msg(data.msg);
|
||||||
}, function() {
|
}, function() {
|
||||||
@ -312,10 +331,22 @@
|
|||||||
top.dialog.close(loadLayerIndex);
|
top.dialog.close(loadLayerIndex);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
initData();
|
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) {
|
form.on('submit(submitForm)', function(formData) {
|
||||||
|
valueFun(formData);
|
||||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-card-body" style="padding: 15px;">
|
<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-row">
|
||||||
<div class="layui-col-md3">
|
<div class="layui-col-md3">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
@ -140,7 +140,7 @@
|
|||||||
<select id="relationshipWithGuardian" name="relationshipWithGuardian" lay-verify="required">
|
<select id="relationshipWithGuardian" name="relationshipWithGuardian" lay-verify="required">
|
||||||
<option value="">请选择与监护人关系</option>
|
<option value="">请选择与监护人关系</option>
|
||||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||||
{{# } }}
|
{{# } }}
|
||||||
</select>
|
</select>
|
||||||
</script>
|
</script>
|
||||||
@ -320,10 +320,22 @@
|
|||||||
top.dialog.close(loadLayerIndex);
|
top.dialog.close(loadLayerIndex);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
initData();
|
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) {
|
form.on('submit(submitForm)', function(formData) {
|
||||||
|
valueFun(formData);
|
||||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-card-body" style="padding: 15px;">
|
<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-row">
|
||||||
<div class="layui-col-md3">
|
<div class="layui-col-md3">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
@ -140,7 +140,7 @@
|
|||||||
<select id="relationshipWithGuardian" name="relationshipWithGuardian" lay-verify="required">
|
<select id="relationshipWithGuardian" name="relationshipWithGuardian" lay-verify="required">
|
||||||
<option value="">请选择与监护人关系</option>
|
<option value="">请选择与监护人关系</option>
|
||||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||||
{{# } }}
|
{{# } }}
|
||||||
</select>
|
</select>
|
||||||
</script>
|
</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() {
|
function initData() {
|
||||||
$('#submitBtn').addClass("layui-btn-disabled").attr("disabled",true);
|
$('#submitBtn').addClass("layui-btn-disabled").attr("disabled",true);
|
||||||
@ -306,6 +324,7 @@
|
|||||||
form.render(null, 'dataForm');
|
form.render(null, 'dataForm');
|
||||||
initRelationshipWithGuardianSelect(data['relationshipWithGuardian']);
|
initRelationshipWithGuardianSelect(data['relationshipWithGuardian']);
|
||||||
queryBasePopulationInfo(data['idCardNumber']);
|
queryBasePopulationInfo(data['idCardNumber']);
|
||||||
|
backData(data);
|
||||||
}, function(code, data) {
|
}, function(code, data) {
|
||||||
top.dialog.msg(data.msg);
|
top.dialog.msg(data.msg);
|
||||||
}, function() {
|
}, function() {
|
||||||
@ -314,10 +333,22 @@
|
|||||||
top.dialog.close(loadLayerIndex);
|
top.dialog.close(loadLayerIndex);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
initData();
|
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) {
|
form.on('submit(submitForm)', function(formData) {
|
||||||
|
valueFun(formData);
|
||||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-card-body" style="padding: 15px;">
|
<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-form-item layui-row">
|
||||||
<div class="layui-col-lg6">
|
<div class="layui-col-lg6">
|
||||||
<label class="layui-form-label"><span style="color:red;">*</span>外文姓</label>
|
<label class="layui-form-label"><span style="color:red;">*</span>外文姓</label>
|
||||||
@ -70,7 +70,7 @@
|
|||||||
<select id="nationality" name="nationality" lay-verify="required">
|
<select id="nationality" name="nationality" lay-verify="required">
|
||||||
<option value="">请选择国籍(地区)</option>
|
<option value="">请选择国籍(地区)</option>
|
||||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||||
{{# } }}
|
{{# } }}
|
||||||
</select>
|
</select>
|
||||||
</script>
|
</script>
|
||||||
@ -84,7 +84,7 @@
|
|||||||
<select id="religiousBelief" name="religiousBelief" lay-verify="required">
|
<select id="religiousBelief" name="religiousBelief" lay-verify="required">
|
||||||
<option value="">请选择宗教信仰</option>
|
<option value="">请选择宗教信仰</option>
|
||||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||||
{{# } }}
|
{{# } }}
|
||||||
</select>
|
</select>
|
||||||
</script>
|
</script>
|
||||||
@ -96,7 +96,7 @@
|
|||||||
<select id="cardCode" name="cardCode" lay-verify="required">
|
<select id="cardCode" name="cardCode" lay-verify="required">
|
||||||
<option value="">请选择证件代码</option>
|
<option value="">请选择证件代码</option>
|
||||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||||
{{# } }}
|
{{# } }}
|
||||||
</select>
|
</select>
|
||||||
</script>
|
</script>
|
||||||
@ -384,10 +384,22 @@
|
|||||||
top.dialog.close(loadLayerIndex);
|
top.dialog.close(loadLayerIndex);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
initData();
|
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) {
|
form.on('submit(submitForm)', function(formData) {
|
||||||
|
valueFun(formData);
|
||||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-card-body" style="padding: 15px;">
|
<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-form-item layui-row">
|
||||||
<div class="layui-col-lg6">
|
<div class="layui-col-lg6">
|
||||||
<label class="layui-form-label"><span style="color:red;">*</span>外文姓</label>
|
<label class="layui-form-label"><span style="color:red;">*</span>外文姓</label>
|
||||||
@ -70,7 +70,7 @@
|
|||||||
<select id="nationality" name="nationality" lay-verify="required">
|
<select id="nationality" name="nationality" lay-verify="required">
|
||||||
<option value="">请选择国籍(地区)</option>
|
<option value="">请选择国籍(地区)</option>
|
||||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||||
{{# } }}
|
{{# } }}
|
||||||
</select>
|
</select>
|
||||||
</script>
|
</script>
|
||||||
@ -84,7 +84,7 @@
|
|||||||
<select id="religiousBelief" name="religiousBelief" lay-verify="required">
|
<select id="religiousBelief" name="religiousBelief" lay-verify="required">
|
||||||
<option value="">请选择宗教信仰</option>
|
<option value="">请选择宗教信仰</option>
|
||||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||||
{{# } }}
|
{{# } }}
|
||||||
</select>
|
</select>
|
||||||
</script>
|
</script>
|
||||||
@ -96,7 +96,7 @@
|
|||||||
<select id="cardCode" name="cardCode" lay-verify="required">
|
<select id="cardCode" name="cardCode" lay-verify="required">
|
||||||
<option value="">请选择证件代码</option>
|
<option value="">请选择证件代码</option>
|
||||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||||
{{# } }}
|
{{# } }}
|
||||||
</select>
|
</select>
|
||||||
</script>
|
</script>
|
||||||
@ -219,64 +219,10 @@
|
|||||||
var laydate = layui.laydate;
|
var laydate = layui.laydate;
|
||||||
var overseasPersonnelId = top.restAjax.params(window.location.href).overseasPersonnelId;
|
var overseasPersonnelId = top.restAjax.params(window.location.href).overseasPersonnelId;
|
||||||
|
|
||||||
var wangEditor = window.wangEditor;
|
|
||||||
var wangEditorObj = {};
|
|
||||||
var viewerObj = {};
|
|
||||||
|
|
||||||
function closeBox() {
|
function closeBox() {
|
||||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
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() {
|
function initLeaveDateDate() {
|
||||||
laydate.render({
|
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() {
|
function initData() {
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
@ -386,6 +350,7 @@
|
|||||||
initNationalitySelect(data['nationality']);
|
initNationalitySelect(data['nationality']);
|
||||||
initReligiousBeliefSelect(data['religiousBelief']);
|
initReligiousBeliefSelect(data['religiousBelief']);
|
||||||
initCardCodeSelect(data['cardCode']);
|
initCardCodeSelect(data['cardCode']);
|
||||||
|
backData(data);
|
||||||
}, function(code, data) {
|
}, function(code, data) {
|
||||||
top.dialog.msg(data.msg);
|
top.dialog.msg(data.msg);
|
||||||
}, function() {
|
}, function() {
|
||||||
@ -394,10 +359,22 @@
|
|||||||
top.dialog.close(loadLayerIndex);
|
top.dialog.close(loadLayerIndex);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
initData();
|
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) {
|
form.on('submit(submitForm)', function(formData) {
|
||||||
|
valueFun(formData);
|
||||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-card-body" style="padding: 15px;">
|
<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-form-item layui-row">
|
||||||
<div class="layui-col-lg6">
|
<div class="layui-col-lg6">
|
||||||
<label class="layui-form-label">房屋编号</label>
|
<label class="layui-form-label">房屋编号</label>
|
||||||
@ -67,7 +67,7 @@
|
|||||||
<select id="cardCode" name="cardCode" lay-verify="required">
|
<select id="cardCode" name="cardCode" lay-verify="required">
|
||||||
<option value="">请选择证件代码</option>
|
<option value="">请选择证件代码</option>
|
||||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||||
{{# } }}
|
{{# } }}
|
||||||
</select>
|
</select>
|
||||||
</script>
|
</script>
|
||||||
@ -260,8 +260,19 @@
|
|||||||
map.addOverlay(marker);
|
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) {
|
form.on('submit(submitForm)', function(formData) {
|
||||||
|
valueFun(formData);
|
||||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-card-body" style="padding: 15px;">
|
<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-form-item layui-row">
|
||||||
<div class="layui-col-lg6">
|
<div class="layui-col-lg6">
|
||||||
<label class="layui-form-label">房屋编号</label>
|
<label class="layui-form-label">房屋编号</label>
|
||||||
@ -67,7 +67,7 @@
|
|||||||
<select id="cardCode" name="cardCode" lay-verify="required">
|
<select id="cardCode" name="cardCode" lay-verify="required">
|
||||||
<option value="">请选择证件代码</option>
|
<option value="">请选择证件代码</option>
|
||||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
<option value="{{item.dictionaryName}}">{{item.dictionaryName}}</option>
|
||||||
{{# } }}
|
{{# } }}
|
||||||
</select>
|
</select>
|
||||||
</script>
|
</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() {
|
function initData() {
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
@ -231,6 +249,7 @@
|
|||||||
form.render(null, 'dataForm');
|
form.render(null, 'dataForm');
|
||||||
initCardCodeSelect(data['cardCode']);
|
initCardCodeSelect(data['cardCode']);
|
||||||
initMap(dataFormData['longitude'],dataFormData['latitude']);
|
initMap(dataFormData['longitude'],dataFormData['latitude']);
|
||||||
|
backData(data);
|
||||||
}, function(code, data) {
|
}, function(code, data) {
|
||||||
top.dialog.msg(data.msg);
|
top.dialog.msg(data.msg);
|
||||||
}, function() {
|
}, function() {
|
||||||
@ -271,9 +290,20 @@
|
|||||||
var marker = new BMap.Marker(point);
|
var marker = new BMap.Marker(point);
|
||||||
map.addOverlay(marker);
|
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) {
|
form.on('submit(submitForm)', function(formData) {
|
||||||
|
valueFun(formData);
|
||||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
|
Loading…
Reference in New Issue
Block a user