cart2.wxml 20 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
<wxs module="filter" src="c_filter.wxs"></wxs>
<wxs src="filter.wxs" module="util"></wxs>
<wxs module="filters" src="../../../utils/filter.wxs"></wxs>
<wxs module="filters" src="../../../utils/filter.wxs"></wxs>
<form bindsubmit="submitForm">
    <view class="container"> 
         <!--要进行判断地址是否显示---->
        <view bindtap="enterAddressPage" class="user-mes"
            hidden='{{(bn_exp_type==1 && is_b_now==1) || (is_all_zt==1 && is_b_now==0)}}'>
            <!---默认地址显示------>
            <block wx:if="{{user_addr!=null}}">
                <view class="user-contact">{{user_addr.consignee}}{{'  '}}{{user_addr.mobile}}</view>
                <view class="location">
                    <view class="address">{{user_addr.more_address}}{{'  '}}{{user_addr.address}}</view>
                    <view class="pos-icon">
                        <image class="wh100" src="{{imgUrl}}/miniapp/images/iconfont-address.png"></image>
                    </view>
                </view>
                <view class="update-logistics">
                     <image class="arrow-rigth" src="{{imgUrl}}/miniapp/images/icon-arrowdown.png"></image>
                </view>
            </block>
            <!---先增地址------>
            <block wx:else>
                <view class="add_new">
                    <image class="addr_jia" src="{{imgUrl}}/miniapp/images/jia.png"></image>添加地址
                </view>
            </block>
            <view class="border-img"><image class="wh100" src="{{imgUrl}}/miniapp/images/tt.png"></image></view>
        </view>

        <!---------------------购物车进来,有可能多单---------------------->
        <block wx:if="{{is_b_now==0}}">
            <view  wx:for="{{cartlist}}" wx:for-index="pidx">
                <view class="use-item bfff">
                      <image class="dp" src='{{imgUrl}}/miniapp/images/dianpu.png'> </image> <view>门店:{{item.pname}}</view></view>
                <view class="order-detail" wx:for="{{item.goods}}" wx:for-index="idx"  wx:for-item="items">
                    <!----商品图片----->
                    <view class="goods-img">
                        <image class="wh100" src="{{items.original_img}}"  binderror='cart_set_err'
                         data-err='cartlist[{{pidx}}].goods[{{idx}}].original_img' ></image>
                    </view>
                    <!----商品名称规格---->
                    <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{items.goods_id}}">
                        <view class="goods-name">{{items.goods_name}}</view>
                         <view class="goods-color">
                                <text wx:if="{{items.goods_spec!='' && items.goods_spec!=null }}">{{items.goods_spec}}/</text>
                                {{items.goods_color==null?"":items.goods_color}}
                          </view>
                    </navigator>
                     <!-----商品名称规格------>
                    <view class="order-num">
                        <view class="co-red">¥{{items.goods_price}}</view>
                        <view class="goods-num">x{{items.goods_num}}</view>
                    </view>
                </view>

                <!-----使用优惠券------>
                <view class="xc-coupon-frame flex-center" data-bn="0"  bindtap="open_coupon_list" 
				    wx:if="{{item.quan_list && item.quan_list.length>0 }}" data-cind="{{pidx}}" data-pickid="{{item.pickup_id}}">
                    <view class="work-frame flex-space-between">
                        <view class="work">使用优惠券</view>
                        <view class="xc-right-frame">
                            <text wx:if="{{using_quan[item.pickup_id].is_nouse}}">不使用</text>
                            <text wx:if="{{using_quan[item.pickup_id].money}}">{{using_quan[item.pickup_id].money}}元优惠券</text>
							<view class="xc-right"></view>
                        </view>
                    </view>
                </view>

                <view class="set-mes">
                    <view wx:if="{{order.store_prom}}"><icon color="#f23030" size="16" type="info"></icon>{{order.store_prom}}
                    </view>
                    <view class="use-item">
                          <view  data-t='1' style="display:{{item.distr_t==2?'none':'flex'}};">
                             <icon  bindtap='setexptype_w' data-t='1' data-txt='cartlist[{{pidx}}].exp_type'  color="{{item.exp_type==1?'red':'gray'}}" size="16" type="success"></icon>
                             <view bindtap='setexptype_w' data-t='1' data-txt='cartlist[{{pidx}}].exp_type' class="yu_er">门店自提</view>
                          </view>

                          <view  data-t='0'  style="display:{{item.distr_t==1?'none':'flex'}};">
                             <icon   bindtap='setexptype_w' data-t='0' data-txt='cartlist[{{pidx}}].exp_type' class="wuliu" color="{{item.exp_type==0?'red':'gray'}}" size="16" type="success"></icon>
                            <view bindtap='setexptype_w' data-t='0' data-txt='cartlist[{{pidx}}].exp_type' class="yu_er">快递邮寄</view>
                          </view>
                    </view>
                    <view bindtap="express_name" class="use-item" hidden='{{item.exp_type==1}}'>
                          <view>选择物流:</view>
                           <view >{{express_name}}</view>
                          <!-- <picker bindchange="bindPickerChange_w" data-txt='cartlist[{{pidx}}].wind'  value="{{item.wind}}" range="{{wu_arr}}" range-key="name">
                                <view >{{wu_arr[item.wind].name}}</view>
                          </picker> -->
                    </view>
                </view>
                <view class="coupon-mes">
                    <view>用户备注(50字)</view>
                    <view class="leave-word">
                        <textarea bindinput="keyUpChangeNum" disabled="{{disabled}}" class="word-box" maxlength="50" name="user_note_{{item.pickup_id}}"></textarea>
                        <view class="max-word">{{maxWord}}/50</view>
                    </view>
                </view>
            </view>
            <!-----使用余额------>
            <view class="set-mes" wx:if="{{yuer>0}}">
                    <view class="use-item" bindtap='set_js_useyuer'>
                            <icon  color="{{js_use_money?'red':'gray'}}" size="16" type="success"></icon>
                            <view class="yu_er">使用余额 :¥{{yuer}} </view>
                    </view>
            </view>
        </block>

        <!------立即购买-------->
        <block wx:if="{{is_b_now==1}}">
                <view class="use-item bfff">
                      <image class="dp" src='{{imgUrl}}/miniapp/images/dianpu.png'> </image> <view>门店:{{bn_pickname}}</view></view>
                <view class="order-detail">
                      <view class="goods-img">
                          <image class="wh100" src="{{bn_goods.original_img}}" binderror='cart_set_err' data-err="bn_goods.original_img"></image>
                      </view>
                      <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{bn_goods.goods_id}}">
                          <view class="goods-name">{{bn_goods.goods_name}}</view>
                          <view class="goods-color">
                                <text wx:if="{{bn_goods.goods_spec!=''}}">{{bn_goods.goods_spec}}/</text>{{bn_goods.goods_color}}
                          </view>
                      </navigator>
                      <view class="order-num">
                          <view class="co-red">¥{{bn_goods.shop_price}}</view>
                          <view class="goods-num">x{{bn_goods.buynum}}</view>
                      </view>
                </view>
                <view class="set-mes">
                    <view wx:if="{{order.store_prom}}"><icon color="#f23030" size="16" type="info"></icon>{{order.store_prom}}
                    </view>

                    <view class="xc-coupon-frame flex-center" data-bn="1"  bindtap="open_coupon_list"  data-pickid="{{bn_pick}}"
					      wx:if="{{selected_quan_list && selected_quan_list.length>0}}">
                        <view class="work-frame flex-space-between">
                            <view class="work">
                                使用优惠券
                            </view>
                            <view class="xc-right-frame">
                                <text wx:if="{{using_quan[bn_pick].is_nouse}}">不使用</text>
								<text wx:if="{{using_quan[bn_pick].money}}">{{using_quan[bn_pick].money}}元优惠券</text>
								<view class="xc-right"></view>
                            </view>
                        </view>
                    </view>

                    <view class="use-item">
                        <view bindtap='setexptype' data-t='1'  style="display:{{bn_t_exp_t==2?'none':'flex'}};">
                          <icon   color="{{bn_exp_type==1?'red':'gray'}}" size="16" type="success"></icon>
                           <view class="yu_er">自提</view>
                        </view>
                        <view bindtap='setexptype' data-t='0'  style="display:{{bn_t_exp_t==1?'none':'flex'}};">
                            <icon  color="{{bn_exp_type==0?'red':'gray'}}" size="16" type="success"></icon>
                            <view class="yu_er">物流</view>
                        </view>
                    </view>

                    <view class="use-item" hidden='{{bn_exp_type==1}}'>
                          <view>使用物流:</view>
                          <view >{{wu_arr[index].name}}</view>
                          <!-- <picker bindchange="bindPickerChange" value="{{index}}" range="{{wu_arr}}" range-key="name">
                                
                          </picker> -->
                    </view>

                    <!-- <view class="use-item">
                        <view>使用积分 : </view>
                        <input bindblur="keyUpChangePay2" maxlength="20" name="pay_points" placeholder="可用积分为:{{order.userInfo.pay_points}}" type="number"></input>
                        <button class="use-btn" formType="submit">使用</button>
                    </view>
                    <view class="use-item">
                        <view>使用券码 : </view>
                        <input name="couponCode" placeholder="请输入优惠券券码" type="text"></input>
                        <button class="use-btn" formType="submit">使用</button>
                    </view>
                    <view class="use-item" style="display:{{payWithUserMoney&&payWithPoints?'none':'flex'}}">
                        <view>支付密码 : </view>
                        <input password maxlength="20" name="paypwd" placeholder="请输入密码" type="text"></input>
                    </view> -->
                </view>

                 <!-----使用余额------>
                <view class="set-mes" wx:if="{{yuer>0}}">
                  <view class="use-item" bindtap='set_bn_useyuer'>
                          <icon  color="{{bn_use_money?'red':'gray'}}" size="16" type="success"></icon>
                          <view class="yu_er">使用余额 :¥{{yuer}} </view>
                          <!-- <input bindblur="keyUpChangePay1" maxlength="20" name="user_money" placeholder="可用余额:{{order.userInfo.user_money}}" type="digit"></input> <button class="use-btn" formType="submit">使用</button>-->
                  </view>
                </view>
                <view class="coupon-mes">
                    <view>用户备注(50字)</view>
                    <view class="leave-word">
                        <textarea bindinput="keyUpChangeNum" disabled="{{disabled}}" class="word-box" maxlength="50" name="user_note"></textarea>
                        <view class="max-word">{{maxWord}}/50</view>
                    </view>
                </view>
         </block>

         <view class="information">
            <view class="item">
                <view>商品金额</view>
                <view class="co-red">¥ {{formData.all_price}}元</view>
            </view>
            <view class="item">
                <view>配送费用</view>
                <view class="co-red">¥ {{formData.shipping_price}}元</view>
            </view>

            <view class="item" wx:if="{{formData.coupon_price>0}}">
                <view>使用优惠券</view>
                <view class="co-red">- ¥ {{formData.coupon_price}}元</view>
            </view>
             <!--
           <view class="item">
               <view>使用积分</view>
               <view class="co-red">- ¥ {{orderPrices.integral_money}}元</view>
           </view> -->
            <view class="item">
                <view>使用余额</view>
                <view class="co-red">- ¥ {{formData.user_money}}元</view>
            </view>
            <!-- <view class="item">
                <view>优惠活动</view>
                <view class="co-red">- ¥ {{orderPrices.order_prom_amount}}元</view>
            </view> -->
        </view>
    </view>

     <view class="btn-wrap">
            <button class="tips-btn" formType="submit" id="submitOrder">提交订单</button>
            <view class="pay-amount">
                <view class="payable">应付金额 : </view>
                <view class="co-red big">¥ {{formData.order_amount}}元</view>
            </view>
     </view>
