123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/GraduateCardApply/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //刷新
- function reload() {
- $("#dgGraduateCardApplyList").cmsXDataTable("load", $.getDataGridParams("dgGraduateCardApplyList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgGraduateCardApplyList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.GraduateCardApplyID);
- });
- return d;
- }
- //名单生成
- function GraduateCardApply_Create() {
- $.messager.confirm("系统提示", "您确定要生成当前毕业学期(" + gradSchoolYearCode + ")的毕业去向申请信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + "/GraduateCardApply/GraduateCardApplyCreate", $.getDataGridParams("dgGraduateCardApplyList"), function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", data.Message);
- $("#dgGraduateCardApplyList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- //新增
- function GraduateCardApply_Add() {
- //var d = validChoose();
- //if (d.length > 0) {
- // $.popupTopWindow('去向申请复制新增', CMS_SystemConfig.VirtualDirectoryPath + '/GraduateCardApply/CopyAdd?graduateCardApplyID=' + d[0] + '&MNU=' + mnu, 680, 385, null, null);
- //} else {
- // var redirectTo = url + "?MNU=" + mnu;
- // $.popupTopWindow('去向申请新增', redirectTo, 680, 385, null, null);
- //}
- //采用以下方式进行新增
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/GraduateCardApply/GraduateCardApplyBatchAdd" + "?MNU=" + mnu;
- $.popupTopWindow('去向申请新增', redirectTo, 860, 530, reload, null);
- }
- //修改
- function GraduateCardApply_Edit() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统信息", "请选择您要修改的信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统信息", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = url + "?graduateCardApplyID=" + d + "&MNU=" + mnu;
- $.popupTopWindow('去向申请修改', redirectTo, 680, 385, null, null);
- }
- //删除
- function GraduateCardApply_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/GraduateCardApply/Delete', { graduateCardApplyIDs: d }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", data.Message);
- $("#dgGraduateCardApplyList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- //学生最终成绩明细
- function editFinallyScore(rowindex, rowdata) {
- redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/GraduateCardApply/FinallyScoreList?graduateCardApplyID=" + rowdata.GraduateCardApplyID + "&MNU=" + mnu;
- $.popupTopWindow('学生最终成绩明细', redirectTo, 1200, 540, null, null);
- }
- //提交(毕业申请提交)
- function GraduationApply_Submit() {
- var d = validChoose();
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要提交的信息。");
- return;
- }
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/GraduationApply/GraduationConditionPackageSubmit" + "?MNU=" + mnu;
- $.popupTopWindow('毕业申请提交', redirectTo, 500, 280, null, d);
- }
- //结业
- function GraduationApply_Completion() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要处理的信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要对选择的信息进行结业处理?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/GraduationApply/Completion', { graduationApplyIDs: d }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", data.Message);
- $("#dgGraduationApplyList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- //设置列颜色为红色
- function SetRedColumn(index, row, value) {
- return " <span style=\"color: red;\">" + value + "</span>";
- }
- //Excel导出
- function GraduateCardApply_Export() {
- $("#formQuery").submit();
- }
- //联动查询
- function queryCampus(data) {
- var campusID = $("#CampusDropdown").combogridX("getValue");
- if (campusID != nonSelect) {
- var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
- $("#CollegeDropdown").combogridX("reload", eval(jsonString));
- }
- queryClass();
- }
- function queryCollege(data) {
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|";
- jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})";
- $("#CollegeDropdown").combogridX("reload", eval(jsonString));
- $("#DictionaryStandard").combogridX("reload", eval(jsonString));
- queryClass();
- }
- function querySchoolyear(data) {
- queryClass();
- }
- function queryStandard(data) {
- queryClass();
- }
- function queryClass() {
- var jsonString = "";
- var parameterString = "";
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- var schoolYearID = $("#DictionarySchoolyear").combobox("getValue");
- var standardID = $("#DictionaryStandard").combogridX("getValue");
- var educationID = $("#DictionaryEducation").combogridX("getValue");
- var learningFormID = $("#DictionaryLearningform").combogridX("getValue");
- if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
- if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
- if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|";
- if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
- if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
- if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
- if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#DictionaryStandard").combogridX("reload", eval(jsonString));
- }
- else {
- $("#DictionaryStandard").combogridX("reload");
- }
- reload();
- }
|