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.

71 lines
1.8 KiB

3 weeks ago
  1. @{
  2. ViewBag.Title = "Index";
  3. Layout = "~/Views/Shared/_Form.cshtml";
  4. }
  5. <script >
  6. debugger;
  7. $(() => {
  8. $.ajax({
  9. url: "GetHighWareMsg?" + Math.random(),
  10. dataType: "json",
  11. async: false,
  12. success: function (dataObj) {
  13. debugger;
  14. if (dataObj != null && dataObj.data.length > 0) {
  15. for (var i = 0; i < dataObj.data.length; i++) {
  16. var warehouseCode = dataObj.data[i].WarehouseCode;
  17. var WareHouseName = dataObj.data[i].WareHouseName;
  18. const option = $('<option>', {
  19. value: warehouseCode,
  20. text: WareHouseName
  21. });
  22. $("#wareHouseCode").append(option);
  23. }
  24. }
  25. }
  26. });
  27. });
  28. function submitForm()
  29. {
  30. debugger;
  31. var value = $("#wareHouseCode").val();
  32. var text = $("#wareHouseCode option:selected").text();
  33. var type = $("#type").val();
  34. if (!value)
  35. {
  36. $.modalAlert("请选择立库仓库!");
  37. return false;
  38. }
  39. if (confirm("当前选择的仓库:" + text + ",确认吗?"))
  40. return true;
  41. else
  42. return false;
  43. }
  44. </script>
  45. <form id="form1">
  46. <div style="padding-top: 20px; margin-right: 20px;">
  47. <table class="form">
  48. <tr>
  49. <th class="formTitle">仓库编码</th>
  50. <td class="formValue">
  51. <select id="wareHouseCode" class="form-control" style="height:auto;" ></select>
  52. </td>
  53. </tr>
  54. </table>
  55. </div>
  56. </form>