diff --git a/BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs b/BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs index 5536e8a6..593d6493 100644 --- a/BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs +++ b/BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs @@ -577,7 +577,7 @@ namespace BBWY.Client.ViewModels.PackTask private void SendToSetSkuConfigure(PackTaskModel model) { - if (model.SendToSetSkuConfigureTime!=null) + if (model.SendToSetSkuConfigureTime != null) { System.Windows.MessageBox.Show($"已提醒配置,提醒时间:{model.SendToSetSkuConfigureTime},请耐心等待"); return; @@ -1158,7 +1158,6 @@ namespace BBWY.Client.ViewModels.PackTask else PageIndex = 1; } - private bool IsStartThread = false; private Thread qualityOverTimeThread = null; private Thread packOverTimeThread = null; @@ -1171,7 +1170,9 @@ namespace BBWY.Client.ViewModels.PackTask /// public void SearchTaskList() { - + if (IsLoading) + return; + IsLoading = true; PageSize = 10; IsStartThread = false; long? taskId = null; @@ -1192,12 +1193,9 @@ namespace BBWY.Client.ViewModels.PackTask taskId = null; } - IsLoading = true; - - - if (TaskState == Models.TaskState.待出库) + Task.Factory.StartNew(() => { - Task.Factory.StartNew(() => + if (TaskState == Models.TaskState.待出库) { WaitCompletedList = new ObservableCollection(); var datas = sealBoxService.GetWareWaitCompletedList(null, SearchShopName, taskId, SearchSkuId, sealBoxId, PageIndex, PageSize); @@ -1220,13 +1218,11 @@ namespace BBWY.Client.ViewModels.PackTask } IsLoadCount(); IsLoading = false; - }); - } - else if (TaskState == Models.TaskState.已超时) - { - PageSize = 20; - Task.Factory.StartNew(() => + + } + else if (TaskState == Models.TaskState.已超时) { + PageSize = 20; OverTimeTaskList = new ObservableCollection(); var datas = packTaskService.SearchOverTimeTaskList(null, StartTime, EndTime, OverTimeTaskState, OverTimeTaskType, PageIndex, PageSize); if (datas != null && datas.Data != null && datas.Success) @@ -1248,12 +1244,12 @@ namespace BBWY.Client.ViewModels.PackTask } IsLoadCount(); IsLoading = false; - }); - } - else if (TaskState == Models.TaskState.待转运) - { - Task.Factory.StartNew(() => + + } + else if (TaskState == Models.TaskState.待转运) { + + WaitTransportList = new ObservableCollection(); var datas = sealBoxService.GetWareWaitTransportList(SelectWareType, PageSize, PageIndex); if (datas != null && datas.Data != null && datas.Success) @@ -1315,10 +1311,9 @@ namespace BBWY.Client.ViewModels.PackTask IsLoadCount(); IsLoadWaitTransportCount(); IsLoading = false; - }); - } - else if (TaskState == Models.TaskState.待落仓) - Task.Factory.StartNew(() => + + } + else if (TaskState == Models.TaskState.待落仓) { @@ -1360,9 +1355,8 @@ namespace BBWY.Client.ViewModels.PackTask IsLoadFallWareCount(); IsLoading = false; - }); - else if (TaskState == Models.TaskState.待封箱) - Task.Factory.StartNew(() => + } + else if (TaskState == Models.TaskState.待封箱) { @@ -1486,11 +1480,9 @@ namespace BBWY.Client.ViewModels.PackTask IsLoadCount(); IsLoading = false; - }); - else - Task.Factory.StartNew(() => + } + else { - PackTaskList = new ObservableCollection();//初始化数据 var datas = packTaskService.SearchTaskList(SearchWayBillNo, SearchExpressName, SearchDepartment, SearchSkuId, SearchTaskId, SearchSpuId, SearchOrderSn, this.TaskState, SearchShopName, @@ -1538,7 +1530,7 @@ namespace BBWY.Client.ViewModels.PackTask ScheduleOverTime = item.ScheduleOverTime, PackProcessType = item.PackProcessType, ShopId = item.ShopId, - SendToSetSkuConfigureTime= item.SendToSetSkuConfigureTime, + SendToSetSkuConfigureTime = item.SendToSetSkuConfigureTime, }; @@ -1700,11 +1692,6 @@ namespace BBWY.Client.ViewModels.PackTask var packCompletedTasks = PackTaskList.Where(p => p.TaskState == Models.TaskState.待排单 && p.ScheduleOverTime != null).ToList(); if (packCompletedTasks.Count() > 0) { - //if (packOverTimeThread!=null) - //{ - // packOverTimeThread.Abort(); - //} - scheduleOverTimeThread = new Thread(() => { IsStartThread = true; @@ -1749,10 +1736,10 @@ namespace BBWY.Client.ViewModels.PackTask } IsLoadCount(); IsLoading = false; - }); - + } + }); } diff --git a/BBWY.Client/Views/FallWare/FallWareWaitConfigureControl.xaml b/BBWY.Client/Views/FallWare/FallWareWaitConfigureControl.xaml index 5e702f09..eecf6fc6 100644 --- a/BBWY.Client/Views/FallWare/FallWareWaitConfigureControl.xaml +++ b/BBWY.Client/Views/FallWare/FallWareWaitConfigureControl.xaml @@ -228,29 +228,26 @@ > - - + - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + - diff --git a/BBWY.Client/Views/PackTask/WaitPackageControl.xaml b/BBWY.Client/Views/PackTask/WaitPackageControl.xaml index c94ae8ac..1b5b5698 100644 --- a/BBWY.Client/Views/PackTask/WaitPackageControl.xaml +++ b/BBWY.Client/Views/PackTask/WaitPackageControl.xaml @@ -250,34 +250,8 @@ - - - - - - - - @@ -556,25 +530,25 @@ - + - - - - - - - - - - - - - - + + + + + + + + + + + + + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - - - - - - + @@ -696,7 +666,7 @@ AcceptsReturn="True" TextWrapping="Wrap" IsReadOnly="True" BorderThickness="0"/> - + diff --git a/BBWY.Client/Views/QualityTask/WaitQualityControl.xaml b/BBWY.Client/Views/QualityTask/WaitQualityControl.xaml index f49378fd..5da96d5a 100644 --- a/BBWY.Client/Views/QualityTask/WaitQualityControl.xaml +++ b/BBWY.Client/Views/QualityTask/WaitQualityControl.xaml @@ -455,7 +455,6 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/BBWY.Client/Views/SealBox/WaitSealBoxControl.xaml b/BBWY.Client/Views/SealBox/WaitSealBoxControl.xaml index f0efdf81..67535b76 100644 --- a/BBWY.Client/Views/SealBox/WaitSealBoxControl.xaml +++ b/BBWY.Client/Views/SealBox/WaitSealBoxControl.xaml @@ -277,23 +277,23 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/BBWY.Client/Views/WaitTransport/WareWaitTransportControl.xaml b/BBWY.Client/Views/WaitTransport/WareWaitTransportControl.xaml index c426eabe..460cd2fe 100644 --- a/BBWY.Client/Views/WaitTransport/WareWaitTransportControl.xaml +++ b/BBWY.Client/Views/WaitTransport/WareWaitTransportControl.xaml @@ -109,7 +109,7 @@ Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}" CommandParameter="{Binding WareName}" Margin=" 5,0,7,0"/> - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + +