119 lines
4.7 KiB
Plaintext
119 lines
4.7 KiB
Plaintext
|
|
@{
|
|
ViewBag.Title = "hsmxbQuery";
|
|
}
|
|
|
|
@section scripts{
|
|
<script type="text/javascript">
|
|
|
|
$(function () {
|
|
$("#start").ligerDateEditor();
|
|
$("#end").ligerDateEditor();
|
|
$("#start").ligerGetDateEditorManager().setValue(fun_date(-30));
|
|
$("#end").ligerGetDateEditorManager().setValue(fun_date(0));
|
|
|
|
cx();
|
|
})
|
|
|
|
function cx() {
|
|
var data = $("#searchForm").serializeArray();
|
|
$.ajax({
|
|
url: "@Url.Action("getHSMXB")", data: data, type: "post", dataType: "json",
|
|
success: function (data) {
|
|
$("#grid1").ligerGrid({
|
|
height: '98%',
|
|
width: '98%',
|
|
isScroll: true,
|
|
dataAction: "local",
|
|
selectRowButtonOnly: true,
|
|
data: data.data,
|
|
columns: data.columns,
|
|
alternatingRow: false,
|
|
usePager: false,
|
|
rownumbers:true,
|
|
});
|
|
liger.get("grid1").reRender();
|
|
}
|
|
});
|
|
}
|
|
function excel() {
|
|
var data = $("#searchForm").serializeArray();
|
|
|
|
$.ajax({
|
|
type: "post", cache: false, dataType: "json",
|
|
url: "@Url.Action("getHSMXBExcel")",
|
|
data: data,
|
|
success: function (result) {
|
|
$.ligerDialog.closeWaitting();
|
|
if (result.State == 1)
|
|
$("#export").attr("src", "@Url.Action("down")?file=" + result.Message);
|
|
else
|
|
$.ligerDialog.error(result.Message);
|
|
},
|
|
error: function (msg) {
|
|
$.ligerDialog.closeWaitting();
|
|
$.ligerDialog.error("操作失败,请重新操作");
|
|
return false;
|
|
},
|
|
beforeSend: function () { $.ligerDialog.waitting("正在导出,请稍候……"); }
|
|
});
|
|
}
|
|
function yl()
|
|
{
|
|
var url = "@(Request.Url.Scheme + "://" + Request.Url.Authority + Url.Content("~/"))";
|
|
if (window.top.Formium.external.Print.finit( "cbhsb.frx")) {
|
|
window.top.Formium.external.Print.PrintCBHS($("#start"), $("#end").val(), "预览");
|
|
}
|
|
}
|
|
function dy()
|
|
{
|
|
var url = "@(Request.Url.Scheme + "://" + Request.Url.Authority + Url.Content("~/"))";
|
|
if (window.top.Formium.external.Print.finit( "cbhsb.frx")) {
|
|
window.top.Formium.external.Print.PrintCBHS($("#start").val(), $("#end").val(), "打印");
|
|
}
|
|
}
|
|
|
|
function fun_date(days) {
|
|
var date1 = new Date(),
|
|
time1 = date1.getFullYear() + "-" + (date1.getMonth() + 1) + "-" + date1.getDate();//time1表示当前时间
|
|
var date2 = new Date(date1);
|
|
date2.setDate(date1.getDate() + days);
|
|
|
|
var y = date2.getFullYear();
|
|
var m = date2.getMonth() + 1;
|
|
m = m < 10 ? '0' + m : m;
|
|
var d = date2.getDate();
|
|
d = d < 10 ? ('0' + d) : d;
|
|
var time2 = y + "-" + m + "-" + d;
|
|
return time2;
|
|
}
|
|
</script>
|
|
}
|
|
<form id="searchForm">
|
|
<table class="t1" style="width:100%">
|
|
<tr>
|
|
<td class="ltd" style="width:70px">仓库:</td>
|
|
<td class="rtd" style="width:150px">@Html.DropDownList("kcid", ViewBag.kD as SelectList, "----请选择----", new { @class = "l-text" })</td>
|
|
<td width="70" class="ltd">时间段</td>
|
|
<td width="150" class="rtd"><input type="text" id="start" name="start"></td>
|
|
<td width="20" class="ltd">到</td>
|
|
<td width="150" class="rtd"><input type="text" id="end" name="end"></td>
|
|
<td width="200" class="rtd">
|
|
<input type="button" value="查询" onclick="cx();" class="l-button" />
|
|
<input type="button" value="导出excel" onclick="excel();" class="l-button" />
|
|
</td>
|
|
<td class="rtd" width="80"><input type="button" value="预览" onclick="yl();" class="l-button" /></td>
|
|
<td class="rtd" width="80"><input type="button" value="打印" onclick="dy();" class="l-button" /></td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
<div id="grid1"></div>
|
|
<div style="display:none">
|
|
<iframe id="export" src="about:blank"></iframe>
|
|
</div>
|
|
<div class="dispReport">
|
|
<object classid="clsid:F6A015E2-092A-4006-93DA-4CBDE3AFF4B8" id="window.top.Formium.external.Print" width="300" height="50"></object>
|
|
</div>
|
|
|