123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/ChangeApprove/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //刷新
- function reload() {
- $("#dgChangeApproveList").cmsXDataTable("load", $.getDataGridParams("dgChangeApproveList"));
- }
- //获取选中的数据All
- function validChooseAll() {
- var d = [];
- $.each($("#dgChangeApproveList").cmsXDataTable("getSelections"), function (index) {
- d.push(this);
- });
- return d;
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgChangeApproveList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.StudentChangeID);
- });
- return d;
- }
- //查看明细
- function edit(rowindex, rowdata) {
- var redirectTo = url + "?studentChangeID=" + rowdata.StudentChangeID + "&MNU=" + mnu + "&type=detail";
- $.popupTopWindow('异动审核信息', redirectTo, 720, 550, null, null);
- }
- //删除
- function ChangeApprove_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/ChangeApprove/Delete', { studentChangeIDs: d }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", data.Message);
- $("#dgChangeApproveList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- //审核
- function ChangeApprove_Approve() {
- var studentChangeIDs = validChoose();
- if (studentChangeIDs.length == 0) {
- $.messager.alert("系统提示", "请选择您要审核的信息。");
- return;
- }
- if (studentChangeIDs.length > 1) {
- //批量审核
- var approveID = studentChangeIDs[0];
- $.popupTopWindow('审核信息', CMS_SystemConfig.VirtualDirectoryPath + '/Common/ApproveHandler?TableName=CF_DifferentDynamic&FormID=' + approveID,
- 400, 300, ChangeApprove_ApproveConfirm);
- }
- else {
- var studentChangeID = studentChangeIDs;
- //单个审核
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/ChangeApprove/Approve?MNU=" + mnu + "&studentChangeID=" + studentChangeID + "&isEnable=" + CMS_SystemConfig.StudentChangeIsEnabled;
- $.popupTopWindow('异动审核', redirectTo, 720, 550, null, null);
- }
- }
- //确定(审核)
- function ChangeApprove_ApproveConfirm(action) {
- if (!action) {
- return;
- }
- if (action.ActionID == "") {
- return;
- }
- var approveIDs = validChoose().join(',');
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + "/ChangeApprove/ApproveConfirm", { studentChangeIDs: approveIDs, actionID: action.Action, comment: action.Comment },
- function (data) {
- if (data.IsSuccess) {
- reload();
- }
- $.messager.alert("系统提示", data.Message);
- }, 'json');
- }
- //设置列颜色为红色
- function SetRedColumn(index, row, value) {
- return " <span style=\"color: red;\">" + value + "</span>";
- }
- //Excel导出
- function ChangeApprove_Export() {
- $("#formQuery").submit();
- }
- //联动查询
- function queryCampus(data) {
- var campusID = $("#CampusDropdown").combogridX("getValue");
- 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 queryGrade(data) {
- queryClass();
- }
- function queryStandard(data) {
- queryClass();
- }
- function queryLearnSystem(data) {
- queryClass();
- }
- function queryGrademajor(data) {
- queryClass();
- }
- function queryClass() {
- var jsonString = "";
- var parameterString = "";
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- var gradeID = $("#DictionaryGrade").combogridX("getValue");
- var standardID = $("#DictionaryStandard").combogridX("getValue");
- var educationID = $("#DictionaryEducation").combogridX("getValue");
- var learningformID = $("#DictionaryLearningform").combogridX("getValue");
- var learnSystem = $("#DictionaryLearnSystem").combogridX("getValue");
- //var grademajorID = $("#GrademajorComboGrid").combogridX("getValue");
- if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
- if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
- if (gradeID != nonSelect) parameterString += "DictionaryGrade|*|" + gradeID + "|@|";
- if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
- if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
- if (learningformID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningformID + "|@|";
- if (learnSystem != nonSelect) parameterString += "DictionaryLearnSystem|*|" + learnSystem + "|@|";
- //if (grademajorID != nonSelect) parameterString += "GrademajorComboGrid|*|" + grademajorID + "|@|";
- if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#DictionaryStandard").combogridX("reload", eval(jsonString));
- //$("#GrademajorComboGrid").combogridX("reload", eval(jsonString));
- $("#ClassmajorComboGrid").combogridX("reload", eval(jsonString));
- }
- else {
- $("#DictionaryStandard").combogridX("reload");
- //$("#GrademajorComboGrid").combogridX("reload");
- $("#ClassmajorComboGrid").combogridX("reload");
- }
- reload();
- }
|