yangle
2023-11-01 dbcc87f39f85b6ec81d53e6dc66e9f51cd34b5d8
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
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>器具履历</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/soulTable.slim.js"></script>
    <style type="text/css">
        input.layui-input.layui-unselect {
            padding-right: 0;
        }
    </style>
</head>
<body>
    <div class="layui-fluid">
        <div class="layui-col-md12">
            <div class="layui-card" style="padding: 1px">
                <div class="layui-card-body" style="padding: 1px;">
                    <form class="layui-form" action="" lay-filter="component-form-group">
                        <div class="layui-collapse">
                            <div class="layui-colla-item">
                                <div class="layui-colla-title layui-inline">
                                    <div class="layui-inline">
                                        <span>更多</span>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">单据号</label>
                                    <div class="layui-input-block">
                                        <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">器具分类</label>
                                    <div class="layui-input-block">
                                        <input type="text" class="layui-input" name="HMouldType" id="HMouldType">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">开始时间</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" name="BenginHCreateDate" id="BenginHCreateDate">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">结束时间</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" name="EndHCreateDate" id="EndHCreateDate">
                                    </div>
                                </div>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">重置</button>
                                <div class="layui-colla-content">
                                    <div class="layui-inline">
                                        <div class="layui-inline">
                                            <span>其他条件></span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
 
                        <table class="" id="mainTable" lay-filter="mainTable"></table>
 
                        <div class="layui-tab layui-tab-card">
                            <ul class="layui-tab-title">
                                <li class="layui-this">出入库记录</li>
                                <li>器具耗用记录</li>
                                <li>日常记录</li>
                                <li>维修记录</li>
                            </ul>
                            <div class="layui-tab-content">
                                <div class="layui-tab-item layui-show">
                                    <table class="layui-hide" id="mainTable1" lay-filter="mainTable1"></table>
                                </div>
                                <div class="layui-tab-item">
                                    <table class="layui-hide" id="mainTable2" lay-filter="mainTable2"></table>
                                </div>
                                <div class="layui-tab-item">
                                    <table class="layui-hide" id="mainTable3" lay-filter="mainTable3"></table>
                                </div>
                                <div class="layui-tab-item">
                                    <table class="layui-hide" id="mainTable4" lay-filter="mainTable4"></table>
                                </div>
                            </div>
                        </div>
 
                        <script type="text/html" id="toolbarDemo">
                            <div class="layui-btn-container">
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>预览</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>刷新</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>退出</button>
                            </div>
                        </script>
 
                        <script type="text/html" id="xuhao1">
                            {{d.LAY_TABLE_INDEX+1}}
                        </script>
                        <script type="text/html" id="xuhao2">
                            {{d.LAY_TABLE_INDEX+1}}
                        </script>
                        <script type="text/html" id="xuhao3">
                            {{d.LAY_TABLE_INDEX+1}}
                        </script>
                        <script type="text/html" id="xuhao4">
                            {{d.LAY_TABLE_INDEX+1}}
                        </script>
 
                    </form>
                </div>
            </div>
        </div>
    </div>
 
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
 
    <script>
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index', //主入口模块
        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () {
            //#region 公共变量
            var $ = layui.$
                , admin = layui.admin
                , layer = layui.layer
                , table = layui.table
                , table1 = layui.table
                , table2 = layui.table
                , table3 = layui.table
                , table4 = layui.table
                , form = layui.form
                , element = layui.element
                , laypage = layui.laypage
                , laydate = layui.laydate
                , util = layui.util
                , soulTable = layui.soulTable
            //查询条件
            var sWhere = "";
            var option = [];
            var option1 = [];
            var option2 = [];
            var option3 = [];
            var option4 = [];
            //#endregion
 
 
            //#region 进入页面即加载
            //初始化界面
            set_ClearBill();
            //#endregion
 
            //头工具栏事件
            table.on('toolbar(mainTable)', function (obj) {
                var checkStatus = table.checkStatus(obj.config.id);
                switch (obj.event) {
                    //浏览
                    case 'btn-view':
                        get_ViewReport();
                        break;
 
                    //刷新
                    case 'get_Refresh':
                        set_Refresh();
                        break;
 
                    //退出
                    case 'get_Exit':
                        Pub_Close(2);
                        break;
                };
            });
 
            //点击主表带出从表数据
            table.on('row(mainTable)', function (obj) { //注:tool 是工具条事件名,test 是 table 原始容器的属性 lay-filter="对应的值"
                var datas = obj.data; //获得当前行数据
                var linterid = datas.hmainid;
                $.ajax({
                    url: GetWEBURL() + 'Gy_EquipFileMain/Gy_MouldFileBillResumeDate',
                    type: "GET",
                    data: { "HInterID": linterid },
                    success: function (data1) {
                        if (data1.count == 1) {
                            option1.data = data1.list[0];
                            table1.render(option1);
                            option2.data = data1.list[1];
                            table2.render(option2);
                            option3.data = data1.list[2];
                            table3.render(option3);
                            option4.data = data1.list[3];
                            table4.render(option4);
                        } else {
                            layer.alert("获取失败", { icon: 5 });
                        }
                    }, error: function () {
                        layer.alert("接口失效!", { icon: 5 });
                    }
                });
            });
 
            //重置按钮
            form.on('submit(btnReSearch)', function (data) {
                set_ClearQuery();
            });
            //查询按钮
            form.on('submit(btnSearch)', function (data) {
                get_FastQuery(table, option);
            });
 
 
            //#region 此页面所有方法
            function set_ClearBill() {
                $("#BenginHCreateDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));//开始日期
                $("#EndHCreateDate").val(Format(new Date(), "yyyy-MM-dd"));//结束日期
                //初始化表格
                //初始化表格(主表)
                set_InitGrid();
                //初始化表格(子表1)
                set_InitGrid1();
                //初始化表格(子表2)
                set_InitGrid2();
                //初始化表格(子表3)
                set_InitGrid3();
                //初始化表格(子表4)
                set_InitGrid4();
                //查询
                get_Display(sWhere);
            }
            //初始化主表格
            function set_InitGrid() {
                option = {
                    elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , height: '400'
                    , page: true
                    , cellMinWidth: 90
                    , limit: 50
                    , limits: [50, 500, 5000, 20000]
                    , done: function (res, curr, count) {
                        soulTable.render(this);
                    }
                    , cols: [[
                        { type: 'checkbox', fixed: 'left' }
                        , { field: 'hmainid', title: 'hmainid', sort: true, hide: true }
                        , { field: '日期', title: '日期', templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>", sort: true}
                        , { field: '单据号', title: '单据号', sort: true }
                        , { field: '模具品类', title: '器具分类', sort: true }
                        , { field: '条码编号', title: '条码编号', sort: true }
                        , { field: '对应ERP物料编码', title: '物料编号', sort: true }
                        , { field: '模具编号', title: '器具编号', sort: true }
                        , { field: '模具名称', title: '器具名称', sort: true }
                        , { field: '模具型号', title: '器具型号', sort: true }
                        , { field: '模具状态', title: '器具状态', sort: true }
                        , { field: '对应ERP物料编码', title: '器具ERP物料', sort: true }
                        , { field: '直径', title: '直径', sort: true }
                        , { field: '辅助属性', title: '辅助属性', sort: true }
                        , { field: '辅助属性2', title: '辅助属性2', sort: true }
                        , { field: '图号', title: '图号', sort: true }
                        , { field: '生产产品型号', title: '生产产品型号', sort: true }
                        , { field: 'HUnitID', title: 'HUnitID', hide: true, sort: true }
                        , { field: '计量单位', title: '计量单位', sort: true }
                        , { field: '出厂日期', title: '出厂日期', templet: "<div>{{d.出厂日期 ==null ?'':layui.util.toDateString(d.出厂日期, 'yyyy-MM-dd')}}</div>", sort: true }
                        , { field: '出厂编号', title: '出厂编号', sort: true }
                        , { field: '使用部门代码', title: '使用部门代码', sort: true }
                        , { field: '使用部门', title: '使用部门', sort: true }
                        , { field: 'HSupID', title: 'HSupID', hide: true, sort: true }
                        , { field: '供应商代码', title: '供应商代码', sort: true }
                        , { field: '供应商', title: '供应商', sort: true }
                        , { field: 'HWhID', title: 'HWhID', hide: true, sort: true }
                        , { field: '默认仓库', title: '默认仓库', sort: true }
                        , { field: 'HSPID', title: 'HSPID', hide: true, sort: true }
                        , { field: '默认仓位', title: '默认仓位', sort: true }
                        , { field: '版本', title: '版本', sort: true }
                        , { field: '当前仓库', title: '当前仓库', sort: true }
                        , { field: '当前仓位', title: '当前仓位', sort: true }
                        , { field: '虚拟仓类型', title: '虚拟仓类型', sort: true }
                        , { field: '虚拟仓', title: '虚拟仓', sort: true }
                        , { field: '当前模具规格', title: '当前器具规格', sort: true }
                        , { field: '初始模具规格', title: '初始器具规格', sort: true }
                        , { field: '当前设计寿命', title: '当前设计寿命', sort: true }
                        , { field: '初始设计寿命', title: '初始设计寿命', sort: true }
                        , { field: '使用寿命', title: '使用寿命', sort: true }
                        , { field: '剩余寿命', title: '剩余寿命', sort: true }
                        , { field: '已生产数量', title: '已生产数量', sort: true }
                        , { field: '已生产重量', title: '已生产重量', sort: true }
                        , { field: '备注', title: '备注', sort: true }
                        , { field: '关联数量', title: '关联数量', sort: true }
                        , { field: '制单人', title: '制单人', sort: true }
                        , { field: '制单日期', title: '制单日期', templet: "<div>{{d.制单日期 ==null ?'':layui.util.toDateString(d.制单日期, 'yyyy-MM-dd')}}</div>", sort: true }
                        , { field: '审核人', title: '审核人', sort: true }
                        , { field: '审核日期', title: '审核日期', templet: "<div>{{d.审核日期 ==null ?'':layui.util.toDateString(d.审核日期, 'yyyy-MM-dd')}}</div>", sort: true }
                        , { field: '修改人', title: '修改人', sort: true }
                        , { field: '修改日期', title: '修改日期', templet: "<div>{{d.修改日期 ==null ?'':layui.util.toDateString(d.修改日期, 'yyyy-MM-dd')}}</div>", sort: true }
                        , { field: '关闭人', title: '关闭人', sort: true }
                        , { field: '关闭日期', title: '关闭日期', templet: "<div>{{d.关闭日期 ==null ?'':layui.util.toDateString(d.关闭日期, 'yyyy-MM-dd')}}</div>", sort: true }
                        , { field: 'hbilltype', title: 'hbilltype', hide: true, sort: true }
                        , { field: '单据类型', title: '单据类型', hide: true, sort: true }
                        , { field: 'HMoudType', title: 'HMoudType', hide: true, sort: true }
                        , { field: 'hsubid', title: 'hsubid', hide: true, sort: true }
                    ]]
                }
            }
            //初始化表格(子表1)
            function set_InitGrid1() {
                var ajaxLoad = layer.load();
                option1 = {
                    elem: '#mainTable1'
                    //, toolbar: '#toolbarDemo'
                    , height: '350'
                    , page: true
                    , cellMinWidth: 90
                    , limit: 50
                    , limits: [50, 500, 5000, 20000]
                    , cols: [[
                        //{ type: 'checkbox', fixed: 'left' }
                        , { templet: '#xuhao1', title: '序号', sort: true, fixed: 'left', event: "qwe" }
                        , { field: '日期', title: '日期', width: 200}
                        , { field: '单据类型', title: '单据类型', width: 200 }
                        , { field: '单据号', title: '单据号', width: 200 }
                        , { field: '器具分类', title: '器具分类', width: 200 }
                        , { field: '器具条码', title: '器具条码', width: 200 }
                        , { field: '器具编码', title: '器具编码', width: 200 }
                        , { field: '器具名称', title: '器具名称', width: 200 }
                        , { field: '器具规格', title: '器具规格', width: 200 }
                        , { field: '器具型号', title: '器具型号', width: 200 }
                        , { field: '数量', title: '数量', width: 200 }
                        , { field: '仓库', title: '仓库', width: 200 }
                        , { field: '仓位', title: '仓位', width: 200 }
                        , { field: '调出仓库', title: '调出仓库', width: 200 }
                        , { field: '调出仓位', title: '调出仓位', width: 200 }
                        , { field: '制单人', title: '制单人' }
                        , { field: '制单日期', title: '制单日期', templet: "<div>{{d.制单日期 ==null ?'':layui.util.toDateString(d.制单日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '审核人', title: '审核人' }
                        , { field: '审核日期', title: '审核日期', templet: "<div>{{d.审核日期 ==null ?'':layui.util.toDateString(d.审核日期, 'yyyy-MM-dd')}}</div>" }
 
                    ]]
                };
                option1.data = [];
                table1.render(option1);
                layer.close(ajaxLoad);
            }
            //初始化表格(子表2)
            function set_InitGrid2() {
                var ajaxLoad = layer.load();
                option2 = {
                    elem: '#mainTable2'
                    //, toolbar: '#toolbarDemo'
                    , height: '350'
                    , page: true
                    , cellMinWidth: 90
                    , limit: 50
                    , limits: [50, 500, 5000, 20000]
                    , cols: [[
                        //{ type: 'checkbox', fixed: 'left' }
                        , { templet: '#xuhao2', title: '序号', sort: true, fixed: 'left', event: "qwe" }
                        , { field: '日期', title: '日期', width: 200 }
                        , { field: '单据类型', title: '单据类型', width: 200 }
                        , { field: '单据号', title: '单据号', width: 200 }
                        , { field: '产品代码', title: '产品代码', width: 200 }
                        , { field: '产品名称', title: '产品名称', width: 200 }
                        , { field: '规格型号', title: '规格型号', width: 200 }
                        , { field: '器具分类', title: '器具分类', width: 200 }
                        , { field: '器具条码', title: '器具条码', width: 200 }
                        , { field: '器具编码', title: '器具编码', width: 200, hide: true }
                        , { field: '器具名称', title: '器具名称', width: 200 }
                        , { field: '器具规格', title: '器具规格', width: 200 }
                        , { field: '器具型号', title: '器具型号', width: 200 }
                        , { field: '生产数量', title: '生产数量', width: 200 }
                        , { field: '设计寿命', title: '设计寿命', width: 200 }
                        , { field: '耗用寿命', title: '耗用寿命', width: 200 }
                        , { field: '剩余寿命', title: '剩余寿命', width: 200 }
                        , { field: '制单人', title: '制单人' }
                        , { field: '制单日期', title: '制单日期', templet: "<div>{{d.制单日期 ==null ?'':layui.util.toDateString(d.制单日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '审核人', title: '审核人' }
                        , { field: '审核日期', title: '审核日期', templet: "<div>{{d.审核日期 ==null ?'':layui.util.toDateString(d.审核日期, 'yyyy-MM-dd')}}</div>" }
 
                    ]]
                };
                option2.data = [];
                table2.render(option2);
                layer.close(ajaxLoad);
            }
            //初始化表格(子表3)
            function set_InitGrid3() {
                var ajaxLoad = layer.load();
                option3 = {
                    elem: '#mainTable3'
                    //, toolbar: '#toolbarDemo'
                    , height: '350'
                    , page: true
                    , cellMinWidth: 90
                    , limit: 50
                    , limits: [50, 500, 5000, 20000]
                    , cols: [[
                        //{ type: 'checkbox', fixed: 'left' }
                        , { templet: '#xuhao3', title: '序号', sort: true, fixed: 'left', event: "qwe" }
                        , { field: '日期', title: '日期', width: 200 }
                        , { field: '单据类型', title: '单据类型', width: 200 }
                        , { field: '单据号', title: '单据号', width: 200 }
                        , { field: '器具分类', title: '器具分类', width: 200 }
                        , { field: '器具条码', title: '器具条码', width: 200 }
                        , { field: '器具编码', title: '器具编码', width: 200, hide: true }
                        , { field: '器具名称', title: '器具名称', width: 200 }
                        , { field: '器具规格', title: '器具规格', width: 200 }
                        , { field: '器具型号', title: '器具型号', width: 200 }
                        , { field: '制单人', title: '制单人' }
                        , { field: '制单日期', title: '制单日期', templet: "<div>{{d.制单日期 ==null ?'':layui.util.toDateString(d.制单日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '审核人', title: '审核人' }
                        , { field: '审核日期', title: '审核日期', templet: "<div>{{d.审核日期 ==null ?'':layui.util.toDateString(d.审核日期, 'yyyy-MM-dd')}}</div>" }
 
                    ]]
                };
                option3.data = [];
                table3.render(option3);
                layer.close(ajaxLoad);
            }
            //初始化表格(子表4)
            function set_InitGrid4() {
                var ajaxLoad = layer.load();
                option4 = {
                    elem: '#mainTable4'
                    //, toolbar: '#toolbarDemo'
                    , height: '350'
                    , page: true
                    , cellMinWidth: 90
                    , limit: 50
                    , limits: [50, 500, 5000, 20000]
                    , cols: [[
                        //{ type: 'checkbox', fixed: 'left' }
                        , { templet: '#xuhao4', title: '序号', sort: true, fixed: 'left', event: "qwe" }
                        , { field: '日期', title: '日期', width: 200 }
                        , { field: '单据类型', title: '单据类型', width: 200 }
                        , { field: '单据号', title: '单据号', width: 200 }
                        , { field: '器具分类', title: '器具分类', width: 200 }
                        , { field: '器具条码', title: '器具条码', width: 200 }
                        , { field: '器具编码', title: '器具编码', width: 200, hide: true }
                        , { field: '器具名称', title: '器具名称', width: 200 }
                        , { field: '器具规格', title: '器具规格', width: 200 }
                        , { field: '器具型号', title: '器具型号', width: 200 }
                        , { field: '制单人', title: '制单人' }
                        , { field: '制单日期', title: '制单日期', templet: "<div>{{d.制单日期 ==null ?'':layui.util.toDateString(d.制单日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '审核人', title: '审核人' }
                        , { field: '审核日期', title: '审核日期', templet: "<div>{{d.审核日期 ==null ?'':layui.util.toDateString(d.审核日期, 'yyyy-MM-dd')}}</div>" }
 
                    ]]
                };
                option4.data = [];
                table4.render(option4);
                layer.close(ajaxLoad);
            }
 
            //加载网格
            function get_Display(sWhere) {
                //进入页面显示的缓存列表
                $.ajax({
                    url: GetWEBURL() + '/Gy_Mould/list1',
                    type: "GET",
                    data: { "sWhere": sWhere, "ModRightNameSelect": "Gy_MouldFileList", "user": sessionStorage["HUserName"]},
                    success: function (data1) {
                        if (data1.count == 1) {
                            option.data = data1.data;
                            table.render(option);
                            layer.close(index);
                        } else {
                            layer.close(index);
                            layer.alert("没有数据记录!", { icon: 5 });
                        }
                    }, error: function () {
                        layer.close(index);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                })
            }
 
 
            var index = layer.load(0);
            //预览
            function get_ViewReport() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    window.open("../../基础资料/公用基础资料/HBarPlanPrint.html?linterid=" + InterID + "&Type=HEquipResume&OpenTmp=设备履历");
 
                }
                else {
                    layer.msg('请选择一行数据打印!');
                }
            }
            //刷新
            function set_Refresh() {
                $("#btnSearch").click();
            }
            //快速过滤
            function get_FastQuery() {
                //var HBillType = $("#HBillType").val();//单据类型
                var HBillNo = $("#HBillNo").val();//单据号
                var HMouldType = $("#HMouldType").val();//制单人
                var BenginHCreateDate = $("#BenginHCreateDate").val();//开始制单时间
                var EndHCreateDate = $("#EndHCreateDate").val();//结束制单时间
                if (HBillNo) {
                    sWhere += " and 单据号 like '%" + HBillNo + "%'";
                }
                if (HMouldType) {
                    sWhere += " and 模具品类 like '%" + HMouldType + "%'";
                }
                if (BenginHCreateDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + BenginHCreateDate + "'";
                }
                if (EndHCreateDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + EndHCreateDate + "'";
                }
                get_Display(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
            }
            //重置过滤条件
            function set_ClearQuery() {
                //$("#HBillType").val("");//单据类型
                $("#HBillNo").val("");//单据号
                $("#HMouldType").val("");//设备类型
                $("#BenginHCreateDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));//开始日期
                $("#EndHCreateDate").val(Format(new Date(), "yyyy-MM-dd"));//结束日期
                sWhere = "";
                $("#btnSearch").click();
            }
 
 
            //#endregion
        });
 
    </script>
</body>
</html>