@@ -6,6 +6,7 @@ | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var MajorNo = request('MajorNo'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
@@ -15,14 +16,24 @@ var bootstrap = function ($, learun) { | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
if (MajorNo != null && MajorNo != "" && MajorNo != undefined) { | |||
console.log(MajorNo,321); | |||
$('#ClassNo').lrselect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: " 1=1 and MajorNo = '" + MajorNo + "'" }, | |||
value: "classno", | |||
text: "classname", | |||
maxHeight: 200 | |||
}); | |||
} | |||
$("#ClassNo").lrselect(); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
@@ -29,7 +29,7 @@ | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">中考总分<font face="宋体">*</font></div> | |||
<input id="StuScore" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||
<input id="StuScore" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatint" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuVolunteer"> | |||
<div class="lr-form-item-title">身份证号<font face="宋体">*</font></div> | |||
@@ -19,11 +19,36 @@ var bootstrap = function ($, learun) { | |||
$('#IsPlan').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
$('#Sex').lrDataItemSelect({ code: 'usersex' }); | |||
$('#MajorOne').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); | |||
$('#MajorThree').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); | |||
$('#MajorTwo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
//$('#MajorOne').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); | |||
//$('#MajorThree').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); | |||
//$('#MajorTwo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); | |||
$('#MajorNo').lrselect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
value: 'majorno', | |||
text: 'majorname', | |||
maxHeight: 200, | |||
select: function (item) { | |||
var classNo = $("#MajorNo").lrselectGet(); | |||
if (classNo != null && classNo != "" && classNo != undefined) { | |||
$('#ClassNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: " 1=1 and majorno in (" + classNo + ")" }, | |||
value: "classno", | |||
text: "classname", | |||
maxHeight: 200 | |||
}); | |||
} else { | |||
$('#ClassNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: " 1=1 and majorno ='' " }, | |||
value: "classno", | |||
text: "classname", | |||
maxHeight: 200 | |||
}); | |||
} | |||
} | |||
}) | |||
$("#ClassNo").lrselect(); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
@@ -20,8 +20,33 @@ var bootstrap = function ($, learun) { | |||
//$('#MajorOne').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); | |||
//$('#MajorTwo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); | |||
//$('#MajorThree').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
$('#MajorNo').lrselect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
value: 'majorno', | |||
text: 'majorname', | |||
maxHeight: 200, | |||
select: function (item) { | |||
var classNo = $("#MajorNo").lrselectGet(); | |||
if (classNo != null && classNo != "" && classNo != undefined) { | |||
$('#ClassNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: " 1=1 and majorno in (" + classNo + ")" }, | |||
value: "classno", | |||
text: "classname", | |||
maxHeight: 200 | |||
}); | |||
} else { | |||
$('#ClassNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: " 1=1 and majorno ='' " }, | |||
value: "classno", | |||
text: "classname", | |||
maxHeight: 200 | |||
}); | |||
} | |||
} | |||
}) | |||
$("#ClassNo").lrselect(); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -37,18 +62,33 @@ var bootstrap = function ($, learun) { | |||
learun.alert.warning("选中记录包含审核通过的数据!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'classform', | |||
title: '选择班级', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuVolunteer/ClassForm?keyValue=' + keyValue, | |||
width: 400, | |||
height: 300, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
var MajorNos = $('#gridtable').jfGridValue('MajorNo'); | |||
var arrayList = MajorNos.split(','); | |||
var res = true; | |||
for (var i = 0; i < arrayList.length; i++) { | |||
if (arrayList[0] == arrayList[i]) { | |||
MajorNos = arrayList[0]; | |||
res = true; | |||
} else { | |||
res = false; | |||
} | |||
} | |||
if (res) { | |||
learun.layerForm({ | |||
id: 'classform', | |||
title: '选择班级', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuVolunteer/ClassForm?keyValue=' + keyValue + '&MajorNo=' + MajorNos, | |||
width: 400, | |||
height: 300, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} else { | |||
learun.alert.warning("请选择相同专业学生进行分班!"); | |||
return; | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
@@ -26,6 +26,11 @@ | |||
<div class="lr-form-item-title">性别</div> | |||
<div id="Sex"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">分数</div> | |||
<div id="StuScore"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -7,6 +7,7 @@ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var strsql = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
@@ -17,11 +18,25 @@ var bootstrap = function ($, learun) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#Sex').lrDataItemSelect({ code: 'usersex' }); | |||
$('#StuScore').lrDataItemSelect({ | |||
code: 'EnrollScore', | |||
select: function (item) { | |||
if (item != undefined) { | |||
switch (item.id) { | |||
case item.id: | |||
strsql = " and t.StuScore " + item.id + ""; | |||
break; | |||
default: | |||
break; | |||
} | |||
} | |||
} | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
//// 录取 | |||
// 录取 | |||
$('#lr_enroll').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
@@ -106,6 +121,7 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.SqlParameter = strsql + " and MajorOne is null and IsCYSchool = 'True' "; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -30,7 +30,7 @@ | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">分班审核</div> | |||
<select id="ClassStatus"> | |||
<option value="">==请选择==</option> | |||
@@ -38,7 +38,7 @@ | |||
<option value="0">待审核</option> | |||
</select> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学籍状态</div> | |||
<select id="StuCodeStatus"> | |||
<option value="">==请选择==</option> | |||
@@ -15,10 +15,35 @@ var bootstrap = function ($, learun) { | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
}, 270, 400); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); | |||
$('#MajorNo').lrselect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
value: 'majorno', | |||
text: 'majorname', | |||
maxHeight: 200, | |||
select: function (item) { | |||
var classNo = $("#MajorNo").lrselectGet(); | |||
if (classNo != null && classNo != "" && classNo != undefined) { | |||
$('#ClassNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: " 1=1 and majorno in (" + classNo + ")" }, | |||
value: "classno", | |||
text: "classname", | |||
maxHeight: 200 | |||
}); | |||
} else { | |||
$('#ClassNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||
param: { strWhere: " 1=1 and majorno ='' " }, | |||
value: "classno", | |||
text: "classname", | |||
maxHeight: 200 | |||
}); | |||
} | |||
} | |||
}) | |||
$("#ClassNo").lrselect(); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -716,7 +716,7 @@ and t.StuNo not in (select b.StuNo from StuInfoBasic b where b.StuNo=t.StuNo) " | |||
var arr = keyValue.Split(',').ToList(); | |||
foreach (var id in arr) | |||
{ | |||
string sql = $"update StuVolunteer set MajorNo='{MajorNo}',MajorStatus=0 where ID='{id}' and (StuNo is null or len(StuNo)=0); update StuVolunteer set ClassNo='{MajorNo}',ClassStatus=0 where ID='{id}' and (StuNo is not null or len(StuNo)>0)"; | |||
string sql = $"update StuVolunteer set MajorNo = '{MajorNo}',ClassNo = '', MajorStatus = 0 ,ClassStatus = 0 where ID='{id}' and (StuNo is null or len(StuNo)=0); update StuVolunteer set MajorNo='{MajorNo}', ClassNo = '', MajorStatus =0,ClassStatus=0 where ID='{id}' and (StuNo is not null or len(StuNo)>0)"; | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
} | |||
} | |||