From c3c63afc2dc2857a5f22e90a87c2285f15460a7e Mon Sep 17 00:00:00 2001 From: shijing Date: Mon, 28 Apr 2025 09:46:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=8E=A7=E5=88=B6=E5=8F=B0=E6=9C=AC?= =?UTF-8?q?=E6=9C=88=E4=BA=A4=E4=BB=98=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/widgets/index_photon.vue | 73 +------------------------ 1 file changed, 2 insertions(+), 71 deletions(-) diff --git a/src/views/home/widgets/index_photon.vue b/src/views/home/widgets/index_photon.vue index c03ba317..b6b74ca5 100644 --- a/src/views/home/widgets/index_photon.vue +++ b/src/views/home/widgets/index_photon.vue @@ -135,9 +135,6 @@ " >
- -
{ - let sum6 = 0,sum6AVG = 0; + let sum6 = 0; if (res6.data2.ds0&&res6.data2.ds0.length>0) { let list6 = res6.data2.ds0; if (list6.length > 0) { list6.forEach((item) => { - if(item.物料.indexOf('AVG')>-1){ - sum6AVG = sum6AVG + item.数量; - }else{ - sum6 = sum6 + item.数量; - } - + sum6 = sum6 + item.数量; }); } } this.monthPayNum6 = sum6; - this.monthPayNumAVG = sum6AVG; }); }, - //获取昨日AVG的生产记录 - getAVGDayData() { - let that = this; - let date = that.yesterday; - let date0 = that.yesterdayBefore; - this.$API.wpm.otherlog.list.req({ - product: "AVG", - page: 0, - handle_date__gte: date, - handle_date__lte: date, - }).then((res) => { - let list = res; - let count_ok = 0, - count_delivered = 0; - if (list.length > 0) { - list.forEach((item) => { - count_ok = count_ok + item.count_ok; - count_delivered = - count_delivered + item.count_delivered; - }); - // that.dayAVGcountOk = count_ok; - that.dayAVGcountDelivered = count_delivered; - this.$API.wpm.otherlog.list.req({ - product: "AVG", - page: 0, - handle_date__gte: date0, - handle_date__lte: date0, - }).then((res0) => { - let list0 = res0; - let count_ok0 = 0, - count_delivered0 = 0; - if (list0.length > 0) { - list0.forEach((item0) => { - count_ok0 = count_ok0 + item0.count_ok; - count_delivered0 = - count_delivered0 + - item0.count_delivered; - }); - that.AVGOktongbi = Math.round( - ((count_ok - count_ok0) / count_ok0) * - 100 - ); - that.AVGDelivertongbi = Math.round( - ((count_delivered - count_delivered0) / - count_delivered0) * - 100 - ); - } - }); - } - }); - }, getProductStatistic() { let that = this; let start_date = that.year_s + "-" + that.month_s + "-01";