121 lines
4.0 KiB
Plaintext
121 lines
4.0 KiB
Plaintext
<#def designatedPath="/qcReasonStat.htm"/>
|
|
<script>
|
|
Z.onload(function()
|
|
{
|
|
doQueryQcDisposeInfo(1);
|
|
|
|
var calcTotal=function(table,column)
|
|
{//合计,表格对象,对哪一列进行合计,第一列从0开始
|
|
var trs=table.getElementsByTagName('tr');
|
|
var start=1,//忽略第一行,从第二行开始
|
|
end=trs.length-1;//忽略最后一行
|
|
var total=0;
|
|
for(var i=start;i<end;i++){
|
|
var td=trs[i].getElementsByTagName('td')[column];
|
|
var t=parseInt(td.innerHTML);
|
|
if(t)total+=t;
|
|
}
|
|
trs[end].getElementsByTagName('td')[column-1].innerHTML=total;
|
|
};
|
|
|
|
calcTotal(document.getElementById('statTable'),2);
|
|
calcTotal(document.getElementById('statTable'),3);
|
|
|
|
var divisor = document.getElementById("divisor").innerHTML;
|
|
var dividend = document.getElementById("dividend").innerHTML;
|
|
var answer = (dividend * 100 / divisor).toFixed(2);
|
|
|
|
document.getElementById("answer").innerHTML = answer + '%';
|
|
});
|
|
|
|
var operatorCode;
|
|
function doQueryQcDispose(operatorCodes)
|
|
{
|
|
operatorCode = operatorCodes;
|
|
doQueryQcDisposeInfo(1);
|
|
}
|
|
|
|
function doQueryQcDisposeInfo(page)
|
|
{
|
|
var ajax = new Z.Ajax();
|
|
ajax.setClassName("StatPresenter");
|
|
ajax.setMethodName("doQueryQcDispose");
|
|
ajax.addParam("page",page);
|
|
ajax.addParam("beginDate", Z("#beginDate").val());
|
|
ajax.addParam("endDate", Z("#endDate").val());
|
|
ajax.addParam("operatorCode", operatorCode);
|
|
ajax.setCallback("result");
|
|
ajax.setLoading("result");
|
|
ajax.execute();
|
|
}
|
|
</script>
|
|
|
|
${zhiqim_manager_breadcrumb("质检处理统计")}
|
|
${zhiqim_manager_content()}
|
|
<#-- 导航栏 -->
|
|
<div class="z-tabnav-main z-blue z-mg-b20">
|
|
<nav>
|
|
<ul>
|
|
<li onclick="Z.Location.href('qcReasonStat.htm');">质检原因统计</li>
|
|
<#if ZmrPathRule.check(request, "/qcDesignerStat.htm")><li onclick="Z.L.href('/qcDesignerStat.htm')">设计师质检统计</li></#if>
|
|
<li class="z-active">质检处理统计</li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
|
|
<table class="z-table z-bordered z-pd6">
|
|
<tr>
|
|
<td colspan="2">
|
|
<form name="theForm" action="qcDisposeStat.htm">
|
|
<table class="z-table">
|
|
<tr class="z-h40" bgcolor="${zmr_thead_bgcolor}">
|
|
<td class="z-bold z-px14 zi-pd-l5"> 统计查询条件:</td>
|
|
</tr>
|
|
</table>
|
|
<table class="z-table z-bordered z-pd6">
|
|
<tr class="z-h40 z-bg-white">
|
|
<td>查询日期:
|
|
<input name="beginDate" id="beginDate" onfocus="Z.date(this);" readonly class="z-input ${zmr_color_class} z-w100" value="${beginDate}">-
|
|
<input name="endDate" id="endDate" onfocus="Z.date(this);" readonly class="z-input ${zmr_color_class} z-w100" value="${endDate}">
|
|
<input type="hidden" name="query" id="query" value="1" >
|
|
<button class="z-mg-l10 z-button ${zmr_color_class}">查询</button>
|
|
</td>
|
|
</table>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
<tr class="z-h40">
|
|
<td width="400" valign="top">
|
|
<table class="z-table z-bordered z-pd6 z-bg-white z-text-center" id="statTable">
|
|
<tr class="z-h40">
|
|
<td>序号</td>
|
|
<td>处理人</td>
|
|
<td>处理单数</td>
|
|
<td>违规单数</td>
|
|
<td>违规占比</td>
|
|
</tr>
|
|
<#for item : modelList>
|
|
<tr class="z-h40" onclick="doQueryQcDispose('${item.getOperatorCode()}');">
|
|
<td>${item_index + 1}</td>
|
|
<td>${item.getOperatorCode()}</td>
|
|
<td>${item.getQcCount()}</td>
|
|
<td>${item.getViolationsCount()}</td>
|
|
<td>${Maths.division(item.getViolationsCount()*100, item.getQcCount(), 2)}%</td>
|
|
</tr>
|
|
</#for>
|
|
<#if modelList.size() == 0>
|
|
${zhiqim_manager_no_record(5, "暂时没有质检统计信息")}
|
|
<#else>
|
|
<tr class="z-h40" bgcolor="${zmr_thead_bgcolor}">
|
|
<td colspan="2">总计</td>
|
|
<td id="divisor"></td>
|
|
<td id="dividend"></td>
|
|
<td id="answer"></td>
|
|
</tr>
|
|
</#if>
|
|
</table>
|
|
</td>
|
|
<td width="*" id="result" valign="top" id="result" ></td>
|
|
</tr>
|
|
</table>
|
|
${zhiqim_manager_content_end()} |