优化桌面端无用菜单和地磅数据可手动功能。

This commit is contained in:
geht
2026-05-18 15:55:11 +08:00
parent 5800b6b61c
commit c11f3104cb
18 changed files with 628 additions and 118 deletions

View File

@@ -168,9 +168,12 @@ public class WeightRecordEditDialogViewModel : BaseViewModel, IDialogResultable<
return;
}
// 净重自动计算
if (Record.GrossWeight.HasValue && Record.TareWeight.HasValue)
// 净重自动计算0 视为未称,不计算净重)
if (Record.GrossWeight.HasValue && Record.GrossWeight.Value > 0
&& Record.TareWeight.HasValue && Record.TareWeight.Value > 0)
Record.NetWeight = Math.Round(Record.GrossWeight.Value - Record.TareWeight.Value, 2);
else
Record.NetWeight = null;
// 写入密炼物料
Record.MixerMaterialIds = _mixerMaterialIds;