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

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