Commit a65088496688cd946fb2ed187e5d1b789e174309
Merge branch 'qa' into 'master'
Qa See merge request !1054
Showing
10 changed files
with
48 additions
and
19 deletions
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
@@ -499,6 +499,9 @@ Page({ | @@ -499,6 +499,9 @@ Page({ | ||
499 | console.log('calculatePrice2'); | 499 | console.log('calculatePrice2'); |
500 | var th = this, | 500 | var th = this, |
501 | good = this.data.bn_goods; | 501 | good = this.data.bn_goods; |
502 | + | ||
503 | + th.setData({is_show_sub:0}); | ||
504 | + | ||
502 | //-----------计算商品总价-------------- | 505 | //-----------计算商品总价-------------- |
503 | var allpice = th.data.param.goods_price; | 506 | var allpice = th.data.param.goods_price; |
504 | allpice = parseFloat(allpice).toFixed(2); | 507 | allpice = parseFloat(allpice).toFixed(2); |
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.wxml
@@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
2 | <form bindsubmit="submitConfirm"> | 2 | <form bindsubmit="submitConfirm"> |
3 | <view class="container"> | 3 | <view class="container"> |
4 | 4 | ||
5 | + <block wx:if="{{is_show_sub}}"> | ||
5 | <view class="tab-container" wx:if="{{kt_type!=3 || is_normal==1}}"> | 6 | <view class="tab-container" wx:if="{{kt_type!=3 || is_normal==1}}"> |
6 | <view class="tab-wrapper"> | 7 | <view class="tab-wrapper"> |
7 | <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" | 8 | <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" |
@@ -12,7 +13,7 @@ | @@ -12,7 +13,7 @@ | ||
12 | 13 | ||
13 | </view> | 14 | </view> |
14 | </view> | 15 | </view> |
15 | - | 16 | + </block> |
16 | 17 | ||
17 | <!--要进行判断地址是否显示----> | 18 | <!--要进行判断地址是否显示----> |
18 | <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{bn_exp_type==1 || kt_type==3}}'> | 19 | <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{bn_exp_type==1 || kt_type==3}}'> |
packageC/pages/presell/cart/cart.js
@@ -608,7 +608,6 @@ Page({ | @@ -608,7 +608,6 @@ Page({ | ||
608 | goods: goods, | 608 | goods: goods, |
609 | presell: presell, | 609 | presell: presell, |
610 | pre_arr: pre_arr, | 610 | pre_arr: pre_arr, |
611 | - show_submit: 1, | ||
612 | userInfo: getApp().globalData.userInfo, | 611 | userInfo: getApp().globalData.userInfo, |
613 | tail_pay: tail_pay, | 612 | tail_pay: tail_pay, |
614 | order_goods: order_goods, | 613 | order_goods: order_goods, |
@@ -630,6 +629,8 @@ Page({ | @@ -630,6 +629,8 @@ Page({ | ||
630 | async calculatePrice2() { | 629 | async calculatePrice2() { |
631 | var th = this; | 630 | var th = this; |
632 | if (!this.data.pre_arr) return false; | 631 | if (!this.data.pre_arr) return false; |
632 | + th.setData({ show_submit: 0,}) | ||
633 | + | ||
633 | //--计算物流-- | 634 | //--计算物流-- |
634 | if (this.data.exp_type == 0) { | 635 | if (this.data.exp_type == 0) { |
635 | this.calculate_wuliu(); | 636 | this.calculate_wuliu(); |
@@ -715,12 +716,12 @@ Page({ | @@ -715,12 +716,12 @@ Page({ | ||
715 | 716 | ||
716 | o_condition1 = parseFloat(o_condition1) - parseFloat(th.data.presell.presell_deposit); | 717 | o_condition1 = parseFloat(o_condition1) - parseFloat(th.data.presell.presell_deposit); |
717 | if (o_condition1 < 0) o_condition1 = 0; | 718 | if (o_condition1 < 0) o_condition1 = 0; |
718 | - th.setData({ exp_price: 0, order_m: o_condition1 }) | 719 | + th.setData({ exp_price: 0, order_m: o_condition1, show_submit: 1, }) |
719 | }) | 720 | }) |
720 | } else { | 721 | } else { |
721 | o_condition = parseFloat(o_condition) - parseFloat(th.data.presell.presell_deposit); | 722 | o_condition = parseFloat(o_condition) - parseFloat(th.data.presell.presell_deposit); |
722 | if (o_condition < 0) o_condition = 0; | 723 | if (o_condition < 0) o_condition = 0; |
723 | - th.setData({ exp_price: 0, order_m: o_condition }) | 724 | + th.setData({ exp_price: 0, order_m: o_condition, show_submit: 1, }) |
724 | } | 725 | } |
725 | } | 726 | } |
726 | }, | 727 | }, |
@@ -1952,14 +1953,14 @@ Page({ | @@ -1952,14 +1953,14 @@ Page({ | ||
1952 | 1953 | ||
1953 | ord_price = parseFloat(ord_price) - parseFloat(th.data.presell.presell_deposit); | 1954 | ord_price = parseFloat(ord_price) - parseFloat(th.data.presell.presell_deposit); |
1954 | if (ord_price < 0) ord_price = 0; | 1955 | if (ord_price < 0) ord_price = 0; |
1955 | - th.setData({ exp_price: exp_price, order_m: ord_price + parseFloat(exp_price) }) | 1956 | + th.setData({ exp_price: exp_price, order_m: ord_price + parseFloat(exp_price), show_submit: 1, }) |
1956 | 1957 | ||
1957 | }) | 1958 | }) |
1958 | } else { | 1959 | } else { |
1959 | 1960 | ||
1960 | var o_condition1 = parseFloat(o_condition) - parseFloat(th.data.presell.presell_deposit); | 1961 | var o_condition1 = parseFloat(o_condition) - parseFloat(th.data.presell.presell_deposit); |
1961 | if (o_condition1 < 0) o_condition1 = 0; | 1962 | if (o_condition1 < 0) o_condition1 = 0; |
1962 | - th.setData({ exp_price: exp_price, order_m: parseFloat(o_condition1) + parseFloat(exp_price) }) | 1963 | + th.setData({ exp_price: exp_price, order_m: parseFloat(o_condition1) + parseFloat(exp_price), show_submit: 1, }) |
1963 | } | 1964 | } |
1964 | }, | 1965 | }, |
1965 | 1966 |
packageC/pages/presell/cart/cart.wxml
@@ -108,7 +108,7 @@ | @@ -108,7 +108,7 @@ | ||
108 | </view> | 108 | </view> |
109 | </view>--> | 109 | </view>--> |
110 | 110 | ||
111 | - <block wx:if="{{wait_wk}}"> | 111 | + <block wx:if="{{wait_wk && show_submit}}"> |
112 | <!-- 立即购买的时候 --> | 112 | <!-- 立即购买的时候 --> |
113 | <view class="tab-wrapper"> | 113 | <view class="tab-wrapper"> |
114 | <view hidden="{{distr_type==2}}" bindtap='set_wuliu' data-type='1' | 114 | <view hidden="{{distr_type==2}}" bindtap='set_wuliu' data-type='1' |
packageC/pages/presell/cart/cart2.wxml
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | <view class="container"> | 6 | <view class="container"> |
7 | 7 | ||
8 | <!-- 立即购买的时候 --> | 8 | <!-- 立即购买的时候 --> |
9 | - <view class="tab-container"> | 9 | + <view class="tab-container" wx:if="{{show_submit}}"> |
10 | <view class="tab-wrapper"> | 10 | <view class="tab-wrapper"> |
11 | <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" | 11 | <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" |
12 | data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >门店自提</view> | 12 | data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >门店自提</view> |
pages/cart/cart2/cart2.wxml
@@ -4,6 +4,7 @@ | @@ -4,6 +4,7 @@ | ||
4 | 4 | ||
5 | <form> | 5 | <form> |
6 | <view class="container"> | 6 | <view class="container"> |
7 | + <block wx:if="{{show_submit}}"> | ||
7 | <!-- 立即购买的时候 --> | 8 | <!-- 立即购买的时候 --> |
8 | <block wx:if="{{is_b_now==1}}"> | 9 | <block wx:if="{{is_b_now==1}}"> |
9 | <view class="tab-container"> | 10 | <view class="tab-container"> |
@@ -26,6 +27,7 @@ | @@ -26,6 +27,7 @@ | ||
26 | </view> | 27 | </view> |
27 | </view> | 28 | </view> |
28 | </block> | 29 | </block> |
30 | + </block> | ||
29 | 31 | ||
30 | <!--要进行判断地址是否显示----> | 32 | <!--要进行判断地址是否显示----> |
31 | <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{(bn_exp_type==1 && is_b_now==1) || (is_all_zt==1 && is_b_now==0)}}'> | 33 | <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{(bn_exp_type==1 && is_b_now==1) || (is_all_zt==1 && is_b_now==0)}}'> |
@@ -126,7 +128,7 @@ | @@ -126,7 +128,7 @@ | ||
126 | </view> | 128 | </view> |
127 | 129 | ||
128 | <!-- 当是物流很多单的时候 --> | 130 | <!-- 当是物流很多单的时候 --> |
129 | - <view class="use-item flex-space-between" wx:if="{{cartlist.length>1}}"> | 131 | + <view class="use-item flex-space-between" wx:if="{{cartlist.length>1 && show_submit}}"> |
130 | <view class="flex-vertical"> | 132 | <view class="flex-vertical"> |
131 | <view bindtap='setexptype_w2' data-ind="{{pidx}}" data-t='1' data-txt='cartlist[{{pidx}}].exp_type' style="padding-right:26rpx;display:{{item.distr_t==2?'none':'flex;align-items: center'}};"> | 133 | <view bindtap='setexptype_w2' data-ind="{{pidx}}" data-t='1' data-txt='cartlist[{{pidx}}].exp_type' style="padding-right:26rpx;display:{{item.distr_t==2?'none':'flex;align-items: center'}};"> |
132 | <!-- <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> --> | 134 | <!-- <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> --> |
pages/cart/cart2_inte/cart2_inte.wxml
@@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
5 | <form bindsubmit="submitForm"> | 5 | <form bindsubmit="submitForm"> |
6 | <view class="container"> | 6 | <view class="container"> |
7 | 7 | ||
8 | - <view class="tab-container"> | 8 | + <view class="tab-container" wx:if="{{show_submit}}"> |
9 | <view class="tab-wrapper"> | 9 | <view class="tab-wrapper"> |
10 | <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" | 10 | <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" |
11 | data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >门店自提</view> | 11 | data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >门店自提</view> |
pages/cart/cart2_pt/cart2_pt.js
@@ -62,7 +62,8 @@ Page({ | @@ -62,7 +62,8 @@ Page({ | ||
62 | rank_switch: 0, //是不是开同等级卡 | 62 | rank_switch: 0, //是不是开同等级卡 |
63 | show_card: null, //显示的等级卡 | 63 | show_card: null, //显示的等级卡 |
64 | card_name: '', //显示的卡的名称 | 64 | card_name: '', //显示的卡的名称 |
65 | - card_cut_price: null,//减价多少钱 | 65 | + card_cut_price: null,//减价多少钱 |
66 | + show_btn:0, | ||
66 | }, | 67 | }, |
67 | onLoad: function (t) { | 68 | onLoad: function (t) { |
68 | console.log("onLoad_pt_cart"); | 69 | console.log("onLoad_pt_cart"); |
@@ -536,14 +537,14 @@ Page({ | @@ -536,14 +537,14 @@ Page({ | ||
536 | //--------------如果使用余额--------------------- | 537 | //--------------如果使用余额--------------------- |
537 | if (th.data.bn_use_money == 1 && th.data.yuer > 0) { | 538 | if (th.data.bn_use_money == 1 && th.data.yuer > 0) { |
538 | if (parseFloat(th.data.yuer) > total_m) { | 539 | if (parseFloat(th.data.yuer) > total_m) { |
539 | - th.setData({ [txt]: total_m, [txt2]: 0,submit:0 }) | 540 | + th.setData({ [txt]: total_m, [txt2]: 0,submit:0,show_btn:1 }) |
540 | } else { | 541 | } else { |
541 | order_m = parseFloat(order_m) - parseFloat(th.data.yuer); | 542 | order_m = parseFloat(order_m) - parseFloat(th.data.yuer); |
542 | order_m = order_m.toFixed(2); | 543 | order_m = order_m.toFixed(2); |
543 | - th.setData({ [txt]: th.data.yuer, [txt2]: order_m,submit:0 }) | 544 | + th.setData({ [txt]: th.data.yuer, [txt2]: order_m,submit:0,show_btn:1 }) |
544 | } | 545 | } |
545 | } else { | 546 | } else { |
546 | - th.setData({ [txt]: 0, [txt2]: order_m,submit:0 }) | 547 | + th.setData({ [txt]: 0, [txt2]: order_m,submit:0,show_btn:1 }) |
547 | } | 548 | } |
548 | 549 | ||
549 | wx.hideLoading(); | 550 | wx.hideLoading(); |
pages/cart/cart2_pt/cart2_pt.wxml
@@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
2 | <form bindsubmit="submitForm"> | 2 | <form bindsubmit="submitForm"> |
3 | <view class="container"> | 3 | <view class="container"> |
4 | 4 | ||
5 | + <block wx:if="{{show_btn}}"> | ||
5 | <view class="tab-container" wx:if="{{kt_type!=3 || is_normal==1}}"> | 6 | <view class="tab-container" wx:if="{{kt_type!=3 || is_normal==1}}"> |
6 | <view class="tab-wrapper"> | 7 | <view class="tab-wrapper"> |
7 | <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" | 8 | <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" |
@@ -12,7 +13,7 @@ | @@ -12,7 +13,7 @@ | ||
12 | 13 | ||
13 | </view> | 14 | </view> |
14 | </view> | 15 | </view> |
15 | - | 16 | + </block> |
16 | 17 | ||
17 | <!--要进行判断地址是否显示----> | 18 | <!--要进行判断地址是否显示----> |
18 | <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{bn_exp_type==1 || kt_type==3}}'> | 19 | <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{bn_exp_type==1 || kt_type==3}}'> |
@@ -153,7 +154,7 @@ | @@ -153,7 +154,7 @@ | ||
153 | </view> | 154 | </view> |
154 | </view> | 155 | </view> |
155 | 156 | ||
156 | - <view class="btn-wrap"> | 157 | + <view class="btn-wrap" wx:if="{{show_btn}}"> |
157 | <view class="pay-amount"> | 158 | <view class="pay-amount"> |
158 | <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view> | 159 | <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view> |
159 | <!-- <view class="co-red big"></view> --> | 160 | <!-- <view class="co-red big"></view> --> |
pages/goods/goodsInfo/buy_integral_normal.wxml
@@ -101,7 +101,7 @@ | @@ -101,7 +101,7 @@ | ||
101 | <block wx:else> | 101 | <block wx:else> |
102 | <!-- 根本就找不到门店 --> | 102 | <!-- 根本就找不到门店 --> |
103 | <block wx:if="{{!only_pk && !def_pickpu_list}}"> | 103 | <block wx:if="{{!only_pk && !def_pickpu_list}}"> |
104 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | 104 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> |
105 | </block> | 105 | </block> |
106 | <block wx:else> | 106 | <block wx:else> |
107 | 107 | ||
@@ -117,9 +117,11 @@ | @@ -117,9 +117,11 @@ | ||
117 | <block wx:if="{{!def_pick_store}}"> | 117 | <block wx:if="{{!def_pick_store}}"> |
118 | <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> | 118 | <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> |
119 | </block> | 119 | </block> |
120 | - <block wx:else> | 120 | + <block wx:else> |
121 | + <!-- 线下库存 --> | ||
122 | + <block wx:if="{{sales_rules==2 && prom_type==0 && !sele_g.whsle_id}}"> | ||
121 | <block wx:if="{{def_pick_store && !def_pick_store.CanOutQty}}"> | 123 | <block wx:if="{{def_pick_store && !def_pick_store.CanOutQty}}"> |
122 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | 124 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> |
123 | </block> | 125 | </block> |
124 | <block wx:else> | 126 | <block wx:else> |
125 | <view class="flex jc_sb"> | 127 | <view class="flex jc_sb"> |
@@ -129,6 +131,24 @@ | @@ -129,6 +131,24 @@ | ||
129 | data-action="buy">立即购买</view> | 131 | data-action="buy">立即购买</view> |
130 | </view> | 132 | </view> |
131 | </block> | 133 | </block> |
134 | + </block> | ||
135 | + <!-- 线上库存 --> | ||
136 | + <block wx:else> | ||
137 | + <block wx:if="{{sele_g.store_count<=0}}"> | ||
138 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999"> | ||
139 | + 库存不足5 | ||
140 | + </view> | ||
141 | + </block> | ||
142 | + <block wx:else> | ||
143 | + <view class="flex jc_sb"> | ||
144 | + <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | ||
145 | + data-action="add" style="background-color: #ffb03f;">加入购物车</view> | ||
146 | + <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | ||
147 | + data-action="buy">立即购买</view> | ||
148 | + </view> | ||
149 | + </block> | ||
150 | + | ||
151 | + </block> | ||
132 | 152 | ||
133 | </block> | 153 | </block> |
134 | </block> | 154 | </block> |