diff --git a/DM_Weight/ViewModels/AddDrugControlViewModel.cs b/DM_Weight/ViewModels/AddDrugControlViewModel.cs index babaf97..71fe6c1 100644 --- a/DM_Weight/ViewModels/AddDrugControlViewModel.cs +++ b/DM_Weight/ViewModels/AddDrugControlViewModel.cs @@ -429,6 +429,7 @@ namespace DM_Weight.ViewModels //写库存数量 _portUtil.WriteQuantity(it.DrawerNo, it.ColNo, it.Quantity + it.AddQuantity); + Thread.Sleep(200); }); } diff --git a/DM_Weight/ViewModels/BindingChannelNewDialogViewModel .cs b/DM_Weight/ViewModels/BindingChannelNewDialogViewModel .cs index ce8e2da..6483942 100644 --- a/DM_Weight/ViewModels/BindingChannelNewDialogViewModel .cs +++ b/DM_Weight/ViewModels/BindingChannelNewDialogViewModel .cs @@ -577,6 +577,7 @@ namespace DM_Weight.ViewModels _portUtil.ShowContent(item.DrawerNo, item.ColNo); Thread.Sleep(200); _portUtil.WriteQuantity(item.DrawerNo, item.ColNo, item.totalCount); + Thread.Sleep(200); } }); } diff --git a/DM_Weight/ViewModels/CheckStockNew2WindowViewModel.cs b/DM_Weight/ViewModels/CheckStockNew2WindowViewModel.cs index 7894adc..bd5d863 100644 --- a/DM_Weight/ViewModels/CheckStockNew2WindowViewModel.cs +++ b/DM_Weight/ViewModels/CheckStockNew2WindowViewModel.cs @@ -459,6 +459,7 @@ namespace DM_Weight.ViewModels { // 将库位多批次的总库存数更新标签 _portUtil.WriteQuantity(it.DrawerNo, it.ColNo, it.CheckQuantity); + Thread.Sleep(200); }); } diff --git a/DM_Weight/ViewModels/CheckStockNewWindowViewModel.cs b/DM_Weight/ViewModels/CheckStockNewWindowViewModel.cs index ccc1dc9..abf0e1c 100644 --- a/DM_Weight/ViewModels/CheckStockNewWindowViewModel.cs +++ b/DM_Weight/ViewModels/CheckStockNewWindowViewModel.cs @@ -568,6 +568,7 @@ namespace DM_Weight.ViewModels { // 将库位多批次的总库存数更新标签 _portUtil.WriteQuantity(it.DrawerNo, it.ColNo, it.CheckQuantity); + Thread.Sleep(200); }); } diff --git a/DM_Weight/ViewModels/CheckStockWindowViewModel.cs b/DM_Weight/ViewModels/CheckStockWindowViewModel.cs index e4857fe..84cd5ab 100644 --- a/DM_Weight/ViewModels/CheckStockWindowViewModel.cs +++ b/DM_Weight/ViewModels/CheckStockWindowViewModel.cs @@ -15,6 +15,7 @@ using DM_Weight.Models; using DM_Weight.msg; using DM_Weight.Port; using DM_Weight.util; +using System.Threading; namespace DM_Weight.ViewModels { @@ -257,6 +258,7 @@ namespace DM_Weight.ViewModels singleChannels.ForEach(it => { _portUtil.WriteQuantity(it.DrawerNo, it.ColNo, it.CheckQuantity); + Thread.Sleep(200); }); } diff --git a/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs b/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs index 50f46cf..8ce6019 100644 --- a/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs +++ b/DM_Weight/ViewModels/DrawerAddDrugWindowViewModel.cs @@ -17,6 +17,7 @@ using DM_Weight.msg; using DM_Weight.Port; using DM_Weight.util; using System.Collections.ObjectModel; +using System.Threading; namespace DM_Weight.ViewModels { @@ -333,6 +334,7 @@ namespace DM_Weight.ViewModels singleChannels.ForEach(it => { _portUtil.WriteQuantity(it.DrawerNo, it.ColNo, it.Quantity + it.AddQuantity); + Thread.Sleep(200); }); } RequestData(); diff --git a/DM_Weight/ViewModels/InvoiceAddDialogViewModel.cs b/DM_Weight/ViewModels/InvoiceAddDialogViewModel.cs index 7dc4f59..e90c31d 100644 --- a/DM_Weight/ViewModels/InvoiceAddDialogViewModel.cs +++ b/DM_Weight/ViewModels/InvoiceAddDialogViewModel.cs @@ -415,6 +415,7 @@ namespace DM_Weight.ViewModels { //将库位多批次的总库存数更新标签 _portUtil.WriteQuantity(singleChannels[0].DrawerNo, singleChannels[0].ColNo, singleChannels.Sum(it => it.Quantity) + singleChannels.Sum(it => it.AddQuantity)); + Thread.Sleep(200); //singleChannels.ForEach(it => //{ diff --git a/DM_Weight/ViewModels/InvoiceInNewWindowViewModel.cs b/DM_Weight/ViewModels/InvoiceInNewWindowViewModel.cs index 30f77b6..1e026b5 100644 --- a/DM_Weight/ViewModels/InvoiceInNewWindowViewModel.cs +++ b/DM_Weight/ViewModels/InvoiceInNewWindowViewModel.cs @@ -650,6 +650,7 @@ namespace DM_Weight.ViewModels _portUtil.WriteChannelInfo(5, channelStockEffDate[0].ManuNo, channelStockEffDate[0].DrawerNo, channelStockEffDate[0].ColNo); Thread.Sleep(200); _portUtil.ShowContent(channelStockEffDate[0].DrawerNo, channelStockEffDate[0].ColNo); + Thread.Sleep(200); } } } diff --git a/DM_Weight/ViewModels/InvoiceTakeDialogViewModel.cs b/DM_Weight/ViewModels/InvoiceTakeDialogViewModel.cs index eed90fd..821fd72 100644 --- a/DM_Weight/ViewModels/InvoiceTakeDialogViewModel.cs +++ b/DM_Weight/ViewModels/InvoiceTakeDialogViewModel.cs @@ -413,6 +413,7 @@ namespace DM_Weight.ViewModels { //将库位多批次的总库存数更新标签 _portUtil.WriteQuantity(singleChannels[0].DrawerNo, singleChannels[0].ColNo, singleChannels.Sum(it => it.Quantity) - singleChannels.Sum(it => it.AddQuantity)); + Thread.Sleep(200); //singleChannels.ForEach(it => //{ diff --git a/DM_Weight/ViewModels/MultiOrderTakeDialogViewModel.cs b/DM_Weight/ViewModels/MultiOrderTakeDialogViewModel.cs index cac3365..1462f1a 100644 --- a/DM_Weight/ViewModels/MultiOrderTakeDialogViewModel.cs +++ b/DM_Weight/ViewModels/MultiOrderTakeDialogViewModel.cs @@ -485,6 +485,7 @@ namespace DM_Weight.ViewModels singleChannels.ForEach(it => { _portUtil.WriteQuantity(it.DrawerNo, it.ColNo, it.Quantity - it.TakeQuantity); + Thread.Sleep(200); }); } AlertMsg alertMsg = new AlertMsg diff --git a/DM_Weight/ViewModels/OrderReturnDialogViewModel.cs b/DM_Weight/ViewModels/OrderReturnDialogViewModel.cs index d8d43a9..d9c96df 100644 --- a/DM_Weight/ViewModels/OrderReturnDialogViewModel.cs +++ b/DM_Weight/ViewModels/OrderReturnDialogViewModel.cs @@ -440,6 +440,7 @@ namespace DM_Weight.ViewModels .Sum(it => it.Quantity); //将库位多批次的总库存数更新标签 _portUtil.WriteQuantity(singleChannels[i].DrawerNo, singleChannels[i].ColNo, totalQuantity); + Thread.Sleep(200); } } } diff --git a/DM_Weight/ViewModels/OrderTakeDialogViewModel.cs b/DM_Weight/ViewModels/OrderTakeDialogViewModel.cs index 6c28f41..bce456c 100644 --- a/DM_Weight/ViewModels/OrderTakeDialogViewModel.cs +++ b/DM_Weight/ViewModels/OrderTakeDialogViewModel.cs @@ -461,6 +461,7 @@ namespace DM_Weight.ViewModels .Sum(it => it.Quantity); //将库位多批次的总库存数更新标签 _portUtil.WriteQuantity(singleChannels[i].DrawerNo, singleChannels[i].ColNo, totalQuantity); + Thread.Sleep(200); } } } diff --git a/DM_Weight/ViewModels/ReturnDrugDialogViewModel.cs b/DM_Weight/ViewModels/ReturnDrugDialogViewModel.cs index e393973..dde2c90 100644 --- a/DM_Weight/ViewModels/ReturnDrugDialogViewModel.cs +++ b/DM_Weight/ViewModels/ReturnDrugDialogViewModel.cs @@ -17,6 +17,7 @@ using DM_Weight.msg; using DM_Weight.Port; using DM_Weight.util; using SqlSugar; +using System.Threading; namespace DM_Weight.ViewModels { @@ -334,6 +335,7 @@ namespace DM_Weight.ViewModels .Sum(it => it.Quantity); _portUtil.WriteQuantity(ChannelStock.DrawerNo, ChannelStock.ColNo, totalQuantity); + Thread.Sleep(200); } AlertMsg alertMsg = new AlertMsg diff --git a/DM_Weight/ViewModels/ReturnEmptyDialogViewModel.cs b/DM_Weight/ViewModels/ReturnEmptyDialogViewModel.cs index 411ae0a..dfed495 100644 --- a/DM_Weight/ViewModels/ReturnEmptyDialogViewModel.cs +++ b/DM_Weight/ViewModels/ReturnEmptyDialogViewModel.cs @@ -21,6 +21,7 @@ using DM_Weight.Views; using SqlSugar; using System.Threading.Channels; using DM_Weight.Report; +using System.Threading; namespace DM_Weight.ViewModels { @@ -407,6 +408,7 @@ namespace DM_Weight.ViewModels if (ChannelStock.BoardType == 5) { _portUtil.WriteQuantity(ChannelStock.DrawerNo, ChannelStock.ColNo, ChannelStock.Quantity + ReturnQuantity); + Thread.Sleep(200); } AlertMsg alertMsg = new AlertMsg diff --git a/DM_Weight/ViewModels/SelfAddDialogViewModel.cs b/DM_Weight/ViewModels/SelfAddDialogViewModel.cs index bedea56..29598b8 100644 --- a/DM_Weight/ViewModels/SelfAddDialogViewModel.cs +++ b/DM_Weight/ViewModels/SelfAddDialogViewModel.cs @@ -421,6 +421,7 @@ namespace DM_Weight.ViewModels .Sum(it => it.Quantity); //将库位多批次的总库存数更新标签 _portUtil.WriteQuantity(singleChannels[i].DrawerNo, singleChannels[i].ColNo, totalQuantity); + Thread.Sleep(200); } } } diff --git a/DM_Weight/ViewModels/SelfTakeDialogViewModel.cs b/DM_Weight/ViewModels/SelfTakeDialogViewModel.cs index 71c9566..63e5ffd 100644 --- a/DM_Weight/ViewModels/SelfTakeDialogViewModel.cs +++ b/DM_Weight/ViewModels/SelfTakeDialogViewModel.cs @@ -383,6 +383,7 @@ namespace DM_Weight.ViewModels .Sum(it => it.Quantity); //将库位多批次的总库存数更新标签 _portUtil.WriteQuantity(singleChannels[i].DrawerNo, singleChannels[i].ColNo, totalQuantity); + Thread.Sleep(200); } } }