Dictionary.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/Dictionary/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. //刷新
  8. function reload() {
  9. $("#dgDictionaryList").cmsXDataTable("load", $.getDataGridParams("dgDictionaryList"));
  10. }
  11. //获取选中的数据
  12. function validChoose() {
  13. var d = [];
  14. $.each($("#dgDictionaryList").cmsXDataTable("getSelections"), function (index) {
  15. d.push(this.DictionaryCode);
  16. });
  17. return d;
  18. }
  19. //新增
  20. function Dictionary_Add() {
  21. }
  22. //修改
  23. function Dictionary_Update() {
  24. var d = validChoose();
  25. if (d.length == 0) {
  26. $.messager.alert("系统信息", "请选择您要修改的信息。");
  27. return;
  28. }
  29. if (d.length > 1) {
  30. $.messager.alert("系统信息", "只能选择单个记录进行修改。");
  31. return;
  32. }
  33. var redirectTo = url + "?dictionaryCode=" + d + "&MNU=" + mnu;
  34. $.popupTopWindow('字典类型修改', redirectTo, 650, 245, null, null);
  35. }
  36. //删除
  37. function Dictionary_Delete() {
  38. }
  39. //设置列颜色为红色
  40. function SetRedColumn(index, row, value) {
  41. return " <span style=\"color: red;\">" + value + "</span>";
  42. }
  43. //Excel导出
  44. function Dictionary_Export() {
  45. $("#formQuery").submit();
  46. }