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

81 lines
2.8 KiB

3 years ago
  1. @{
  2. ViewBag.Title = "Form";
  3. Layout = "~/Views/Shared/_Form.cshtml";
  4. }
  5. <script>
  6. var keyValue = $.request("keyValue");
  7. $(function () {
  8. initControl();
  9. if (!!keyValue) {
  10. $.ajax({
  11. url: "/SystemManage/Area/GetFormJson",
  12. data: { keyValue: keyValue },
  13. dataType: "json",
  14. async: false,
  15. success: function (data) {
  16. $("#form1").formSerialize(data);
  17. }
  18. });
  19. }
  20. });
  21. function initControl() {
  22. $("#F_ParentId").bindSelect({
  23. url: "/SystemManage/Area/GetTreeSelectJson"
  24. });
  25. }
  26. function submitForm() {
  27. if (!$('#form1').formValid()) {
  28. return false;
  29. }
  30. $.submitForm({
  31. url: "/SystemManage/Area/SubmitForm?keyValue=" + keyValue,
  32. param: $("#form1").formSerialize(),
  33. success: function () {
  34. $.currentWindow().$("#gridList").resetSelection();
  35. $.currentWindow().$("#gridList").trigger("reloadGrid");
  36. }
  37. })
  38. }
  39. </script>
  40. <form id="form1">
  41. <div style="padding-top: 20px; margin-right: 20px;">
  42. <table class="form">
  43. <tr>
  44. <th class="formTitle">上级</th>
  45. <td class="formValue">
  46. <select id="F_ParentId" name="F_ParentId" class="form-control required">
  47. <option value="0">父节点</option>
  48. </select>
  49. </td>
  50. </tr>
  51. <tr>
  52. <th class="formTitle">名称</th>
  53. <td class="formValue">
  54. <input id="F_FullName" name="F_FullName" type="text" class="form-control required" placeholder="请输入名称" />
  55. </td>
  56. </tr>
  57. <tr>
  58. <th class="formTitle">排序</th>
  59. <td class="formValue">
  60. <input id="F_SortCode" name="F_SortCode" type="text" class="form-control required" />
  61. </td>
  62. </tr>
  63. <tr>
  64. <th class="formTitle" style="height: 35px;">选项</th>
  65. <td class="formValue" style="padding-top: 1px;">
  66. <div class="ckbox">
  67. <input id="F_EnabledMark" name="F_EnabledMark" type="checkbox" checked="checked"><label for="F_EnabledMark">有效</label>
  68. </div>
  69. </td>
  70. </tr>
  71. <tr>
  72. <th class="formTitle" valign="top" style="padding-top: 5px;">备注
  73. </th>
  74. <td class="formValue">
  75. <textarea id="F_Description" name="F_Description" class="form-control" style="height: 60px;"></textarea>
  76. </td>
  77. </tr>
  78. </table>
  79. </div>
  80. </form>