<wxs module="filters" src="../../../../utils/filter.wxs"></wxs>

<!--头部门店显示-->
<view class='top bdr_t-14 flex'>
	<image class="t_img" src='{{imgUrl}}/miniapp/images/goodscategory/new_store.png'></image>
  <view class='t_wz'>{{pickup.pickup_name}}</view>
</view>

<!--商品图片显示-->
<view class='center'>
  <view class='cen_img'>
    <image src="{{order.show_img}}" binderror="bind_bnerr" data-errorimg="order.show_img"></image>
  </view>

	<view class="details-container">
		<view class='cen_name ellipsis-3'>{{order.order_goods.service_name}}</view>
		<view class="flex jc_sb">
			<view class='cen_jg'>￥{{order.order_goods.price}}</view>
			<view class='cen_sl'>x{{order.order_goods.qty}}</view>
		</view>
	</view>
  
</view>

<view class="use-item bdr_b-14 jc_sb" wx:if='{{exp_type==0 && !is_default_logistics}}'>
    <view>选择物流：</view>
    <view class="flex-vertical"  bindtap="show_wu_arr"  data-txt='index' style="margin-right: 8rpx;">
				<view class="logistics-name">{{wu_arr[index].name}}</view><view class="xc-right"></view>
		</view>	
</view>

<!--成团人数-->
<view class='chentuan bdr14'>
  <view class='ct_one jc_sb'>
    <view class='ct_one_left'>成团人数</view>
    <view class='ct_one_right'>
         <text wx:if="{{teamgroup.is_xuni_ct}}" class='redwz'>{{teamgroup.jt_ct_num}}</text>
         <text wx:else class='redwz'>{{teamgroup.jt_ct_num}}</text>
         人
    </view>
  </view>
  <view class='ct_one jc_sb'>
    <view class='ct_one_left'>成团金额</view>
    <view class='ct_one_right'><text class='redwz'>￥{{filters.toFix(order.account+order.tail_money,2)}}</text></view>
  </view>

  <view class='ct_one jc_sb'>
    <view class='ct_one_left'>支付定金</view>
    <view class='ct_one_right'><text class='redwz'>￥{{filters.toFix(order.account,2)}}</text>
    </view>
  </view>
</view>

<!--尾款-->
<view class='chentuan bdr14'>
    <view class='ct_one jc_sb'>
        <view class='ct_one_left'>尾款金额</view>
        <view class='ct_one_right'>
            <text class='redwz'>￥{{order.tail_money}}</text>
        </view>
    </view>
    <view class='ct_one jc_sb' wx:if="{{exp_price>0}}">
        <view class='ct_one_left'>配送费用</view>
        <view class='ct_one_right'>
            <text class='redwz'>￥{{exp_price}}</text>
        </view>
    </view>
    <!-- 订单优惠优惠金额 -->
    <view class="ct_one jc_sb" wx:if="{{formData.order_prom_amount>0}}">
        <view>订单优惠</view>
        <view class="co-red">- ￥ {{filters.toFix(formData.order_prom_amount, 2)}}</view>
    </view>
</view>


<!-----使用佣金抵扣,只有佣金小于尾款金额的时候------>
<view class="set-mes mgt20" wx:if="{{goods.use_commission>0 && can_commission && goods.use_commission<order.tail_money+exp_price}}">
    <view class="use-item" bindtap='set_bn_commission'>
        <icon  color="{{bn_use_commission?'red':'gray'}}" size="16" type="success"></icon>
        <view class="yu_er">使用佣金 :￥{{goods.use_commission}} </view>
    </view>
</view>

<view style="height:100rpx"></view>


<!--支付-->
<view class='zf shadow'>
  <!-- <view class='zf_left'>
    <text class='zf_left_wz'>支付合计：</text>
    <text class='zf_left_red'>¥{{filters.toFix(order.tail_money+exp_price,2)}}</text>
  </view> -->
	<view class='zf_left'>支付合计：<text class='zf_left_red'>¥{{filters.toFix(order.tail_money+exp_price-(bn_use_commission?goods.use_commission:0)-formData.order_prom_amount ,2)}}</text></view>
  <view class="zf_btn {{(submit || !same_ok)?'gray':''}}" bindtap="to_pay">支付尾款</view>
</view>


<!--支付的方式选择，0微信支付  1余额支付-->
<block wx:if="{{show_pay_type}}">
   <view class="cover-layer" bindtap="close_show_pay"></view>
	 <view class="pay_type_view">
		  <view class="title">请选择支付方式</view>
			<view class="anniu_view">
				   <view bindtap="set_pay_type" data-type="0" >微信支付</view>
					 <view bindtap="set_pay_type" data-type="1" >余额支付</view>
			</view>
	 </view>
</block>

<warn id="warn"></warn>

<!----弹起选择物流名的列表---->
<view wx:if='{{open_express==1}}' >
    <view class="cover-layer flex-center "  bindtap='close_express'>
    </view>

    <view class="cx-popup radius {{open_express==1?'up' : 'down'}}" >
        <view class="tops flex">
            <view class="top-content fs32">
                <view>
                    选择物流名字
                </view>
            </view>
            <view class="close-frame"  bindtap='close_express' >
                <view class="xc-close-express">×</view>
            </view>
        </view>
        <view class="express_list">
            <view  wx:for="{{wu_arr}}" wx:for-item="express_list" wx:for-index="idx">
                <view class="express_list_frame" bindtap="click_express_name"
                      data-shippingcode="{{express_list.shipping_code}}"
                      data-name="{{express_list.name}}" data-idxe="{{idx}}">

                    <block wx:if="{{is_express==idx}}">
                        <view class="circle white xc-hook fs20 red-b"><text>Γ</text></view>
                    </block>
                    <block wx:else>
                        <view class="circle  xc-hooks"></view>
                    </block>
                    <view class="fs30">{{express_list.name}}</view>

                </view>
            </view>
        </view>
        <view class="flex click-buttem" >
            <view class="xc-determine flex-center" bindtap="determine_expres">
                <view class="flex-vertical  t-c">确定</view>
            </view>
            <view class="xc-confirms flex-center" bindtap="select_default_logistics">
                <view class="flex-vertical  t-c">设为默认</view>
            </view>
        </view>

    </view >
</view>
<view style="height: 50rpx"></view>

