username@email.com
2025-05-14 99ddfbcecf0fa2881eb3a91028257eef87dab6de
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
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CorporateClientsPrint.aspx.cs" Inherits="CY.WebForm.Pages.business.CorporateClientsPrint" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>订单编辑</title>
    <uc:CMSHead ID="CMSHead1" runat="server" />
    <!--前台页面start-->
    <link rel="stylesheet" type="text/css" href="../../Styles/base.css" />
    <link href="../../Styles/changes.css" rel="stylesheet" type="text/css" />
    <link href="../../Styles/ParticularWQJ.css" rel="stylesheet" type="text/css" />
    <script src="../../js/Inquiry/Inquiry.js?v=1" type="text/javascript"></script>
    <script src="../../js/business/Order.js" type="text/javascript"></script>
    <!--前台页面end-->
    <script type="text/javascript" language="javascript">
      
        
         
 
        window.FastKeyDistinctived = true; //例外快捷键(不使用通用快捷键)
        var keyDownHook = new KeyBehaviorHook('keydown');
        keyDownHook.Regist(window.Keys.S, "ClickElement('btnSave')", window.WithKey.Ctrl); //Ctrl+s 保存
        keyDownHook.Regist(window.Keys.Enter, "ClickElement('btnSave')", window.WithKey.Ctrl); //Ctrl+Enter 保存
        keyDownHook.Regist(window.Keys.R, "ClickElement('btnReset')", window.WithKey.Ctrl); //Ctrl+R 重置
        keyDownHook.Regist(window.Keys.Q, "ClickElement('btnBackList')", window.WithKey.Ctrl); //Ctrl+Q 退出(Quit)
 
 
        $(function () {
            SelectAddSearch();
            keyDownHook.Binding();
            global.SetReqMsg();
            try {
               
                  printTypeChange(document.getElementById('selPrintTypes'));
              } catch (e) {
 
              }
              //var orderTypeId = $("#hidOrderTypeId").val();
              //if (orderTypeId != "1") {
              //    $("#tbBasic").attr("disabled", true);
              //    $("#divInquiry").attr("disabled", true);
              //    setTimeout(displayControl, 1000);
              //}
 
              //$("#div_InquiryEdit").render();
          });
 
        //window.custormers = {};
 
        function displayControl() {
            $("#InsideOpDiv").hide();
        }
        
 
         
    </script>
    <style type="text/css">
        .table2Left td { text-align: left; }
        .table2Left .alignR { text-align: right; }
    </style>
