order.html 26.7 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
<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="/themes/simplebootx/Portal/Template/css/swiper-3.4.2.min.css" />
		<link rel="stylesheet" type="text/css" href="/themes/simplebootx/Portal/Template/css/order.css" />
		<script src="/themes/simplebootx/Portal/Template/js/base.js" type="text/javascript" charset="utf-8"></script>

        <!--jquery weui-->
        <link rel="stylesheet" href="/themes/simplebootx/Portal/Template/css/weui.min.css">
        <link rel="stylesheet" href="/themes/simplebootx/Portal/Template/css/jquery-weui.css">
        <link rel="stylesheet" href="/themes/simplebootx/Portal/Template/css/demos.css">
		<!--时间插件-->
		<link rel="stylesheet" href="/themes/simplebootx/Portal/Template/datecss/mobiscroll.css" />
		<link rel="stylesheet" href="/themes/simplebootx/Portal/Template/datecss/mobiscroll_003.css" />
		<link rel="stylesheet" href="/themes/simplebootx/Portal/Template/datecss/mobiscroll_002.css" />
		<!--<link rel="stylesheet" type="text/css" href="css/index.css" />-->
		<link rel="stylesheet" type="text/css" href="/themes/simplebootx/Portal/Template/css/init.css" />
		<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
		<title>提交订单</title>
		<script>
            wx.config({
                debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
                appId: '{$sdk.appId}', // 必填,公众号的唯一标识
                timestamp: '{$sdk.timestamp}', // 必填,生成签名的时间戳
                nonceStr: '{$sdk.nonceStr}', // 必填,生成签名的随机串
                signature: '{$sdk.signature}',// 必填,签名
                jsApiList: [
                    'chooseWXPay'
                ] // 必填,需要使用的JS接口列表
            });
		</script>
		<style>
			.state {
				color: RGBA(153, 153, 153, 1);
				font-size: 0.26rem;
				width: 6.62rem;
				padding-left: 0.26rem;
				padding-right: 0.26rem;
				/*height:20px;*/
			}
			.name {
				color: RGBA(51, 51, 51, 1);
				font-size: 0.26rem;
				height: 20px;
				width: 6.62rem;
				padding-left: 0.26rem;
				padding-right: 0.26rem;
			}

			.machine {
				color: RGBA(51, 51, 51, 1);
				font-size: 0.26rem;
			}

			.circle {
				width: 15px;
				height: 15px;
				background: rgba(255, 255, 255, 1);
				border: 1px solid #DDDDDD;
				border-radius: 50%;
			}
			.printer {
				/*width: 3rem;
				height: 40px;*/
				flex: 1;
			}

			/*我写的*/
			.demos{
				display: flex;
				align-items: center;
				justify-content: space-between;
				font-size: 0.26rem;
			}
			/*.demos .icon-xuanzhong{*/
				/*margin-right: 0.2rem;*/
				/*color: #999;*/
			/*}*/
			.icon-xuanzhong{
				color:#C90103;
			}
			/*地址选择遮罩层*/
			.container{
				position:fixed;
			}
			.wrapper{
				width: 7.5rem;
			    height: 100%;
			    background-color: rgba(0,0,0,0.5);
			    position: fixed;
			    z-index: 2;
			    /*top: 29px;
			   */

			}
			.eat_popup {
			    width: 7.5rem;
			    background-color: #FFFFFF;
			    min-height: 1rem;
			    position: absolute;
			    left: 0;
			    top: 0;
			    z-index: 4;
			    overflow: hidden;
			    }
			.popupmodel {
			    width: 7.5rem;
			    background-color: #FFFFFF;
			    height: 6.72rem;
			    position: absolute;
			    left: 0;
			    top: 0;
			    z-index: 4;
			    overflow: hidden;
			    border-radius: 0;
			    }
			.popup_title {
				    display: flex;
				    justify-content: space-between;
				    line-height: 0.92rem;
				    padding: 0 0.41rem 0 0.37rem;
				    height: 0.92rem;
				}
			.popup_title span {
				    font-size: 0.28rem;
				    color: #FEAD00;
				}
			.span {
			    margin: 0rem;
			    padding: 0rem;
			}
			.hope_address {
			    width: 3.16rem;
			    height: 0.56rem;
			    background-color: #EEF6E5;
			    font-size: 0.28rem;
			    line-height: 0.56rem;
			    display: block;
			    text-align: center;
			    border-radius: 0.1rem;

			}
			.popup_address_item {
			    display: flex;
			    flex-direction: column;
			    padding: 0.26rem 0.25rem 0.3rem 0.35rem;
			    border: 1px solid #E4E4E4;
			    width: 4.72rem;
			    height: 1.4rem;
			    margin-top: 0.24rem;
			    margin-left: 0.38rem;
			}
			.popup_address_item span {
			    font-size: 0.3rem;
			}
			.popup_address_wrap {
			    display: flex;
			    justify-content: space-between;
			}
			.popup_address_wrap p:nth-child(1) {
			    font-size: 0.26rem;
			}
			.popup_address_wrap p:nth-child(2) {
			    font-size: 0.24rem;
			    display: block;
			    border: 1px solid #FEAD00;
			    color: #FEAD00;
			    width: 1.49rem;
			    height: 0.37rem;
			    border-radius: 19rem;
			    text-align: center;
			    line-height: 0.37rem;
			}
			.popup_address_wrap a {
			    color: #FEAD00;
			}
			.popup_title p {
			    font-size: 0.24rem;
			    color: #67C33E;
			}
			.popup_tab {
			    height: 5.8rem;
			    display: flex;
			    border-top: 1px solid #E4E4E4;
			}
			.popup_nav {
			    width: 2rem;
			    background-color: #F7F7F7;
			    height: 100%;
			    border-right: 1px solid #E4E4E4;
			    overflow-y: auto;
			    position: relative;
			    overflow-x: hidden;
			}
			.popup_nav ul li {
			    font-size: 0.28rem;
			    line-height: 0.48rem;
			    width: 2rem;
			    text-align: center;
			    padding: 0.16rem 0;
			    border-bottom: 1px solid #E4E4E4;
			}
			/*食堂*/
			.address_list {
			    padding: 0 0.4rem 1rem;
			}
			.address_item {
			    border-bottom: 1px solid #E4E4E4;
			    padding: 0.37rem 0 0.33rem;
			    display: flex;
			    justify-content: space-between;
			}
			.distance {
			    font-size: 0.3rem;
			    color: #333333;
			    margin-bottom: 0.32rem;
			    line-height: 0.3rem;
			}
			.distance span {
			    font-size: 0.28rem;
			    color: #FCB801;
			    margin-left: 0.3rem;
			}
			.business {
			    font-size: 0.28rem;
			    color: #666666;
			    margin-bottom: 0.21rem;
			    line-height: 0.28rem;
			}
			.address_item_right {
			    width: 0.54rem;
			    height: 1.33rem;
			    color: #999999;
			    background-color: #EEEEEE;
			    display: flex;
			    align-items: center;
			    justify-content: center;
			    font-size: 0.4rem;
			}

            /*选定时间*/
            .weui-picker-modal {
                width: 100%;
                position: absolute;
                bottom: 0;
                text-align: center;
                border-radius: 0;
                opacity: 0.6;
                color: #3d4145;
                -webkit-transition-duration: .3s;
                transition-duration: .3s;
                height:8rem;
                background: #EFEFF4;
                -webkit-transform: translate3d(0, 100%, 0);
                transform: translate3d(0, 100%, 0);
                -webkit-transition-property: opacity, -webkit-transform;
                transition-property: opacity, -webkit-transform;
                transition-property: transform, opacity;
                transition-property: transform, opacity, -webkit-transform;
            }
            .toolbar .toolbar-inner {
                height: 1rem;
                display: -webkit-box;
                display: -ms-flexbox;
                display: flex;
                text-align: center;
            }
            .toolbar .title {
                position: absolute;
                display: block;
                width: 100%;
                padding: 0;
                font-size: .23rem;
                font-weight: normal;
                line-height: 1rem;
                color: #3d4145;
                text-align: center;
                white-space: nowrap;
            }
            .toolbar .picker-button {
                position: absolute;
                right: 0;
                box-sizing: border-box;
                height: 1rem;
                line-height:1rem;
                color: #04BE02;
                z-index: 1;
                padding: 0 .5rem;
                font-size:0.2rem;
            }
            .weui-picker-modal .picker-item {
                height: 32px;
                line-height: 32px;
                padding: 0 10px;
                white-space: nowrap;
                position: relative;
                overflow: hidden;
                text-overflow: ellipsis;
                color: #9b9b9b;
                left: 0;
                top: 0;
                width: 100%;
                box-sizing: border-box;
                -webkit-transition: 300ms;
                transition: 300ms;
                font-size:0.3rem;
            }
            [v-cloak]{
                display:none;
            }
            /*.weui-picker-modal .picker-item {*/
                /*height: 12px;*/
                /*line-height: 12px;*/
                /*padding: 0 10px;*/
                /*white-space: nowrap;*/
                /*position: relative;*/
                /*overflow: hidden;*/
                /*text-overflow: ellipsis;*/
                /*color: #9b9b9b;*/
                /*left: 0;*/
                /*top: 0;*/
                /*width: 100%;*/
                /*box-sizing: border-box;*/
                /*-webkit-transition: 300ms;*/
                /*transition: 300ms;*/
            /*}*/

            body{
                -webkit-overflow-scrolling:touch;
            }
		</style>
	</head>

	<body>
		<div id="order" v-cloak>
			<!--选择地址遮罩层-->
			<!--遮罩-->
			<div class="wrapper hidden" style="margin-top: 0rem;margin-bottom: 2rem;" v-if="mask" @click="mars()">
				<!--到店堂食弹层-->
				<div class="eat_popup" style="display: block;" v-if="storeblock">
					<div class="address_list" >
						<div class="address_item" v-for="item in storelist" :id="item.store_id" @click="changespot(item)">
							<div class="address_item_left">
								<p class="distance">
									<span class="storename" style="color:#666666">{{item.store_name}}</span>
									<span>距您{{item.distance_text}}</span>
								</p>
								<p class="business"><i class="iconfont icon-shijianzhongbiao"></i>营业时间:{{item.open_end}}-{{item.open_start}}</p>
								<p class="business"><i class="iconfont icon-hdxq_icon"></i>{{item.store_address}}</p>
							</div>
							<div class="address_item_right" v-bind:id="JSON.stringify(item)" @click="jumpaddress(item)">
								&gt;
							</div>
						</div>
						<!--<div class="address_item">
							<div class="address_item_left">
								<p class="distance">香格里拉大酒店<span>距您3km</span></p>
								<p class="business"><i class="iconfont icon-shijianzhongbiao"></i>营业时间:12:00-14:00</p>
								<p class="business"><i class="iconfont icon-hdxq_icon"></i>天津市和平区气象台路中环公寓29</p>
							</div>
							<div class="address_item_right">
								&gt;
							</div>
						</div>
						<div class="address_item">
							<div class="address_item_left">
								<p class="distance">香格里拉大酒店<span>距您3km</span></p>
								<p class="business"><i class="iconfont icon-shijianzhongbiao"></i>营业时间:12:00-14:00</p>
								<p class="business"><i class="iconfont icon-hdxq_icon"></i>天津市和平区气象台路中环公寓29</p>
							</div>
							<div class="address_item_right">
								&gt;
							</div>
						</div>-->
					</div>
				</div>
				<!--就近自提弹层-->
				<div class="popupmodel hidden" style="display:block" v-if="spotblock">
					<!--<div class="head_tab">
					<div class="active"></div>
					<span class="head_tab_left">就近自提</span><span class="head_tab_right">到店堂食</span>
				</div>-->
					<div class="popup_title">
						<span>选择自提点</span>
						<p class="hope_address" style="margin-top: 0.2rem;">没有门口的?点我试试!</p>
					</div>
					<div class="popup_tab">
						<div class="popup_nav">
							<ul>
								<li v-for="item in selfarea" v-bind:id="item.area_id" @click="add(item.area_id)">{{item.area_name}}</li>
								<!--<li>西城</li>
								<li>朝阳</li>
								<li>海淀</li>
								<li>通州</li>
								<li>西城</li>
								<li>朝阳</li>
								<li>海淀</li>
								<li>通州</li>-->
							</ul>
						</div>
						<div class="popup_address" style="padding-top: 0.2rem;">
							<div class="popup_address_item" v-for="item in spot" @click="cartpay(item)">
								<span>{{item.spot_name}}</span>
								<div class="popup_address_wrap">
									<p><i class="iconfont icon-hdxq_icon"></i>{{item.distance_text}}</p>
									<p @click="jump(item.spot_id)" v-bind:id="item.spot_id">
										<a href="#">取货点详情</a>
									</p>
								</div>
							</div>
							<!--<div class="popup_address_item">
								<span>国贸地铁A口</span>
								<div class="popup_address_wrap">
									<p><i class="iconfont icon-hdxq_icon"></i>距您0.8km</p>
									<p>
										<a href="TakeDetails.html">取货点详情</a>
									</p>
								</div>
							</div>-->
							<!--<div class="popup_address_item">
								<span>国贸地铁A口</span>
								<div class="popup_address_wrap">
									<p><i class="iconfont icon-hdxq_icon"></i>距您0.8km</p>
									<p>
										<a href="TakeDetails.html">取货点详情</a>
									</p>
								</div>
							</div>-->
						</div>
					</div>
				</div>
			</div>

		<div class="container" v-cloak>

			<!--遮罩-->
			<div class="wrap" style="display: none;">
				<!--弹层-->
				<div class="popup_wrap" style="display:none;">
					<div class="popup">
						<span class="choose">选择您期望的地址</span>
						<span class="text">为了后期更好的为您服务</span>
						<div class="btn" @click="hopeaddress()">
							确定
						</div>
					</div>
				</div>
				<!--付款弹层-->
				<div class="order_pay_popup_wrap" style="display: none;">
					<div class="order_pay_popup">
						<div class="pay_details" @click="remain()">
							<i class="iconfont icon-balance" style="color: #FFA200;"></i>
							<p>余额支付</p>
						</div>
						<div class="pay_details" style="border-top: 1px solid #E4E4E4;" @click="wexinpay()">
							<i class="iconfont icon-weixinzhifu" style="color: #24BB1E;"></i>
							<p>微信支付</p>
						</div>
					</div>
				</div>
			</div>



			<!--头部-->
			<div class="header">
				<div class="head_tab">
					<div class="active"></div>
					<span class="head_tab_left" @click="spotchange()">就近自提</span><span class="head_tab_right" @click="storechange()">到店堂食</span>
				</div>
			</div>
			<!--订单地址-->
			<div class="take_address" v-show="selectstop" v-cloak>
				<div class="take_address_wrap">
					<div class="address_details">
						<p class="address_text">取货地址:{{address}}{{distance}}</p>
					</div>
					<div class="take_address_btn">
						<span class="address_reset resetspot" @click="resetspot()"><i class="iconfont icon-icon-test2"></i>地址重置</span>
						<span class="hope_address">期望自取地址</span>
					</div>
					<i class="iconfont icon-icon-test3" @click="spotdetail()"></i>
				</div>
			</div>
			<div class="take_address" v-show="selectstore" v-cloak>
				<div class="take_address_wrap">
					<div class="address_details">
						<p class="address_text">取货地址:{{storeaddress}}{{storedistance}}</p>
					</div>
					<div class="take_address_btn">
						<span class="address_reset resetstore" @click="resetstore()"><i class="iconfont icon-icon-test2"></i>地址重置</span>
						<!--<span class="hope_address">期望自取地址</span>-->
					</div>
					<i class="iconfont icon-icon-test3" @click="storedetail()"></i>
				</div>
			</div>
			<!--输入-->
			<div class="input_box" v-show="selectstop">
				<!--姓名-->
				<div class="input_box_name">
					<p class="name" style="margin-top: 15px;">姓名</p>
					<input type="textbox" name="" class="name_textbox" id="" value="" placeholder="请填写您的姓名" v-model="name"/>
				</div>
				<!--手机号-->
				<div class="input_box_name">
					<p class="name" style="margin-top: 15px;">手机号</p>
					<input type="textbox" name="" class="num_textbox" id="" value="" placeholder="请填写您的手机号" v-model="telephone"/>
				</div>
				<!--自取时间-->
				<!--<div class="input_box_name">
					<p class="name">自取时间</p>
					<input type="textbox" name="" id="" value="" placeholder="请选择自取时间" />
					<p class="icon">&gt;</p>
				</div>-->
				<!--<div class="demos input_box_name">-->
					<!--<p class="name">自取时间</p>-->
					<!--<input value="2015-05-01 15:42:02" class="pictime" readonly="readonly" name="appDateTime" id="appDateTime"  >-->
				<!--</div>-->

                <div class="weui-cell">
                    <div class="weui-cell__hd"><label for="time4" class="weui-label" style="font-size:0.3rem;color:#333333">定制时间</label></div>
                    <div class="weui-cell__bd" style="margin-left: 0.2rem;font-size: 0.3rem;color:#333333">
                        <input class="weui-input" id="time4" type="text" value="">
                    </div>
                </div>
			</div>

			<div class="input_box" v-if="selectstore">
				<!--姓名-->

				<p class="name">请选择打印机</p>

				<!--手机号-->
				<p class="state">支付前请您确保在餐厅大堂,在选择的打印机面前。</p>

				<!--自取时间-->
				<!--<div class="input_box_name">
					<p class="name">自取时间</p>
					<input type="textbox" name="" id="" value="" placeholder="请选择自取时间" />
					<p class="icon">&gt;</p>
				</div>-->
				<div class="input_box_name demos" style="background-color:#ffffff">
					<div class="printer" v-for="item in printer">
						<span :id="item.printer_id" @click="selectprinter(item,$event)" class="iconfont icon-weixuanzhongyuanquan" ></span>
						<span>{{item.name}}</span>
					</div>
					<!--<div class="printer">-->
							<!--<span class="iconfont icon-weixuanzhongyuanquan"></span>-->
							<!--<span>打印机2</span>-->
					<!--</div>-->
					<!--<div class="printer">-->
							<!--<span class="iconfont icon-weixuanzhongyuanquan"></span>-->
							<!--<span>打印机1</span>-->
					<!--</div>-->
				</div>
			</div>
			<!--产品信息-->
			<div class="content">
				<div class="content_list">
					<div class="content_item" v-for="item in cartListSelected">
						<img v-bind:src="item.thumb" />
						<div class="content_item_text">
							<span class="content_item_text_h">{{item.goods_name}}</span>
							<span class="content_item_text_subh">{{item.goods_description}}</span>
							<div class="content_item_num">
								<span class="content_item_num_money">¥{{item.goods_price}}</span>
								<span class="content_item_num_num">&#88;{{item.goods_num}}</span>
								<span class="total">合计:¥{{item.subtotal}}</span>
							</div>
						</div>
						<!--<div class="total">
							合计:¥398
						</div>-->
					</div>
				</div>
			</div>
			<!--订单备注-->
			<div class="order_remark">
				订单备注<input type="textbox" name="" id="" :value="remark" placeholder="请填写" />
				<p class="icon">&gt;</p>
			</div>
			<div class="order_pay">
				支付方式 <span v-if="remainpay">余额支付</span>
						<span v-if="weipay">微信支付</span>
				<p class="icon">&gt;</p>
			</div>
			<!--<div class="iconfont icon-xuanzhong" style="color: red;"></div>-->
			<!--footer-->
			<div class="footer">
				<span class="real">实付款:</span><span class="footer_money">¥ {{num}}</span>
				<span class="footer_btn" @click="paymentorder()">确认支付</span>
			</div>
		</div>

		</div>
		<script src="/themes/simplebootx/Portal/Template/js/vue.js" type="text/javascript" charset="utf-8"></script>
		<script src="/themes/simplebootx/Portal/Template/js/vue.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="/themes/simplebootx/Portal/Template/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="/themes/simplebootx/Portal/Template/js/cookie.js" type="text/javascript" charset="utf-8"></script>
		<script src="/themes/simplebootx/Portal/Template/js/swiper-3.4.2.jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="/themes/simplebootx/Portal/Template/js/order.js" type="text/javascript" charset="utf-8"></script>
		<script src="/themes/simplebootx/Portal/Template/datejs/jquery-1.js" type="text/javascript" charset="utf-8"></script>
		<script src="/themes/simplebootx/Portal/Template/datejs/jquery.1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
        <!--jquery weui-->
        <script src="/themes/simplebootx/Portal/Template/js/jquery-2.1.4.js" type="text/javascript" charset="utf-8"></script>
        <script src="/themes/simplebootx/Portal/Template/js/fastclick.js" type="text/javascript" charset="utf-8"></script>
        <script src="/themes/simplebootx/Portal/Template/js/jquery-weui.js" type="text/javascript" charset="utf-8"></script>
        <!--jQuery weui-->

		<script src="/themes/simplebootx/Portal/Template/datejs/mobiscroll_002.js" type="text/javascript" charset="utf-8"></script>
		<script src="/themes/simplebootx/Portal/Template/datejs/mobiscroll.js" type="text/javascript" charset="utf-8"></script>
		<script src="/themes/simplebootx/Portal/Template/datejs/mobiscroll_004.js" type="text/javascript" charset="utf-8"></script>
		<script src="/themes/simplebootx/Portal/Template/datejs/mobiscroll_003.js" type="text/javascript" charset="utf-8"></script>
		<script src="/themes/simplebootx/Portal/Template/datejs/mobiscroll_005.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			var hope_address = document.getElementsByClassName('hope_address')[0];
			var wrap = document.getElementsByClassName('wrap')[0];
			var popup_wrap = document.getElementsByClassName('popup_wrap')[0];
			var btn = document.getElementsByClassName('btn')[0];
			var order_pay = document.getElementsByClassName('order_pay')[0]
			var order_pay_popup = document.getElementsByClassName('order_pay_popup')[0]
			var order_pay_popup_wrap = document.getElementsByClassName('order_pay_popup_wrap')[0]

			btn.onclick = function(ev) {
				var oEvent = ev || event;
				oEvent.cancelBubble = true;
				wrap.style.display = 'none';
			}
			order_pay.onclick = function() {
				wrap.style.display = 'block';
				order_pay_popup_wrap.style.display = 'block'
				popup_wrap.style.display = 'none'
			}
			hope_address.onclick = function() {
				wrap.style.display = 'block';
				order_pay_popup_wrap.style.display = 'none'
				popup_wrap.style.display = 'block'
			}
			wrap.onclick = function() {
				wrap.style.display = 'none';
				popup_wrap.style.display = 'none'
			}
			var order_remark = document.getElementsByClassName('order_remark')[0];
			order_remark.onclick = function() {
				window.location.href = '/index.php?g=&m=template&a=writeremark';
			}
			//表单判断手机号姓名
			var name_textbox = document.getElementsByClassName('name_textbox')[0];
			var num_textbox = document.getElementsByClassName('num_textbox')[0];
			var footer_btn = document.getElementsByClassName('footer_btn')[0];
