78 lines
2.5 KiB
Plaintext
78 lines
2.5 KiB
Plaintext
@using WX.CRM.WebHelper;
|
|
@{
|
|
ViewBag.Title = "Index";
|
|
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
|
|
}
|
|
<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>
|
|
时间:<input type="text" id="txt_ctime" name="txt_ctime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" style="width:160px;" />
|
|
|
|
~<input type="text" id="txt_etime" name="txt_etime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" style="width:160px;" />
|
|
</li>
|
|
<li>品名代码:@Html.DropDownList("slt_productName", ViewBag.QHProductList as IEnumerable<SelectListItem>)</li>
|
|
<li>
|
|
@*@Html.ToolButtonPlain("btnQuery" , "icon-search", "查询", false, "")*@
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
@Html.Raw(ViewBag.gridTable)
|
|
</div>
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
getDate();
|
|
$('#tablist').tablegrid({
|
|
url: '/QH/ProductTranCount/GetHtmlList',
|
|
height: $(window).height() - 60,
|
|
loadnow: true,
|
|
onloadsuccess: function (data) {
|
|
//成功
|
|
}, onloaderror: function () {
|
|
//失败
|
|
}
|
|
});
|
|
$("#btnQuery").click(function () {
|
|
|
|
$('#tablist').tablegrid("Search");
|
|
});
|
|
$(window).resize(function () {//自动适应大小
|
|
$('#tablist').tablegrid('resize', {
|
|
height: $(window).height() - 60
|
|
});
|
|
});
|
|
});
|
|
|
|
function getDate() {
|
|
var _date, year, month, day, firstdate, enddate, $stime, $etime;
|
|
_date = new Date();
|
|
year = _date.getFullYear();
|
|
month = _date.getMonth() + 1;
|
|
if (month < 10) {
|
|
month = "0" + month;
|
|
}
|
|
day = _date.getDay() + 1;
|
|
if (day < 10) {
|
|
day = "0" + day;
|
|
}
|
|
// firstdate = year + '-' + month + "-" + "01";
|
|
enddate = year + '-' + month + "-" + day;
|
|
$stime = $("#txt_ctime");
|
|
$etime = $("#txt_etime");
|
|
if ($stime.val() == "") {
|
|
$stime.val(enddate + " 00:00:00");
|
|
} if ($etime.val() == "") {
|
|
$etime.val(enddate + " 23:59:00");
|
|
}
|
|
}
|
|
function frameReturnByReload(flag) {
|
|
$("#tablist").tablegrid("Load");
|
|
}
|
|
function frameReturnByMes(mes) {
|
|
$.messageBox5s('提示', mes);
|
|
}
|
|
</script>
|