Commit 91a93a884c0443131d7f8a1baa213abdedbd9497
Merge branch 'test' into 'qa'
Test See merge request !1053
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 | 499 | console.log('calculatePrice2'); | 
| 500 | 500 | var th = this, | 
| 501 | 501 | good = this.data.bn_goods; | 
| 502 | + | |
| 503 | + th.setData({is_show_sub:0}); | |
| 504 | + | |
| 502 | 505 | //-----------计算商品总价-------------- | 
| 503 | 506 | var allpice = th.data.param.goods_price; | 
| 504 | 507 | allpice = parseFloat(allpice).toFixed(2); | ... | ... | 
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.wxml
| ... | ... | @@ -2,6 +2,7 @@ | 
| 2 | 2 | <form bindsubmit="submitConfirm"> | 
| 3 | 3 | <view class="container"> | 
| 4 | 4 | |
| 5 | + <block wx:if="{{is_show_sub}}"> | |
| 5 | 6 | <view class="tab-container" wx:if="{{kt_type!=3 || is_normal==1}}"> | 
| 6 | 7 | <view class="tab-wrapper"> | 
| 7 | 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 | 13 | |
| 13 | 14 | </view> | 
| 14 | 15 | </view> | 
| 15 | - | |
| 16 | + </block> | |
| 16 | 17 | |
| 17 | 18 | <!--要进行判断地址是否显示----> | 
| 18 | 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 | 608 | goods: goods, | 
| 609 | 609 | presell: presell, | 
| 610 | 610 | pre_arr: pre_arr, | 
| 611 | - show_submit: 1, | |
| 612 | 611 | userInfo: getApp().globalData.userInfo, | 
| 613 | 612 | tail_pay: tail_pay, | 
| 614 | 613 | order_goods: order_goods, | 
| ... | ... | @@ -630,6 +629,8 @@ Page({ | 
| 630 | 629 | async calculatePrice2() { | 
| 631 | 630 | var th = this; | 
| 632 | 631 | if (!this.data.pre_arr) return false; | 
| 632 | + th.setData({ show_submit: 0,}) | |
| 633 | + | |
| 633 | 634 | //--计算物流-- | 
| 634 | 635 | if (this.data.exp_type == 0) { | 
| 635 | 636 | this.calculate_wuliu(); | 
| ... | ... | @@ -715,12 +716,12 @@ Page({ | 
| 715 | 716 | |
| 716 | 717 | o_condition1 = parseFloat(o_condition1) - parseFloat(th.data.presell.presell_deposit); | 
| 717 | 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 | 721 | } else { | 
| 721 | 722 | o_condition = parseFloat(o_condition) - parseFloat(th.data.presell.presell_deposit); | 
| 722 | 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 | 1953 | |
| 1953 | 1954 | ord_price = parseFloat(ord_price) - parseFloat(th.data.presell.presell_deposit); | 
| 1954 | 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 | 1959 | } else { | 
| 1959 | 1960 | |
| 1960 | 1961 | var o_condition1 = parseFloat(o_condition) - parseFloat(th.data.presell.presell_deposit); | 
| 1961 | 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
packageC/pages/presell/cart/cart2.wxml
| ... | ... | @@ -6,7 +6,7 @@ | 
| 6 | 6 | <view class="container"> | 
| 7 | 7 | |
| 8 | 8 | <!-- 立即购买的时候 --> | 
| 9 | - <view class="tab-container"> | |
| 9 | + <view class="tab-container" wx:if="{{show_submit}}"> | |
| 10 | 10 | <view class="tab-wrapper"> | 
| 11 | 11 | <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" | 
| 12 | 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 | 4 | |
| 5 | 5 | <form> | 
| 6 | 6 | <view class="container"> | 
| 7 | + <block wx:if="{{show_submit}}"> | |
| 7 | 8 | <!-- 立即购买的时候 --> | 
| 8 | 9 | <block wx:if="{{is_b_now==1}}"> | 
| 9 | 10 | <view class="tab-container"> | 
| ... | ... | @@ -26,6 +27,7 @@ | 
| 26 | 27 | </view> | 
| 27 | 28 | </view> | 
| 28 | 29 | </block> | 
| 30 | + </block> | |
| 29 | 31 | |
| 30 | 32 | <!--要进行判断地址是否显示----> | 
| 31 | 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 | 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 | 132 | <view class="flex-vertical"> | 
| 131 | 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 | 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 | 5 | <form bindsubmit="submitForm"> | 
| 6 | 6 | <view class="container"> | 
| 7 | 7 | |
| 8 | - <view class="tab-container"> | |
| 8 | + <view class="tab-container" wx:if="{{show_submit}}"> | |
| 9 | 9 | <view class="tab-wrapper"> | 
| 10 | 10 | <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}" | 
| 11 | 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 | 62 | rank_switch: 0, //是不是开同等级卡 | 
| 63 | 63 | show_card: null, //显示的等级卡 | 
| 64 | 64 | card_name: '', //显示的卡的名称 | 
| 65 | - card_cut_price: null,//减价多少钱 | |
| 65 | + card_cut_price: null,//减价多少钱 | |
| 66 | + show_btn:0, | |
| 66 | 67 | }, | 
| 67 | 68 | onLoad: function (t) { | 
| 68 | 69 | console.log("onLoad_pt_cart"); | 
| ... | ... | @@ -536,14 +537,14 @@ Page({ | 
| 536 | 537 | //--------------如果使用余额--------------------- | 
| 537 | 538 | if (th.data.bn_use_money == 1 && th.data.yuer > 0) { | 
| 538 | 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 | 541 | } else { | 
| 541 | 542 | order_m = parseFloat(order_m) - parseFloat(th.data.yuer); | 
| 542 | 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 | 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 | 550 | wx.hideLoading(); | ... | ... | 
pages/cart/cart2_pt/cart2_pt.wxml
| ... | ... | @@ -2,6 +2,7 @@ | 
| 2 | 2 | <form bindsubmit="submitForm"> | 
| 3 | 3 | <view class="container"> | 
| 4 | 4 | |
| 5 | + <block wx:if="{{show_btn}}"> | |
| 5 | 6 | <view class="tab-container" wx:if="{{kt_type!=3 || is_normal==1}}"> | 
| 6 | 7 | <view class="tab-wrapper"> | 
| 7 | 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 | 13 | |
| 13 | 14 | </view> | 
| 14 | 15 | </view> | 
| 15 | - | |
| 16 | + </block> | |
| 16 | 17 | |
| 17 | 18 | <!--要进行判断地址是否显示----> | 
| 18 | 19 | <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{bn_exp_type==1 || kt_type==3}}'> | 
| ... | ... | @@ -153,7 +154,7 @@ | 
| 153 | 154 | </view> | 
| 154 | 155 | </view> | 
| 155 | 156 | |
| 156 | - <view class="btn-wrap"> | |
| 157 | + <view class="btn-wrap" wx:if="{{show_btn}}"> | |
| 157 | 158 | <view class="pay-amount"> | 
| 158 | 159 | <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view> | 
| 159 | 160 | <!-- <view class="co-red big"></view> --> | ... | ... | 
pages/goods/goodsInfo/buy_integral_normal.wxml
| ... | ... | @@ -101,7 +101,7 @@ | 
| 101 | 101 | <block wx:else> | 
| 102 | 102 | <!-- 根本就找不到门店 --> | 
| 103 | 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 | 105 | </block> | 
| 106 | 106 | <block wx:else> | 
| 107 | 107 | |
| ... | ... | @@ -117,9 +117,11 @@ | 
| 117 | 117 | <block wx:if="{{!def_pick_store}}"> | 
| 118 | 118 | <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> | 
| 119 | 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 | 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 | 125 | </block> | 
| 124 | 126 | <block wx:else> | 
| 125 | 127 | <view class="flex jc_sb"> | 
| ... | ... | @@ -129,6 +131,24 @@ | 
| 129 | 131 | data-action="buy">立即购买</view> | 
| 130 | 132 | </view> | 
| 131 | 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 | 153 | </block> | 
| 134 | 154 | </block> | ... | ... | 
