From 41f850c38ace7573cfc0b26a840222d4c3e9220d Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 6 Dec 2024 14:09:30 +0800 Subject: [PATCH] =?UTF-8?q?YT-1572=E9=94=80=E5=94=AE=E5=BC=80=E7=A5=A8?= =?UTF-8?q?=E9=87=91=E9=A2=9D=EF=BC=8C=E6=98=8E=E7=BB=86=E7=A8=8E=E9=A2=9D?= =?UTF-8?q?=E3=80=81=E5=90=AB=E7=A8=8E=E9=87=91=E9=A2=9D=EF=BC=8C=E5=BA=94?= =?UTF-8?q?=E4=BF=9D=E7=95=992=E4=BD=8D=E5=B0=8F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + .../CustomerSaleInvoiceBasicForm.vue | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2e2eb6e88..6fe857591 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "cropperjs": "^1.6.1", "crypto-js": "^4.1.1", "dayjs": "^1.11.10", + "decimal.js": "^10.4.3", "diagram-js": "^12.3.0", "echarts": "^5.4.3", "echarts-wordcloud": "^2.1.0", diff --git a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue index ef3d5c664..3b990c2b6 100644 --- a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue +++ b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue @@ -59,7 +59,7 @@ // 主数据税额 taxAmount:mainTaxAmount, // 主数据价税合计金额:mainAdTaxAmount =未税金额+税额 - adTaxAmount:(beforeTaxAmount+parseFloat(taxAmount)).toFixed(2) + adTaxAmount:beforeTaxAmount+parseFloat(taxAmount) }) } } @@ -88,6 +88,7 @@ import { CustomerSaleInvoiceMain,CustomerSaleInvoiceMainRules,CustomerSaleInvoiceDetailRules,CustomerSaleInvoiceDetail} from './customerSaleInvoiceRequestMain.data' import * as CustomerSaleInvoiceMainApi from '@/api/wms/customerSaleInvoiceMain' import * as CustomerStatementDetailApi from '@/api/wms/customerStatementDetail' +import Decimal from "decimal.js" // 传递给父类 const emit = defineEmits([ 'buttonBaseClick','getList' @@ -281,7 +282,7 @@ const initTableDataPrice = ()=>{ tableData.value.forEach(item=>{ item['sumPrice'] = (item['price'] + item['allocationPrice']).toFixed(5) // 未税金额 默认等于数量*合计单价,可修改,必填,最多可输入2位小数 - item['beforeTaxAmount'] = Number(item['sumPrice'])*item['qty'] + item['beforeTaxAmount'] = Number(new Decimal(Number(item['sumPrice'])).mul(new Decimal(item['qty'])).toNumber().toFixed(2)) // 税额:taxAmount 未税价格*税率/100,四舍五入保留2位小数 item['taxAmount'] = (item['beforeTaxAmount'] * formRef.value.formRef.formModel['taxRate'])/100 //含税金额