1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/SOCDetail/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- function reload() {
- $("#dgSOCDetailList").cmsXDataTable("load", $.getDataGridParams("dgSOCDetailList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgSOCDetailList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.SOCDetailID);
- });
- return d;
- }
- function SOCDetail_Update() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统信息", "请选择您要进行修改的信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统信息", "只能选择单个记录进行修改。");
- return;
- }
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/SOC/CheckCanSetting', {}, function (data) {
- if (!data.IsSuccess) {
- $.messager.alert("系统提示", "只有教师角色才能修改");
- }else{
- var redirectTo = url + "?SOCDetailID=" + d + "&MNU=" + mnu;
- $.popupTopWindow('SOC明细修改', redirectTo, 800, 600, null, null);
- }
- });
- }
- function SOCDetail_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/SOC/CheckCanSetting', {}, function (data) {
- if (!data.IsSuccess) {
- $.messager.alert("系统提示", "只有教师角色才能删除");
- } else {
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/SOCDetail/Delete', { SOCDetailIDs: d }, function (data) {
- if (data == "删除成功!") {
- $.messager.alert("系统提示", data);
- $("#dgSOCDetailList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- });
- }
- function SOCDetail_Export() {
- var d = validChoose().join(',');
- $("[name='SelectedID']").val(d);
- $("#formQuery").submit();
- }
|