纽威
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.

94 lines
2.9 KiB

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