wtt
2025-03-17 980207d432914dce2d63a4358db2a5fcdcc7434f
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
<!DOCTYPE html>
<html>
<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/zgqCustom/zgqCustom.js"></script>
    <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="../../CreateControl.js"></script>
</head>
<body>
    <div class="layui-fluid" style="padding: 0;">
        <div class="layui-card" style="padding: 2px;background-color: #efefef;">
            <div class="layui-card-body" style="padding: 1px;">
                <form class="layui-form" action="" lay-filter="formData" style="background-color:white;">
                    <div style="padding: 10px;">
                        <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">保存</button>
                        <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnRefresh" id="btnRefresh">刷新</button>
                        <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnExit" id="btnExit">退出</button>
                    </div>
                    <h1 style="text-align:center;margin-bottom:25px;"><b>关键件绑定</b></h1>
                    <div class="layui-form-item" style="padding-top: 3px;">
                        <div class="layui-row" style="text-align: center;">
                            <div class="layui-col-xs3 layui-inline" style="margin-left:140px;">
                                <label class="layui-form-label">流转卡</label>
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input" name="HProcessExchangeBillNo" id="HProcessExchangeBillNo" style="width: 300px;" onfocus="this.select();">
                                    <input type="hidden" name="HProcessExchangeInterID" id="HProcessExchangeInterID" value="0">
                                    <input type="hidden" name="HProcessExchangeEntryID" id="HProcessExchangeEntryID" value="0">
                                </div>
                            </div>
                            <div class="layui-col-xs3 layui-inline">
                                <label class="layui-form-label">产品码</label>
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input" name="HBarCode_P" id="HBarCode_P" style="width: 300px;" onfocus="this.select();">
                                </div>
                            </div>
                            <button class="layui-btn layui-btn-normal" style="float:left;margin-left:-15px;" type="button" lay-submit="" lay-filter="btnNextProc" id="btnNextProc">换产品</button>
                            <div class="layui-col-xs3 layui-inline">
                                <label class="layui-form-label">配件码</label>
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input" name="HBarCode" id="HBarCode" style="width: 300px;" onfocus="this.select();">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-tab" lay-filter="tab-POStockInBill" style="width: 45%; float: left; height:calc(43vh);background-color:white;">
                        <div class="layui-tab-content">
                            <!--基本信息-->
                            <div class="layui-tab-item layui-show">
                                <div class="layui-form-item" style="padding-top: 10px;">
                                    <div class="layui-row">
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">日期</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="date" class="layui-input" lay-verify="HDate" name="HDate" id="HDate" style="padding-left: 80px;width:184px;">
                                            </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="HBillNo" lay-verify="HBillNo" id="HBillNo" style="background-color:#EDEDED;" readonly>
                                                <input type="hidden" name="HInterID" id="HInterID" lay-verify="HInterID">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <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="HICMOBillNo" lay-verify="HICMOBillNo" id="HICMOBillNo" style="        background-color: #EDEDED;" readonly>
                                                <input type="hidden" name="HICMOInterID" id="HICMOInterID" lay-verify="HICMOInterID">
                                                <input type="hidden" name="HICMOEntryID" id="HICMOEntryID" lay-verify="HICMOEntryID">
                                            </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="HSeOrderBillNo" lay-verify="HSeOrderBillNo" id="HSeOrderBillNo" style="        background-color: #EDEDED;" readonly>
                                                <input type="hidden" name="HSeOrderInterID" id="HSeOrderInterID" lay-verify="HSeOrderInterID">
                                                <input type="hidden" name="HSeOrderEntryID" id="HSeOrderEntryID" lay-verify="HSeOrderEntryID">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <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="HMaterNumber" lay-verify="HMaterNumber" id="HMaterNumber" style="        background-color: #EDEDED;" readonly>
                                                <input type="hidden" name="HMaterID" id="HMaterID" lay-verify="HMaterID">
                                            </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="HMaterName" lay-verify="HMaterName" id="HMaterName" style="        background-color: #EDEDED;" readonly>
                                            </div>
                                        </div>                                      
                                    </div>
                                    <div class="layui-row">
                                        <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="HMaterModel" lay-verify="HMaterModel" id="HMaterModel" style="        background-color: #EDEDED;" readonly>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">生产资源</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" name="HSourceName" lay-verify="HSourceName" id="HSourceName" style="background-color: #EDEDED; width: 60%; display: inline-block;" readonly>
                                                <input type="hidden" name="HSourceID" id="HSourceID" lay-verify="HSourceID" value="0">
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHSource" id="btnHSource" style="padding: 0 10px;float: right;margin-right: 3px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px; padding: 9px 18px;">生产车间</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" lay-verify="HDeptName" name="HDeptName" id="HDeptName" style="background-color: #EDEDED; width: 60%; display: inline-block;" readonly>
                                                <input type="hidden" class="layui-input" lay-verify="HDeptID" name="HDeptID" id="HDeptID">
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHDept" id="btnHDept" style="padding: 0 10px;float: right;margin-right: 3px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px; padding: 9px 18px;">生产班组</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" name="HGroupName" id="HGroupName" lay-verify="HGroupName" value="" style="background-color:#EDEDED;width: 60%;display: inline-block;" readonly>
                                                <input type="hidden" class="layui-input" name="HGroupID" lay-verify="HGroupID" id="HGroupID" value="0">
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHGroup" id="btnHGroup" style="padding: 0 10px;float: right;margin-right: 3px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">操作员</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" lay-verify="HEmpName" name="HEmpName" id="HEmpName" value="" style="background-color:#EDEDED;width: 60%;display: inline-block;" readonly>
                                                <input type="hidden" class="layui-input" lay-verify="HEmpID" name="HEmpID" id="HEmpID" value="0">
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHEmp" id="btnHEmp" style="padding: 0 10px;float: right;margin-right: 3px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">质检员</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" lay-verify="HCheckEmpName" name="HCheckEmpName" id="HCheckEmpName" value="" style="background-color:#EDEDED;width: 60%;display: inline-block;" readonly>
                                                <input type="hidden" class="layui-input" lay-verify="HCheckEmpID" name="HCheckEmpID" id="HCheckEmpID" value="0">
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHCheckEmp" id="btnHCheckEmp" style="padding: 0 10px;float: right;margin-right: 3px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">工序</label>
                                            <div class="layui-input-block" style="margin-left: 77px;">
                                                <input type="text" class="layui-input" name="HProcName" lay-verify="HProcName" id="HProcName" style="background-color: #EDEDED; width: 60%; display: inline-block;" readonly>
                                                <input type="hidden" name="HProcID" id="HProcID" lay-verify="HProcID" value="0">
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHProc" id="btnHProc" style="padding: 0 10px;float: right;margin-right: 3px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                            </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="HProcNo" lay-verify="HProcNo" id="HProcNo">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div style="width: 0.2%; float: left; height: calc(43vh);background-color:#2baaca"></div>
                    <div class="layui-tab" lay-filter="tab-POStockInBill" style="width: 54.8%; float: left; height:calc(43vh);background-color:white;">
                        <div style="width:100px;height:23px; background: linear-gradient(-135deg, transparent 30px, #2baaca 0);"><span style="color:aliceblue;">绑定信息</span></div>
                        <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
                    </div>
                    <div class="layui-tab" lay-filter="tab-POStockInBill" style="width: 99.8%; float: left; height:calc(100vh);background-color:white;margin-left:0.2%">
                        <div style="width:100%;height:23px; background-color: #2baaca;text-align:center;font-weight:bold"><span style="color:aliceblue;">历史记录</span></div>
                        <table class="layui-hide" id="detailTable" lay-filter="detailTable"></table>
                    </div>
                </form>
            </div>
        </div>
    </div>
