123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/Specialty/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //刷新
- function reload() {
- $("#dgSpecialtyList").cmsXDataTable("load", $.getDataGridParams("dgSpecialtyList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgSpecialtyList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.SpecialtyID);
- });
- return d;
- }
- //新增
- function Specialty_Add() {
- var d = validChoose();
- if (d.length > 0) {
- $.popupTopWindow('专业信息复制新增', CMS_SystemConfig.VirtualDirectoryPath + '/Specialty/CopyAdd?specialtyID=' + d[0] + '&MNU=' + mnu, 650, 320, null, null);
- } else {
- var redirectTo = url + "?MNU=" + mnu;
- $.popupTopWindow('专业信息新增', redirectTo, 650, 320, null, null);
- }
- }
- //查看
- function edit(rowindex, rowdata) {
- var redirectTo = url + "?specialtyID=" + rowdata.SpecialtyID + "&Isdisplay=false&MNU=" + mnu;
- $.popupTopWindow('专业信息', redirectTo, 650, 320, null, null);
- }
- //修改按钮
- function Specialty_Update() {
- var d = validChoose();
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要修改的信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = url + "?specialtyID=" + d + "&MNU=" + mnu;
- $.popupTopWindow('专业信息修改', redirectTo, 650, 320, null, null);
- }
- //删除
- function Specialty_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/Specialty/Delete', { specialtyIDs: d }, function (data) {
- if (data == "删除成功。") {
- $.messager.alert("系统提示", data);
- $("#dgSpecialtyList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- //设置相应的行颜色为红色
- function SetRedGrid(rowIndex, rowData) {
- if (rowData.RecordStatus <= 0) {
- return "color: red;";
- } else {
- return "";
- }
- }
- //Excel导出
- function Specialty_Export() {
- $("#formQuery").submit();
- }
- //Excel导入
- function Specialty_Import() {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/Specialty/Import?MNU=' + mnu;
- $.popupTopWindow('专业信息导入', redirectTo, 420, 300, reload);
- }
- //联动
- function QueryStandardDropdownList(data) {
- reload();
- }
- function QueryEducationDropdownList(data) {
- reload();
- }
- function QueryLearningformDropdownList(data) {
- reload();
- }
|