</form>

<!-- 使用券列表的弹窗 -->
<view wx:if='{{open_quan==1}}' >
    <view class="cover-layer flex-center "  bindtap='close_coupon'>
    </view>
    <view class="cx-popup {{open_quan==true?'up' : 'down'}}" >
        <view class="top flex">
            <view class="xc-top-content  t-c">
                <view class="xc-title">
                    优惠券使用
                </view>
            </view>
            <view class="xc-close-frame"  bindtap='close_coupon' >
                <view class="xc-close">×</view>
            </view>
        </view>
    <view class="may_use_coupon fs28">可使用的优惠券</view>
        <view class="xc-frame flex-level">
            <view class="list-frame">	

           <view wx:for="{{selected_quan_list}}" bindtap="sele_quan_item" data-ind="{{index}}" wx:for-item="item"wx:for-index="index">
            <view class="xc-coupon-frame flex-center" bindtap="sele_coupon" data-ind="{{index}}">
      <view class="coupon-frame flex rel">
          <!-- 锯齿 -->
          <view class="circle-frame abs">
              <view class='circle circle-sawtooth'></view>
              <view class='circle circle-sawtooth'></view>
              <view class='circle circle-sawtooth'></view>
              <view class='circle circle-sawtooth'></view>
              <view class='circle circle-sawtooth'></view>
              <view class='circle circle-sawtooth'></view>
              <view class='circle circle-sawtooth'></view>
              <view class='circle circle-sawtooth'></view>
              <view class='circle circle-sawtooth'></view>
              <view class='circle circle-sawtooth'></view>
              <view class='circle circle-sawtooth'></view>
              <view class='circle circle-sawtooth'></view>
              <view class='circle circle-sawtooth'></view>
              <view class='circle circle-sawtooth'></view>
              <view class='circle circle-sawtooth'></view>
              <view class='circle circle-sawtooth'></view>
              <view class='circle circle-sawtooth'></view>
              <view class='circle circle-sawtooth'></view>
              <view class='circle circle-sawtooth'></view>
              <view class='circle circle-sawtooth'></view>
          </view>

          <view class="coupon-left  rel {{filter.setcolor(item.UseObjectType)}} flex-center">

       
              <view class="white xc-money-frames">
                <view class="f_text">
                  <text class="xc-rmb-symbol">¥</text>
                  <text class="xc-rmb-val">{{item.Sum}}</text>
                </view>

            <view class="coupon-explain t-c" wx:if="{{item.BuySum==0}}">   
            无使用门槛            
            </view>
          <view class="coupon-explain t-c" wx:if="{{item.BuySum>0}}"> 
            {{UseObjectName}}
            </view>

          </view>
         </view>
         <view class="coupon-right flex-center rel">
            <view class="coupon-annotation  flex">

               <view class="flex  top-frame">

               <view class="frame">
                  <!-- <view class="flex"> -->
             
                      <view class="coupon-wode ib flex ellipsis-2 ">  
                               <text class="xc-brand t-c ib white {{filter.setcolor(item.UseObjectType)}}">{{filter.get_type_card(item.UseObjectType)}}
                      </text>
                         {{item.PrivilegeName}}
                      <!-- </view> -->
                    </view>
                    <view class="coupon-time">
                    {{filters.replace_time2(item.BeginDate)}}至{{filters.replace_time2(item.BillDate)}}</view>
                   </view>
               </view>
                   <!-- <view wx:if="{{item.Obtain>0}}" class="code-img" bindtap="show_quan" data-ind="{{index}}"  data-now="{{filter.format_time(now)}}">
                       <image class="coupon-code" src='{{iurl}}/miniapp/images/user_r_code.png'></image>
                   </view>
                   <view wx:else class="code-img">
                       <image class="coupon-code" src='{{iurl}}/miniapp/images/hui-ewm.png'></image>
                   </view> -->

                    <block wx:if="{{is_coupon==index}}">
        <view class="circle white xc-hook fs20 red-b  sn"><text>Γ</text></view>
      </block>
      <block wx:else>
     <view class="circle  xc-hooks on"></view>
        </block>
             </view>

    
            
           <view class="abs flex-vertical-between bottmo-explain" bindtap='clik_coupons' data-idx="{{index}}">
               <view></view>
           <view class="font-word flex">优惠券使用说明
           <view class="circle circle-size flex t-c">
           <view class="xc-jiantou">く</view>
           </view>
           </view>
           </view>
        </view>
      </view>

    </view>
    <view class="xc-buttom "wx:if="{{item.is_open==1}}">
       <text class="five-level-word  explain-coupon">{{util.format(item.Remark)}}</text>
    </view>

</view>




           
        </view> 
 </view> 
 <view class="determine-frame">
        <view class="xc-confirm flex-center" bindtap="confirm_quan">
            确定
        </view>
        </view>
    </view >
</view>


<!----弹起选择物流名的列表---->

<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-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="set_default">
            <view class="flex-vertical  t-c">设为默认</view>
        </view>
        </view>
        
    </view >
</view>




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