ComplianceServer/oldcode/WEB/Views/Res/Activity/Strategy.cshtml

150 lines
6.8 KiB
Plaintext

@using WX.CRM.WebHelper
@{
ViewBag.Title = "筛选策略";
Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
}
<script type="text/javascript">
$(function () {
$("#btnCheckAll").click(function () {
if ($(this).prop("checked") == true) {
$(this).prop("checked", false);
$("input[type='checkbox']").removeProp("checked");
$(".checktd").removeClass("checktd").addClass("unchecktd");
}
else {
$(this).prop("checked", true);
$("input[type='checkbox']").prop("checked", true);
$(".unchecktd").removeClass("unchecktd").addClass("checktd");
}
});
$("#CheckBoxList td").live("click", function () {
if ($(this).find("input").prop("checked") == false)
$(this).removeClass("checktd").addClass("unchecktd");
else
$(this).removeClass("unchecktd").addClass("checktd");
});
$("#btnConfirm").click(function () {
var checkedFilds = "";
$.each($("#RadioButtnList td input"), function (i, ex) {
if ($(ex).prop("checked") == true) {
checkedFilds += $(ex).val() + ",";
}
});
$.each($("#CheckBoxList td input"), function (i, ex) {
if ($(ex).prop("checked") == true) {
checkedFilds += $(ex).val() + ",";
}
});
if (checkedFilds.length > 1) {
checkedFilds = checkedFilds.substring(0, checkedFilds.length - 1);
}
$.r_ajax({
url: "/Res/Activity/DistbuteDataQueryAndInsert",
type: "Post",
data: {
ResTypeId: '@Request.QueryString["ResTypeId"]',
ActivityId: '@Request.QueryString["ActivityId"]',
stime: '@Request.QueryString["stime"]',
etime: '@Request.QueryString["etime"]',
choices: checkedFilds,
excludeWeixinRes: $('#checkWeixin').is(':checked'),
excludeOrderRes: $('#checkOrder').is(':checked'),
excludeSpecialMemo: $('#checkSpecialMemo').is(':checked'),
excludeAddWeixin: $('#checkAddWeixin').is(':checked'),
excludeForbidCall: $('#checkForbidCall').is(':checked'),
excludeEmptyNum: $('#checkEmptyNum').is(':checked'),
Memostime: $("#txt_Memostime").val(),
Memoetime: $("#txt_Memoetime").val()
},
dataType: "json",
loading: true,
success: function (data) {
if (data.Success == true) {
window.parent.frameReturnByClose();
window.parent.OpenDistbuteWin("/Res/Activity/Distbute?ImportId=" + data.ImportId + "&DataCount=" + data.DataCount + "&ResTypeId=" + '@Request.QueryString["ResTypeId"]' + "&ActivityId=" + '@Request.QueryString["ActivityId"]');
}
else {
//window.parent.frameReturnByMes(data.message);
//$.messageBox5s('提示', data.Message);
if (data.DataCount == -1) {
$.messager.alert("警告", "其他人员正在分配资源,请等待!", "error");
}
else {
$.messager.alert("警告", "未知错误,请联系管理员!", "error");
}
}
}
});
// $("#dlgStrategy").dialog('close');
});
$("#btnExpt").click(function () {
var checkedFilds = "";
$.each($("#RadioButtnList td input"), function (i, ex) {
if ($(ex).prop("checked") == true) {
checkedFilds += $(ex).val() + ",";
}
});
$.each($("#CheckBoxList td input"), function (i, ex) {
if ($(ex).prop("checked") == true) {
checkedFilds += $(ex).val() + ",";
}
});
if (checkedFilds.length > 1) {
checkedFilds = checkedFilds.substring(0, checkedFilds.length - 1);
}
var url = "/Res/Activity/DistbuteDataExport?ResTypeId=@Request.QueryString["ResTypeId"]&ActivityId=@Request.QueryString["ActivityId"]&stime=@Request.QueryString["stime"]&etime=@Request.QueryString["etime"]&choices=" + checkedFilds + "&excludeWeixinRes=" + $('#checkWeixin').val() + "&excludeOrderRes=" + $('#checkOrder').val() + "&excludeSpecialMemo=" + $('#checkSpecialMemo').val() + "&Memostime=" + $("#txt_Memostime").val() + "&Memoetime=" + $("#txt_Memoetime").val() + "&" + GetQueryStr();
window.open(url);//弹出下载
});
});
</script>
<div class="mvctool bgb">
@if(Request["type"]=="1")
{
@Html.ToolButtonPlain("btnExpt", "icon-excel", "导出", false, "")
}
else
{
@Html.ToolButtonPlain("btnConfirm", "icon-save", "确定", false, "")
}
@Html.ToolButtonPlain("btnCheckAll", "icon-check", "全选", false, "")
@*@Html.CheckBox("checkWeixin", false)去已关联微信*@
<input id="checkWeixin" name="checkWeixin" type="checkbox">去已关联微信
@Html.CheckBox("checkOrder",false)去已下订单用户
@if (ViewBag.projectType == "2")
{
@Html.CheckBox("checkSpecialMemo", false)<span>去首次汇款工单</span>
@Html.CheckBox("checkAddWeixin", false)<span>去已加微信好友</span>
<p>
@Html.CheckBox("checkForbidCall", false)<span>去红色禁止外呼</span>
@Html.CheckBox("checkEmptyNum", false)<span>去空错号工单</span>
</p>
<script>$(".mvctool").height(60);</script>
}
</div>
<table class="fromEditTable setTextWidth300">
<tbody>
@*<tr id="RadioButtnList">
<td>
是否已签约:
@Html.RadioButtonList("Radio", new List<System.Web.UI.WebControls.ListItem>()
{ new System.Web.UI.WebControls.ListItem() { Text = "是", Value = "1"},
new System.Web.UI.WebControls.ListItem() { Text = "否", Value = "0" }})
</td>
</tr>*@
<tr id="CheckBoxList">
<td>
@Html.CheckBox("checks", "Value='7'")去除时间段内工单:
@Html.WdatePickerText("txt_Memostime", DateTime.Now.AddDays(-8).ToString("yyyy-MM-dd"), false, "style='width:100px'")~@Html.WdatePickerText("txt_Memoetime", DateTime.Now.ToString("yyyy-MM-dd"), false, "style='width:100px'")
</td>
</tr>
</tbody>
</table>