yxj
2023-03-13 e7a42dd70ac5df2eafab9c55dd21891acccdfdae
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
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; 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/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
 
</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" style="width:100px">
                                        <select name="city" lay-verify="required" id="SHPrintQty">
                                            <option value="全部">全部</option>
                                            <option value="未打印">未打印</option>
                                            <option value="已打印">已打印</option>
                                        </select>
                                    </div>
                                </div>
                                <input type="checkbox" id="wybj" name="wybj" title="只显示委外" lay-filter="wybj" lay-skin="primary">
                                <div class="layui-inline">
                                    <label class="layui-form-label">开始日期</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" id="HDate">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">结束日期</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" id="HDate1">
                                    </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" style="padding: 0px; margin-left: 6%;">
                                    <div class="layui-row" style="margin-top:10px;">
                                        <div class="layui-inline">
                                            <label class="layui-form-label">订单跟踪号</label>
                                            <div class="layui-input-block">
                                                <input type="text" class="layui-input" name="HOrderProcNO" id="HOrderProcNO">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label">物料</label>
                                            <div class="layui-input-block">
                                                <input type="text" class="layui-input" name="HProcExchBillNo" id="SHname">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">任务单号</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HWorkBillNo" id="HWorkBillNo">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row" style="margin-top: 10px; margin-bottom: 10px;">
                                        <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">唯一ID</label>
                                            <div class="layui-input-block">
                                                <input type="text" class="layui-input" name="HErpID" id="HErpID">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--<div class="layui-tab-item layui-show">-->
                        <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
                        <!--</div>-->
                        <!--<table class="" id="mainTable" lay-filter="mainTable"></table>
    <table class="" id="mainTable2" lay-filter="mainTable2"></table>-->
                        <div class="layui-tab layui-tab-card">
                            <ul class="layui-tab-title">
                                <li class="layui-this">工艺流程</li>
                                <li>器具清单</li>
                                <li>工艺参数清单</li>
                            </ul>
                            <div class="layui-tab-content">
                                <div class="layui-tab-item layui-show">
                                    <!--工艺流程-->
                                    <table class="layui-hide" id="mainTable2" lay-filter="mainTable2"></table>
                                </div>
                                <div class="layui-tab-item">
                                    <!--器具清单-->
                                    <table class="layui-hide" id="mainTable1" lay-filter="mainTable1"></table>
                                </div>
                                <div class="layui-tab-item">
                                    <!--工艺参数清单-->
                                    <table class="layui-hide" id="mainTable3" lay-filter="mainTable3"></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="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>新增</button>-->
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill"><i class="layui-icon layui-icon-form"></i>编辑</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>删除</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_cf"><i class="layui-icon layui-icon-form"></i>拆分</button>
                                <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="btn_print"><i class="layui-icon layui-icon-print"></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>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_StationOut"><i class="layui-icon layui-icon-form"></i>工序出站汇报单</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_StationIn"><i class="layui-icon layui-icon-form"></i>工序进站接收单</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_HideColumn1"><i class="layui-icon layui-icon-file-b"></i>列设置</button>
                            </div>
                        </script>
                        <script type="text/html" id="toolbarDemo2">
                            <div class="layui-btn-container">
                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>新增</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill"><i class="layui-icon layui-icon-form"></i>编辑</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>删除</button>
                                <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="btn_print"><i class="layui-icon layui-icon-print"></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>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_StationOut"><i class="layui-icon layui-icon-form"></i>工序出站汇报单</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_StationIn"><i class="layui-icon layui-icon-form"></i>工序进站接收单</button>-->
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_HideColumn2"><i class="layui-icon layui-icon-file-b"></i>明细列设置</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Fg"><i class="layui-icon layui-icon-file-b"></i>工序返工</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Pg"><i class="layui-icon layui-icon-file-b"></i>工序派工</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Fg"><i class="layui-icon layui-icon-file-b"></i>返工申请</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Jl"><i class="layui-icon layui-icon-file-b"></i>返工记录</button>
                            </div>
                        </script>
                        <script type="text/html" id="toolbarDemo3">
                            <div class="layui-btn-container">
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_HideColumn3"><i class="layui-icon layui-icon-file-b"></i>列设置</button>
                            </div>
                        </script>
                        <script type="text/html" id="toolbarDemo4">
                            <div class="layui-btn-container">
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_HideColumn4"><i class="layui-icon layui-icon-file-b"></i>列设置</button>
                            </div>
                        </script>
                    </form>
                </div>
            </div>
        </div>
    </div>
 
    <style>
        .layui-table-cell {
            height: 22px;
        }
    </style>
    <script>
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index', //主入口模块
        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
            //#region 公共变量
            var $ = layui.$
                , admin = layui.admin
                , layer = layui.layer
                , table = layui.table
                , form = layui.form
                , element = layui.element
                , laypage = layui.laypage
                , laydate = layui.laydate
                , util = layui.util
            //var sWhere = " 产品代码 = 'BX0002'";
            var sWhere = "";
            var option = "";
            var option2 = "";
            var option3 = "";
            var option4 = "";
            var HBillNo = "";
            var wybj = false;
            var QJQD = 0;//判断器具清单查询列表是否有数据  0没有 1有
            var Organization = sessionStorage["Organization"]
            //#endregion
 
            //#region 进入页面即加载
 
            //
            var HModName = "Sc_ProcessExchangeBillList";
            //不需要显示的字段 可扩展 (主表)
            var titleData = ["HItemID", "HEntryID", "HWorkShopID", "HMaterID", "HSupID", "HPRDORGID", "HEquipMentID", "hsubid", "HICMOEntryID", "HDeptID"];
             //不需要显示的字段 可扩展 (工艺流程)
            var titleData2 = ["HEntryID", "HProcID", "HCenterID", "HDeptID", "hmainid", "hicmointerid", "HWorkShopID", "HMaterID", "HUnitID", "hsubid", "HSupID"];
            //不需要显示的字段 可扩展 (器具清单)
            var titleData3 = ["HEntryID", "HMouldID", "HMaterID", "HUnitID", "hmainid","hicmointerid"];
            //不需要显示的字段 可扩展 (工艺参数清单)
            var titleData4 = ["HItemID"];
            //初始化界面
            set_ClearBill();
 
            //#endregion
 
            //#region 头工具栏事件
            table.on('toolbar(mainTable)', function (obj) {
                switch (obj.event) {
                    //新增
                    case 'set_AddNew': set_AddNew();
                        break;
                    //编辑
                    case 'set_ShowBill': set_ShowBill();
                        break;
                    //删除
                    case 'set_DeleteBill': set_DeleteBill();
                        break;
                    //拆分
                    case 'set_cf': set_cf();
                        break;
                    //刷新
                    case 'get_Refresh': get_Refresh();
                        break;
                    //退出按钮
                    case 'get_Exit': Pub_Close(2);
                        break;
                    //预览
                    case 'btn_view': get_view();
                        break;
                    //打印
                    case 'btn_print': get_print();
                        break;
                    //工序出站汇报单
                    case 'set_StationOut': set_StationOut();
                        break;
                    //工序进站接收单
                    case 'get_StationIn': get_StationIn();
                        break;
                    //列设置
                    case 'get_HideColumn1': get_HideColumn1();
                        break;
                    ////明细列设置
                    //case 'get_HideColumn2': get_HideColumn2();
                    //    break;
                    ////明细列设置
                    //case 'get_HideColumn3': get_HideColumn3();
                    //    break;
                    ////明细列设置
                    //case 'get_HideColumn4': get_HideColumn4();
                    //    break;
 
                };
            });
 
            table.on('toolbar(mainTable1)', function (obj) {
                switch (obj.event) {
                    //明细列设置
                    case 'get_HideColumn3': get_HideColumn3();
                        break;
 
                };
            });
            table.on('toolbar(mainTable2)', function (obj) {
                switch (obj.event) {
                    //新增
                    case 'set_AddNew': set_AddNew();
                        break;
                    //编辑
                    case 'set_ShowBill': set_ShowBill();
                        break;
                    //删除
                    case 'set_DeleteBill': set_DeleteBill();
                        break;
                    //刷新
                    case 'get_Refresh': get_Refresh();
                        break;
                    //退出按钮
                    case 'get_Exit': Pub_Close(2);
                        break;
                    //预览
                    case 'btn_view': get_view();
                        break;
                    //打印
                    case 'btn_print': get_print();
                        break;
                    //工序出站汇报单
                    case 'set_StationOut': set_StationOut();
                        break;
                    //工序进站接收单
                    case 'get_StationIn': get_StationIn();
                        break;
                    //列设置
                    //case 'get_HideColumn1': get_HideColumn1();
                    //    break;
                    //明细列设置
                    case 'get_HideColumn2': get_HideColumn2();
                        break
                    //工序返工单申请
                    case 'get_Fg': get_Fg();
                        break
                    //工序返工单记录
                    case 'get_Jl': get_Jl();
                        break
                    //工序派工单
                    case 'get_Pg': get_Pg();
                        break
                };
            });
            table.on('toolbar(mainTable3)', function (obj) {
                switch (obj.event) {
                    //明细列设置
                    case 'get_HideColumn4': get_HideColumn4();
                        break;
                };
            });
 
            //#endregion
 
            //#region 重置按钮
            form.on('submit(btnReSearch)', function (data) {
                set_ClearQuery();
            });
            //#endregion
 
            //#region 查询按钮
            form.on('submit(btnSearch)', function (data) {
                get_FastQuery();
            });
            //#endregion
 
 
            //#region 本页面所有被调用的方法
            function set_ClearBill() {
                $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));//开始日期
                $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));//结束日期
                //初始化主表列表
                set_InitGrid();
                //初始化从表列表
                set_InitGrid2();
                //初始化从表列表
                set_InitGrid3();
                //初始化从表列表
                set_InitGrid4();
                table.render(option2);
                //查询
                get_FastQuery();
            }
 
 
            //#region 重置过滤条件方法
            function set_ClearQuery() {
                $("#SHPrintQty").val("");//打印状态
                $("input[type='checkbox'][name='wybj']").prop('checked', false);
                form.render("checkbox");//委外标记
                $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));//开始日期
                $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));//结束日期
                $("#HOrderProcNO").val("");//订单跟踪号
                $("#SHname").val("");//物料|子件名称|子件规格
                $("#HBillNo").val("");//单据号
                //$("#btnSearch").click();
                sWhere = "";
                get_FastQuery();
            }
            //#endregion
 
            //#region 快速过滤
            function get_FastQuery() {
                var SHPrintQty = $("#SHPrintQty").val();//打印状态
                var HDate = $("#HDate").val();//开始日期
                var HDate1 = $("#HDate1").val();//结束日期
                var HOrderProcNO = $("#HOrderProcNO").val();//订单跟踪号
                var HWorkBillNo = $("#HWorkBillNo").val();
                var SHname = $("#SHname").val();//物料|子件名称|子件规格
                var HBillNo = $("#HBillNo").val();//单据号
                var HErpID = $("#HErpID").val();//唯一ID
                if (SHPrintQty) {//判断打印状态
                    if (SHPrintQty == "全部") {
                        sWhere = " and 打印次数 >= 0 ";
                    }
                    if (SHPrintQty == "已打印") {
                        sWhere = " and 打印次数 > 0 ";
                    }
                    if (SHPrintQty == "未打印") {
                        sWhere = " and 打印次数 = 0 ";
                    }
                }
                if (wybj) {
                    sWhere += " and 委外标记 = 'Y'";
                }
                if (HDate) {
                    sWhere += " and 日期 >= '" + HDate + "'";
                }
                if (HDate1) {
                    sWhere += " and 日期 <= '" + HDate1 + "'";
                }
                if (HWorkBillNo) {
                    sWhere += " and 生产订单号 like '%" + HWorkBillNo + "%'";
                }
                if (HOrderProcNO) {
                    sWhere += " and 订单跟踪号 like '%" + HOrderProcNO + "%'";
                }
                if (SHname) {
                    sWhere += " and  子件代码 like '%" + SHname + "%'";
                }
                if (HBillNo) {
                    sWhere += " and 单据号 like '%" + HBillNo + "%'"
                }
                if (HErpID) {
                    sWhere += " and 唯一ID like '%" + HErpID + "%'";
                }
                get_Display(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
            }
            //#endregion
            //#region 触发事件:包括form.on(){}格式的所有点击事件、选择事件等
 
 
            //选中判断
            form.on('checkbox(wybj)', function (data) {
                wybj = data.elem.checked; //是否被选中,true或者false
            });
 
            //点击主表带出从表数据
            table.on('row(mainTable)', function (obj) { //注:tool 是工具条事件名,test 是 table 原始容器的属性 lay-filter="对应的值"
                var datas = obj.data; //获得当前行数据
                HBillNo = datas["单据号"].toString();
                var HMainID = datas.hmainid;
                var wait = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/LEMS/MES_Sc_ProcessExchangeBillQuerySub_Json',
                    type: "GET",
                    data: { "sWhere": HMainID },
                    //success: function (data1) {
                    //    if (data1.count == 1) {
                    //        option2.data = data1.data;
                    //        table.render(option2);
                    //        layer.close(wait);
                    //    } else {
                    //        layer.alert(data1.code + data1.Message, { icon: 5 });
                    //        layer.close(wait);
                    //    }
                    //}, error: function () {
                    //    layer.close(wait);
                    //    layer.alert("接口失效!", { icon: 5 });
                    //}
                    success: function (data1) {
                        if (data1.count == 1) {
                            var data = [];
                            var col = [];
                            //给空的数组赋值
                            for (var key in data1.list) {
                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
                            }
                            //在列表左边添加勾选框
                            col.push({ type: 'checkbox', fixed: 'left' });
                            for (var i = 0; i < data.length; i++) {
                                // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
                                if ($.inArray(data[i].name, titleData2) > -1) {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
                                }
                                else {
                                    switch (data[i].Type) {
                                        //int
                                        case 'DateTime':
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
                                            break;
                                        default:
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
                                    }
                                }
                            }
 
                            //动态显示列名
                            option2 = {
                                elem: '#mainTable2'
                                , toolbar: '#toolbarDemo2'
                                , cols: [col]
                                , data: data1.data
                                , height: 550
                                , page: true
                                , cellMinWidth: 90
                                , limit: 50
                                , limits: [50, 500, 5000, 20000]
                            }
                            table.render(option2);
 
                            //刷新表格数据
                            DisPlay_HideColumn();
 
                            layer.close(wait);
                            //layer.alert("查询成功", { icon: 1 });
                        } else {
                            layer.close(wait);
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.close(wait);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
                DisPlay_HideColumn_Sec();
                set_ClearBillHMainID(HMainID);    //器具清单
            });
 
            //#endregion
 
 
            function set_ClearBillHMainID(HMainID) {
                resultTableHead = []; //清空表头列,防止重复渲染
                //初始查询
                get_DisplayHMainID(HMainID);
                get_Display4(HMainID);
            }
            //#endregion
 
            //#region 查询 (器具清单)
            function get_DisplayHMainID(HMainID) {
                var ajaxLoad = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/Sc_ProcessExchangeBillList/QJQD',
                    type: "GET",
                    data: { "HProcExchHinteID": HMainID },
                    success: function (data1) {
                        if (data1.count == 1) {
 
                            if (data1.data.length == 0) {
                                QJQD = 0;
                            } else {
                                QJQD = 1;
                            }
 
                            var data = [];
                            //给空的数组赋值
                            for (var key in data1.list) {
                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
                            }
                            var col = [];
                            for (var i = 0; i < data.length; i++) {
                                // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
                                if ($.inArray(data[i].name, titleData3) > -1) {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
                                }
                                else {
                                    switch (data[i].Type) {
                                        //int
                                        case 'DateTime':
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
                                            break;
                                        default:
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
                                    }
                                }
                            }
 
                            //动态显示列名
                            option3 = {
                                elem: '#mainTable1'
                                , toolbar: '#toolbarDemo3'
                                , cols: [col]
                                , data: data1.data
                                , height: 550
                                , page: true
                                , cellMinWidth: 90
                                , limit: 50
                                , limits: [50, 500, 5000, 20000]
                            }
                            table.render(option3);
 
                            layer.close(ajaxLoad);
                            //layer.alert("查询成功", { icon: 1 });
                        } else {
                            layer.close(ajaxLoad);
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.close(ajaxLoad);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
                DisPlay_HideColumn_Mod();
            }
            //#endregion
 
            //#region 查询 工艺参数
            function get_Display4(HMainID) {
                var ajaxLoad = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/Sc_ProcessExchangeBill/GetProcessExchangeBillSubTech',
                    type: "GET",
                    data: { "HInterID": HMainID },
                    success: function (data1) {
                        if (data1.count == 1) {
                            var data = [];
                            //给空的数组赋值
                            for (var key in data1.list) {
                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
                            }
                            var col = [];
                            for (var i = 0; i < data.length; i++) {
                                // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
                                if ($.inArray(data[i].name, titleData4) > -1) {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
                                }
                                else {
                                    switch (data[i].Type) {
                                        //int
                                        case 'DateTime':
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
                                            break;
                                        default:
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
                                    }
                                }
                            }
 
                            //动态显示列名
                            option4 = {
                                elem: '#mainTable3'
                                , toolbar: '#toolbarDemo4'
                                , cols: [col]
                                , data: data1.data
                                , height: 550
                                , page: true
                                , cellMinWidth: 90
                                , limit: 50
                                , limits: [50, 500, 5000, 20000]
                            }
                            table.render(option4);
                           
                            layer.close(ajaxLoad);
                            //layer.alert("查询成功", { icon: 1 });
                        } else {
                            layer.close(ajaxLoad);
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.close(ajaxLoad);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
                DisPlay_HideColumn_Tech();
            }
            //#endregion           
 
            //初始化主表列表
            function set_InitGrid() {
                option = {
                    elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , page: true
                    , height: 300
                    , cellMinWidth: 90
                    , limit: 50
                    , limits: [50, 500, 5000, 20000]
                    , cols: [[
                    //    { type: 'checkbox', fixed: 'left' }
                    //    , { field: 'hmainid', title: 'hmainid', width: 90, hide: true }
                    //    , { field: '打印次数', title: '打印次数' }
                    //    , { field: '类型', title: '类型' }
                    //    , {
                    //        field: '日期', title: '日期', width: 120, sort: true, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>"
                    //    }
                    //    , { field: '订单跟踪号', title: '订单跟踪号', width: 120 }
                    //    , { field: '单据号', title: '单据号', width: 190 }
                    //    , { field: 'hicmointerid', title: 'hicmointerid', width: 80, hide: true }
                    //    , { field: '任务单号', title: '任务单号', width: 140 }
                    //    , { field: '唯一ID', title: '唯一ID', width: 140 }
                    //    , { field: '日计划工单日期', title: '日计划工单日期', width: 140 }
                    //    , { field: 'HWorkShopID', title: 'HWorkShopID', width: 80, hide: true }
                    //    , { field: 'HDeptID', title: 'HDeptID', width: 80, hide: true }
                    //    , { field: '生产车间代码', title: '生产车间代码', width: 115 }
                    //    , { field: '生产车间', title: '生产车间' }
                    //    , { field: '委外标记', title: '委外标记' }
                    //    , { field: 'HMaterID', title: 'HMaterID', width: 80, hide: true }
                    //    , { field: '子件代码', title: '子件代码' }
                    //    , { field: '子件名称', title: '子件名称' }
                    //    , { field: '子件规格', title: '子件规格' }
                    //    , { field: '批号', title: '批号' }
                    //    , { field: '原料批次号', title: '原料批次号' }
                    //    , { field: 'HMaterID2', title: 'HMaterID2', width: 80, hide: true }
                    //    , { field: '产品代码', title: '产品代码' }
                    //    , { field: '产品名称', title: '产品名称' }
                    //    , { field: '规格型号', title: '规格型号' }
                    //    , { field: 'HUnitID', title: 'HUnitID', width: 80, hide: true }
                    //    , { field: '单位代码', title: '单位代码' }
                    //    , { field: '单位', title: '单位' }
                    //    , { field: '设备模具代码', title: '设备模具代码' }
                    //    , { field: '设备模具', title: '设备模具' }
                    //    , { field: '生产数量', title: '生产数量' }
                    //    , { field: '流转卡数量', title: '流转卡数量' }
                    //    , { field: '计划开工日期', title: '计划开工日期' }
                    //    , { field: '计划完工日期', title: '计划完工日期' }
                    //    , { field: '摘要', title: '摘要' }
                    //    , { field: '内部单据号', title: '内部单据号' }
                    //    , { field: '表头备注', title: '表头备注' }
                    //    , { field: '制单人', title: '制单人' }
                    //    , { field: '制单日期', title: '制单日期' }
                    //    , { field: '审核人', title: '审核人' }
                    //    , { field: '审核日期', title: '审核日期' }
                    //    , { field: '修改人', title: '修改人' }
                    //    , { field: '修改日期', title: '修改日期' }
                    //    , { field: '关闭人', title: '关闭人' }
                    //    , { field: '关闭日期', title: '关闭日期' }
                    //    , { field: '作废人', title: '作废人' }
                    //    , { field: '作废日期', title: '作废日期' }
                    //    , { field: 'HBillType', title: 'HBillType', width: 80, hide: true }
                    //    , { field: 'hsubid', title: 'hsubid', width: 80, hide: true }
                    //    , { field: '拆分数量', title: '拆分数量' }
                    //    , { field: '源单客户编码', title: '源单客户编码', width: 80 }
                    //    , { field: '包装标识', title: '包装标识', width: 80 }
                    //    , { field: '包装标识编码', title: '包装标识编码', width: 80 }
                    ]]
                };
                //table.render(option);
            }
 
            //初始化从表列表  工艺流程
            function set_InitGrid2() {
                option2 = {
                    elem: '#mainTable2'
                    //, toolbar: '#toolbarDemo'
                    , page: false
                    , height: 500
                    , cellMinWidth: 90
                    , limit: Number.MAX_VALUE//默认显示全部
                    , cols: [[
                        //{ type: 'checkbox', fixed: 'left' }
                        //, { field: 'hsubid', title: 'hsubid', hide: true }
                        //, { field: '流水号', title: '流水号' }
                        //, { field: 'HProcID', title: 'HProcID', hide: true }
                        //, { field: '工序代码', title: '工序代码' }
                        //, { field: '工序名称', title: '工序名称' }
                        //, { field: '流转卡数量', title: '流转卡数量', width: 100 }
                        //, { field: '进站关联数量', title: '进站关联数量', width: 120 }
                        //, { field: '出站关联数量', title: '出站关联数量', width: 120 }
                        //, { field: '出站报废关联数量', title: '出站报废关联数量', width: 150 }
                        //, { field: '返工标记', title: '返工标记' }
                        //, { field: '加工说明', title: '加工说明' }
                        //, { field: '工作中心代码', title: '工作中心代码', width: 115 }
                        //, { field: '工作中心', title: '工作中心' }
                        //, { field: '计划数量', title: '计划数量' }
                        //, { field: 'hmainid', title: 'hmainid', hide: true }
                        //, { field: '日期', title: '日期', sort: true }
                        //, { field: '单据号', title: '单据号', width: 150 }
                        //, { field: 'hicmointerid', title: 'hicmointerid', hide: true }
                        //, { field: '任务单号', title: '任务单号', width: 100 }
                        //, { field: 'HWorkShopID', title: 'HWorkShopID', hide: true }
                        //, { field: '生产车间代码', title: '生产车间代码', width: 115 }
                        //, { field: '生产车间', title: '生产车间' }
                        //, { field: 'HMaterID', title: 'HMaterID', hide: true }
                        //, { field: '产品代码', title: '产品代码' }
                        //, { field: '产品名称', title: '产品名称' }
                        //, { field: '规格型号', title: '规格型号' }
                        //, { field: '批号', title: '批号' }
                        //, { field: 'HUnitID', title: 'HUnitID', hide: true }
                        //, { field: '单位代码', title: '单位代码' }
                        //, { field: '单位', title: '单位' }
                        //, { field: '生产数量', title: '生产数量' }
                        //, { field: '计划开工日期', title: '计划开工日期' }
                        //, { field: '计划完工日期', title: '计划完工日期' }
                        //, { field: '摘要', title: '摘要' }
                        //, { field: '内部单据号', title: '内部单据号' }
                        //, { field: 'HSupID', title: 'HSupID', hide: true }
                        //, { field: '委外加工单位代码', title: '委外加工单位代码' }
                        //, { field: '委外加工单位', title: '委外加工单位' }
                        //, { field: '表头备注', title: '表头备注' }
                        //, { field: 'HBillType', title: 'HBillType', hide: true }
                        //, { field: '行关闭人', title: '行关闭人' }
                        //, { field: '关闭类型', title: '关闭类型' }
                        //, { field: '表体备注', title: '表体备注' }
                        //, { field: '源单主内码', title: '源单主内码' }
                        //, { field: '源单子内码', title: '源单子内码' }
                        //, { field: '源单单号', title: '源单单号' }
                        //, { field: '源单类型', title: '源单类型' }
                        //, { field: '汇报数量', title: '汇报数量' }
                        //, { field: '流转工序', title: '流转工序' }
                        //, { field: '出站流转工序', title: '出站流转工序' }
                        //, { field: '首道工序', title: '首道工序' }
                        //, { field: '末道工序', title: '末道工序' }
                        //, { field: '下道工序号', title: '下道工序号' }
                        //, { field: '不良品关联数量', title: '不良品关联数量' }
                    ]]
                };
             
            }
             //初始化从表列表  器具清单
            function set_InitGrid3() {
                option3 = {
                    elem: '#mainTable1'
                    //, toolbar: '#toolbarDemo'
                    , page: false
                    , height: 500
                    , cellMinWidth: 90
                    , limit: Number.MAX_VALUE//默认显示全部
                    , cols: [[]]
                };
             
            }
            //初始化从表列表   工艺参数清单
            function set_InitGrid4() {
                option4 = {
                    elem: '#mainTable3'
                    //, toolbar: '#toolbarDemo'
                    , page: false
                    , height: 500
                    , cellMinWidth: 90
                    , limit: Number.MAX_VALUE//默认显示全部
                    , cols: [[]]
                };
 
            }
            //#region 查询 (主表)
            function get_Display(sWhere) {
                sWhere += " and HPRDORGID=" + sessionStorage["OrganizationID"] + " ";
                var ajaxLoad = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/LEMS/MES_Sc_ProcessExchangeBillQuery_Json',
                    type: "GET",
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                    success: function (data1) {
                        if (data1.count == 1) {
                            var data = [];
                            var col = [];
                            //给空的数组赋值
                            for (var key in data1.list) {
                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
                            }
                            //在列表左边添加勾选框
                            col.push({ type: 'checkbox', fixed: 'left', totalRowText: '合计' });
                            for (var i = 0; i < data.length; i++) {
                                // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
                                if ($.inArray(data[i].name, titleData) > -1) {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
                                }
                                else {
                                    switch (data[i].Type) {
                                        //int
                                        case 'DateTime':
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
                                            break;
                                        default:
                                            if (data[i].name == '生产数量' || data[i].name == '流转卡数量' || data[i].name == '入库数量') {
                                                col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, totalRow: true });
                                            } else {
                                                col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
                                            }
                                    }
                                }
                            }
 
                            //动态显示列名
                            option = {
                                elem: '#mainTable'
                                , toolbar: '#toolbarDemo'
                                , cols: [col]
                                , data: data1.data
                                , height: 550
                                , page: true
                                , totalRow: true
                                , cellMinWidth: 90
                                , limit: 50
                                , limits: [50, 500, 5000, 20000]
                            }
                            table.render(option);
 
                            //刷新表格数据
                            DisPlay_HideColumn();
 
                            layer.close(ajaxLoad);
                            //layer.alert("查询成功", { icon: 1 });
                        } else {
                            layer.close(ajaxLoad);
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.close(ajaxLoad);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
                DisPlay_HideColumn();
            }
            //#endregion
 
            //#region 隐藏列设置 (主列表)
            function get_HideColumn1() {
                var colName = "";
                for (var i = 1; i < option.cols[0].length - 1; i++) {
                    colName += option.cols[0][i]["title"] + ",";
                }
 
                colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI 进行编码
                layer.open({
                    type: 2
                    , skin: "layui-layer-rim" //加上边框
                    , title: "隐藏列设置"  //标题
                    , closeBtn: 1  //窗体右上角关闭 的 样式
                    , shift: 2 //弹出动画
                    , area: ["50%", "90%"] //窗体大小
                    , maxmin: true //设置最大最小按钮是否显示
                    , content: ['../../基础资料/隐藏列设置/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
                    , btn: ["确定", "取消"]
                    , btn1: function (index, laero) {
                        //刷新表格数据
                        DisPlay_HideColumn();
                        //更新表格缓存的数据
                        layer.close(index);//关闭弹窗
                    }
                })
            }
            //#endregion
 
            //#region 隐藏列设置 (工艺流程)
            function get_HideColumn2() {
                var colName = "";
                for (var i = 1; i < option2.cols[0].length - 1; i++) {
                    colName += option2.cols[0][i]["title"] + ",";
                }
 
                colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI 进行编码
                layer.open({
                    type: 2
                    , skin: "layui-layer-rim" //加上边框
                    , title: "隐藏列设置"  //标题
                    , closeBtn: 1  //窗体右上角关闭 的 样式
                    , shift: 2 //弹出动画
                    , area: ["50%", "90%"] //窗体大小
                    , maxmin: true //设置最大最小按钮是否显示
                    , content: ['../../基础资料/隐藏列设置/Gy_GridView_Hide.html?HModName=' + HModName + "_Sec" + '&colName=' + colName, "yes"]
                    , btn: ["确定", "取消"]
                    , btn1: function (index, laero) {
                        //刷新表格数据
                        DisPlay_HideColumn_Sec();
                        //更新表格缓存的数据
                        layer.close(index);//关闭弹窗
                    }
                })
            }
            //#endregion
 
            //工序返工申请
            function get_Fg() {
                var checkStatus = table.checkStatus('mainTable2')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    if (checkStatus.data[0]["流水号"] != "9999") {
                        layer.open({
                            type: 2
                            , skin: "layui-layer-rim" //加上边框
                            , title: "工序返工申请单编辑"  //标题
                            , closeBtn: 1  //窗体右上角关闭 的 样式
                            , shift: 2 //弹出动画
                            , area: ["100%", "100%"] //窗体大小
                            , maxmin: true //设置最大最小按钮是否显示
                            , content: ['../../车间管理/工序流转卡/Sc_ProcExchWorkBackBillEdit.html?OperationType=1&linterid=' + checkStatus.data[0]["hmainid"] + '&HEntryID=' + checkStatus.data[0]["HEntryID"], "yes"]
                            , btn1: function (index, laero) {
                                //刷新表格数据
                                DisPlay_HideColumn();
                                //更新表格缓存的数据
                                layer.close(index);//关闭弹窗
                            }
                        })
                    } else {
                        layer.msg('返工工序不能是转工序!');
                    }
                } else {
                    layer.msg('请选择一行数据编辑!');
                }
            }
 
            //工序返工记录
            function get_Jl() {
                var checkStatus = table.checkStatus('mainTable2')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    if (checkStatus.data[0]["流水号"] != "9999") {
                        layer.open({
                            type: 2
                            , skin: "layui-layer-rim" //加上边框
                            , title: "工序返工记录单编辑"  //标题
                            , closeBtn: 1  //窗体右上角关闭 的 样式
                            , shift: 2 //弹出动画
                            , area: ["100%", "100%"] //窗体大小
                            , maxmin: true //设置最大最小按钮是否显示
                            , content: ['../../车间管理/工序流转卡/Sc_ProcExchRecordBackBillEdit.html?OperationType=1&linterid=' + checkStatus.data[0]["hmainid"] + '&HEntryID=' + checkStatus.data[0]["HEntryID"], "yes"]
                            , btn1: function (index, laero) {
                                //刷新表格数据
                                DisPlay_HideColumn();
                                //更新表格缓存的数据
                                layer.close(index);//关闭弹窗
                            }
                        })
                    } else {
                        layer.msg('返工工序不能是转工序!');
                    }
                } else {
                    layer.msg('请选择一行数据编辑!');
                }
            }
 
            //工序派工
            function get_Pg() {
                var checkStatus = table.checkStatus('mainTable2')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    if (checkStatus.data[0]["流水号"] != "9999") {
                        layer.open({
                            type: 2
                            , skin: "layui-layer-rim" //加上边框
                            , title: "工序派工单编辑"  //标题
                            , closeBtn: 1  //窗体右上角关闭 的 样式
                            , shift: 2 //弹出动画
                            , area: ["100%", "100%"] //窗体大小
                            , maxmin: true //设置最大最小按钮是否显示
                            , content: ['../../车间管理/工序流转卡/Sc_ProcessSendWorkEdit.html?OperationType=1&linterid=' + checkStatus.data[0]["hmainid"] + '&HEntryID=' + checkStatus.data[0]["HEntryID"], "yes"]
                            , btn: ["确定", "取消"]
                            , btn1: function (index, laero) {
                                //刷新表格数据
                                DisPlay_HideColumn();
                                //更新表格缓存的数据
                                layer.close(index);//关闭弹窗
                            }
                        })
                    } else {
                        layer.msg('派工工序不能是转工序!');
                    }
                } else {
                    layer.msg('请选择一行数据编辑!');
                }
            }
 
            //#region 显示列数据 (主列表)
            function DisPlay_HideColumn() {
                $.ajax({
                    url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
                    type: "GET",
                    data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
                    success: function (data1) {
                        if (data1.data.length != 0) {
 
 
                            var dataCol = [];//数据库查询出的列数据
                            /*var titleData = ["hmainid", "hicmointerid", "HWorkShopID", "HDeptID", "HMaterID", "HMaterID2", "HUnitID", "HBillType", "hsubid"];//不需要显示的字段 可扩展*/
 
                            dataCol = data1.data[0].HGridString.split(',');
 
                            for (var i = 0; i < option.cols[0].length - 2; i++) {
                                if (dataCol[i]) {
                                    var dataCols = dataCol[i].split('|');
                                }
                                //隐藏列
                                if (dataCols[1] == 1) {
                                    option.cols[0][i + 1]["hide"] = true;
                                }
                                //设置列宽
                                if (dataCols[3] > 0) {
                                    option.cols[0][i + 1]["width"] = dataCols[3];
                                }
                                //设置内容字体大小
                                if (data1.data[0].HFontSize != 0) {
                                    option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
                                } else {
                                    option.cols[0][i + 1]["style"] = "font-size:100%";
                                }
                                //设置列宽
                                //if (data1.data[0].HColumnWidth != 0) {
                                //    option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
                                //} else {
                                //    option.cols[0][i + 1]["width"] = "";
                                //}
                                //显示列
                                if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
                                    option.cols[0][i + 1]["hide"] = false;
                                }
                                //字体所在位置(左 居中 右)
                                switch (dataCols[2]) {
                                    case "L":
                                        option.cols[0][i + 1]["align"] = "left";
                                        break;
                                    case "M":
                                        option.cols[0][i + 1]["align"] = "center";
                                        break;
                                    case "R":
                                        option.cols[0][i + 1]["align"] = "right";
                                        break;
                                }
                            }
 
                            //取消冻结列
                            for (var i = 1; i < option.cols[0].length - 1; i++) {
                                if (option.cols[0][i]["fixed"] != null) {
                                    option.cols[0][i]["fixed"] = null;
                                }
                                else {
                                    break;
                                }
                            }
                            //冻结列
                            if (data1.data[0].HFixCols != 0) {
                                for (var i = 0; i < data1.data[0].HFixCols; i++) {
                                    if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
                                        data1.data[0].HFixCols += 1;
                                    }
                                    option.cols[0][i + 1]["fixed"] = "left";
                                }
                            }
                            table.render(option);
                        } else {
                            table.render(option);
                        }
                    }, error: function () {
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                })
            }
            //#endregion
 
            //#region 显示列数据 (工艺流程)
            function DisPlay_HideColumn_Sec() {
                $.ajax({
                    url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
                    type: "GET",
                    data: { "HModName": HModName + "_Sec", "user": sessionStorage["HUserName"] },
                    success: function (data1) {
                        if (data1.data.length != 0) {
 
 
                            var dataCol = [];//数据库查询出的列数据
                            //var titleData = ["HMaterID", "HUnitID", "HICMOEmpID"];//不需要显示的字段 可扩展
 
                            dataCol = data1.data[0].HGridString.split(',');
 
                            for (var i = 0; i < option2.cols[0].length - 2; i++) {
                                if (dataCol[i]) {
                                    var dataCols = dataCol[i].split('|');
                                }
                                //隐藏列
                                if (dataCols[1] == 1) {
                                    option2.cols[0][i + 1]["hide"] = true;
                                }
                                //设置列宽
                                if (dataCols[3] > 0) {
                                    option2.cols[0][i + 1]["width"] = dataCols[3];
                                }
                                //设置内容字体大小
                                if (data1.data[0].HFontSize != 0) {
                                    option2.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
                                } else {
                                    option2.cols[0][i + 1]["style"] = "font-size:100%";
                                }
                                //设置列宽
                                //if (data1.data[0].HColumnWidth != 0) {
                                //    option2.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
                                //} else {
                                //    option2.cols[0][i + 1]["width"] = "";
                                //}
                                //显示列
                                if (dataCols[1] == 0 && $.inArray(option2.cols[0][i + 1]["title"], titleData2) == -1) {
                                    option2.cols[0][i + 1]["hide"] = false;
                                }
                                //字体所在位置(左 居中 右)
                                switch (dataCols[2]) {
                                    case "L":
                                        option2.cols[0][i + 1]["align"] = "left";
                                        break;
                                    case "M":
                                        option2.cols[0][i + 1]["align"] = "center";
                                        break;
                                    case "R":
                                        option2.cols[0][i + 1]["align"] = "right";
                                        break;
                                }
                            }
 
                            //取消冻结列
                            for (var i = 1; i < option2.cols[0].length - 1; i++) {
                                if (option2.cols[0][i]["fixed"] != null) {
                                    option2.cols[0][i]["fixed"] = null;
                                }
                                else {
                                    break;
                                }
                            }
                            //冻结列
                            if (data1.data[0].HFixCols != 0) {
                                for (var i = 0; i < data1.data[0].HFixCols; i++) {
                                    if ($.inArray(option2.cols[0][i + 1]["title"], titleData2) != -1) {
                                        data1.data[0].HFixCols += 1;
                                    }
                                    option2.cols[0][i + 1]["fixed"] = "left";
                                }
                            }
                            table.render(option2);
                        } else {
                            table.render(option2);
                        }
                    }, error: function () {
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                })
            }
            //#endregion
 
            //#region 隐藏列  显示列数据  (器具清单)
            //隐藏
            function get_HideColumn3() {
                var colName = "";
                for (var i = 1; i < option3.cols[0].length - 1; i++) {
                    colName += option3.cols[0][i]["title"] + ",";
                }
 
                colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI 进行编码
                layer.open({
                    type: 2
                    , skin: "layui-layer-rim" //加上边框
                    , title: "隐藏列设置"  //标题
                    , closeBtn: 1  //窗体右上角关闭 的 样式
                    , shift: 2 //弹出动画
                    , area: ["50%", "90%"] //窗体大小
                    , maxmin: true //设置最大最小按钮是否显示
                    , content: ['../../基础资料/隐藏列设置/Gy_GridView_Hide.html?HModName=' + HModName + "_Mod" + '&colName=' + colName, "yes"]
                    , btn: ["确定", "取消"]
                    , btn1: function (index, laero) {
                        //刷新表格数据
                        DisPlay_HideColumn_Mod();
                        //更新表格缓存的数据
                        layer.close(index);//关闭弹窗
                    }
                })
            }
 
            //显示
            function DisPlay_HideColumn_Mod() {
                $.ajax({
                    url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
                    type: "GET",
                    data: { "HModName": HModName + "_Mod", "user": sessionStorage["HUserName"] },
                    success: function (data1) {
                        if (data1.data.length != 0) {
 
 
                            var dataCol = [];//数据库查询出的列数据
                            /*var titleData = ["hmainid", "hicmointerid", "HWorkShopID", "HDeptID", "HMaterID", "HMaterID2", "HUnitID", "HBillType", "hsubid"];//不需要显示的字段 可扩展*/
 
                            dataCol = data1.data[0].HGridString.split(',');
 
                            for (var i = 0; i < option3.cols[0].length - 2; i++) {
                                if (dataCol[i]) {
                                    var dataCols = dataCol[i].split('|');
                                }
                                //隐藏列
                                if (dataCols[1] == 1) {
                                    option3.cols[0][i + 1]["hide"] = true;
                                }
                                //设置列宽
                                if (dataCols[3] > 0) {
                                    option3.cols[0][i + 1]["width"] = dataCols[3];
                                }
                                //设置内容字体大小
                                if (data1.data[0].HFontSize != 0) {
                                    option3.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
                                } else {
                                    option3.cols[0][i + 1]["style"] = "font-size:100%";
                                }
                                //设置列宽
                                //if (data1.data[0].HColumnWidth != 0) {
                                //    option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
                                //} else {
                                //    option.cols[0][i + 1]["width"] = "";
                                //}
                                //显示列
                                if (dataCols[1] == 0 && $.inArray(option3.cols[0][i + 1]["title"], titleData3) == -1) {
                                    option3.cols[0][i + 1]["hide"] = false;
                                }
                                //字体所在位置(左 居中 右)
                                switch (dataCols[2]) {
                                    case "L":
                                        option3.cols[0][i + 1]["align"] = "left";
                                        break;
                                    case "M":
                                        option3.cols[0][i + 1]["align"] = "center";
                                        break;
                                    case "R":
                                        option3.cols[0][i + 1]["align"] = "right";
                                        break;
                                }
                            }
 
                            //取消冻结列
                            for (var i = 1; i < option3.cols[0].length - 1; i++) {
                                if (option3.cols[0][i]["fixed"] != null) {
                                    option3.cols[0][i]["fixed"] = null;
                                }
                                else {
                                    break;
                                }
                            }
                            //冻结列
                            if (data1.data[0].HFixCols != 0) {
                                for (var i = 0; i < data1.data[0].HFixCols; i++) {
                                    if ($.inArray(option3.cols[0][i + 1]["title"], titleData3) != -1) {
                                        data1.data[0].HFixCols += 1;
                                    }
                                    option3.cols[0][i + 1]["fixed"] = "left";
                                }
                            }
                            table.render(option3);
                        } else {
                            table.render(option3);
                        }
                    }, error: function () {
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                })
            }
            //#endregion
 
            //#region 隐藏列  显示列数据  (工艺参数清单)
            //隐藏
            function get_HideColumn4() {
                var colName = "";
                for (var i = 1; i < option4.cols[0].length - 1; i++) {
                    colName += option4.cols[0][i]["title"] + ",";
                }
 
                colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI 进行编码
                layer.open({
                    type: 2
                    , skin: "layui-layer-rim" //加上边框
                    , title: "隐藏列设置"  //标题
                    , closeBtn: 1  //窗体右上角关闭 的 样式
                    , shift: 2 //弹出动画
                    , area: ["50%", "90%"] //窗体大小
                    , maxmin: true //设置最大最小按钮是否显示
                    , content: ['../../基础资料/隐藏列设置/Gy_GridView_Hide.html?HModName=' + HModName + "_Tech" + '&colName=' + colName, "yes"]
                    , btn: ["确定", "取消"]
                    , btn1: function (index, laero) {
                        //刷新表格数据
                        DisPlay_HideColumn_Tech();
                        //更新表格缓存的数据
                        layer.close(index);//关闭弹窗
                    }
                })
            }
 
            //显示
            function DisPlay_HideColumn_Tech() {
                $.ajax({
                    url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
                    type: "GET",
                    data: { "HModName": HModName + "_Tech", "user": sessionStorage["HUserName"] },
                    success: function (data1) {
                        if (data1.data.length != 0) {
 
 
                            var dataCol = [];//数据库查询出的列数据
                            /*var titleData = ["hmainid", "hicmointerid", "HWorkShopID", "HDeptID", "HMaterID", "HMaterID2", "HUnitID", "HBillType", "hsubid"];//不需要显示的字段 可扩展*/
 
                            dataCol = data1.data[0].HGridString.split(',');
 
                            for (var i = 0; i < option4.cols[0].length - 2; i++) {
                                if (dataCol[i]) {
                                    var dataCols = dataCol[i].split('|');
                                }
                                //隐藏列
                                if (dataCols[1] == 1) {
                                    option4.cols[0][i + 1]["hide"] = true;
                                }
                                //设置列宽
                                if (dataCols[3] > 0) {
                                    option4.cols[0][i + 1]["width"] = dataCols[3];
                                }
                                //设置内容字体大小
                                if (data1.data[0].HFontSize != 0) {
                                    option4.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
                                } else {
                                    option4.cols[0][i + 1]["style"] = "font-size:100%";
                                }
                                //设置列宽
                                //if (data1.data[0].HColumnWidth != 0) {
                                //    option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
                                //} else {
                                //    option.cols[0][i + 1]["width"] = "";
                                //}
                                //显示列
                                if (dataCols[1] == 0 && $.inArray(option4.cols[0][i + 1]["title"], titleData4) == -1) {
                                    option4.cols[0][i + 1]["hide"] = false;
                                }
                                //字体所在位置(左 居中 右)
                                switch (dataCols[2]) {
                                    case "L":
                                        option4.cols[0][i + 1]["align"] = "left";
                                        break;
                                    case "M":
                                        option4.cols[0][i + 1]["align"] = "center";
                                        break;
                                    case "R":
                                        option4.cols[0][i + 1]["align"] = "right";
                                        break;
                                }
                            }
 
                            //取消冻结列
                            for (var i = 1; i < option4.cols[0].length - 1; i++) {
                                if (option4.cols[0][i]["fixed"] != null) {
                                    option4.cols[0][i]["fixed"] = null;
                                }
                                else {
                                    break;
                                }
                            }
                            //冻结列
                            if (data1.data[0].HFixCols != 0) {
                                for (var i = 0; i < data1.data[0].HFixCols; i++) {
                                    if ($.inArray(option4.cols[0][i + 1]["title"], titleData4) != -1) {
                                        data1.data[0].HFixCols += 1;
                                    }
                                    option4.cols[0][i + 1]["fixed"] = "left";
                                }
                            }
                            table.render(option4);
                        } else {
                            table.render(option4);
                        }
                    }, error: function () {
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                })
            }
            //#endregion
 
            //#region 新增
            function set_AddNew() {
                layer.open({
                    type: 2
                    , skin: 'layui-layer-rim' //加上边框
                    , area: ['100%', '100%']
                    , title: '工序流转卡-新增'
                    , shift: 0//弹出动画
                    , content: '../工序流转卡/Sc_ProcessExchangeBill.html?OperationType=1&linterid=&HEntryID=&HSouceBillType='
                })
            }
            //#endregion
 
            //#region 编辑
            function set_ShowBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var linterid = data[0].hmainid;
                    //if (AllowLoadData(sSubStr) != false) {//非空验证
                    layer.open({
                        type: 2
                        , area: ['100%', '100%']
                        , title: '工序流转卡-编辑'
                        , shift: 0//弹出动画
                        , content: '../工序流转卡/Sc_ProcessExchangeBill.html?OperationType=3&linterid=' + linterid + '&HEntryID=&HSouceBillType='
                    })
                } else {
                    layer.msg('请选择一行数据编辑!');
                }
            }
            //#endregion
 
            //删除
            function set_DeleteBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var HInterID = data[0].hmainid.toString();
 
                    //逻辑删除方法
                    layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                        $.ajax({
                            type: "GET",
                            url: GetWEBURL() + "/Sc_ProcessExchangeBill/DeltetProcessExchangeBillByID", //方法所在页面和方法名
                            data: { "HInterID": HInterID, "HPRDORGID": sessionStorage["OrganizationID"], "user": sessionStorage["HUserName"] },
                            success: function (result) {
                                if (result.count == 1) {
                                    layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                        // 得到frame索引
                                        var index = layer.getFrameIndex(window.name);
                                        //关闭当前frame
                                        layer.close(index);
                                        //修改为功后刷新界面
                                        window.location.reload();
                                    });
 
                                } else {
                                    layer.alert(result.code + result.Message, { icon: 5 });
                                }
                            }, error: function () {
                                layer.alert("接口请求失败!", { icon: 5 });
                            }
                        });
                    })
                }
                else {
                    layer.msg('请选择一行数据删除!');
                }
            }
 
            //拆分
            function set_cf() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var linterid = data[0].hmainid;
                    //if (AllowLoadData(sSubStr) != false) {//非空验证
                    layer.open({
                        type: 2
                        , area: ['100%', '100%']
                        , title: '工序列表-编辑'
                        , shift: 0//弹出动画
                        , content: '../工序流转卡/Sc_ProcessExchangeBill_CF.html?OperationType=1&linterid=' + linterid + '&HEntryID=&HSouceBillType='
                    })
                } else {
                    layer.msg('请选择一行数据编辑!');
                }
            }
 
            //预览
            function get_view() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    layer.open({
                        type: 2
                        , area: ['50%', '50%']
                        , title: '打印模版选择'
                        , shade: 0.6 //遮罩透明度
                        , maxmin: false //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + data[0].hmainid.toString() + QJQD + '&MyMsg=' + data[0].hmainid.toString() + '&Type=HProcessExchange', 'yes']
                        , resize: false
                    })
                }
                else {
                    layer.msg('请选择一行数据打印!');
                }
            }
            //打印
            function get_print() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    layer.open({
                        type: 2
                        , area: ['50%', '50%']
                        , title: '打印模版选择'
                        , shade: 0.6 //遮罩透明度
                        , maxmin: false //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + data[0].hmainid.toString() +","+ QJQD + '&MyMsg=' + data[0].hmainid.toString() + '&Type=HProcessExchange', 'yes']
                        , resize: false
                    })
                }
                else {
                    layer.msg('请选择一行数据打印!');
                }
            }
 
            //工序出站汇报单
            function set_StationOut() {
                var checkStatus = table.checkStatus('mainTable2')
                    , data = checkStatus.data;
                if (data.length == 1) {
                    var HProcNo = data[0].流水号.toString();
 
                    if (HProcNo == "9999") {
                        return layer.msg("流水号不能为转工序流水号,请重新选择!");
                    }
                    else {
                        layer.open({
                            type: 2
                            , area: ['100%', '100%']
                            , title: '工序出站汇报单'
                            , shift: 0//弹出动画
                            , content: '../../车间管理/工序出站汇报单/Cj_StationOutBill.html?OperationType=2&HBillNo=' + HBillNo + '&HProcNo=' + HProcNo
                        })
                    }
 
                } else {
                    layer.msg('请选择一行工序数据下推!');
                }
            }
 
            //工序进站接收单
            function get_StationIn() {
                var checkStatus = table.checkStatus('mainTable2')
                    , data = checkStatus.data;
                if (data.length == 1) {
                    var HProcNo = data[0].流水号.toString();
 
                    if (HProcNo == "9999") {
                        return layer.msg("流水号不能为转工序流水号,请重新选择!");
                    }
                    else {
                        layer.open({
                            type: 2
                            , area: ['100%', '100%']
                            , title: '工序进站接收单'
                            , shift: 0//弹出动画
                            , content: '../../车间管理/工序进站接收单/Cj_StationInBill.html?OperationType=2&HBillNo=' + HBillNo + '&HProcNo=' + HProcNo
                        })
                    }
 
                } else {
                    layer.msg('请选择一行工序数据下推!');
                }
            }
 
            //#region 刷新
            function get_Refresh() {
                set_ClearQuery();
                get_Display(sWhere);
            }
            //#endregion
            //以上是layui模块
        });
 
 
 
 
    </script>
 
</body>
</html>