TG.WXCRM.V4/WEB/Views/Base/InnerUser/ChangeUserGroup.cshtml

97 lines
3.7 KiB
Plaintext

@model WX.CRM.Model.Entity.BAS_INNERUSERGROUP
@using WX.CRM.WebHelper;
@{
ViewBag.Title = "变动用户的部门";
Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
}
<script type="text/javascript">
$(function () {
$("#btnSave").click(function () {
if ($("#CreateForm").valid()) {
if (!$("#ma_GID").valid())
return;
if ($("#oldGID").val() == $("#ma_GID").val()) {
$.messager.alert("错误提示", "已经属于这个组,不能重复!", "error");
return;
}
$.r_ajax({
url: "/Base/InnerUser/ChangeUserGroup",
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;
});
$('#saleDeptIdCombox').combotree({
url: "/Base/InnerGroup/GetTreeList",
height: 28,
onSelect: function (node) {
debugger
$("#ma_GID").val(node.id);
$("#ma_GID").valid();
if (node.id.toString().indexOf("sale_") == -1 && node.id.toString().indexOf("com_") == -1 && node.attributes != null) {
$("#deptIdCombox").combotree("setValues", [node.attributes])
}
}
});
$('#deptIdCombox').combotree({
url: "/Base/InnerDepartment/GetTreeJson",
height: 28,
});
});
</script>
<div class="mvctool bgb">
@Html.ToolButtonPlain("btnSave", "icon-save", "保存", false, "")
</div>
<div style=" height:90%;width:100%; overflow-y:auto">
@using (Html.BeginForm("Edit", "InserUser", null, FormMethod.Post, new { Id = "CreateForm" }))
{
@Html.ValidationSummary(true)
<table class="fromEditTable setTextWidth300">
<tbody>
<tr>
<td>
销售组
</td>
<td>
<input id="isAdd" name="isAdd" type="hidden" value="@ViewBag.isAdd" />
@Html.HiddenFor(m => m.INNERUSERID)
@Html.HiddenFor(m => m.ma_GID)
<input id="oldGID" name="oldGID" type="hidden" value="@Model.GID" />
<input id="saleDeptIdCombox" name="saleDeptIdCombox" value="@(Model.GID)" style="width:305px" />
</td>
<td>@Html.ValidationMessageFor(m => m.ma_GID)</td>
</tr>
<tr>
<td style="width:150px;">
调动时间
</td>
<td style="width:210px">
@Html.TextBoxFor(m => m.inDate, new
{
ControlToValidate = "DISMISSTIME",
ValidationExpression = "\\d{4}-\\d{1,2}-\\d{1,2}",
onclick = "WdatePicker()",
@class = "Wdate"
})
</td>
<td width="120px">@Html.ValidationMessageFor(m => m.inDate)</td>
</tr>
</tbody>
</table>
}
</div>