confirm.html 36.6 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169
<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>订单提交</title>
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <link rel="stylesheet" type="text/css" href="__TMPL__/static/assets/css/weui.min.css" />
    <link rel="stylesheet" type="text/css" href="__TMPL__/static/assets/css/swiper-3.4.2.min.css" />
    <link rel="stylesheet" type="text/css" href="http://at.alicdn.com/t/font_773803_lmxwdl64j4h.css" />
    <script type="text/javascript" src="__TMPL__/static/assets/font/iconfont.js"></script>
    <script type="text/javascript" src="__TMPL__/static/js/base.js"></script>
    <link rel="stylesheet" href="__TMPL__/static/css/orders_submitted.css" />
    <style>
        .weui-picker__group {
            font-size: 0.3rem;
        }
        .people li {
            display: block;
            align-items: center;
            height: 2.04rem;
            padding: 0.36rem 0.31rem 0.1rem 0.32rem;
            border-bottom: 1px solid #F6F6F6;
        }
        .mold {
            display: none;
        }
        .weui-picker__action:first-child {
            text-align: left;
            color: #888;
        }
        .weui-toast {
            line-height: 1rem;
            height: 1rem;
            font-size: 0.3rem;
            position: fixed;
            z-index: 5000;
            width: 3rem;
            min-height: 1em;
            top: 180px;
            left: 50%;
            margin-left: -3.8em;
            background: hsla(0,0%,7%,.7);
            text-align: center;
            border-radius: 5px;
            color: #fff;
        }
        .weui-picker__group {
            font-size: 0.3rem;
        }
        .mold {
            display: none;
        }
        .weui-picker__action:first-child {
            text-align: left;
            color: #888;
        }

        .sss {
            display: none;
        }
        /*.move3 {
            display: none;
        }*/

        .move {
            display: none;
        }

        .move_main {
            animation: move 0.18s;
        }

        @keyframes move {
            0% {
                height: 1rem;
            }
            50% {
                height: 4rem;
            }
            100% {
                height: 4.55rem;
            }
        }

        .move_main3 {
            animation: move 0.18s;
        }

        .mold_out {
            display: none;
        }
        .outtravel .chooseall button{
            right: 0;
            top:0;
        }
    </style>
</head>

<body>
<div class="taocan">
    套餐信息
</div>
<div class="information">
    <ul class="jai">
        <li class="mingcheng">
					<span>
						套餐名称
					</span >
            <span class="liang">
						{$data.activity.name}
					</span>
        </li>
        <li class="mingcheng ming pelpe">
            <div class='li_span'>
						<span>
							出行时间
					    </span>
                <span class="liang lian ">
                    <span class="showcang">{$data.choose.time_text}</span>
						</span>
            </div>
            <span>
							<i class="iconfont icon-common-jinru-copy"></i>
					</span>
        </li>
        <li class="mingcheng shuliang" id="shuliang">
					<span>
						购买数量
					</span>
            <div class="suan">
                <span class="reduce" id="del">-</span>
                <span class="val" id="quantity">1</span>
                <span class="add" id="add">+</span>
            </div>
        </li>
        <li class="mingcheng chu">
					<span class="chuxing">
						出行信息
					</span>

        </li>
    </ul>
</div>
<div class="chengke">
    <span>乘客信息</span>
    <div class="xuan">
					<span class="xuanze">
				 	请选则出行人
					 </span>
        <i class="iconfont icon-common-jinru-copy"></i>
    </div>
</div>

<div class="qita">
    其他信息
</div>
<!--优惠-->
<div class="you">
    <div class="chengke1">
        <span class="hui">优惠券</span>
        <div class="xuan3">
					<span class="xuanze1">
				 	请选择
					 </span>
            <i class="iconfont icon-common-jinru-copy"></i>
        </div>
    </div>
    <div class="chengke1">
        <span class="hui">商家备注(10字以内)</span>
        <div class="xuan2">
            <input type="text" placeholder="点击可给商家留言" class="dian_text">
        </div>
    </div>
    <div class="chengke1">
        <span class="hui">单房差(一人一房)</span>
        <div class="xuan1">
					<span class="xuanze2 xuandan">
				 	请选择
					 </span>
            <i class="iconfont icon-common-jinru-copy"></i>
        </div>
    </div>
    <div class="t chengke1">
        <i class="iconfont icon-weixuanzhong1"></i>
        <span class="comx">我已同意购买<a href="agreement.html" class="aaa">协议和合同协议</a></span>
    </div>
