123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/SpecialtyApply/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //刷新
- function reload() {
- $("#dgSpecialtyApplyList").cmsXDataTable("load", $.getDataGridParams("dgSpecialtyApplyList"));
- }
- //获取选中的数据All
- function validChooseAll() {
- var d = [];
- $.each($("#dgSpecialtyApplyList").cmsXDataTable("getSelections"), function (index) {
- d.push(this);
- });
- return d;
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgSpecialtyApplyList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.SpecialtyApplyID);
- });
- return d;
- }
- //查看
- function edit(rowindex, rowdata) {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/SpecialtyApply/Edit?specialtyApplyID=" + rowdata.SpecialtyApplyID + "&MNU=" + mnu + "&type=detail";
- $.popupTopWindow('专业申请信息', redirectTo, 680, 365, null, null);
- }
- //申请
- function SpecialtyApply_Add() {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/SpecialtyApply/SpecialtyApplyBatchAdd" + "?MNU=" + mnu;
- $.popupTopWindow('专业信息申请', redirectTo, 950, 540, reload, null);
- }
- //删除
- function SpecialtyApply_Delete() {
- var id = validChoose().join(',');
- if (id == "") {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
- //var d = validChooseAll();
- //if ($.grep(d, function (v, i) { return v.ApprovalStatus != startStatusID; }).length > 0) {
- // $.messager.alert("系统提示", "只能对未提交状态的信息进行删除。");
- // return;
- //}
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/SpecialtyApply/Delete', { specialtyApplyIDs: id }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", data.Message);
- $("#dgSpecialtyApplyList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- //提交
- function SpecialtyApply_Submit() {
- var id = validChoose().join(',');
- if (id.length == 0) {
- $.messager.alert("系统提示", "请选择您要提交的信息。");
- return;
- }
- var d = validChooseAll();
- if ($.grep(d, function (v, i) { return v.ApprovalStatus == endStatusID; }).length > 0) {
- $.messager.alert("系统提示", "只能对未提交、已退回状态的信息进行提交。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要对选择的信息进行提交?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/SpecialtyApply/Submit', { specialtyApplyIDs: id }, function (data) {
- if (data.IsSuccess == true) {
- $.messager.alert("系统提示", data.Message);
- $("#dgSpecialtyApplyList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- //Excel导出
- function SpecialtyApply_Export() {
- $("#formQuery").submit();
- }
- //联动查询
- function queryCampus(data) {
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
- $("#CollegeDropdown").combogridX("reload", eval(jsonString));
- 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));
- reload();
- }
- function queryGrade(data) {
- reload();
- }
- function queryStandard(data) {
- reload();
- }
|