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.
 
 
 
 
 

168 lines
6.9 KiB

@{
ViewBag.Title = "Form";
Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
var keyValue = "SYS";
$(function () {
initControl();
if (!!keyValue) {
$.ajax({
url: "/SystemManage/User/GetFormJson",
data: { keyValue: keyValue },
dataType: "json",
async: false,
success: function (data) {
$("#form1").formSerialize(data);
$("#F_UserPassword").val("******").attr('disabled', 'disabled');
}
});
}
});
function initControl() {
$("#F_Gender").bindSelect()
$("#F_IsAdministrator").bindSelect()
$("#F_EnabledMark").bindSelect()
$("#F_OrganizeId").bindSelect({
url: "/SystemManage/Organize/GetTreeSelectJson"
});
$("#F_DepartmentId").bindSelect({
url: "/SystemManage/Organize/GetTreeSelectJson",
});
$("#F_RoleId").bindSelect({
url: "/SystemManage/Role/GetGridJson",
id: "F_Id",
text: "F_FullName"
});
$("#F_DutyId").bindSelect({
url: "/SystemManage/Duty/GetGridJson",
id: "F_Id",
text: "F_FullName"
});
$("#F_Location").bindSelect({
url: "/SystemManage/User/GetWorkPoint",
id: "WorkPointCode",
text: "WorkPointName"
});
$("#F_RoleId").change(function () {
var location = $("#F_RoleId").val();
if (location != "供应商") {
$("#th_VenCode").hide();
$("#td_VenCode").hide();
}
else {
$("#th_VenCode").show();
$("#td_VenCode").show();
}
});
}
function submitForm() {
if (!$('#form1').formValid()) {
return false;
}
$.submitForm({
url: "/SystemManage/User/SubmitForm?keyValue=" + keyValue,
param: $("#form1").formSerialize(),
success: function () {
$.currentWindow().$("#gridList").trigger("reloadGrid");
}
})
}
function btn_revisepassword() {
var keyValue = "SYS";
var Account = $("#F_Account").val();
var RealName = $("#F_RealName").val();
$.modalOpen({
id: "RevisePassword",
title: '重置密码',
url: '/SystemManage/User/RevisePassword?keyValue=' + keyValue + "&account=" + escape(Account) + '&realName=' + escape(RealName),
width: "450px",
height: "260px",
callBack: function (iframeId) {
top.frames[iframeId].submitForm();
}
});
}
</script>
<form id="form1">
<div style="margin-top: 10px; margin-left: 10px; margin-right: 10px;">
<div style="padding-top: 20px; margin-right: 30px;">
<table class="form">
<tr>
<th class="formTitle" valign="top">
</th>
<td class="formValue" colspan="3">
<a id="NF-revisepassword" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_revisepassword()"><i class="fa fa-key"></i>密码重置</a>
</td>
</tr>
<tr>
<th class="formTitle">账户</th>
<td class="formValue">
<input id="F_Account" name="F_Account" type="text" disabled="disabled" class="form-control required" placeholder="请输入账户" />
</td>
<th class="formTitle">密码</th>
<td class="formValue">
<input id="F_UserPassword" name="F_UserPassword" type="password" disabled="disabled" class="form-control required" placeholder="请输入密码" />
</td>
</tr>
<tr>
<th class="formTitle">姓名</th>
<td class="formValue">
<input id="F_RealName" name="F_RealName" type="text" disabled="disabled" class="form-control required" placeholder="请输入姓名" />
</td>
<th class="formTitle">角色</th>
<td class="formValue">
<select id="F_RoleId" name="F_RoleId" disabled="disabled" class="form-control required">
<option value="">==请选择==</option>
</select>
</td>
</tr>
<tr>
<th class="formTitle">手机</th>
<td class="formValue">
<input id="F_MobilePhone" name="F_MobilePhone" type="text" disabled="disabled" class="form-control" />
</td>
<th class="formTitle">邮箱</th>
<td class="formValue">
<input id="F_Email" name="F_Email" type="text" disabled="disabled" class="form-control" />
</td>
</tr>
<tr>
<th class="formTitle">类型</th>
<td class="formValue">
<select id="F_IsAdministrator" name="F_IsAdministrator" disabled="disabled" class="form-control">
<option value="false">普通用户</option>
<option value="true">系统管理员</option>
</select>
</td>
<th class="formTitle">允许登录</th>
<td class="formValue">
<select id="F_EnabledMark" name="F_EnabledMark" disabled="disabled" class="form-control">
<option value="true">是</option>
<option value="false">否</option>
</select>
</td>
</tr>
<tr>
<th class="formTitle">站点</th>
<td class="formValue">
<input id="F_Location" name="F_Location" type="text" disabled="disabled" class="form-control" />
</td>
<th id="th_VenCode" class="formTitle">供应商编码</th>
<td id="td_VenCode">
<input id="F_VenCode" name="F_VenCode" type="text" class="form-control" />
</td>
</tr>
<tr>
<th class="formTitle" valign="top" style="padding-top: 5px;">
备注
</th>
<td class="formValue" colspan="3">
<textarea id="F_Description" name="F_Description" disabled="disabled" class="form-control" style="height: 60px;"></textarea>
</td>
</tr>
</table>
</div>
</div>
</form>