You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
260 lines
8.7 KiB
260 lines
8.7 KiB
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
|
|
Inherits="System.Web.Mvc.ViewPage<QMAPP.MESReport.Web.Models.LineQTY.QTYInfoCountVModel>" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
|
生产统计
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
|
<%=Html.QPSeach(105,true) %>
|
|
<table id="condiTable">
|
|
<tr>
|
|
<th align="right">
|
|
<%=Html.QV(p => p.PROJECTCODE)%>
|
|
</th>
|
|
<td>
|
|
<%=Html.QC(p => p.PROJECTCODE)%>
|
|
</td>
|
|
<th align="right">
|
|
<%=Html.QV(p => p.HBTYPE)%>
|
|
</th>
|
|
<td>
|
|
<%=Html.QC(p => p.HBTYPE)%>
|
|
</td>
|
|
<th align="right">
|
|
<%=Html.QV(p => p.COLOR)%>
|
|
</th>
|
|
<td>
|
|
<%=Html.QC(p => p.COLOR)%>
|
|
</td>
|
|
<th align="right">
|
|
<%=Html.QV(p => p.MATERIAL_CODE)%>
|
|
</th>
|
|
<td >
|
|
<%=Html.QC(p => p.MATERIAL_CODE)%>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th align="right">
|
|
<%=Html.QV(p => p.TYPE_COUNT)%>
|
|
</th>
|
|
<td>
|
|
<%=Html.QC(p => p.TYPE_COUNT)%>
|
|
</td>
|
|
<th align="right">
|
|
日期
|
|
</th>
|
|
<td>
|
|
<%=Html.QC(p => p.START_DATE)%>
|
|
</td>
|
|
<th align="right">
|
|
至
|
|
</th>
|
|
<td>
|
|
<%=Html.QC(p => p.END_DATE)%>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<%=Html.QPEnd()%>
|
|
<%=Html.QPList() %>
|
|
<%=QMAPP.Common.Web.AppConfig.QMEChartPageConfig()%>
|
|
<%--异步获取数据生成图表--%>
|
|
<div style="overflow:auto;height:99%;">
|
|
<%=QMFrameWork.WebUI.QMEChart.QMEChartHelper.CreateEchart("echartID", "/QTYInfoCount/GetEchartDataBar2", new string[] { "line", "bar" }, "myEChart")%>
|
|
<!--图表配置-->
|
|
<input id="hiChartImg" name="hiChartImg" type="hidden" />
|
|
<div style="width: 100%; text-align: center;">
|
|
<table id="maintb" class="mtbtt" style="width: 90%; margin: 0px auto;">
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
function GetTable() {
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "/QTYInfoCount/GetTable?MATERIAL_CODE=" + $("input[name='MATERIAL_CODE']").val() + "&TYPE_COUNT=" + $("input[name='TYPE_COUNT']").val() + "&START_DATE=" + $("input[name='START_DATE']").val() + "&END_DATE=" + $("input[name='END_DATE']").val() + "&PROJECTCODE=" + $("#PROJECTCODE").combobox('getValue') + "&HBTYPE=" + $('#HBTYPE').combobox('getValue') + "&COLOR=" + $('#COLOR').combobox('getValue'),
|
|
dataType: "json",
|
|
data: {},
|
|
success: function (data) {
|
|
$("#maintb").html(data);
|
|
},
|
|
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
alert(errorThrown);
|
|
}
|
|
|
|
});
|
|
}
|
|
|
|
function refreshEChartbar2() {
|
|
var endtime = document.getElementById("END_DATE").value;
|
|
if (parseDate($("#START_DATE").val()) > parseDate($("#END_DATE").val()) && endtime != "") {
|
|
alert("开始时间不能大于结束时间!");
|
|
return;
|
|
}
|
|
var pro = $('#PROJECTCODE').combobox('getValue');
|
|
if (pro == "") {
|
|
MSI("提示", "请选择项目号!");
|
|
return;
|
|
}
|
|
|
|
|
|
var typeCount = $('#TYPE_COUNT').combobox('getValue');
|
|
if (typeCount == "") {
|
|
MSI("提示", "请选择统计类型!");
|
|
return;
|
|
}
|
|
|
|
|
|
var startDate = $('#START_DATE').val();
|
|
if (startDate == "") {
|
|
MSI("提示", "请选择日期!");
|
|
return;
|
|
}
|
|
|
|
var endDate = $('#END_DATE').val();
|
|
if (endDate == "") {
|
|
MSI("提示", "请选择截止日期!");
|
|
return;
|
|
}
|
|
|
|
var ps = [];
|
|
var PROJECTCODE = {};
|
|
PROJECTCODE.key = "PROJECTCODE";
|
|
PROJECTCODE.value = $("input[name='PROJECTCODE']").val();
|
|
ps.push(PROJECTCODE);
|
|
|
|
var HBTYPE = {};
|
|
HBTYPE.key = "HBTYPE";
|
|
HBTYPE.value = $("input[name='HBTYPE']").val();
|
|
ps.push(HBTYPE);
|
|
|
|
var COLOR = {};
|
|
COLOR.key = "COLOR";
|
|
COLOR.value = $("input[name='COLOR']").val();
|
|
ps.push(COLOR);
|
|
|
|
var MATERIAL_CODE = {};
|
|
MATERIAL_CODE.key = "MATERIAL_CODE";
|
|
MATERIAL_CODE.value = $("input[name='MATERIAL_CODE']").val();
|
|
ps.push(MATERIAL_CODE);
|
|
|
|
var TYPE_COUNT = {};
|
|
TYPE_COUNT.key = "TYPE_COUNT";
|
|
TYPE_COUNT.value = $("input[name='TYPE_COUNT']").val();
|
|
ps.push(TYPE_COUNT);
|
|
|
|
var START_DATE = {};
|
|
START_DATE.key = "START_DATE";
|
|
START_DATE.value = $("input[name='START_DATE']").val();
|
|
ps.push(START_DATE);
|
|
|
|
var END_DATE = {};
|
|
END_DATE.key = "END_DATE";
|
|
END_DATE.value = $("input[name='END_DATE']").val();
|
|
ps.push(END_DATE);
|
|
GetEchartData("/QTYInfoCount/GetEchartDataBar2", myEChart, ps);
|
|
GetTable();
|
|
}
|
|
|
|
//导出
|
|
function Export() {
|
|
var img = myEChart.getDataURL("png");
|
|
$("#hiChartImg").val(img);
|
|
submitByButton("ExportBanCi");
|
|
}
|
|
|
|
|
|
$(function () {
|
|
|
|
//项目号
|
|
$('#PROJECTCODE').combobox({
|
|
onSelect: function () {
|
|
|
|
var projectCode = $('#PROJECTCODE').combobox('getValue');
|
|
var hbtype = $('#HBTYPE').combobox('getValue');
|
|
var color = $('#COLOR').combobox('getValue');
|
|
|
|
$('#MATERIAL_CODE').combobox({
|
|
url: "/Dict/GetMaterialForCount?PROJECTCODE=" + projectCode + "&HBTYPE=" + hbtype + "&COLOR=" + color,
|
|
editable: 'false',
|
|
valueField: 'MATERIAL_CODE',
|
|
textField: 'MATERIAL_NAME'
|
|
});
|
|
|
|
}
|
|
})
|
|
|
|
//高低配下拉事件
|
|
$('#HBTYPE').combobox({
|
|
onSelect: function () {
|
|
|
|
var hbtype = $('#HBTYPE').combobox('getValue');
|
|
var projectCode = $('#PROJECTCODE').combobox('getValue');
|
|
var color = $('#COLOR').combobox('getValue');
|
|
|
|
|
|
$('#MATERIAL_CODE').combobox({
|
|
url: "/Dict/GetMaterialForCount?PROJECTCODE=" + projectCode + "&HBTYPE=" + hbtype + "&COLOR=" + color,
|
|
editable: 'false',
|
|
valueField: 'MATERIAL_CODE',
|
|
textField: 'MATERIAL_NAME'
|
|
});
|
|
}
|
|
|
|
|
|
});
|
|
|
|
//颜色下拉事件
|
|
$('#COLOR').combobox({
|
|
|
|
onSelect: function () {
|
|
|
|
var color = $('#COLOR').combobox('getValue');
|
|
var projectCode = $('#PROJECTCODE').combobox('getValue');
|
|
var hbtype = $('#HBTYPE').combobox('getValue');
|
|
|
|
$('#MATERIAL_CODE').combobox({
|
|
url: "/Dict/GetMaterialForCount?PROJECTCODE=" + projectCode + "&HBTYPE=" + hbtype + "&COLOR=" + color,
|
|
editable: 'false',
|
|
valueField: 'MATERIAL_CODE',
|
|
textField: 'MATERIAL_NAME'
|
|
});
|
|
}
|
|
|
|
});
|
|
|
|
//$("#TYPE_COUNT").combobox('setValue', "0");
|
|
|
|
});
|
|
|
|
GetTable();
|
|
</script>
|
|
<%=Html.QPEnd() %>
|
|
<%=Html.Hidden("selectKey")%>
|
|
<%=Html.Hidden("PID")%>
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
|
|
<style type="text/css">
|
|
.mtbtt
|
|
{
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
.mtbtt tr td
|
|
{
|
|
border: 1px solid grey;
|
|
}
|
|
|
|
.L1cos
|
|
{
|
|
width: 160px;
|
|
}
|
|
</style>
|
|
<table cellpadding="0" cellspacing="0">
|
|
<tr>
|
|
<td align="center">
|
|
<%=Html.QTButtonSearch("QTYInfoCount", "GetTrendData", "refreshEChartbar2()", QMAPP.Common.Web.SystemLimit.isLimt)%>
|
|
<%=Html.QTButton("export", "ExportBanCi", QMFrameWork.WebUI.IconCls.redo, "Export()", QMAPP.Common.Web.SystemLimit.isLimt)%>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</asp:Content>
|
|
|