Browse Source

YT-1570创建开票,税额应保留2为小数

intex_20241211
张立 2 months ago
parent
commit
565e9aba31
  1. 14
      src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue

14
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 //

Loading…
Cancel
Save