</div>
<div class="zhezhao">
</div>
<footer>
    <span class="jin">定金:¥<span id="down_price">{$data.down_price}</span></span>
    <span>总价:¥<span id="total">{$data.total}</span></span>
    <!--<a href="orderPay.html">-->
    <input type="button" value="提交订单" class="sub" id="sub" />
    <!--</a>-->
</footer>

<div class='mold'>
    <div class='mold_main'>
				<span class="fon30">
					是否允许绑定手机号码?
				</span>
        <span>
					<span class="fon30" id="no"></span>
				<span class="fon30 green" id="yes">允许</span>
				</span>
        <span class="fon26">
					注:绑定后可获得¥10代金券一张
				</span>
    </div>
</div>

<div class='move'>
    <div class='move_main'>
        <div class="change">
            <div class="fang">
						<span class="call">
								取消
							</span>
                <span class="single1">
								单人间&nbsp;&nbsp;(一人一房)
							</span>

                <span class="confirm">
									确定
						</span>
            </div>
        </div>
        <div class="required">
            <span class="yes">需要</span>
            <span>不需要</span>
        </div>

    </div>

</div>
<div class='move1'>
    <div class='move_main1'>
        <div class="shang2">
            <div class="shang1">
						<span class="choose">
							选择支付方式
						</span>
            </div>
            <div class="shang1 shan1 shang_list">
                <div class="shang1_inner">
                    <div class="img_out">
                        <img src="__TMPL__/static/images/yue.png" alt="" class="yue" />

                    </div>
                    <div>
                        余额支付
                    </div>
                </div>
                <div>
                    <i class='iconfont icon-xuanzhong2'></i>
                </div>
            </div>
            <div class="shang1 shan1">
                <div class="shang1_inner">
                    <div class="img_out">
                        <img src="__TMPL__/static/images/wei.png" alt="" class="yue" />

                    </div>
                    <div>
                        微信支付
                    </div>
                </div>
                <div>
                    <i class='iconfont'></i>
                </div>
            </div>
            <div class="shang1 shan1">
                <div class="shang1_inner">
                    <div class="img_out">
                        <img src="__TMPL__/static/images/zhi.png" alt="" class="yue" />

                    </div>
                    <div>
                        支付宝支付
                    </div>
                </div>
                <div>
                    <i class='iconfont'></i>
                </div>
            </div>
            <div class="agreepay">
                确认支付
            </div>
        </div>
    </div>
</div>
<div class='mold_out'>
    <div class='mold_center'>
        <div class="scroll_out">
            <div class="scroll">
                <volist name="data.schedule" id="vo">
                    <div class="money" data-id="{$vo.schedule_id}">
                        <div class="year_change">
                            <if condition="$vo['schedule_id'] eq $data['choose']['schedule_id']">
                                <img src="__TMPL__/static/images/circle1.png"/>
                                <else/>
                                <img src="__TMPL__/static/images/circle.png"/>
                            </if>
                            <span>{$vo.start_time}&nbsp;&nbsp;{$vo.end_time}</span>
                        </div>
                        <div class="price">¥{$vo.price}</div>
                    </div>
                </volist>
            </div>
            <button class="bottom_button" value="">确定</button>
        </div>

    </div>

</div>

<!--点击输入要绑定的手机号-->
<div class='move3'>
    <div class='move_main3'>
        <span class="tie_phone">输入绑定的手机号:</span>
        <input type="text" class="phone_input" placeholder="请输入手机号" />
        <span class="phone_btn"><span class="agreed">确认</span></span>
    </div>
</div>


