fix: 统一销售和采购相关页面金额、单价、数量、总价保留6位小数
| | |
| | | }); |
| | | return sums; |
| | | }; |
| | | // 不含税总价计算 |
| | | const calculateTaxExclusiveTotalPrice = (taxInclusiveTotalPrice, taxRate) => { |
| | | // 不含税总价计算,decimals 为保留小数位数(销售/采购相关页面传 6) |
| | | const calculateTaxExclusiveTotalPrice = ( |
| | | taxInclusiveTotalPrice, |
| | | taxRate, |
| | | decimals = 2 |
| | | ) => { |
| | | const taxRateDecimal = taxRate / 100; |
| | | return (taxInclusiveTotalPrice / (1 + taxRateDecimal)).toFixed(2); |
| | | return (taxInclusiveTotalPrice / (1 + taxRateDecimal)).toFixed(decimals); |
| | | }; |
| | | // 含税总价计算 |
| | | const calculateTaxIncludeTotalPrice = (taxInclusiveUnitPrice, quantity) => { |
| | | return (taxInclusiveUnitPrice * quantity).toFixed(2); |
| | | // 含税总价计算,decimals 为保留小数位数(销售/采购相关页面传 6) |
| | | const calculateTaxIncludeTotalPrice = ( |
| | | taxInclusiveUnitPrice, |
| | | quantity, |
| | | decimals = 2 |
| | | ) => { |
| | | return (taxInclusiveUnitPrice * quantity).toFixed(decimals); |
| | | }; |
| | | // 导出函数供其他文件使用 |
| | | export { |
| | |
| | | @pagination="sonPaginationSearch"> |
| | | <template #payableAmountSlot="{ row }"> |
| | | <el-text type="danger"> |
| | | {{ parseFloat(row.payableAmount).toFixed(2) }} |
| | | {{ parseFloat(row.payableAmount).toFixed(6) }} |
| | | </el-text> |
| | | </template> |
| | | <template #paymentActionSlot="{ row }"> |
| | |
| | | <el-date-picker style="width:100%" v-model="paymentForm.paymentDate" value-format="YYYY-MM-DD" type="date" placeholder="请选择付款日期" clearable /> |
| | | </el-form-item> |
| | | <el-form-item label="付款金额:" prop="paymentAmount"> |
| | | <el-input-number style="width:100%" v-model="paymentForm.paymentAmount" :precision="2" :min="0" :max="Math.max(0,(Number(currentPaymentRow.payableAmount)||0)-(Number(currentPaymentRow.paymentAmount)||0))" placeholder="请输入付款金额" controls-position="right" /> |
| | | <div style="color:#e6a23c;font-size:12px;margin-top:4px">当前可付款余额:{{ Math.max(0,(Number(currentPaymentRow.payableAmount)||0)-(Number(currentPaymentRow.paymentAmount)||0)).toFixed(2) }} 元</div> |
| | | <el-input-number style="width:100%" v-model="paymentForm.paymentAmount" :min="0" :precision="6" :max="Math.max(0,(Number(currentPaymentRow.payableAmount)||0)-(Number(currentPaymentRow.paymentAmount)||0))" placeholder="请输入付款金额" controls-position="right" /> |
| | | <div style="color:#e6a23c;font-size:12px;margin-top:4px">当前可付款余额:{{ Math.max(0,(Number(currentPaymentRow.payableAmount)||0)-(Number(currentPaymentRow.paymentAmount)||0)).toFixed(6) }} 元</div> |
| | | </el-form-item> |
| | | <el-form-item label="付款方式:" prop="paymentMethod"> |
| | | <el-select v-model="paymentForm.paymentMethod" placeholder="请选择付款方式" style="width:100%" clearable> |
| | |
| | | prop: "contractAmount", |
| | | width: 200, |
| | | formatData: params => { |
| | | return params ? parseFloat(params).toFixed(2) : 0; |
| | | return params ? parseFloat(params).toFixed(6) : 0; |
| | | }, |
| | | }, |
| | | { |
| | |
| | | prop: "paymentAmount", |
| | | width: 200, |
| | | formatData: params => { |
| | | return params ? parseFloat(params).toFixed(2) : 0; |
| | | return params ? parseFloat(params).toFixed(6) : 0; |
| | | }, |
| | | }, |
| | | { |
| | |
| | | const currentPaymentRow = ref({}); |
| | | const paymentFormRef = ref(null); |
| | | const paymentForm = reactive({ paymentDate:"", paymentAmount:undefined, paymentMethod:"", remark:"" }); |
| | | const validatePaymentAmount = (_,v,cb) => { |
| | | if(!v) return cb(new Error("请输入付款金额")); |
| | | const max = Math.max(0,(Number(currentPaymentRow.value.payableAmount)||0)-(Number(currentPaymentRow.value.paymentAmount)||0)); |
| | | if(v > max) return cb(new Error(`付款金额不能超过可付款余额 ${max.toFixed(2)} 元`)); |
| | | cb(); |
| | | }; |
| | | const paymentRules = { |
| | | paymentDate:[{required:true,message:"请选择付款日期",trigger:"change"}], |
| | | paymentAmount:[{required:true,validator:validatePaymentAmount,trigger:"blur"}], |
| | | paymentMethod:[{required:true,message:"请选择付款方式",trigger:"change"}], |
| | | }; |
| | | const openPaymentDialog = row => { currentPaymentRow.value=row; paymentForm.paymentDate=""; paymentForm.paymentAmount=undefined; paymentForm.paymentMethod=""; paymentForm.remark=""; paymentDialogVisible.value=true; }; |
| | | const validatePaymentAmount = (_,v,cb) => { if(!v) return cb(new Error("请输入付款金额")); const m=Math.max(0,(Number(currentPaymentRow.value.payableAmount)||0)-(Number(currentPaymentRow.value.paymentAmount)||0)); if(v>m) return cb(new Error(`付款金额不能超过可付款余额 ${m.toFixed(6)} 元`)); cb(); }; |
| | | const paymentRules = { paymentDate:[{required:true,message:"请选择付款日期",trigger:"change"}], paymentAmount:[{required:true,validator:validatePaymentAmount,trigger:"blur"}], paymentMethod:[{required:true,message:"请选择付款方式",trigger:"change"}] }; |
| | | const openPaymentDialog = r => { currentPaymentRow.value=r; paymentForm.paymentDate=""; paymentForm.paymentAmount=undefined; paymentForm.paymentMethod=""; paymentForm.remark=""; paymentDialogVisible.value=true; }; |
| | | const closePaymentDialog = () => { paymentFormRef.value?.resetFields(); paymentDialogVisible.value=false; }; |
| | | const submitPaymentForm = () => { |
| | | paymentFormRef.value?.validate(valid => { |
| | | if(valid){ |
| | | savePayment({ supplierId:currentSupplierId.value, purchaseContractNumber:currentPaymentRow.value.purchaseContractNumber, paymentDate:paymentForm.paymentDate, paymentAmount:paymentForm.paymentAmount, paymentMethod:paymentForm.paymentMethod, remark:paymentForm.remark }).then(res => { |
| | | proxy.$modal.msgSuccess("新增付款成功"); closePaymentDialog(); getPaymenRecordtList(currentSupplierId.value); getList(); |
| | | }); |
| | | } |
| | | }); |
| | | }; |
| | | const submitPaymentForm = () => { paymentFormRef.value?.validate(v=>{ if(v){ savePayment({ supplierId:currentSupplierId.value, purchaseContractNumber:currentPaymentRow.value.purchaseContractNumber, paymentDate:paymentForm.paymentDate, paymentAmount:paymentForm.paymentAmount, paymentMethod:paymentForm.paymentMethod, remark:paymentForm.remark }).then(res=>{ proxy.$modal.msgSuccess("新增付款成功"); closePaymentDialog(); getPaymenRecordtList(currentSupplierId.value); getList(); }); } }); }; |
| | | |
| | | // 主表合计方法 |
| | | const summarizeMainTable = param => { |
| | |
| | | param, |
| | | ["contractAmounts", "paymentAmount", "payableAmount"], |
| | | { |
| | | contractAmounts: { decimalPlaces: 6 }, |
| | | paymentAmount: { decimalPlaces: 6 }, |
| | | payableAmount: { decimalPlaces: 6 }, |
| | | ticketsNum: { noDecimal: true }, // 不保留小数 |
| | | futureTickets: { noDecimal: true }, // 不保留小数 |
| | | } |
| | |
| | | param, |
| | | ["contractAmount", "invoiceAmount", "paymentAmount"], |
| | | { |
| | | contractAmount: { decimalPlaces: 6 }, |
| | | invoiceAmount: { decimalPlaces: 6 }, |
| | | paymentAmount: { decimalPlaces: 6 }, |
| | | ticketsNum: { noDecimal: true }, // 不保留小数 |
| | | futureTickets: { noDecimal: true }, // 不保留小数 |
| | | } |
| | |
| | | summarizeTable[summarizeTable.length - 1] = |
| | | originalTableDataSon.value[ |
| | | originalTableDataSon.value.length - 1 |
| | | ].payableAmount.toFixed(2); |
| | | ].payableAmount.toFixed(6); |
| | | } else { |
| | | summarizeTable[summarizeTable.length - 1] = 0.0; |
| | | } |
| | |
| | | }; |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | if (column.property !== "supplierName") { |
| | | return parseFloat(cellValue).toFixed(2); |
| | | return parseFloat(cellValue).toFixed(6); |
| | | } else { |
| | | return cellValue; |
| | | } |
| | |
| | | <el-table-column label="可用数量" |
| | | prop="availableQuality" /> |
| | | <el-table-column label="退货数量" |
| | | prop="returnQuality" /> |
| | | prop="returnQuantity" /> |
| | | <el-table-column label="税率(%)" |
| | | prop="taxRate" /> |
| | | <el-table-column label="含税单价(元)" |
| | |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="合同金额(元)" |
| | | prop="contractAmount" |
| | | width="200" |
| | | show-overflow-tooltip |
| | | :formatter="formattedNumber" /> |
| | | <el-table-column label="实际合同金额(元)" |
| | | prop="netContractAmount" |
| | | width="200" |
| | | show-overflow-tooltip |
| | | :formatter="formattedNumber" /> |
| | |
| | | <el-form-item label="含税单价(元):" |
| | | prop="taxInclusiveUnitPrice"> |
| | | <el-input-number v-model="productForm.taxInclusiveUnitPrice" |
| | | :precision="2" |
| | | :precision="6" |
| | | :step="0.1" |
| | | :min="0" |
| | | clearable |
| | |
| | | prop="quantity"> |
| | | <el-input-number :step="0.1" |
| | | clearable |
| | | :precision="2" |
| | | :precision="6" |
| | | :min="0" |
| | | style="width: 100%" |
| | | v-model="productForm.quantity" |
| | |
| | | <el-form-item label="含税总价(元):" |
| | | prop="taxInclusiveTotalPrice"> |
| | | <el-input-number v-model="productForm.taxInclusiveTotalPrice" |
| | | :precision="2" |
| | | :precision="6" |
| | | :step="0.1" |
| | | :min="0" |
| | | clearable |
| | |
| | | <el-form-item label="不含税总价(元):" |
| | | prop="taxExclusiveTotalPrice"> |
| | | <el-input-number v-model="productForm.taxExclusiveTotalPrice" |
| | | :precision="2" |
| | | :precision="6" |
| | | :step="0.1" |
| | | :min="0" |
| | | clearable |
| | |
| | | <el-form-item label="库存预警数量:" |
| | | prop="warnNum"> |
| | | <el-input-number v-model="productForm.warnNum" |
| | | :precision="2" |
| | | :precision="6" |
| | | :step="0.1" |
| | | :min="0" |
| | | clearable |
| | |
| | | }, |
| | | }); |
| | | const { form, rules } = toRefs(data); |
| | | const { form: searchForm } = useFormData(data.searchForm); |
| | | const { form: searchForm } = useFormData({ |
| | | ...data.searchForm, |
| | | // 设置录入日期范围为当天 |
| | | entryDate: [ |
| | | dayjs().startOf("day").format("YYYY-MM-DD"), |
| | | dayjs().endOf("day").format("YYYY-MM-DD"), |
| | | ], |
| | | entryDateStart: dayjs().startOf("day").format("YYYY-MM-DD"), |
| | | entryDateEnd: dayjs().endOf("day").format("YYYY-MM-DD"), |
| | | }); |
| | | |
| | | // 产品表单弹框数据 |
| | | const productFormVisible = ref(false); |
| | |
| | | }; |
| | | |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | return parseFloat(cellValue).toFixed(2); |
| | | return parseFloat(cellValue).toFixed(6); |
| | | }; |
| | | // 查询列表 |
| | | /** 搜索按钮操作 */ |
| | |
| | | "futureTicketsAmount", |
| | | ], |
| | | { |
| | | taxInclusiveUnitPrice: { decimalPlaces: 6 }, |
| | | taxInclusiveTotalPrice: { decimalPlaces: 6 }, |
| | | taxExclusiveTotalPrice: { decimalPlaces: 6 }, |
| | | ticketsAmount: { decimalPlaces: 6 }, |
| | | futureTicketsAmount: { decimalPlaces: 6 }, |
| | | ticketsNum: { noDecimal: true }, // 不保留小数 |
| | | futureTickets: { noDecimal: true }, // 不保留小数 |
| | | } |
| | |
| | | }; |
| | | // 主表合计方法 |
| | | const summarizeMainTable = param => { |
| | | return proxy.summarizeTable(param, ["contractAmount"]); |
| | | return proxy.summarizeTable( |
| | | param, |
| | | ["contractAmount", "netContractAmount"], |
| | | { |
| | | contractAmount: { decimalPlaces: 6 }, |
| | | netContractAmount: { decimalPlaces: 6 }, |
| | | } |
| | | ); |
| | | }; |
| | | // 子表合计方法 |
| | | const summarizeProTable = param => { |
| | | return proxy.summarizeTable(param, [ |
| | | "taxInclusiveUnitPrice", |
| | | "taxInclusiveTotalPrice", |
| | | "taxExclusiveTotalPrice", |
| | | ]); |
| | | return proxy.summarizeTable( |
| | | param, |
| | | [ |
| | | "taxInclusiveUnitPrice", |
| | | "taxInclusiveTotalPrice", |
| | | "taxExclusiveTotalPrice", |
| | | ], |
| | | { |
| | | taxInclusiveUnitPrice: { decimalPlaces: 6 }, |
| | | taxInclusiveTotalPrice: { decimalPlaces: 6 }, |
| | | taxExclusiveTotalPrice: { decimalPlaces: 6 }, |
| | | } |
| | | ); |
| | | }; |
| | | // 打开弹框 |
| | | const openForm = async (type, row) => { |
| | |
| | | productForm.value.taxInclusiveTotalPrice = |
| | | proxy.calculateTaxIncludeTotalPrice( |
| | | productForm.value.taxInclusiveUnitPrice, |
| | | productForm.value.quantity |
| | | productForm.value.quantity, |
| | | 6 |
| | | ); |
| | | if (productForm.value.taxRate) { |
| | | // 不含税总价计算 |
| | | productForm.value.taxExclusiveTotalPrice = |
| | | proxy.calculateTaxExclusiveTotalPrice( |
| | | productForm.value.taxInclusiveTotalPrice, |
| | | productForm.value.taxRate |
| | | productForm.value.taxRate, |
| | | 6 |
| | | ); |
| | | } |
| | | }; |
| | |
| | | productForm.value.taxInclusiveUnitPrice = ( |
| | | Number(productForm.value.taxInclusiveTotalPrice) / |
| | | Number(productForm.value.quantity) |
| | | ).toFixed(2); |
| | | ).toFixed(6); |
| | | // 确保结果不为负数 |
| | | if (Number(productForm.value.taxInclusiveUnitPrice) < 0) { |
| | | productForm.value.taxInclusiveUnitPrice = "0"; |
| | |
| | | productForm.value.quantity = ( |
| | | Number(productForm.value.taxInclusiveTotalPrice) / |
| | | Number(productForm.value.taxInclusiveUnitPrice) |
| | | ).toFixed(2); |
| | | ).toFixed(6); |
| | | // 确保结果不为负数 |
| | | if (Number(productForm.value.quantity) < 0) { |
| | | productForm.value.quantity = "0"; |
| | |
| | | productForm.value.taxExclusiveTotalPrice = ( |
| | | Number(productForm.value.taxInclusiveTotalPrice) / |
| | | (1 + taxRate / 100) |
| | | ).toFixed(2); |
| | | ).toFixed(6); |
| | | // 确保结果不为负数 |
| | | if (Number(productForm.value.taxExclusiveTotalPrice) < 0) { |
| | | productForm.value.taxExclusiveTotalPrice = "0"; |
| | |
| | | productForm.value.taxInclusiveTotalPrice = ( |
| | | Number(productForm.value.taxExclusiveTotalPrice) * |
| | | (1 + taxRate / 100) |
| | | ).toFixed(2); |
| | | ).toFixed(6); |
| | | // 确保结果不为负数 |
| | | if (Number(productForm.value.taxInclusiveTotalPrice) < 0) { |
| | | productForm.value.taxInclusiveTotalPrice = "0"; |
| | |
| | | productForm.value.taxInclusiveUnitPrice = ( |
| | | Number(productForm.value.taxInclusiveTotalPrice) / |
| | | Number(productForm.value.quantity) |
| | | ).toFixed(2); |
| | | ).toFixed(6); |
| | | // 确保结果不为负数 |
| | | if (Number(productForm.value.taxInclusiveUnitPrice) < 0) { |
| | | productForm.value.taxInclusiveUnitPrice = "0"; |
| | |
| | | productForm.value.quantity = ( |
| | | Number(productForm.value.taxInclusiveTotalPrice) / |
| | | Number(productForm.value.taxInclusiveUnitPrice) |
| | | ).toFixed(2); |
| | | ).toFixed(6); |
| | | // 确保结果不为负数 |
| | | if (Number(productForm.value.quantity) < 0) { |
| | | productForm.value.quantity = "0"; |
| | |
| | | <div class="summary-stats"> |
| | | <div class="stat-item"> |
| | | <span class="stat-label">采购总额:</span> |
| | | <span class="stat-value">¥{{ businessSummaryStats.totalAmount.toLocaleString() }}</span> |
| | | <span class="stat-value">¥{{ formatStatAmount(businessSummaryStats.totalAmount) }}</span> |
| | | </div> |
| | | <div class="stat-item"> |
| | | <span class="stat-label">商品种类:</span> |
| | |
| | | </div> |
| | | <div class="stat-item"> |
| | | <span class="stat-label">退款总额:</span> |
| | | <span class="stat-value">{{ businessSummaryStats.returnAmount }}</span> |
| | | <span class="stat-value">¥{{ formatStatAmount(businessSummaryStats.returnAmount) }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | // 统计数据 |
| | | const businessSummaryStats = ref({ |
| | | totalAmount: 0, |
| | | returnAmount: 0, |
| | | productTypes: 0 |
| | | }) |
| | | |
| | | // 汇总金额展示,保留6位小数 |
| | | const formatStatAmount = (val) => { |
| | | return Number(val || 0).toLocaleString('zh-CN', { |
| | | minimumFractionDigits: 6, |
| | | maximumFractionDigits: 6 |
| | | }) |
| | | } |
| | | |
| | | // 表格列配置(根据后端字段定义) |
| | | const tableColumns = ref([ |
| | |
| | | prop: 'purchaseNum', |
| | | width: 120, |
| | | formatData: (val) => { |
| | | return val ? parseFloat(val).toLocaleString() : '0' |
| | | return val ? parseFloat(val).toLocaleString('zh-CN', { minimumFractionDigits: 6, maximumFractionDigits: 6 }) : '0' |
| | | } |
| | | }, |
| | | { |
| | |
| | | prop: 'returnQuantity', |
| | | width: 120, |
| | | formatData: (val) => { |
| | | return val ? parseFloat(val).toLocaleString() : '0' |
| | | return val ? parseFloat(val).toLocaleString('zh-CN', { minimumFractionDigits: 6, maximumFractionDigits: 6 }) : '0' |
| | | } |
| | | }, |
| | | { |
| | |
| | | prop: 'returnAmount', |
| | | width: 120, |
| | | formatData: (val) => { |
| | | return val ? `¥${parseFloat(val).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : '¥0.00' |
| | | return val ? `¥${parseFloat(val).toLocaleString('zh-CN', { minimumFractionDigits: 6, maximumFractionDigits: 6 })}` : '¥0.000000' |
| | | } |
| | | }, |
| | | { |
| | | label: '退款储量', |
| | | prop: 'purchaseAmount', |
| | | formatData: (val) => { |
| | | return val ? `¥${parseFloat(val).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : '¥0.00' |
| | | return val ? `¥${parseFloat(val).toLocaleString('zh-CN', { minimumFractionDigits: 6, maximumFractionDigits: 6 })}` : '¥0.000000' |
| | | } |
| | | }, |
| | | { |
| | |
| | | prop: 'averagePrice', |
| | | width: 120, |
| | | formatData: (val) => { |
| | | return val ? `¥${parseFloat(val).toFixed(2)}` : '¥0.00' |
| | | return val ? `¥${parseFloat(val).toFixed(6)}` : '¥0.000000' |
| | | } |
| | | }, |
| | | { |
| | |
| | | } else { |
| | | businessSummaryStats.value = { |
| | | totalAmount: 0, |
| | | returnAmount: 0, |
| | | productTypes: 0 |
| | | } |
| | | } |
| | |
| | | <el-input-number v-model="scope.row.returnQuantity" |
| | | controls-position="right" |
| | | :step="1" |
| | | :precision="6" |
| | | :min="0" |
| | | :max="getReturnQtyMax(scope.row)" |
| | | :disabled="getReturnQtyMax(scope.row) <= 0" |
| | |
| | | <el-input-number v-model="formState.totalDiscountAmount" |
| | | controls-position="right" |
| | | :step="0.01" |
| | | :precision="2" |
| | | :precision="6" |
| | | style="width: 100%;" |
| | | @change="handleChangeTotalDiscountAmount" |
| | | placeholder="请输入整单折扣额"/> |
| | |
| | | <el-input v-model="formState.totalDiscountRate" |
| | | controls-position="right" |
| | | :step="0.01" |
| | | :precision="2" |
| | | :precision="6" |
| | | style="width: 100%;" |
| | | @change="totalDiscount" |
| | | placeholder="请输入整单折扣率"> |
| | |
| | | <el-input-number v-model="formState.totalAmount" |
| | | controls-position="right" |
| | | :step="0.01" |
| | | :precision="2" |
| | | :precision="6" |
| | | style="width: 100%;" |
| | | placeholder="请输入成交金额"/> |
| | | </el-form-item> |
| | |
| | | }); |
| | | |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | return parseFloat(cellValue).toFixed(2); |
| | | return parseFloat(cellValue).toFixed(6); |
| | | }; |
| | | |
| | | const formatAmount = (value) => { |
| | |
| | | if (Number.isNaN(num)) { |
| | | return '--' |
| | | } |
| | | return num.toFixed(2) |
| | | return num.toFixed(6) |
| | | } |
| | | |
| | | const toNumber = (val) => { |
| | |
| | | const total = Number(row?.stockInNum ?? row?.totalQuantity ?? row?.quantity ?? 0) |
| | | const un = Number(row?.unQuantity ?? 0) |
| | | if (!Number.isFinite(total) || !Number.isFinite(un)) return 0 |
| | | return Math.max(total - un, 0) |
| | | // 保留6位小数,避免浮点减法产生精度误差 |
| | | return Math.max(parseFloat((total - un).toFixed(6)), 0) |
| | | } |
| | | |
| | | const getReturnTotal = (row) => { |
| | | const qty = toNumber(row?.returnQuantity) |
| | | const unitPrice = toNumber(row?.taxInclusiveUnitPrice) |
| | | const total = qty * unitPrice |
| | | return Number(total.toFixed(2)) |
| | | return Number(total.toFixed(6)) |
| | | } |
| | | |
| | | const syncReturnTotal = (row) => { |
| | |
| | | } |
| | | const baseAmount = getBaseAmount() |
| | | // 折扣额 = 产品退货总价合计 * 折扣率 |
| | | formState.value.totalDiscountAmount = Number((baseAmount * (discountRate / 100)).toFixed(2)) |
| | | formState.value.totalDiscountAmount = Number((baseAmount * (discountRate / 100)).toFixed(6)) |
| | | syncTotalAmount() |
| | | } |
| | | |
| | |
| | | "taxExclusiveTotalPrice", |
| | | ], |
| | | { |
| | | stockInNum: { noDecimal: true }, // 不保留小数 |
| | | returnQuantity: { noDecimal: true }, // 不保留小数 |
| | | unQuantity: { noDecimal: true }, // 不保留小数 |
| | | stockInNum: { decimalPlaces: 6 }, |
| | | returnQuantity: { decimalPlaces: 6 }, |
| | | unQuantity: { decimalPlaces: 6 }, |
| | | taxInclusiveUnitPrice: { decimalPlaces: 6 }, |
| | | taxInclusiveTotalPrice: { decimalPlaces: 6 }, |
| | | taxExclusiveTotalPrice: { decimalPlaces: 6 }, |
| | | } |
| | | ); |
| | | }; |
| | |
| | | |
| | | if (normalizedAmount > baseAmount) { |
| | | proxy.$modal.msgError("整单折扣额不能大于产品退货总价合计") |
| | | formState.value.totalDiscountAmount = Number(baseAmount.toFixed(2)) |
| | | formState.value.totalDiscountAmount = Number(baseAmount.toFixed(6)) |
| | | } |
| | | |
| | | const discountRate = (toNumber(formState.value.totalDiscountAmount) / baseAmount) * 100 |
| | | formState.value.totalDiscountRate = Number(discountRate.toFixed(2)) |
| | | formState.value.totalDiscountRate = Number(discountRate.toFixed(6)) |
| | | syncTotalAmount() |
| | | } |
| | | |
| | |
| | | const baseAmount = getBaseAmount() |
| | | const discount = toNumber(formState.value.totalDiscountAmount) |
| | | // 成交金额 = 产品退货总价合计 - 折扣额 |
| | | formState.value.totalAmount = Number((baseAmount - discount).toFixed(2)) |
| | | formState.value.totalAmount = Number((baseAmount - discount).toFixed(6)) |
| | | } |
| | | |
| | | // 获取供应商选项 |
| | |
| | | const selectedRows = ref([]) |
| | | const tableLoading = ref(false) |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | return parseFloat(cellValue).toFixed(2); |
| | | return parseFloat(cellValue).toFixed(6); |
| | | }; |
| | | |
| | | /** 已退货数量 = 入库行总数量 − 当前可退货数量(剩余) */ |
| | |
| | | if (Number.isNaN(num)) { |
| | | return value; |
| | | } |
| | | return num.toFixed(2); |
| | | return num.toFixed(6); |
| | | }; |
| | | |
| | | /** 已退货数量 = 入库行总数量 − 当前可退货数量(剩余) */ |
| | |
| | | const total = Number(row?.stockInNum ?? row?.totalQuantity ?? row?.quantity ?? 0); |
| | | const un = Number(row?.unQuantity ?? 0); |
| | | if (!Number.isFinite(total) || !Number.isFinite(un)) return 0; |
| | | return Math.max(total - un, 0); |
| | | // 保留6位小数,避免浮点减法产生精度误差 |
| | | return Math.max(parseFloat((total - un).toFixed(6)), 0); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | |
| | | }, |
| | | }); |
| | | const { searchForm } = toRefs(data); |
| | | // 数量运算保留6位小数,避免浮点减法出现 7.199999999999999 这类精度误差 |
| | | const toQuantity = val => { |
| | | const n = Number(val); |
| | | if (!Number.isFinite(n)) return 0; |
| | | return parseFloat(n.toFixed(6)); |
| | | }; |
| | | const toProgressPercentage = val => { |
| | | const n = Number(val); |
| | | if (!Number.isFinite(n)) return 0; |
| | |
| | | currentReportRowData.value = row; |
| | | const planQuantity = Number(row.planQuantity || 0); |
| | | const completeQuantity = Number(row.completeQuantity || 0); |
| | | const remainingQuantity = Math.max(0, planQuantity - completeQuantity); |
| | | const remainingQuantity = Math.max( |
| | | 0, |
| | | toQuantity(planQuantity - completeQuantity) |
| | | ); |
| | | reportForm.planQuantity = remainingQuantity; |
| | | reportForm.quantity = |
| | | row.quantity !== undefined && row.quantity !== null ? row.quantity : null; |
| | |
| | | |
| | | <el-dialog v-model="receiptDialogVisible" title="新增回款" width="35%" @close="closeReceiptDialog"> |
| | | <el-form :model="receiptForm" label-width="100px" :rules="receiptRules" ref="receiptFormRef"> |
| | | <el-form-item label="销售合同号:"> {{ currentRow.salesContractNo || '--' }} </el-form-item> |
| | | <el-form-item label="销售合同号:">{{ currentRow.salesContractNo || '--' }}</el-form-item> |
| | | <el-form-item label="回款日期:" prop="paymentDate"> |
| | | <el-date-picker style="width:100%" v-model="receiptForm.paymentDate" value-format="YYYY-MM-DD" type="date" placeholder="请选择回款日期" clearable /> |
| | | </el-form-item> |
| | | <el-form-item label="回款金额:" prop="paymentAmount"> |
| | | <el-input-number style="width:100%" v-model="receiptForm.paymentAmount" :precision="2" :min="0" :max="Math.max(0,(Number(currentRow.receiptableAmount)||0)-(Number(currentRow.receiptPaymentAmount)||0))" placeholder="请输入回款金额" controls-position="right" /> |
| | | <el-input-number style="width:100%" v-model="receiptForm.paymentAmount" :min="0" :precision="6" :max="Math.max(0,(Number(currentRow.receiptableAmount)||0)-(Number(currentRow.receiptPaymentAmount)||0))" placeholder="请输入回款金额" controls-position="right" /> |
| | | <div style="color:#e6a23c;font-size:12px;margin-top:4px">当前可回款余额:{{ formattedNumber(null,null,Math.max(0,(Number(currentRow.receiptableAmount)||0)-(Number(currentRow.receiptPaymentAmount)||0))) }} 元</div> |
| | | </el-form-item> |
| | | <el-form-item label="回款方式:" prop="paymentMethod"> |
| | |
| | | const currentRow = ref({}); |
| | | const receiptFormRef = ref(null); |
| | | const receiptForm = reactive({ paymentDate:"", paymentAmount:undefined, paymentMethod:"", remark:"" }); |
| | | const validatePaymentAmount = (_,v,cb) => { |
| | | if(!v) return cb(new Error("请输入回款金额")); |
| | | const max = Math.max(0,(Number(currentRow.value.receiptableAmount)||0)-(Number(currentRow.value.receiptPaymentAmount)||0)); |
| | | if(v > max) return cb(new Error(`回款金额不能超过可回款余额 ${max.toFixed(2)} 元`)); |
| | | cb(); |
| | | }; |
| | | const receiptRules = { |
| | | paymentDate:[{required:true,message:"请选择回款日期",trigger:"change"}], |
| | | paymentAmount:[{required:true,validator:validatePaymentAmount,trigger:"blur"}], |
| | | paymentMethod:[{required:true,message:"请选择回款方式",trigger:"change"}], |
| | | }; |
| | | const openReceiptDialog = row => { currentRow.value=row; receiptForm.paymentDate=""; receiptForm.paymentAmount=undefined; receiptForm.paymentMethod=""; receiptForm.remark=""; receiptDialogVisible.value=true; }; |
| | | const validatePaymentAmount = (_,v,cb) => { if(!v) return cb(new Error("请输入回款金额")); const m=Math.max(0,(Number(currentRow.value.receiptableAmount)||0)-(Number(currentRow.value.receiptPaymentAmount)||0)); if(v>m) return cb(new Error(`回款金额不能超过可回款余额 ${m.toFixed(6)} 元`)); cb(); }; |
| | | const receiptRules = { paymentDate:[{required:true,message:"请选择回款日期",trigger:"change"}], paymentAmount:[{required:true,validator:validatePaymentAmount,trigger:"blur"}], paymentMethod:[{required:true,message:"请选择回款方式",trigger:"change"}] }; |
| | | const openReceiptDialog = r => { currentRow.value=r; receiptForm.paymentDate=""; receiptForm.paymentAmount=undefined; receiptForm.paymentMethod=""; receiptForm.remark=""; receiptDialogVisible.value=true; }; |
| | | const closeReceiptDialog = () => { receiptFormRef.value?.resetFields(); receiptDialogVisible.value=false; }; |
| | | const submitReceiptForm = () => { |
| | | receiptFormRef.value?.validate(valid => { |
| | | if(valid){ |
| | | saveReceiptPayment({ customerId:customerId.value, salesContractNo:currentRow.value.salesContractNo, paymentDate:receiptForm.paymentDate, paymentAmount:receiptForm.paymentAmount, paymentMethod:receiptForm.paymentMethod, remark:receiptForm.remark }).then(res => { |
| | | proxy.$modal.msgSuccess("新增回款成功"); closeReceiptDialog(); receiptPaymentList(customerId.value); getList(); |
| | | }); |
| | | } |
| | | }); |
| | | }; |
| | | const submitReceiptForm = () => { receiptFormRef.value?.validate(v=>{ if(v){ saveReceiptPayment({ customerId:customerId.value, salesContractNo:currentRow.value.salesContractNo, paymentDate:receiptForm.paymentDate, paymentAmount:receiptForm.paymentAmount, paymentMethod:receiptForm.paymentMethod, remark:receiptForm.remark }).then(res=>{ proxy.$modal.msgSuccess("新增回款成功"); closeReceiptDialog(); receiptPaymentList(customerId.value); getList(); }); } }); }; |
| | | // 查询列表 |
| | | /** 搜索按钮操作 */ |
| | | const handleQuery = () => { |
| | |
| | | }); |
| | | }; |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | return cellValue ? parseFloat(cellValue).toFixed(2) : "0.00"; |
| | | return cellValue ? parseFloat(cellValue).toFixed(6) : "0.000000"; |
| | | }; |
| | | // 主表合计方法 |
| | | const summarizeMainTable = param => { |
| | |
| | | param, |
| | | ["invoiceTotal", "receiptPaymentAmount", "unReceiptPaymentAmount"], |
| | | { |
| | | invoiceTotal: { decimalPlaces: 6 }, |
| | | receiptPaymentAmount: { decimalPlaces: 6 }, |
| | | unReceiptPaymentAmount: { decimalPlaces: 6 }, |
| | | ticketsNum: { noDecimal: true }, // 不保留小数 |
| | | futureTickets: { noDecimal: true }, // 不保留小数 |
| | | } |
| | |
| | | param, |
| | | ["contractAmount", "receiptPaymentAmount", "receiptableAmount"], |
| | | { |
| | | contractAmount: { decimalPlaces: 6 }, |
| | | receiptPaymentAmount: { decimalPlaces: 6 }, |
| | | receiptableAmount: { decimalPlaces: 6 }, |
| | | ticketsNum: { noDecimal: true }, // 不保留小数 |
| | | futureTickets: { noDecimal: true }, // 不保留小数 |
| | | } |
| | |
| | | raw?.canReturnQuantity, |
| | | returnQuantity: Number.isFinite(num) ? num : 0, |
| | | price: Number(raw?.taxInclusiveUnitPrice ?? raw?.price ?? 0), |
| | | amount: Number(raw?.amount ?? 0).toFixed(2), |
| | | amount: Number(raw?.amount ?? 0).toFixed(6), |
| | | isQuality: raw?.isQuality ?? 2, |
| | | remark: raw?.remark ?? "", |
| | | }; |
| | |
| | | const total = Number(row?.stockOutNum ?? row?.totalQuantity ?? row?.totalReturnNum ?? 0); |
| | | const un = Number(row?.unQuantity ?? 0); |
| | | if (!Number.isFinite(total) || !Number.isFinite(un)) return 0; |
| | | return Math.max(total - un, 0); |
| | | // 保留6位小数,避免浮点减法产生精度误差 |
| | | return Math.max(parseFloat((total - un).toFixed(6)), 0); |
| | | }; |
| | | |
| | | const tableColumn = ref([ |
| | |
| | | num, |
| | | returnQuantity: Number.isFinite(num) ? num : 0, |
| | | price: Number(raw?.taxInclusiveUnitPrice ?? raw?.price ?? 0), |
| | | amount: Number(raw?.amount ?? 0).toFixed(2), |
| | | amount: Number(raw?.amount ?? 0).toFixed(6), |
| | | isQuality: raw?.isQuality ?? 2, |
| | | remark: raw?.remark ?? "", |
| | | }; |
| | |
| | | const calculateRowAmount = (row) => { |
| | | const stockOutNum = Number(row.returnQuantity || 0); |
| | | const price = Number(row.price || 0); |
| | | row.amount = (stockOutNum * price).toFixed(2); |
| | | row.amount = (stockOutNum * price).toFixed(6); |
| | | }; |
| | | |
| | | const calculateTotalRefund = () => { |
| | | const total = tableData.value.reduce((sum, row) => { |
| | | return sum + Number(row.amount || 0); |
| | | }, 0); |
| | | form.value.refundAmount = total.toFixed(2); |
| | | form.value.refundAmount = total.toFixed(6); |
| | | }; |
| | | |
| | | const availableProducts = ref([]); |
| | |
| | | returnQuantity: 0, |
| | | num: 0, |
| | | price: Number(product.taxInclusiveUnitPrice ?? 0), |
| | | amount: "0.00", |
| | | amount: "0.000000", |
| | | isQuality: 2, |
| | | remark: "", |
| | | productCategory: product.productCategory ?? product.productName ?? "", |
| | |
| | | align="right" |
| | | > |
| | | <template #default="scope"> |
| | | {{ Number(scope.row.totalAmount ?? 0).toFixed(2) }} |
| | | {{ Number(scope.row.totalAmount ?? 0).toFixed(6) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" width="120" align="center"> |
| | |
| | | :min="0" |
| | | v-model="productForm.taxInclusiveUnitPrice" |
| | | style="width: 100%" |
| | | :precision="2" |
| | | :precision="6" |
| | | placeholder="请输入" |
| | | clearable |
| | | @change="calculateFromUnitPrice" |
| | |
| | | v-model="productForm.quantity" |
| | | placeholder="请输入" |
| | | clearable |
| | | :precision="2" |
| | | :precision="6" |
| | | @change="calculateFromQuantity" |
| | | style="width: 100%" |
| | | /> |
| | |
| | | v-model="scope.row.deliveryQuantity" |
| | | :min="0" |
| | | :max="getDeliveryBatchDeliveryMax(scope.row)" |
| | | :precision="2" |
| | | :precision="6" |
| | | :step="0.01" |
| | | controls-position="right" |
| | | @change="handleDeliveryBatchQuantityChange(scope.row)" |
| | |
| | | }; |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | if (cellValue === undefined || cellValue === null || cellValue === "") { |
| | | return "0.00"; |
| | | return "0.000000"; |
| | | } |
| | | return parseFloat(cellValue).toFixed(2); |
| | | return parseFloat(cellValue).toFixed(6); |
| | | }; |
| | | const findLedgerRecordByRow = (row) => { |
| | | if (!row) return null; |
| | |
| | | }; |
| | | // 主表合计方法 |
| | | const summarizeMainTable = (param) => { |
| | | return proxy.summarizeTable(param, [ |
| | | "contractAmount", |
| | | "taxInclusiveTotalPrice", |
| | | "taxExclusiveTotalPrice", |
| | | ]); |
| | | return proxy.summarizeTable( |
| | | param, |
| | | ["contractAmount", "taxInclusiveTotalPrice", "taxExclusiveTotalPrice"], |
| | | { |
| | | contractAmount: { decimalPlaces: 6 }, |
| | | taxInclusiveTotalPrice: { decimalPlaces: 6 }, |
| | | taxExclusiveTotalPrice: { decimalPlaces: 6 }, |
| | | } |
| | | ); |
| | | }; |
| | | // 子表合计方法 |
| | | const summarizeChildrenTable = (param, parentRow) => { |
| | |
| | | return ""; |
| | | }); |
| | | } |
| | | return proxy.summarizeTable(param, [ |
| | | "taxInclusiveUnitPrice", |
| | | "taxInclusiveTotalPrice", |
| | | "taxExclusiveTotalPrice", |
| | | ]); |
| | | return proxy.summarizeTable( |
| | | param, |
| | | [ |
| | | "taxInclusiveUnitPrice", |
| | | "taxInclusiveTotalPrice", |
| | | "taxExclusiveTotalPrice", |
| | | ], |
| | | { |
| | | taxInclusiveUnitPrice: { decimalPlaces: 6 }, |
| | | taxInclusiveTotalPrice: { decimalPlaces: 6 }, |
| | | taxExclusiveTotalPrice: { decimalPlaces: 6 }, |
| | | } |
| | | ); |
| | | }; |
| | | // 打开弹框 |
| | | const openForm = async (type, row) => { |
| | |
| | | const quantity = Number(p.quantity ?? 0) || 0; |
| | | const unitPrice = Number(p.unitPrice ?? 0) || 0; |
| | | const taxRate = "13"; // 默认 13%,便于直接提交(如需可在产品中自行修改) |
| | | const taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(2); |
| | | const taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(6); |
| | | const taxExclusiveTotalPrice = proxy.calculateTaxExclusiveTotalPrice( |
| | | taxInclusiveTotalPrice, |
| | | taxRate |
| | | taxRate, |
| | | 6 |
| | | ); |
| | | return { |
| | | // 台账字段 |
| | |
| | | unit: p.unit || "", |
| | | quantity: quantity, |
| | | taxRate: taxRate, |
| | | taxInclusiveUnitPrice: unitPrice.toFixed(2), |
| | | taxInclusiveUnitPrice: unitPrice.toFixed(6), |
| | | taxInclusiveTotalPrice: taxInclusiveTotalPrice, |
| | | taxExclusiveTotalPrice: taxExclusiveTotalPrice, |
| | | invoiceType: "增普票", |
| | |
| | | const total = products.reduce((sum, product) => { |
| | | return sum + (parseFloat(product.quantity) || 0); |
| | | }, 0); |
| | | return total.toFixed(2); |
| | | return total.toFixed(6); |
| | | }; |
| | | |
| | | // 计算产品总金额 |
| | |
| | | const total = products.reduce((sum, product) => { |
| | | return sum + (parseFloat(product.taxInclusiveTotalPrice) || 0); |
| | | }, 0); |
| | | return total.toFixed(2); |
| | | return total.toFixed(6); |
| | | }; |
| | | |
| | | // 用于打印的计算函数 |
| | |
| | | const total = products.reduce((sum, product) => { |
| | | return sum + (parseFloat(product.quantity) || 0); |
| | | }, 0); |
| | | return total.toFixed(2); |
| | | return total.toFixed(6); |
| | | }; |
| | | |
| | | const getTotalAmountForPrint = (products) => { |
| | |
| | | const total = products.reduce((sum, product) => { |
| | | return sum + (parseFloat(product.taxInclusiveTotalPrice) || 0); |
| | | }, 0); |
| | | return total.toFixed(2); |
| | | return total.toFixed(6); |
| | | }; |
| | | |
| | | const mathNum = () => { |
| | |
| | | productForm.value.taxInclusiveTotalPrice = |
| | | proxy.calculateTaxIncludeTotalPrice( |
| | | productForm.value.taxInclusiveUnitPrice, |
| | | productForm.value.quantity |
| | | productForm.value.quantity, |
| | | 6 |
| | | ); |
| | | if (productForm.value.taxRate) { |
| | | // 不含税总价计算 |
| | | productForm.value.taxExclusiveTotalPrice = |
| | | proxy.calculateTaxExclusiveTotalPrice( |
| | | productForm.value.taxInclusiveTotalPrice, |
| | | productForm.value.taxRate |
| | | productForm.value.taxRate, |
| | | 6 |
| | | ); |
| | | } |
| | | }; |
| | |
| | | isCalculating.value = true; |
| | | |
| | | // 计算含税单价 = 含税总价 / 数量 |
| | | productForm.value.taxInclusiveUnitPrice = (totalPrice / quantity).toFixed(2); |
| | | productForm.value.taxInclusiveUnitPrice = (totalPrice / quantity).toFixed(6); |
| | | |
| | | // 如果有税率,计算不含税总价 |
| | | if (productForm.value.taxRate) { |
| | | productForm.value.taxExclusiveTotalPrice = |
| | | proxy.calculateTaxExclusiveTotalPrice( |
| | | totalPrice, |
| | | productForm.value.taxRate |
| | | productForm.value.taxRate, |
| | | 6 |
| | | ); |
| | | } |
| | | |
| | |
| | | // 先计算含税总价 = 不含税总价 / (1 - 税率/100) |
| | | const taxRateDecimal = taxRate / 100; |
| | | const inclusiveTotalPrice = exclusiveTotalPrice / (1 - taxRateDecimal); |
| | | productForm.value.taxInclusiveTotalPrice = inclusiveTotalPrice.toFixed(2); |
| | | productForm.value.taxInclusiveTotalPrice = inclusiveTotalPrice.toFixed(6); |
| | | |
| | | // 计算含税单价 = 含税总价 / 数量 |
| | | productForm.value.taxInclusiveUnitPrice = ( |
| | | inclusiveTotalPrice / quantity |
| | | ).toFixed(2); |
| | | ).toFixed(6); |
| | | |
| | | isCalculating.value = false; |
| | | }; |
| | |
| | | isCalculating.value = true; |
| | | |
| | | // 计算含税总价 |
| | | productForm.value.taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(2); |
| | | productForm.value.taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(6); |
| | | |
| | | // 如果有税率,计算不含税总价 |
| | | if (productForm.value.taxRate) { |
| | | productForm.value.taxExclusiveTotalPrice = |
| | | proxy.calculateTaxExclusiveTotalPrice( |
| | | productForm.value.taxInclusiveTotalPrice, |
| | | productForm.value.taxRate |
| | | productForm.value.taxRate, |
| | | 6 |
| | | ); |
| | | } |
| | | |
| | |
| | | isCalculating.value = true; |
| | | |
| | | // 计算含税总价 |
| | | productForm.value.taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(2); |
| | | productForm.value.taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(6); |
| | | |
| | | // 如果有税率,计算不含税总价 |
| | | if (productForm.value.taxRate) { |
| | | productForm.value.taxExclusiveTotalPrice = |
| | | proxy.calculateTaxExclusiveTotalPrice( |
| | | productForm.value.taxInclusiveTotalPrice, |
| | | productForm.value.taxRate |
| | | productForm.value.taxRate, |
| | | 6 |
| | | ); |
| | | } |
| | | |
| | |
| | | |
| | | // 计算不含税总价 |
| | | productForm.value.taxExclusiveTotalPrice = |
| | | proxy.calculateTaxExclusiveTotalPrice(inclusiveTotalPrice, taxRate); |
| | | proxy.calculateTaxExclusiveTotalPrice(inclusiveTotalPrice, taxRate, 6); |
| | | |
| | | isCalculating.value = false; |
| | | }; |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="totalAmount" label="报价金额" width="120"> |
| | | <template #default="scope"> |
| | | ¥{{ scope.row.totalAmount.toFixed(2) }} |
| | | ¥{{ scope.row.totalAmount.toFixed(6) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="200" fixed="right" align="center"> |
| | |
| | | <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="6" style="width: 100%" /> |
| | | </el-form-item> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <!-- <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(6) }}</span> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | |
| | |
| | | <el-table-column prop="unit" label="单位" /> |
| | | <el-table-column prop="unitPrice" label="单价"> |
| | | <template #default="scope"> |
| | | ¥{{ scope.row.unitPrice.toFixed(2) }} |
| | | ¥{{ scope.row.unitPrice.toFixed(6) }} |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |