优化桌面端无用菜单和地磅数据可手动功能。
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user