|
|
@@ -26,11 +26,11 @@ function percentToRatio(percent: number | string | undefined | null): number {
|
|
|
return p / 100;
|
|
|
}
|
|
|
|
|
|
-/** 100 ÷ 分批周期(%),保留 4 位小数向上取整 */
|
|
|
+/** 100 ÷ 分批周期(%),保留 4 位小数向下取整 */
|
|
|
function calcReleasePercentDisplay(period: number | string | undefined | null): string {
|
|
|
const p = Number(period);
|
|
|
if (!p || p <= 0 || Number.isNaN(p)) return '0';
|
|
|
- const pct = Math.ceil((100 / p) * 10000) / 10000;
|
|
|
+ const pct = Math.floor((100 / p) * 10000) / 10000;
|
|
|
return String(pct);
|
|
|
}
|
|
|
|
|
|
@@ -353,7 +353,7 @@ onMounted(() => {
|
|
|
<el-input v-model="formData.releaseRate" disabled>
|
|
|
<template #append>%</template>
|
|
|
</el-input>
|
|
|
- <div class="form-tip">自动计算:100 ÷ 分批周期,保留 4 位小数向上取整</div>
|
|
|
+ <div class="form-tip">自动计算:100 ÷ 分批周期,保留 4 位小数向下取整</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="描述">
|
|
|
<el-input v-model="formData.description" type="textarea" />
|