//			footer_btn.onclick = function() {
//				if(name_textbox.value.length == 0) {
//					alert('请输入姓名')
//				} else if(!(/^1[3|4|5|8][0-9]\d{4,8}$/.test(num_textbox.value))) {
//					alert('请输入正确手机号码')
//				} else {
//
//				}
//			}
			var head_tab_right = document.getElementsByClassName('head_tab_right')[0];
			var active = document.getElementsByClassName('active')[0];
			var head_tab_left = document.getElementsByClassName('head_tab_left')[0];
			head_tab_right.onclick = function() {
				active.style.left = 1.8 + 'rem';
				hope_address.style.display = 'none'
			}
			head_tab_left.onclick = function() {
				active.style.left = 0 + 'rem';
				hope_address.style.display = 'block'
			}

			//时间与日期
			$(function() {
				var currYear = (new Date()).getFullYear();
				var opt = {};
				opt.date = {
					preset: 'date'
				};
				opt.datetime = {
					preset: 'datetime'
				};
				opt.time = {
					preset: 'time'
				};
				opt.default = {
					theme: 'android-ics light', //皮肤样式
					display: 'modal', //显示方式
					mode: 'scroller', //日期选择模式
					dateFormat: 'yyyy-mm-dd',
					lang: 'zh',
					showNow: true,
					nowText: "今天",
					startYear: currYear - 10, //开始年份
					endYear: currYear + 10 //结束年份
				};
				$("#appDate").mobiscroll($.extend(opt['date'], opt['default']));
				var optDateTime = $.extend(opt['datetime'], opt['default']);
				var optTime = $.extend(opt['time'], opt['default']);
				$("#appDateTime").mobiscroll(optDateTime).datetime(optDateTime);
				$("#appTime").mobiscroll(optTime).time(optTime);
			});


