@@ -18,6 +18,7 @@ var bootstrap = function ($, learun) { | |||||
bind: function () { | bind: function () { | ||||
$('#Class').lrselect({ | $('#Class').lrselect({ | ||||
type: 'multiple',// default,tree,treemultiple,gird,multiple | |||||
value: "classno", | value: "classno", | ||||
text: "classname" | text: "classname" | ||||
}); | }); | ||||
@@ -31,7 +32,7 @@ var bootstrap = function ($, learun) { | |||||
if (item) { | if (item) { | ||||
$('#Class').lrselectRefresh({ | $('#Class').lrselectRefresh({ | ||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | ||||
param: { code: "bjsj", strWhere: "DeptNo='" + item.deptno + "' and majorno='" + item.majorno + "'" } | |||||
param: { code: "bjsj", strWhere: "DeptNo='" + item.deptno + "' and majorno='" + item.majorno + "' order by classno desc" } | |||||
}); | }); | ||||
} | } | ||||
@@ -24,7 +24,22 @@ var bootstrap = function ($, learun) { | |||||
if (!!keyValue) { | if (!!keyValue) { | ||||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/GetBedListByRoomId?RoomId=' + keyValue, function (data) { | $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/GetBedListByRoomId?RoomId=' + keyValue, function (data) { | ||||
$('#content').html(''); | $('#content').html(''); | ||||
var strWhere = " ClassNo='" + Class + "'"; | |||||
var strWhere = ""; | |||||
var cArray = Class.split(','); | |||||
if (cArray.length > 1) { | |||||
strWhere += '( ' | |||||
for (var j = 0; j < cArray.length; j++) { | |||||
if (j == 0) { | |||||
strWhere += ' ClassNo = ' + cArray[j] + ' '; | |||||
} else { | |||||
strWhere += ' or ClassNo = ' + cArray[j] + ' '; | |||||
} | |||||
} | |||||
strWhere += ') '; | |||||
} else { | |||||
strWhere += " ClassNo='" + Class + "'"; | |||||
} | |||||
//console.log(strWhere, "strWhere") | |||||
if (Sex == '0') { | if (Sex == '0') { | ||||
strWhere += " and GenderNo=0"; | strWhere += " and GenderNo=0"; | ||||
} | } | ||||
@@ -426,15 +426,35 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
label: "班级", name: "Class", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||||
key: value, | |||||
keyId: 'classno', | |||||
callback: function (_data) { | |||||
callback(_data['classname']); | |||||
label: "班级", name: "Class", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
if (value && value.indexOf(',') != -1) { | |||||
var content = ''; | |||||
var texts = value.split(','); | |||||
for (var i = 0; i < texts.length; i++) { | |||||
learun.clientdata.getAsync('custmerData', | |||||
{ | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||||
key: texts[i], | |||||
keyId: 'classno', | |||||
callback: function (_data) { | |||||
content += _data['classname'] + ','; | |||||
} | |||||
}); | |||||
} | } | ||||
}); | |||||
content = content.substring(0, content.length - 1); | |||||
callback(content); | |||||
} else { | |||||
learun.clientdata.getAsync('custmerData', | |||||
{ | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||||
key: value, | |||||
keyId: 'classno', | |||||
callback: function (_data) { | |||||
callback(_data['classname']); | |||||
} | |||||
}); | |||||
} | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
@@ -294,7 +294,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
return this.BaseRepository("CollegeMIS").FindTable("select * from CdMajor where CheckMark=1 "); | |||||
return this.BaseRepository("CollegeMIS").FindTable("select * from CdMajor where CheckMark=1 order by MajorNo desc"); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -204,7 +204,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
return this.BaseRepository("CollegeMIS").FindTable("select * from ClassInfo where CheckMark=1 "); | |||||
return this.BaseRepository("CollegeMIS").FindTable("select * from ClassInfo where CheckMark=1 order by classno desc "); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||