100 lines
3.6 KiB
Plaintext
100 lines
3.6 KiB
Plaintext
@model WX.CRM.Model.Entity.BAS_GROUPLEADER
|
|
@using WX.CRM.WebHelper;
|
|
@{
|
|
ViewBag.Title = "创建bas_innerGroup";
|
|
Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
|
|
}
|
|
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
$("#btnSave").click(function () {
|
|
if ($("#CreateForm").valid()) {
|
|
if ($("[name='map_DEPTID']").length == 0 || $("[name='map_DEPTID']").val() == "") {
|
|
$.messager.alert("错误提示", "请务必选择销售组", "error");
|
|
return false;
|
|
}
|
|
$.r_ajax({
|
|
url: "/Base/GroupLeader/Create",
|
|
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 {
|
|
$.messager.alert("错误提示", data.message, "error");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
return false;
|
|
});
|
|
$("#map_DEPTID").combotree({
|
|
url: "/Base/InnerGroup/GetTreeList",
|
|
height: 28,
|
|
onSelect: function (node) {
|
|
console.log(node.id);
|
|
if (node.id.toString().indexOf("sale_") == -1 && node.id.toString().indexOf("com_") == -1) {
|
|
$("#TYPE").val("0");
|
|
} else {
|
|
$("#TYPE").val("1");
|
|
//$('#map_INNERGROUPID').combotree('clear');
|
|
}
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
<div class="mvctool bgb">
|
|
@Html.ToolButtonPlain("btnSave", "icon-save", "保存", false, "")
|
|
</div>
|
|
@using (Html.BeginForm("Edit", "bas_innerGroup", null, FormMethod.Post, new { Id = "CreateForm" }))
|
|
{
|
|
@Html.ValidationSummary(true)
|
|
<table class="fromEditTable setTextWidth300">
|
|
<tbody>
|
|
<tr>
|
|
<td width="60px" style="width:100px;">
|
|
部门
|
|
</td>
|
|
<td style="width:310px" id="saleDeptComboxTD">
|
|
@Html.TextBoxFor(m => m.map_DEPTID, new { style = "width:305px;" })
|
|
<input type="hidden" name="TYPE" id="TYPE" />
|
|
</td>
|
|
<td width="120px">
|
|
@Html.ValidationMessageFor(m => m.map_INNERGROUPID)
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="60px" style="width:100px;">
|
|
@Html.LabelFor(m => m.map_EID)
|
|
</td>
|
|
<td style="width:310px">
|
|
@Html.TextBoxFor(m => m.map_EID)
|
|
</td>
|
|
<td width="120px">
|
|
@Html.ValidationMessageFor(m => m.map_EID)
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="60px" style="width:100px;">
|
|
类型
|
|
</td>
|
|
<td style="width:310px">
|
|
@Html.DropDownListFor(m => m.map_LEADERTYPE, new WX.CRM.WEB.Handler.ControlResource().GetGroupLeaderType())
|
|
</td>
|
|
<td width="120px">
|
|
@Html.ValidationMessageFor(m => m.map_LEADERTYPE)
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
} |