diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.js index 2cca08d79..bcfa5ae23 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.js @@ -98,11 +98,6 @@ var bootstrap = function ($, learun) { value: "classno", text: "classname" }); - $('#Grade').lrselect({ - url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear', - value: 'value', - text: 'text' - }); $('#GuardianType').lrDataItemSelect({ code: 'GuardianType' }); $('#HealthStatus').lrDataItemSelect({ code: 'QRCodeHealthStatus' }); $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); @@ -118,58 +113,115 @@ var bootstrap = function ($, learun) { $('#StudyModality').lrDataItemSelect({ code: 'StudyModality' }); $('#ResidenceNo').lrDataItemSelect({ code: 'ResidenceNo' }); $('#DeptNo').lrselect({ + allowSearch: true, value: "deptno", text: "deptname", url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', select: function (item) { if (item) { $('#MajorNo').lrselectRefresh({ - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', - param: { code: "CdMajorInfo", strWhere: "DeptNo='" + item.deptno + "'" } + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" } }); - } - else { + } else { $('#MajorNo').lrselectRefresh({ - url: "", - data: [] + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { strWhere: "1=1 AND CheckMark=1" } }); } - $('#ClassNo').lrselectRefresh({ - url: "", - data: [] - }); + } }); $('#MajorNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', value: "majorno", text: "majorname", + param: { strWhere: "1=1 AND CheckMark=1" }, select: function (item) { - if (item) { - $('#ClassNo').lrselectRefresh({ - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', - param: { code: "bjsj", strWhere: "DeptNo='" + item.deptno + "' and majorno='" + item.majorno + "'" } - }); + var Grades = $("#Grade").lrselectGet(); + if (Grades != null && Grades != "" && Grades != "undefined") { + if (item) { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1 AND Grade='" + Grades + "' order by classno desc" } + }); + } else { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" } + }); + } + } else { + if (item) { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1 order by classno desc" } + }); + } else { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" } + }); + } } - } }); - - - $('#MajorNo').on("click", - function () { - var data = $('#DeptNo').lrselectGet(); - if (!data) { - learun.alert.error('请先选择系'); - } - }); - $('#ClassNo').on("click", - function () { - var data1 = $('#DeptNo').lrselectGet(); - var data2 = $('#MajorNo').lrselectGet(); - if (!data1 || !data2) { - learun.alert.error('请先选择系和专业'); + $('#Grade').lrselect({ + url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear', + value: "value", + text: "text", + select: function (item) { + var MajorNos = $("#MajorNo").lrselectGet(); + if (MajorNos != null && MajorNos != "" && MajorNos != "undefined") { + if (item) { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { + strWhere: "majorno='" + MajorNos + "' AND CheckMark=1 AND Grade='" + item.text + "' order by classno desc" + } + }); + } else { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" } + }); + } + } else { + if (item) { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { + strWhere: "CheckMark=1 AND Grade='" + item.text + "' order by classno desc" + } + }); + } else { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" } + }); + } } - }); + + } + }); + $('#ClassNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" }, + value: "classno", + text: "classname" + }); $('#IsSingle').lrDataItemSelect({ code: 'YesOrNoBit' }); $('#IsLeft').lrDataItemSelect({ code: 'YesOrNoBit' }); $('#IsDisability').lrDataItemSelect({ code: 'YesOrNoBit' }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/FormTran.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/FormTran.js index ff828413e..3d0fdaae9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/FormTran.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/FormTran.js @@ -98,11 +98,7 @@ var bootstrap = function ($, learun) { value: "classno", text: "classname" }); - $('#Grade').lrselect({ - url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear', - value: 'value', - text: 'text' - }); + $('#HealthStatus').lrDataItemSelect({ code: 'QRCodeHealthStatus' }); $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); $('#NationalityNo').lrDataSourceSelect({ code: 'BCdNationality', value: 'nationalityno', text: 'nationality' }); @@ -117,58 +113,115 @@ var bootstrap = function ($, learun) { $('#StudyModality').lrDataItemSelect({ code: 'StudyModality' }); $('#ResidenceNo').lrDataItemSelect({ code: 'ResidenceNo' }); $('#DeptNo').lrselect({ + allowSearch: true, value: "deptno", text: "deptname", url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', select: function (item) { if (item) { $('#MajorNo').lrselectRefresh({ - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', - param: { code: "CdMajorInfo", strWhere: "DeptNo='" + item.deptno + "'" } + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" } }); - } - else { + } else { $('#MajorNo').lrselectRefresh({ - url: "", - data: [] + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { strWhere: "1=1 AND CheckMark=1" } }); } - $('#ClassNo').lrselectRefresh({ - url: "", - data: [] - }); + } }); $('#MajorNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', value: "majorno", text: "majorname", + param: { strWhere: "1=1 AND CheckMark=1" }, select: function (item) { - if (item) { - $('#ClassNo').lrselectRefresh({ - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', - param: { code: "bjsj", strWhere: "DeptNo='" + item.deptno + "' and majorno='" + item.majorno + "'" } - }); + var Grades = $("#Grade").lrselectGet(); + if (Grades != null && Grades != "" && Grades != "undefined") { + if (item) { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1 AND Grade='" + Grades + "' order by classno desc" } + }); + } else { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" } + }); + } + } else { + if (item) { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1 order by classno desc" } + }); + } else { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" } + }); + } } - } }); - - - $('#MajorNo').on("click", - function () { - var data = $('#DeptNo').lrselectGet(); - if (!data) { - learun.alert.error('请先选择系'); - } - }); - $('#ClassNo').on("click", - function () { - var data1 = $('#DeptNo').lrselectGet(); - var data2 = $('#MajorNo').lrselectGet(); - if (!data1 || !data2) { - learun.alert.error('请先选择系和专业'); + $('#Grade').lrselect({ + url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear', + value: "value", + text: "text", + select: function (item) { + var MajorNos = $("#MajorNo").lrselectGet(); + if (MajorNos != null && MajorNos != "" && MajorNos != "undefined") { + if (item) { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { + strWhere: "majorno='" + MajorNos + "' AND CheckMark=1 AND Grade='" + item.text + "' order by classno desc" + } + }); + } else { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" } + }); + } + } else { + if (item) { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { + strWhere: "CheckMark=1 AND Grade='" + item.text + "' order by classno desc" + } + }); + } else { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" } + }); + } } - }); + + } + }); + $('#ClassNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" }, + value: "classno", + text: "classname" + }); $('#GuardianType').lrDataItemSelect({ code: 'GuardianType' }); $('#IsSingle').lrDataItemSelect({ code: 'YesOrNoBit' }); $('#IsLeft').lrDataItemSelect({ code: 'YesOrNoBit' });