diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index db4946f43..5acc8e857 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -586,9 +586,9 @@ const handleImport = () => { // 主子数据 提交 const submitForm = async (formType, data) => { - data.differencePrice = tableData.value.reduce((prev,item)=>{ - return (0)+Number((Number(item?.singlePrice)-Number(item?.purchasePrice)).toFixed(6)) - },0) + tableData.value.forEach((item) => { + item.differencePrice = Number((Number(item?.singlePrice)-Number(item?.purchasePrice)).toFixed(6)) + }) data.subList = tableData.value // 拼接子表数据参数 try { if (formType === 'create') {