<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
<script type="text/javascript" src="${pageContext.request.contextPath}/pms/pub/combobox/comboboxUtil.js" charset="utf-8"></script>
|
<style type="text/css">
|
#form .table th{width: 60px;}
|
.easyuiStyl{
|
width:120px;border: 1px solid #E8E8E8;
|
line-height: 20px;
|
padding-left:5px;
|
}
|
.unitStyl{
|
width:40px;border: 1px solid #E8E8E8;
|
line-height: 20px;
|
text-align: center;
|
}
|
</style>
|
<script type="text/javascript">
|
$("#form input[name='date']").attr("readonly","readonly");
|
$("#form input[name='shift']").attr("readonly","readonly");
|
$("#form input[name='team']").attr("readonly","readonly");
|
$("#form input[name='matProd']").attr("readonly","readonly");
|
$("#form input[name='unitName']").attr("readonly","readonly");
|
$("#form input[name='equipment']").attr("readonly","readonly");
|
$("#form input[name='feedbackUser']").attr("readonly","readonly");
|
/* $('#workorderCode').searchbox({
|
searcher:function(value,name){
|
var dialog = parent.$.modalDialog({
|
title : '选择工单',
|
width : 750,
|
height : 420,
|
href : '${pageContext.request.contextPath}/pms/workorder/goToWorkOrderPickJsp.do?workshop=${workshop}',
|
buttons : [ {
|
text : '选择',
|
iconCls:'icon-standard-disk',
|
handler : function() {
|
var row = dialog.find("#workorderPickGrid").datagrid('getSelected');
|
if(row){
|
$("#workorderCode").searchbox("setValue",row.code);
|
$("#form input[name='workorder']").attr("value",row.id);
|
$("#form input[name='date']").attr("value",row.date);
|
$("#form input[name='shift']").attr("value",row.shift);
|
$("#form input[name='team']").attr("value",row.team);
|
$("#form input[name='unitName']").attr("value",row.unit);
|
$("#form input[name='unit']").attr("value",row.unitId);
|
$("#form input[name='matProd']").attr("value",row.mat);
|
$("#form input[name='equipment']").attr("value",row.equipment);
|
$("#stim").datetimebox("setValue",row.stim);
|
$("#etim").datetimebox("setValue",row.etim);
|
dialog.dialog('destroy');
|
}else{
|
$.messager.show('提示', '请选择工单', 'info');
|
}
|
}
|
} ]
|
});
|
}
|
}); */
|
$("#form input[name='workorderCode']").attr("readonly","readonly");
|
|
/**
|
鼠标失去焦点时间
|
1.只有包装机数据追溯才有鼠标失去焦点
|
|
*/
|
function chkvalue(inpNam){
|
/**
|
特殊业务说明:
|
包装机维护实际产量时,是需要将 计算公式得到的结果,赋值给提升机,上报MES。 之前采集的提升机产量,覆盖到一号工程
|
卷烟机/发射机/装箱机都不变
|
*/
|
//提升机产量
|
var qtyTsj=parseFloat( $("input[name='qty']").val() );
|
//计算公式
|
//实际产量 = 提升机产量(条)+ 手动追加 - 在线追溯-成品追溯-成品追样-高架置换+(正负其他)
|
var qty1=parseFloat( $("input[name='qty1']").val()!=""?$("input[name='qty1']").val():0 ); //手动追加
|
var qty2=parseFloat( $("input[name='qty2']").val()!=""?$("input[name='qty2']").val():0 ); //在线追溯
|
var qty3=parseFloat( $("input[name='qty3']").val()!=""?$("input[name='qty3']").val():0 ); //成品追溯
|
var qty4=parseFloat( $("input[name='qty4']").val()!=""?$("input[name='qty4']").val():0 ); //成品追样
|
var qty5=parseFloat( $("input[name='qty5']").val()!=""?$("input[name='qty5']").val():0 ); //高架置换
|
var qty6=parseFloat( $("input[name='qty6']").val()!=""?$("input[name='qty6']").val():0 ); //其他
|
var qty7=parseFloat( $("input[name='qty7']").val()!=""?$("input[name='qty7']").val():0 ); //提升机产量
|
//验证数据是否是数字
|
if(isNaN(qty1) || isNaN(qty2) || isNaN(qty3) || isNaN(qty4) || isNaN(qty5) || isNaN(qty6) ){
|
alert("录入数据有问题!!!");
|
return false;
|
}
|
//包装机实际产量 =提升机产量(条)+ 手动追加 - 在线追溯-成品追溯-成品追样-高架置换+(正负其他)
|
//console.info(qty1+"="+qty2+"="+qty3+"="+qty4+"="+qty5+"="+qty6+"="+qty7);
|
var qtyTol=0;
|
//验证提升机产量是否拷贝,如果没有拷贝,用提升机产量覆盖。
|
if(qty7==0){
|
//第一次进来
|
$("input[name='qty7']").attr("value",qtyTsj);
|
var reg = /^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/;
|
if(!reg.test(qty6)){
|
qtyTol= parseFloat(qtyTsj*250+qty1-qty2-qty3-qty4-qty5-Math.abs(qty6));
|
}else{
|
qtyTol= parseFloat(qtyTsj*250+qty1-qty2-qty3-qty4-qty5+qty6);
|
}
|
}else{
|
//第二次及多次
|
var reg = /^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/;
|
if(!reg.test(qty6)){
|
qtyTol= parseFloat(qty7*250+qty1-qty2-qty3-qty4-qty5-Math.abs(qty6));
|
}else{
|
qtyTol= parseFloat(qty7*250+qty1-qty2-qty3-qty4-qty5+qty6);
|
}
|
}
|
//console.info(qtyTol);
|
//替换提升机
|
$("#SJVAL").val( (qtyTol/250).toFixed(3) );
|
}
|
|
|
</script>
|
<div class="easyui-layout" data-options="fit:true,border:false">
|
<div data-options="region:'center',border:false" title="" style="padding:5px">
|
<form id="form" method="post">
|
<fieldset>
|
<legend>产出详情</legend>
|
<table class="table" style="width: 100%;">
|
<tr>
|
<th>工单</th>
|
<td>
|
<input type="hidden" name="id" value="${output.id}"/>
|
<input id="workorderCode" name="workorderCode" class="easyui-validatebox" data-options="prompt: '请选择生产工单',required:true" style="width:158px" value="${output.workorderCode}"/>
|
<input type="hidden" id="workorder" name="workorder" value="${output.workorder}"/>
|
</td>
|
<th>日期</th>
|
<td>
|
<input type="text" name="date" class="easyui-validatebox" data-options="prompt: '请选择生产工单'" value="${output.date}"/>
|
</td>
|
</tr>
|
<tr>
|
<th>牌号</th>
|
<td>
|
<input type="text" name="matProd" class="easyui-validatebox" data-options="prompt: '请选择生产工单'" value="${output.matProd}"/>
|
</td>
|
<th>机台</th>
|
<td>
|
<input type="text" name="equipment" class="easyui-validatebox" data-options="prompt: '请选择生产工单'" value="${output.equipment}"/>
|
</td>
|
</tr>
|
<tr>
|
<th>班次</th>
|
<td>
|
<input type="text" name="shift" class="easyui-validatebox" data-options="prompt: '请选择生产工单'" value="${output.shift}"/>
|
</td>
|
<th>班组</th>
|
<td>
|
<input type="text" name="team" class="easyui-validatebox" data-options="prompt: '请选择生产工单'" value="${output.team}"/>
|
</td>
|
</tr>
|
<tr>
|
<th>产量</th>
|
<td>
|
<input type="text" id="SJVAL" name="qty" class="easyuiStyl" value="${output.qty}"/>
|
</td>
|
<th>剔除</th>
|
<td>
|
<input type="text" name="badQty" class="easyui-numberbox" data-options="required:true,min:0,precision:3" style="width:112px" value="${output.badQty}"/>
|
<input type="text" name="unitName" class="easyui-validatebox" data-options="prompt: '单位'" style="width:30px" value="${output.unitName}"/>
|
<input type="hidden" name="unit" value="${output.unit}"/>
|
</td>
|
</tr>
|
|
|
<c:if test="${output.eqpType==2}">
|
<tr style="color:blue;">
|
<th>辅机产量</th>
|
<td>
|
<input type="text" name="DACqty" class="easyui-numberbox" data-options="required:true,min:0,precision:3" value="${output.dacQty}"/>
|
</td>
|
|
<th>主机产量</th>
|
<td>
|
<input type="text" name="mainQty" class="easyui-numberbox" data-options="required:true,min:0,precision:3" value="${output.mainQty}"/>
|
</td>
|
</tr>
|
<tr style="color:blue;">
|
<th>排包产量</th>
|
<td>
|
<input type="text" name="pbjQty" class="easyui-numberbox" data-options="required:true,min:0,precision:3" value="${output.pbjQty}"/>
|
</td>
|
|
<th>透包产量</th>
|
<td>
|
<input type="text" name="tbjQty" class="easyui-numberbox" data-options="required:true,min:0,precision:3" value="${output.tbjQty}"/>
|
</td>
|
</tr>
|
<tr style="color:#A52A2A;">
|
<th>手动追加</th>
|
<td>
|
<input onblur="chkvalue('1')" type="text" name="qty1" class="easyuiStyl" value="${output.qty1}"/>
|
<input type="text" class="unitStyl" value="条">
|
</td>
|
<th>在线追溯</th>
|
<td>
|
<input onblur="chkvalue('2')" type="text" name="qty2" class="easyuiStyl" value="${output.qty2}"/>
|
<input type="text" class="unitStyl" value="条">
|
</td>
|
</tr>
|
<tr style="color:#A52A2A;">
|
<th>成品追溯</th>
|
<td>
|
<input onblur="chkvalue('3')" type="text" name="qty3" class="easyuiStyl" value="${output.qty3}"/>
|
<input type="text" class="unitStyl" value="条">
|
</td>
|
<th>成品抽样</th>
|
<td>
|
<input onblur="chkvalue('4')" type="text" name="qty4" class="easyuiStyl" value="${output.qty4}"/>
|
<input type="text" class="unitStyl" value="条">
|
</td>
|
|
</tr>
|
<tr style="color:#A52A2A;">
|
<th>高架置换</th>
|
<td>
|
<input onblur="chkvalue('5')" type="text" name="qty5" class="easyuiStyl" value="${output.qty5}"/>
|
<input type="text" class="unitStyl" value="条">
|
</td>
|
<th>其他</th>
|
<td colspan="3">
|
<input onblur="chkvalue('6')" type="text" name="qty6" class="easyuiStyl" value="${output.qty6}"/>
|
<input type="text" class="unitStyl" value="条">
|
</td>
|
</tr>
|
<tr style="color:#A52A2A;">
|
<th>提升产量备份数</th>
|
<td>
|
<input onblur="chkvalue('7')" type="text" name="qty7" class="easyuiStyl" value="${output.qty7}"/>
|
<input type="text" class="unitStyl" value="箱">
|
</td>
|
</tr>
|
</c:if>
|
<c:if test="${output.eqpType==1}">
|
<tr style="color:#A52A2A;">
|
<th>滤棒接收1</th>
|
<td>
|
<input type="text" name="recQty1" class="easyuiStyl" value="${output.recQty1}"/>
|
<input type="text" class="unitStyl" value="支">
|
</td>
|
<th>滤棒接收2</th>
|
<td>
|
<input type="text" name="recQty2" class="easyuiStyl" value="${output.recQty2}"/>
|
<input type="text" class="unitStyl" value="支">
|
</td>
|
</tr>
|
<tr style="color:#A52A2A;">
|
<th>成型配盘</th>
|
<td>
|
<input type="text" name="cxpz" class="easyuiStyl" value="${output.cxpz}"/>
|
<input type="text" class="unitStyl" value="盘">
|
</td>
|
<th>成型打包</th>
|
<td>
|
<input type="text" name="cxdb" class="easyuiStyl" value="${output.cxdb}"/>
|
<input type="text" class="unitStyl" value="盘">
|
</td>
|
</tr>
|
<tr style="color:#A52A2A;">
|
<th>仓库发料</th>
|
<td>
|
<input type="text" name="cxkl" class="easyuiStyl" value="${output.cxkl}"/>
|
<input type="text" class="unitStyl" value="盘">
|
</td>
|
|
</tr>
|
|
|
</c:if>
|
<tr>
|
<th>开始时间</th>
|
<td>
|
<input name="stim" id="stim" type="text" class="easyui-datetimebox" readonly="readonly" data-options="required:true" style="width:158px" value="${output.stim}"/>
|
</td>
|
<th>结束时间</th>
|
<td>
|
<input name="etim" id="etim" type="text" class="easyui-datetimebox" readonly="readonly" data-options="required:true" style="width:158px" value="${output.etim}"/>
|
</td>
|
</tr>
|
<tr>
|
|
<th>运行时间</th>
|
<td>
|
<input type="text" name="runTime" class="easyui-numberbox" data-options="required:true" value="${output.runTime}"/>
|
</td>
|
<th>停机时间</th>
|
<td>
|
<input type="text" name="stopTime" class="easyui-numberbox" data-options="required:true" value="${output.stopTime}"/><span style="font-size: 12px"> 分钟</span>
|
</td>
|
</tr>
|
|
<tr>
|
|
<th>停机次数</th>
|
<td>
|
<input type="text" name="stopTimes" class="easyui-numberbox" data-options="required:true" value="${output.stopTimes}"/><span style="font-size: 12px"> 次</span>
|
</td>
|
<th>操作用户</th>
|
<td>
|
<input type="text" name="feedbackUser" class="easyui-validatebox" value="${output.feedbackUser}"/>
|
</td>
|
</tr>
|
|
</table>
|
</fieldset>
|
</form>
|
</div>
|
</div>
|