</head>
<body style='padding: 0; margin: 0;'>
    <form id="form1" runat="server" style='padding: 0; margin: 0;' class='form2'>
     <input type="hidden" id="hidOrderId" name="hidOrderId" />
    <input name="Target" value='save' type="hidden" />
    <input type="hidden" id="hidOrderTypeId" value="" runat="server" />
    
    <table class="table2" id="tbBasic">
        <thead>
            <tr>
                <th colspan="8">
                    基本信息
                </th>
            </tr>
        </thead>
        <tr style=" height:1px;">
                <td style="border:none;width: 100px;">
                </td>
                <td style="border:none; width:161px;">
                </td>
                <td style="border:none;width: 100px;">
                </td>
                <td style="border:none;">
                </td>
                <td style="border:none;width: 100px;">
                </td>
                <td style="border:none;">
                </td>
                <td style="border:none;width: 100px;">
                </td>
                <td style="border:none;">
                </td>
            </tr>
        
        <tr>
            <td align="right">
                印件名称:
            </td>
            <td align="left">
                <input id='txtDocumentName' runat="server" maxlength='200' class='req' />
            </td>
            <td align="right">
                订单单价:
            </td>
            <td align="left">
                <input id='txtUnitPrice' runat="server" maxlength='9' class='float' />
            </td>
            <td align="right">
                订单总价:
            </td>
            <td align="left">
                <input id='txtSumPrice' runat="server" maxlength='9' value='0' class="req float" min="0" />
            </td>
            <td align="right">
                
            </td>
            <td align="left">
               
            </td>
        </tr>
        
        <tr>
           
            <td align="right">
                联 系 人:
            </td>
            <td align="left">
                <input id='txtBusinessManagers' runat="server" maxlength="20" />
            </td>
            <td align="right">
                联系电话:
            </td>
            <td align="left">
                <input id='txtManagersMobile' runat="server" class='' maxlength="20" />
            </td>
            <td align="right">
                联系Q Q:
            </td>
            <td align="left">
                <input id='txtManagersQQ' runat="server" maxlength="20" />
            </td>
             <td align="right">
                人物性格
            </td>
            <td align="left">
             <input id='txtXinge' runat="server" maxlength="200" />
            </td>
        </tr>
    </table>
    <div id='div_InquiryEdit' style='display: block;'>
        <div id="divInquiry" style='display: block;'>
        </div>
       
    </div>
    
    <table class="table2">
        <tbody>
            <tr>
                <td style="width: 100px; text-align:right;">
                    印刷、打包、送货要求:
                </td>
                <td style=" text-align:left;">
                    <textarea id="txtDeliveryrequirements" name="txtDeliveryrequirements" runat="server" style="width: 692px; height: 30px;" maxlength="200"></textarea>
                </td>
            </tr>
            <tr>
                <td class="contentLeft" colspan="2" style=" padding-left:300px;">
                    <input type="hidden" id='txtKeyid' runat="server" value='0' /> 
                    <input type="hidden" id='txtCorporateClientsid' runat="server" value=''  />
                    <input  name='hidPrintTypeId' id='hidPrintTypeId' type="hidden" /><input type="button" id="btnSave" runat="server" value="保 存" />&nbsp;&nbsp;&nbsp;<input type="button" value="重 置" id='btnReset' onclick="ReLoad()" />
                    <%--<input type="button" value="返回列表" id='btnBackList' onclick="window.location='OrderList.aspx';" />--%>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    &nbsp;
                </td>
            </tr>
        </tbody>
    </table>
    </form>
    