<!--选择出行人弹窗-->
<div class="outtravel">
    <div class="chuxing">
        <ul class="people">
            <li class="userInfo">
                <div class="guo">
                    <div class="gli">
                        <!--<div>-->
                        <div class="circle circle_chu">
                            <i class="iconfont icon-duigou"></i>
                        </div>
                        <!--</div>-->
                        <!--<i class="iconfont icon-yuancircle46"></i>-->
                        <div class="xin">
							<span class="guoxin">
							<span class="name">郭新宇</span>&nbsp;&nbsp;&nbsp; &nbsp;136120645435</span>
                            <span>身份证:123543546576868</span>
                        </div>
                    </div>
                    <div class="bian">

                        <div class="bianji">
                            <i class="iconfont icon-bianji"></i>编辑
                        </div>

                        <div class="delete">
                            <i class="iconfont icon-shanchu"></i> 删除
                        </div>
                    </div>
                </div>
            </li>
            <li class="userInfo">
                <div class="guo">
                    <div class="gli">
                        <div class="circle circle_chu">
                            <i class="iconfont icon-duigou"></i>
                        </div>

                        <!--</div>-->
                        <!--<i class="iconfont icon-yuancircle46"></i>-->
                        <div class="xin">
							<span class="guoxin">
							<span class="name">郭新宇</span>&nbsp;&nbsp;&nbsp; &nbsp;136120645435</span>
                            <span>身份证:123543546576868</span>
                        </div>
                    </div>
                    <div class="bian">

                        <div class="bianji">
                            <i class="iconfont icon-bianji"></i>编辑
                        </div>

                        <div class="delete">
                            <i class="iconfont icon-shanchu"></i>删除
                        </div>
                    </div>
                </div>
            </li>
            <li class="userInfo">
                <div class="guo">
                    <div class="gli">
                        <div class="circle circle_chu">
                            <i class="iconfont icon-duigou"></i>
                        </div>

                        <!--</div>-->
                        <!--<i class="iconfont icon-yuancircle46"></i>-->
                        <div class="xin">
							<span class="guoxin">
							<span class="name">郭新宇</span>&nbsp;&nbsp;&nbsp; &nbsp;136120645435</span>
                            <span>身份证:123543546576868</span>
                        </div>
                    </div>
                    <div class="bian">

                        <div class="bianji">
                            <i class="iconfont icon-bianji"></i>编辑
                        </div>

                        <div class="delete">
                            <i class="iconfont icon-shanchu"></i>删除
                        </div>
                    </div>
                </div>
            </li>
        </ul>
    </div>
    <div class="quanxuan chooseall">
        <div class="check">
            <div class="circle circle_chu" id="selectAll">
                <i class="iconfont icon-duigou"></i>
            </div>
            <span>全选</span>
        </div>
        <button class="agree" onclick="agreeFun()">
            确定
        </button>
    </div>
    <div class="tianjia ok ok_xing">
        添加出行人
    </div>
