1)操作添加消息提示
This commit is contained in:
parent
601c6766b5
commit
36ca926b87
|
@ -505,7 +505,63 @@ namespace DM_Weight.ViewModels
|
|||
}
|
||||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// 渲染标签
|
||||
/// </summary>
|
||||
public DelegateCommand ResetLabelCommand
|
||||
{
|
||||
get => new DelegateCommand(async () =>
|
||||
{
|
||||
var SelectChannels = Channels.FindAll(item => item.IsSelected);
|
||||
var c = SelectChannels.Count;
|
||||
if (c > 0)
|
||||
{
|
||||
|
||||
SelectChannels.ForEach(async item =>
|
||||
{
|
||||
//var channelStock = SqlSugarHelper.Db.Queryable<ChannelStock>().Where(cs => cs.Chnguid == item.Id).ToList();
|
||||
if (item.BoardType == 5)
|
||||
{
|
||||
if (item.DrugId == null)
|
||||
{
|
||||
// 清除显示屏库位信息
|
||||
_portUtil.ClearContent(item.DrawerNo, item.ColNo);
|
||||
await Task.Delay(200);
|
||||
_portUtil.ShowContent(item.DrawerNo, item.ColNo);
|
||||
}
|
||||
else
|
||||
{
|
||||
DrugInfo drugSelected = item.Drug;
|
||||
_portUtil.WindowName = "BindingChannelDialog";
|
||||
// 向显示屏写入库位信息
|
||||
_portUtil.WriteChannelInfo(1, drugSelected.DrugName, item.DrawerNo, item.ColNo);
|
||||
await Task.Delay(200);
|
||||
_portUtil.WriteChannelInfo(2, drugSelected.DrugSpec, item.DrawerNo, item.ColNo);
|
||||
await Task.Delay(200);
|
||||
_portUtil.WriteChannelInfo(8, drugSelected.Manufactory.Length > 10 ? drugSelected.Manufactory.Substring(0, 10) : drugSelected.Manufactory, item.DrawerNo, item.ColNo);
|
||||
await Task.Delay(200);
|
||||
_portUtil.ShowContent(item.DrawerNo, item.ColNo);
|
||||
//_portUtil.WriteChannelInfo(6, DrugManuNo.EffDate==null?"": DrugManuNo.EffDate, item.DrawerNo, item.ColNo);
|
||||
await Task.Delay(200);
|
||||
_portUtil.WriteQuantity(item.DrawerNo, item.ColNo, item.totalCount);
|
||||
//await Task.Delay(200);
|
||||
}
|
||||
SnackbarBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#00e676"));
|
||||
SnackbarMessageQueue.Enqueue("标签渲染完成!");
|
||||
return;
|
||||
}
|
||||
});
|
||||
//GetChannelsByDrawerNo();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
SnackbarBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#b71c1c"));
|
||||
SnackbarMessageQueue.Enqueue("请选择库位");
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
public DelegateCommand BtnCloseCommand
|
||||
{
|
||||
get => new DelegateCommand(() =>
|
||||
|
|
Loading…
Reference in New Issue