change-优化计划列表开始时间

dev
liuwf 2 months ago
parent f823321c18
commit 3241e4f1a8

@ -107,7 +107,7 @@ namespace SlnMesnac.Model.dto
/// 开始时间
///</summary>
[SugarColumn(ColumnName = "real_begin_time")]
public DateTime RealBeginTime { get; set; }
public DateTime? RealBeginTime { get; set; }
/// <summary>
/// 完成时间

@ -239,7 +239,7 @@
<DataGridTextColumn Binding="{Binding PlanAmount,Converter={StaticResource PlanAmountConverter}}" Header="计划数量" Width="1*" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding CompleteAmount,Converter={StaticResource PlanAmountConverter}}" Header="完成数量" Width="1*" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding PlanStatus,Converter={StaticResource PlanStatusConverter}}" Header="计划状态" Width="1*" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding RealBeginTime ,StringFormat=\{0:MM月dd日 HH:mm\}}" Header="开始时间" Width="1.5*" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding PlanBeginTime ,StringFormat=\{0:MM月dd日 HH:mm\}}" Header="开始时间" Width="1.5*" IsReadOnly="True"/>
<!--<DataGridTextColumn Binding="{Binding RealEndTime ,StringFormat=\{0:MM月dd日 HH:mm\}}" Header="完成时间" Width="1*" IsReadOnly="True"/>-->
<DataGridTemplateColumn Header="操作" Width="2*">
<DataGridTemplateColumn.CellTemplate>

@ -272,7 +272,7 @@ namespace SlnMesnac.WPF.ViewModel
OrderCode = prodPlan.OrderCode;
PlanCode = prodPlan.PlanCode;
ProductModel = prodPlan.MaterialName;
BeginTime = prodPlan.RealBeginTime.ToString("yyyy-MM-dd HH:mm:ss");
BeginTime = prodPlan.RealBeginTime==null?"": prodPlan.RealBeginTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
PlanAmount = Convert.ToInt32(prodPlan.PlanAmount);
ComplateAmout = Convert.ToInt32(prodPlan.CompleteAmount);
DiffAmount = Convert.ToInt32(prodPlan.PlanAmount) - Convert.ToInt32(prodPlan.CompleteAmount);
@ -338,6 +338,10 @@ namespace SlnMesnac.WPF.ViewModel
list.ForEach(
arg =>
{
if (arg.RealBeginTime!=null && arg.RealBeginTime.Value.Year<2000)
{
arg.RealBeginTime = null;
}
PlanInfoDataGrid.Add(arg);
});
@ -386,6 +390,7 @@ namespace SlnMesnac.WPF.ViewModel
if (info != null)
{
info.PlanStatus = PlanStatusEnum.;
info.RealBeginTime = DateTime.Now;
info.PlanBeginTime = DateTime.Now;
}

Loading…
Cancel
Save