1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/Library/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //新增
- function Library_Add() {
- var redirectTo = url + '?MNU=' + mnu;
- $.popupTopWindow('书库基本信息新增', redirectTo, 700, 270, null, null);
-
- }
- function reload() {
- $("#dgLibraryList").cmsXDataTable("load", $.getDataGridParams("dgLibraryList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgLibraryList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.LibraryID);
- });
- return d;
- }
- //点击列表更新
- function edit(rowindex, rowdata) {
- var redirectTo = url + "?libraryID=" + rowdata.LibraryID + "&MNU=" + mnu + "&isView=1";
- $.popupTopWindow("书库基本信息详情", redirectTo, 700, 270, null, null);
- }
- //修改按钮
- function Library_Update() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要修改的书库信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = url + "?libraryID=" + d + "&MNU=" + mnu;
- $.popupTopWindow("书库基本信息修改", redirectTo, 700, 270, null, null);
- }
- //删除
- function Library_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的书库信息!");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除该书库信息?", function (r) {
- if (r) {
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/Library/Delete', { libraryIDs: d }, function (data) {
- if (data == "删除成功") {
- $.messager.alert("系统提示", "删除成功!");
- $("#dgLibraryList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- function Library_Export() {
- $("#formQuery").submit();
- }
- function SelectCampusCode(v) {
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/Library/GetCampusCodeByCampusID', { campusID: v.Value }, function (data) {
- $('input[name="CampusCode"]').val(data);
- });
- }
|