</body>
</html>
<script type="text/html" id="barDemo">
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
<script>
    layui.config({
        base: '../../../layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
        //#region 公共变量
        var $ = layui.$
            , admin = layui.admin
            , layer = layui.layer
            , table = layui.table
            , form = layui.form
            , element = layui.element;
 
        //定义全局变量
        var HModName = "Sc_KeyElementBinding";
        var option = [];
        var option_detail = [];
        var setIntervalIndex = null;
        //#endregion
 
        //#region 进入页面即加载
        set_ClearBill();
 
        //#endregion
 
        //#region 触发事件:包括form.on(){}格式的所有点击事件、选择事件等
 
        //#region 流转卡回车方法
        $('#HProcessExchangeBillNo').on('keydown', function (event) {
            var HBarCode = $('#HProcessExchangeBillNo').val();
            if (event.keyCode == 13) {
                if (!HBarCode) {
                    layer.msg("流转卡不能为空!")
                    return;
                }
                //查询流转卡相关信息
                get_ProcessExchangeList(HBarCode);
            }
        });
        //#endregion
 
        //#region 产品码回车方法
        $('#HBarCode_P').on('keydown', function (event) {
            var HBarCode = $('#HBarCode_P').val();
            var HProcessExchangeBillNo = $('#HProcessExchangeBillNo').val();
            if (event.keyCode == 13) {
                if (!HProcessExchangeBillNo) {
                    layer.msg("请先扫流转卡!")
                    return;
                } else {
                    if (!HBarCode) {
                        layer.msg("条形码不能为空!")
                        return;
                    } else {
                        //if (HBarCode.match(/[^\x00-\xff]/g) != null) {
                        //    layer.alert("必须是半角字符!", { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                        //    return;
                        //}
                    }
                }
                txtHProductBarCode_KeyDown(HBarCode);
            }
        });
        //#endregion
 
        //#region 配件回车方法
        $('#HBarCode').on('keydown', function (event) {
            var HBarCode = $('#HBarCode').val();
            var HProcessExchangeBillNo = $('#HProcessExchangeBillNo').val();
            var HBarCode_P = $('#HBarCode_P').val();
            if (event.keyCode == 13) {
                if (!HProcessExchangeBillNo || !HBarCode_P) {
                    layer.msg("请先扫流转卡或产品码!")
                    return;
                } else {
                    if (!HBarCode) {
                        layer.msg("配件不能为空!")
                        return;
                    }
                }
                txtHPartsBarCode_KeyDown(HBarCode);
            }
        });
        //#endregion
 
        //绑定信息行内事件
        table.on('tool(mainTable)', function (obj) {
            set_GridDelete(obj);   //行内删除
        });
 
        //#region 基础资料按钮
        //选择质检员
        form.on('submit(btnHCheckEmp)', function () {
            btnHCheckEmp();
        });
 
        //选择操作员
        form.on('submit(btnHEmp)', function () {
            btnHEmp();
        });
 
        //选择生产资源
        form.on('submit(btnHSource)', function () {
            btnHSource();
        });
 
        //选择生产班组按钮
        form.on('submit(btnHGroup)', function () {
            btnHGroup();
        });
 
        //选择生产车间按钮
        form.on('submit(btnHDept)', function () {
            btnHDept();
        });
 
        //选择工序按钮
        form.on('submit(btnHProc)', function () {
            btnHProc();
        });
        //#endregion
 
        //保存
        form.on('submit(btnSave)', function (data) {
            if (AllowLoadData(data)) {
                set_SaveBill(data);
            }           
        });
 
        //换产品
        form.on('submit(btnNextProc)', function (data) {
            for (var i = 0; i < option.data.length; i++) {
                if (option.data[i].HBindingQty < 1 || option.data[i].HBarCode == "") {
                    layer.alert("第<span style='color: red;'>" + (i + 1) + "</span>行,配件 <span style='color: blue;'>" + option.data[i].HMaterName + "</span> 未绑定齐整!")
                    return;
                }
            }
 
            //保存关键件
            if (AllowLoadData(data)) {
                set_SaveBill(data);
            }
 
            //启用输入框,背景色恢复
            $("#HBarCode_P").removeAttr("disabled"); //产品码文本框启用
            $("#HBarCode_P").css('background', '#FFFFFF')//产品码文本框背景色恢复
            //清空文本框内容
            $("#HBarCode_P").val("");//产品码文本框内容清空
            //光标跳转到产品码文本框上
            $("#HBarCode_P").focus();
            //把每个产品的扫码绑定记录迁移到下方历史记录明细网格
            for (var i = 0; i < option.data.length; i++) {
                option_detail.data.push(option.data[i])
            }
            table.render(option_detail);
            //清除绑定信息网格扫码记录
            option.data = [];
            table.render(option);
 
            //重新获取单据号
            $.ajax({
                url: GetWEBURL() + "/Web/GetMAXNumPDA",
                type: "GET",
                data: { "HBillType": '3727' },
                success: function (d) {
                    $("#HInterID").val(d.data[0].HInterID);
                    $("#HBillNo").val(d.data[0].HBillNo);
                    $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));  //默认为当前日期
                    //重新启用保存按钮
                    $("#btnSave").removeClass("layui-btn-disabled").attr("disabled", false);
                }
            });           
 
            //历史绑定记录查询
            //get_Display();
        });        
 
        //刷新按钮
        form.on('submit(btnRefresh)', function () {
            layer.confirm('刷新后页面数据将消失,是否确认刷新?', { icon: 3, title: '提示' }, function (index) {
                location.replace('Sc_KeyElementBinding.html');
            });
        })
 
        //退出
        form.on('submit(btnExit)', function (data) {
            Pub_Close(2);
        });
        //#endregion
 
        //#region 此页面所有的方法
 
        //#region 初始化界面
        function set_ClearBill() {
            //进入页面默认光标在流转卡上
            $("#HProcessExchangeBillNo").focus();
 
            //获取单据号
            $.ajax({
                url: GetWEBURL() + "/Web/GetMAXNumPDA",
                type: "GET",
                data: { "HBillType": '3727' },
                success: function (d) {
                    $("#HInterID").val(d.data[0].HInterID);
                    $("#HBillNo").val(d.data[0].HBillNo);
                    $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));  //默认为当前日期
                }
            });
 
            //#region 基础资料信息根据用户绑定带出
            $("#HSourceID").val(sessionStorage["HSourceID"]);//生产资源ID
            $("#HSourceName").val(sessionStorage["HSource"]);//生产资源
            //$("#HDeptID").val(sessionStorage["HDeptID"]);//生产车间ID
            //$("#HDeptName").val(sessionStorage["HDept"]);//生产车间
            $("#HGroupID").val(sessionStorage["HGroupID"]);//班组ID
            $("#HGroupName").val(sessionStorage["HGroup"]);//班组
            $("#HCheckEmpID").val(sessionStorage["HCheckEmpID"]);//质检员ID
            $("#HCheckEmpName").val(sessionStorage["HCheckEmpName"]);//质检员ID
            $("#HEmpID").val(sessionStorage["HEmpID"]);//操作员ID
            $("#HEmpName").val(sessionStorage["HEmpName"]);//操作员
            //#endregion
 
            //初始化绑定信息表格
            set_InitGrid();           
        }
        //#endregion
 
        //#region 初始化表格
        function set_InitGrid() {
            //本次绑定信息
            option = {
                elem: '#mainTable'
                , page: false
                , height: 'full-500'
                , loading: false
                , limit: 200
                , cols: [[ //绑定信息表
                    { type: 'numbers', title: '序号', width: 50 }
                    , { field: 'HBarCode_P', title: '产品码', width: 265 }
                    , { field: 'HBarCode', title: '配件码', width: 265 }
                    , { field: 'HPartsQty', title: '配件数', width: 72 }
                    , { field: 'HBindingQty', title: '已绑数', width: 72 }
                    , { field: 'HMaterID', title: 'HMaterID', hide: true }
                    , { field: 'HMaterNumber', title: '物料代码', width: 160 }
                    , { field: 'HMaterName', title: '物料名称', width: 160 }
                    , { field: 'HMaterModel', title: '规格型号', width: 160, hide: true }
                    , { field: 'HBatchNo', title: '批次', width: 160, hide: true }
                    , { field: 'HSourceID', title: 'HSourceID', width: 160, hide: true }
                    , { field: 'HEquipID', title: 'HEquipID', width: 160, hide: true }
                    , { field: 'HGroupID', title: 'HGroupID', width: 160, hide: true }
                    , { field: 'HWorkerID', title: 'HWorkerID', width: 160, hide: true }
                    , { field: 'HScanDate', title: 'HScanDate', width: 160, hide: true }
                    , { field: 'HSourceInterID', title: 'HSourceInterID', width: 160, hide: true }
                    , { field: 'HSourceEntryID', title: 'HSourceEntryID', width: 160, hide: true }
                    , { field: 'HSourceBillNo', title: 'HSourceBillNo', width: 160, hide: true }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 66 }
                ]]
            }
            //初始表格数据
            var rowdata = [{
                "HBarCode_P": "", "HBarCode": "", "HPartsQty": 0, "HBindingQty": 0, "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HMaterModel": ""
                , "HBatchNo": "", "HSourceID": 0, "HEquipID": 0, "HGroupID": 0, "HWorkerID": 0, "HScanDate": new Date(), "HSourceInterID": 0
                , "HSourceEntryID": 0, "HSourceBillNo": ""
            }];
            option.data = [];
            table.render(option);
 
            //历史绑定信息
            option_detail = {
                elem: '#detailTable'
                , page: false
                , height: 'full-30'
                , loading: false
                , limit: 2000
                , cols: [[ //历史记录表
                    { type: 'numbers', title: '序号', width: 50 }
                    , { field: 'HBarCode_P', title: '产品码', width: 400 }
                    , { field: 'HBarCode', title: '配件码', width: 400 }
                    , { field: 'HPartsQty', title: '配件数', width: 90 }
                    , { field: 'HBindingQty', title: '已绑数', width: 72 }
                    , { field: 'HMaterID', title: 'HMaterID', hide: true }
                    , { field: 'HMaterNumber', title: '物料代码', width: 260 }
                    , { field: 'HMaterName', title: '物料名称', width: 260 }
                    , { field: 'HMaterModel', title: '规格型号', width: 160, hide: true }
                    , { field: 'HBatchNo', title: '批次', width: 200, hide: true }
                    , { field: 'HSourceID', title: 'HSourceID', width: 160, hide: true }
                    , { field: 'HEquipID', title: 'HEquipID', width: 160, hide: true }
                    , { field: 'HGroupID', title: 'HGroupID', width: 160, hide: true }
                    , { field: 'HWorkerID', title: 'HWorkerID', width: 160, hide: true }
                    , { field: 'HScanDate', title: 'HScanDate', width: 160, hide: true }
                    , { field: 'HSourceInterID', title: 'HSourceInterID', width: 160, hide: true }
                    , { field: 'HSourceEntryID', title: 'HSourceEntryID', width: 160, hide: true }
                    , { field: 'HSourceBillNo', title: 'HSourceBillNo', width: 160, hide: true }
                ]]
            }
 
            option_detail.data = [];
            table.render(option_detail);
        }
        //#endregion
 
        //#region 保存方法
        function set_SaveBill(data) {
            //把最后一个产品的绑定信息写入到历史记录明细网格
            //for (var i = 0; i < option.data.length; i++) {
            //    option_detail.data.push(option.data[i])
            //}
 
            if (data.field.HMaterName.indexOf("\"") != -1 || data.field.HMaterName.indexOf(";") != -1) {
                data.field.HMaterName = data.field.HMaterName.replace("\"", "”").replace(";", ";").replace("\"", "”").replace(";", ";").replace("\"", "”").replace(";", ";").replace("\"", "”").replace(";", ";")
            }
            if (data.field.HMaterModel.indexOf("\"") != -1 || data.field.HMaterModel.indexOf(";") != -1) {
                data.field.HMaterModel = data.field.HMaterModel.replace("\"", "”").replace(";", ";").replace("\"", "”").replace(";", ";").replace("\"", "”").replace(";", ";").replace("\"", "”").replace(";", ";")
            }
            for (var i = 0; i < option.data.length; i++) {
                if (option.data[i].HMaterName.indexOf("\"") != -1 || option.data[i].HMaterName.indexOf(";") != -1) {
                    option.data[i].HMaterName = option.data[i].HMaterName.replace("\"", "”").replace(";", ";").replace("\"", "”").replace(";", ";").replace("\"", "”").replace(";", ";").replace("\"", "”").replace(";", ";")
                }
                if (option.data[i].HMaterModel.indexOf("\"") != -1 || option.data[i].HMaterModel.indexOf(";") != -1) {
                    option.data[i].HMaterModel = option.data[i].HMaterModel.replace("\"", "”").replace(";", ";").replace("\"", "”").replace(";", ";").replace("\"", "”").replace(";", ";").replace("\"", "”").replace(";", ";")
                }
            }
 
            //序列化表头信息和子表信息            
            var sMainStr = JSON.stringify(data.field);
            var sSubStr = JSON.stringify(option.data);
            //拼接参数
            var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"];
 
            var index = layer.load();
            $.ajax({
                type: "POST",
                url: GetWEBURL() + "/Sc_KeyElementBinding/Save", //方法所在页面和方法名
                async: true,
                data: { "msg": sMainSub },
                dataType: "json",
                success: function (data) {
                    if (data.count == 1) { // 说明验证成功了,
                        layer.msg(data.Message, { icon: 1, time: 1000 });
 
                        $("#btnSave").addClass("layui-btn-disabled").attr("disabled", true);
                        layer.close(index);
                    }
                    else {
                        layer.alert(data.Message, { icon: 5 });
                        layer.close(index);
                    }
                },
                error: function (err) {
                    layer.alert("错误:" + err, { icon: 5 });
                    layer.close(index);
                }
            });
        }
        //#endregion
 
        //查询
        function get_Display() {
            var HBillNo = $("#HBillNo").val();
            var ajaxLoad = layer.load();
            //进入页面显示的缓存列表
            $.ajax({
                url: GetWEBURL() + '/Sc_KeyElementBinding/HistoryInfo_Temp',
                type: "GET",
                data: { "HBillNo": HBillNo, "user": sessionStorage["HUserName"] },
                success: function (data1) {
                    if (data1.count == 1) {
 
                        layer.close(ajaxLoad);
                    } else {
                        layer.close(ajaxLoad);
                        layer.alert(data1.code + data1.Message, { icon: 5 });
                    }
                }, error: function () {
                    layer.close(ajaxLoad);
                    layer.alert("接口请求失败!", { icon: 5 });
                }
            });
        }
 
        //流转卡回车查询(查询流转卡相关信息)
        function get_ProcessExchangeList(HBarCode) {
            var ajaxLoad = layer.load();
            $.ajax({
                url: GetWEBURL() + '/Sc_KeyElementBinding/GetProcessExchangeList',
                async: false,
                type: "GET",
                data: { "HBillNo": HBarCode, "user": sessionStorage["HUserName"] },
                success: function (data1) {
                    if (data1.count == 1) {
                        var data = data1.data;
 
                        $("#HICMOInterID").val(data[0].HICMOInterID);
                        $("#HICMOEntryID").val(data[0].HICMOEntryID);
                        $("#HICMOBillNo").val(data[0].生产订单号);
                        $("#HSeOrderBillNo").val(data[0].销售订单号);
                        $("#HMaterID").val(data[0].HMaterID);
                        $("#HMaterNumber").val(data[0].物料代码);
                        $("#HMaterName").val(data[0].物料名称);
                        $("#HMaterModel").val(data[0].规格型号);
                        $("#HDeptID").val(data[0].HDeptID);
                        $("#HDeptName").val(data[0].生产车间名称);
 
 
                        //禁用输入框,背景色变灰
                        $("#HDate").prop('disabled', true);//禁用
                        $("#HDate").css('background', '#EDEDED')//背景色变灰
                        $("#HProcessExchangeBillNo").attr('disabled', 'disabled')//禁用
                        $("#HProcessExchangeBillNo").css('background', '#EDEDED')//背景色变灰
                        $("#HProcNo").attr('disabled', 'disabled')//禁用
                        $("#HProcNo").css('background', '#EDEDED')//背景色变灰
                        //按钮禁用
                        $("#btnHSource").addClass("layui-btn-disabled").attr("disabled", true);//生产资源按钮禁用
                        $("#btnHDept").addClass("layui-btn-disabled").attr("disabled", true);//生产车间按钮禁用
                        $("#btnHGroup").addClass("layui-btn-disabled").attr("disabled", true);//生产班组按钮禁用
                        $("#btnHEmp").addClass("layui-btn-disabled").attr("disabled", true);//操作员按钮禁用
                        $("#btnHCheckEmp").addClass("layui-btn-disabled").attr("disabled", true);//质检员按钮禁用
                        $("#btnHProc").addClass("layui-btn-disabled").attr("disabled", true);//工序按钮禁用
 
                        //光标跳转至产品码输入框位置
                        $("#HBarCode_P").focus();
 
                        layer.close(ajaxLoad);
                    } else {
                        layer.close(ajaxLoad);
                        layer.alert(data1.code + data1.Message, { icon: 5 });
                    }
                }, error: function () {
                    layer.close(ajaxLoad);
                    layer.alert("接口请求失败!" + data1.Message, { icon: 5 });
                }
            });
        }
 
        //产品码回车查询
        function txtHProductBarCode_KeyDown(HBarCode) {
            var HProcExchBillNo = $("#HProcessExchangeBillNo").val();
            var HBillNo = $("#HBillNo").val();
            var indexs = layer.load();
            $.ajax({
                type: "GET",
                url: GetWEBURL() + "/Sc_KeyElementBinding/ProductBardCode_JX",
                async: false,
                data: { "HBarCode": HBarCode, "HProcExchBillNo": HProcExchBillNo, "HBillNo": HBillNo, "user": sessionStorage["HUserName"], "HOrgID": sessionStorage["OrganizationID"] },
                dataType: "json",
                success: function (data1) {
                    if (data1.count == 1) {
                        var data = data1.data
                        var rowarr = [];
 
                        for (var i = 0; i < data.length; i++) {
                            rowarr.push({
                                "HBarCode_P": data[i].产品码, "HPartsBarCode": "", "HPartsQty": data[i].分子子项用量, "HBindingQty": 0
                                , "HMaterID": data[i].子项物料ID, "HMaterNumber": data[i].子项物料代码, "HMaterName": data[i].子项物料名称, "HMaterModel": data[i].子项规格型号, "HBatchNo": ""
                                , "HSourceID": $("#HSourceID").val(), "HEquipID": 0, "HGroupID": $("#HGroupID").val(), "HWorkerID": $("#HEmpID").val()
                                , "HScanDate": new Date(), "HSourceInterID": $("#HICMOInterID").val()
                                , "HSourceEntryID": $("#HICMOEntryID").val(), "HSourceBillNo": $("#HICMOBillNo").val()
                            });
                        }
 
                        option.data = rowarr;
 
                        table.render(option);
 
                        layer.close(indexs);
 
                        //禁用输入框,背景色变灰
                        $("#HBarCode_P").attr('disabled', 'disabled')//禁用
                        $("#HBarCode_P").css('background', '#EDEDED')//背景色变灰
                        //光标跳转到配件码文本框上
                        $("#HBarCode").focus();
                    }
                    else {
                        layer.close(indexs);
                        layer.msg(data1.Message);
                    }
                },
                error: function (err) {
                    layer.close(indexs);
                    layer.msg("错误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                }
            });
        }
 
        //配件码回车查询
        function txtHPartsBarCode_KeyDown(HBarCode) {
            var indexs = layer.load();
            var HProcExchBillNo = $("#HProcessExchangeBillNo").val();
            var HBillNo = $("#HBillNo").val();
            $.ajax({
                type: "GET",
                url: GetWEBURL() + "/Sc_KeyElementBinding/PartsBardCode_JX",
                async: false,
                data: { "HBarCode": HBarCode, "HProcExchBillNo": HProcExchBillNo, "HBillNo": HBillNo, "user": sessionStorage["HUserName"], "HOrgID": sessionStorage["OrganizationID"] },
                dataType: "json",
                success: function (data1) {
                    if (data1.count == 1) {
                        var data = data1.data
 
                        for (var i = 0; i < option.data.length; i++) {
                            if (data[0].HMaterID == option.data[i].HMaterID && option.data[i].HBindingQty < option.data[i].HPartsQty) {
                                option.data[i].HMaterID = data[0].HMaterID
                                option.data[i].HMaterNumber = data[0].物料代码
                                option.data[i].HMaterName = data[0].物料名称
                                option.data[i].HMaterModel = data[0].规格型号
                                option.data[i].HBarCode = data[0].配件码
                                option.data[i].HBindingQty = option.data[i].HBindingQty + 1
 
                                break;
                            } else if (data[0].HMaterID == option.data[i].HMaterID && i == option.data.length - 1) {
                                layer.msg("第" + (i + 1) + "行已全部绑定,请勿超量绑定");
                            } else if (data[0].HMaterID != option.data[i].HMaterID && i == option.data.length - 1) {
                                layer.msg("所扫配件码:" + HBarCode + " ,对应物料不在生产用料清单中!");
                            }
                        }
 
                        //option.data = rowarr;
 
                        table.render(option);
                        //光标跳转到配件码文本框上
                        $("#HBarCode").focus();
                        $("#HBarCode").val("");
 
                        layer.close(indexs);
                    }
                    else {
                        layer.close(indexs);
                        layer.msg(data1.Message);
                    }
                },
                error: function (err) {
                    layer.close(indexs);
                    layer.msg("错误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                }
            });
        }
 
        //表格行内事件删除
        function set_GridDelete(obj) {
            var data = obj.data;
            var rowIndex = $(obj.tr).attr("data-index");
            if (obj.event === 'del') {
                layer.confirm('真的删除行吗?', function (index) {
                    
                    var wait = layer.load();
                    //删除临时表数据
                    $.ajax({
                        url: GetWEBURL() + 'Deltet_Sc_AssemblyBill_BindBarCodeTemp',
                        type: "GET",
                        data: { "HBillNo": $("#HBillNo").val(), "HBarCode": option.data[rowIndex].HBarCode , "user": sessionStorage["HUserName"] },
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message,{ icon: 1 ,time: 500}, function () {
                                    //关闭当前frame
                                    layer.close(wait);
                                });
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                                layer.close(wait);
                            }
                        }, error: function () {
                            layer.alert("接口请求失败!", { icon: 5 });
                            layer.close(wait);
                        }
                    });
 
 
                    //刷新表格数据
                    option.data[rowIndex].HBarCode = "";
                    option.data[rowIndex].HBindingQty = 0;
                    //option.data[rowIndex].HMaterID = 0;
                    option.data[rowIndex].HMaterNumber = "";
                    option.data[rowIndex].HMaterName = "";
                    option.data[rowIndex].HMaterModel = "";
                    option.data[rowIndex].HBarCode = "";
 
                    table.render(option);
                    layer.close(index);                    
                });
            }
        }
 
        //#region 基础资料选择弹框
        //质检员选择页面
        function btnHCheckEmp() {
            layer.open({
                type: 2//弹窗类型
                , skin: 'layui-layer-rim' //加上边框
                , area: ['90%', '90%']//大小
                , title: '质检员列表'//标题
                , shift: 2//弹出动画
                , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html', 'yes']
                , btn: ['确定', '取消']
                , btn1: function (index, layero) {//按钮【按钮一】的回调
                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                    if (checkStatus.data.length === 0) {
                        return layer.msg('请选择数据');
                    }
                    //获取数据
                    $("#HCheckEmpID").val(checkStatus.data[0].HItemID);
                    $("#HCheckEmpName").val(checkStatus.data[0].职员名称);
 
                    layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                }
            })
        }
 
        //操作员选择页面
        function btnHEmp() {
            layer.open({
                type: 2//弹窗类型
                , skin: 'layui-layer-rim' //加上边框
                , area: ['90%', '90%']//大小
                , title: '操作员列表'//标题
                , shift: 2//弹出动画
                , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html', 'yes']
                , btn: ['确定', '取消']
                , btn1: function (index, layero) {//按钮【按钮一】的回调
                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                    if (checkStatus.data.length === 0) {
                        return layer.msg('请选择数据');
                    }
                    //获取数据
                    $("#HEmpID").val(checkStatus.data[0].HItemID);
                    $("#HEmpName").val(checkStatus.data[0].职员名称);
 
                    layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                }
            })
        }
 
        //生产资源选择页面
        function btnHSource() {
            layer.open({
                type: 2//弹窗类型
                , skin: 'layui-layer-rim' //加上边框
                , area: ['90%', '90%']//大小
                , title: '生产资源列表'//标题
                , shift: 2//弹出动画
                , content: ['../../基础资料/生产基础资料/Gy_Source.html', 'yes']
                , btn: ['确定', '取消']
                , btn1: function (index, layero) {//按钮【按钮一】的回调
                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                    if (checkStatus.data.length === 0) {
                        return layer.msg('请选择数据');
                    }
                    //获取数据
                    $("#HSourceID").val(checkStatus.data[0].HItemID);
                    $("#HSourceName").val(checkStatus.data[0].生产资源名称);
 
                    layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                }
                , btn2: function (index, layero) { }
            })
        }
 
        //生产班组选择页面
        function btnHGroup() {
            layer.open({
                type: 2//弹窗类型
                , skin: 'layui-layer-rim' //加上边框
                , area: ['90%', '90%']//大小
                , title: '班组表'//标题
                , shift: 2//弹出动画
                , content: ['../../基础资料/工资基础资料/Gy_Group.html', 'yes']
                , btn: ['确定', '取消']
                , btn1: function (index, layero) {//按钮【按钮一】的回调
                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                    if (checkStatus.data.length != 1) {
                        return layer.msg('请选择一条数据');
                    }
                    //获取数据
                    $("#HGroupID").val(checkStatus.data[0].HItemID);//班组id
                    $("#HGroupName").val(checkStatus.data[0].班组名称);//计量单位名称
 
                    layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                }
                , btn2: function (index, layero) { }
            })
        }
 
        //生产车间选择页面
        function btnHDept() {
            layer.open({
                type: 2//弹窗类型
                , skin: 'layui-layer-rim' //加上边框
                , area: ['90%', '90%']//大小
                , title: '生产车间列表'//标题
                , shift: 2//弹出动画
                , content: ['../../基础资料/公用基础资料/Gy_DepartmentList.html', 'yes']
                , btn: ['确定', '取消']
                , btn1: function (index, layero) {//按钮【按钮一】的回调
                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                    if (checkStatus.data.length != 1) {
                        return layer.msg('请选择一条数据');
                    }
                    //获取数据
                    $("#HDeptID").val(checkStatus.data[0].HItemID);//
                    $("#HDeptName").val(checkStatus.data[0].部门名称);//
 
                    layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                }
                , btn2: function (index, layero) { }
            })
        }
 
        //工序选择页面
        function btnHProc() {
            layer.open({
                type: 2//弹窗类型
                , skin: 'layui-layer-rim' //加上边框
                , area: ['90%', '90%']//大小
                , title: '工序列表'//标题
                , shift: 2//弹出动画
                , content: ['../../基础资料/生产基础资料/Gy_Process.html', 'yes']
                , btn: ['确定', '取消']
                , btn1: function (index, layero) {//按钮【按钮一】的回调
                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                    if (checkStatus.data.length != 1) {
                        return layer.msg('请选择一条数据');
                    }
                    //获取数据
                    $("#HProcID").val(checkStatus.data[0].HItemID);//
                    $("#HProcName").val(checkStatus.data[0].工序名称);//
 
                    layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                }
                , btn2: function (index, layero) { }
            })
        }
        //#endregion
 
        //非空验证
        function AllowLoadData() {
            var HBarCode = $("#HBarCode_P").val();
            if (HBarCode == "") {
                layer.msg("产品码不能为空!")
                return false;
            }
 
            var sSubStr = JSON.stringify(table.cache['mainTable']);
 
            if (typeof (sSubStr) != "undefined" && typeof (sSubStr) != "") {
                sSubStr = JSON.parse(sSubStr);
                for (var i = 0; i < sSubStr.length; i++) {
                    if (sSubStr[i].HBarCode == "" || sSubStr[i].HBarCode == undefined || sSubStr[i].HBarCode == null) {
                        layer.msg("绑定信息第" + (i + 1) + "行,配件码未绑定!", { icon: 5, btn: ['确认'], time: 4000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        return Result = false;
                    }
                }
            } else {
                layer.msg("配件绑定信息不允许为空!", { icon: 5, btn: ['确认'], time: 4000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return Result = false;
            }
 
            return true;
        }
        //#endregion
    });
</script>