</div>
<!--选择优惠券=============================================-->
<div class="choose_waitquan">
    <!--待使用优惠券-->
    <div class="wai1" id="wai1">
        <div class="wai" data-id="1">
            <div class="youhui">
                <div class="circle1">
                    <i class="iconfont icon-duigou"></i>
                </div>

                <div class="quan">
                    <img src="__TMPL__/static/images/f2.png" alt="" />
                    <div class="dai">
                        <div class="money"><span class="money_five">20</span></div>
                        <div class="date">
                            <span>代金券</span>
                            <span class="you">有效期:2018.08.06-2018.08.08</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="wai">
            <div>
                <div class="youhui">
                    <div class="circle1">
                        <i class="iconfont icon-duigou "></i>
                    </div>
                    <div class="quan">
                        <img src="__TMPL__/static/images/f2.png" alt="" />
                        <div class="dai">
                            <div class="money"><span class="money_five">6</span></div>
                            <div class="date">
                                <span>代金券</span>
                                <span class="you">有效期:2018.08.06-2018.08.08</span>
                            </div>
                        </div>
                    </div>
                </div>

                <div>
                </div>
            </div>
        </div>
    </div>
    <!--已过期代金券-->
    <div id="wai2">
        <div class="wai">
            <div class="youhui">
                <div class="quan">
                    <img src="__TMPL__/static/images/f2.png" alt="" />
                    <div class="dai">
                        <span class="outdate"><img src="__TMPL__/static/images/outdate.png" alt="" /></span>
                        <div class="money">¥5</div>
                        <div class="date">
                            <span>代金券</span>
                            <span class="you">有效期:2018.08.06-2018.08.08</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div>
            <div class="youhui">

                <div class="quan">
                    <img src="__TMPL__/static/images/f2.png" alt="" />
                    <div class="dai">
                        <span class="outdate"><img src="__TMPL__/static/images/outdate.png" alt="" /></span>
                        <div class="money">¥5</div>
                        <div class="date">
                            <span>代金券</span>
                            <span class="you">有效期:2018.08.06-2018.08.08</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--已使用代金券-->
    <div id="wai3">
        <div class="wai">
            <div class="youhui">

                <div class="quan">
                    <img src="__TMPL__/static/images/f2.png" alt="" />
                    <div class="dai">
                        <span class="outdate"><img src="__TMPL__/static/images/use.png" alt="" /></span>
                        <div class="money">¥5</div>
                        <div class="date">
                            <span>代金券</span>
                            <span class="you">有效期:2018.08.06-2018.08.08</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div>
            <div class="youhui">

                <div class="quan">
                    <img src="__TMPL__/static/images/f2.png" alt="" />
                    <div class="dai">
                        <span class="outdate"><img src="__TMPL__/static/images/use.png" alt="" /></span>
                        <div class="money">¥5</div>
                        <div class="date">
                            <span>代金券</span>
                            <span class="you">有效期:2018.08.06-2018.08.08</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="agree3 ok" onclick="agreeFun3()">确定使用</div>
</div>
<!--添加出行人-->
<div class="jia_travel" style='display: none;'>
    <ul class="list">
        <li>
            <span class="real ">真实姓名</span>
            <input class="add name_1 chu" placeholder="请填写真实姓名"/>
        </li>
        <li>
            <span class="real">性别</span>
            <div class="xuanze_sex">
                <div class="sex se">
                    <img src="__TMPL__/static/images/circle.png" class="yuan yu"><span></span>
                </div>

                <div class="sex">
                    <img src="__TMPL__/static/images/circle1.png" class="yuan yu1"><span></span>
                </div>
            </div>

        </li>
        <li>
            <span class="real">手机号</span>
            <input class="add phone chu" placeholder="请填写手机号码" />
        </li>
        <li>
            <span class="real">微信号码</span>
            <input class="add chu wei " placeholder="请填写微信号码"/>
        </li>
        <li>
            <span class="real ">身份证号</span>
            <input class="add confirm chu zfzid" placeholder="请填写身份证号"/>
        </li>
    </ul>
    <!--====底部=====-->
    <footer class="foot ok ok_chu" id="foot">
        保存
    </footer>
</div>
<div id="toast" style='display: none;'>
    <div class="weui-mask_transparent"></div>
    <div class="weui-toast">
        <!--<i class="weui-icon-success-no-circle weui-icon_toast"></i>-->
        <p class="weui-toast__content">已完成</p>
    </div>
</div>

