123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/DifferentDynamicApply/Edit?a=1";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- });
- //新增
- function DifferentDynamicApply_Add() {
- showDialog(null, "add");
- }
- //联动查询
- function queryStandard(data) {
- queryClass();
- reload();
- }
- 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));
- $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
- // if (campusID != nonSelect) {
- // var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
- // $("#CollegeDropdown").combogridX("reload", eval(jsonString));
- // }
- queryClass();
- reload();
- }
- function queryClass() {
- var jsonString = "";
- var parameterString = "";
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- //var educationID = $("#Education").combobox("getValue");
- var schoolYearID = $("#SchoolyearDictionaryDropDown").combobox("getValue");
- var standardID = $("#StandardDictionaryDropDown").combogridX("getValue");
- var LearnSystem = $("#DictionaryLearnSystem").combogridX("getValue");
- //var learningFormID = $("#LearningformDictionaryDropDown").combobox("getValue");
- if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
- if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
- //if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
- if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|";
- if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
- //if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
- if (LearnSystem != nonSelect) parameterString += "DictionaryLearnSystem|*|" + LearnSystem + "|@|";
- if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#ClassmajorDropdown").combogridX("reload", eval(jsonString));
- $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
- } else {
- $("#ClassmajorDropdown").combogridX("reload");
- $("#StandardDictionaryDropDown").combogridX("reload");
- }
- reload();
- }
- function reload() {
- $("#dgList").cmsXDataTable("load", $.getDataGridParams("dgList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.EntityID);
- });
- return d;
- }
- //点击列表更新
- function edit(rowindex, rowdata) {
- showDialog(rowdata.EntityID, "look");
- }
- //修改按钮
- function DifferentDynamicApply_Update() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要修改的异动申请信息!");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统信息", "只能选择单个记录进行修改。");
- return;
- }
- showDialog(d, "update");
- }
- function showDialog(id, type) {
- var redirectTo = url;
- if (id) {
- redirectTo = redirectTo + '&id=' + id;
- }
- if (type == "look") {
- redirectTo = redirectTo + '&MNU=' + mnu + '&isView=1';
- }
- else {
- redirectTo = redirectTo + '&MNU=' + mnu
- }
- $.popupTopWindow('异动申请信息', redirectTo + '&type=' + type, 800, 520, null, null);
- }
- //删除
- function DifferentDynamicApply_Delete() {
- var selected = $("#dgList").cmsXDataTable("getSelections");
- if (selected.length == 0) {
- $.messager.alert("系统提示", "请选择您要删除的异动申请信息!");
- return;
- }
- var ids = [];
- for (var i = 0; i < selected.length; i++) {
- // if (selected[i].EntityApprovalStatus != 0 && selected[i].EntityApprovalStatus != 100) {
- // $.messager.alert("系统提示", "只能删除未提交、已退回状态的异动申请信息!");
- // return;
- // }
- ids.push(selected[i].EntityID);
- }
- $.messager.confirm("系统提示", "您确定要删除该异动申请信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/DifferentDynamicApply/Delete', { ids: ids.join(',') }, function (data) {
- if (data == "删除成功") {
- $.messager.alert("系统提示", "删除成功!");
- $("#dgList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- //提交
- function DifferentDynamicApply_Submit() {
- var selected = $("#dgList").cmsXDataTable("getSelections");
- if (selected.length == 0) {
- $.messager.alert("系统提示", "请选择您要提交的异动申请信息!");
- return;
- }
- var ids = [];
- for (var i = 0; i < selected.length; i++) {
- //if (selected[i].EntityApprovalStatus != 0) {
- // $.messager.alert("系统提示", "只能提交未提交状态的异动申请信息!");
- // return;
- //}
- ids.push(selected[i].EntityID);
- }
- $.messager.confirm("系统提示", "您确定要提交该异动申请信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/DifferentDynamicApply/Submit', { ids: ids.join(',') }, function (data) {
- if (data == "提交成功") {
- $.messager.alert("系统提示", "提交成功!");
- $("#dgList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- function DifferentDynamicApply_Export() {
- $("#formQuery").submit();
- }
- function QueryCampusDropdownList(data) {
- $("#CollegeDropdown").combobox("reload", CMS_SystemConfig.VirtualDirectoryPath + "/College/CollegeDropdownListBanid?campusID=" + data.Value + "");
- reload();
- }
- function QueryCollegeDropdownList(data) {
- reload();
- }
- function DifferentDynamicApply_Report() {
- var d = [];
- $.each($("#dgList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.EntityID);
- });
- var selected = $("#dgList").cmsXDataTable("getSelections");
- for (var i = 0; i < selected.length; i++) {
- if (selected[i].EntityApprovalStatus == 1) {
- $.messager.alert("系统提示", "所选数据中含有未提交的数据,该部分数据将不能进行申请表的生成,请先进行提交!");
- return;
- }
- }
- //var Attribute = document.getElementsByName("Attribute")[0].value.split("\"Value\":\"")[1].split("\"")[0]; //获取自定义查询的当前字段
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/DifferentDynamicApply/DifferentDynamicApplyReport?MNU=' + mnu;
- var DifferentDynamicID = d.join(',');
- var SchoolyearID = $("#SchoolYearDropdown").combobox("getValue");
- var CollegeID = $("#CollegeDropdown").combogridX("getValue");
- var yearID = $("#SchoolyearDictionaryDropDown").combobox("getValue");
- var StandardID = $("#StandardDictionaryDropDown").combogridX("getValue");
- var LearningformID = $("#DictionaryLearningform").combobox("getValue");
- var EducationID = $("#DictionaryEducation").combobox("getValue");
- var LearnSystem = $("#DictionaryLearnSystem").combogridX("getValue");
- var ClassmajorID = $("#ClassmajorDropdown").combogridX("getValue");
- var DifferentDynamicType = $("#DictionaryDifferentDynamicType").combobox("getValue");
- var ApprovalStatus = $("#DictionaryDifferentDynamicStatus").combobox("getValue");
- $.popupTopWindow('异动申请表', redirectTo, 750, 650, null,
- {
- SchoolyearID: SchoolyearID,
- CollegeID : CollegeID,
- yearID : yearID,
- StandardID : StandardID,
- LearningformID : LearningformID,
- EducationID : EducationID,
- LearnSystem:LearnSystem,
- ClassmajorID:ClassmajorID,
- DifferentDynamicType : DifferentDynamicType,
- ApprovalStatus : ApprovalStatus,
- DifferentDynamicID :DifferentDynamicID,
- UserID: UserID
- });
- }
|