StockInDetail.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/StockInDetail/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. function reload() {
  8. $("#dgStockInDetailList").cmsXDataTable("load", $.getDataGridParams("dgStockInDetailList"));
  9. }
  10. //获取选中的数据
  11. function validChoose() {
  12. var d = [];
  13. $.each($("#dgStockInDetailList").cmsXDataTable("getSelections"), function (index) {
  14. d.push(this.StockInDetailID);
  15. });
  16. return d;
  17. }
  18. //修改
  19. function ET06_05_02_StockInDetail_Update() {
  20. var d = validChoose();
  21. if (d.length == 0) {
  22. $.messager.alert("系统提示", "请选择您要修改的信息。");
  23. return;
  24. }
  25. if (d.length > 1) {
  26. $.messager.alert("系统提示", "只能选择单个记录进行修改。");
  27. return;
  28. }
  29. var redirectTo = url + '?stockInDetailID=' + d + '&MNU=' + mnu;
  30. $.popupTopWindow('入库明细修改', redirectTo, 800, 550, null, null);
  31. }
  32. //导入
  33. function ET06_05_02_StockInDetail_Import() {
  34. }
  35. //导出
  36. function ET06_05_02_StockInDetail_Export() {
  37. $("#formQuery").submit();
  38. }
  39. //出库明细列表列表导出
  40. function StockOutDetail_Export()
  41. {
  42. $("#formQuery").submit();
  43. }
  44. //删除
  45. function ET06_05_02_StockInDetail_Delete() {
  46. var d = validChoose().join(',');
  47. if (d == "") {
  48. $.messager.alert("系统提示", "请选择您要删除的信息。");
  49. return;
  50. }
  51. $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
  52. if (r) {
  53. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/StockInDetail/Delete', { stockInDetailIDs: d }, function (data) {
  54. if (data == "删除成功。") {
  55. $.messager.alert("系统提示", data);
  56. $("#dgStockInDetailList").cmsXDataTable('load');
  57. } else {
  58. $.messager.alert("系统提示", data);
  59. }
  60. });
  61. }
  62. });
  63. }
  64. //添加
  65. function ET06_05_02_StockInDetail_Add() {
  66. var redirectTo = url + '?MNU=' + mnu;
  67. $.popupTopWindow('入库明细添加', redirectTo, 800, 550, null, null);
  68. }
  69. //入库明细导出
  70. function ET06_05_01_StockIn_Detail_Export()
  71. {
  72. $("#formQuery").submit();
  73. }
  74. function QueryCourseDropdownList() {
  75. reload();
  76. }
  77. function QuerySchoolYearDropdownList() {
  78. reload();
  79. }
  80. function QueryCollegeDropdownList() {
  81. reload();
  82. }
  83. function QueryPublishDropdownList() {
  84. reload();
  85. }