InventoryManagement.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/InventoryManagement/List";
  2. var mnu = "";
  3. var InventoryUrl = CMS_SystemConfig.VirtualDirectoryPath + "/InventoryManagement/InventoryDetail";
  4. var StockInUrl = CMS_SystemConfig.VirtualDirectoryPath + "/InventoryManagement/StockInDetail";
  5. var StockOutUrl = CMS_SystemConfig.VirtualDirectoryPath + "/InventoryManagement/StockOutDetail";
  6. //加载
  7. $(function () {
  8. mnu = $.SystemGeneral.getUrlParam("MNU");
  9. reload();
  10. })
  11. function reload() {
  12. $("#dgInventoryManagementList").cmsXDataTable("load", $.getDataGridParams("dgInventoryManagementList"));
  13. }
  14. //获取选中的数据
  15. function validChoose() {
  16. var d = [];
  17. $.each($("#dgInventoryManagementList").cmsXDataTable("getSelections"), function (index) {
  18. d.push(this.TeachingMaterialPoolID);
  19. });
  20. return d;
  21. }
  22. //Excel导出
  23. function InventoryManagement_Export() {
  24. $("#formQuery").submit();
  25. }
  26. //刷新库存
  27. function InventoryManagement_Add() {
  28. $.messager.confirm("系统提示", "是否刷新库存统计信息?", function (r) {
  29. if (r) {
  30. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/InventoryManagement/Edit', { reloadType: "Add" }, function (data) {
  31. if (data == "成功") {
  32. $.messager.alert("系统提示", "刷新成功!");
  33. $("#dgInventoryManagementList").cmsXDataTable('load');
  34. } else {
  35. $.messager.alert("系统提示", data);
  36. }
  37. });
  38. }
  39. });
  40. }
  41. /*------------------------分------割-------线-----------------------*/
  42. //库存明细
  43. function InventoryDetail(rowindex, rowdata) {
  44. var redirectTo = InventoryUrl + "?teachingMaterialPoolID=" + rowdata.TeachingMaterialPoolID + "&MNU=" + mnu;
  45. $.popupTopWindow("库存明细", redirectTo, 800, 600, null, null);
  46. }
  47. //入库明细
  48. function StockInDetail(rowindex, rowdata) {
  49. var schoolyearIDStr = $("#SchoolYearDropdown").combobox("getValue");
  50. var redirectTo = StockInUrl + "?teachingMaterialPoolID=" + rowdata.TeachingMaterialPoolID + "&schoolyearID=" + schoolyearIDStr + "&discountPrice=" + rowdata.DiscountPrice + "&MNU=" + mnu;
  51. $.popupTopWindow("入库明细", redirectTo, 800, 600, null, null);
  52. }
  53. //出库明细
  54. function StockOutDetail(rowindex, rowdata) {
  55. var schoolyearIDStr = $("#SchoolYearDropdown").combobox("getValue");
  56. var redirectTo = StockOutUrl + "?teachingMaterialPoolID=" + rowdata.TeachingMaterialPoolID + "&schoolyearID=" + schoolyearIDStr + "&discountPrice=" + rowdata.DiscountPrice + "&MNU=" + mnu;
  57. $.popupTopWindow("出库明细", redirectTo, 800, 600, null, null);
  58. }
  59. /*------------------------分------割-------线------End-------------*/
  60. //学年
  61. function QuerySchoolYearDropdownList(data) {
  62. reload();
  63. }
  64. //教材类型
  65. function QueryTeachingMaterialTypeDropdownList(data) {
  66. reload();
  67. }
  68. //教材名称
  69. function QueryTeachingMaterialDropdownList(data) {
  70. reload();
  71. }
  72. //出版单位
  73. function QueryPublishDropdownList(data) {
  74. reload();
  75. }