@@ -45,7 +45,7 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | ||||
if (CheckMark === "true") { | if (CheckMark === "true") { | ||||
learun.alert.warning("当前项目已审核不能编辑!"); | |||||
learun.alert.warning("当前项目已启用不能编辑!"); | |||||
return; | return; | ||||
} | } | ||||
learun.layerForm({ | learun.layerForm({ | ||||
@@ -40,7 +40,7 @@ var bootstrap = function ($, learun) { | |||||
maxHeight: 200, | maxHeight: 200, | ||||
select: function (item) { | select: function (item) { | ||||
var NDeptNo = $("#DeptNo").lrselectGet(); | var NDeptNo = $("#DeptNo").lrselectGet(); | ||||
if (NDeptNo != null && NDeptNo != "" && NDeptNo != undefined) { | |||||
if (NDeptNo != null && NDeptNo != "" && NDeptNo != 'undefined') { | |||||
$('#MajorNo').lrselectRefresh({ | $('#MajorNo').lrselectRefresh({ | ||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | ||||
param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" }, | param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" }, | ||||
@@ -51,7 +51,7 @@ var bootstrap = function ($, learun) { | |||||
} else { | } else { | ||||
$('#MajorNo').lrselectRefresh({ | $('#MajorNo').lrselectRefresh({ | ||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | ||||
param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " }, | |||||
param: { strWhere: " 1=1 and CheckMark=1 " }, | |||||
value: "majorno", | value: "majorno", | ||||
text: "majorname", | text: "majorname", | ||||
maxHeight: 200 | maxHeight: 200 | ||||
@@ -59,14 +59,20 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
} | } | ||||
}) | }) | ||||
$("#MajorNo").lrselect(); | |||||
$('#LessonNo').lrselect({ | |||||
placeholder: "请选择课程", | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', | |||||
value: 'value', | |||||
text: 'text' | |||||
$("#MajorNo").lrselect({ | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#LessonNo').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=LessonInfo', | |||||
param: { strWhere: " 1=1 and CheckMark=1 and teachmajorno='" + item.majorno + "'" }, | |||||
value: "lessonno", | |||||
text: "lessonname", | |||||
maxHeight: 200 | |||||
}); | |||||
} | |||||
} | |||||
}); | }); | ||||
$('#LessonNo').lrselect(); | |||||
$('#TeachDeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | $('#TeachDeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | ||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
@@ -83,7 +89,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
$('#StuSortNo').val('02'); | $('#StuSortNo').val('02'); | ||||
$('#LessonSortNo').val('2'); | |||||
$('#LessonSortNo').val('2'); | |||||
$('#CheckStyleNo').val('1'); | $('#CheckStyleNo').val('1'); | ||||
$('#ScoreRecordStyleNo').val('1'); | $('#ScoreRecordStyleNo').val('1'); | ||||
$('#CheckMark').val('1'); | $('#CheckMark').val('1'); | ||||
@@ -97,7 +103,7 @@ var bootstrap = function ($, learun) { | |||||
return false; | return false; | ||||
} | } | ||||
var nName = $("#LessonNo").find(".lr-select-placeholder").text(); | var nName = $("#LessonNo").find(".lr-select-placeholder").text(); | ||||
var Narray= nName.split("("); | |||||
var Narray = nName.split("("); | |||||
$("#LessonName").val(Narray[0]); | $("#LessonName").val(Narray[0]); | ||||
var postData = { | var postData = { | ||||
strEntity: JSON.stringify($('body').lrGetFormData()) | strEntity: JSON.stringify($('body').lrGetFormData()) | ||||
@@ -35,17 +35,25 @@ var bootstrap = function ($, learun) { | |||||
text: 'text' | text: 'text' | ||||
}); | }); | ||||
$('#Semester').lrDataItemSelect({ code: 'Semester' }); | $('#Semester').lrDataItemSelect({ code: 'Semester' }); | ||||
$("#MajorNo").lrselect(); | |||||
$('#MajorNo').lrselect({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
param: { strWhere: " 1=1 and CheckMark=1 " }, | |||||
value: "majorno", | |||||
text: "majorname", | |||||
maxHeight: 200, | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#LessonNo').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=LessonInfo', | |||||
param: { strWhere: " 1=1 and CheckMark=1 and teachmajorno='" + item.majorno + "'" }, | |||||
value: "lessonno", | |||||
text: "lessonname", | |||||
maxHeight: 200 | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); | $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); | ||||
//$('#LessonNo').lrselect({ | |||||
// placeholder: "请选择课程", | |||||
// allowSearch: true, | |||||
// url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', | |||||
// value: 'value', | |||||
// text: 'text', | |||||
// maxHeight: 200 | |||||
//}); | |||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
@@ -177,7 +185,7 @@ var bootstrap = function ($, learun) { | |||||
$('#titleinfo').text(item.text); | $('#titleinfo').text(item.text); | ||||
page.search(); | page.search(); | ||||
var NDeptNo = item.id; | var NDeptNo = item.id; | ||||
if (NDeptNo != null && NDeptNo != "" && NDeptNo != undefined) { | |||||
if (NDeptNo != null && NDeptNo != "" && NDeptNo != 'undefined') { | |||||
$('#MajorNo').lrselectRefresh({ | $('#MajorNo').lrselectRefresh({ | ||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | ||||
param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" }, | param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" }, | ||||
@@ -188,7 +196,7 @@ var bootstrap = function ($, learun) { | |||||
} else { | } else { | ||||
$('#MajorNo').lrselectRefresh({ | $('#MajorNo').lrselectRefresh({ | ||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | ||||
param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " }, | |||||
param: { strWhere: " 1=1 and CheckMark=1 " }, | |||||
value: "majorno", | value: "majorno", | ||||
text: "majorname", | text: "majorname", | ||||
maxHeight: 200 | maxHeight: 200 | ||||