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.

161 lines
6.5 KiB

  1. @{
  2. ViewBag.Title = "Form";
  3. Layout = "~/Views/Shared/_Form.cshtml";
  4. }
  5. <script>
  6. var keyValue = $.request("keyValue");
  7. $(function () {
  8. initControl();
  9. GetOrganizeType();
  10. if (!!keyValue) {
  11. $.ajax({
  12. url: "/SystemManage/Organize/GetFormJson",
  13. data: { keyValue: keyValue },
  14. dataType: "json",
  15. async: false,
  16. success: function (data) {
  17. $("#form1").formSerialize(data);
  18. }
  19. });
  20. }
  21. });
  22. function initControl() {
  23. $("#F_CategoryId").select2({ minimumResultsForSearch: -1 })
  24. $("#F_ParentId").bindSelect({
  25. url: "/SystemManage/Organize/GetTreeSelectJson",
  26. });
  27. }
  28. function submitForm() {
  29. if (!$('#form1').formValid()) {
  30. return false;
  31. }
  32. $.submitForm({
  33. url: "/SystemManage/Organize/SubmitForm?keyValue=" + keyValue,
  34. param: $("#form1").formSerialize(),
  35. success: function () {
  36. $.currentWindow().$("#gridList").resetSelection();
  37. $.currentWindow().$("#gridList").trigger("reloadGrid");
  38. }
  39. })
  40. }
  41. //加载机构类型
  42. function GetOrganizeType() {
  43. var html = "";
  44. $.ajax({
  45. url: "/SystemManage/Organize/GetOrganizeType?" + Math.random(),
  46. dataType: "json",
  47. async: false,
  48. success: function (data) {
  49. if (data != false) {
  50. var html = "<option value=\"\">==请选择==</option> ";
  51. for (var i = 0; i <data.length; i++) {
  52. html += " <option value=\"" + data[i]["F_ItemCode"] + "\">" + data[i]["F_ItemName"] + "</option>";
  53. }
  54. document.getElementById("F_CategoryId").innerHTML = html;
  55. }
  56. }
  57. })
  58. }
  59. </script>
  60. <form id="form1">
  61. <div style="margin-top: 10px; margin-left: 10px; margin-right: 10px;">
  62. <ul class="nav nav-tabs">
  63. <li role="presentation" class="active"><a href="#">基本信息</a></li>
  64. @*<li role="presentation"><a href="#">扩展信息</a></li>*@
  65. </ul>
  66. <div style="padding-top: 20px; margin-right: 30px;">
  67. <table class="form">
  68. <tr>
  69. <th class="formTitle">上级</th>
  70. <td class="formValue">
  71. <select id="F_ParentId" name="F_ParentId" class="form-control required">
  72. <option value="0">父节点</option>
  73. </select>
  74. </td>
  75. <th class="formTitle">类型</th>
  76. <td class="formValue">
  77. <select id="F_CategoryId" name="F_Target" class="form-control required">
  78. <option value="">==请选择==</option>
  79. <option value="Group">集团</option>
  80. <option value="Company">公司</option>
  81. <option value="Department">部门</option>
  82. <option value="WorkGroup">小组</option>
  83. </select>
  84. </td>
  85. </tr>
  86. <tr>
  87. <th class="formTitle">名称</th>
  88. <td class="formValue">
  89. <input id="F_FullName" name="F_FullName" type="text" class="form-control required" placeholder="请输入名称" />
  90. </td>
  91. <th class="formTitle">编号</th>
  92. <td class="formValue">
  93. <input id="F_EnCode" name="F_EnCode" type="text" class="form-control required" placeholder="请输入编号" />
  94. </td>
  95. </tr>
  96. <tr>
  97. <th class="formTitle" rowspan="3">负责人</th>
  98. <td class="formValue" rowspan="3" >
  99. <textarea id="F_ManagerId" name="F_ManagerId" class="form-control" style="width:100%;height:120px;padding:0px 0px"></textarea>
  100. </td>
  101. <th class="formTitle">手机</th>
  102. <td class="formValue">
  103. <input id="F_MobilePhone" name="F_MobilePhone" type="text" class="form-control" />
  104. </td>
  105. </tr>
  106. <tr>
  107. <th class="formTitle">微信</th>
  108. <td class="formValue">
  109. <input id="F_WeChat" name="F_ManagerId" type="text" class="form-control" />
  110. </td>
  111. </tr>
  112. <tr>
  113. <th class="formTitle">电话</th>
  114. <td class="formValue">
  115. <input id="F_TelePhone" name="F_TelePhone" type="text" class="form-control" />
  116. </td>
  117. </tr>
  118. <tr>
  119. <th class="formTitle">邮箱</th>
  120. <td class="formValue">
  121. <input id="F_Email" name="F_MobilePhone" type="text" class="form-control" />
  122. </td>
  123. <th class="formTitle">传真</th>
  124. <td class="formValue">
  125. <input id="F_Fax" name="F_MobilePhone" type="text" class="form-control" />
  126. </td>
  127. </tr>
  128. <tr>
  129. <th class="formTitle">地址</th>
  130. <td class="formValue" colspan="3">
  131. <input id="F_Address" name="F_Address" type="text" class="form-control" />
  132. </td>
  133. </tr>
  134. <tr>
  135. <th class="formTitle" style="height: 35px;">选项</th>
  136. <td class="formValue" colspan="3" style="padding-top: 1px;">
  137. <div class="ckbox">
  138. <input id="F_EnabledMark" name="F_EnabledMark" type="checkbox" checked="checked"><label for="F_EnabledMark">有效</label>
  139. </div>
  140. </td>
  141. </tr>
  142. <tr>
  143. <th class="formTitle" valign="top" style="padding-top: 5px;">备注
  144. </th>
  145. <td class="formValue" colspan="3">
  146. <textarea id="F_Description" name="F_Descriptions" class="form-control" style="height: 60px;"></textarea>
  147. </td>
  148. </tr>
  149. </table>
  150. </div>
  151. </div>
  152. </form>