You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.7 KiB

  1. @{
  2. ViewBag.Title = "Index";
  3. Layout = "~/Views/Shared/_Index.cshtml";
  4. }
  5. <script>
  6. $(function () {
  7. gridList();
  8. });
  9. function gridList() {
  10. var $gridList = $("#gridList");
  11. $gridList.dataGrid({
  12. url: "/WMS/HomeWork/GetICSWarehouse?" + Math.random(),
  13. height: $(window).height() -50,
  14. width: $(window).width() - 400,
  15. cellEdit: true,
  16. cellsubmit: "clientArray",
  17. colModel: [
  18. { label: "主键", name: "ID", hidden: true, key: true },
  19. { label: '仓库编码', name: 'WarehouseCode', width: 120, align: 'left' },
  20. { label: '仓库名称', name: 'WarehouseName', width: 150, align: 'left' },
  21. { label: '站点', name: 'WorkPoint', width: 150, align: 'left' },
  22. ],
  23. width: "100%",
  24. multiselect: true,
  25. autowidth: true,
  26. rownumbers: true,
  27. viewrecords: true,
  28. });
  29. }
  30. function submitForm() {
  31. debugger;
  32. var arr = [];
  33. var objarr = '';
  34. var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  35. for (var i = 0; i < objList.length; i++) {
  36. var rowId = objList[i];
  37. var rowData = $("#gridList").jqGrid('getRowData', rowId);
  38. objarr += "" + rowData.WarehouseCode + ",";
  39. }
  40. postData = "&keyvalue=" + objarr
  41. $.download("/WMS/HomeWork/ICSWarehouseExportAll" + "?" + Math.random(), postData, 'post');
  42. }
  43. </script>
  44. <!--色牢度-->
  45. <div class="gridPanel" style="width: 100% ">
  46. <div class="gridPanel">
  47. <table id="gridList"></table>
  48. </div>
  49. </div>