</body>
<script type="text/javascript" language="javascript">
 
    $("#divInquiry").load("/Pages/front/Book.aspx", { "PrintTypeId": '6' }, ExcuteCallBack1)
 
    function ExcuteCallBack1() {
        var printTypeId = '6';//$("#hidPrintTypeId").val();
        $("#hidOrderId").val(<%=Keyid%>);
        $("#selDigitalPrintType").live("change",
            function () {
                var value = $(this).val();
                if (value == "单张") {
                    $("#divInquiry").load("/Pages/front/DigitalSingle.aspx", { "PrintTypeId": printTypeId, "DigitalPrintType": "" + value + "" }, ExcuteCallBack);
                }
                else {
                    $("#divInquiry").load("/Pages/front/DigitalBook.aspx", { "PrintTypeId": printTypeId, "DigitalPrintType": "" + value + "" }, ExcuteCallBack);
                }
            }
        );
 
        $("#signboardCharacter").live("change",
            function () {
                var characterName = $(this).val();
                if (characterName != null && characterName != "") {
                    $.ajax({
                        url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
                        type: "POST",
                        async: false,
                        data: "CharacterSelect=true&CharacterName=" + characterName,
                        success: function (dataStr) {
                            var option = "";
                            var thicknesss = dataStr;
                            if (thicknesss != "") {
                                $(".thickness").show();
                                var thicknessArry = thicknesss.split('|');
                                for (var i = 0; i < thicknessArry.length; i++) {
                                    option += "<option value=\"" + thicknessArry[i] + "\">" + thicknessArry[i] + "</option>";
                                }
                                $("#thickness").html("");
                                $("#thickness").html(option);
                            }
                            else {
                                $(".thickness").hide();
                                $("#thickness").html("");
                            }
                        }
                    });
                }
            }
        );
        Init();
        var orderId = $("#hidOrderId").val();
        //修改反绑数据
        if (orderId != "" || orderId == "0") {
            BindControl1(orderId);
        }
        $("[name='pvcType']").change(
            function () {
 
                var pvcTypePar = "1";
                var typeValue = $(this).val();
                if (typeValue == "人像卡") {
                    pvcTypePar = "2";
                    if (window.ControlNum == 2 || window.ControlNum == 0) {
                        $("#hidOrderId").val("");
                    }
                }
                else {
                    $("#hidOrderId").val("");
                }
                LoadPrintType($("#hidPrintTypeId").val(), pvcTypePar, $("#hidOrderId").val());
            }
        );
 
        $("[name='sjType']").change(
            function () {
                var value = $(this).val();
                if (value == 53 || value == 54 || value == 55) {
                    $(".pmYM").show();
                }
                else {
                    $(".pmYM").hide();
                }
            }
        );
 
        $("#SelSize").change(
            function () {
                var printTypeId = $("#hidPrintTypeId").val();
                var value = $(this).val();
                var bindModel = $("#bindingMode").val();
                if (bindModel == 17) {
                    if (value == 95 || value == 96 || value == 85 || value == 86) {
                        if (printTypeId == 15) {
                            $(this).val(100);
                        }
                        else {
                            $(this).val(90);
                        }
                        alertMsg("64开不能精装");
                        return;
                    }
                }
                if (value == "95" || value == "96" || value == "103" || value == "104") {
                    $(".lf[value='18']").attr("disabled", true);
                    $(".lf[value='18']").attr("checked", false);
                }
                else {
                    $(".lf[value='18']").attr("disabled", false);
                }
                if (value == "95" || value == "96" || value == "103" || value == "104" || value == "97" || value == "98" || value == "120" || value == "121" || value == "122" || value == "123") {
                    $(".lf[value='32']").attr("disabled", true);
                    $(".lf[value='32']").attr("checked", false);
                    $("[name='LaFeng']").hide();
                    $(".doubleCover").hide();
                    $(".doubleCover").find("input:checkbox").attr("checked", false);
                }
                else {
                    $(".lf[value='32']").attr("disabled", false);
                }
            }
        );
 
        $(".xialap").hover(function () {
            $(this).find(".xialapb").show();
        }, function () {
            $(this).find(".xialapb").hide();
        });
 
        $(".xialapr").hover(function () {
            $(this).find(".xialapb").show();
            $(this).removeClass("xialapr").addClass("xialaprh");
        }, function () {
            $(this).removeClass("xialaprh").addClass("xialapr");
            $(this).find(".xialapb").hide();
        });
 
        $(".xialapr").click(function () {
            $(this).parent().parent().find("input").val($(this).text());
            $(".xialapb").hide();
        });
 
        //        //正整数正则表达式
        //        var reg2 = /^[0-9]\d*$/;
 
        $(".pageNum").blur(
            function () {
                var isSuccess = true;
                var isOk = true;
                var bindingMode = $("#bindingMode").val();
                var i = 0;
                var tempVal = 0;
                var nameValue = $(this).attr("name");
                var index = nameValue.substring(nameValue.length - 1);
                var paperId = $("[name='paper" + index + "']").val();
 
                if (bindingMode == 15) {
                    i = 2;
                }
                else {
                    i = 2;
                }
                var value = $(this).val();
 
                if (paperId != 18) {
                    if (!reg2.test(value)) {
                        isSuccess = false;
                    }
                    else {
                        if (parseInt(value) % i != 0) {
                            isSuccess = false;
                        }
                    }
                    var msg = "";
                    if (!isSuccess) {
                        msg = "内页的页码必须为" + i + "的倍数的正整数";
                        tempVal = 4;
                    }
                    //                    if (bindingMode != 14) {
                    //                        if (!checkBookPageNum()) {
                    //                            isOk = false;
                    //                            tempVal = 36;
                    //                        }
                    //                    }
                    //                    if (!isOk) {
                    //                        msg = "无线,锁线胶装和精装内页页码不能小于36";
                    //                    }
 
                    if (!isOk) {
                        $(this).focus();
                        $(this).val(tempVal);
                        alertMsg(msg);
                    }
                    else if (!isSuccess) {
                        $(this).focus();
                        $(this).val(tempVal);
                        alertMsg(msg);
                    }
                }
                else {
                    if (!reg2.test(value)) {
                        alertMsg("页码必须是正整数");
                        $(this).val(1);
                    }
                }
            }
        );
 
        $(".newsPageNum").blur(
            function () {
                var isSuccess = true;
                var value = $(this).val();
                if (!reg2.test(value)) {
                    isSuccess = false;
                }
                else {
                    if (parseInt(value) % 4 != 0) {
                        isSuccess = false;
                    }
                }
                if (!isSuccess) {
                    var msg = "版数必须是4的倍数的正整数";
                    $(this).focus();
                    $(this).val(8);
                    alertMsg(msg);
                }
            }
        );
 
        $("#bindingMode").change(
            function () {
                var value = $(this).val();
                var isSuccess = true;
                var isOk = true;
                var tempVal = 0;
                var i = 0;
                $("[id*=paper][id!=paperSize]").each(
                    function () {
                        var paperId = $(this).val();
                        if (paperId == 18) {
                            if (value == 14 || value == 17) {
                                isSuccess = false;
                            }
                        }
                    }
                );
                if (!isSuccess) {
                    alertMsg("硫酸纸不能用骑马钉和精装");
                    $(this).val(15);
                    return;
                }
                //                if (value == 15) {
                //                    i = 2;
                //                }
                //                else {
                //                    i = 4;
                //                }
                //                $(".pageNum").each(
                //                    function () {
                //                        var pageNum = $(this).val();
                //                        var index = $(this).attr("name").substring($(this).attr("name").length - 1);
                //                        var paperId = $("[id='paper" + index + "'][id!=paperSize]").val();
                //                        if (paperId != 18) {
                //                            if (value != 14) {
                //                                if (parseInt(pageNum) < 36) {
                //                                    isOk = false;
                //                                    $(this).focus();
                //                                    $(this).val(36);
                //                                }
                //                            }
                //                            if (isOk) {
                //                                if (parseInt(pageNum) % i != 0) {
                //                                    isSuccess = false;
                //                                    $(this).focus();
                //                                    $(this).val(4);
                //                                }
                //                            }
                //                        }
                //                        else {
                //                            if (!reg1.test(pageNum)) {
                //                                alertMsg("页码必须是正数字");
                //                                $(this).val(1);
                //                            }
                //                        }
                //                    }
                //                );
                //                var msg = "";
                //                if (!isSuccess) {
                //                    msg += "内页的页码必须为" + i + "的倍数的正数字(除硫酸纸)";
                //                }
                //                if (!isOk) {
                //                    msg = "无线,锁线胶装和精装内页页码不能小于36(除硫酸纸),";
                //                }
                var msg = "";
                var printTypeId = $("#hidPrintTypeId").val();
                $("[name='works']").attr("disabled", false);
                if (value == 17) {
                    var paperSize = $("#paperSize").val();
                    if (paperSize == 95 || paperSize == 96 || paperSize == 85 || paperSize == 86) {
                        isSuccess = false;
                        msg += "64开不能精装,";
                        if (printTypeId == 15) {
                            $("#paperSize").val(100)
                        }
                        else {
                            $("#paperSize").val(90);
                        }
                    }
                    if (isSuccess) {
                        var SelSize = $("#SelSize").val();
                        if (SelSize == 95 || SelSize == 96 || paperSize == 85 || paperSize == 86) {
                            isSuccess = false;
                            msg += "64开不能精装,";
                            if (printTypeId == 15) {
                                $("#SelSize").val(100)
                            }
                            else {
                                $("#SelSize").val(90)
                            }
                        }
                    }
 
                    $("[name='works']").each(
                        function () {
                            var workVal = $(this).val();
                            if (workVal == 5 || workVal == 3 || workVal == 32 || workVal == 18 || workVal == 2) {
                                $(this).attr("checked", false);
                                $("[name='LaFeng']").hide();
                                $(this).attr("disabled", true);
                            }
                        }
                    );
                }
 
                if (!isSuccess) {
                    msg = msg.substring(0, msg.length - 1);
                    alertMsg(msg);
                }
            }
        );
 
        $("[name='frontType']").change(
            function () {
                var value = $(this).val();
                if (value == "无封面") {
                    $("#spPrintDemand").hide();
                }
                else {
                    $("#spPrintDemand").show();
                }
            }
        );
 
        $(".validateIntSpc").blur(
            function () {
                var isSuccess = true;
                var value = $(this).val();
                var defalutValue = $(this).attr("defaultValue");
                if (!reg2.test(value)) {
                    isSuccess = false;
                }
                if (parseInt(value) < parseInt(defalutValue)) {
                    isSuccess = false;
                }
                if (!isSuccess) {
                    var msg = "印刷数量必须是大于等于" + defalutValue + "的正整数";
                    $(this).val(defalutValue);
                    alertMsg(msg);
                }
            }
        );
 
        $("[id*='brand']").live("change",
            function () {
                var brandId = $(this).val();
                var id = $(this).attr("id");
                var index = id.substring(id.length - 1);
                //                    alert(index);
                var paperId = $("[id*='paper" + index + "'][id!=paperSize]").val();
                if (paperId == 0) {
                    return;
                }
                var printTypeId = $("#hidPrintTypeId").val();
                $.ajax({
                    url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
                    type: "POST",
                    async: false,
                    data: "BrandSelect=true&PrinttypeId=" + printTypeId + "&PaperId=" + paperId + "&BrandId=" + brandId,
                    success: function (dataStr) {
                        var option = "";
                        var gramWeights = dataStr;
                        if (gramWeights.length != undefined) {
                            var gramWeightArry = gramWeights.split('|');
                            for (var i = 0; i < gramWeightArry.length; i++) {
                                option += "<option value=\"" + gramWeightArry[i] + "\">" + gramWeightArry[i] + "</option>";
                            }
                            $("[id*='gramWeight" + index + "']").html("");
                            $("[id*='gramWeight" + index + "']").html(option);
                        }
                    }
                });
            }
        );
 
 
 
        $(":radio[name='printMode']").click(
            function () {
                var printTypeId = $("#hidPrintTypeId").val();
                if ($(this).val() == 0) {
                    $("[class*='Brand']").show();
                    $("[id*='brand']").show();
                    if (printTypeId == "20") {
                        $(".divShow").show();
                    }
                    if (printTypeId == "15") {
                        $.ajax({
                            url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
                            type: "POST",
                            async: false,
                            data: "PaperInit=true&PrinttypeId=" + printTypeId,
                            success: function (dataJsonStr) {
                                var dataJson = eval('(' + dataJsonStr + ')');
                                var paperInfo = dataJson.paperInfo;
                                var sizeInfo = dataJson.sizeInfo;
                                var option = "";
                                for (var i = 0; i < sizeInfo.length; i++) {
                                    option += "<option value=\"" + sizeInfo[i].sizeId + "\">" + sizeInfo[i].sizeName + "</option>";
                                }
                                option += "<option value=\"-1\">自定义尺寸</option>";
                                $("#paperSize").html("");
                                $("#paperSize").html(option);
                            }
                        });
                        $(".pageNum").val("");
                        $("#paperSize").val(100);
                        $("#InsidePageDiv").show();
                        $(".trHide").show();
                        $(".insidePageAfterWork1").show();
                        $("#InsideOpDiv").show();
                        $(".singleOrdouble").show();
                        $("#InsidePage2").hide();
                        $("#InsidePage3").hide();
                        $("#InsidePage4").hide();
                        $("#InsidePage5").hide();
                        $("#hidInsidePageNum").val("1");
                        $("#InsidePageAdd").val("内页2");
                        $("[name*='printColor']").attr("disabled", false);
                        $("#bindingMode").attr("disabled", false);
                        $("[name*='pageNum']").attr("readonly", false);
                    }
                    if (printTypeId == "22") {
                        $.ajax({
                            url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
                            type: "POST",
                            async: false,
                            data: "PaperInit=true&PrinttypeId=" + printTypeId,
                            success: function (dataJsonStr) {
                                var dataJson = eval('(' + dataJsonStr + ')');
                                var paperInfo = dataJson.paperInfo;
                                var sizeInfo = dataJson.sizeInfo;
                                var option = "";
                                for (var i = 0; i < paperInfo.length; i++) {
                                    option += "<option value=\"" + paperInfo[i].paperId + "\">" + paperInfo[i].paperName + "</option>";
                                }
                                $("[id*='paper'][id!=paperSize]").html("");
                                $("[id*='paper'][id!=paperSize]").html(option);
                                option = "";
                                for (var i = 0; i < sizeInfo.length; i++) {
                                    option += "<option value=\"" + sizeInfo[i].sizeId + "\">" + sizeInfo[i].sizeName + "</option>";
                                }
                                $("#paperSize").html("");
                                $("#paperSize").html(option);
                            }
                        });
                        $("#printCount").attr("readonly", false);
                        $("[id*='brand']").attr("disabled", false);
                        $("[id*='paper'][id!=paperSize]").bind("change", OnPaperSelect);
                        PaperSelect(0, $("#hidPrintTypeId").val(), 0);
 
                    }
                    else if (printTypeId == "27") {
                        $(".fsByre").show();
                        $.ajax({
                            url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
                            type: "POST",
                            async: false,
                            data: "PaperInit=true&PrinttypeId=" + printTypeId,
                            success: function (dataJsonStr) {
                                var dataJson = eval('(' + dataJsonStr + ')');
                                var paperInfo = dataJson.paperInfo;
                                var sizeInfo = dataJson.sizeInfo;
                                var option = "";
                                for (var i = 0; i < paperInfo.length; i++) {
                                    option += "<option value=\"" + paperInfo[i].paperId + "\">" + paperInfo[i].paperName + "</option>";
                                }
                                $("[id*='paper'][id!=paperSize]").html("");
                                $("[id*='paper'][id!=paperSize]").html(option);
                                option = "";
                                for (var i = 0; i < sizeInfo.length; i++) {
                                    option += "<option value=\"" + sizeInfo[i].sizeId + "\">" + sizeInfo[i].sizeName + "</option>";
                                }
                                $("#paperSize").html("");
                                $("#paperSize").html(option);
                            }
                        });
                        $("#printCount").attr("readonly", false);
                        $("[id*='brand']").attr("disabled", false);
                        $("[id*='paper'][id!=paperSize]").bind("change", OnPaperSelect);
                        PaperSelect($("[id*='paper'][id!=paperSize]").val(), $("#hidPrintTypeId").val(), 0);
                    }
                    else if (printTypeId == "26") {
                        $.ajax({
                            url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
                            type: "POST",
                            async: false,
                            data: "PaperInit=true&PrinttypeId=" + printTypeId,
                            success: function (dataJsonStr) {
                                var dataJson = eval('(' + dataJsonStr + ')');
                                var paperInfo = dataJson.paperInfo;
                                var sizeInfo = dataJson.sizeInfo;
                                var option = "";
                                for (var i = 0; i < paperInfo.length; i++) {
                                    option += "<option value=\"" + paperInfo[i].paperId + "\">" + paperInfo[i].paperName + "</option>";
                                }
                                $("[id*='paper'][id!=paperSize]").html("");
                                $("[id*='paper'][id!=paperSize]").html(option);
                            }
                        });
                        $("#printCount").attr("readonly", false);
                        $("[id*='brand']").attr("disabled", false);
                        PaperSelect(0, $("#hidPrintTypeId").val(), 0);
                    } else if (printTypeId == "16") {
                        $.ajax({
                            url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
                            type: "POST",
                            async: false,
                            data: "PaperInit=true&PrinttypeId=" + printTypeId,
                            success: function (dataJsonStr) {
                                var dataJson = eval('(' + dataJsonStr + ')');
                                var paperInfo = dataJson.paperInfo;
                                var sizeInfo = dataJson.sizeInfo;
                                var option = "";
                                for (var i = 0; i < paperInfo.length; i++) {
                                    option += "<option value=\"" + paperInfo[i].paperId + "\">" + paperInfo[i].paperName + "</option>";
                                }
                                $("[id*='paper'][id!=paperSize]").html("");
                                $("[id*='paper'][id!=paperSize]").html(option);
                            }
                        });
                        $("#printCount").attr("readonly", false);
                        $("[id*='brand']").attr("disabled", false);
                        $("[id*='paper'][id!=paperSize]").bind("change", OnPaperSelect);
                        PaperSelect(0, $("#hidPrintTypeId").val(), 0);
                    }
                    else if (printTypeId == "21") {
                        $.ajax({
                            url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
                            type: "POST",
                            async: false,
                            data: "PaperInit=true&PrinttypeId=" + printTypeId,
                            success: function (dataJsonStr) {
                                var dataJson = eval('(' + dataJsonStr + ')');
                                var paperInfo = dataJson.paperInfo;
                                var sizeInfo = dataJson.sizeInfo;
                                var option = "";
                                for (var i = 0; i < paperInfo.length; i++) {
                                    option += "<option value=\"" + paperInfo[i].paperId + "\">" + paperInfo[i].paperName + "</option>";
                                }
                                $("[id*='paper'][id!=paperSize]").html("");
                                $("[id*='paper'][id!=paperSize]").html(option);
                            }
                        });
                        $("#printCount").attr("readonly", false);
                        $("[id*='brand']").attr("disabled", false);
                        $("[name='printColor']").attr("disabled", false);
                        $("#tbAfterWork").show();
                        $("[id*='paper'][id!=paperSize]").bind("change", OnPaperSelect);
                        PaperSelect(0, $("#hidPrintTypeId").val(), 0);
                    }
                    else {
                        $("#printCount").attr("readonly", false);
                        $("[id*='paper'][id!=paperSize]").attr("disabled", false);
                        $("[id*='brand']").attr("disabled", false);
                        $("[id*='paper'][id!=paperSize]").bind("change", OnPaperSelect);
                        $("[id*='paper'][id!=paperSize]").each(
                            function () {
                                var id = $(this).attr("id");
                                var index = id.substring(id.length - 1);
                                PaperSelect($(this).val(), $("#hidPrintTypeId").val(), index);
                            }
                        );
                    }
                    OrderPageSizeContronl();
                }
                else {
                    Init();
                }
                $("#printCount").val("500");
                $("#divInquiryResult").hide();
            }
        );
 
        $("#InsidePageAdd").click(
            function () {
                var hidValue = $("#hidInsidePageNum").val();
                var maxValue = $("#hidInsidePageNum").attr("maxValue");
                var minValue = $("#hidInsidePageNum").attr("minValue");
                var newValue = parseInt(hidValue) + 1;
                if (newValue > maxValue) {
                    alertMsg("内页新增不能超过5个!");
                    return;
                }
                $("#InsidePage" + newValue + "").show();
                $("#hidInsidePageNum").val(newValue);
                if (newValue != maxValue) {
                    var value = newValue + 1;
                    $("#InsidePageAdd").val("内页" + value);
                }
            }
        );
 
        $("#InsidePageDel").click(
            function () {
                var hidValue = $("#hidInsidePageNum").val();
                var maxValue = $("#hidInsidePageNum").attr("maxValue");
                var minValue = $("#hidInsidePageNum").attr("minValue");
                var newValue = parseInt(hidValue) - 1;
                if (newValue < minValue) {
                    alertMsg("内页不能少于1!");
                    return;
                }
                $("#InsidePage" + hidValue + "").hide();
                $("[name='pageNum" + hidValue + "']").val("");
                $("#hidInsidePageNum").val(newValue);
                if (parseInt(hidValue) != minValue) {
                    var value = parseInt(hidValue);
                    $("#InsidePageAdd").val("内页" + value);
                }
            }
        );
 
        $(".ClickControl").click(
            function () {
                var checked = $(this).attr("checked");
                var id = $(this).attr("id");
                if (!checked) {
                    $(".ClickControl[id!='" + id + "']").attr("checked", false);
                    $(".ClickControl[id!='" + id + "']").attr("disabled", false);
                }
                else {
                    $(".ClickControl[id!='" + id + "']").attr("disabled", true);
                }
            }
        );
    }
 
     
    //修改反绑数据
    function BindControl1(orderId) {
       
        if (parseInt(orderId) > 0) {
            $.ajax({
                url: '/Pages/front/InquiryOnLine.aspx?tmp' + (new Date()).valueOf(),
                type: "POST",
                data: "BindControl1=true&OrderId=" + orderId,
                success: function (dataJsonStr) {
                    if (dataJsonStr == null || dataJsonStr == "")
                        return;
                    //console.info(dataJsonStr);
                    var dataJson = eval('(' + dataJsonStr + ')');
                    if (dataJson.PrintTypeId == "-1" || dataJson.PrintTypeId == -1) {
                        $("[name='printSizeName']").val(dataJson.PrintSizeName);
                        $("[name='printCount']").val(dataJson.PrintCount);
                        $("[name='txtPrintDemand']").val(dataJson.PrintDemand);
                    } else {
                        BindControlByPrintType(dataJson);
                    }
                }
            });
        }
    }
 
 
 
     
</script>
</html>