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.

124 lines
3.9 KiB

3 weeks ago
  1. 
  2. @{
  3. ViewBag.Title = "Index";
  4. Layout = "~/Views/Shared/_Form.cshtml";
  5. }
  6. <link href="~/Content/js/select2/select2.min.css" rel="stylesheet" />
  7. <link href="~/Content/css/bootstrap/bootstrap-select.css" rel="stylesheet" />
  8. <script src="~/Content/js/datepicker/WdatePicker.js"></script>
  9. <script src="~/Content/js/bootstrap/bootstrap-select.js"></script>
  10. <script src="~/Content/js/select2/select2.min.js"></script>
  11. <script src="~/Content/js/layer/layer.js"></script>
  12. <style>
  13. #Additem {
  14. margin-left: 45%;
  15. }
  16. #AddTemitem {
  17. margin-right: 45%;
  18. }
  19. .ui-jqgrid .ui-jqgrid-btable tbody tr.jqgrow td {
  20. overflow: inherit;
  21. word-wrap: break-word;
  22. }
  23. .ui-jqgrid tr.jqgrow td {
  24. white-space: normal !important;
  25. height: auto;
  26. }
  27. </style>
  28. <script>
  29. debugger;
  30. var Lots = $.request("Lots");
  31. var RoleEnCode = '@NFine.Code.OperatorProvider.Provider.GetCurrent().UserCode'
  32. var WorkPoint = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
  33. $(function () {
  34. InitControl();
  35. $("#txtMUSER").val(RoleEnCode);
  36. })
  37. function submitForm() {
  38. debugger;
  39. if (!$('#form1').formValid()) {
  40. return false;
  41. }
  42. var PrintTemplate = $("#sel_CodeType").val();//单据类型
  43. var PrintCount = $("#txtPring").val();//打印个数
  44. $.submitForm({
  45. url: "/HGWMS/WMSCreateItemLot/PrintViewByLotSingle",
  46. param: { Lots: JSON.stringify(Lots), PrintCount: PrintCount, PrintTemplate: PrintTemplate },
  47. success: function (data) {
  48. if (data.state == "success") {
  49. $.currentWindow().$("#gridList").trigger("reloadGrid");
  50. }
  51. else {
  52. alert(data.messages);
  53. }
  54. }
  55. })
  56. }
  57. function InitControl() {
  58. var $CodeType = $("#sel_CodeType");
  59. $CodeType.select2({
  60. allowClear: true,
  61. escapeMarkup: function (m) {
  62. return m;
  63. }
  64. });
  65. $.ajax({
  66. url: "/HGWMS/WMSCreateItemLot/GetPrintTemplate?"+ Math.random(),
  67. dataType: "json",
  68. async: false,
  69. success: function (data) {
  70. $.each(data, function (index, item) {
  71. $CodeType.append("<option value='" + item.Code + "'>&nbsp;" + item.Name + "</option>");
  72. });
  73. }
  74. });
  75. }
  76. </script>
  77. <form id="form1">
  78. <div class="topPanel" style="height:10px">
  79. <div class="btn-group">
  80. @*<a id="AddItemLot" style="margin-left:3px;" class="btn btn-primary" onclick="btnCreate()"><i class="fa fa-pencil-square-o"></i>添加明细</a>
  81. <a id="refresh" class="btn btn-primary" style="margin-left:3px;" onclick="reloadData()"><span class="glyphicon glyphicon-refresh"></span></a>*@
  82. </div>
  83. </div>
  84. <div style="margin-right: 20px;">
  85. <table class="form">
  86. <tr>
  87. <th class="formTitle">维护人:</th>
  88. <td class="formValue">
  89. <input id="txtMUSER" type="text" readonly="readonly" class="form-control" />
  90. </td>
  91. <th class="formTitle"><span class="required" style="color:red">*</span>打印张数:</th>
  92. <td class="formValue">
  93. <input id="txtPring" type="text" class="form-control" oninput="value=value.replace(/[^\d]/g,'')" required />
  94. </td>
  95. </tr>
  96. <tr>
  97. <th class="formTitle">模板类型:</th>
  98. <td class="formValue">
  99. <select id="sel_CodeType" name="sel_CodeType" class="form-control select2 required" style="width: 230px" placeholder="请选择模板类型..."></select>
  100. <input type="hidden" id="hidetext" />
  101. </td>
  102. </tr>
  103. </table>
  104. </div>
  105. </form>