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

133 lines
4.3 KiB

2 years ago
  1. 
  2. @{
  3. ViewBag.Title = "Index";
  4. Layout = "~/Views/Shared/_Index.cshtml";
  5. }
  6. <style>
  7. #ISO {
  8. width: 10px;
  9. }
  10. </style>
  11. <link href="~/Content/js/select2/select2.min.css" rel="stylesheet" />
  12. <script src="~/Content/js/select2/select2.min.js"></script>
  13. <script>
  14. var ID = $.request("ID");
  15. $(function () {
  16. if (ID != "") {
  17. $.ajax({
  18. url: "/WMS/BasicSettings/GetSys_Language?ID=" + ID ,
  19. //data: { keyValue: keyValue },
  20. dataType: "json",
  21. async: false,
  22. success: function (data) {
  23. debugger;
  24. $("#Code").val(data.rows[0].Code);
  25. $("#CnValue").val(data.rows[0].CnValue);
  26. $("#TwValue").val(data.rows[0].TwValue);
  27. $("#EnValue").val(data.rows[0].EnValue);
  28. }
  29. });
  30. } else {
  31. $.ajax({
  32. url: "/WMS/BasicSettings/GetSys_LanguageCode" + "?" + Math.random(),
  33. dataType: "json",
  34. async: false,
  35. success: function (data) {
  36. if (data.Code != '') {
  37. $("#Code").val(data.Code);
  38. $("#Code").attr("disabled", "disabled");
  39. }
  40. }
  41. });
  42. }
  43. });
  44. function submitForm() {
  45. var Code = $("#Code").val();
  46. var CnValue = $("#CnValue").val();
  47. var TwValue = $("#TwValue").val();
  48. var EnValue = $("#EnValue").val();
  49. if (Code == "" || Code == undefined) {
  50. $.modalAlertNew("WMS00105");
  51. return;
  52. }
  53. if (CnValue == "" || CnValue == undefined) {
  54. $.modalAlertNew("WMS00106");
  55. return;
  56. }
  57. if (TwValue == "" || TwValue == undefined) {
  58. $.modalAlertNew("WMS00107");
  59. return;
  60. }
  61. if (EnValue == "" || EnValue == undefined) {
  62. $.modalAlertNew("WMS00108");
  63. return;
  64. }
  65. var objArr = {
  66. ID:ID,
  67. Code: Code,
  68. CnValue: CnValue,
  69. TwValue: TwValue,
  70. EnValue: EnValue
  71. }
  72. debugger;
  73. if (ID!="") {
  74. $.submitForm({
  75. url: "/WMS/BasicSettings/UpdateSys_Language" + "?" + Math.random(),
  76. param: { keyValue: JSON.stringify(objArr) },
  77. success: function () {
  78. $.currentWindow().$("#gridList").trigger("reloadGrid");
  79. }
  80. })
  81. } else {
  82. $.submitForm({
  83. url: "/WMS/BasicSettings/InsertSys_Language" + "?" + Math.random(),
  84. param: { keyValue: JSON.stringify(objArr) },
  85. success: function () {
  86. $.currentWindow().$("#gridList").trigger("reloadGrid");
  87. }
  88. })
  89. }
  90. }
  91. </script>
  92. <form id="form1">
  93. <div style="padding-top: 20px; margin-right: 20px;">
  94. <table class="form">
  95. <tr>
  96. <th class="formTitle">编码:</th>
  97. <td class="formValue">
  98. <input id="Code" name="Code" type="text" class="form-control required" style="width: 300px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="列编码" />
  99. </td>
  100. </tr>
  101. <tr>
  102. <th class="formTitle">中文简体:</th>
  103. <td class="formValue">
  104. <textarea id="CnValue" name="CnValue" cols="200" class="form-control" number="500" style="height:32px;line-height:32px"></textarea>
  105. </td>
  106. </tr>
  107. <tr>
  108. <th class="formTitle">中文繁体:</th>
  109. <td class="formValue">
  110. <textarea id="TwValue" name="TwValue" cols="200" class="form-control" number="500" style="height:32px;line-height:32px"></textarea>
  111. </td>
  112. </tr>
  113. <tr>
  114. <th class="formTitle">英文:</th>
  115. <td class="formValue">
  116. <textarea id="EnValue" name="EnValue" cols="200" class="form-control" number="500" style="height:32px;line-height:32px"></textarea>
  117. </td>
  118. </tr>
  119. </table>
  120. </div>
  121. </form>