diff --git a/src/view/NormalSendGoods.vue b/src/view/NormalSendGoods.vue index 2d6d16d..e3c4fd3 100644 --- a/src/view/NormalSendGoods.vue +++ b/src/view/NormalSendGoods.vue @@ -182,6 +182,7 @@ robTotal: 0, pageSize: 100, currentPage: 1, + step: 400 } }, @@ -302,10 +303,13 @@ this.timer = []; for (let i = 0;i < this.choosedList.length; i++) { - setTimeout(() => { + /*setTimeout(() => { let t = setInterval(this.robFunc(this.choosedList[i].subPurchaseOrderSn, this.choosedList[i].mallId), 1000); this.timer.push({id: this.choosedList[i].subPurchaseOrderSn, timer: t}) - }, 100 * i) + }, 100 * i)*/ + setTimeout(() => { + this.rob(this.choosedList[i].subPurchaseOrderSn, this.choosedList[i].mallId) + }, this.step * i) } let _this = this; @@ -348,15 +352,6 @@ "subPurchaseOrderSn": sn }}).then((res) => { if (res.errorCode == 1000000) { - - - let t = this.timer.filter((item) => { - return item.id == sn; - }) - if (t.length > 0) { - clearInterval(t[0].timer) - } - for (let j = 0; j < this.choosedList.length; j++) { if (this.choosedList[j].subPurchaseOrderSn == sn) { this.addSuccessInfo(this.choosedList[j]); @@ -372,6 +367,11 @@ break; } } + if (this.isBegin) { + setTimeout(() => { + this.rob(sn, mallId) + }, this.choosedList.length * this.step) + } } }) },