ComplianceServer/oldcode/WEB/Views/Ord/Memo/PurposeMemoAdd.cshtml

95 lines
3.5 KiB
Plaintext

@using WX.CRM.Model.Enum;
@model WX.CRM.Model.Entity.ORD_PURPOSEMEMO
@{
ViewBag.Title = "添加工单";
Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
}
<link href="~/Content/main.css" rel="stylesheet" />
<div style="height:100%;width:100%; overflow-y:auto;">
@Html.Action("CustomerInfo", "CustomerUC", new { CustomerId = Request.QueryString["resid"] })
<form id="CreateForm">
@Html.ValidationSummary(true)
<table class="layui-table normaltable">
<thead>
<tr>
<td colspan="3" class="style1">
销售工单
</td>
</tr>
</thead>
<tbody>
<tr>
<td>
业务类型
</td>
<td>
@Html.DropDownList("BUSINESSID", ViewBag.SaleMemoType as IList<SelectListItem>, new { })
@Html.Hidden("RESID", Request.QueryString["resid"])
</td>
<td width="70px">&nbsp;</td>
</tr>
@Html.Action("MemoTypeAllUC", "Control", new { bunissId = (int)WX.CRM.Model.Enum.EnumMemoType.意向工单 })
<tr style="display:none">
<td>
是否添加任务
</td>
<td>
<input type="checkbox" name="CKTask" id="CKTask"><label for="CKTask">&nbsp;是</label>
&nbsp;&nbsp;&nbsp;
@Html.Action("TimeUC", "Control", "")
</td>
<td></td>
</tr>
<tr>
<td>
工单
</td>
<td>
@Html.TextAreaFor(m => m.STRCONTENT, new { style = "width:500px;height:60px;" })
</td>
<td>
@Html.ValidationMessageFor(m => m.STRCONTENT)
</td>
</tr>
<tr>
<td class="tdCenter" colspan="3">
<input type="submit" id="BtnAdd" value=" 添加工单 " class="btn btn-primary" name="BtnAdd">
&nbsp;&nbsp;&nbsp;
<input type="button" id="BtnClose" value=" 关 闭 " class="btn btn-danger">
</td>
</tr>
</tbody>
</table>
</form>
</div>
<script>
$(function () {
$("#BtnClose").click(function () { window.parent.frameReturnByClose(); });
$("#BtnAdd").click(function () {
if ($("#CreateForm").valid()) {
$.r_ajax({
url: "/Ord/Memo/PurposeMemoCreate",
type: "Post",
data: $("#CreateForm").serialize(),
dataType: "json",
loading: true,
success: function (data) {
if (data.type == 1) {
window.parent.frameReturnByMes(data.message);
// window.parent.memoReload(2);
window.parent.MemoloadAll(2);
window.parent.frameReturnByClose()
}
else {
$.messager.alert("错误", data.message, "error")
}
}
});
}
return false;
});
});
</script>