bug修改。

This commit is contained in:
Renpc-kilig 2021-05-15 20:12:13 +08:00
parent 45653ccc98
commit ef3b36afe7
2 changed files with 70 additions and 49 deletions

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
}; };