<!--pages/confirmOrder/confirmOrder.wxml-->
<wxs src="../..//wxs/utils.wxs" module="utils" />

<view class="page-confirm-order">
	<form bindsubmit="formSubmit">
		<view class="address-wrap">
			<block wx:if="{{goodsAddress}}">
				<view class="address-section">
					<input class="address-input" name="name" placeholder="请输入收货人姓名" />
					<input class="address-input" name="phone" placeholder="请输入手机号码" />
				</view>
				<view class="address-section">
					<picker
					 class="address-input address-picker"
					 mode="multiSelector"
					 bindchange="bindMultiPickerChange"
					 bindcolumnchange="bindMultiPickerColumnChange"
					 value="{{multiIndex}}"
					 range="{{citys}}"
					>
						<view class="form-picker" style="padding-top: 8rpx;" wx:if="{{cityView}}">
							{{cityView}}
						</view>
						<view wx:if="{{!cityView}}">
							<input
							 class='form-input'
							 placeholder-class="placeholder-picker"
							 style="padding-top: 8rpx;"
							 type="text"
							 disabled
							 placeholder="所在区域"
							/>
						</view>
					</picker>
				</view>
				<view class="address-section">
					<input class="address-input address-detail" name="address" placeholder="请输入路名门牌号" />
				</view>
			</block>
			<block wx:if="{{!goodsAddress}}">
				<view class="address-list" bindtap="selectAddress">
					<view class="address-info">
						<view>
							<image class="defalut-add-img" src="{{addressInfo.type == 1 ? '/assets/imgs/7_1_0/08_22/defalut.png' : '/assets/imgs/7_1_0/08_22/no-defalut.png'}}" />
							<text class="user-name">{{addressInfo.name}}</text>
							<text class="phone-number">{{addressInfo.phone}}</text>
						</view>
						<view class="address-list-detail">
							{{addressInfo.fullArea}} {{addressInfo.address}}
						</view>
						<view class="arrow-right-wrap">
							<image class="arrow-right" src="/assets/imgs/7_1_0/arrow-right.png" />
						</view>
					</view>
				</view>
			</block>
			<view class="wx-address" bindtap="chooseWxAddress">
				+ 使用微信地址
			</view>
		</view>
		<view class="address-line">
			<image src="/assets/imgs/7_1_0/address-line.png" />
		</view>
		<!-- 分割线 -->
		<view class="gray-line" />
		<!-- 商品列表 -->
		<view class="pro-wrap">
			<block wx:for="{{currentOrderList.tradePreviewSkus}}" wx:key="{{item}}">
				<view class="pro-list">
					<image class="pro-img" src="{{item.productImgUrl}}" />
					<view class="pro-info">
						<view class="pro-name">{{item.productName}}</view>
						<view class="pro-desc">
							规格 {{item.skuSpec}}
						</view>
						<view class="pro-price">
							<text class="price">￥{{item.price}}</text>
							<text class="number">x {{item.count}}</text>
						</view>
					</view>
				</view>
			</block>
		</view>
		<!-- 分割线 -->
		<view class="gray-line" />

		<!-- 商品合计 -->
		<view class="pro-sum">
			<view class="vip-info">
				<view class="vip-left">
					<view class="left-top">
						<image class="top-image" src="/assets/imgs/7_1_0/plus-icon.png" />
						<text>现在勾选成为vip，立领200元礼包，文案文案 </text>
					</view>
					<view class="left-bottom">
						<text>vip可尊享N大权益</text>
						<image class="bottom-image" src="/assets/imgs/7_1_0/explain.png" />
					</view>
				</view>
				<view class="vip-right">
					<view class="right-check-status" bindtap="handelChangeSelectVip">
						<image class="check-status-img" src="{{isSelect ? '/assets/imgs/7_1_0/08_22/trade-success.png' : '/assets/imgs/7_1_0/08_22/trade-unsel.png'}}" />
					</view>
					<view class="right-check-tips {{isSelect? 'tip-check' : 'tip-un-check'}}">
						<image class="select-check-open {{isSelect? 'tip-check' : 'tip-un-check'}}" src="{{isSelect ? '/assets/imgs/7_1_0/08_22/sel.png' : '/assets/imgs/7_1_0/08_22/un-sel.png'}}" />
					</view>
				</view>
			</view>
			<view class="order-sum">
				<view class="order-price">
					<view class="pro-total-price">
						<text class="price-label">商品合计</text>
						<text class="total-price">￥{{currentOrderList.amount}}</text>
					</view>
					<view class="plus-price" wx:if="{{isSelect}}">
						<view class="plus-info">
							<text class="price-label">plus会员价</text>
							<text class="member-price">-￥20</text>
						</view>
						<text class="plus-member-price">￥289</text>
					</view>
				</view>
				<view class="coupon">
					<view>
						<text class="price-label">优惠券</text>
						<view class="select-coupon" bindtap="selectCoupon">
							<text class="{{haveCoupon ? 'coupon-price' : 'no-coupon'}}"> {{currentCoupon ? '-' : '无可用优惠券'}} {{currentCoupon}}</text>
							<image class="arrow-right" src="/assets/imgs/7_1_0/arrow-right.png" />
						</view>
					</view>
				</view>
				<view class="coupon" wx:if="{{isSelect}}">
					<view>
						<text class="price-label">VIP会员年费</text>
						<text class="vip-desc"> （不可使用任何优惠或积分）</text>
						<view class="select-coupon">
							<text class="coupon-price">+￥100</text>
							<image class="arrow-right" src="/assets/imgs/7_1_0/arrow-right.png" />
						</view>
					</view>
				</view>
				<!-- <view class="total">
        <text class="total-label">小计：</text>
        <text class="total-numer">￥186</text>
      </view> -->
			</view>
		</view>

		<view class="pro-footer">
			<view class="cost">
				<text class="cost-label">实付款：</text>
				<text class="cost-price">￥{{utils.numberFormat(orderPrice)}}</text>
			</view>
			<!-- <button form-type="submit" class="theme-color buy-btn">立即购买</button>-->
		<!--	<view class="theme-color buy-btn" bindtap="handelGobuy">立即购买</view> -->

			<view class="theme-color buy-btn">
				<button form-type="submit" style="display: inline;" class="theme-color buy-btn">立即购买</button>
			</view>
		</view>
	</form>
</view>
<!--goHome-->
<go-home/>
<select-coupon show="{{showSelectCoupon}}" bind:updateCoupon="updateCoupon" coupon-list="{{currentOrderList.couponDiscountPreviews}}"/>

