12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + '/Campus/Edit';
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //刷新
- function reload() {
- $("#dgCampusList").cmsXDataTable("load", $.getDataGridParams("dgCampusList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgCampusList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.CampusID);
- });
- return d;
- }
- //新增
- function Campus_Add() {
- var d = validChoose();
- if (d.length > 0) {
- $.popupTopWindow(EMIS_CampusLabel + '信息复制新增', CMS_SystemConfig.VirtualDirectoryPath + '/Campus/CopyAdd?campusID=' + d[0] + '&MNU=' + mnu, 650, 420, null, null);
- } else {
- var redirectTo = url + "?MNU=" + mnu;
- $.popupTopWindow(EMIS_CampusLabel + '信息新增', redirectTo, 650, 420, null, null);
- }
- }
- //修改
- function Campus_Update() {
- var d = validChoose();
- if (d == "") {
- $.messager.alert("系统信息", "请选择您要修改的信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统信息", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = url + "?campusID=" + d + "&MNU=" + mnu + "&type=edit";
- $.popupTopWindow(EMIS_CampusLabel + '信息修改', redirectTo, 650, 420, null, null);
- }
- //查看
- function edit(rowindex, rowdata) {
- var redirectTo = url + "?campusID=" + rowdata.CampusID + "&MNU=" + mnu + "&type=detail";
- $.popupTopWindow(EMIS_CampusLabel + "信息", redirectTo, 650, 420, null, null);
- }
- //删除
- function Campus_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统信息", "请选择您要删除的信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/Campus/Delete', { campusIDs: d }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", data.Message);
- $("#dgCampusList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- //校区对应的院系所明细
- function editCollegeCount(rowindex, rowdata) {
- redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/Campus/CollegeList?campusID=" + rowdata.CampusID + "&MNU=" + mnu;
- $.popupTopWindow(EMIS_CollegeLabel + '明细', redirectTo, 800, 500, null, null);
- }
- //导出Excel
- function Campus_Export() {
- $("#formQuery").submit();
- }
|