张诺
16 小时以前 e705ef7b15c04307d6f37b388564dedfaeef4a55
src/views/salesManagement/salesQuotation/index.vue
@@ -65,7 +65,7 @@
        </el-table-column>
        <el-table-column prop="totalAmount" label="报价金额" width="120">
          <template #default="scope">
            ¥{{ scope.row.totalAmount.toFixed(2) }}
            ¥{{ scope.row.totalAmount.toFixed(3) }}
          </template>
        </el-table-column>
        <el-table-column label="操作" width="200" fixed="right" align="center">
@@ -272,7 +272,7 @@
            <el-table-column prop="unitPrice" label="单价">
              <template #default="scope">
                <el-form-item :prop="`products.${scope.$index}.unitPrice`" class="product-table-form-item">
                  <el-input-number v-model="scope.row.unitPrice" :min="0" :precision="2" style="width: 100%" />
                  <el-input-number v-model="scope.row.unitPrice" :min="0" :precision="3" style="width: 100%" />
                </el-form-item>
              </template>
            </el-table-column>
@@ -370,7 +370,7 @@
<!--          <el-tag :type="getStatusType(currentQuotation.status)">{{ currentQuotation.status }}</el-tag>-->
<!--        </el-descriptions-item>-->
        <el-descriptions-item label="报价总额" :span="2">
          <span style="font-size: 18px; color: #e6a23c; font-weight: bold;">¥{{ currentQuotation.totalAmount?.toFixed(2) }}</span>
          <span style="font-size: 18px; color: #e6a23c; font-weight: bold;">¥{{ currentQuotation.totalAmount?.toFixed(3) }}</span>
        </el-descriptions-item>
      </el-descriptions>
      
@@ -382,7 +382,7 @@
          <el-table-column prop="unit" label="单位" />
          <el-table-column prop="unitPrice" label="单价">
            <template #default="scope">
              ¥{{ scope.row.unitPrice.toFixed(2) }}
              ¥{{ scope.row.unitPrice.toFixed(3) }}
            </template>
          </el-table-column>
        </el-table>
@@ -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 = () => {