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

189 lines
7.9 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/MemoParemeterEdit",
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;
});
$("#btnCheckAll").click(function () {
if ($(this).attr("ischecked") == "checked") {
$(this).attr("ischecked", "noChecked");
$("input[type='checkbox']").removeAttr("checked");
$(".checktd").removeClass("checktd").addClass("unchecktd");
}
else {
$(this).attr("ischecked", "checked");
$("input[type='checkbox']").attr("checked", "checked");
$(".unchecktd").removeClass("unchecktd").addClass("checktd");
}
});
$("#CheckBoxList td").live("click", function () {
if ($(this).find("input").attr("checked") == null)
$(this).removeClass("checktd").addClass("unchecktd");
else
$(this).removeClass("unchecktd").addClass("checktd");
});
$("#btnConfirm").click(function () {
var checkedFilds = "";
$.each($("#CheckBoxList td input"), function (i, ex) {
if ($(ex).attr("checked") == "checked") {
checkedFilds += $(ex).val() + "#";
}
});
if (checkedFilds.length > 1) {
checkedFilds = checkedFilds.substring(0, checkedFilds.length - 1);
}
$("#MemoType").val();
$("#MemoType").val(checkedFilds);
$("#dlgMemoType").dialog('close');
});
$("#btnMemoTypeSelect").click(function () {
$("#dlgMemoType").dialog({ title: '工单类型选择', closed: false, cache: false, modal: true, width: '550', height: '450' });
});
});
</script>
<div class="mvctool bgb">
@Html.ToolButtonPlain("btnSave", "icon-save", "保存", false, "")
</div>
@using (Html.BeginForm("MemoParameterEdit", "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 = "MemoType", 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">
<table width="100%" >
<tr>
<td width="100%">
<a id="btnConfirm" style="float: left;" class="l-btn l-btn-plain"><span class="l-btn-left"><span class="l-btn-text icon-save" style="padding-left: 20px;">确定</span></span></a>
<a id="btnCheckAll" style="float: left;" class="l-btn l-btn-plain"><span class="l-btn-left"><span class="l-btn-text icon-ok" style="padding-left: 20px;">全选</span></span></a>
</td>
</tr>
<tr id="CheckBoxList">
<td width="100%">
@Html.CheckBoxList("checks", (IEnumerable<SelectListItem>)ViewBag.MemoList, System.Web.UI.WebControls.RepeatDirection.Horizontal)
</td>
</tr>
</table>
</div>