|
|
|
@ -306,7 +306,7 @@ |
|
|
|
|
// 4. 计算结果 |
|
|
|
|
if (validVolumes.length > 0) { |
|
|
|
|
const sum = validVolumes.reduce((acc, cur) => acc + cur, 0); |
|
|
|
|
formData.cylinderVolume = sum.toFixed(2); |
|
|
|
|
formData.cylinderVolume = formatDecimal(sum); |
|
|
|
|
} else { |
|
|
|
|
formData.cylinderVolume = 0; |
|
|
|
|
} |
|
|
|
@ -315,6 +315,9 @@ |
|
|
|
|
formData.cylinderVolume = ''; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
formatDecimal(num, decimals = 2) { |
|
|
|
|
return num.toFixed(decimals).replace(/\.?0+$/, ''); |
|
|
|
|
}, |
|
|
|
|
// 监督检验机构处理(带数量限制) |
|
|
|
|
processSupervisionAgency(formData) { |
|
|
|
|
try { |
|
|
|
|