Browse Source

学籍信息年级联动

长阳分支中职
ndbs 3 weeks ago
parent
commit
86abd9fc34
2 changed files with 179 additions and 74 deletions
  1. +89
    -37
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.js
  2. +90
    -37
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/FormTran.js

+ 89
- 37
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.js View File

@@ -98,11 +98,6 @@ var bootstrap = function ($, learun) {
value: "classno", value: "classno",
text: "classname" text: "classname"
}); });
$('#Grade').lrselect({
url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear',
value: 'value',
text: 'text'
});
$('#GuardianType').lrDataItemSelect({ code: 'GuardianType' }); $('#GuardianType').lrDataItemSelect({ code: 'GuardianType' });
$('#HealthStatus').lrDataItemSelect({ code: 'QRCodeHealthStatus' }); $('#HealthStatus').lrDataItemSelect({ code: 'QRCodeHealthStatus' });
$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' });
@@ -118,58 +113,115 @@ var bootstrap = function ($, learun) {
$('#StudyModality').lrDataItemSelect({ code: 'StudyModality' }); $('#StudyModality').lrDataItemSelect({ code: 'StudyModality' });
$('#ResidenceNo').lrDataItemSelect({ code: 'ResidenceNo' }); $('#ResidenceNo').lrDataItemSelect({ code: 'ResidenceNo' });
$('#DeptNo').lrselect({ $('#DeptNo').lrselect({
allowSearch: true,
value: "deptno", value: "deptno",
text: "deptname", text: "deptname",
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo',
select: function (item) { select: function (item) {
if (item) { if (item) {
$('#MajorNo').lrselectRefresh({ $('#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({ $('#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({ $('#MajorNo').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
value: "majorno", value: "majorno",
text: "majorname", text: "majorname",
param: { strWhere: "1=1 AND CheckMark=1" },
select: function (item) { 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' }); $('#IsSingle').lrDataItemSelect({ code: 'YesOrNoBit' });
$('#IsLeft').lrDataItemSelect({ code: 'YesOrNoBit' }); $('#IsLeft').lrDataItemSelect({ code: 'YesOrNoBit' });
$('#IsDisability').lrDataItemSelect({ code: 'YesOrNoBit' }); $('#IsDisability').lrDataItemSelect({ code: 'YesOrNoBit' });


+ 90
- 37
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/FormTran.js View File

@@ -98,11 +98,7 @@ var bootstrap = function ($, learun) {
value: "classno", value: "classno",
text: "classname" text: "classname"
}); });
$('#Grade').lrselect({
url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear',
value: 'value',
text: 'text'
});
$('#HealthStatus').lrDataItemSelect({ code: 'QRCodeHealthStatus' }); $('#HealthStatus').lrDataItemSelect({ code: 'QRCodeHealthStatus' });
$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' });
$('#NationalityNo').lrDataSourceSelect({ code: 'BCdNationality', value: 'nationalityno', text: 'nationality' }); $('#NationalityNo').lrDataSourceSelect({ code: 'BCdNationality', value: 'nationalityno', text: 'nationality' });
@@ -117,58 +113,115 @@ var bootstrap = function ($, learun) {
$('#StudyModality').lrDataItemSelect({ code: 'StudyModality' }); $('#StudyModality').lrDataItemSelect({ code: 'StudyModality' });
$('#ResidenceNo').lrDataItemSelect({ code: 'ResidenceNo' }); $('#ResidenceNo').lrDataItemSelect({ code: 'ResidenceNo' });
$('#DeptNo').lrselect({ $('#DeptNo').lrselect({
allowSearch: true,
value: "deptno", value: "deptno",
text: "deptname", text: "deptname",
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo',
select: function (item) { select: function (item) {
if (item) { if (item) {
$('#MajorNo').lrselectRefresh({ $('#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({ $('#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({ $('#MajorNo').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
value: "majorno", value: "majorno",
text: "majorname", text: "majorname",
param: { strWhere: "1=1 AND CheckMark=1" },
select: function (item) { 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' }); $('#GuardianType').lrDataItemSelect({ code: 'GuardianType' });
$('#IsSingle').lrDataItemSelect({ code: 'YesOrNoBit' }); $('#IsSingle').lrDataItemSelect({ code: 'YesOrNoBit' });
$('#IsLeft').lrDataItemSelect({ code: 'YesOrNoBit' }); $('#IsLeft').lrDataItemSelect({ code: 'YesOrNoBit' });


Loading…
Cancel
Save