From a159a3a0d152ff29e4f293de87d536d1fce17f95 Mon Sep 17 00:00:00 2001 From: liushiwei <499672082@qq.com> Date: Wed, 9 Aug 2023 12:31:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A2=E4=BB=93=E9=80=BB=E8=BE=91=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/view/NormalSendGoods.vue | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) 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) + } } }) },