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
311
312
313
314
315
316
317
318
319
320
321
322
323
<%@ 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;}
</style>
<script type="text/javascript">
    $("#form #hoShift").attr("readonly","readonly");
    $("#form #hoTeam").attr("readonly","readonly");
    $("#form #hoMat").attr("readonly","readonly");
    
    $("#form #toShift").attr("readonly","readonly");
    $("#form #toTeam").attr("readonly","readonly");
    $("#form #toMat").attr("readonly","readonly");
    
    $("#form #equipment").attr("readonly","readonly");
    $('#hoOrder').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){
                            $("#hoOrder").searchbox("setValue",row.code);
                            $("#form input[name='hoOrderId']").attr("value",row.id);
                            $("#form input[name='date']").attr("value",row.date);
                            $("#form input[name='hoShift']").attr("value",row.shiftId);
                            $("#form #hoShift").attr("value",row.shift);
                            $("#form input[name='hoTeam']").attr("value",row.teamId);
                            $("#form #hoTeam").attr("value",row.team);
                            $("#form input[name='hoMat']").attr("value",row.matId);
                            $("#form #hoMat").attr("value",row.mat);
                            $("#form #equipment").attr("value",row.equipment);
                            $("#form input[name='equipment']").attr("value",row.equipmentId);
                            dialog.dialog('destroy');
                        }else{
                            $.messager.show('提示', '请选择工单', 'info');
                        } 
                    }
                } ]
            });
        }  
    }); 
    $('#toOrder').searchbox({  
        searcher:function(value,name){  
        if(!$("#form input[name='equipment']").attr("value")){
            $.messager.show('提示', '请先填写交班信息', 'info');
            return;
        }
        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){
                            if($("#form input[name='equipment']").attr("value")!=row.equipmentId){
                                $.messager.show('提示', '交班机台与接班机台不一致!', 'error');
                                return;
                            }
                            if($("#form input[name='hoOrder']").attr("value")==row.id){
                                $.messager.show('提示', '接班工单不能与交班工单相同,请选择下一个班次工单!', 'error');
                                return;
                            }
                            $("#toOrder").searchbox("setValue",row.code);
                            $("#form input[name='toOrderId']").attr("value",row.id);
                            $("#form input[name='toShift']").attr("value",row.shiftId);
                            $("#form #toShift").attr("value",row.shift);
                            $("#form input[name='toTeam']").attr("value",row.teamId);
                            $("#form #toTeam").attr("value",row.team);
                            $("#form input[name='toMat']").attr("value",row.matId);
                            $("#form #toMat").attr("value",row.mat);
                            dialog.dialog('destroy');
                        }else{
                            $.messager.show('提示', '请选择工单', 'info');
                        } 
                    }
                } ]
            });
        }  
    }); 
    $('#hoUser').searchbox({  
        searcher:function(value,name){  
        var dialog = parent.$.modalDialog({
                title : '选择用户',
                width : 430,
                height : 420,
                href : '${pageContext.request.contextPath}/pms/sys/user/userPicker.jsp',
                buttons : [ {
                    text : '选择',
                    iconCls:'icon-standard-disk',
                    handler : function() {
                        var row = dialog.find("#userPickGrid").datagrid('getSelected');
                        if(row){
                            $("#form input[name='hoUser']").attr("value",row.id);
                            $("#hoUser").searchbox("setValue",row.name);
                            dialog.dialog('destroy');
                        }else{
                            $.messager.show('提示', '请选择工单', 'info');
                        } 
                    }
                } ]
            });
        }  
    }); 
    $('#toUser').searchbox({  
        searcher:function(value,name){  
        var dialog = parent.$.modalDialog({
                title : '选择用户',
                width : 430,
                height : 420,
                href : '${pageContext.request.contextPath}/pms/sys/user/userPicker.jsp',
                buttons : [ {
                    text : '选择',
                    iconCls:'icon-standard-disk',
                    handler : function() {
                        var row = dialog.find("#userPickGrid").datagrid('getSelected');
                        if(row){
                            $("#form input[name='toUser']").attr("value",row.id);
                            $("#toUser").searchbox("setValue",row.name);
                            dialog.dialog('destroy');
                        }else{
                            $.messager.show('提示', '请选择工单', 'info');
                        } 
                    }
                } ]
            });
        }  
    });
    $("#form input[name='readonlySearchbox']").attr("readonly","readonly");
