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
<%@ 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="${pageContext.request.contextPath }/pms/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 typeGrid = null;
        var partWidthGrid=null;
        $(function() {
            typeGrid = $('#typeGrid').datagrid({
                fit : true,
                fitColumns : false,
                border : true,
                pagination : true,
                idField : 'id',
                striped : true,
                pageSize : 10,
                pageList : [ 10, 20, 30, 40, 50 ],
                sortName : 'modelTypeName',
                sortOrder : 'desc',
                singleSelect:true,
                checkOnSelect : false,
                selectOnCheck : false,
                nowrap : false,
                showPageList:false,
                columns : [ [ {
                    field : 'id',
                    title : 'ROW ID',
                    width : 120,
                    hidden : true
                }, {
                    field : 'modelTypeName',
                    title : '设备机型编号',
                    width : 150,
                    align:'center',
                    sortable : true
                }, {
                    field : 'shiftName',
                    title : '班次',
                    width : 100,
                    align:'center',
                    sortable : true
                }, {
                    field : 'storage_smoke',
                    title : '储烟量',
                    align:'center',
                    width : 150,
                    sortable : true
                }] ],
                toolbar : '#typeToolbar',
                onLoadSuccess : function() {
                    $(this).datagrid('tooltip');
                },
                onRowContextMenu : function(e, rowIndex, rowData) {
                    e.preventDefault();
                    $(this).datagrid('unselectAll').datagrid('uncheckAll');
                    $(this).datagrid('selectRow', rowIndex);
                    $('#typeMenu').menu('show', {
                        left : e.pageX-10,
                        top : e.pageY-5
                    });
                }
            });
            
            partWidthGrid = $('#partWidthGrid').datagrid({
                fit : true,
                fitColumns : false,
                border : true,
                pagination : true,
                idField : 'partName',
                striped : true,
                pageSize : 10,
                pageList : [ 10, 20, 30, 40, 50 ],
                sortName : 'id',
                sortOrder : 'desc',
                singleSelect:true,
                checkOnSelect : false,
                selectOnCheck : false,
                nowrap : false,
                showPageList:false,
                columns : [ [ {
                    field : 'id',
                    title : 'ROW ID',
                    width : 120,
                    hidden : true
                }, {
                    field : 'partName',
                    title : '牌号',
                    width : 150,
                    align:'center',
                    sortable : true
                }, {
                    field : 'weight',
                    title : '单支重量',
                    width : 100,
                    align:'center',
                    sortable : true
                }, ] ],
                toolbar : '#partWidthToolbar',
                onLoadSuccess : function() {
                    $(this).datagrid('tooltip');
                },
                onRowContextMenu : function(e, rowIndex, rowData) {
                    e.preventDefault();
                    $(this).datagrid('unselectAll').datagrid('uncheckAll');
                    $(this).datagrid('selectRow', rowIndex);
                    $('#typeMenu').menu('show', {
                        left : e.pageX-10,
                        top : e.pageY-5
                    });
                }
            });
        });
    
        //load shift and part
        $(function() {
            $.loadComboboxData($("#shift"),"SHIFT",true);
            $.loadComboboxData($("#partNumber"),"MATPROD",true);
            queryPartWeight();
            $("a[name='zoombutton']").click();
        });
      
       //显示机台储烟量标准
       function queryAll(){
           typeGrid.datagrid({
                url : "${pageContext.request.contextPath}/pms/disabled/queryDis.do",
                queryParams :$("#typeSearchForm").form("getData")
            });
       }
       //显示机台储烟量标准
       function queryDis(id){
           typeGrid.datagrid({
                url : "${pageContext.request.contextPath}/pms/disabled/queryDis.do?id="+id,
                queryParams :$("#typeSearchForm").form("getData")
            });
       }
       
      
       //跳转到储烟量标准添加页面
       function toAddOrUpdateBean(){
           var dialog = parent.$.modalDialog({
                title : '新增储烟量标准',
                width : 620,
                height : 250,
                href : '${pageContext.request.contextPath}/pms/disabled/gotoDis.do',
                buttons : [ {
                    text : '保存',
                    iconCls:'icon-standard-disk',
                    handler : function() {
                        var f = dialog.find("#form");
                        if(f.form("validate")){
                            $.post("${pageContext.request.contextPath}/pms/disabled/addOrUpdate.do",f.form("getData"),function(json){
                                if (json.success) {
                                    $.messager.show('提示', json.msg, 'info');
                                    dialog.dialog('destroy');
                                    queryAll();
                                }else{
                                    $.messager.show('提示', json.msg, 'error');
                                }
                            },"JSON");
                        }
                    }
                } ]
            });
       }
       
       //跳转到储烟量标准编辑页面
       function toEditDis(){
           var dialog = parent.$.modalDialog({
                title : '编辑储烟量标准',
                width : 620,
                height : 250,
                href : '${pageContext.request.contextPath}/pms/disabled/gotoEditDis.do?id='+typeGrid.datagrid('getSelected').id,
                buttons : [ {
                    text : '保存',
                    iconCls:'icon-standard-disk',
                    handler : function() {
                        var f = dialog.find("#form");
                        if(f.form("validate")){
                            $.post("${pageContext.request.contextPath}/pms/disabled/addOrUpdate.do",f.form("getData"),function(json){
                                if (json.success) {
                                    $.messager.show('提示', json.msg, 'info');
                                    dialog.dialog('destroy');
                                    queryAll();
                                }else{
                                    $.messager.show('提示', json.msg, 'error');
                                }
                            },"JSON");
                        }
                    }
                } ]
            });
       }
       
     //查询烟支重量
     function queryPartWeight(){
         partWidthGrid.datagrid({
            url : "${pageContext.request.contextPath}/pms/partWeight/queryPartWeight.do",
            queryParams :$("#partWidthForm").form("getData")
        });
     }
     //添加烟支重量
     function gotoPartWeight(){
         var dialog = parent.$.modalDialog({
                title : '添加烟支重量标准',
                width : 620,
                height : 250,
                href : '${pageContext.request.contextPath}/pms/partWeight/gotoEditPartWeight.do',
                buttons : [ {
                    text : '保存',
                    iconCls:'icon-standard-disk',
                    handler : function() {
                        var f = dialog.find("#form");
                        if(f.form("validate")){
                            $.post("${pageContext.request.contextPath}/pms/partWeight/addOrUpdatePartWeight.do",f.form("getData"),function(json){
                                if (json.success) {
                                    $.messager.show('提示', json.msg, 'info');
                                    dialog.dialog('destroy');
                                    queryPartWeight();
                                }else{
                                    $.messager.show('提示', json.msg, 'error');
                                }
                            },"JSON");
                        }
                    }
                } ]
            });
     }
     //编辑烟支重量
     function gotoEditWeight(){
         var dialog = parent.$.modalDialog({
                title : '编辑烟支重量标准',
                width : 620,
                height : 250,
                href : '${pageContext.request.contextPath}/pms/partWeight/gotoEditPartWeight.do?id='+partWidthGrid.datagrid('getSelected').id,
                buttons : [ {
                    text : '保存',
                    iconCls:'icon-standard-disk',
                    handler : function() {
                        var f = dialog.find("#form");
                        if(f.form("validate")){
                            $.post("${pageContext.request.contextPath}/pms/partWeight/addOrUpdatePartWeight.do",f.form("getData"),function(json){
                                if (json.success) {
                                    $.messager.show('提示', json.msg, 'info');
                                    dialog.dialog('destroy');
                                    queryPartWeight();
                                }else{
                                    $.messager.show('提示', json.msg, 'error');
                                }
                            },"JSON");
                        }
                    }
                } ]
            });
     }
        function clearForm(){
            $("#typeSearchForm input").val(null);
        }
