From a1b1a56d88af74138f67023a37e30d2b26afa510 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Sun, 4 Feb 2024 08:52:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BE=85=E6=A3=80=E6=95=B0?= =?UTF-8?q?=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/detail.js | 2 ++ pages/count/record/countRecord.vue | 2 +- pages/inspect/job/inspectFullDetail.vue | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/common/detail.js b/common/detail.js index fac8eb40..d004df04 100644 --- a/common/detail.js +++ b/common/detail.js @@ -1,6 +1,8 @@ import { calc } from '@/common/calc' + +import { Decimal } from 'decimal.js';//引入 export function getDataSource(subList) { let items = []; subList.forEach(detail => { diff --git a/pages/count/record/countRecord.vue b/pages/count/record/countRecord.vue index 8ad03428..064452e6 100644 --- a/pages/count/record/countRecord.vue +++ b/pages/count/record/countRecord.vue @@ -159,7 +159,7 @@ item.handleQty = new Decimal(0).toNumber(); item.qty = new Decimal(0).toNumber(); for (let detail of item.subList) { - if(detail!=undefined){ + if(detail!=undefined){ if(detail.scaned){ item.handleQty = calc.add(item.handleQty,detail.handleQty); } diff --git a/pages/inspect/job/inspectFullDetail.vue b/pages/inspect/job/inspectFullDetail.vue index ae599b6a..3ae1baca 100644 --- a/pages/inspect/job/inspectFullDetail.vue +++ b/pages/inspect/job/inspectFullDetail.vue @@ -464,7 +464,8 @@ detail.failedQty = detail.failedQty; detail.crackQty = detail.crackQty; detail.notPassedQty = detail.failedQty; - detail.goodQty = detail.handleQty - detail.failedQty - detail.crackQty; + var tempQty = calc.sub(detail.handleQt,detail.failedQty) + detail.goodQty = calc.sub(tempQty,detail.crackQty) ; detail.inspectUser = this.$store.state.user.id //合格数==样品数,全部合格 @@ -519,7 +520,6 @@ height: 100%; background-color: #fff; } - .page-wraper { display: flex; flex-direction: column;