纽威
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
5.7 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/Organize/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_CategoryId").select2({ minimumResultsForSearch: -1 })
  23. $("#F_ParentId").bindSelect({
  24. url: "/SystemManage/Organize/GetTreeSelectJson",
  25. });
  26. }
  27. function submitForm() {
  28. if (!$('#form1').formValid()) {
  29. return false;
  30. }
  31. $.submitForm({
  32. url: "/SystemManage/Organize/SubmitForm?keyValue=" + keyValue,
  33. param: $("#form1").formSerialize(),
  34. success: function () {
  35. $.currentWindow().$("#gridList").resetSelection();
  36. $.currentWindow().$("#gridList").trigger("reloadGrid");
  37. }
  38. })
  39. }
  40. </script>
  41. <form id="form1">
  42. <div style="margin-top: 10px; margin-left: 10px; margin-right: 10px;">
  43. <ul class="nav nav-tabs">
  44. <li role="presentation" class="active"><a href="#">基本信息</a></li>
  45. @*<li role="presentation"><a href="#">扩展信息</a></li>*@
  46. </ul>
  47. <div style="padding-top: 20px; margin-right: 30px;">
  48. <table class="form">
  49. <tr>
  50. <th class="formTitle">上级</th>
  51. <td class="formValue">
  52. <select id="F_ParentId" name="F_ParentId" class="form-control required">
  53. <option value="0">父节点</option>
  54. </select>
  55. </td>
  56. <th class="formTitle">类型</th>
  57. <td class="formValue">
  58. <select id="F_CategoryId" name="F_Target" class="form-control required">
  59. <option value="">==请选择==</option>
  60. <option value="Group">集团</option>
  61. <option value="Company">公司</option>
  62. <option value="Department">部门</option>
  63. <option value="WorkGroup">小组</option>
  64. </select>
  65. </td>
  66. </tr>
  67. <tr>
  68. <th class="formTitle">名称</th>
  69. <td class="formValue">
  70. <input id="F_FullName" name="F_FullName" type="text" class="form-control required" placeholder="请输入名称" />
  71. </td>
  72. <th class="formTitle">编号</th>
  73. <td class="formValue">
  74. <input id="F_EnCode" name="F_EnCode" type="text" class="form-control required" placeholder="请输入编号" />
  75. </td>
  76. </tr>
  77. <tr>
  78. <tr>
  79. <th class="formTitle">负责人</th>
  80. <td class="formValue">
  81. <input id="F_ManagerId" name="F_ManagerId" type="text" class="form-control" />
  82. </td>
  83. <th class="formTitle">手机</th>
  84. <td class="formValue">
  85. <input id="F_MobilePhone" name="F_MobilePhone" type="text" class="form-control" />
  86. </td>
  87. </tr>
  88. <tr>
  89. <th class="formTitle">微信</th>
  90. <td class="formValue">
  91. <input id="F_WeChat" name="F_ManagerId" type="text" class="form-control" />
  92. </td>
  93. <th class="formTitle">电话</th>
  94. <td class="formValue">
  95. <input id="F_TelePhone" name="F_TelePhone" type="text" class="form-control" />
  96. </td>
  97. </tr>
  98. <tr>
  99. <th class="formTitle">邮箱</th>
  100. <td class="formValue">
  101. <input id="F_Email" name="F_MobilePhone" type="text" class="form-control" />
  102. </td>
  103. <th class="formTitle">传真</th>
  104. <td class="formValue">
  105. <input id="F_Fax" name="F_MobilePhone" type="text" class="form-control" />
  106. </td>
  107. </tr>
  108. <tr>
  109. <th class="formTitle">地址</th>
  110. <td class="formValue" colspan="3">
  111. <input id="F_Address" name="F_Address" type="text" class="form-control" />
  112. </td>
  113. </tr>
  114. <tr>
  115. <th class="formTitle" style="height: 35px;">选项</th>
  116. <td class="formValue" colspan="3" style="padding-top: 1px;">
  117. <div class="ckbox">
  118. <input id="F_EnabledMark" name="F_EnabledMark" type="checkbox" checked="checked"><label for="F_EnabledMark">有效</label>
  119. </div>
  120. </td>
  121. </tr>
  122. <tr>
  123. <th class="formTitle" valign="top" style="padding-top: 5px;">备注
  124. </th>
  125. <td class="formValue" colspan="3">
  126. <textarea id="F_Description" name="F_Descriptions" class="form-control" style="height: 60px;"></textarea>
  127. </td>
  128. </tr>
  129. </table>
  130. </div>
  131. </div>
  132. </form>