diff --git a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue index f18f93699..cde80c589 100644 --- a/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue +++ b/src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue @@ -54,12 +54,12 @@ updateOriginFormModel(formModel) } // 2.主数据税额 mainTaxAmount = 未税金额*税率/100 保留两位小数 - let mainTaxAmount = Number(Number(beforeTaxAmount*taxRate*0.01).toFixed(2)) + let mainTaxAmount = Number(beforeTaxAmount*taxRate*0.01).toFixed(2) formRef.value.setValues({ // 主数据税额 taxAmount:mainTaxAmount, // 主数据价税合计金额:mainAdTaxAmount =未税金额+税额 - adTaxAmount:beforeTaxAmount+taxAmount + adTaxAmount:beforeTaxAmount+parseFloat(taxAmount) }) } } @@ -70,14 +70,14 @@ // 1、主数据未税金额 mainBeforeTaxAmount : 所有明细行未税金额的和 let mainBeforeTaxAmount = tableData.reduce((prev, item) =>prev + Number(item['beforeTaxAmount'].toFixed(2)),0).toFixed(2) // 2.主数据税额 mainTaxAmount = 未税金额*税率/100 保留两位小数 - let mainTaxAmount = Number(Number(mainBeforeTaxAmount*taxRate*0.01).toFixed(2)) + let mainTaxAmount = Number(mainBeforeTaxAmount * taxRate * 0.01).toFixed(2) const sumObject = { // 主数据未税金额 beforeTaxAmount:mainBeforeTaxAmount, // 主数据税额 taxAmount:mainTaxAmount, // 主数据价税合计金额:mainAdTaxAmount =未税金额+税额 - adTaxAmount:mainBeforeTaxAmount+mainTaxAmount + adTaxAmount:(Number(mainBeforeTaxAmount)+Number(mainTaxAmount)).toFixed(2) } formRef.value.setValues(sumObject) } @@ -150,7 +150,7 @@ const inputNumberChange = (field, index, row, val) => { row['allocationPrice'] = row['beforeTaxAmount']/row['qty'] - row['price'] // 合计单价 = 销售单价 + 模具分摊单价 - row['sumPrice'] = row['price'] + row['allocationPrice'] + row['sumPrice'] = (row['price'] + row['allocationPrice']).toFixed(5) // 税额:taxAmount 未税价格*税率/100,四舍五入保留2位小数 row['taxAmount'] = (row['beforeTaxAmount'] * formRef.value.formRef.formModel['taxRate'])/100 //含税金额 @@ -279,9 +279,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => // 初始化计算子表 const initTableDataPrice = ()=>{ tableData.value.forEach(item=>{ - item['sumPrice'] = item['price'] + item['allocationPrice'] + item['sumPrice'] = (item['price'] + item['allocationPrice']).toFixed(5) // 未税金额 默认等于数量*合计单价,可修改,必填,最多可输入2位小数 - item['beforeTaxAmount'] = item['sumPrice']*item['qty'] + item['beforeTaxAmount'] = Number(item['sumPrice'])*item['qty'] // 税额:taxAmount 未税价格*税率/100,四舍五入保留2位小数 item['taxAmount'] = (item['beforeTaxAmount'] * formRef.value.formRef.formModel['taxRate'])/100 //含税金额