85 lines
2.8 KiB
Plaintext
85 lines
2.8 KiB
Plaintext
@using WX.CRM.WebHelper;
|
|
@{
|
|
ViewBag.Title = "bas_agent";
|
|
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
|
|
}
|
|
<link href="~/Content/main.css" rel="stylesheet" />
|
|
<div class="mvctool">
|
|
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
|
|
</div>
|
|
<div class="bas_datagrid">
|
|
<div id="tb" style="padding:5px;height:auto" class="grid_toolbar">
|
|
<ul class="toolBar_ul">
|
|
<li>
|
|
年份:<select id="slt_year" name="slt_year" style="width: 150px; height: 22px">
|
|
@{
|
|
int year = DateTime.Now.Year;
|
|
for (int i = 0; i < 3; i++)
|
|
{
|
|
if (i == 0)
|
|
{
|
|
<option value="@year" selected>@year</option>
|
|
}
|
|
else
|
|
{
|
|
<option value="@year" >@year</option>
|
|
}
|
|
year--;
|
|
}
|
|
}
|
|
</select>
|
|
</li>
|
|
<li>
|
|
季度:<select id="slt_quarter" name="slt_quarter" style="width: 150px; height: 22px">
|
|
<option value="01">第一季度</option>
|
|
<option value="02">第二季度</option>
|
|
<option value="03">第三季度</option>
|
|
<option value="04">第四季度</option>
|
|
</select>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
@Html.Raw(ViewBag.gridTable)
|
|
</div>
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
var date = new Date();
|
|
var month = date.getMonth();
|
|
var index = 0;
|
|
if (month < 3) {
|
|
index = 0;
|
|
}
|
|
else if (month < 6) {
|
|
index = 1;
|
|
}
|
|
else if (month < 9) {
|
|
index = 2;
|
|
}
|
|
else
|
|
{
|
|
index = 3;
|
|
}
|
|
$("#slt_quarter option").eq(index).attr("selected", true);
|
|
$("#btnQuery").click(function () {
|
|
$('#tablist').tablegrid("Search");
|
|
});
|
|
$('#tablist').tablegrid({
|
|
url: '/CustomerQH/GetTransactionDetailHtml',
|
|
height: $(window).height() - 110,
|
|
loadNow: true,
|
|
data: {
|
|
UserAccount: '@(Request.QueryString["UserAccount"])', year: $("#slt_year").find("option:selected").text(), quarter: $("#slt_quarter").find("option:selected").text()
|
|
},
|
|
onLoadError: function () {
|
|
$.messager.alert("警告", "数据加载失败!", "erro");
|
|
}
|
|
});
|
|
$(window).resize(function () {//自动适应大小
|
|
$('#tablist').tablegrid('resize', {
|
|
height: $(window).height() - 110
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
|