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
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html>
<html>
<head>
<title>卷包成品质量检验单</title>
<jsp:include page="../../../initlib/initAll.jsp"></jsp:include>
<script type="text/javascript" src="../../pub/combobox/comboboxUtil.js" charset="utf-8"></script>
<link href="${pageContext.request.contextPath}/css/toptoolbar.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
        var dataGrid=null;
        var param=null;
        $(function() {
            $.loadComboboxData($("#team"),"SHIFT",true);
            //初始化时间
            var today = new Date();
            var month=today.getMonth()+1;
            if(month<10){month=("0"+month);}
            var date=today.getFullYear()+"-"+month+"-"+today.getDate(); 
            $("#date1").datebox("setValue",date);
            $("#etim").datebox("setValue",date);
            dataGrid = $('#dataGrid').datagrid({
                fit : true,
                fitColumns : true,
                border : false,
                pagination : true,
                idField : 'id',
                striped : true,
                rownumbers :true,
                pageSize : 10,
                pageList : [ 10, 20, 30, 40, 50 ],
                sortName : 'id',
                sortOrder : 'desc',
                singleSelect:true,
                checkOnSelect : true,
                selectOnCheck : false,
                nowrap : false,
                showPageList:false,
                frozenColumns : [ [ {
                    field : 'id',
                    title : 'ID',
                    checkbox:true
                }, {
                    field : 'detailId',
                    title : '对应子表pid',
                    hidden:true
                } ,{
                    field : 'materialName',
                    title : '产品',
                    width : 140,
                    rowspan:2,
                    align : 'center',
                    sortable : true
                },{
                    field : 'inspectionType',
                    title : '检验类型',
                    width : 80,
                    rowspan:2,
                    align:'center',
                    hidden:true
                }, {
                    field : 'orderNumber',
                    title : '样本号',
                    align : 'center',
                    rowspan:2,
                    width : 80,
                },{
                    field : 'qCBatchs',
                    title : '检验批次',
                    rowspan:2,
                    align:'center',
                    width : 80,
                },{
                    field : 'timestamp_',
                    title : '取样时间',
                    align : 'center',
                    rowspan:2,
                    width : 80,
                },{
                    field : 'subBatchCode',
                    title : '取样批次号',
                    align:'center',
                    rowspan:2,
                    width : 80,
                },{
                    field : 'team',
                    title : '班组',
                    align : 'center',
                    width : 50,
                    rowspan:2,
                },{
                    field : 'moistureContent',
                    title : '含水',
                    align:'center',
                    width : 50,
                    rowspan:2,
                },{
                    field : 'finalContent',
                    title : '含末',
                    align : 'center',
                    width : 50,
                    rowspan:2,
                },{
                    field : 'firstTelos',
                    title : '端部1',
                    align : 'center',
                    width : 50,
                    rowspan:2,
                },{
                    field : 'twoTelos',
                    title : '端部2',
                    align : 'center',
                    width : 50,
                    rowspan:2,
                },{
                    field : 'threeTelos',
                    title : '端部3',
                    align : 'center',
                    width : 50,
                    rowspan:2,
                },{
                    field : 'fourTelos',
                    title : '端部4',
                    align : 'center',
                    width : 50,
                    rowspan:2,
                },{
                    field : 'fiveTelos',
                    title : '端部5',
                    align : 'center',
                    width : 50,
                    rowspan:2,
                },{
                    field : 'avgTelos',
                    title : '端部平均值',
                    align : 'center',
                    width : 50,
                    rowspan:2,
                },{
                    field : 'compaction',
                    title : '压实端',
                    align : 'center',
                    width : 50,
                    rowspan:2,
                },{
                    field : 'status',
                    title : '反馈状态',
                    align : 'center',
                    width : 87,
                    rowspan:2,
                    formatter : function(value, row, index) {
                        if(value==1){
                            return "<span style='color:green'>已反馈MES<span>";
                        }else if(value==0){
                            return "<span style='color:red'>未反馈<span>";
                        }else{
                            return "<span style='color:red'>—<span>";
                        }
                    }
                }] ],
                toolbar : '#toolbar',
                onLoadSuccess : function() {
                },
                onRowContextMenu : function(e, rowIndex, rowData) {
                    e.preventDefault();
                    $(this).datagrid('unselectAll').datagrid('uncheckAll');
                    $(this).datagrid('selectRow', rowIndex);
                    $('#menu').menu('show', {
                        left : e.pageX-10,
                        top : e.pageY-5
                    });
                    id=rowData.id;
                }
            });
            
        });
        
        // 查询在线监测记录
        function query() {
            dataGrid.datagrid({
                url : "${pageContext.request.contextPath}/pms/onlineCheck/getList.do",
                queryParams :$("#searchForm").form("getData"),
                onLoadError : function(data) {
                    $.messager.show('提示', "查询在线监测记录异常", 'error');
                }
            });
            $('#dataGrid').datagrid('clearSelections');
        }
        
    //获取维保详细
    function getParam(id){
        var orderType=$("#orderType").val();
        param.datagrid({
                url : "${pageContext.request.contextPath}/pms/onlineCheck/getListDetail.do?pid=" + id+"&orderType="+orderType,
                onLoadError : function(data) {
                    $.messager.show('提示', "查询在线监测详细记录异常", 'error');
                }
           });
    }
    
    function clearForm(){
        $("#searchForm input").val(null);
        //初始化时间
        $("#inspectionType").val("1");
        $("#zxq").val("zq")
        var today = new Date();
        var month=today.getMonth()+1;
        if(month<10){month=("0"+month);}
        var date=today.getFullYear()+"-"+month+"-"+today.getDate(); 
        $("#date1").datebox("setValue",date);
        $("#etim").datebox("setValue",date);
    }
    /* 反馈MES 质量外观缺陷 */
    function sendMes(){
            var rows = dataGrid.datagrid('getChecked');
            var ids = [];
            var orderType=$("#orderType").val();
            if (rows.length > 0) {
                parent.$.messager.confirm('确认', '确定将选中数据反馈MES吗?', function(r) {
                    if (r) {
                        for ( var i = 0; i < rows.length; i++) {
                                ids.push(rows[i].id);
                        }
                        parent.$.messager.progress({
                            title : '提示',
                            text : '数据处理中,请稍后....'
                        });
                        $.post('${pageContext.request.contextPath}/pms/onlineCheck/sendMsgCP.do', 
                        {
                            id : ids.join(','),
                            orderType:orderType
                        }, function(json) {
                            parent.$.messager.progress('close');
                            if (json.success) {
                                $.messager.show('提示', json.msg, 'info');
                                query();
                            } else {
                                $.messager.show('提示', json.msg, 'info');
                            }
                        },"JSON");
                    }
                });
            } else {
                parent.$.messager.show({
                    title : '提示',
                    msg : '请选择数据!!'
                });
            }
    
    }
    
    /* 反馈MES 含水含末 */
    function sendFiniMes(){
            var rows = dataGrid.datagrid('getChecked');
            var ids = [];
            var orderType=$("#orderType").val();
            if (rows.length > 0) {
                parent.$.messager.confirm('确认', '确定将选中数据反馈MES吗?', function(r) {
                    if (r) {
                        for ( var i = 0; i < rows.length; i++) {
                                ids.push(rows[i].id);
                        }
                        parent.$.messager.progress({
                            title : '提示',
                            text : '数据处理中,请稍后....'
                        });
                        $.post('${pageContext.request.contextPath}/pms/onlineCheck/sendMESToData.do', 
                        {
                            id : ids.join(','),
                            orderType:orderType,
                            param:"add"
                        }, function(json) {
                            parent.$.messager.progress('close');
                            if (json.success) {
                                $.messager.show('提示', json.msg, 'info');
                                query();
                            } else {
                                $.messager.show('提示', json.msg, 'info');
                            }
                        },"JSON");
                    }
                });
            } else {
                parent.$.messager.show({
                    title : '提示',
                    msg : '请选择数据!!'
                });
            }
    
    }
    /* 批量删除 */
    function deleteProd(){
            var rows = dataGrid.datagrid('getChecked');
            var param = $("#inspectionType").val();
            var ids = [];
            if (rows.length > 0) {
                parent.$.messager.confirm('确认', '确定删除选中数据吗?', function(r) {
                    if (r) {
                        for ( var i = 0; i < rows.length; i++) {
                                ids.push(rows[i].id);
                        }
                        parent.$.messager.progress({
                            title : '提示',
                            text : '数据处理中,请稍后....'
                        });
                        $.post('${pageContext.request.contextPath}/pms/onlineCheck/deleteProd.do', 
                        {
                            id : ids.join(','),param:'deleteHslYsd'
                        }, function(json) {
                            parent.$.messager.progress('close');
                            if (json.success) {
                                $.messager.show('提示', json.msg, 'info');
                                query();
                            } else {
                                $.messager.show('提示', json.msg, 'info');
                            }
                        },"JSON");
                    }
                });
            } else {
                parent.$.messager.show({
                    title : '提示',
                    msg : '请选择数据!!'
                });
            }
    
    }     
    /* 反馈班长 */
    function feedbackProd(){
            var rows = dataGrid.datagrid('getChecked');
            var param = "2";
            var ids = [];
            if (rows.length > 0) {
                parent.$.messager.confirm('确认', '确定将选中的数据反馈给班长吗?', function(r) {
                    if (r) {
                        for ( var i = 0; i < rows.length; i++) {
                                ids.push(rows[i].id);
                        }
                        parent.$.messager.progress({
                            title : '提示',
                            text : '数据处理中,请稍后....'
                        });
                        $.post('${pageContext.request.contextPath}/pms/onlineCheck/feedbackProd.do', 
                        {
                            id : ids.join(','),param:param
                        }, function(json) {
                            parent.$.messager.progress('close');
                            if (json.success) {
                                $.messager.show('提示', json.msg, 'info');
                                query();
                            } else {
                                $.messager.show('提示', json.msg, 'info');
                            }
                        },"JSON");
                    }
                });
            } else {
                parent.$.messager.show({
                    title : '提示',
                    msg : '请选择数据!!'
                });
            }
    
    }
    /* 追加含末含水端部数据 */
    
    function qmOnlineCheckAppend(){
        var rows = dataGrid.datagrid('getChecked');
        console.log(rows);
        var ids = [];
        for ( var i = 0; i < rows.length; i++) {
            ids.push(rows[i].id);
        }
        if (rows.length > 0 && rows.length < 2) {    
             var userAddmodalDialog = parent.$.modalDialog({
                    title : '含水含末端部数据录入',
                    width : 750,
                    height : 480,
                    href : '${pageContext.request.contextPath}/pms/onlineCheck/goToQmOnlineCheckAppendJsp.do?id='+ids,
                    buttons : [ {
                        text : '保存',
                        iconCls : 'icon-standard-disk',
                        handler : function() {
                            var f = userAddmodalDialog.find('#form');
                            if(f.form("validate")){
                                f.form({   
                                    url:"${pageContext.request.contextPath}/pms/onlineCheck/insertQmFinished.do",   
                                    success:function(data){
                                        var obj=JSON.parse(data);
                                        $.messager.show('提示', obj.msg, 'info');
                                        userAddmodalDialog.dialog('destroy');
                                        query();
                                        
                                    }   
                                }); 
                                f.submit();
                            }
                        }
                    } ]
                });
        } else if(rows.length >= 2){
            parent.$.messager.show({
                title : '提示',
                msg : '只能选择一组数据!'
            });
        }else{
            parent.$.messager.show({
                title : '提示',
                msg : '请选择数据!!'
            });
        }
    }
    
    /**
    *超标支数数据录入
    */
    function goToOverproofAddJsp(){
 
        var rows = dataGrid.datagrid('getChecked');
        console.log(rows);
        var ids = [];
        for ( var i = 0; i < rows.length; i++) {
            ids.push(rows[i].id);
        }
        var userAddmodalDialog = parent.$.modalDialog({
            title : '含水含末等数据修改',
            width : 800,
            height : 400,
            href : '${pageContext.request.contextPath}/pms/onlineCheck/goToOverproofAddJsp.do?ids='+ids+'&param=edit',
            buttons : [ {
                text : '保存',
                iconCls : 'icon-standard-disk',
                handler : function() {
                    var f = userAddmodalDialog.find('#form');
                    if(f.form("validate")){
                        f.form({   
                            url:'${pageContext.request.contextPath}//pms/onlineCheck/insertQmFinished.do',   
                            success:function(data){
                                var obj=JSON.parse(data);
                                $.messager.show('提示', obj.msg, 'info');
                                userAddmodalDialog.dialog('destroy');
                                query();
                                
                            }   
                        }); 
                        f.submit();
                    }
                }
            } ]
        });
    }
    
    