</script>
<div class="easyui-layout" data-options="fit:true,border:false">
    <div data-options="region:'center',border:false" title="" style="overflow: hidden;padding:10px">
        <form id="form" method="post">
                <c:if test="${type==1}">
                    <table class="table" style="width: 100%;">
                        <tr>
                            <th colspan="2" style="font-size:14px;height:30px;text-align: center;">交班信息</th>
                            
                            <th colspan="2" style="font-size:14px;height:30px;text-align: center;">接班信息</th>
                        </tr>
                        <tr>
                            <th>交班工单</th>
                            <td>
                                <input id="hoOrder" name="readonlySearchbox" class="easyui-searchbox" data-options="prompt: '请选择生产工单',required:true" style="width:158px"/>
                                <input type="hidden" name="hoOrderId"/>
                                <input type="hidden" name="date"/>
                                <input type="hidden" name="type" value="${type}"/>
                            </td>
                            <th>接班工单</th>
                            <td>
                                <input id="toOrder" name="readonlySearchbox" class="easyui-searchbox" data-options="prompt: '请选择生产工单',required:true" style="width:158px"/>
                                <input type="hidden"  name="toOrderId"/>
                            </td>
                        </tr>
                        <tr>
                            <th>机台</th>
                            <td colspan="3">
                                <input type="text" id="equipment" class="easyui-validatebox" data-options="prompt: '请选择生产工单'" />
                                <input type="hidden" name="equipment"/>
                            </td>
                        </tr>
                        <tr>
                            <th>交班牌号</th>
                            <td>
                                <input type="text" id="hoMat" class="easyui-validatebox" data-options="prompt: '请选择生产工单'" />
                                <input type="hidden" name="hoMat"  />
                            </td>
                            <th>接班牌号</th>
                            <td>
                                <input type="text" id="toMat" class="easyui-validatebox" data-options="prompt: '请选择生产工单'" />
                                <input type="hidden" name="toMat"  />
                            </td>
                        </tr>
                        <tr>
                            <th>交班班次</th>
                            <td>
                                <input type="text" id="hoShift" class="easyui-validatebox" data-options="prompt: '请选择生产工单'" />
                                <input type="hidden" name="hoShift"  />
                            </td>
                            <th>接班班次</th>
                            <td>
                                <input type="text" id="toShift" class="easyui-validatebox" data-options="prompt: '请选择生产工单'" />
                                <input type="hidden" name="toShift"  />
                            </td>
                        </tr>
                        <tr>
                            <th>交班班组</th>
                            <td>
                                <input type="text" id="hoTeam" class="easyui-validatebox" data-options="prompt: '请选择生产工单'" />
                                <input type="hidden" name="hoTeam"  />
                            </td>
                            <th>接班班组</th>
                            <td>
                                <input type="text" id="toTeam" class="easyui-validatebox" data-options="prompt: '请选择生产工单'" />
                                <input type="hidden" name="toTeam"  />
                            </td>
                        </tr>
                        <tr>
                            <th>交班时间</th>
                            <td>
                                <input name="hoTime" type="text" class="easyui-my97" datefmt="yyyy-MM-dd HH:mm" style="width:180px"/>
                            </td>
                            <th>接班时间</th>
                            <td>
                                <input name="toTime" type="text" class="easyui-my97" datefmt="yyyy-MM-dd HH:mm" style="width:180px"/>
                            </td>
                        </tr>
                        <tr>
                            <th>交班用户</th>
                            <td>
                                <input type="text" id="hoUser" name="readonlySearchbox" class="easyui-searchbox" data-options="prompt: '请选择交班用户',required:true" />
                                <input type="hidden" name="hoUser"  />
                            </td>
                            <th>接班用户</th>
                            <td>
                                <input type="text" id="toUser" name="readonlySearchbox" class="easyui-searchbox" data-options="prompt: '请选择交班用户'" />
                                <input type="hidden" name="toUser"  />
                            </td>
                        </tr>
                    </table>
                </c:if>
                <c:if test="${type==2}">
                    <table class="table" style="width: 100%;">
                        <tr>
                            <th colspan="2" style="font-size:14px;height:30px;text-align: center;">交班信息</th>
                            
                            <th colspan="2" style="font-size:14px;height:30px;text-align: center;">接班信息</th>
                        </tr>
                        <tr>
                            <th>交班工单</th>
                            <td>
                                <input id="hoOrder" name="readonlySearchbox" class="easyui-searchbox" data-options="prompt: '请选择生产工单',required:true" style="width:158px"/>
                                <input type="hidden" name="hoOrderId"/>
                                <input type="hidden" name="date"/>
                                <input type="hidden" name="type" value="${type}"/>
                            </td>
                            <th>接班工单</th>
                            <td>
                                <input id="toOrder" name="readonlySearchbox" class="easyui-searchbox" data-options="prompt: '请选择生产工单',required:true" style="width:158px"/>
                                <input type="hidden"  name="toOrderId"/>
                            </td>
                        </tr>
                        <tr>
                            <th>机台</th>
                            <td colspan="3">
                                <input type="text" id="equipment" class="easyui-validatebox" data-options="prompt: '请选择生产工单'" />
                                <input type="hidden" name="equipment"/>
                            </td>
                        </tr>
                        <tr>
                            <th>前牌号</th>
                            <td>
                                <input type="text" id="hoMat" class="easyui-validatebox" data-options="prompt: '请选择生产工单'" />
                                <input type="hidden" name="hoMat"  />
                            </td>
                            <th>后牌号</th>
                            <td>
                                <input type="text" id="toMat" class="easyui-validatebox" data-options="prompt: '请选择生产工单'" />
                                <input type="hidden" name="toMat"  />
                            </td>
                        </tr>
                        <tr>
                            <th>班次</th>
                            <td>
                                <input type="text" id="hoShift" class="easyui-validatebox" data-options="prompt: '请选择生产工单'" />
                                <input type="hidden" name="hoShift"  />
                            </td>
                            <!-- <th>接班班次</th>
                            <td>
                                <input type="text" id="toShift" class="easyui-validatebox" data-options="prompt: '请选择生产工单'" />
                                <input type="hidden" name="toShift"  />
                            </td> -->
                        </tr>
                        <tr>
                            <th>班组</th>
                            <td>
                                <input type="text" id="hoTeam" class="easyui-validatebox" data-options="prompt: '请选择生产工单'" />
                                <input type="hidden" name="hoTeam"  />
                            </td>
                            <!-- <th>接班班组</th>
                            <td>
                                <input type="text" id="toTeam" class="easyui-validatebox" data-options="prompt: '请选择生产工单'" />
                                <input type="hidden" name="toTeam"  />
                            </td> -->
                        </tr>
                        <tr>
                            <th>换牌时间</th>
                            <td>
                                <input name="hoTime" type="text" class="easyui-my97" datefmt="yyyy-MM-dd HH:mm" style="width:180px"/>
                            </td>
                            <!-- <th>接班时间</th>
                            <td>
                                <input name="toTime" type="text" class="easyui-my97" datefmt="yyyy-MM-dd HH:mm" style="width:180px"/>
                            </td> -->
                        </tr>
                        <tr>
                            <th>换牌用户</th>
                            <td>
                                <input type="text" id="hoUser" name="readonlySearchbox" class="easyui-searchbox" data-options="prompt: '请选择交班用户',required:true" />
                                <input type="hidden" name="hoUser"  />
                            </td>
                            <!-- <th>接班用户</th>
                            <td>
                                <input type="text" id="toUser" name="readonlySearchbox" class="easyui-searchbox" data-options="prompt: '请选择交班用户'" />
                                <input type="hidden" name="toUser"  />
                            </td> -->
                        </tr>
                    </table>
                </c:if>
        </form>
    </div>
</div>