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.

115 lines
3.3 KiB

3 weeks ago
  1. 
  2. @{
  3. ViewBag.Title = "Index";
  4. Layout = "~/Views/Shared/_Form.cshtml";
  5. }
  6. <style>
  7. .form {
  8. margin: 55px -25px;
  9. }
  10. </style>
  11. <script>
  12. debugger;
  13. // var ID = $.request("ID");
  14. var ID = sessionStorage.getItem("Arguments"); // 获取参数
  15. debugger;
  16. var WorkPoints = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
  17. $(function () {
  18. $("#minPackQty").keyup(function () {
  19. $(this).val($(this).val().replace(/[^0-9.]/g, ''));
  20. }).bind("paste", function () { //CTR+V事件处理
  21. $(this).val($(this).val().replace(/[^0-9.]/g, ''));
  22. }).css("ime-mode", "disabled"); //CSS设置输入法不可用
  23. $("#thisCreateQty").keyup(function () {
  24. $(this).val($(this).val().replace(/[^0-9.]/g, ''));
  25. }).bind("paste", function () { //CTR+V事件处理
  26. $(this).val($(this).val().replace(/[^0-9.]/g, ''));
  27. }).css("ime-mode", "disabled"); //CSS设置输入法不可用
  28. $("#cretePageCount").keyup(function () {
  29. $(this).val($(this).val().replace(/[^0-9.]/g, ''));
  30. }).bind("paste", function () { //CTR+V事件处理
  31. $(this).val($(this).val().replace(/[^0-9.]/g, ''));
  32. }).css("ime-mode", "disabled"); //CSS设置输入法不可用
  33. if (!!ID) {
  34. InitControl();
  35. }
  36. });
  37. function InitControl() {
  38. debugger;
  39. var $LotNo = $("#sel_LotNo");
  40. $LotNo.select2({
  41. allowClear: true,
  42. escapeMarkup: function (m) {
  43. return m;
  44. }
  45. });
  46. $.ajax({
  47. url: "/JHWMS/Deciliter/GetLotNoByID?ID=" + ID + "&" + Math.random(),
  48. dataType: "json",
  49. async: false,
  50. success: function (data) {
  51. $.each(data, function (index, item) {
  52. $LotNo.append("<option value='" + item.ID + "'>" + item.LotNo + "</option>");
  53. });
  54. }
  55. });
  56. }
  57. function submitForm() {
  58. debugger;
  59. if (!$('#form1').formValid()) {
  60. return false;
  61. }
  62. var LotNo= $("#sel_LotNo").find("option:selected").text();
  63. // var LotNo = $("#sel_LotNo").text();
  64. if (LotNo == "") {
  65. $.modalAlertNew("WMS00073");
  66. return;
  67. }
  68. $.modalConfirm("合批后不能恢复,确定合批吗?", function (r) {
  69. if (r) {
  70. $.submitForm({
  71. url: "/JHWMS/Deciliter/Combine?LotNo=" + LotNo + "&ID=" + ID +"&" + Math.random(),
  72. // param: { keyValue: IDlist },
  73. success: function () {
  74. $.currentWindow().$("#gridList").trigger("reloadGrid");
  75. }
  76. })
  77. }
  78. });
  79. }
  80. </script>
  81. <form id="form1">
  82. <div style="padding-top: 20px; margin-right: 20px;">
  83. <table class="form">
  84. <tr >
  85. <th class="formTitle">料品条码:</th>
  86. <td style="width:100px">
  87. <select id="sel_LotNo" name="sel_LotNo" class="form-control select2" style="width: 500px" placeholder="料品条码"></select>
  88. <input type="hidden" id="hidetext" />
  89. </td>
  90. </tr>
  91. </table>
  92. </div>
  93. </form>