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.
 
 
 
 

122 lines
3.5 KiB

@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
$(function () {
InitControl();
});
function submitForm() {
debugger;
if (!$('#form1').formValid()) {
return false;
}
var RoleID = $("#sel_Role").val();//需要克隆的角色ID
var F_FullName = $("#F_FullName").val();
var F_EnCode = $("#F_EnCode").val();
var F_SortCode = $("#F_SortCode").val();
var F_Description = $("#F_Description").val();
var obj = {
RoleID:RoleID,
F_FullName: F_FullName,
F_EnCode: F_EnCode,
F_SortCode: F_SortCode,
F_Description: F_Description,
}
$.submitForm({
url: "/SystemManage/Role/SubmitFormCloneRole" + "?" + Math.random(),
param: {
keyValue: JSON.stringify(obj)
},
success: function () {
$.currentWindow().$("#gridList").trigger("reloadGrid");
}
})
}
function InitControl() {
debugger;
var $Role = $("#sel_Role");
$Role.select2({
allowClear: true,
escapeMarkup: function (m) {
return m;
}
});
$.ajax({
url: "/SystemManage/Role/GetRole" + "?" + Math.random(),
dataType: "json",
async: false,
success: function (data) {
$.each(data, function (index, item) {
$Role.append("<option value='" + item.ID + "'>" + item.F_FullName + "</option>");
});
}
});
}
//function SelChangeA() {
// var InvCode = $("#sel_InvCode").val();
// SeachAmountEnablebyInvCode(InvCode);
//}
</script>
<form id="form1">
<div style="padding-top: 20px; margin-right: 20px;">
<table class="form">
<tr>
<th class="formTitle">需克隆角色</th>
<td class="formValue">
<select id="sel_Role" name="sel_Role" class="form-control select2" style="width: 500px" placeholder="角色"></select>
</td>
</tr>
<tr>
<th class="formTitle"><span style="color: red;">*</span>角色名称</th>
<td class="formValue">
<input id="F_FullName" name="F_FullName" type="text" class="form-control required" placeholder="请输入角色名称" />
</td>
</tr>
<tr>
<th class="formTitle"><span style="color: red;">*</span>角色编号</th>
<td class="formValue">
<input id="F_EnCode" name="F_EnCode" type="text" class="form-control required" placeholder="请输入角色编号" />
</td>
</tr>
<tr>
<th class="formTitle"><span style="color: red;">*</span>显示顺序</th>
<td class="formValue">
<input id="F_SortCode" name="F_SortCode" type="text" class="form-control required" placeholder="请输入显示顺序" />
</td>
</tr>
<tr>
<th class="formTitle"><span style="color: red;"></span>备注</th>
<td class="formValue">
<textarea id="F_Description" name="F_Description" class="form-control" style="height: 60px;"></textarea>
</td>
</tr>
</table>
</div>
</form>