ComplianceServer/oldcode/WEB/Views/Ww/HGQW/MessageCompliance.cshtml

152 lines
5.1 KiB
Plaintext

@model WX.CRM.Model.Entity.WX_MESSAGECOMPLIANCE
@using WX.CRM.WebHelper;
@{
ViewBag.Title = "合规消息";
Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
}
<div class="mvctool bgb">
@Html.ToolButtonPlain("btnSave", "icon-save", "保存", false, "")
</div>
@using (Html.BeginForm("MessageCompliance", "Message", null, FormMethod.Post, new { Id = "CreateForm" }))
{
@Html.ValidationSummary(true)
<input type="hidden" value="@ViewBag.qiwei" name="qiweijson"/>
<table class="fromEditTable ">
<tr>
<td style="width:120px;">
大类:
</td>
<td style="width:310px">
<select id="bigType" name="bigType" style="width:150px;height:22px" onChange="changeselect(this.value)">
<option value="0">--请选择大类--</option>
@foreach (var item in ViewBag.BigTypeList as List<SelectListItem>)
{
<option value="@item.Value">@item.Text</option>
}
</select>
</td>
<td width="120px"></td>
</tr>
<tr>
<td style="width:120px;">
小类:
</td>
<td style="width:310px">
<select id="subType" name="subType" style="width:220px;height:22px">
<option value="0">--请选择小类--</option>
</select>
</td>
<td width="120px"></td>
</tr>
<tr>
<td style="width:120px;">
违规细则
</td>
<td style="width:310px">
@Html.TextAreaFor(m => m.REMARK, new { style = "width:330px;height:80px" })
</td>
<td width="120px">
<input type="hidden" name="msgsvrid" id="msgsvrid" value="@Request["msgsvrid"]" />
<input type="hidden" name="username" id="username" value="@Request["username"]" />
<input type="hidden" name="msgcontent" id="msgcontent" value="" />
<input type="hidden" name="month" id="month" value="@Request["month"]" />
<input type="hidden" name="msgtype" id="msgtype" value="@Request["msgtype"]" />
<input type="hidden" name="talker" id="talker" value="@Request["talker"]" />
<input type="hidden" name="msgurl" id="msgurl" value="@Request["msgurl"]" />
<input type="hidden" name="createtime" id="createtime" value="@Request["createtime"]" />
</td>
</tr>
<tr>
<td style="width:120px;">
处理结果
</td>
<td style="width:310px">
@Html.TextAreaFor(m => m.RESULT, new { style = "width:330px;height:60px" })
</td>
<td width="120px"></td>
</tr>
</table>
}
<script type="text/javascript">
$(function () {
$("#btnSave").click(function () {
if ($("#CreateForm").valid()) {
$.r_ajax({
url: "/Ww/HGQW/MessageCompliance",
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;
});
$("#btnQuery").click(function () {
$('#tablist').tablegrid("Search");
});
var msgContent = parent.getMsgContent();
$("#msgcontent").val(msgContent);
});
function changeselect(bigType) {
var nb1defaultIndex = 0;
if (bigType == 0) {
$("#subType").unbind();
$("#subType").html("<option value='0'>--请选择小类--</option>");
return;
}
$.r_post("/WeiXin/Message/GetSubTypeList?bigType=" + bigType, function (data) {
$("#subType").unbind();
$("#subType").html("<option value='0'>--请选择小类--</option>");
$(data).each(function (n, m) {
/*if (nb1defaultIndex == 0) {
$("#slt_subProductId").append("<option value='" + m.Value + "' selected='selected'>" + m.Text + "</option>");
}
else {*/
$("#subType").append("<option value='" + m.Value + "'>" + m.Text + "</option>");
//}
});
nb1defaultIndex++;
}, "json");
}
function GetIframeHtml(src) {
return "<iframe width='100%' height='98%' scrolling='no' frameborder='0'' src='" + src + "'></iframe>";
}
function frameReturnByClose() {
$("#modalwindow").window('close');
}
</script>