Commit 76a0379061132703bea0b1abd40f2145ddb1a6bf
1 parent
e570982c
库存不足显示的优化
Showing
3 changed files
with
21 additions
and
19 deletions
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
... | ... | @@ -3685,12 +3685,11 @@ Page({ |
3685 | 3685 | } |
3686 | 3686 | |
3687 | 3687 | //-- 如果库存为0就要重新赋值 -- |
3688 | - if(def_pick_store.CanOutQty<=0){ | |
3689 | - def_pick_store.CanOutQty=Qty; | |
3690 | - th.setData({ | |
3691 | - def_pick_store | |
3692 | - }) | |
3693 | - } | |
3688 | + def_pick_store.CanOutQty=Qty; | |
3689 | + th.setData({ | |
3690 | + def_pick_store | |
3691 | + }) | |
3692 | + | |
3694 | 3693 | |
3695 | 3694 | |
3696 | 3695 | } else { |
... | ... | @@ -3727,7 +3726,7 @@ Page({ |
3727 | 3726 | } |
3728 | 3727 | |
3729 | 3728 | //-- 如果库存为0就要重新赋值 -- |
3730 | - if(n_item.StorageNo ==def_pick_store.pickup_no && def_pick_store.CanOutQty<0) { | |
3729 | + if(n_item.StorageNo ==def_pick_store.pickup_no) { | |
3731 | 3730 | def_pick_store.CanOutQty= o_plist[kk].CanOutQty; |
3732 | 3731 | th.setData({ def_pick_store }) |
3733 | 3732 | } | ... | ... |
pages/goods/goodsInfo/buy_com_pop.wxml
... | ... | @@ -149,7 +149,7 @@ |
149 | 149 | <block wx:else> |
150 | 150 | <block wx:if="{{sales_rules>=2 && !sele_g.whsle_id }}"> |
151 | 151 | <view wx:if="{{!def_pick_store.CanOutQty || def_pick_store.CanOutQty<1 }}" class="spec-cart-btn fs32" data-action="add" |
152 | - style="background-color: #dcdcdc;color: #999">库存不足1 | |
152 | + style="background-color: #dcdcdc;color: #999">库存不足 | |
153 | 153 | </view> |
154 | 154 | <block wx:else> |
155 | 155 | <view class="flex jc_sb"> | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
... | ... | @@ -3418,13 +3418,17 @@ Page({ |
3418 | 3418 | prom = res.data.data; |
3419 | 3419 | } |
3420 | 3420 | }) |
3421 | - let times = new Date().getTime() | |
3422 | - prom.show_time_off = "" | |
3423 | - let atimes = prom.start_time * 1000 | |
3424 | 3421 | |
3425 | - if (atimes > times) { | |
3426 | - prom.show_time_off = ut.formatTime(prom.start_time) | |
3422 | + if(prom){ | |
3423 | + let times = new Date().getTime() | |
3424 | + prom.show_time_off = "" | |
3425 | + let atimes = prom.start_time * 1000 | |
3426 | + | |
3427 | + if (atimes > times) { | |
3428 | + prom.show_time_off = ut.formatTime(prom.start_time) | |
3429 | + } | |
3427 | 3430 | } |
3431 | + | |
3428 | 3432 | } |
3429 | 3433 | console.log('活动详情------------'); |
3430 | 3434 | console.log(prom); |
... | ... | @@ -4052,12 +4056,11 @@ Page({ |
4052 | 4056 | } |
4053 | 4057 | |
4054 | 4058 | //-- 如果库存为0就要重新赋值 -- |
4055 | - if(def_pick_store.CanOutQty<=0){ | |
4056 | - def_pick_store.CanOutQty=Qty; | |
4057 | - th.setData({ | |
4059 | + def_pick_store.CanOutQty=Qty; | |
4060 | + th.setData({ | |
4058 | 4061 | def_pick_store |
4059 | - }) | |
4060 | - } | |
4062 | + }) | |
4063 | + | |
4061 | 4064 | |
4062 | 4065 | |
4063 | 4066 | } else { |
... | ... | @@ -4103,7 +4106,7 @@ Page({ |
4103 | 4106 | } |
4104 | 4107 | |
4105 | 4108 | //-- 如果库存为0就要重新赋值 -- |
4106 | - if(n_item.StorageNo ==def_pick_store.pickup_no && def_pick_store.CanOutQty<0) { | |
4109 | + if(n_item.StorageNo ==def_pick_store.pickup_no) { | |
4107 | 4110 | def_pick_store.CanOutQty= o_plist[kk].CanOutQty; |
4108 | 4111 | th.setData({ def_pick_store }) |
4109 | 4112 | } | ... | ... |