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

105 lines
3.3 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 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. var Type = $.request("Type");
  13. $(function(){
  14. Init();
  15. })
  16. function Init() {
  17. var CodeName = '';
  18. debugger;
  19. if (Type == '1') {CodeName = '项目号';}
  20. if (Type == '2') { CodeName = '批次'; }
  21. if (Type == '3') { CodeName = '版本'; }
  22. if (Type == '4') { CodeName = '厂牌'; }
  23. if (Type == '5') { CodeName = '自由项1'; }
  24. if (Type == '6') { CodeName = '自由项2'; }
  25. if (Type == '7') { CodeName = '自由项3'; }
  26. if (Type == '8') { CodeName = '自由项4'; }
  27. if (Type == '9') { CodeName = '自由项5'; }
  28. if (Type == '10') { CodeName = '自由项6'; }
  29. if (Type == '11') { CodeName = '自由项7'; }
  30. if (Type == '12') { CodeName = '自由项8'; }
  31. if (Type == '13') { CodeName = '自由项9'; }
  32. if (Type == '14') { CodeName = '自由项10'; }
  33. document.getElementById("gridPanel").innerHTML = '<table id="gridList"></table><div id="gridPager"></div> ';//重置grid
  34. var Common = $("#txt_BatchCode").val();
  35. $("#gridList").dataGrid({
  36. url: "/WMS/ICSMTDOC/GetCode?Type=" + Type + "&Common=" + Common + "&" + Math.random(),
  37. height: $(window).height() - 20,
  38. width: $(window).width() - 300,
  39. colModel: [
  40. { label: CodeName, name: 'Code', width: 150, align: 'left' },
  41. ],
  42. pager: "#gridPager",
  43. sortorder: "desc",
  44. sortname: 'Code',
  45. viewrecords: true,
  46. multiselect: true,
  47. gridComplete: function () {
  48. },
  49. beforeSelectRow: function (rowid, e) {
  50. $("#gridList").jqGrid('resetSelection');
  51. return (true);
  52. },
  53. })
  54. };
  55. function submitForm() {
  56. var rows = $("#gridList").jqGrid('getGridParam', 'selarrrow');
  57. if (rows.length != 1) {
  58. $.modalAlertNew("WMS00079");
  59. return;
  60. }
  61. var rowdata = $("#gridList").jqGrid("getRowData", rows[0]);
  62. var obj = {
  63. Code: rowdata.Code,
  64. }
  65. return obj;
  66. }
  67. function Close() {
  68. $.modalClose();
  69. }
  70. </script>
  71. <div class="topPanel" style="height:50px">
  72. <div class="search">
  73. <table>
  74. <tr>
  75. <td>
  76. <label>批次号:</label>
  77. </td>
  78. <td>
  79. <div class="input-group">
  80. <input id="txt_BatchCode" type="text" class="form-control" placeholder="批次号" style="width: 120px;">
  81. </div>
  82. </td>
  83. <td>
  84. <a id="Search" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="Init()"><i class="fa fa-pencil-square-o"></i>查询</a>
  85. </td>
  86. </tr>
  87. <tr></tr>
  88. </table>
  89. </div>
  90. </div>
  91. <div class="gridPanel" id="gridPanel">
  92. <table id="gridList"></table>
  93. <div id="gridPager"></div>
  94. </div>