Merge remote-tracking branch 'origin/baotou-signup' into baotou-signup
This commit is contained in:
commit
acc8efd2ec
@ -150,44 +150,53 @@
|
||||
var dataForm = {};
|
||||
var stationArray;
|
||||
var classPlanArray;
|
||||
var dataLength = 0;
|
||||
var planLength = 0;
|
||||
|
||||
// 初始化开班计划
|
||||
function initDistributionClassPlans() {
|
||||
classPlanArray = new Array();
|
||||
top.restAjax.get(top.restAjax.path('api/classplan/list?classPlanIdListIds={classPlanIds}', [ planId ]), {}, null, function (code, data, args) {
|
||||
planLength = data.length;
|
||||
$.ajax({
|
||||
url:'api/classplan/list?classPlanIdListIds=' + planId,
|
||||
async:false,
|
||||
type:'get',
|
||||
dataType:'json',
|
||||
success: function (data) {
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var planData = {index: i, data: data[i]};
|
||||
top.restAjax.get(top.restAjax.path('api/applystudents/list-by-classid/{planId}', [ data[i].classPlanId ]), {}, planData, function (code, userData, args) {
|
||||
var user = args.data;
|
||||
user.applyCount = userData.length;
|
||||
classPlanArray.push(user);
|
||||
if (args.index == planLength - 1) {
|
||||
$.ajax({
|
||||
url: 'api/applystudents/list-by-classid/' + data[i].classPlanId,
|
||||
async: false,
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
success: function (userData) {
|
||||
data[i].applyCount = userData.length;
|
||||
classPlanArray.push( data[i]);
|
||||
}
|
||||
});
|
||||
}
|
||||
laytpl(document.getElementById('distributionClassPlansBoxTemplate').innerHTML).render(classPlanArray, function (html) {
|
||||
console.log(classPlanArray);
|
||||
document.getElementById('distributionClassPlansBox').innerHTML = html;
|
||||
});
|
||||
form.render('checkbox', 'distributionClassPlansBox');
|
||||
}
|
||||
}, function (code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
}, function (code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化考场
|
||||
function initDistributionFields() {
|
||||
stationArray = new Array();
|
||||
top.restAjax.get(top.restAjax.path('api/institution/list?institutionType=考点信息', []), {}, null, function(code, data, args) {
|
||||
dataLength = data.length;
|
||||
$.ajax({
|
||||
url:'api/institution/list?institutionType=考点信息',
|
||||
async:false,
|
||||
type:'get',
|
||||
dataType:'json',
|
||||
success: function (data) {
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var institutionData = {index:i, data:data[i]};
|
||||
top.restAjax.get(top.restAjax.path('api/organization/list?organizationType={organizationType}', [data[i].institutionId]), {}, institutionData, function(code, orgData, args) {
|
||||
$.ajax({
|
||||
url: 'api/organization/list?organizationType=' + data[i].institutionId,
|
||||
async: false,
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
success: function (orgData) {
|
||||
// 回显 , 选中
|
||||
for (var a = 0; a < orgData.length; a++) {
|
||||
console.log(dataForm);
|
||||
@ -197,21 +206,17 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
var stationData = {stationName:args.data.institutionName, fieldArray:orgData};
|
||||
var stationData = {stationName: data[i].institutionName, fieldArray: orgData};
|
||||
stationArray.push(stationData);
|
||||
if(args.index == dataLength - 1) {
|
||||
}
|
||||
});
|
||||
}
|
||||
laytpl(document.getElementById('distributionFieldsBoxTemplate').innerHTML).render(stationArray, function (html) {
|
||||
console.log(stationArray);
|
||||
document.getElementById('distributionFieldsBox').innerHTML = html;
|
||||
});
|
||||
form.render('checkbox', 'distributionFieldsBox');
|
||||
}
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -150,62 +150,125 @@
|
||||
|
||||
var stationArray;
|
||||
var classPlanArray;
|
||||
var dataLength = 0;
|
||||
var planLength = 0;
|
||||
|
||||
// 初始化开班计划
|
||||
function initDistributionClassPlans() {
|
||||
classPlanArray = new Array();
|
||||
top.restAjax.get(top.restAjax.path('api/classplan/list?classPlanIdListIds={classPlanIds}', [ planId ]), {}, null, function (code, data, args) {
|
||||
planLength = data.length;
|
||||
$.ajax({
|
||||
url:'api/classplan/list?classPlanIdListIds=' + planId,
|
||||
async:false,
|
||||
type:'get',
|
||||
dataType:'json',
|
||||
success: function (data) {
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var planData = {index: i, data: data[i]};
|
||||
top.restAjax.get(top.restAjax.path('api/applystudents/list-by-classid/{planId}', [ data[i].classPlanId ]), {}, planData, function (code, userData, args) {
|
||||
var user = args.data;
|
||||
user.applyCount = userData.length;
|
||||
classPlanArray.push(user);
|
||||
if (args.index == planLength - 1) {
|
||||
$.ajax({
|
||||
url: 'api/applystudents/list-by-classid/' + data[i].classPlanId,
|
||||
async: false,
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
success: function (userData) {
|
||||
data[i].applyCount = userData.length;
|
||||
classPlanArray.push( data[i]);
|
||||
}
|
||||
});
|
||||
}
|
||||
laytpl(document.getElementById('distributionClassPlansBoxTemplate').innerHTML).render(classPlanArray, function (html) {
|
||||
console.log(classPlanArray);
|
||||
document.getElementById('distributionClassPlansBox').innerHTML = html;
|
||||
});
|
||||
form.render('checkbox', 'distributionClassPlansBox');
|
||||
}
|
||||
}, function (code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
}, function (code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化考场
|
||||
function initDistributionFields() {
|
||||
stationArray = new Array();
|
||||
top.restAjax.get(top.restAjax.path('api/institution/list?institutionType=考点信息', []), {}, null, function(code, data, args) {
|
||||
dataLength = data.length;
|
||||
$.ajax({
|
||||
url:'api/institution/list?institutionType=考点信息',
|
||||
async:false,
|
||||
type:'get',
|
||||
dataType:'json',
|
||||
success: function (data) {
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var institutionData = {index:i, data:data[i]};
|
||||
top.restAjax.get(top.restAjax.path('api/organization/list?organizationType={organizationType}', [data[i].institutionId]), {}, institutionData, function(code, orgData, args) {
|
||||
var stationData = {stationName:args.data.institutionName, fieldArray:orgData};
|
||||
$.ajax({
|
||||
url: 'api/organization/list?organizationType=' + data[i].institutionId,
|
||||
async: false,
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
success: function (orgData) {
|
||||
var stationData = {stationName: data[i].institutionName, fieldArray: orgData};
|
||||
stationArray.push(stationData);
|
||||
if(args.index == dataLength - 1) {
|
||||
}
|
||||
});
|
||||
}
|
||||
laytpl(document.getElementById('distributionFieldsBoxTemplate').innerHTML).render(stationArray, function (html) {
|
||||
console.log(stationArray);
|
||||
document.getElementById('distributionFieldsBox').innerHTML = html;
|
||||
});
|
||||
form.render('checkbox', 'distributionFieldsBox');
|
||||
}
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// var stationArray;
|
||||
// var classPlanArray;
|
||||
// var dataLength = 0;
|
||||
// var planLength = 0;
|
||||
//
|
||||
// // 初始化开班计划
|
||||
// function initDistributionClassPlans() {
|
||||
// classPlanArray = new Array();
|
||||
// top.restAjax.get(top.restAjax.path('api/classplan/list?classPlanIdListIds={classPlanIds}', [ planId ]), {}, null, function (code, data, args) {
|
||||
// planLength = data.length;
|
||||
// for (var i = 0; i < data.length; i++) {
|
||||
// var planData = {index: i, data: data[i]};
|
||||
// top.restAjax.get(top.restAjax.path('api/applystudents/list-by-classid/{planId}', [ data[i].classPlanId ]), {}, planData, function (code, userData, args) {
|
||||
// var user = args.data;
|
||||
// user.applyCount = userData.length;
|
||||
// classPlanArray.push(user);
|
||||
// if (args.index == planLength - 1) {
|
||||
// laytpl(document.getElementById('distributionClassPlansBoxTemplate').innerHTML).render(classPlanArray, function (html) {
|
||||
// console.log(classPlanArray);
|
||||
// document.getElementById('distributionClassPlansBox').innerHTML = html;
|
||||
// });
|
||||
// form.render('checkbox', 'distributionClassPlansBox');
|
||||
// }
|
||||
// }, function (code, data) {
|
||||
// top.dialog.msg(data.msg);
|
||||
// });
|
||||
// }
|
||||
// }, function (code, data) {
|
||||
// top.dialog.msg(data.msg);
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// // 初始化考场
|
||||
// function initDistributionFields() {
|
||||
// stationArray = new Array();
|
||||
// top.restAjax.get(top.restAjax.path('api/institution/list?institutionType=考点信息', []), {}, null, function(code, data, args) {
|
||||
// dataLength = data.length;
|
||||
// for(var i = 0 ; i < data.length ; i++) {
|
||||
// var institutionData = {index:i, data:data[i]};
|
||||
// top.restAjax.get(top.restAjax.path('api/organization/list?organizationType={organizationType}', [data[i].institutionId]), {}, institutionData, function(code, orgData, args) {
|
||||
// var stationData = {stationName:args.data.institutionName, fieldArray:orgData};
|
||||
// stationArray.push(stationData);
|
||||
// if(args.index == dataLength - 1) {
|
||||
// laytpl(document.getElementById('distributionFieldsBoxTemplate').innerHTML).render(stationArray, function(html) {
|
||||
// console.log(stationArray);
|
||||
// document.getElementById('distributionFieldsBox').innerHTML = html;
|
||||
// });
|
||||
// form.render('checkbox', 'distributionFieldsBox');
|
||||
// }
|
||||
// }, function(code, data) {
|
||||
// top.dialog.msg(data.msg);
|
||||
// });
|
||||
// }
|
||||
// }, function(code, data) {
|
||||
// top.dialog.msg(data.msg);
|
||||
// });
|
||||
// }
|
||||
|
||||
// 初始化成立日期时间戳
|
||||
function initDistributionAllotTime() {
|
||||
laydate.render({
|
||||
|
@ -51,7 +51,7 @@
|
||||
var laydate = layui.laydate;
|
||||
var common = layui.common;
|
||||
var resizeTimeout = null;
|
||||
var tableUrl = 'api/examapply/listpage';
|
||||
var tableUrl = 'api/examapply/listpage?checkStatus=1';
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
@ -105,15 +105,6 @@
|
||||
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',
|
||||
templet: function(row) {
|
||||
var rowData = row.classPlanDTO[this.field];
|
||||
|
@ -39,7 +39,7 @@
|
||||
</style>
|
||||
<div class="layui-card" id="userinfo">
|
||||
<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="applyAuditState" name="applyAuditState" value="{{d.applyAuditState}}">
|
||||
<div class="layui-card-body">
|
||||
@ -76,8 +76,14 @@
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
var applyStudentsId = $('#applyStudentsId').val();
|
||||
top.restAjax.put(top.restAjax.path('api/applystudents/update/{applyStudentsId}', [applyStudentsId]), formData.field, null, function(code, data) {
|
||||
var applyId = $('#applyId').val();
|
||||
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) {
|
||||
top.dialog.msg('考试录入成功');
|
||||
window.location.reload();
|
||||
@ -161,7 +167,7 @@
|
||||
[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{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) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -170,7 +176,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'gender', width: 120, title: '性别', align:'center',
|
||||
{field: 'applySex', width: 120, title: '性别', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -179,7 +185,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'idCardNumber', width: 180, title: '公民身份证号', align:'center',
|
||||
{field: 'applyCardNumber', width: 180, title: '公民证件号码', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -188,7 +194,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'telephone', width: 150, title: '联系方式', align:'center',
|
||||
{field: 'applyPhone', width: 150, title: '联系方式', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -197,7 +203,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'nation', width: 120, title: '民族', align:'center',
|
||||
{field: 'applyCultureLevel', width: 120, title: '文化程度', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -206,55 +212,79 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'nativePlace', 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',
|
||||
{field: 'applyPhysicalState', width: 150, title: '身体状态', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
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) {
|
||||
var rowData = row[this.field];
|
||||
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) {
|
||||
var rowData = row[this.field];
|
||||
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) {
|
||||
var rowData;
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -266,7 +296,7 @@
|
||||
'code': 0,
|
||||
'msg': '',
|
||||
'count': data.total,
|
||||
'data': data.rows
|
||||
'data': data
|
||||
};
|
||||
}
|
||||
});
|
||||
@ -287,7 +317,7 @@
|
||||
|
||||
function insertScore(data){
|
||||
var tpldata = {
|
||||
"applyStudentsId": data.applyStudentsId,
|
||||
"applyId": data.applyId,
|
||||
"applyDataBirth": data.applyDataBirth,
|
||||
"applyAuditState": data.applyAuditState
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user