Browse Source

20230321

qianyi
连坤 林 2 years ago
parent
commit
59c6a50aff
  1. 4
      BBWY.Client/APIServices/PackTaskService.cs
  2. 6
      BBWY.Client/App.xaml.cs
  3. 4
      BBWY.Client/BBWYAppSettings.json
  4. 3
      BBWY.Client/Models/PackTask/PackTaskModel.cs
  5. 16
      BBWY.Client/ViewModels/PackTask/ConsumableViewModel.cs
  6. 67
      BBWY.Client/ViewModels/PackTask/CreatePackTaskViewModel.cs
  7. 3
      BBWY.Client/ViewModels/PackTask/TaskListViewModel.cs
  8. 54
      BBWY.Client/ViewModels/ViewModelLocator.cs
  9. 6
      BBWY.Client/Views/PackTask/Consumable.xaml
  10. 19
      BBWY.Client/Views/PackTask/Consumable.xaml.cs
  11. 13
      BBWY.Client/Views/PackTask/CreatePackTask.xaml
  12. 28
      BBWY.Client/Views/PackTask/CreatePackTask.xaml.cs
  13. 11
      BBWY.Client/Views/PackTask/ServiceWindow.xaml.cs
  14. 6
      BBWY.Client/Views/PackTask/SetBarCode.xaml.cs
  15. 4
      BBWY.Client/Views/PackTask/SetCerWindow.xaml.cs
  16. 5
      BBWY.Client/Views/PackTask/TaskListControl.xaml
  17. 2
      BBWY.Client/Views/PackTask/WareHouseListControl.xaml

4
BBWY.Client/APIServices/PackTaskService.cs

