1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- @{
- ViewBag.Title = "角色管理";
- Layout = "~/Views/Shared/_Form.cshtml";
- }
- <script>
- var keyValue = request('keyValue');
- var organizeId = request('organizeId');
- $(function () {
- initControl();
- })
- //初始化控件
- function initControl() {
- //所在公司
- $("#OrganizeId").ComboBoxTree({
- url: "../../BaseManage/Organize/GetTreeJson",
- description: "==请选择==",
- height: "200px"
- });
- //获取表单
- if (!!keyValue) {
- $.SetForm({
- url: "../../BaseManage/Role/GetFormJson",
- param: { keyValue: keyValue },
- success: function (data) {
- $("#form1").SetWebControls(data);
- }
- });
- }
- }
- //保存表单
- function AcceptClick() {
- if (!$('#form1').Validform()) {
- return false;
- }
- var postData = $("#form1").GetWebControls(keyValue);
- $.SaveForm({
- url: "../../BaseManage/Role/SaveForm?keyValue=" + keyValue,
- param: postData,
- loading: "正在保存数据...",
- success: function () {
- $.currentIframe().$("#gridTable").trigger("reloadGrid");
- }
- })
- }
- </script>
- <div style="margin-left: 10px; margin-top: 20px; margin-right: 30px;">
- <table class="form">
- <tr>
- <th class="formTitle">所在公司<font face="宋体">*</font></th>
- <td class="formValue">
- <div id="OrganizeId" type="selectTree" class="ui-select" isvalid="yes" checkexpession="NotNull">
- </div>
- </td>
- </tr>
- <tr>
- <td class="formTitle">角色编号<font face="宋体">*</font></td>
- <td class="formValue">
- <input id="EnCode" type="text" onblur="$.ExistField(this.id,'../../BaseManage/Role/ExistEnCode')" class="form-control" placeholder="请输入编号" isvalid="yes" checkexpession="NotNull" />
- </td>
- </tr>
- <tr>
- <td class="formTitle">角色名称<font face="宋体">*</font></td>
- <td class="formValue">
- <input id="FullName" type="text" onblur="$.ExistField(this.id,'../../BaseManage/Role/ExistFullName')" class="form-control" placeholder="请输入名称" isvalid="yes" checkexpession="NotNull" />
- </td>
- </tr>
- <tr>
- <th class="formTitle" style="height: 37px;"></th>
- <td class="formValue">
- <div class="checkbox">
- <label>
- <input id="IsPublic" type="checkbox" />
- 公共
- </label>
- <label>
- <input id="EnabledMark" type="checkbox" checked="checked" />
- 有效
- </label>
- </div>
- </td>
- </tr>
- <tr>
- <th class="formTitle" valign="top" style="padding-top: 4px;">角色描述
- </th>
- <td class="formValue">
- <textarea id="Description" class="form-control" style="height: 70px;"></textarea>
- </td>
- </tr>
- </table>
- </div>
|