Commit a78d19acd35936d2f6c6f9fce65bb7947a08682f

Authored by yvan.ni
1 parent 2f8fab9f

122297 这一单

packageA/pages/goodsInfo/goodsInfo.js
@@ -1386,6 +1386,9 @@ Page({ @@ -1386,6 +1386,9 @@ Page({
1386 }, 1386 },
1387 1387
1388 openSpecModel: function(t) { 1388 openSpecModel: function(t) {
  1389 +
  1390 + if(this.data.get_sto_ing) return false;
  1391 +
1389 var th=this; var open_store = t.currentTarget.dataset.ind; 1392 var th=this; var open_store = t.currentTarget.dataset.ind;
1390 if(getApp().is_sp_hao() && open_store==1){ 1393 if(getApp().is_sp_hao() && open_store==1){
1391 wx.showToast({ 1394 wx.showToast({
@@ -1657,6 +1660,8 @@ Page({ @@ -1657,6 +1660,8 @@ Page({
1657 }) 1660 })
1658 } 1661 }
1659 1662
  1663 + this.data.get_sto_ing=1;
  1664 +
1660 var timer_get = setInterval(function() { 1665 var timer_get = setInterval(function() {
1661 if (th.data.is_get_local_ok == 0) return false; 1666 if (th.data.is_get_local_ok == 0) return false;
1662 if (!th.data.fir_def_store) return false; 1667 if (!th.data.fir_def_store) return false;
@@ -1772,6 +1777,7 @@ Page({ @@ -1772,6 +1777,7 @@ Page({
1772 th.deal_pickup(e); 1777 th.deal_pickup(e);
1773 } 1778 }
1774 else{ 1779 else{
  1780 + th.data.get_sto_ing=0;
1775 th.setData({ 1781 th.setData({
1776 isshow:1 1782 isshow:1
1777 }) 1783 })
@@ -1901,160 +1907,162 @@ Page({ @@ -1901,160 +1907,162 @@ Page({
1901 orderType:'asc', 1907 orderType:'asc',
1902 }, 1908 },
1903 success: function(ee) { 1909 success: function(ee) {
1904 - if (ee.data.code == 0) {  
1905 -  
1906 - var check_all_cate=0;  
1907 - if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0){  
1908 - for(let i in ee.data.data.pageData){  
1909 - let item=ee.data.data.pageData[i];  
1910 - if(item.is_show==1){  
1911 - check_all_cate=1;break 1910 + if (ee.data.code == 0) {
  1911 +
  1912 + var check_all_cate=0;
  1913 + if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0){
  1914 + for(let i in ee.data.data.pageData){
  1915 + let item=ee.data.data.pageData[i];
  1916 + if(item.is_show==1){
  1917 + check_all_cate=1;break
  1918 + }
1912 } 1919 }
1913 } 1920 }
1914 - }  
1915 -  
1916 - if (check_all_cate) {  
1917 -  
1918 -  
1919 - var sto_cate = ee.data.data.pageData;  
1920 - var sto_arr = e.data.data.pageData;  
1921 - var newarr = new Array();  
1922 - var qita = new Array();  
1923 -  
1924 - var is_del_pk=0;  
1925 -  
1926 - //----要进行门店分组--------  
1927 - for (var i = 0; i < sto_arr.length; i++) {  
1928 - //找一下这个门店有没有在分类数组内  
1929 - var find2 = 0, find2name = "",sort=0;  
1930 - is_del_pk=0;  
1931 - for (var m = 0; m < sto_cate.length; m++) {  
1932 - if (sto_arr[i].category_id == sto_cate[m].cat_id) {  
1933 - if (sto_cate[m].is_show != 1) {  
1934 - is_del_pk = 1;  
1935 - sto_arr.splice(i, 1);  
1936 - i--;  
1937 - } else {  
1938 - find2 = sto_cate[m].cat_id;  
1939 - find2name = sto_cate[m].cat_name;  
1940 - sort = sto_cate[m].sort;  
1941 - is_del_pk = 0; 1921 +
  1922 + if (check_all_cate) {
  1923 +
  1924 +
  1925 + var sto_cate = ee.data.data.pageData;
  1926 + var sto_arr = e.data.data.pageData;
  1927 + var newarr = new Array();
  1928 + var qita = new Array();
  1929 +
  1930 + var is_del_pk=0;
  1931 +
  1932 + //----要进行门店分组--------
  1933 + for (var i = 0; i < sto_arr.length; i++) {
  1934 + //找一下这个门店有没有在分类数组内
  1935 + var find2 = 0, find2name = "",sort=0;
  1936 + is_del_pk=0;
  1937 + for (var m = 0; m < sto_cate.length; m++) {
  1938 + if (sto_arr[i].category_id == sto_cate[m].cat_id) {
  1939 + if (sto_cate[m].is_show != 1) {
  1940 + is_del_pk = 1;
  1941 + sto_arr.splice(i, 1);
  1942 + i--;
  1943 + } else {
  1944 + find2 = sto_cate[m].cat_id;
  1945 + find2name = sto_cate[m].cat_name;
  1946 + sort = sto_cate[m].sort;
  1947 + is_del_pk = 0;
  1948 + }
  1949 + break;
1942 } 1950 }
1943 - break;  
1944 } 1951 }
1945 - }  
1946 - if(is_del_pk) continue;  
1947 -  
1948 - if (newarr.length > 0) {  
1949 - var find = 0;  
1950 - //如果有找到,那门店就在这个分组内,否则,分类就要排在其他  
1951 - if (find2 != 0) {  
1952 - for (var ii = 0; ii < newarr.length; ii++) {  
1953 - if (sto_arr[i].category_id == newarr[ii].cat_id) {  
1954 - newarr[ii].s_arr.push(sto_arr[i]);  
1955 - find = 1;  
1956 - break; 1952 + if(is_del_pk) continue;
  1953 +
  1954 + if (newarr.length > 0) {
  1955 + var find = 0;
  1956 + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他
  1957 + if (find2 != 0) {
  1958 + for (var ii = 0; ii < newarr.length; ii++) {
  1959 + if (sto_arr[i].category_id == newarr[ii].cat_id) {
  1960 + newarr[ii].s_arr.push(sto_arr[i]);
  1961 + find = 1;
  1962 + break;
  1963 + }
  1964 + }
  1965 + if (find == 0) {
  1966 + var arr0 = new Array();
  1967 + arr0.push(sto_arr[i]);
  1968 + var item = {
  1969 + cat_id: find2,
  1970 + name: find2name,
  1971 + sort:sort,
  1972 + s_arr: arr0
  1973 + };
  1974 + newarr.push(item);
  1975 + }
  1976 + } else {
  1977 + qita.push(sto_arr[i]);
  1978 + }
  1979 + } else {
  1980 + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他
  1981 + if (find2 != 0) {
  1982 + var arr0 = new Array();
  1983 + arr0.push(sto_arr[i]);
  1984 + var item = {
  1985 + cat_id: find2,
  1986 + name: find2name,
  1987 + sort:sort,
  1988 + s_arr: arr0
  1989 + };
  1990 + newarr.push(item);
  1991 + } else {
  1992 + qita.push(sto_arr[i]);
1957 } 1993 }
1958 } 1994 }
1959 - if (find == 0) {  
1960 - var arr0 = new Array();  
1961 - arr0.push(sto_arr[i]);  
1962 - var item = {  
1963 - cat_id: find2,  
1964 - name: find2name,  
1965 - sort:sort,  
1966 - s_arr: arr0  
1967 - };  
1968 - newarr.push(item); 1995 + }
  1996 +
  1997 + var def_arr = new Array();
  1998 + //-- 开始就看10个门店 --
  1999 + for (var k = 0; k < 10; k++) {
  2000 + if (k == sto_arr.length) break;
  2001 + def_arr.push(sto_arr[k]);
1969 } 2002 }
1970 - } else {  
1971 - qita.push(sto_arr[i]); 2003 +
  2004 + th.setData({
  2005 + def_pickpu_list: def_arr,
  2006 + pickpu_list: ee.data.data.pageData
  2007 + });
  2008 +
  2009 + //门店分类要排序下
  2010 + function compare(property){
  2011 + return function(a,b){
  2012 + var value1 = a[property];
  2013 + var value2 = b[property];
  2014 + return value1 - value2;
  2015 + }
1972 } 2016 }
1973 - } else {  
1974 - //如果有找到,那门店就在这个分组内,否则,分类就要排在其他  
1975 - if (find2 != 0) {  
1976 - var arr0 = new Array();  
1977 - arr0.push(sto_arr[i]); 2017 + if(newarr.length>0)
  2018 + newarr.sort(compare("sort"));
  2019 +
  2020 + //----安排其他的分类-----
  2021 + if (qita.length > 0) {
1978 var item = { 2022 var item = {
1979 - cat_id: find2,  
1980 - name: find2name,  
1981 - sort:sort,  
1982 - s_arr: arr0 2023 + cat_id: -1,
  2024 + name: "其他",
  2025 + s_arr: qita
1983 }; 2026 };
1984 newarr.push(item); 2027 newarr.push(item);
1985 - } else {  
1986 - qita.push(sto_arr[i]);  
1987 } 2028 }
1988 - }  
1989 - }  
1990 2029
1991 - var def_arr = new Array();  
1992 - //-- 开始就看10个门店 --  
1993 - for (var k = 0; k < 10; k++) {  
1994 - if (k == sto_arr.length) break;  
1995 - def_arr.push(sto_arr[k]);  
1996 - } 2030 + var sd={
  2031 + all_sto: newarr,
  2032 + is_show_sto_cat:1
  2033 + }
  2034 + if(!sto_arr || sto_arr.length<=10){
  2035 + sd.is_show_sto_cat=-1;
  2036 + sd.only_pk=sto_arr;
  2037 + }
  2038 + th.setData(sd);
1997 2039
  2040 + } else {
  2041 + th.setData({
  2042 + is_show_sto_cat: -1,
  2043 + only_pk: e.data.data.pageData
  2044 + });
  2045 + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------
  2046 + if (!th.data.def_pick_store) {
  2047 + th.setData({def_pick_store:e.data.data.pageData[0]})
  2048 + }
  2049 + }
  2050 + } else {
1998 th.setData({ 2051 th.setData({
1999 - def_pickpu_list: def_arr,  
2000 - pickpu_list: ee.data.data.pageData 2052 + is_show_sto_cat: -1,
  2053 + only_pk: e.data.data.pageData
2001 }); 2054 });
2002 -  
2003 - //门店分类要排序下  
2004 - function compare(property){  
2005 - return function(a,b){  
2006 - var value1 = a[property];  
2007 - var value2 = b[property];  
2008 - return value1 - value2;  
2009 - }  
2010 - }  
2011 - if(newarr.length>0)  
2012 - newarr.sort(compare("sort"));  
2013 -  
2014 - //----安排其他的分类-----  
2015 - if (qita.length > 0) {  
2016 - var item = {  
2017 - cat_id: -1,  
2018 - name: "其他",  
2019 - s_arr: qita  
2020 - };  
2021 - newarr.push(item);  
2022 - }  
2023 -  
2024 - var sd={  
2025 - all_sto: newarr,  
2026 - is_show_sto_cat:1  
2027 - }  
2028 - if(!sto_arr || sto_arr.length<=10){  
2029 - sd.is_show_sto_cat=-1;  
2030 - sd.only_pk=sto_arr; 2055 + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------
  2056 + if (!th.data.def_pick_store) {
  2057 + th.setData({def_pick_store:e.data.data.pageData[0]})
2031 } 2058 }
2032 - th.setData(sd);  
2033 -  
2034 - } else {  
2035 - th.setData({  
2036 - is_show_sto_cat: -1,  
2037 - only_pk: e.data.data.pageData  
2038 - });  
2039 - //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------  
2040 - if (!th.data.def_pick_store) {  
2041 - th.setData({def_pick_store:e.data.data.pageData[0]})  
2042 } 2059 }
2043 - }  
2044 - } else {  
2045 - th.setData({  
2046 - is_show_sto_cat: -1,  
2047 - only_pk: e.data.data.pageData  
2048 - });  
2049 - //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------  
2050 - if (!th.data.def_pick_store) {  
2051 - th.setData({def_pick_store:e.data.data.pageData[0]})  
2052 - }  
2053 -  
2054 - } 2060 + th.data.get_sto_ing=0;
2055 } 2061 }
2056 }); 2062 });
2057 - } else { 2063 + } else {
  2064 + th.data.get_sto_ing=0;
  2065 +
2058 th.setData({ 2066 th.setData({
2059 is_show_sto_cat: 0, 2067 is_show_sto_cat: 0,
2060 only_pk: e.data.data.pageData 2068 only_pk: e.data.data.pageData
@@ -3957,6 +3965,8 @@ Page({ @@ -3957,6 +3965,8 @@ Page({
3957 openSpecModel_Nor: function () { 3965 openSpecModel_Nor: function () {
3958 var th=this; 3966 var th=this;
3959 3967
  3968 + if(th.data.get_sto_ing) return false;
  3969 +
3960 // 是否授权登陆 3970 // 是否授权登陆
3961 var user_info = getApp().globalData.userInfo; 3971 var user_info = getApp().globalData.userInfo;
3962 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 3972 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.js
@@ -1256,6 +1256,8 @@ Page({ @@ -1256,6 +1256,8 @@ Page({
1256 }) 1256 })
1257 } 1257 }
1258 1258
  1259 + this.data.get_sto_ing=1;
  1260 +
1259 var timer_get = setInterval(function () { 1261 var timer_get = setInterval(function () {
1260 if (th.data.is_get_local_ok == 0) return false; 1262 if (th.data.is_get_local_ok == 0) return false;
1261 if (!th.data.fir_def_store) return false; 1263 if (!th.data.fir_def_store) return false;
@@ -1374,13 +1376,19 @@ Page({ @@ -1374,13 +1376,19 @@ Page({
1374 th.setData({all_pick_list: e.data.data.pageData}); 1376 th.setData({all_pick_list: e.data.data.pageData});
1375 th.deal_pickup(e); 1377 th.deal_pickup(e);
1376 }else{ 1378 }else{
  1379 + th.data.get_sto_ing=0;
1377 th.setData({all_pick_list: null, only_pk:null,def_pickpu_list:null }); 1380 th.setData({all_pick_list: null, only_pk:null,def_pickpu_list:null });
1378 -  
1379 wx.hideLoading(); 1381 wx.hideLoading();
1380 } 1382 }
1381 }, 800) 1383 }, 800)
1382 1384
1383 } 1385 }
  1386 + else{
  1387 + th.data.get_sto_ing=0;
  1388 + th.setData({all_pick_list: null, only_pk:null,def_pickpu_list:null });
  1389 +
  1390 + wx.hideLoading();
  1391 + }
1384 }) 1392 })
1385 }, 200) 1393 }, 200)
1386 }, 1394 },
@@ -1554,9 +1562,11 @@ Page({ @@ -1554,9 +1562,11 @@ Page({
1554 } 1562 }
1555 1563
1556 } 1564 }
  1565 + th.data.get_sto_ing=0;
1557 } 1566 }
1558 }); 1567 });
1559 } else { 1568 } else {
  1569 + th.data.get_sto_ing=0;
1560 th.setData({ 1570 th.setData({
1561 is_show_sto_cat: 0, 1571 is_show_sto_cat: 0,
1562 only_pk: e.data.data.pageData 1572 only_pk: e.data.data.pageData
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
@@ -3129,6 +3129,7 @@ Page({ @@ -3129,6 +3129,7 @@ Page({
3129 3129
3130 //---------拿出门店分类和门店------------ 3130 //---------拿出门店分类和门店------------
3131 get_sto(e,func) { 3131 get_sto(e,func) {
  3132 +
3132 var th = this, that = this; 3133 var th = this, that = this;
3133 var is_normal = e; 3134 var is_normal = e;
3134 3135
@@ -3137,12 +3138,13 @@ Page({ @@ -3137,12 +3138,13 @@ Page({
3137 } else { 3138 } else {
3138 th.setData({ is_normal: 0 }) 3139 th.setData({ is_normal: 0 })
3139 } 3140 }
  3141 + th.data.get_sto_ing=1;
3140 3142
3141 var timer_get = setInterval(function () { 3143 var timer_get = setInterval(function () {
3142 if (th.data.is_get_local_ok == 0) return false; 3144 if (th.data.is_get_local_ok == 0) return false;
3143 if (!th.data.fir_def_store) return false; 3145 if (!th.data.fir_def_store) return false;
3144 var dd = null, i = getApp().request; 3146 var dd = null, i = getApp().request;
3145 - if (!th.data.sele_g) return false; 3147 + if (!th.data.sele_g){th.data.get_sto_ing=0; return false;}
3146 3148
3147 var g_distr_type = th.data.sele_g.distr_type; 3149 var g_distr_type = th.data.sele_g.distr_type;
3148 if (g_distr_type != 0) { 3150 if (g_distr_type != 0) {
@@ -3277,6 +3279,7 @@ Page({ @@ -3277,6 +3279,7 @@ Page({
3277 3279
3278 } 3280 }
3279 },err=>{ 3281 },err=>{
  3282 + th.data.get_sto_ing=0;
3280 ut.m_toast('网络繁忙,请稍后重试'); 3283 ut.m_toast('网络繁忙,请稍后重试');
3281 wx.hideLoading(); 3284 wx.hideLoading();
3282 }) 3285 })
@@ -3403,12 +3406,15 @@ Page({ @@ -3403,12 +3406,15 @@ Page({
3403 front_is_show_sto_cat:th.data.is_show_sto_cat, 3406 front_is_show_sto_cat:th.data.is_show_sto_cat,
3404 }) 3407 })
3405 } 3408 }
  3409 +
  3410 + this.data.get_sto_ing=0;
  3411 +
3406 }, 3412 },
3407 3413
3408 //------------处理门店--------------- 3414 //------------处理门店---------------
3409 deal_pickup(e) { 3415 deal_pickup(e) {
3410 var th = this; 3416 var th = this;
3411 - if (!th.data.sele_g) return false 3417 + if (!th.data.sele_g){th.data.get_sto_ing=0;return false}
3412 3418
3413 var g_distr_type = th.data.sele_g.distr_type; 3419 var g_distr_type = th.data.sele_g.distr_type;
3414 wx.hideLoading(); 3420 wx.hideLoading();
@@ -3580,7 +3586,7 @@ Page({ @@ -3580,7 +3586,7 @@ Page({
3580 //------------处理线下门店库存-------- 3586 //------------处理线下门店库存--------
3581 deal_pickup_dline(e) { 3587 deal_pickup_dline(e) {
3582 var pkno = [], th = this; 3588 var pkno = [], th = this;
3583 - if (!th.data.sele_g) return false; 3589 + if (!th.data.sele_g){th.data.get_sto_ing=0;return false;}
3584 3590
3585 if (this.data.def_pick_store) { 3591 if (this.data.def_pick_store) {
3586 pkno.push(this.data.def_pick_store.pickup_no); 3592 pkno.push(this.data.def_pick_store.pickup_no);
@@ -3673,6 +3679,7 @@ Page({ @@ -3673,6 +3679,7 @@ Page({
3673 3679
3674 3680
3675 } else { 3681 } else {
  3682 + th.data.get_sto_ing=0;
3676 th.setData({ 3683 th.setData({
3677 all_sto: null, 3684 all_sto: null,
3678 only_pk: null, 3685 only_pk: null,
@@ -3739,9 +3746,11 @@ Page({ @@ -3739,9 +3746,11 @@ Page({
3739 //---把数组组装进去--- 3746 //---把数组组装进去---
3740 th.deal_pickup(em); 3747 th.deal_pickup(em);
3741 } else { 3748 } else {
  3749 + th.data.get_sto_ing=0;
3742 th.setData({ def_pick_store: null, all_sto: null, only_pk: null, def_pickpu_list: null }) 3750 th.setData({ def_pick_store: null, all_sto: null, only_pk: null, def_pickpu_list: null })
3743 } 3751 }
3744 } else { 3752 } else {
  3753 + th.data.get_sto_ing=0;
3745 th.setData({ def_pick_store: null, all_sto: null, only_pk: null, def_pickpu_list: null }) 3754 th.setData({ def_pick_store: null, all_sto: null, only_pk: null, def_pickpu_list: null })
3746 } 3755 }
3747 }) 3756 })
@@ -4504,6 +4513,7 @@ Page({ @@ -4504,6 +4513,7 @@ Page({
4504 // ind == 1 为普通购买 4513 // ind == 1 为普通购买
4505 openSpecModel_pt: function (e) { 4514 openSpecModel_pt: function (e) {
4506 4515
  4516 + if(this.data.get_sto_ing) return false;
4507 this.setData({ open_ind_store: 9 }); 4517 this.setData({ open_ind_store: 9 });
4508 // 判断是否有待支付订单 4518 // 判断是否有待支付订单
4509 var aid = this.data.group_id; 4519 var aid = this.data.group_id;
packageC/pages/presell/cardInfo/goodsInfo.js
@@ -1186,6 +1186,9 @@ Page({ @@ -1186,6 +1186,9 @@ Page({
1186 }, 1186 },
1187 1187
1188 openSpecModel: function(t) { 1188 openSpecModel: function(t) {
  1189 +
  1190 + if(this.data.get_sto_ing) return false;
  1191 +
1189 var th=this; var open_store = t.currentTarget.dataset.ind; 1192 var th=this; var open_store = t.currentTarget.dataset.ind;
1190 if(getApp().is_sp_hao() && open_store==1){ 1193 if(getApp().is_sp_hao() && open_store==1){
1191 wx.showToast({ 1194 wx.showToast({
@@ -1443,6 +1446,8 @@ Page({ @@ -1443,6 +1446,8 @@ Page({
1443 }) 1446 })
1444 } 1447 }
1445 1448
  1449 + this.data.get_sto_ing=1;
  1450 +
1446 var timer_get = setInterval(function() { 1451 var timer_get = setInterval(function() {
1447 if (th.data.is_get_local_ok == 0) return false; 1452 if (th.data.is_get_local_ok == 0) return false;
1448 if (!th.data.fir_def_store) return false; 1453 if (!th.data.fir_def_store) return false;
@@ -1557,6 +1562,9 @@ Page({ @@ -1557,6 +1562,9 @@ Page({
1557 th.deal_pickup(e); 1562 th.deal_pickup(e);
1558 } 1563 }
1559 else{ 1564 else{
  1565 +
  1566 + th.data.get_sto_ing=0;
  1567 +
1560 th.setData({ 1568 th.setData({
1561 isshow:1 1569 isshow:1
1562 }) 1570 })
@@ -1835,11 +1843,14 @@ Page({ @@ -1835,11 +1843,14 @@ Page({
1835 if (!th.data.def_pick_store) { 1843 if (!th.data.def_pick_store) {
1836 th.setData({def_pick_store:e.data.data.pageData[0]}) 1844 th.setData({def_pick_store:e.data.data.pageData[0]})
1837 } 1845 }
1838 -  
1839 } 1846 }
  1847 +
  1848 + th.data.get_sto_ing=0;
1840 } 1849 }
1841 }); 1850 });
1842 - } else { 1851 + } else {
  1852 +
  1853 + th.data.get_sto_ing=0;
1843 th.setData({ 1854 th.setData({
1844 is_show_sto_cat: 0, 1855 is_show_sto_cat: 0,
1845 only_pk: e.data.data.pageData 1856 only_pk: e.data.data.pageData
packageC/pages/presell/goodsInfo/goodsInfo.js
@@ -1439,6 +1439,9 @@ Page({ @@ -1439,6 +1439,9 @@ Page({
1439 }, 1439 },
1440 1440
1441 openSpecModel: function (t) { 1441 openSpecModel: function (t) {
  1442 +
  1443 + if(this.data.get_sto_ing) return false;
  1444 +
1442 var th = this; 1445 var th = this;
1443 var open_store = t.currentTarget.dataset.ind; 1446 var open_store = t.currentTarget.dataset.ind;
1444 this.setData({ 1447 this.setData({
@@ -1993,6 +1996,9 @@ Page({ @@ -1993,6 +1996,9 @@ Page({
1993 1996
1994 //---------拿出门店分类和门店------------ 1997 //---------拿出门店分类和门店------------
1995 get_sto(e) { 1998 get_sto(e) {
  1999 +
  2000 + this.data.get_sto_ing=1;
  2001 +
1996 var th = this, is_normal = e; 2002 var th = this, is_normal = e;
1997 var that=th; 2003 var that=th;
1998 2004
@@ -2007,7 +2013,7 @@ Page({ @@ -2007,7 +2013,7 @@ Page({
2007 if (!th.data.fir_def_store) return false; 2013 if (!th.data.fir_def_store) return false;
2008 2014
2009 var dd = null, i = getApp().request; 2015 var dd = null, i = getApp().request;
2010 - if (!th.data.sele_g) return false; 2016 + if (!th.data.sele_g) {th.data.get_sto_ing=0; return false;}
2011 2017
2012 var g_distr_type = th.data.sele_g.distr_type; 2018 var g_distr_type = th.data.sele_g.distr_type;
2013 if (g_distr_type != 0) { 2019 if (g_distr_type != 0) {
@@ -2149,10 +2155,12 @@ Page({ @@ -2149,10 +2155,12 @@ Page({
2149 } 2155 }
2150 } 2156 }
2151 else{ 2157 else{
  2158 + th.data.get_sto_ing=0;
2152 wx.hideLoading(); 2159 wx.hideLoading();
2153 } 2160 }
2154 } 2161 }
2155 else{ 2162 else{
  2163 + th.data.get_sto_ing=0;
2156 wx.hideLoading(); 2164 wx.hideLoading();
2157 } 2165 }
2158 }) 2166 })
@@ -2263,7 +2271,7 @@ Page({ @@ -2263,7 +2271,7 @@ Page({
2263 //------------处理门店--------------- 2271 //------------处理门店---------------
2264 deal_pickup(e) { 2272 deal_pickup(e) {
2265 var th = this; 2273 var th = this;
2266 - if (!th.data.sele_g) return false 2274 + if (!th.data.sele_g) { th.data.get_sto_ing=0; return false }
2267 2275
2268 var g_distr_type = th.data.sele_g.distr_type; 2276 var g_distr_type = th.data.sele_g.distr_type;
2269 wx.hideLoading(); 2277 wx.hideLoading();
@@ -2419,6 +2427,9 @@ Page({ @@ -2419,6 +2427,9 @@ Page({
2419 th.setData({ def_pick_store: e.data.data.pageData[0] }) 2427 th.setData({ def_pick_store: e.data.data.pageData[0] })
2420 } 2428 }
2421 } 2429 }
  2430 +
  2431 + th.data.get_sto_ing=0;
  2432 +
2422 } else { 2433 } else {
2423 th.setData({ 2434 th.setData({
2424 is_show_sto_cat: -1, 2435 is_show_sto_cat: -1,
@@ -2429,10 +2440,12 @@ Page({ @@ -2429,10 +2440,12 @@ Page({
2429 th.setData({ def_pick_store: e.data.data.pageData[0] }) 2440 th.setData({ def_pick_store: e.data.data.pageData[0] })
2430 } 2441 }
2431 2442
  2443 + th.data.get_sto_ing=0;
2432 } 2444 }
2433 } 2445 }
2434 }); 2446 });
2435 } else { 2447 } else {
  2448 + th.data.get_sto_ing=0;
2436 th.setData({ 2449 th.setData({
2437 is_show_sto_cat: 0, 2450 is_show_sto_cat: 0,
2438 only_pk: e.data.data.pageData 2451 only_pk: e.data.data.pageData
@@ -2453,7 +2466,7 @@ Page({ @@ -2453,7 +2466,7 @@ Page({
2453 deal_pickup_dline(e) { 2466 deal_pickup_dline(e) {
2454 var pkno = [], 2467 var pkno = [],
2455 th = this; 2468 th = this;
2456 - if (!th.data.sele_g) return false; 2469 + if (!th.data.sele_g){ th.data.get_sto_ing=0; return false;}
2457 2470
2458 if (this.data.def_pick_store) { 2471 if (this.data.def_pick_store) {
2459 pkno.push(this.data.def_pick_store.pickup_no); 2472 pkno.push(this.data.def_pick_store.pickup_no);
@@ -2539,6 +2552,7 @@ Page({ @@ -2539,6 +2552,7 @@ Page({
2539 } 2552 }
2540 2553
2541 } else { 2554 } else {
  2555 + th.data.get_sto_ing=0;
2542 th.setData({ 2556 th.setData({
2543 all_sto: null, 2557 all_sto: null,
2544 only_pk: null, 2558 only_pk: null,
@@ -2613,6 +2627,7 @@ Page({ @@ -2613,6 +2627,7 @@ Page({
2613 th.deal_pickup(em); 2627 th.deal_pickup(em);
2614 2628
2615 } else { 2629 } else {
  2630 + th.data.get_sto_ing=0;
2616 th.setData({ 2631 th.setData({
2617 all_sto: null, 2632 all_sto: null,
2618 only_pk: null, 2633 only_pk: null,
@@ -2621,6 +2636,7 @@ Page({ @@ -2621,6 +2636,7 @@ Page({
2621 } 2636 }
2622 2637
2623 } else { 2638 } else {
  2639 + th.data.get_sto_ing=0;
2624 th.setData({ 2640 th.setData({
2625 all_sto: null, 2641 all_sto: null,
2626 only_pk: null, 2642 only_pk: null,
pages/goods/goodsInfo/goodsInfo.js
@@ -2761,6 +2761,8 @@ Page({ @@ -2761,6 +2761,8 @@ Page({
2761 }, 2761 },
2762 2762
2763 openSpecModel: function (t) { 2763 openSpecModel: function (t) {
  2764 +
  2765 + if(this.data.get_sto_ing) return false;
2764 2766
2765 var th = this; 2767 var th = this;
2766 var open_store = t.currentTarget.dataset.ind; 2768 var open_store = t.currentTarget.dataset.ind;
@@ -3748,6 +3750,7 @@ Page({ @@ -3748,6 +3750,7 @@ Page({
3748 sp_seleing:0 3750 sp_seleing:0
3749 }) 3751 })
3750 3752
  3753 +
3751 }, 3754 },
3752 3755
3753 3756
@@ -3758,6 +3761,8 @@ Page({ @@ -3758,6 +3761,8 @@ Page({
3758 that = this; 3761 that = this;
3759 var is_normal = e; 3762 var is_normal = e;
3760 3763
  3764 + th.data.get_sto_ing=1;
  3765 +
3761 if (e == 1) { 3766 if (e == 1) {
3762 th.setData({ 3767 th.setData({
3763 is_normal: 1 3768 is_normal: 1
@@ -3772,9 +3777,10 @@ Page({ @@ -3772,9 +3777,10 @@ Page({
3772 if (th.data.is_get_local_ok == 0) return false; 3777 if (th.data.is_get_local_ok == 0) return false;
3773 if (!th.data.fir_def_store) return false; 3778 if (!th.data.fir_def_store) return false;
3774 3779
  3780 +
3775 var dd = null, 3781 var dd = null,
3776 i = getApp().request; 3782 i = getApp().request;
3777 - if (!th.data.sele_g) return false; 3783 + if (!th.data.sele_g) {th.data.get_sto_ing=0; return false; }
3778 3784
3779 var g_distr_type = th.data.sele_g.distr_type; 3785 var g_distr_type = th.data.sele_g.distr_type;
3780 if (g_distr_type != 0) { 3786 if (g_distr_type != 0) {
@@ -3959,12 +3965,14 @@ Page({ @@ -3959,12 +3965,14 @@ Page({
3959 th.setData({sp_seleing:0}) 3965 th.setData({sp_seleing:0})
3960 wx.hideLoading(); 3966 wx.hideLoading();
3961 th.data.fir_set_sto=0; 3967 th.data.fir_set_sto=0;
  3968 + th.data.get_sto_ing=0;
3962 } 3969 }
3963 } else { 3970 } else {
3964 if(func) func(); 3971 if(func) func();
3965 th.setData({sp_seleing:0}) 3972 th.setData({sp_seleing:0})
3966 wx.hideLoading(); 3973 wx.hideLoading();
3967 th.data.fir_set_sto=0; 3974 th.data.fir_set_sto=0;
  3975 + th.data.get_sto_ing=0;
3968 } 3976 }
3969 },err=>{ 3977 },err=>{
3970 ut.m_toast('网络繁忙,请稍后重试'); 3978 ut.m_toast('网络繁忙,请稍后重试');
@@ -3972,6 +3980,7 @@ Page({ @@ -3972,6 +3980,7 @@ Page({
3972 th.setData({sp_seleing:0}) 3980 th.setData({sp_seleing:0})
3973 wx.hideLoading(); 3981 wx.hideLoading();
3974 th.data.fir_set_sto=0; 3982 th.data.fir_set_sto=0;
  3983 + th.data.get_sto_ing=0;
3975 }) 3984 })
3976 }, 200) 3985 }, 200)
3977 3986
@@ -4105,6 +4114,7 @@ Page({ @@ -4105,6 +4114,7 @@ Page({
4105 var th = this; 4114 var th = this;
4106 if (!th.data.sele_g){ 4115 if (!th.data.sele_g){
4107 wx.hideLoading(); 4116 wx.hideLoading();
  4117 + th.data.get_sto_ing=0;
4108 return false 4118 return false
4109 } 4119 }
4110 4120
@@ -4337,6 +4347,8 @@ Page({ @@ -4337,6 +4347,8 @@ Page({
4337 th.deal_front_pk(); 4347 th.deal_front_pk();
4338 } 4348 }
4339 4349
  4350 + th.data.get_sto_ing=0;
  4351 +
4340 }, 4352 },
4341 4353
4342 //------------处理线下门店库存-------- 4354 //------------处理线下门店库存--------
@@ -4443,6 +4455,7 @@ Page({ @@ -4443,6 +4455,7 @@ Page({
4443 4455
4444 4456
4445 } else { 4457 } else {
  4458 + th.data.get_sto_ing=0;
4446 th.data.fir_set_sto=0; 4459 th.data.fir_set_sto=0;
4447 th.setData({ 4460 th.setData({
4448 all_sto: null, 4461 all_sto: null,
@@ -4542,6 +4555,7 @@ Page({ @@ -4542,6 +4555,7 @@ Page({
4542 4555
4543 } else { 4556 } else {
4544 4557
  4558 + th.data.get_sto_ing=0;
4545 th.data.fir_set_sto=0; 4559 th.data.fir_set_sto=0;
4546 th.setData({ 4560 th.setData({
4547 all_sto: null, 4561 all_sto: null,
@@ -4552,6 +4566,7 @@ Page({ @@ -4552,6 +4566,7 @@ Page({
4552 4566
4553 } else { 4567 } else {
4554 4568
  4569 + th.data.get_sto_ing=0;
4555 th.data.fir_set_sto=0; 4570 th.data.fir_set_sto=0;
4556 th.setData({ 4571 th.setData({
4557 all_sto: null, 4572 all_sto: null,
@@ -5488,6 +5503,8 @@ Page({ @@ -5488,6 +5503,8 @@ Page({
5488 //--点击弹起拼单-- 5503 //--点击弹起拼单--
5489 openSpecModel_pt:function (e) { 5504 openSpecModel_pt:function (e) {
5490 5505
  5506 + if(this.data.get_sto_ing) return false;
  5507 +
5491 this.setData({ 5508 this.setData({
5492 open_ind_store: 4, 5509 open_ind_store: 4,
5493 goodsInputNum: 1 5510 goodsInputNum: 1
@@ -8559,7 +8576,8 @@ Page({ @@ -8559,7 +8576,8 @@ Page({
8559 8576
8560 //-- 积分购购买弹出框 -- 8577 //-- 积分购购买弹出框 --
8561 go_pay_integral: function () { 8578 go_pay_integral: function () {
8562 - 8579 +
  8580 + if(this.data.get_sto_ing) return false;
8563 //-- 在打开弹出框的时候,front_pk门店要赋值 -- 8581 //-- 在打开弹出框的时候,front_pk门店要赋值 --
8564 this.setData({def_pick_store: ut.deep_cp(this.data.front_pick)}); 8582 this.setData({def_pick_store: ut.deep_cp(this.data.front_pick)});
8565 8583
@@ -8574,6 +8592,7 @@ Page({ @@ -8574,6 +8592,7 @@ Page({
8574 //-- 积分购普通购买弹出框 -- 8592 //-- 积分购普通购买弹出框 --
8575 go_pay_integral_normal:async function () { 8593 go_pay_integral_normal:async function () {
8576 8594
  8595 + if(this.data.get_sto_ing) return false;
8577 this.data.g_buy_num = new Map(); 8596 this.data.g_buy_num = new Map();
8578 var th = this; 8597 var th = this;
8579 8598
@@ -9148,6 +9167,9 @@ Page({ @@ -9148,6 +9167,9 @@ Page({
9148 9167
9149 //-- 秒杀的普通购买 -- 9168 //-- 秒杀的普通购买 --
9150 openSpecModel_Nor: function () { 9169 openSpecModel_Nor: function () {
  9170 +
  9171 + if(this.data.get_sto_ing) return false;
  9172 +
9151 this.data.g_buy_num = new Map(); 9173 this.data.g_buy_num = new Map();
9152 var th = this; 9174 var th = this;
9153 9175