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.

93 lines
3.0 KiB

  1. 
  2. @{
  3. ViewBag.Title = "SeachInventory";
  4. Layout = "~/Views/Shared/_Index.cshtml";
  5. }
  6. <link href="~/Content/js/select2/select2.min.css" rel="stylesheet" />
  7. <link href="~/Content/js/dialog/dialog.css?v=20120420" rel="stylesheet" />
  8. <script src="~/Content/js/datepicker/WdatePicker.js"></script>
  9. <script src="~/Content/js/select2/select2.min.js"></script>
  10. <script>
  11. debugger;
  12. $(function(){
  13. Init();
  14. })
  15. function Init() {
  16. document.getElementById("gridPanel").innerHTML = '<table id="gridList"></table><div id="gridPager"></div> ';//重置grid
  17. var LocationCode = $("#txt_LocationCode").val();
  18. $("#gridList").dataGrid({
  19. url: "/WMS/ICSMTDOC/GetGridLocationCode" + "?LocationCode=" + LocationCode + "&" + Math.random(),
  20. height: $(window).height() - 20,
  21. width: $(window).width() - 300,
  22. colModel: [
  23. { label: '主键', name: 'ID', hidden: true, key: true },
  24. { label: '库位编码', name: 'LocationCode', width: 150, align: 'left' },
  25. { label: '库位名称', name: 'LocationName', width: 150, align: 'left' },
  26. { label: '仓库编号', name: 'WarehouseCode', width: 150, align: 'left' },
  27. { label: '仓库名称', name: 'WarehouseName', width: 100, align: 'left' },
  28. ],
  29. pager: "#gridPager",
  30. sortorder: "desc",
  31. sortname: 'LocationCode',
  32. viewrecords: true,
  33. multiselect: true,
  34. gridComplete: function () {
  35. },
  36. beforeSelectRow: function (rowid, e) {
  37. $("#gridList").jqGrid('resetSelection');
  38. return (true);
  39. },
  40. })
  41. };
  42. function submitForm() {
  43. var rows = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  44. if (rows.length != 1) {
  45. $.modalAlertNew("WMS00079");
  46. return;
  47. }
  48. var rowdata = $("#gridList").jqGrid("getRowData", rows[0]);
  49. var obj = {
  50. LocationCode: rowdata.LocationCode,
  51. }
  52. return obj;
  53. }
  54. function Close() {
  55. $.modalClose();
  56. }
  57. </script>
  58. <div class="topPanel" style="height:50px">
  59. <div class="search">
  60. <table>
  61. <tr>
  62. <td>
  63. <label>库位编码:</label>
  64. </td>
  65. <td>
  66. <div class="input-group">
  67. <input id="txt_LocationCode" type="text" class="form-control" placeholder="库位编码" style="width: 120px;">
  68. </div>
  69. </td>
  70. <td>
  71. <a id="Search" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="Init()"><i class="fa fa-pencil-square-o"></i>查询</a>
  72. </td>
  73. </tr>
  74. <tr></tr>
  75. </table>
  76. </div>
  77. </div>
  78. <div class="gridPanel" id="gridPanel">
  79. <table id="gridList"></table>
  80. <div id="gridPager"></div>
  81. </div>