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.

112 lines
3.7 KiB

3 weeks ago
  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 Invcode = $("#txt_Invcode").val();
  18. var InvName = $("#txt_InvName").val();
  19. var Invstd = $("#txt_Invstd").val();
  20. $("#gridList").dataGrid({
  21. url: "/WMS/ICSMTDOC/GetInvcode" + "?Invcode=" + Invcode + "&InvName=" + InvName + "&Invstd=" + Invstd + "&" + Math.random(),
  22. height: $(window).height() - 20,
  23. width: $(window).width() - 300,
  24. colModel: [
  25. { label: '主键', name: 'ID', hidden: true, key: true },
  26. { label: '料品编码', name: 'InvCode', width: 150, align: 'left' },
  27. { label: '料品名称', name: 'InvName', width: 150, align: 'left' },
  28. { label: '规格型号', name: 'InvStd', width: 150, align: 'left' },
  29. { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
  30. { label: '料品描述', name: 'InvDesc', width: 150, align: 'left' },
  31. ],
  32. pager: "#gridPager",
  33. sortorder: "desc",
  34. sortname: 'InvCode',
  35. viewrecords: true,
  36. multiselect: true,
  37. gridComplete: function () {
  38. },
  39. beforeSelectRow: function (rowid, e) {
  40. $("#gridList").jqGrid('resetSelection');
  41. return (true);
  42. },
  43. })
  44. };
  45. function submitForm() {
  46. var rows = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  47. if (rows.length != 1) {
  48. $.modalAlertNew("WMS00079");
  49. return;
  50. }
  51. var rowdata = $("#gridList").jqGrid("getRowData", rows[0]);
  52. var obj = {
  53. InvCode: rowdata.InvCode,
  54. }
  55. return obj;
  56. }
  57. function Close() {
  58. $.modalClose();
  59. }
  60. </script>
  61. <div class="topPanel" style="height:50px">
  62. <div class="search">
  63. <table>
  64. <tr>
  65. <td>
  66. <label>料品编码:</label>
  67. </td>
  68. <td>
  69. <div class="input-group">
  70. <input id="txt_Invcode" type="text" class="form-control" placeholder="料品编码" style="width: 120px;">
  71. </div>
  72. </td>
  73. <td>
  74. <label>料品名称:</label>
  75. </td>
  76. <td>
  77. <div class="input-group">
  78. <input id="txt_InvName" type="text" class="form-control" placeholder="料品名称" style="width: 120px;">
  79. </div>
  80. </td>
  81. <td>
  82. <label>料品规格:</label>
  83. </td>
  84. <td>
  85. <div class="input-group">
  86. <input id="txt_Invstd" type="text" class="form-control" placeholder="料品规格" style="width: 120px;">
  87. </div>
  88. </td>
  89. <td>
  90. <a id="Search" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="Init()"><i class="fa fa-pencil-square-o"></i>查询</a>
  91. </td>
  92. </tr>
  93. <tr></tr>
  94. </table>
  95. </div>
  96. </div>
  97. <div class="gridPanel" id="gridPanel">
  98. <table id="gridList"></table>
  99. <div id="gridPager"></div>
  100. </div>