张诺
20 小时以前 388e286dc8a5b3b8c4717cc74bf128c807eba6b7
src/views/salesManagement/salesQuotation/index.vue
@@ -854,8 +854,13 @@
}
const calculateTotal = () => {
  form.discountAmount = form.subtotal * (form.discountRate / 100)
  form.totalAmount = form.subtotal + form.freight + form.otherFee - form.discountAmount
  const rate = Number(form.discountRate)
  const hasRate = Number.isFinite(rate) && rate > 0
  const subtotal = Number(form.subtotal) || 0
  const freight = Number(form.freight) || 0
  const otherFee = Number(form.otherFee) || 0
  form.discountAmount = hasRate ? subtotal * (rate / 100) : 0
  form.totalAmount = subtotal + freight + otherFee - form.discountAmount
}
const handleCustomerChange = () => {