zhuguifei
2026-03-10 2c1fd10c6fbabb8e9f0e9f07fe66fb36c008e883
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
<%@ 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">&nbsp;分钟</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">&nbsp;次</span>
                        </td>
                        <th>操作用户</th>
                        <td>
                            <input type="text" name="feedbackUser" class="easyui-validatebox"    value="${output.feedbackUser}"/>
                        </td>
                    </tr>
 
                </table>
            </fieldset>
        </form>
    </div>
</div>