1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/SOCTemplate/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- function reload() {
- $("#dgSOCTemplateList").cmsXDataTable("load", $.getDataGridParams("dgSOCTemplateList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgSOCTemplateList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.SOCTemplateID);
- });
- return d;
- }
- function detail(rowindex, rowdata) {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/SOCTemplate/TemplateDetail?templateID=" + rowdata.SOCTemplateID + "&MNU=" + mnu;
- $.popupTopWindow('课程SOC成果', redirectTo, 800, 600, null, null);
- }
- function SOCTemplate_Generate() {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/SOCTemplate/Generate?MNU=" + mnu;
- $.popupTopWindow('生成课程信息', redirectTo, 600, 300, null, null);
- }
- function SOCTemplate_Setting() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统信息", "请选择您要进行设置的信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统信息", "只能选择单个记录进行设置。");
- return;
- }
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/SOCTemplate/Edit?templateID=" + d + "&MNU=" + mnu;
- $.popupTopWindow('课程SOC设置', redirectTo, 1000, 700, null, null);
- }
- function SOCTemplate_Add() {
- var d = validChoose();
- if (d.length > 0) {
- $.popupTopWindow('课程SOC设置复制新增', CMS_SystemConfig.VirtualDirectoryPath + '/SOCTemplate/CopyAdd?templateID=' + d[0] + '&MNU=' + mnu, 1000, 700, null, null);
- } else {
- var redirectTo = url + "?MNU=" + mnu;
- $.popupTopWindow('课程SOC设置新增', redirectTo, 1000, 700, null, null);
- }
- }
- function SOCTemplate_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/SOCTemplate/Delete', { SOCTemplateIDs: d }, function (data) {
- if (data == "删除成功!") {
- $.messager.alert("系统提示", data);
- $("#dgSOCTemplateList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- //Excel导出
- function SOCTemplate_Export() {
- var d = validChoose().join(',');
- $("[name='SelectedID']").val(d);
- $("#formQuery").submit();
- }
|