<script type="text/javascript" src="__TMPL__/static/assets/js/jquery-2.1.0.js"></script>
<script type="text/javascript" src="__TMPL__/static/assets/js/swiper-3.4.2.min.js"></script>
<script type="text/javascript" src="__TMPL__/static/assets/js/weui.js"></script>
<script type="text/javascript" src="__TMPL__/static/assets/js/myweui.js"></script>
<script type="text/javascript" src="__TMPL__/static/index.js"></script>
<script type="text/javascript" src="__TMPL__/static/assets/js/common.js"></script>
<script type='text/javascript' src='__TMPL__/static/assets/js/Augly_Verification.js'></script>
<script>
    $('.xuandan').click(function(){
        $('.move').css('display','block');
    })
    var schedule_id='{$data.choose.schedule_id}';
    var activity_id='{$data.activity.activity_id}';
    var max = '{$data.choose.allowMaximum}';
    var is_first='{$data.is_first}';
    $(function() {
        //获取选择出行人页面的数据

        var name = decodeURI(getQueryString('name')).replace(/,/g, ' ');
        if(!name) {
            $('.xuanze').html('请选择出行人');
        } else {
            $('.xuanze').html(name);
        }

        function getQueryString(name) {
            var reg = new RegExp("(^|&)" +
                name + "=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if(r) return unescape(r[2]);
            //return null;
            return '请选择出行人';
        }

        $('.money').click(function(event) {
            $(this).find('img').attr("src", "/themes/simpleboot3/static/images/circle1.png");
            $(this).siblings().find('img').attr("src", "/themes/simpleboot3/static/images/circle.png");
            schedule_id = $(this).attr('data-id');
        });
        //获取选择选择代金券的数据

        var price = decodeURI(getQueryString_money('price')).replace(/,/g);
        if(!price) {
            $('.waitmoney').html('请选择代金券');
        } else {
            $('.waitmoney').html('代金券¥' + price);
        }

        function getQueryString_money(price) {
            var reg = new RegExp("(^|&)" +
                price + "=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if(r) return unescape(r[2]);
            return '';
        }

        var mold = $('.mold');
        $('.mold').click(function() {
            $(this).hide();
        })

        $('.mold_main').click(function(e) {
            e.stopPropagation();
        })
        $('.move_main3').click(function(e) {
            e.stopPropagation();
        })
        $('.move3').click(function() {
            $(this).hide();
        })


        //点击增加
        $("#add").click(function() {
            var num =  parseInt($("#quantity").html());
            var aloowMax = parseInt(max);
            if(num >= aloowMax) {
                alert('名额超出');
            }else {
                numAdd();
                $.ajax({
                    url:"{:url('order/Order/confirm')}",
                    data:{
                        activity_id:'{$data.activity.activity_id}',
                        schedule_id:schedule_id,
                        num:$("#quantity").html()
                    },
                    type:"POST",
                    dataType:"JSON",

                    success: function (data) {
                        $("#down_price").html(data.data.down_price);
                        $("#total").html(data.data.total);
                    }
                })
            }
        });
        $("#del").click(function() {
            numDec();
            $.ajax({
                url:"{:url('order/Order/confirm')}",
                data:{
                    activity_id:'{$data.activity.activity_id}',
                    schedule_id:schedule_id,
                    num:$("#quantity").html()
                },
                type:"POST",
                dataType:"JSON",

                success: function (data) {
                    $("#down_price").html(data.data.down_price);
                    $("#total").html(data.data.total);
                }
            })
        });



        /*商品数量+1*/
        function numAdd() {

            var num_add = parseInt($("#quantity").html()) + 1;
            $("#quantity").html(num_add);
        }
        /*商品数量-1*/
        function numDec() {
            if($("#quantity").html() <= 1) {
                return false;
            }
            var num_dec = parseInt($("#quantity").html()) - 1;
            $("#quantity").html(num_dec);

        }

        //我已同意购买协议和合同协议
        $(".danxuan").click(function() {
            if($('.icon-duigou').css('display') == 'none') {
                $('.icon-duigou').css('display', 'block');
            } else {
                $('.icon-duigou').css('display', 'none');
            }
        });
        $('.sub').click(function() {
            if(is_first == 1) {
                $('.mold').css('display', 'block');
            }else {
                $('.move1').css('display', 'block');
            }
        })


        $(".agreepay").click(function () {
            $.ajax({
                url:"{:url('order/Order/done')}",
                data:{
                    activity_id:activity_id,
                    schedule_id:schedule_id,
                    num:$("#quantity").html(),
                    escort:'9,10',
                    payment:1,
                    discount_coupon_id:'',
                    desc:$('.dian_text').val(),
                    room:$('.xuandan').html()
                },
                type:"POST",
                dataType:"JSON",

                success: function (data) {
                    console.log(data);
                }
            })
        })


        $('.dan').click(function() {
            $('.move').css('display', 'block');

        })
        $('#yes').click(function() {
            $('.mold').css('display', 'none');
            if($('.mold').css('display') == 'none') {
                $('.move3').css('display', 'block');
            }
        })
        $('#no').click(function() {
            $('.mold').css('display', 'none');
            if($('.mold').css('display') == 'none') {
                $('.move1').css('display', 'block');
            }
        })

        $('.move_main').click(function(e) {
            e.stopPropagation();
        })
        $('.move_main1').click(function(e) {
            e.stopPropagation();
        })

        $('#sub').click(function() {

        })

        var liangVal = $('.lian2').html();
        var tem = '';
        $('.required span').click(function(e) {

            tem = $(this).html();

            $(this).css('color', 'red');
            $(this).siblings().css('color', '#000');
        });
        $('.call').click(function() {
            $('.lian2').html(liangVal);
        })

        $('.confirm').click(function(e) {
            $('.lian2').html(tem);
            liangVal = tem;
            $('.move').css('display', 'none');

        })
        $('.call').click(function(e) {
            $('.move').css('display', 'none');

        })
        $('.move').click(function(e) {
            $('.move').css('display', 'none');

        })

    })

    $('.pelpe').click(function() {
        $('.mold_out').css('display', 'block');
    })


    var index = 0;
    var num = 0;


    $('.bottom_button').click(function() {
        var inputLength = $('.mold_center').find('img').length;
        for(var i = 0; i < inputLength; i++) {
            if($('.mold_center').find('img').eq(i).attr("src") =="__TMPL__/static/images/circle1.png") {
                num = num + 1;
                index = i;
            }
        }
        if(1 == 1) {
            $('.mold_out').css('display', 'none');
            $("#quantity").html(1);
            $.ajax({
                url:"{:url('order/Order/confirm')}",
                data:{
                    activity_id:'{$data.activity.activity_id}',
                    schedule_id:schedule_id,
                    num:$("#quantity").html()
                },
                type:"POST",
                dataType:"JSON",

                success: function (data) {
                    $(".showcang").html(data.data.choose.time_text);
                    $("#down_price").html(data.data.down_price);
                    $("#total").html(data.data.total);
                    max = data.data.choose.allowMaximum;

                }})
        } else {
            $('.showcang').html($('.mold_center').find('span').eq(index).html());
            $('.mold_out').css('display', 'none');
        }
    })
    $('.shan1').click(function() {
        $(this).find('i').attr('class', 'iconfont icon-xuanzhong2');
        $(this).siblings().find('i').attr('class', 'iconfont');
    })
    $('.move1').click(function() {
        $(this).css('display', 'none');
    })
    $('.phone_btn').click(function() {
        $('.move3').css('display', 'none');
    })
    $('.dainji').click(function(){
        $('.dainji').css('display', 'none');
        $('.texteare1').focus();
    })
    //我已同意购买协议和合同协议
    $(" .t .iconfont").click(function() {
        if($(this).attr('class')=='iconfont icon-weixuanzhong1') {
            $(this).attr('class','iconfont icon-xuanzhong3')
        } else {
            $(this).attr('class','iconfont icon-weixuanzhong1')
        }
    });


    //	选择出行人
    $('.delete').click(function(){
        $(this).parents('.userInfo').remove();
    })
    var num= $('.people li').length;
    var count = 0;
    var circle=$('.circle');
    var nameArr = [];
    circle.click(function(){
        if($(this).find('.icon-duigou').hasClass("now")){

            $(this).find('.icon-duigou').removeClass("now");
            $(this).find('.icon-duigou').css('color','rgba(255, 255, 255)');
            $(this).css('border','0.02rem solid #999');


        }else {

            $(this).find('.icon-duigou').addClass("now");
            $(this).find('.icon-duigou').css('color','rgb(254, 10, 1)');
            $(this).css('border','0.02rem solid rgb(254, 10, 1)');

        }

        var len=$(".people").find('.icon-duigou.now').length;
        console.log(len);
        if(num == len) {
            $("#selectAll").css('border','0.02rem solid rgb(254, 10, 1)');
            $("#selectAll").find('.icon-duigou').css('color','rgba(254, 10, 1)');

        }else{
            $("#selectAll").css('border','0.02rem solid rgb(153, 153, 153)');
            $("#selectAll").find('.icon-duigou').css('color','rgb(255, 255, 255)');
        }

    })
    //全选反选


    $("#selectAll").click(function(){
        if(circle.find('.icon-duigou').css('color')=='rgb(255, 255, 255)'){
            circle.find('.icon-duigou').css('color','rgb(254, 10, 1)');
            circle.css('border','0.02rem solid rgb(254, 10, 1)');
        }else{
            circle.find('.icon-duigou').css('color','rgb(255, 255, 255)');
            circle.css('border','0.02rem solid #999');
        }

    })

    var arr=[];
    $('.agree').click(function(){
        $('.outtravel').css('display','none');
    })
    $('.xuan').click(function(){
        $('.outtravel').css('display','block');
    })


    // 点击确定时,出行人名字添加到数组,回显到订单提交页面;
    function agreeFun() {
        var nameArr = [];
        for (var i = 0; i < $(".userInfo").length; i++ ) {

            if($(".userInfo").eq(i).find(".icon-duigou").hasClass("now")) {
                var name = $(".userInfo").find(".name").html();
                if(nameArr.length >= 2) {
                    break;

                }else {
                    nameArr.push(name);
                }
            }
        }
        console.log(nameArr)
        console.log(nameArr[0])
        if(nameArr[0]!=undefined&&nameArr[1]==undefined){
            $('.xuanze').html(nameArr[0]);
        }else if(nameArr[0]!=undefined&&nameArr[1]!=undefined){
            $('.xuanze').html(nameArr[0]+' '+nameArr[1]);
        }else {
            $('.xuanze').html('请选择出行人');
        }




        // var name=encodeURI(encodeURI(nameArr));
        // var url="orders_submitted.html?name="+name;
        // window.location.href = url;
    }
    // 添加出行人
    function getQueryString(name) {
        var reg = new RegExp("(^|&)" +
            name + "=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if(r != null) return unescape(r[2]);
        //return null;
        return '请选择出行人';
    }
    function add(){
        var arrlist=decodeURI(getQueryString('arrlist')).replace(/,/g ,' ');
        //$("#parentIndustryUL").append(" <li value="+industry.xyIndustryId+">"+industry.industryName+"</li>");
    }
    add();
    // 选择优惠券
    var wai1 = $('#wai1');
    var wai2 = $('#wai2');
    var wai3 = $('#wai3');
    var nouse = $('#nouse');
    var outdata = $('#outdata');
    var used = $('#used');
    $('#nouse').click(function() {
        wai1.css('display', 'block');
        wai2.css('display', 'none');
        wai3.css('display', 'none');
        nouse.css('color', '#FE0A01');
        outdata.css('color', '#252729');
        used.css('color', '#252729');
    })
    $('#outdata').click(function() {
        wai1.css('display', 'none');
        wai2.css('display', 'block');
        wai3.css('display', 'none');
        nouse.css('color', '#252729');
        outdata.css('color', '#FE0A01');
        used.css('color', '#252729');
    })
    $('#used').click(function() {
        wai1.css('display', 'none');
        wai2.css('display', 'none');
        wai3.css('display', 'block');
        nouse.css('color', '#252729');
        outdata.css('color', '#252729');
        used.css('color', '#FE0A01');
    })
    var circle1 = $('.wai1 .youhui .circle1');
    circle1.click(function() {
        if($(this).find('.icon-duigou').css('color') == 'rgb(255, 255, 255)') {
            //			alert(1)
            $(this).find('.icon-duigou').css('color', 'rgb(254, 10, 1)');
            $(this).css('border', '0.02rem solid rgb(254, 10, 1)');
            $(this).parents('.wai').siblings().find('.icon-duigou').css('color', 'rgb(255, 255, 255)');
            $(this).parents('.wai').siblings().find('.circle1').css('border', '0.02rem solid #999');
        } else {
            //				alert(2)
            $(this).find('.icon-duigou').css('color', 'rgb(255, 255, 255)');
            $(this).css('border', '0.02rem solid #999');
        }
    })
    $('.xuan3').click(function(){
        $.ajax({
            url:"{:url('order/Order/confirm')}",
            data:{
                activity_id:'{$data.activity.activity_id}',
                schedule_id:schedule_id,
                num:$("#quantity").html()
            },
            type:"POST",
            dataType:"JSON",

            success: function (data) {
                console.log(data.data.coupons);
                $('.choose_waitquan').css('display','block');



            }
        })
    })
    // // 点击确定时,出行人名字添加到数组,回显到订单提交页面;
    function agreeFun3() {
        var arr = []
        for(var i = 0; i < $(".wai1 .wai").length; i++) {
            if($(".wai1 .wai").eq(i).find('.icon-duigou').css('color') == 'rgb(254, 10, 1)') {
                var price = $(".wai1 .wai").eq(i).find('.money_five').html();
                arr.push(price);
            }
        }
        $('.choose_waitquan').css('display','none');
        $('.xuanze1').html('¥'+arr[0]+'代金券');

    }

    $('.ok_chu').click(function() {
        if($('.name_1').val() == '') {
            toast('请填入您的姓名');
        } else if($('.phone').val() == '') {
            toast('请输入电话号码');
        } else if(!AuglyTest_phone.test($('.phone').val())) {
            toast('电话号码格式不正确');
        } else if($('.wei').val() == '') {
            toast('请输入微信号码');
        } else if($('.zfzid').val() == '') {
            toast('请输入身份证号');
        } else if(!AuglyTest_ID.test($('.zfzid').val())) {
            toast('身份证号输入不正确');
        } else {
            toast('验证通过');
            $('.jia_travel').css('display','none');
        }}
    )

    $('.ok_xing').click(function(){
        $('.jia_travel').css('display','block')
    })

    $('.yu').click(function() {

        if ($(this).attr('src') == '__TMPL__/static/images/circle.png') {

            $(this).attr('src','__TMPL__/static/images/circle1.png')  ;
            $('.yu1').attr('src','__TMPL__/static/images/circle.png')  ;
        } else {
            $(this).attr('src').attr('src','__TMPL__/static/images/circle.png')  ;
            $('.yu1').attr('src').attr('src','__TMPL__/static/images/circle1.png')  ;
        }
    })
    $('.yu1').click(function() {

        if ($(this).attr('src') == '__TMPL__/static/images/circle.png') {

            $(this).attr('src','__TMPL__/static/images/circle1.png')  ;
            $('.yu').attr('src','__TMPL__/static/images/circle.png')  ;
        } else {
            $(this).attr('src').attr('src','__TMPL__/static/images/circle.png')  ;
            $('.yu').attr('src').attr('src','__TMPL__/static/images/circle1.png')  ;
        }
    })

    var liangVal = $('.xuandan').html();
    var tem = '';
    $('.required span').click(function(e) {
        tem = $(this).html();
        $(this).css('color', 'red');
        $(this).siblings().css('color', '#000');

    });
    $('.call').click(function() {
        $('.xuandan').html(liangVal);
    })

    $('.confirm').click(function() {

        $('.xuandan').html(tem);
        console.log($('.xuandan').html(tem))
        liangVal = tem;
        if(tem==''){
            $('.xuandan').html('请选择');
        }
        $('.move').css('display', 'none');


    })

    $('.bianji').click(function(){
        $('.jia_travel').css('display','block');

    })

    $('.agreed').click(function () {
        $.ajax({
            url:"{:url('portal/Index/bindMobile')}",
            data:{
                tel:$('.phone_input').val()
            },
            type:"POST",
            dataType:"JSON",

            success: function () {
                is_first=0;
            }
        })
    })
</script>

</body>

</html>