//			//就近自提点地址重置
//			$(".resetspot").click(function(){
//				alert(111)
//			})
//
//			//堂食地址地点重置
//			$(".resetstore").click(function(){
//				alert(222)
//			})

            var date=new Date();
            //获取年月日
            var year=date.getFullYear();
            var month=date.getMonth()+1;
            var dat=date.getDate();
            //判断今天是星期几
            var str="星期"
            switch (date.getDay()){
                case 0:
                    str=str+"日";
                    break;
                case 1:
                    str=str+"一";
                    break;
                case 2:
                    str=str+"二";
                    break;
                case 3:
                    str=str+"三";
                    break;
                case 4:
                    str=str+"四";
                    break;
                case 5:
                    str=str+"五";
                    break;
                case 6:
                    str=str+"六";
                    break;
            }

            var day=year+'-'+month+'-'+dat+'('+str+')';

            var time_zone=[];
            var url = '/Flow/confirm';
            var params = {
                cart_id_str:id,
                unique_id: localStorage.getItem('unique_id')
            }
            ajaxsend(url, params, function(res) {
                /*console.log(JSON.stringify(res))*/
                console.log(res);
                var data=res.data;
                console.log(data);
                time_zone=data.time_zone;
                console.log(time_zone);
                day=day+time_zone[0];

//                $("#time4").val(day);

                $("#time4").datetimePicker({
                    times: function () {
                        return [
                            {
                                values:time_zone
                            }
                        ];
                    },
                    max: '2030-12-12',
                    onChange: function (picker, values, displayValues) {

                        console.log(values);
                    }
                });

            })



		</script>
	</body>

</html>