@ -49,7 +49,7 @@ namespace BBWY.Client.APIServices
ShopId = globalContext.User.Shop.ShopId.ToString() ShopId = globalContext.User.Shop.ShopId.ToString()
}, null, HttpMethod.Post); }, null, HttpMethod.Post);
} }
public ApiResponse<PackTaskResultResponse> GetWareHouseList(int? IsWorry=null,string departmentName = null, string skuId = null, string taskId = null, public ApiResponse<PackTaskResultResponse> GetWareHouseList(int? isWorry=null,string departmentName = null, string skuId = null, string taskId = null,
DateTime? startTime = null, DateTime? startTime = null,
DateTime? endTime = null, DateTime? endTime = null,
TaskState? availability = null, TaskState? availability = null,
@ -61,7 +61,7 @@ namespace BBWY.Client.APIServices
{ {
return SendRequest<PackTaskResultResponse>(globalContext.QKApiHost, "api/PackTask/GetPackTaskList", new return SendRequest<PackTaskResultResponse>(globalContext.QKApiHost, "api/PackTask/GetPackTaskList", new
{ {
IsWorry=IsWorry, IsWorry=isWorry,
DepartmentName = departmentName, DepartmentName = departmentName,
SkuId = skuId, SkuId = skuId,
TaskId = taskId, TaskId = taskId,

6
BBWY.Client/App.xaml.cs

@ -1,5 +1,6 @@
using BBWY.Client.Models; using BBWY.Client.Models;
using BBWY.Client.ViewModels; using BBWY.Client.ViewModels;
using BBWY.Client.ViewModels.PackTask;
using BBWY.Common.Extensions; using BBWY.Common.Extensions;
using BBWY.Common.Http; using BBWY.Common.Http;
using BBWY.Common.Models; using BBWY.Common.Models;
@ -56,10 +57,10 @@ namespace BBWY.Client
//} //}
#if DEBUG #if DEBUG
//仓库组测试 //仓库组测试
userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNjM1OTMyMDAyMjcwMDU2NDQ4IiwidGVhbUlkIjoiMTU0MDg4NTU3MDYyNzA0NzQyNCIsInNvblRlYW1JZHMiOiIxNTQwODg1NTcwNjI3MDQ3NDI0IiwiZXhwIjoxNzEwNDk2NTQ1fQ.Sx2vGJcYGf98x99slQLU3vt7yWdjspptSpbUCcZgWek"; // userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNjM1OTMyMDAyMjcwMDU2NDQ4IiwidGVhbUlkIjoiMTU0MDg4NTU3MDYyNzA0NzQyNCIsInNvblRlYW1JZHMiOiIxNTQwODg1NTcwNjI3MDQ3NDI0IiwiZXhwIjoxNzEwNDk2NTQ1fQ.Sx2vGJcYGf98x99slQLU3vt7yWdjspptSpbUCcZgWek";
//齐越山鸡 //齐越山鸡
// userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNTM1MzMwMzI4ODkyMTQ5NzYwIiwidGVhbUlkIjoiMTUxNjk3NDI1MDU0MjUwMTg4OCIsInNvblRlYW1JZHMiOiIxNDM2Mjg4NTAwMjM1MjQzNTIwIiwiZXhwIjoxNjk0NjY5NjkxfQ.cSwro-7bGwOu92YejH9JhMenTai7Mvf99i2paQCmxIw"; userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNTM1MzMwMzI4ODkyMTQ5NzYwIiwidGVhbUlkIjoiMTUxNjk3NDI1MDU0MjUwMTg4OCIsInNvblRlYW1JZHMiOiIxNDM2Mjg4NTAwMjM1MjQzNTIwIiwiZXhwIjoxNjk0NjY5NjkxfQ.cSwro-7bGwOu92YejH9JhMenTai7Mvf99i2paQCmxIw";
//刷单组测试 //刷单组测试
//userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNTcxODUyODE0OTAzMTUyNjQwIiwidGVhbUlkIjoiMTU3MTg1MjQ1MDI5NjUwMDIyNCIsInNvblRlYW1JZHMiOiIiLCJleHAiOjE2OTUxNDc2ODh9.hVupdHnhgHHGo3QrMSDqhINqtq6Q5_RovWyXjiMkkEs"; //userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNTcxODUyODE0OTAzMTUyNjQwIiwidGVhbUlkIjoiMTU3MTg1MjQ1MDI5NjUwMDIyNCIsInNvblRlYW1JZHMiOiIiLCJleHAiOjE2OTUxNDc2ODh9.hVupdHnhgHHGo3QrMSDqhINqtq6Q5_RovWyXjiMkkEs";
@ -111,6 +112,7 @@ namespace BBWY.Client
IServiceCollection serviceCollection = new ServiceCollection(); IServiceCollection serviceCollection = new ServiceCollection();
serviceCollection.AddHttpClient(); serviceCollection.AddHttpClient();
serviceCollection.AddTransient<CreatePackTaskViewModel>();
serviceCollection.AddHttpClient("gzip").ConfigurePrimaryHttpMessageHandler(handler => new HttpClientHandler() serviceCollection.AddHttpClient("gzip").ConfigurePrimaryHttpMessageHandler(handler => new HttpClientHandler()
{ {
AutomaticDecompression = System.Net.DecompressionMethods.GZip AutomaticDecompression = System.Net.DecompressionMethods.GZip

4
BBWY.Client/BBWYAppSettings.json

@ -4,6 +4,6 @@
"MDSApiHost": "http://mdsapi.qiyue666.com", "MDSApiHost": "http://mdsapi.qiyue666.com",
"JOSApiHost": "", "JOSApiHost": "",
"1688ApiHost": "", "1688ApiHost": "",
"QKApiHost": "http://localhost:8080" //"QKApiHost": "http://localhost:8080"
//"QKApiHost": "http://qiku.qiyue666.com" "QKApiHost": "http://qiku.qiyue666.com"
} }

3
BBWY.Client/Models/PackTask/PackTaskModel.cs

@ -60,7 +60,8 @@ namespace BBWY.Client.Models
private void SetService() private void SetService()
{ {
//加载数据 //加载数据
ServiceWindow service = new ServiceWindow(packTaskService, TaskId, SkuCount, consumableService, workProcessService, increateServiceService);//设置
ServiceWindow service = new ServiceWindow(packTaskService, TaskId, SkuCount, consumableService, workProcessService, increateServiceService);//设置
service.model.SetAllFees = new Action<FeesItemResponse, List<string>>((feesItem, packUsers) => service.model.SetAllFees = new Action<FeesItemResponse, List<string>>((feesItem, packUsers) =>
{ {
FeesItemResponse = feesItem; FeesItemResponse = feesItem;

16
BBWY.Client/ViewModels/PackTask/ConsumableViewModel.cs

@ -57,7 +57,7 @@ namespace BBWY.Client.ViewModels.PackTask
// public Action ReflashDatas { get; set; } // public Action ReflashDatas { get; set; }
public ConsumableViewModel(ConsumableService consumableService) public ConsumableViewModel(ConsumableService consumableService)
{ {
@ -65,7 +65,7 @@ namespace BBWY.Client.ViewModels.PackTask
this.consumableService = consumableService; this.consumableService = consumableService;
ConsumableModel = new ConsumableModel(consumableService); ConsumableModel = new ConsumableModel(consumableService);
// ConsumableModel.ReflashDatas = ReflashDatas; // ConsumableModel.ReflashDatas = ReflashDatas;
ConsumableList = new ObservableCollection<ConsumableModel>(); ConsumableList = new ObservableCollection<ConsumableModel>();
AddConsumableCommand = new RelayCommand(AddConsumable); AddConsumableCommand = new RelayCommand(AddConsumable);
SearchConsumableCommand = new RelayCommand(SearchConsumable); SearchConsumableCommand = new RelayCommand(SearchConsumable);
@ -129,11 +129,15 @@ namespace BBWY.Client.ViewModels.PackTask
{ {
//ConsumableModel = new ConsumableModel(consumableService); //ConsumableModel = new ConsumableModel(consumableService);
//IsOpenAdd = true; //IsOpenAdd = true;
var model = new ConsumableModel(consumableService) { //ReflashDatas = ReflashDatas var model = new ConsumableModel(consumableService)
}; { //ReflashDatas = ReflashDatas
model.ReflashDatas = new Action(() => {
};
model.ReflashDatas = new Action(() =>
{
SearchConsumable(); SearchConsumable();
Messenger.Default.Send(true, "ReflashList"); Messenger.Default.Send(true);
}); });
EditConsumable add = new EditConsumable(model); EditConsumable add = new EditConsumable(model);

67
BBWY.Client/ViewModels/PackTask/CreatePackTaskViewModel.cs

@ -7,6 +7,7 @@ using BBWY.Client.Views.PackTask;
using BBWY.Common.Models; using BBWY.Common.Models;
using BBWY.Common.Trigger; using BBWY.Common.Trigger;
using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Command;
using GalaSoft.MvvmLight.Messaging;
using NPOI.Util; using NPOI.Util;
using Org.BouncyCastle.Asn1.Crmf; using Org.BouncyCastle.Asn1.Crmf;
using System; using System;
@ -14,14 +15,18 @@ using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Data; using System.Data;
using System.Linq; using System.Linq;
using System.Runtime.CompilerServices;
using System.Text; using System.Text;
using System.Threading.Tasks;
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Input; using System.Windows.Input;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
namespace BBWY.Client.ViewModels.PackTask namespace BBWY.Client.ViewModels.PackTask
{ {
public class CreatePackTaskViewModel : BaseVM, IDenpendency public class CreatePackTaskViewModel : BaseVM
{ {
private bool isLoading = false; private bool isLoading = false;
public bool IsLoading { get => isLoading; set { Set(ref isLoading, value); } } public bool IsLoading { get => isLoading; set { Set(ref isLoading, value); } }
@ -341,8 +346,45 @@ namespace BBWY.Client.ViewModels.PackTask
public void InitData()
{
Logo = string.Empty;
SearchSkuId = "";
SkuId = "";
SkuCount = 0;
SkuName = string.Empty;
ProductNo= string.Empty;
Brand =string.Empty;
brandName = string.Empty;
this.MarkMessage = "";
IsSetBarCode = true;
IsSetCertificate =true;
BarCodeModel = null;
CertificateModel = null;
SkuTitle= string.Empty;
GoodsNumber = 0;
string[] increates = new string[] { "气泡纸", "气泡袋", "POP袋", "折纸箱", "气泡纸封边", "彩盒", "剪胶", "剪彩带", "快递袋", "收纳盒", "纸箱子", "装纸箱", "封边", "胶带", "折彩盒" };
IncreateList = new ObservableCollection<IncreateModel>();
foreach (var item in increates)
{
IncreateList.Add(new IncreateModel
{
IncreateName = item,
IsSelected = false
});
}
}
public CreatePackTaskViewModel(PackTaskService packTaskService, GlobalContext globalContext, ProductService productService) public CreatePackTaskViewModel(PackTaskService packTaskService, GlobalContext globalContext, ProductService productService)
{ {
Messenger.Default.Register<bool>(this, "InitData", message => {
InitData();
});
//RaisePropertyChanged(string.Empty);
//this.RaisePropertyChanged(nameof(CreatePackTaskViewModel));
this.productService = productService; this.productService = productService;
this.packTaskService = packTaskService; this.packTaskService = packTaskService;
@ -367,7 +409,11 @@ namespace BBWY.Client.ViewModels.PackTask
//查询sku //查询sku
SearchSkuCommand = new RelayCommand(SearchSku); SearchSkuCommand = new RelayCommand(() =>
{
Task.Factory.StartNew(() => { SearchSku(); });
});
CreateTaskCommand = new RelayCommand<object>(CreateTask); CreateTaskCommand = new RelayCommand<object>(CreateTask);
this.globalContext = globalContext; this.globalContext = globalContext;
SetBarCodeCommand = new RelayCommand(SetBarCode); SetBarCodeCommand = new RelayCommand(SetBarCode);
@ -603,18 +649,18 @@ namespace BBWY.Client.ViewModels.PackTask
/// <summary> /// <summary>
/// 发布任务 /// 发布任务
/// </summary> /// </summary>
public void CreateTask( object obj) public void CreateTask(object obj)
{ {
if (string.IsNullOrEmpty( SkuId)) if (string.IsNullOrEmpty(SkuId))
{ {
new TipsWindow("请先搜索SkuId!").ShowDialog(); new TipsWindow("请先搜索SkuId!").ShowDialog();
return; return;
} }
string increateStr = ""; string increateStr = "";
var increates =IncreateList.Where(i => i.IsSelected).Select(i => i.IncreateName); var increates = IncreateList.Where(i => i.IsSelected).Select(i => i.IncreateName);
if (increates!=null&& increates.Count()>0) if (increates != null && increates.Count() > 0)
{ {
increateStr = string.Join(",", increates); increateStr = string.Join(",", increates);
} }
@ -642,7 +688,7 @@ namespace BBWY.Client.ViewModels.PackTask
}; };
if (IsNeedBarCode == "需要") if (IsNeedBarCode == "需要")
{ {
if (BarCodeModel==null|| BarCodeModel.Id <= 0) if (BarCodeModel == null || BarCodeModel.Id <= 0)
{ {
new TipsWindow("请设置条形码模板").ShowDialog(); new TipsWindow("请设置条形码模板").ShowDialog();
return; return;
@ -651,7 +697,7 @@ namespace BBWY.Client.ViewModels.PackTask
} }
if (IsNeedCertificateModel == "需要") if (IsNeedCertificateModel == "需要")
{ {
if (CertificateModel==null|| CertificateModel.Id <= 0) if (CertificateModel == null || CertificateModel.Id <= 0)
{ {
new TipsWindow("请设置合格证模板").ShowDialog(); new TipsWindow("请设置合格证模板").ShowDialog();
return; return;
@ -679,6 +725,11 @@ namespace BBWY.Client.ViewModels.PackTask
/// </summary> /// </summary>
public void SearchSku() public void SearchSku()
{ {
IsLoading = true; IsLoading = true;
SkuId = searchSkuId; SkuId = searchSkuId;
ApiResponse<ProductListResponse> productApiResponse = null; ApiResponse<ProductListResponse> productApiResponse = null;

3
BBWY.Client/ViewModels/PackTask/TaskListViewModel.cs

@ -346,7 +346,8 @@ namespace BBWY.Client.ViewModels.PackTask
/// </summary> /// </summary>
public void CreateTask() public void CreateTask()
{ {
CreatePackTask create = new CreatePackTask(packTaskService, globalContext, productService); CreatePackTask create = new CreatePackTask();
create.SendData();
create.Show(); create.Show();
} }

54
BBWY.Client/ViewModels/ViewModelLocator.cs

@ -1,6 +1,9 @@
using BBWY.Client.ViewModels.PackTask; using BBWY.Client.ViewModels.PackTask;
using GalaSoft.MvvmLight.Ioc;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using System; using System;
using System.Windows.Navigation;
using static System.Formats.Asn1.AsnWriter;
namespace BBWY.Client.ViewModels namespace BBWY.Client.ViewModels
{ {
@ -23,6 +26,34 @@ namespace BBWY.Client.ViewModels
sp = (App.Current as App).ServiceProvider; sp = (App.Current as App).ServiceProvider;
} }
//public static PackServiceViewModel PackServiceViewModel => SimpleIoc.Default.GetInstance<PackServiceViewModel>();
//public static PackServiceViewModel CreateNewPackServiceViewModel()
//{
// SimpleIoc.Default.Unregister<PackServiceViewModel>();
// SimpleIoc.Default.Register<PackServiceViewModel>();
// return PackServiceViewModel;
//}
public MainViewModel Main public MainViewModel Main
{ {
get get
@ -151,13 +182,34 @@ namespace BBWY.Client.ViewModels
} }
} }
//CreatePackTaskViewModel viewModel = null;
public CreatePackTaskViewModel CreateTaskView public CreatePackTaskViewModel CreateTaskView
{ {
get get
{ {
// return sp.GetRequiredService<CreatePackTaskViewModel>();
using (var s = sp.CreateScope()) using (var s = sp.CreateScope())
{ {
return s.ServiceProvider.GetRequiredService<CreatePackTaskViewModel>(); //if (viewModel == null)
// viewModel = s.ServiceProvider.GetRequiredService<CreatePackTaskViewModel>();
var viewModel = s.ServiceProvider.GetRequiredService<CreatePackTaskViewModel>();
//bool areSame = object.ReferenceEquals(viewModel, sp.GetRequiredService<CreatePackTaskViewModel>());
return viewModel;
} }
} }
} }

6
BBWY.Client/Views/PackTask/Consumable.xaml

@ -52,7 +52,7 @@
<TextBlock Text="耗材品名:" VerticalAlignment="Center" Margin="16,0,0,0"/> <TextBlock Text="耗材品名:" VerticalAlignment="Center" Margin="16,0,0,0"/>
</StackPanel> </StackPanel>
<c:BButton Content="搜索" Height="35" Width="66" VerticalAlignment="Stretch" Margin="5,0,10,0" <Button Content="搜索" Height="35" Width="66" VerticalAlignment="Stretch" Margin="5,0,10,0"
Command="{Binding SearchConsumableCommand}" HorizontalAlignment="Right" Command="{Binding SearchConsumableCommand}" HorizontalAlignment="Right"
Background="{StaticResource Button.Selected.Background}" BorderThickness="0" Foreground="White"/> Background="{StaticResource Button.Selected.Background}" BorderThickness="0" Foreground="White"/>
@ -155,8 +155,8 @@
</Grid> </Grid>
<Grid Grid.Column="5"> <Grid Grid.Column="5">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<c:BButton Background="Transparent" Foreground="Black" Content="编辑" Command="{Binding EditConsumableCommand}" Margin="0 0 10 0"/> <c:BButton Background="Transparent" Foreground="Blue" Content="编辑" Command="{Binding EditConsumableCommand}" Margin="0 0 10 0"/>
<c:BButton Background="Transparent" Foreground="Black" Content="删除" Command="{Binding DeletedConsumableCommand}" <c:BButton Background="Transparent" Foreground="Blue" Content="删除" Command="{Binding DeletedConsumableCommand}"
CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}, Path=ItemsSource}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}, Path=ItemsSource}"
/> />
</StackPanel> </StackPanel>

19
BBWY.Client/Views/PackTask/Consumable.xaml.cs

@ -48,20 +48,16 @@ namespace BBWY.Client.Views.PackTask
QKApiHost = Configuration.GetSection("QKApiHost").Value; QKApiHost = Configuration.GetSection("QKApiHost").Value;
Messenger.Default.Register<bool>(this, "ReFlashList", (x) =>
Messenger.Default.Register<bool>(this, message =>
{ {
GetList(); GetList();
}); });
this.Unloaded += BindingPurchaseProduct_Unloaded;
}
private void BindingPurchaseProduct_Unloaded(object sender, RoutedEventArgs e)
{
Messenger.Default.Unregister(this);
}
}
string QKApiHost = ""; string QKApiHost = "";
@ -148,20 +144,21 @@ namespace BBWY.Client.Views.PackTask
//创建一个ListBoxIem //创建一个ListBoxIem
if (res.Success) if (res.Success)
{ {
if (res.Data != null && res.Data.Count() > 0) if (res.Data != null && res.Data.Count() > 0)
{ {
consumables = new List<string>();
foreach (var department in res.Data) foreach (var department in res.Data)
{ {
if (!consumables.Contains(department.Name)) if (!consumables.Contains(department.Name))
{ {
consumables.Add(department.Name); consumables.Add(department.Name);
} }
} }
} }
} }
} }
} }
} }

13
BBWY.Client/Views/PackTask/CreatePackTask.xaml

@ -11,14 +11,15 @@
xmlns:hc="https://handyorg.github.io/handycontrol" xmlns:hc="https://handyorg.github.io/handycontrol"
mc:Ignorable="d" mc:Ignorable="d"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:sys="clr-namespace:System;assembly=mscorlib"
CloseButtonVisibility="Visible" CloseButtonVisibility="Visible"
CloseButtonColor="{StaticResource WindowButtonColor}" CloseButtonColor="{StaticResource WindowButtonColor}"
DataContext="{Binding CreateTaskView,Source={StaticResource Locator}}"
MinButtonVisibility="Collapsed" MinButtonVisibility="Collapsed"
MaxButtonVisibility="Collapsed" MaxButtonVisibility="Collapsed"
RightButtonGroupMargin="0,5,5,0" RightButtonGroupMargin="0,5,5,0"
Title="CreatePackTask" Height="350" Width="1500"> Title="CreatePackTask" Height="350" Width="1500">
<Window.Resources> <!-- DataContext="{Binding CreateTaskView,Source={StaticResource Locator}}" -->
<Window.Resources>
<ResourceDictionary> <ResourceDictionary>
<ObjectDataProvider x:Key="storageTypeProvider" MethodName="GetValues" ObjectType="{x:Type sys:Enum}"> <ObjectDataProvider x:Key="storageTypeProvider" MethodName="GetValues" ObjectType="{x:Type sys:Enum}">
@ -306,8 +307,8 @@
<Grid Grid.Row="1" Grid.Column="10" > <Grid Grid.Row="1" Grid.Column="10" >
<ComboBox VerticalContentAlignment="Center" Margin="5" Text="{Binding IsNeedBarCode}"> <ComboBox VerticalContentAlignment="Center" Margin="5" Text="{Binding IsNeedBarCode}">
<ComboBoxItem Content="需要" IsSelected="True" /> <ComboBoxItem Content="需要" />
<ComboBoxItem Content="不需要"/> <ComboBoxItem Content="不需要" IsSelected="True"/>
</ComboBox> </ComboBox>
</Grid> </Grid>
<Grid Grid.Row="1" Grid.Column="11" > <Grid Grid.Row="1" Grid.Column="11" >
@ -318,9 +319,9 @@
</Grid> </Grid>
<Grid Grid.Row="1" Grid.Column="12" > <Grid Grid.Row="1" Grid.Column="12" >
<ComboBox VerticalContentAlignment="Center" Margin="5" Text="{Binding CertificatePosition}"> <ComboBox VerticalContentAlignment="Center" Margin="5" Text="{Binding CertificatePosition}">
<ComboBoxItem Content="外部包装" IsSelected="True" /> <ComboBoxItem Content="外部包装" />
<ComboBoxItem Content="产品包装"/> <ComboBoxItem Content="产品包装"/>
<ComboBoxItem Content="无"/> <ComboBoxItem Content="无" IsSelected="True"/>
</ComboBox> </ComboBox>
</Grid> </Grid>

28
BBWY.Client/Views/PackTask/CreatePackTask.xaml.cs

@ -1,7 +1,10 @@
using BBWY.Client.APIServices; using BBWY.Client.APIServices;
using BBWY.Client.ViewModels;
using BBWY.Client.ViewModels.PackTask; using BBWY.Client.ViewModels.PackTask;
using BBWY.Common.Models; using BBWY.Common.Models;
using BBWY.Controls; using BBWY.Controls;
using GalaSoft.MvvmLight.Messaging;
using NPOI.SS.Formula.Functions;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
@ -12,6 +15,7 @@ using System.Windows.Documents;
using System.Windows.Input; using System.Windows.Input;
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes; using System.Windows.Shapes;
namespace BBWY.Client.Views.PackTask namespace BBWY.Client.Views.PackTask
@ -22,12 +26,28 @@ namespace BBWY.Client.Views.PackTask
public partial class CreatePackTask : BWindow,IDenpendency public partial class CreatePackTask : BWindow,IDenpendency
{ {
CreatePackTaskViewModel model = null; //CreatePackTaskViewModel model = null;//PackTaskService packTaskService,GlobalContext globalContext,ProductService productService
public CreatePackTask(PackTaskService packTaskService,GlobalContext globalContext,ProductService productService) public CreatePackTask()
{ {
InitializeComponent(); InitializeComponent();
model = new CreatePackTaskViewModel(packTaskService, globalContext, productService); // ViewModelLocator vm = new ViewModelLocator();
DataContext = model; //this.DataContext = vm.CreateTaskView;
// vm.CreateTaskView.Refresh();
//model = new CreatePackTaskViewModel(packTaskService, globalContext, productService);
//DataContext = model;
}
public void SendData()
{
Messenger.Default.Send(true,"InitData");
} }
} }
} }

11
BBWY.Client/Views/PackTask/ServiceWindow.xaml.cs

@ -1,4 +1,5 @@
using BBWY.Client.APIServices; using BBWY.Client.APIServices;
using BBWY.Client.ViewModels;
using BBWY.Client.ViewModels.PackTask; using BBWY.Client.ViewModels.PackTask;
using BBWY.Controls; using BBWY.Controls;
using Org.BouncyCastle.Asn1.Ocsp; using Org.BouncyCastle.Asn1.Ocsp;
@ -22,7 +23,6 @@ namespace BBWY.Client.Views.PackTask
public partial class ServiceWindow : BWindow public partial class ServiceWindow : BWindow
{ {
public PackServiceViewModel model { get; set; } public PackServiceViewModel model { get; set; }
public PackTaskService packTaskService; public PackTaskService packTaskService;
public ConsumableService consumableService; public ConsumableService consumableService;
@ -40,8 +40,15 @@ namespace BBWY.Client.Views.PackTask
model.TaskId = taskId; model.TaskId = taskId;
model.TaskCount = taskCount; model.TaskCount = taskCount;
this.DataContext = model; this.DataContext = model;
} }
//public PackServiceViewModel model { get; set; }
//public ServiceWindow()
//{
// InitializeComponent();
// model = ViewModelLocator.CreateNewPackServiceViewModel();
// this.DataContext = model;
//}
} }
} }

6
BBWY.Client/Views/PackTask/SetBarCode.xaml.cs

@ -1,4 +1,5 @@
using BBWY.Controls; using BBWY.Client.Models;
using BBWY.Controls;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
@ -18,9 +19,10 @@ namespace BBWY.Client.Views.PackTask
/// </summary> /// </summary>
public partial class SetBarCodeWindow : BWindow public partial class SetBarCodeWindow : BWindow
{ {
public SetBarCodeWindow() public SetBarCodeWindow( )
{ {
InitializeComponent(); InitializeComponent();
} }
} }
} }

4
BBWY.Client/Views/PackTask/SetCerWindow.xaml.cs

@ -1,4 +1,6 @@
using BBWY.Controls; using BBWY.Client.Models;
using BBWY.Controls;
using Org.BouncyCastle.Ocsp;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;

5
BBWY.Client/Views/PackTask/TaskListControl.xaml

@ -104,7 +104,7 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Grid.Column="0" Grid.ColumnSpan="11"> <StackPanel Orientation="Horizontal" Grid.Column="0" Grid.ColumnSpan="11">
<TextBlock VerticalAlignment="Center" Text="提交时间:" Margin="14,0,0,0" /> <TextBlock VerticalAlignment="Center" Text="提交时间:" Margin="14,0,0,0" />
<TextBlock Text="{Binding EndTime,StringFormat=yyyy-MM-dd }" VerticalAlignment="Center" Margin="5,0,0,0"/> <TextBlock Text="{Binding EndTime,StringFormat=yyyy-MM-dd HH:mm}" VerticalAlignment="Center" Margin="5,0,0,0"/>
<TextBlock VerticalAlignment="Center" Text="任务ID:" Margin="16,0,0,0" /> <TextBlock VerticalAlignment="Center" Text="任务ID:" Margin="16,0,0,0" />
<TextBlock VerticalAlignment="Center" Text="{Binding TaskId}" Margin="5,0,0,0" /> <TextBlock VerticalAlignment="Center" Text="{Binding TaskId}" Margin="5,0,0,0" />
<Label Width="94" Height="25" HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" VerticalAlignment="Center" Content="{Binding TaskStatus}" Foreground="White" Background="{Binding TaskStatus,Converter={StaticResource objConverter} , ConverterParameter=未完成:#facd91:#02a7f0 }" Margin="5,0,0,0"/> <Label Width="94" Height="25" HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" VerticalAlignment="Center" Content="{Binding TaskStatus}" Foreground="White" Background="{Binding TaskStatus,Converter={StaticResource objConverter} , ConverterParameter=未完成:#facd91:#02a7f0 }" Margin="5,0,0,0"/>
@ -113,8 +113,7 @@
<TextBlock VerticalAlignment="Center" Text="对接人:" Margin="16,0,0,0" /> <TextBlock VerticalAlignment="Center" Text="对接人:" Margin="16,0,0,0" />
<TextBlock VerticalAlignment="Center" Text="{Binding AcceptName}" Margin="5,0,0,0" /> <TextBlock VerticalAlignment="Center" Text="{Binding AcceptName}" Margin="5,0,0,0" />
</StackPanel> </StackPanel>
<!--<c:BButton Grid.Column="11" Command="{Binding SetTaskStatusCommand}" CommandParameter="{Binding TaskId}"
HorizontalAlignment="Stretch" VerticalAlignment="Center" Content="完成" />-->
</Grid> </Grid>
<Grid Grid.Row="1"> <Grid Grid.Row="1">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>

2
BBWY.Client/Views/PackTask/WareHouseListControl.xaml

@ -104,7 +104,7 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Grid.Column="0" Grid.ColumnSpan="11"> <StackPanel Orientation="Horizontal" Grid.Column="0" Grid.ColumnSpan="11">
<TextBlock VerticalAlignment="Center" Text="提交时间:" Margin="14,0,0,0" /> <TextBlock VerticalAlignment="Center" Text="提交时间:" Margin="14,0,0,0" />
<TextBlock Text="{Binding EndTime,StringFormat=yyyy-MM-dd }" VerticalAlignment="Center" Margin="5,0,0,0"/> <TextBlock Text="{Binding EndTime,StringFormat=yyyy-MM-dd HH:mm}" VerticalAlignment="Center" Margin="5,0,0,0"/>
<TextBlock VerticalAlignment="Center" Text="任务ID:" Margin="16,0,0,0" /> <TextBlock VerticalAlignment="Center" Text="任务ID:" Margin="16,0,0,0" />
<TextBlock VerticalAlignment="Center" Text="{Binding TaskId}" Margin="5,0,0,0" /> <TextBlock VerticalAlignment="Center" Text="{Binding TaskId}" Margin="5,0,0,0" />

Loading…
Cancel
Save