Merge remote-tracking branch 'origin/baotou-signup' into baotou-signup

This commit is contained in:
cuibaocheng 2021-05-15 20:24:19 +08:00
commit b5cd931c58
4 changed files with 340 additions and 194 deletions

View File

@ -41,6 +41,18 @@ public class ApplyController extends DefaultBaseController {
@ApiOperation(value = "自定义新增报名信息", notes = "自定义新增报名信息")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save-relation")
@CheckRequestBodyAnnotation
public SuccessResult saveRelation(@RequestBody ApplyVO applyVO) {
applyService.saveRelationReturnId(applyVO);
return new SuccessResult();
}
@ApiOperation(value = "报名信息撤回", notes = "报名信息撤回接口") @ApiOperation(value = "报名信息撤回", notes = "报名信息撤回接口")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "applyId", value = "报名信息ID", paramType = "path"), @ApiImplicitParam(name = "applyId", value = "报名信息ID", paramType = "path"),

View File

@ -22,126 +22,168 @@
</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">
<div class="layui-form-item"> <div class="layui-form-item layui-form-text">
<label class="layui-form-label">报名班级ID</label>
<div class="layui-input-block">
<input type="text" id="applyClassId" name="applyClassId" class="layui-input" value="" placeholder="请输入报名班级ID" maxlength="36">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">报名人姓名</label>
<div class="layui-input-block">
<input type="text" id="applyName" name="applyName" class="layui-input" value="" placeholder="请输入报名人姓名" maxlength="50">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">报名人性别 1男 2女【数据字典】</label>
<div class="layui-input-block layui-form" id="applySexSelectTemplateBox" lay-filter="applySexSelectTemplateBox"></div>
<script id="applySexSelectTemplate" type="text/html">
<select id="applySex" name="applySex">
<option value="">请选择报名人性别 1男 2女【数据字典】</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.selectId}}">{{item.selectName}}</option>
{{# } }}
</select>
</script>
</div>
<div class="layui-form-item">
<label class="layui-form-label">报名人出生日期</label>
<div class="layui-input-block">
<input type="text" id="applyDataBirth" name="applyDataBirth" class="layui-input" value="" placeholder="请选择报名人出生日期" readonly style="cursor: pointer;" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">报名人证件类型【数据字典】</label>
<div class="layui-input-block layui-form" id="applyCardTypeSelectTemplateBox" lay-filter="applyCardTypeSelectTemplateBox"></div>
<script id="applyCardTypeSelectTemplate" type="text/html">
<select id="applyCardType" name="applyCardType">
<option value="">请选择报名人证件类型【数据字典】</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.selectId}}">{{item.selectName}}</option>
{{# } }}
</select>
</script>
</div>
<div class="layui-form-item">
<label class="layui-form-label">报名人证件号码</label>
<div class="layui-input-block">
<input type="text" id="applyCardNumber" name="applyCardNumber" class="layui-input" value="" placeholder="请输入报名人证件号码" maxlength="50">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">报名人手机号码</label>
<div class="layui-input-block">
<input type="number" id="applyPhone" name="applyPhone" class="layui-input" value="" placeholder="请输入报名人手机号码" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">报名人通讯地址</label>
<div class="layui-input-block">
<input type="text" id="applyAddress" name="applyAddress" class="layui-input" value="" placeholder="请输入报名人通讯地址" maxlength="500">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">报名人文化程度【数据字典】</label>
<div class="layui-input-block layui-form" id="applyCultureLevelSelectTemplateBox" lay-filter="applyCultureLevelSelectTemplateBox"></div>
<script id="applyCultureLevelSelectTemplate" type="text/html">
<select id="applyCultureLevel" name="applyCultureLevel">
<option value="">请选择报名人文化程度【数据字典】</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.selectId}}">{{item.selectName}}</option>
{{# } }}
</select>
</script>
</div>
<div class="layui-form-item">
<label class="layui-form-label">报名人邮编</label>
<div class="layui-input-block">
<input type="text" id="applyPostcode" name="applyPostcode" class="layui-input" value="" placeholder="请输入报名人邮编" maxlength="50">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">报名人身体状态【数据字典】</label>
<div class="layui-input-block layui-form" id="applyPhysicalStateSelectTemplateBox" lay-filter="applyPhysicalStateSelectTemplateBox"></div>
<script id="applyPhysicalStateSelectTemplate" type="text/html">
<select id="applyPhysicalState" name="applyPhysicalState">
<option value="">请选择报名人身体状态【数据字典】</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.selectId}}">{{item.selectName}}</option>
{{# } }}
</select>
</script>
</div>
<div class="layui-form-item">
<label class="layui-form-label">报名人单位名称</label>
<div class="layui-input-block">
<input type="text" id="applyUnitName" name="applyUnitName" class="layui-input" value="" placeholder="请输入报名人单位名称" maxlength="100">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">报名人单位电话</label>
<div class="layui-input-block">
<input type="number" id="applyUnitPhone" name="applyUnitPhone" class="layui-input" value="" placeholder="请输入报名人单位电话" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">报名人单位地址</label>
<div class="layui-input-block">
<input type="text" id="applyUnitAddress" name="applyUnitAddress" class="layui-input" value="" placeholder="请输入报名人单位地址" maxlength="500">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">证件照片</label> <label class="layui-form-label">证件照片</label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" id="applyUserCardPhoto" name="applyUserCardPhoto" class="layui-input" value="" placeholder="请输入证件照片" maxlength="36"> <input type="hidden" id="applyUserCardPhoto" name="applyUserCardPhoto">
<div class="layui-btn-container" id="applyUserCardPhotoFileBox" style="border: 1px solid #e6e6e6;"></div>
<script id="applyUserCardPhotoFileDownload" type="text/html">
{{# var fileName = 'applyUserCardPhoto'; }}
{{# if(d[fileName].length > 0) { }}
{{# var files = d[fileName];}}
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
<div class="upload-image-box">
<span class="upload-image-span">
<img src="route/file/download/false/{{item.fileId}}" align="加载失败">
</span>
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-image" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="applyUserCardPhotoRemoveFile">
<i class="fa fa-trash-o"></i>
</a>
</div>
{{# } }}
{{# } }}
{{# if(d[fileName].length < 1) { }}
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
<a href="javascript:void(0);" lay-form-button data-explain="证件照片" data-name="applyUserCardPhoto" lay-filter="applyUserCardPhotoUploadFile">
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
</a>
</div>
{{# } }}
</script>
</div>
</div>
<div class="layui-form-item layui-col-space10">
<div class="layui-col-md4">
<label class="layui-form-label">姓名</label>
<div class="layui-input-block">
<input type="text" id="applyName" name="applyName" class="layui-input" value=""maxlength="50" placeholder="请输入姓名" lay-verify="required" >
</div>
</div>
<div class="layui-col-md4">
<label class="layui-form-label">性别</label>
<div class="layui-input-block layui-form" id="applySexSelectTemplateBox" lay-filter="applySexSelectTemplateBox"></div>
<script id="applySexSelectTemplate" type="text/html">
<select id="applySex" name="applySex" lay-verify="required" >
<option value="">请选择性别</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dataId}}">{{item.dataName}}</option>
{{# } }}
</select>
</script>
</div>
<div class="layui-col-md4">
<label class="layui-form-label">出生日期</label>
<div class="layui-input-block">
<input type="text" id="applyDataBirth" name="applyDataBirth" class="layui-input" value="" placeholder="请输入出生日期" lay-verify="required" readonly style="cursor: pointer;">
</div>
</div>
</div>
<div class="layui-form-item layui-col-space10">
<div class="layui-col-md4">
<label class="layui-form-label">职务</label>
<div class="layui-input-block">
<input type="text" id="applyPosition" name="applyPosition" class="layui-input" value="" placeholder="请输入职务" lay-verify="required" style="cursor: pointer;">
</div>
</div>
<div class="layui-col-md4">
<label class="layui-form-label">从业年限</label>
<div class="layui-input-block">
<input type="number" id="applyMajorYear" name="applyMajorYear" class="layui-input" value="" placeholder="请输入从业年限" maxlength="50" lay-verify="required" >
</div>
</div>
<div class="layui-col-md4">
<label class="layui-form-label">技术职称</label>
<div class="layui-input-block">
<input type="text" id="applyTechnicalTitles" name="applyTechnicalTitles" class="layui-input" value="" placeholder="请输入技术职称" lay-verify="required" >
</div>
</div>
</div>
<div class="layui-form-item layui-col-space10">
<div class="layui-col-md4">
<label class="layui-form-label">证件类型</label>
<div class="layui-input-block layui-form" id="applyCardTypeSelectTemplateBox" lay-filter="applyCardTypeSelectTemplateBox"></div>
<script id="applyCardTypeSelectTemplate" type="text/html">
<select id="applyCardType" name="applyCardType" lay-verify="required" >
<option value="">请选择证件类型</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dataId}}">{{item.dataName}}</option>
{{# } }}
</select>
</script>
</div>
<div class="layui-col-md4">
<label class="layui-form-label">证件号码</label>
<div class="layui-input-block">
<input type="text" id="applyCardNumber" name="applyCardNumber" class="layui-input" value="" placeholder="请输入证件号码" maxlength="50" lay-verify="required" >
</div>
</div>
<div class="layui-col-md4">
<label class="layui-form-label">手机号码</label>
<div class="layui-input-block">
<input type="text" id="applyPhone" name="applyPhone" class="layui-input" value="" placeholder="请输入手机号码" lay-verify="required" >
</div>
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">报名状态 0 待审核 1用户撤回 2审核通过 3未报到 4报名完成-1审核不通过</label> <label class="layui-form-label">通讯地址</label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="number" id="applyAuditState" name="applyAuditState" class="layui-input" value="" placeholder="请输入报名状态 0 待审核 1用户撤回 2审核通过 3未报到 4报名完成-1审核不通过" lay-verify="required"> <input type="text" id="applyAddress" name="applyAddress" class="layui-input" value="" placeholder="请输入通讯地址" maxlength="500" >
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-space10">
<div class="layui-col-md4">
<label class="layui-form-label">文化程度</label>
<div class="layui-input-block layui-form" id="applyCultureLevelSelectTemplateBox" lay-filter="applyCultureLevelSelectTemplateBox"></div>
<script id="applyCultureLevelSelectTemplate" type="text/html">
<select id="applyCultureLevel" name="applyCultureLevel" lay-verify="required" >
<option value="">请选择文化程度</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dataId}}">{{item.dataName}}</option>
{{# } }}
</select>
</script>
</div>
<div class="layui-col-md4">
<label class="layui-form-label">身体状态</label>
<div class="layui-input-block layui-form" id="applyPhysicalStateSelectTemplateBox" lay-filter="applyPhysicalStateSelectTemplateBox"></div>
<script id="applyPhysicalStateSelectTemplate" type="text/html">
<select id="applyPhysicalState" name="applyPhysicalState" lay-verify="required" >
<option value="">请选择身体状态</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dataId}}">{{item.dataName}}</option>
{{# } }}
</select>
</script>
</div>
<div class="layui-col-md4">
<label class="layui-form-label">邮编</label>
<div class="layui-input-block">
<input type="text" id="applyPostcode" name="applyPostcode" class="layui-input" value="" placeholder="请输入邮编" maxlength="50" >
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-col-md6">
<label class="layui-form-label">单位名称</label>
<div class="layui-input-block">
<input type="text" id="applyUnitName" name="applyUnitName" class="layui-input" value="" placeholder="请输入单位名称" maxlength="100" >
</div>
</div>
<div class="layui-col-md6">
<label class="layui-form-label">单位电话</label>
<div class="layui-input-block">
<input type="text" id="applyUnitPhone" name="applyUnitPhone" class="layui-input" value="" placeholder="请输入单位电话" >
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">单位地址</label>
<div class="layui-input-block">
<input type="text" id="applyUnitAddress" name="applyUnitAddress" class="layui-input" value="" placeholder="请输入地址" maxlength="500" >
</div>
</div>
<div class="layui-form-item layui-layout-admin"> <div class="layui-form-item layui-layout-admin">
<div class="layui-input-block"> <div class="layui-input-block">
<div class="layui-footer" style="left: 0;"> <div class="layui-footer" style="left: 0;">
@ -171,6 +213,9 @@
var wangEditor = window.wangEditor; var wangEditor = window.wangEditor;
var wangEditorObj = {}; var wangEditorObj = {};
var viewerObj = {}; var viewerObj = {};
var applyWorkTypeId = top.restAjax.params(window.location.href).applyWorkTypeId;
var applyInstitutionId = top.restAjax.params(window.location.href).applyInstitutionId;
function closeBox() { function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name)); parent.layer.close(parent.layer.getFrameIndex(window.name));
@ -226,9 +271,9 @@
} }
} }
// 初始化报名人性别 1男 2女【数据字典】下拉选择 // 初始化报名人性别
function initApplySexSelect() { function initApplySexSelect() {
top.restAjax.get(top.restAjax.path('api/url/selectUrl', []), {}, null, function(code, data, args) { top.restAjax.get(top.restAjax.path('api/data/listbyparentid/4ef46940-76ab-4758-b5f0-0cbc93ffc660', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('applySexSelectTemplate').innerHTML).render(data, function(html) { laytpl(document.getElementById('applySexSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('applySexSelectTemplateBox').innerHTML = html; document.getElementById('applySexSelectTemplateBox').innerHTML = html;
}); });
@ -238,6 +283,45 @@
}); });
} }
// 初始化报名人证件类型
function initApplyCardTypeSelect() {
top.restAjax.get(top.restAjax.path('api/data/listbyparentid/76c5044f-805a-4313-b1e8-79e966b97c0d', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('applyCardTypeSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('applyCardTypeSelectTemplateBox').innerHTML = html;
});
form.render('select', 'applyCardTypeSelectTemplateBox');
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化报名人文化程度
function initApplyCultureLevelSelect() {
top.restAjax.get(top.restAjax.path('api/data/listbyparentid/d6b9f026-6ea9-456a-b48b-0c18d502523b', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('applyCultureLevelSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('applyCultureLevelSelectTemplateBox').innerHTML = html;
});
form.render('select', 'applyCultureLevelSelectTemplateBox');
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化报名人身体状态
function initApplyPhysicalStateSelect() {
top.restAjax.get(top.restAjax.path('api/data/listbyparentid/e4680c90-7a1f-4f09-96c8-0c583d8031ba', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('applyPhysicalStateSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('applyPhysicalStateSelectTemplateBox').innerHTML = html;
});
form.render('select', 'applyPhysicalStateSelectTemplateBox');
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化报名人出生日期日期 // 初始化报名人出生日期日期
function initApplyDataBirthDate() { function initApplyDataBirthDate() {
laydate.render({ laydate.render({
@ -248,59 +332,88 @@
}); });
} }
// 初始化报名人证件类型【数据字典】下拉选择
function initApplyCardTypeSelect() { // 初始化头像图片上传
top.restAjax.get(top.restAjax.path('api/url/selectUrl', []), {}, null, function(code, data, args) { function initApplyUserCardPhotoUploadFile() {
laytpl(document.getElementById('applyCardTypeSelectTemplate').innerHTML).render(data, function(html) { var files = $('#applyUserCardPhoto').val();
document.getElementById('applyCardTypeSelectTemplateBox').innerHTML = html; initFileList('applyUserCardPhoto', files, function(fileName) {
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
viewerObj[fileName] = viewer;
});
form.on('button(applyUserCardPhotoUploadFile)', function(obj) {
var name = this.dataset.name;
var explain = this.dataset.explain;
top.dialog.file({
type: 'image',
title: '上传'+ explain,
width: '400px',
height: '420px',
maxFileCount: '1',
onClose: function() {
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
var files = $('#'+ name).val();
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
if(files.length > 0) {
files += ',';
}
files += file.data;
}
initFileList(name, files, function(fileName) {
viewerObj[fileName].update();
});
}
}
});
});
form.on('button(applyUserCardPhotoRemoveFile)', function(obj) {
var name = this.dataset.name;
var id = this.dataset.id;
var files = $('#'+ name).val().replace(id, '');
files = files.replace(/\,+/g, ',');
if(files.charAt(0) == ',') {
files = files.substring(1);
}
if(files.charAt(files.length - 1) == ',') {
files = files.substring(0, files.length - 1);
}
initFileList(name, files, function(fileName) {
viewerObj[fileName].update();
}); });
form.render('select', 'applyCardTypeSelectTemplateBox');
}, function(code, data) {
top.dialog.msg(data.msg);
}); });
} }
// 初始化报名人文化程度【数据字典】下拉选择
function initApplyCultureLevelSelect() {
top.restAjax.get(top.restAjax.path('api/url/selectUrl', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('applyCultureLevelSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('applyCultureLevelSelectTemplateBox').innerHTML = html;
});
form.render('select', 'applyCultureLevelSelectTemplateBox');
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化报名人身体状态【数据字典】下拉选择
function initApplyPhysicalStateSelect() {
top.restAjax.get(top.restAjax.path('api/url/selectUrl', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('applyPhysicalStateSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('applyPhysicalStateSelectTemplateBox').innerHTML = html;
});
form.render('select', 'applyPhysicalStateSelectTemplateBox');
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化内容 // 初始化内容
function initData() { function initData() {
if(applyWorkTypeId == '' || applyInstitutionId==''){
top.dialog.msg('参数错误');
return;
}
initApplySexSelect(); initApplySexSelect();
initApplyDataBirthDate(); initApplyDataBirthDate();
initApplyCardTypeSelect(); initApplyCardTypeSelect();
initApplyCultureLevelSelect(); initApplyCultureLevelSelect();
initApplyPhysicalStateSelect(); initApplyPhysicalStateSelect();
initApplyUserCardPhotoUploadFile();
} }
initData(); initData();
// 提交表单 // 提交表单
form.on('submit(submitForm)', function(formData) { form.on('submit(submitForm)', function(formData) {
formData.field.applyWorkTypeId = applyWorkTypeId;
formData.field.applyInstitutionId = applyInstitutionId;
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;
top.restAjax.post(top.restAjax.path('api/apply/save', []), formData.field, null, function(code, data) { top.restAjax.post(top.restAjax.path('api/apply/save-relation', []), formData.field, null, function(code, data) {
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, { var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
time: 0, time: 0,
btn: [top.dataMessage.button.yes, top.dataMessage.button.no], btn: [top.dataMessage.button.yes, top.dataMessage.button.no],

View File

@ -51,7 +51,7 @@
var laydate = layui.laydate; var laydate = layui.laydate;
var common = layui.common; var common = layui.common;
var resizeTimeout = null; var resizeTimeout = null;
var tableUrl = 'api/examapply/listpage'; var tableUrl = 'api/examapply/listpage?checkStatus=1';
// 初始化表格 // 初始化表格
function initTable() { function initTable() {
@ -105,15 +105,6 @@
return rowData; return rowData;
} }
}, },
{field: 'planPersonNum', width: 180, title: '计划人数', align:'center',
templet: function(row) {
var rowData = row.classPlanDTO[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'planStartTime', width: 180, title: '计划开始时间', align:'center', {field: 'planStartTime', width: 180, title: '计划开始时间', align:'center',
templet: function(row) { templet: function(row) {
var rowData = row.classPlanDTO[this.field]; var rowData = row.classPlanDTO[this.field];

View File

@ -39,7 +39,7 @@
</style> </style>
<div class="layui-card" id="userinfo"> <div class="layui-card" id="userinfo">
<div class="layui-card-header">考试成绩录入</div> <div class="layui-card-header">考试成绩录入</div>
<input type="hidden" id="applyStudentsId" name="applyStudentsId" value="{{d.applyStudentsId}}"> <input type="hidden" id="applyId" name="applyId" value="{{d.applyId}}">
<input type="hidden" id="applyDataBirth" name="applyDataBirth" value="{{d.applyDataBirth}}"> <input type="hidden" id="applyDataBirth" name="applyDataBirth" value="{{d.applyDataBirth}}">
<input type="hidden" id="applyAuditState" name="applyAuditState" value="{{d.applyAuditState}}"> <input type="hidden" id="applyAuditState" name="applyAuditState" value="{{d.applyAuditState}}">
<div class="layui-card-body"> <div class="layui-card-body">
@ -76,8 +76,14 @@
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;
var applyStudentsId = $('#applyStudentsId').val(); var applyId = $('#applyId').val();
top.restAjax.put(top.restAjax.path('api/applystudents/update/{applyStudentsId}', [applyStudentsId]), formData.field, null, function(code, data) { var applyDataBirth = $('#applyDataBirth').val();
var applyAuditState = $('#applyAuditState').val();
var applyTestScores = $('#applyTestScores').val();
formData.field.applyDataBirth = applyDataBirth;
formData.field.applyAuditState = applyAuditState;
formData.field.applyTestScores = applyTestScores;
top.restAjax.put(top.restAjax.path('api/applystudents/update/{applyStudentsId}', [applyId]), formData.field, null, function(code, data) {
if('200' == code) { if('200' == code) {
top.dialog.msg('考试录入成功'); top.dialog.msg('考试录入成功');
window.location.reload(); window.location.reload();
@ -161,7 +167,7 @@
[ [
{type:'checkbox', fixed: 'left'}, {type:'checkbox', fixed: 'left'},
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'}, {field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{field: 'fullName', width: 120, title: '姓名', align:'center', {field: 'applyName', width: 120, title: '姓名', align:'center',
templet: function(row) { templet: function(row) {
var rowData = row[this.field]; var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -170,7 +176,7 @@
return rowData; return rowData;
} }
}, },
{field: 'gender', width: 120, title: '性别', align:'center', {field: 'applySex', width: 120, title: '性别', align:'center',
templet: function(row) { templet: function(row) {
var rowData = row[this.field]; var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -179,7 +185,7 @@
return rowData; return rowData;
} }
}, },
{field: 'idCardNumber', width: 180, title: '公民身份证号', align:'center', {field: 'applyCardNumber', width: 180, title: '公民证件号码', align:'center',
templet: function(row) { templet: function(row) {
var rowData = row[this.field]; var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -188,7 +194,7 @@
return rowData; return rowData;
} }
}, },
{field: 'telephone', width: 150, title: '联系方式', align:'center', {field: 'applyPhone', width: 150, title: '联系方式', align:'center',
templet: function(row) { templet: function(row) {
var rowData = row[this.field]; var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -197,7 +203,7 @@
return rowData; return rowData;
} }
}, },
{field: 'nation', width: 120, title: '民族', align:'center', {field: 'applyCultureLevel', width: 120, title: '文化程度', align:'center',
templet: function(row) { templet: function(row) {
var rowData = row[this.field]; var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -206,55 +212,79 @@
return rowData; return rowData;
} }
}, },
{field: 'nativePlace', width: 150, title: '籍贯', align:'center', {field: 'applyPhysicalState', width: 150, title: '身体状态', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData === '') {
return row['nativePlaceAddr'];
}
return rowData + '-' + row['nativePlaceAddr'];
}
},
{field: 'politicalStatus', width: 120, title: '政治面貌', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'occupationCategory', width: 150, title: '职业', align:'center',
templet: function(row) { templet: function(row) {
var rowData = row[this.field]; var rowData = row[this.field];
if(rowData === '' || typeof (rowData) === 'undefined'){ if(rowData === '' || typeof (rowData) === 'undefined'){
return row['occupation']; return '-'
} }
return rowData + '-' + row['occupation']; return rowData;
} }
}, },
{field: 'registeredResidence', width: 180, title: '户籍地', align:'center', {field: 'applyUnitName', width: 180, title: '单位名称', align:'center',
templet: function(row) { templet: function(row) {
var rowData = row[this.field]; var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return row['registeredResidenceAddr']; return '-'
} }
return rowData + '-' + row['registeredResidenceAddr']; return rowData;
} }
}, },
{field: 'currentResidence', width: 180, title: '现住地', align:'center', {field: 'applyUnitPhone', width: 180, title: '单位电话', align:'center',
templet: function(row) { templet: function(row) {
var rowData = row[this.field]; var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return row['currentResidenceAddr']; return '-'
} }
return rowData + '-' + row['currentResidenceAddr']; return rowData;
} }
}, },
{field: 'insertScore', width: 180, title: '现住地', align:'center', {field: 'applyPosition', width: 180, title: '职务', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-'
}
return rowData;
}
},
{field: 'applyMajorYear', width: 180, title: '从事行业年限', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-'
}
return rowData;
}
},
{field: 'applyTechnicalTitles', width: 180, title: '技术职称', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-'
}
return rowData;
}
},
{field: 'applyTestScores', fixed: 'right', width: 180, title: '考试成绩', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-'
}
return rowData;
}
},
{field: 'insertScore', fixed: 'right', width: 180, title: '操作', align:'center',
templet: function(row) { templet: function(row) {
var rowData; var rowData;
rowData = '<a class="layui-btn layui-btn-xs" lay-event="insertScore">考试成绩录入</a>'; var score = row['applyTestScores'];
if(typeof(score) === 'undefined' || score == null || score == '') {
rowData = '<a class="layui-btn layui-btn-xs" lay-event="insertScore">考试成绩录入</a>';
}else {
rowData = '<a class="layui-btn layui-btn-xs" lay-event="insertScore">考试成绩修改</a>';
}
return rowData; return rowData;
} }
} }
@ -266,7 +296,7 @@
'code': 0, 'code': 0,
'msg': '', 'msg': '',
'count': data.total, 'count': data.total,
'data': data.rows 'data': data
}; };
} }
}); });
@ -287,7 +317,7 @@
function insertScore(data){ function insertScore(data){
var tpldata = { var tpldata = {
"applyStudentsId": data.applyStudentsId, "applyId": data.applyId,
"applyDataBirth": data.applyDataBirth, "applyDataBirth": data.applyDataBirth,
"applyAuditState": data.applyAuditState "applyAuditState": data.applyAuditState
}; };