From f0bd040f95e711d7c64d2075aacd1dcbe69bf871 Mon Sep 17 00:00:00 2001 From: maqiao <625215135@qq.com> Date: Wed, 20 Nov 2024 10:56:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=98=E7=82=B9=E5=AE=8C=E6=88=90=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=8A=BD=E5=B1=89=E7=B1=BB=E5=9E=8B35=E5=86=99?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DM_Weight/ViewModels/CheckStockWindowViewModel.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/DM_Weight/ViewModels/CheckStockWindowViewModel.cs b/DM_Weight/ViewModels/CheckStockWindowViewModel.cs index 2e46b39..75e2a6f 100644 --- a/DM_Weight/ViewModels/CheckStockWindowViewModel.cs +++ b/DM_Weight/ViewModels/CheckStockWindowViewModel.cs @@ -141,7 +141,7 @@ namespace DM_Weight.ViewModels // 完成按钮 public DelegateCommand TakeFinish { - get => new DelegateCommand(() => + get => new DelegateCommand(async () => { _isFinishClick = true; List record = ChannelStocks.FindAll(it => it.Quantity != it.CheckQuantity).ToList(); @@ -206,7 +206,16 @@ namespace DM_Weight.ViewModels _portUtil.WriteQuantity(it.DrawerNo, it.ColNo, it.CheckQuantity); }); } - + if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1) == 35) + { + for (int i = 0; i < singleChannels.Count; i++) + { + await Task.Delay(200); + await _portUtil.WriteChannelInfoMethod(2, (singleChannels[i].Quantity + singleChannels[i].AddQuantity).ToString(), singleChannels[i].DrawerNo, singleChannels[i].ColNo); + await Task.Delay(200); + await _portUtil.ShowContentMethod(singleChannels[i].DrawerNo, singleChannels[i].ColNo); + } + } RequestData(); AlertMsg alertMsg = new AlertMsg {