</script>
</head>
<body class="easyui-layout" data-options="fit : true,border : false">
    <div id="toolbar"  style="display: none;width:100%;">
        <form id="searchForm" style="margin:4px 0px 0px 0px">
        <input type="hidden" value = "1" name = "inspectionType" id="inspectionType"/>
        <input type="hidden" value = "zq" name ="zxq" id="zxq">
            <div class="topTool">
                <fieldset >
                    <div >
                        <span class="label">班次:</span>
                        <select id="team" name="team" class="easyui-combobox" data-options="panelHeight:'auto',width:120,editable:false"></select>
                    </div>
                    <div >
                        <span class="label">反馈状态:</span>
                        <select id="sts" name="sts" class="easyui-combobox" data-options="panelHeight:'auto',width:120,editable:false">
                          <option value="">全部</option>
                           <option value="0">未反馈</option>
                           <option value="1">已反馈</option>
                        </select>
                    </div>
                    <div style="display: none">
                            <span class="label">类型:</span>
                            <input id="orderType" name="orderType" type="text"  readOnly=true value="1" style="width:120px"/>
                    </div>
                    <div >
                        <span class="label">检测日期:</span>
                        <input id="date1" name="date" type="text" class="easyui-datebox" readOnly=true datefmt="yyyy-MM-dd" style="width:120px"/>
                    </div>
                    <div >
                        <span class="label">到</span>
                        <input id="etim" name="etim" type="text" class="easyui-datebox" readOnly=true datefmt="yyyy-MM-dd" style="width:120px"/>
                    </div>
                </fieldset>
            </div>
        </form>
        <div class="easyui-toolbar" >
            <a onclick="query()" href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-standard-zoom'">查询</a>
            <a onclick="sendFiniMes();" href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-standard-plugin'">含水含末反馈MES</a>
            <a onclick="goToOverproofAddJsp();" href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-standard-user-add'">含水含末端部数据录入</a>
            <a onclick="deleteProd();" href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-standard-cancel',plain:true">批量删除巡检记录</a>
            <a onclick="clearForm();" href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-standard-table-refresh'">重置</a>
        </div>
    </div>
    
    <div data-options="region:'center',border:false">
        <table id="dataGrid"></table>
    </div>    
    <div id="menu" class="easyui-menu" style="width: 80px; display: none;">
            <div onclick="goToOverproofAddJsp()" data-options="iconCls:'icon-hamburg-docs'">编辑</div>
    </div>    
    
</body>
</html>