Commit e570982c5d69d8b0debde62421467e1048d49846

Authored by yvan.ni
1 parent 3ea0ed01

ppt测试返回的bug优化

packageC/pages/luckyGo/luckyGo_goodsInfo/buy_pt.wxml
... ... @@ -177,7 +177,7 @@
177 177 </block>
178 178  
179 179 <block wx:elif="{{def_pick_store && def_pick_store.is_no_dis_nor && is_normal}}">
180   - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">配送不匹配</view>
  180 + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">该店不可售</view>
181 181 </block>
182 182  
183 183 <block wx:else>
... ...
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
... ... @@ -3684,6 +3684,15 @@ Page({
3684 3684 is_find_def_store = 1;
3685 3685 }
3686 3686  
  3687 + //-- 如果库存为0就要重新赋值 --
  3688 + if(def_pick_store.CanOutQty<=0){
  3689 + def_pick_store.CanOutQty=Qty;
  3690 + th.setData({
  3691 + def_pick_store
  3692 + })
  3693 + }
  3694 +
  3695 +
3687 3696 } else {
3688 3697 th.setData({
3689 3698 all_sto: null,
... ... @@ -3716,6 +3725,13 @@ Page({
3716 3725 th.setData({def_pick_store: th.data.fir_def_store})
3717 3726 is_find_def_store = 1;
3718 3727 }
  3728 +
  3729 + //-- 如果库存为0就要重新赋值 --
  3730 + if(n_item.StorageNo ==def_pick_store.pickup_no && def_pick_store.CanOutQty<0) {
  3731 + def_pick_store.CanOutQty= o_plist[kk].CanOutQty;
  3732 + th.setData({ def_pick_store })
  3733 + }
  3734 +
3719 3735 }
3720 3736 break;
3721 3737 }
... ...
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
... ... @@ -1371,7 +1371,7 @@
1371 1371 <view class="flex xc-ash" style="flex-shrink:0;max-width: 62%;">
1372 1372 <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view>
1373 1373 <text class="c-red22" wx:if="{{item.is_no_dis}}">(配送不匹配)</text>
1374   - <text class="c-red22" wx:if="{{item.is_no_dis_nor && is_normal==1}}">(配送不匹配)</text>
  1374 + <text class="c-red22" wx:if="{{item.is_no_dis_nor && is_normal==1}}">(该店不可售)</text>
1375 1375 </view>
1376 1376 <view>
1377 1377 <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}">
... ... @@ -1399,7 +1399,7 @@
1399 1399 <view class="flex xc-ash">
1400 1400 <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view>
1401 1401 <text class="c-red22" wx:if="{{item.is_no_dis}}">(配送不匹配)</text>
1402   - <text class="c-red22" wx:if="{{item.is_no_dis_nor && is_normal==1}}">(配送不匹配)</text>
  1402 + <text class="c-red22" wx:if="{{item.is_no_dis_nor && is_normal==1}}">(该店不可售)</text>
1403 1403 </view>
1404 1404 <view>
1405 1405 <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}">
... ...
pages/goods/goodsInfo/buy_com_pop.wxml
... ... @@ -57,7 +57,7 @@
57 57 <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view>
58 58 <block wx:else>
59 59 <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view>
60   - <view class="no_store" wx:elif="{{def_pick_store.is_no_dis_nor}}">(配送不匹配)</view>
  60 + <view class="no_store" wx:elif="{{def_pick_store.is_no_dis_nor}}">(该店不可售)</view>
61 61 <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && !filters.is_virtual_gd(sele_g.is_virtual) && sales_rules>=2}}">
62 62 (库存不足)
63 63 </view>
... ... @@ -115,7 +115,7 @@
115 115 </block>
116 116 <block wx:elif="{{def_pick_store && def_pick_store.is_no_dis_nor}}">
117 117 <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">
118   - 配送不匹配
  118 + 该店不可售
119 119 </view>
120 120 </block>
121 121  
... ... @@ -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">库存不足
  152 + style="background-color: #dcdcdc;color: #999">库存不足1
153 153 </view>
154 154 <block wx:else>
155 155 <view class="flex jc_sb">
... ...
pages/goods/goodsInfo/buy_pt.wxml
... ... @@ -72,7 +72,7 @@
72 72 <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view>
73 73 <block wx:else>
74 74 <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view>
75   - <view class="no_store" wx:elif="{{def_pick_store.is_no_dis_nor && is_normal==1}}">(配送不匹配)</view>
  75 + <view class="no_store" wx:elif="{{def_pick_store.is_no_dis_nor}}">(该店不可售)</view>
76 76 <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && !filters.is_virtual_gd(sele_g.is_virtual) && sales_rules>=2 && is_normal}}">(库存不足)</view>
77 77 </block>
78 78 </block>
... ... @@ -161,7 +161,7 @@
161 161 </block>
162 162  
163 163 <block wx:elif="{{def_pick_store && def_pick_store.is_no_dis_nor}}">
164   - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">配送不匹配</view>
  164 + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">该店不可售</view>
