Commit e570982c5d69d8b0debde62421467e1048d49846

Authored by yvan.ni
1 parent 3ea0ed01

ppt测试返回的bug优化

packageC/pages/luckyGo/luckyGo_goodsInfo/buy_pt.wxml
@@ -177,7 +177,7 @@ @@ -177,7 +177,7 @@
177 </block> 177 </block>
178 178
179 <block wx:elif="{{def_pick_store && def_pick_store.is_no_dis_nor && is_normal}}"> 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 </block> 181 </block>
182 182
183 <block wx:else> 183 <block wx:else>
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
@@ -3684,6 +3684,15 @@ Page({ @@ -3684,6 +3684,15 @@ Page({
3684 is_find_def_store = 1; 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 } else { 3696 } else {
3688 th.setData({ 3697 th.setData({
3689 all_sto: null, 3698 all_sto: null,
@@ -3716,6 +3725,13 @@ Page({ @@ -3716,6 +3725,13 @@ Page({
3716 th.setData({def_pick_store: th.data.fir_def_store}) 3725 th.setData({def_pick_store: th.data.fir_def_store})
3717 is_find_def_store = 1; 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 break; 3736 break;
3721 } 3737 }
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
@@ -1371,7 +1371,7 @@ @@ -1371,7 +1371,7 @@
1371 <view class="flex xc-ash" style="flex-shrink:0;max-width: 62%;"> 1371 <view class="flex xc-ash" style="flex-shrink:0;max-width: 62%;">
1372 <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view> 1372 <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view>
1373 <text class="c-red22" wx:if="{{item.is_no_dis}}">(配送不匹配)</text> 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 </view> 1375 </view>
1376 <view> 1376 <view>
1377 <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> 1377 <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}">
@@ -1399,7 +1399,7 @@ @@ -1399,7 +1399,7 @@
1399 <view class="flex xc-ash"> 1399 <view class="flex xc-ash">
1400 <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view> 1400 <view class="fs30 xc-black3 address_name">{{item.pickup_name}}</view>
1401 <text class="c-red22" wx:if="{{item.is_no_dis}}">(配送不匹配)</text> 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 </view> 1403 </view>
1404 <view> 1404 <view>
1405 <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> 1405 <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}">
pages/goods/goodsInfo/buy_com_pop.wxml
@@ -57,7 +57,7 @@ @@ -57,7 +57,7 @@
57 <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> 57 <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view>
58 <block wx:else> 58 <block wx:else>
59 <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> 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 <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && !filters.is_virtual_gd(sele_g.is_virtual) && sales_rules>=2}}"> 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 </view> 63 </view>
@@ -115,7 +115,7 @@ @@ -115,7 +115,7 @@
115 </block> 115 </block>
116 <block wx:elif="{{def_pick_store && def_pick_store.is_no_dis_nor}}"> 116 <block wx:elif="{{def_pick_store && def_pick_store.is_no_dis_nor}}">
117 <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;"> 117 <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">
118 - 配送不匹配 118 + 该店不可售
119 </view> 119 </view>
120 </block> 120 </block>
121 121
@@ -149,7 +149,7 @@ @@ -149,7 +149,7 @@
149 <block wx:else> 149 <block wx:else>
150 <block wx:if="{{sales_rules>=2 && !sele_g.whsle_id }}"> 150 <block wx:if="{{sales_rules>=2 && !sele_g.whsle_id }}">
151 <view wx:if="{{!def_pick_store.CanOutQty || def_pick_store.CanOutQty<1 }}" class="spec-cart-btn fs32" data-action="add" 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 </view> 153 </view>
154 <block wx:else> 154 <block wx:else>
155 <view class="flex jc_sb"> 155 <view class="flex jc_sb">
pages/goods/goodsInfo/buy_pt.wxml
@@ -72,7 +72,7 @@ @@ -72,7 +72,7 @@
72 <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> 72 <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view>
73 <block wx:else> 73 <block wx:else>
74 <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> 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 <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && !filters.is_virtual_gd(sele_g.is_virtual) && sales_rules>=2 && is_normal}}">(库存不足)</view> 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 </block> 77 </block>
78 </block> 78 </block>
@@ -161,7 +161,7 @@ @@ -161,7 +161,7 @@
161 </block> 161 </block>
162 162
163 <block wx:elif="{{def_pick_store && def_pick_store.is_no_dis_nor}}"> 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 </block> 165 </block>
166 166
167 <block wx:else> 167 <block wx:else>
pages/goods/goodsInfo/goodsInfo.js
@@ -3586,10 +3586,6 @@ Page({ @@ -3586,10 +3586,6 @@ Page({
3586 3586
3587 if(idx1<0){ 3587 if(idx1<0){
3588 th.data.def_pick_store.is_no_dis_nor=1; 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 that.setData({ 3589 that.setData({
3594 def_pick_store: th.data.def_pick_store 3590 def_pick_store: th.data.def_pick_store
3595 }) 3591 })
@@ -4032,6 +4028,7 @@ Page({ @@ -4032,6 +4028,7 @@ Page({
4032 4028
4033 var def_pick_store = th.data.def_pick_store; 4029 var def_pick_store = th.data.def_pick_store;
4034 var plist = res.data.data.pageData; 4030 var plist = res.data.data.pageData;
  4031 +
4035 if (th.data.sales_rules == 3) { 4032 if (th.data.sales_rules == 3) {
4036 var lock_num = 0; 4033 var lock_num = 0;
4037 var Qty = 0; 4034 var Qty = 0;
@@ -4054,6 +4051,15 @@ Page({ @@ -4054,6 +4051,15 @@ Page({
4054 is_find_def_store = 1; 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 } else { 4063 } else {
4058 th.setData({ 4064 th.setData({
4059 all_sto: null, 4065 all_sto: null,
@@ -4079,6 +4085,13 @@ Page({ @@ -4079,6 +4085,13 @@ Page({
4079 if (n_item.CanOutQty > lock_num) { 4085 if (n_item.CanOutQty > lock_num) {
4080 o_plist[kk].CanOutQty = n_item.CanOutQty - lock_num; 4086 o_plist[kk].CanOutQty = n_item.CanOutQty - lock_num;
4081 new_list.push(o_plist[kk]); 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 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)) { 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 th.data.fir_def_store.CanOutQty = n_item.CanOutQty - lock_num; 4097 th.data.fir_def_store.CanOutQty = n_item.CanOutQty - lock_num;
@@ -4088,6 +4101,13 @@ Page({ @@ -4088,6 +4101,13 @@ Page({
4088 }) 4101 })
4089 is_find_def_store = 1; 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 break; 4112 break;
4093 } 4113 }
pages/goods/goodsInfo/goodsInfo.wxml
@@ -709,6 +709,9 @@ @@ -709,6 +709,9 @@
709 <view class="no_store" wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> 709 <view class="no_store" wx:if="{{def_pick_store && def_pick_store.is_no_dis}}">
710 (配送不匹配) 710 (配送不匹配)
711 </view> 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 <view class="no_store" wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules>=2 && prom_type==0 && !sele_g.whsle_id}}"> 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 </view> 717 </view>
@@ -1322,6 +1325,7 @@ @@ -1322,6 +1325,7 @@
1322 <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> 1325 <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view>
1323 <block wx:else> 1326 <block wx:else>
1324 <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> 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 <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 }}"> 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 </view> 1331 </view>
@@ -1378,6 +1382,9 @@ @@ -1378,6 +1382,9 @@
1378 <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;"> 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 </view> 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 <block wx:else> 1388 <block wx:else>
1382 <!-- 根本就找不到门店 --> 1389 <!-- 根本就找不到门店 -->
1383 <block wx:if="{{!only_pk && !def_pickpu_list}}"> 1390 <block wx:if="{{!only_pk && !def_pickpu_list}}">
@@ -1633,7 +1640,7 @@ @@ -1633,7 +1640,7 @@
1633 <view class="fs30 xc-black3 address_name">{{item.pickup_name}} 1640 <view class="fs30 xc-black3 address_name">{{item.pickup_name}}
1634 <text class="c-red22" wx:if="{{item.is_no_qyt}}">(库存不足)</text> 1641 <text class="c-red22" wx:if="{{item.is_no_qyt}}">(库存不足)</text>
1635 <text class="c-red22" wx:elif="{{item.is_no_dis}}">(配送不匹配)</text> 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 </view> 1644 </view>
1638 </view> 1645 </view>
1639 <view> 1646 <view>
@@ -1663,7 +1670,7 @@ @@ -1663,7 +1670,7 @@
1663 <view class="fs30 xc-black3 address_name">{{item.pickup_name}} 1670 <view class="fs30 xc-black3 address_name">{{item.pickup_name}}
1664 <text class="c-red22" wx:if="{{item.is_no_qyt }}">(库存不足)</text> 1671 <text class="c-red22" wx:if="{{item.is_no_qyt }}">(库存不足)</text>
1665 <text class="c-red22" wx:if="{{item.is_no_dis}}">(配送不匹配)</text> 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 </view> 1674 </view>
1668 </view> 1675 </view>
1669 <view> 1676 <view>