cart2.wxml
15.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
<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 class="use-item" hidden='{{item.exp_type==1}}'>
<view>选择物流:</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>
<picker bindchange="bindPickerChange" value="{{index}}" range="{{wu_arr}}" range-key="name">
<view >{{wu_arr[index].name}}</view>
</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="xc-frame flex-level">
<view class="list-frame">
<view class="xc-coupon-effect flex-vertical flex-space-between" bindtap="sele_quan_item" data-no="1">
<view class="xc-goods-coupon ">
<view class="xc-coupon-money0">不使用优惠券</view>
<view class="flex"></view>
</view>
<view class="xc-coupon-selection flex-right-vertical" >
<icon color='red' size='20' type='success' wx:if="{{using_quan[selected_quan_pick].is_nouse_red}}"></icon>
<view class="circle xc-not-Selection" wx:if="{{!using_quan[selected_quan_pick].is_nouse_red }}"></view>
</view>
</view>
<!-- 循环那些还没有被其他门店选择的券 -->
<view class="xc-coupon-effect flex-vertical flex-space-between" wx:for="{{selected_quan_list}}" wx:if="{{!item.is_using}}" bindtap="sele_quan_item" data-ind="{{index}}">
<view class="xc-goods-coupon ">
<view class="xc-coupon-money">{{item.Sum}}元</view>
<view class="xc-coupon-money1">订单满{{item.BuySum}}元使用</view>
<view class="flex xc-coupon-time">使用期限
<view class="time" wx:if="{{item.BeginDate && item.ValidDate}}" >
{{filters.replace_time(item.BeginDate)}}至{{filters.replace_time(item.ValidDate)}}
</view>
</view>
</view>
<view class="xc-coupon-selection flex-right-vertical" >
<icon color='red' size='20' type='success' wx:if="{{item.show_red}}"></icon>
<view class="circle xc-not-Selection" wx:if="{{!item.show_red }}"></view>
</view>
</view>
</view>
</view>
<view class="xc-confirm flex-center" bindtap="confirm_quan">
<view class="flex-vertical t-c">确定</view>
</view>
</view >
</view>
<warn id="warn"></warn>