TG.WXCRM.V4/WEB/Views/Base/Parameter/SessionParameterEdit.cshtml

158 lines
6.5 KiB
Plaintext

@model WX.CRM.Model.Entity.BAS_PARAMETER
@using WX.CRM.WebHelper
@{
ViewBag.Title = "修改信息";
Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
}
<script type="text/javascript">
$(function () {
$("#btnSave").click(function () {
if ($("#CreateForm").valid()) {
$.r_ajax({
url: "/Base/Parameter/SessionParameterEdit",
type: "Post",
data: $("#CreateForm").serialize(),
dataType: "json",
loading: true,
success: function (data) {
if (data.type == 1) {
window.parent.frameReturnByMes(data.message);
window.parent.frameReturnByReload(true);
window.parent.frameReturnByClose()
}
else {
window.parent.frameReturnByMes(data.message);
}
}
});
}
return false;
});
$("#btnConfirm").click(function () {
var pwd = $("#pwd").val();
if (pwd == "") {
alert("密码不能为空!");
return;
}
$.r_post("/base/Parameter/GenSessionPwd?pwd="+pwd, function (msg) {
$("#sessoinPwd").val();
$("#sessoinPwd").val(msg.data);
}, "json");
$("#dlgMemoType").dialog('close');
});
$("#btnMemoTypeSelect").click(function () {
$("#dlgMemoType").dialog({ title: '设置密码', closed: false, cache: false, modal: true, width: '350', height: '250' });
});
});
</script>
<div class="mvctool bgb">
@Html.ToolButtonPlain("btnSave", "icon-save", "保存", false, "")
</div>
@using (Html.BeginForm("SessionParameterEdit", "Parameter", null, FormMethod.Post, new { Id = "CreateForm" }))
{
@Html.ValidationSummary(true)
<table class="fromEditTable setTextWidth300">
<tbody>
<tr>
<td width="60px" style="width:100px;">
@Html.LabelFor(m => m.map_PARAKEY)
</td>
<td style="width:310px">
@Html.TextBoxFor(m => m.map_PARAKEY, new { Readonly = "true" })
</td>
<td style="width:120px">
@Html.ValidationMessageFor(m => m.map_PARAKEY)
</td>
</tr>
<tr>
<td width="60px" style="width:100px;">
@Html.LabelFor(m => m.map_PARANAME)
</td>
<td style="width:310px">
@Html.TextBoxFor(m => m.map_PARANAME)
</td>
<td style="width:120px">
@Html.ValidationMessageFor(m => m.map_PARANAME)
</td>
</tr>
<tr>
<td width="60px" style="width:100px;">
@Html.LabelFor(m => m.map_DEPTCDOE)
</td>
<td style="width:310px">
@*@Html.DropDownListFor(m => m.map_GROUPID, new WX.CRM.WEB.Handler.ControlResource().GetBas_parameterGroupList(), new { style = "width:305px" })*@
@Html.DropDownListFor(m => m.map_DEPTCDOE, (IEnumerable<SelectListItem>)ViewBag.DepartmentItem, new { style = "width:305px" })
</td>
<td width="120px">
@Html.ValidationMessageFor(m => m.map_DEPTCDOE)
</td>
</tr>
<tr>
<td width="60px" style="width:100px;">
@Html.LabelFor(m => m.map_GROUPID)
</td>
<td style="width:310px">
@*@Html.DropDownListFor(m => m.map_GROUPID, new WX.CRM.WEB.Handler.ControlResource().GetBas_parameterGroupList(), new { style = "width:305px" })*@
@Html.DropDownListFor(m => m.map_GROUPID, (IEnumerable<SelectListItem>)ViewBag.ParameterGroupList, new { style = "width:305px" })
</td>
<td width="120px">
@Html.ValidationMessageFor(m => m.map_GROUPID)
</td>
</tr>
<tr>
<td width="60px" style="width:100px;">
@Html.LabelFor(m => m.map_PARAVALUE)
</td>
<td style="width:310px">
@*@Html.TextBoxFor(m => m.map_PARAVALUE, new { id="MemoType",Readonly="true",width="250px" })*@
@Html.TextAreaFor(m => m.map_PARAVALUE, new { id = "sessoinPwd", Readonly = "true", width = "250px" })
<input type="button" value="选择" id="btnMemoTypeSelect"/>
</td>
<td style="width:120px">
@Html.ValidationMessageFor(m => m.map_PARAVALUE)
</td>
</tr>
<tr>
<td width="60px" style="width:100px;">
@Html.LabelFor(m => m.map_PARATYPE)
</td>
<td style="width:310px">
@Html.TextBoxFor(m => m.map_PARATYPE)
</td>
<td style="width:120px">
@Html.ValidationMessageFor(m => m.map_PARATYPE)
</td>
</tr>
<tr>
<td width="60px" style="width:100px;">
@Html.LabelFor(m => m.map_REMARK)
</td>
<td style="width:310px">
@*@Html.TextBoxFor(m => m.map_REMARK)*@
@Html.TextAreaFor(m => m.map_REMARK)
</td>
<td style="width:120px">
@Html.ValidationMessageFor(m => m.map_REMARK)
</td>
</tr>
<tr>
<td width="60px" style="width:100px;">
@Html.LabelFor(m => m.map_EDITFORM)
</td>
<td colspan="2">
@Html.TextBoxFor(m => m.map_EDITFORM)
</td>
</tr>
</tbody>
</table>
}
<div id="dlgMemoType" class="easyui-dialog" closed="true" style="padding: 0px">
<ul style="padding-left: 50px; padding-top: 30px;">
<li style="height: 40px; line-height: 40px;">密码:<input type="password" id="pwd" name="pwd" /></li>
<li style="height: 40px; line-height: 40px; padding-left: 35px;"><input type="button" id="btnConfirm" value="确定" /></li>
</ul>
</div>