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;