|
|
@ -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') { |
|
|
|