165 165 </block>
166 166  
167 167 <block wx:else>
... ...
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -3586,10 +3586,6 @@ Page({
3586 3586  
3587 3587 if(idx1<0){
3588 3588 th.data.def_pick_store.is_no_dis_nor=1;
3589   - //-- 如果不是活动的普通购买的时候 --
3590   - if(!th.data.is_normal){
3591   - th.data.def_pick_store.is_no_dis=1;
3592   - }
3593 3589 that.setData({
3594 3590 def_pick_store: th.data.def_pick_store
3595 3591 })
... ... @@ -4032,6 +4028,7 @@ Page({
4032 4028  
4033 4029 var def_pick_store = th.data.def_pick_store;
4034 4030 var plist = res.data.data.pageData;
  4031 +
4035 4032 if (th.data.sales_rules == 3) {
4036 4033 var lock_num = 0;
4037 4034 var Qty = 0;
... ... @@ -4054,6 +4051,15 @@ Page({
4054 4051 is_find_def_store = 1;
4055 4052 }
4056 4053  
  4054 + //-- 如果库存为0就要重新赋值 --
  4055 + if(def_pick_store.CanOutQty<=0){
  4056 + def_pick_store.CanOutQty=Qty;
  4057 + th.setData({
  4058 + def_pick_store
  4059 + })
  4060 + }
  4061 +
  4062 +
4057 4063 } else {
4058 4064 th.setData({
4059 4065 all_sto: null,
... ... @@ -4079,6 +4085,13 @@ Page({
4079 4085 if (n_item.CanOutQty > lock_num) {
4080 4086 o_plist[kk].CanOutQty = n_item.CanOutQty - lock_num;
4081 4087 new_list.push(o_plist[kk]);
  4088 +
  4089 + var ck_store=th.data.fir_def_store;
  4090 + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}'){
  4091 + ck_store=th.data.def_pick_store;
  4092 + }
  4093 +
  4094 +
4082 4095 //--如果找到默认门店,同时也应该判断配送方式对不对--
4083 4096 if (th.data.fir_def_store && n_item.StorageNo == th.data.fir_def_store.pickup_no && (g_distr_type == 0 || th.data.fir_def_store.distr_type == 0 || th.data.def_pick_store.distr_type == g_distr_type)) {
4084 4097 th.data.fir_def_store.CanOutQty = n_item.CanOutQty - lock_num;
... ... @@ -4088,6 +4101,13 @@ Page({
4088 4101 })
4089 4102 is_find_def_store = 1;
4090 4103 }
  4104 +
  4105 + //-- 如果库存为0就要重新赋值 --
  4106 + if(n_item.StorageNo ==def_pick_store.pickup_no && def_pick_store.CanOutQty<0) {
  4107 + def_pick_store.CanOutQty= o_plist[kk].CanOutQty;
  4108 + th.setData({ def_pick_store })
  4109 + }
  4110 +
4091 4111 }
4092 4112 break;
4093 4113 }
... ...
pages/goods/goodsInfo/goodsInfo.wxml
... ... @@ -709,6 +709,9 @@
709 709 <view class="no_store" wx:if="{{def_pick_store && def_pick_store.is_no_dis}}">
710 710 (配送不匹配)
711 711 </view>
  712 + <view class="no_store" wx:elif="{{def_pick_store && def_pick_store.is_no_dis_nor && prom_type==0}}">
  713 + (该店不可售)
  714 + </view>
712 715 <view class="no_store" wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules>=2 && prom_type==0 && !sele_g.whsle_id}}">
713 716 (库存不足)
714 717 </view>
... ... @@ -1322,6 +1325,7 @@
1322 1325 <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view>
1323 1326 <block wx:else>
1324 1327 <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view>
  1328 + <view class="no_store" wx:if="{{def_pick_store.is_no_dis_nor}}">(该店不可售)</view>
1325 1329 <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && !filters.is_virtual_gd(sele_g.is_virtual) && sales_rules>=2 && prom_type==0 &&!sele_g.whsle_id }}">
1326 1330 (库存不足)
1327 1331 </view>
... ... @@ -1378,6 +1382,9 @@
1378 1382 <view wx:if="{{def_pick_store && def_pick_store.is_no_dis}}" class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">
1379 1383 配送不匹配
1380 1384 </view>
  1385 + <view wx:elif="{{def_pick_store && def_pick_store.is_no_dis_nor}}" class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">
  1386 + 该店不可售
  1387 + </view>
1381 1388 <block wx:else>
1382 1389 <!-- 根本就找不到门店 -->
1383 1390 <block wx:if="{{!only_pk && !def_pickpu_list}}">
... ... @@ -1633,7 +1640,7 @@
1633 1640 <view class="fs30 xc-black3 address_name">{{item.pickup_name}}
1634 1641 <text class="c-red22" wx:if="{{item.is_no_qyt}}">(库存不足)</text>
1635 1642 <text class="c-red22" wx:elif="{{item.is_no_dis}}">(配送不匹配)</text>
1636   - <text class="c-red22" wx:elif="{{item.is_no_dis_nor && is_normal==1}}">(配送不匹配)</text>
  1643 + <text class="c-red22" wx:elif="{{item.is_no_dis_nor}}">(该店不可售)</text>
1637 1644 </view>
1638 1645 </view>
1639 1646 <view>
... ... @@ -1663,7 +1670,7 @@
1663 1670 <view class="fs30 xc-black3 address_name">{{item.pickup_name}}
1664 1671 <text class="c-red22" wx:if="{{item.is_no_qyt }}">(库存不足)</text>
1665 1672 <text class="c-red22" wx:if="{{item.is_no_dis}}">(配送不匹配)</text>
1666   - <text class="c-red22" wx:if="{{item.is_no_dis_nor && is_normal==1}}">(配送不匹配)</text>
  1673 + <text class="c-red22" wx:if="{{item.is_no_dis_nor}}">(该店不可售)</text>
1667 1674 </view>
1668 1675 </view>
1669 1676 <view>
... ...