</script>
</head>
<body class="easyui-layout" data-options="fit : true,border : false">
    <div data-options="region:'west',border:true,split:false,title:'残烟考核参数设置'" style="width:510px;">
        <div id="typeToolbar" style="display: none;width:100%;">
            <form id="typeSearchForm" style="margin:4px 0px 0px 0px">
                <div class="topTool">
                    <fieldset >
                        <div>
                            <span class="label">设备型号:</span>
                            <span><input type="text" id="modelType" style="width:120px;" name="modelType" class="easyui-combobox easyui-validatebox"
                                         data-options="textField:'name',width:120,valueField:'id',url:'${pageContext.request.contextPath }/pms/md/eqptype/queryMdEqpTypeByCategory.do'"/></span>
                        </div>
                        <div>
                            <span class="label">班次:</span>
                            <select id="shift" name="shift" data-options="panelHeight:'auto',width:120,editable:true"></select>
                        </div>
                    </fieldset>
                </div>
            </form>
            <div class="easyui-toolbar" >
                <a onclick="queryAll()" name="zoombutton" href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-standard-zoom'">查询</a>
                <a onclick="clearForm();" href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-standard-table-refresh'">重置</a>
                <a onclick="toAddOrUpdateBean()" href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-standard-plugin-add'">添加</a>
                <a onclick="toEditDis()" href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-standard-plugin-edit'">编辑</a>
            </div>
        </div>
        <!-- 残烟考核参数 div -->
        <table id="typeGrid"></table>
    </div>
    <div data-options="region:'center',border:true,title:'烟支重量维护'" style="width:360px;">
        <div id="partWidthToolbar"  style="display: block;">
            <form id="partWidthForm" style="margin:4px 0px 0px 0px">
                <div class="topTool" width="560px">
                    <fieldset>
                        <div>
                            <span class="label">牌号:</span>
                            <select id="partNumber" name="partNumber" data-options="panelHeight:'auto',width:120"></select>
                        </div>
                    </fieldset>
                </div>
            </form>
            <div class="easyui-toolbar">
                <a onclick="queryPartWeight()" href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-standard-zoom'">查询</a>
                <a onclick="gotoPartWeight();" href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-standard-plugin-add'">添加</a>
                <a onclick="gotoEditWeight()" href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-standard-plugin-edit'">编辑</a>
            </div>
        </div>
        <!-- 烟支重量参数 div -->
        <table id="partWidthGrid"></table>
    </div>
</body>
</html>