From 2cc4b76417b5a9b78831fcd4898d0ce7f36dfe63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BF=9E=E5=9D=A4=20=E6=9E=97?= <506583276@qq.com> Date: Fri, 31 Mar 2023 15:19:39 +0800 Subject: [PATCH] 1 --- BBWY.Client/Models/PackTask/PackTaskModel.cs | 6 +++++- BBWY.Client/ViewModels/PackTask/ConsumableViewModel.cs | 6 ------ BBWY.Client/Views/MainWindow.xaml | 2 +- BBWY.Client/Views/PackTask/PrintWindow.xaml.cs | 3 ++- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/BBWY.Client/Models/PackTask/PackTaskModel.cs b/BBWY.Client/Models/PackTask/PackTaskModel.cs index a155de99..888567e1 100644 --- a/BBWY.Client/Models/PackTask/PackTaskModel.cs +++ b/BBWY.Client/Models/PackTask/PackTaskModel.cs @@ -204,8 +204,12 @@ namespace BBWY.Client.Models var model = packTaskService.UpdateTaskStatus(taskId, 1); if (model != null && model.Success) { + + ViewModelLocator viewModelLocator = new ViewModelLocator(); + var wareHouse = viewModelLocator.WareHouseList; + wareHouse.SearchTaskList(); this.TaskStatus = TaskStateType.已完成; - new TipsWindow("修改成功").Show(); + // new TipsWindow("修改成功").Show(); } } /* 拼接模板数据 diff --git a/BBWY.Client/ViewModels/PackTask/ConsumableViewModel.cs b/BBWY.Client/ViewModels/PackTask/ConsumableViewModel.cs index 24c90e2c..039d1ddf 100644 --- a/BBWY.Client/ViewModels/PackTask/ConsumableViewModel.cs +++ b/BBWY.Client/ViewModels/PackTask/ConsumableViewModel.cs @@ -54,18 +54,12 @@ namespace BBWY.Client.ViewModels.PackTask public ICommand SearchConsumableCommand { get; set; } private readonly ConsumableService consumableService; - - - - // public Action ReflashDatas { get; set; } - public ConsumableViewModel(ConsumableService consumableService) { this.consumableService = consumableService; ConsumableModel = new ConsumableModel(consumableService); - // ConsumableModel.ReflashDatas = ReflashDatas; ConsumableList = new ObservableCollection(); AddConsumableCommand = new RelayCommand(AddConsumable); SearchConsumableCommand = new RelayCommand(SearchConsumable); diff --git a/BBWY.Client/Views/MainWindow.xaml b/BBWY.Client/Views/MainWindow.xaml index f7e9201a..3b7df1ad 100644 --- a/BBWY.Client/Views/MainWindow.xaml +++ b/BBWY.Client/Views/MainWindow.xaml @@ -26,7 +26,7 @@ - + diff --git a/BBWY.Client/Views/PackTask/PrintWindow.xaml.cs b/BBWY.Client/Views/PackTask/PrintWindow.xaml.cs index 54a596ca..989b6d4a 100644 --- a/BBWY.Client/Views/PackTask/PrintWindow.xaml.cs +++ b/BBWY.Client/Views/PackTask/PrintWindow.xaml.cs @@ -176,7 +176,8 @@ namespace BBWY.Client.Views.PackTask private void Document_PrintPage(object sender, PrintPageEventArgs args) { - + //RectangleF bounds = new RectangleF(0, 0, 236, 157); + //args.Graphics.SetClip(bounds);//设置打印区域 Font font = new Font("宋体", 6, System.Drawing.FontStyle.Regular); if (barCodeModel!=null)