Browse Source

添加商家自取状态

AddValidOverTime
506583276@qq.com 2 years ago
parent
commit
30b5a3508a
  1. 67
      BBWY.Client/APIServices/QiKu/PackTaskService.cs
  2. 3
      BBWY.Client/Models/Enums.cs
  3. 2
      BBWY.Client/ViewModels/PackTask/TaskListViewModel.cs
  4. 49
      BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs
  5. 118
      BBWY.Client/ViewModels/QualityTask/QualityViewModel.cs
  6. 18
      BBWY.Client/ViewModels/SealBox/SealBoxConfigureViewModel.cs
  7. 2
      BBWY.Client/Views/PackTask/TaskList.xaml
  8. 2
      BBWY.Client/Views/PackTask/TaskListControl.xaml
  9. 2
      BBWY.Client/Views/PackTask/WareHouseList.xaml
  10. 73
      BBWY.Client/Views/PackTask/WareHouseList.xaml.cs
  11. 38
      BBWY.Client/Views/PackTask/WareHouseListControl.xaml
  12. 4
      BBWY.Client/Views/QualityTask/QualityWindow.xaml

67
BBWY.Client/APIServices/QiKu/PackTaskService.cs

@ -11,6 +11,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Net.Http; using System.Net.Http;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using System.Threading.Tasks;
using System.Windows.Documents; using System.Windows.Documents;
namespace BBWY.Client.APIServices namespace BBWY.Client.APIServices
@ -206,25 +207,6 @@ namespace BBWY.Client.APIServices
, null, HttpMethod.Get); , null, HttpMethod.Get);
} }
/// <summary>
/// 获取任务的服务
/// </summary>
/// <returns></returns>
public ApiResponse<PackServiceResponse> GetTaskService(long taskId)
{
return SendRequest<PackServiceResponse>(globalContext.QKApiHost, $"api/PackTask/GetTaskService?TaskId={taskId}",null
, null, HttpMethod.Get);
}
/// <summary>
/// 上传 更新任务的服务数据
/// </summary>
/// <returns></returns>
public ApiResponse<object> UploadService(UploadServiceRequest uploadService)
{
return SendRequest<object>(globalContext.QKApiHost, "api/PackTask/UploadService", uploadService
, null, HttpMethod.Post);
}
public ApiResponse<ShopTotalResponse> ShopTotal(string skuId = null, string taskId = null, public ApiResponse<ShopTotalResponse> ShopTotal(string skuId = null, string taskId = null,
DateTime? startTime = null, DateTime? startTime = null,
@ -295,55 +277,12 @@ namespace BBWY.Client.APIServices
}, null, HttpMethod.Post); }, null, HttpMethod.Post);
} }
/// <summary> public ApiResponse<bool> StoreGetBySelf(long taskId)
/// 获取待封箱列表
/// </summary>
/// <param name="orderId"></param>
/// <returns></returns>
public ApiResponse<SearchWaitSealBoxResponse> SearchWaitSealBoxList(string ShopName = null, long? TaskId=null, string SkuId = null, int PageIndex = 1
, int PageSize = 10)
{ {
return SendRequest<SearchWaitSealBoxResponse>(globalContext.QKApiHost, "api/PackTask/SearchWaitSealBoxList", new
{
ShopName,
TaskId,
SkuId,
PageIndex,
PageSize
}, null, HttpMethod.Post);
}
/// <summary> return SendRequest<bool>(globalContext.QKApiHost, $"api/PackTask/StoreGetBySelf?TaskId={taskId}", null, null, HttpMethod.Post);
/// 完成封箱
/// </summary>
/// <param name="orderId"></param>
/// <returns></returns>
public ApiResponse<bool> CompeteSealBox( CompeteSealBox CompeteSealBoxs)
{
return SendRequest<bool>(globalContext.QKApiHost, "api/PackTask/CompeteSealBox", CompeteSealBoxs, null, HttpMethod.Post);
}
/// <summary>
/// 获取待落仓列表
/// </summary>
/// <param name="orderId"></param>
/// <returns></returns>
public ApiResponse<SearchWaitFallWareResponse> SearchWaitFallWareList(string ShopName = null, long? TaskId = null, string SkuId = null, int PageIndex = 1
, int PageSize = 10)
{
return SendRequest<SearchWaitFallWareResponse>(globalContext.QKApiHost, "api/PackTask/SearchWaitFallWareList", new
{
ShopName,
TaskId,
SkuId,
PageIndex,
PageSize
}, null, HttpMethod.Post);
} }
} }
public class CompeteSealBox public class CompeteSealBox

3
BBWY.Client/Models/Enums.cs

@ -242,7 +242,8 @@
= 6, = 6,
= 7, = 7,
= 8, = 8,
= 9 = 9,
= 10
} }

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

@ -258,7 +258,7 @@ namespace BBWY.Client.ViewModels.PackTask
SetTaskState(null); SetTaskState(null);
this.sealBoxService = sealBoxService; this.sealBoxService = sealBoxService;
SealBoxConfigureType = SealBoxConfigureType.; SealBoxConfigureType = SealBoxConfigureType.;
SetFallWareConfiguredCommand = new RelayCommand<object>(SetFallWareConfigured); SetFallWareConfiguredCommand = new RelayCommand<object>(SetFallWareConfigured);
} }

49
BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs

@ -24,6 +24,7 @@ using BBWY.Client.Models.PackTask;
using BBWY.Client.Views.SealBox; using BBWY.Client.Views.SealBox;
using BBWY.Client.Views.FallWare; using BBWY.Client.Views.FallWare;
using BBWY.Client.Models.FallWare; using BBWY.Client.Models.FallWare;
using WebSocketSharp;
namespace BBWY.Client.ViewModels.PackTask namespace BBWY.Client.ViewModels.PackTask
{ {
@ -274,8 +275,8 @@ namespace BBWY.Client.ViewModels.PackTask
SetSealBoxCommand = new RelayCommand<object>(SetSealBox); SetSealBoxCommand = new RelayCommand<object>(SetSealBox);
CompeteFallWareCommand = new RelayCommand<object>(CompeteFallWare); CompeteFallWareCommand = new RelayCommand<object>(CompeteFallWare);
SealBoxConfigureType = SealBoxConfigureType.; SealBoxConfigureType = SealBoxConfigureType.;
PositionState = PositionState.; PositionState = PositionState.;
SetSealBoxConfigureTypeCommand = new RelayCommand<SealBoxConfigureType>(s => SetSealBoxConfigureTypeCommand = new RelayCommand<SealBoxConfigureType>(s =>
{ {
PageIndex = 1; PageIndex = 1;
@ -289,8 +290,43 @@ namespace BBWY.Client.ViewModels.PackTask
LookBoxConfigureCommand = new RelayCommand<object>(LookBoxConfigure); LookBoxConfigureCommand = new RelayCommand<object>(LookBoxConfigure);
PrintBoxConfigureCommand = new RelayCommand<object>(PrintBoxConfigure); PrintBoxConfigureCommand = new RelayCommand<object>(PrintBoxConfigure);
DeletedTaskCommand = new RelayCommand<object>(DeletedTask);
StoreGetBySelfCommand = new RelayCommand<object>(StoreGetBySelf);
} }
private void StoreGetBySelf(object obj)
{
var packTaskmodel = (PackTaskModel)obj;
MessageBoxResult result = System.Windows.MessageBox.Show($"确定商家自取,任务id:{packTaskmodel.TaskId}?", "提示",
MessageBoxButton.YesNo,
MessageBoxImage.Warning);
if (result != MessageBoxResult.Yes) return;
var res = packTaskService.StoreGetBySelf(packTaskmodel.TaskId);
if (!res.Success)
{
System.Windows.MessageBox.Show(res.Msg,"错误信息");
return;
}
Task.Factory.StartNew(() => SearchTaskList());
}
private void DeletedTask(object obj)
{
var packTaskmodel = (PackTaskModel)obj;
//if (!packTaskmodel.OrderId.IsNullOrEmpty())
//{
// System.Windows.MessageBox.Show($"暂不支持删除采购组的任务,如要删除,请到采购列表取消订单:{packTaskmodel.OrderId}");
// return;
//}
MessageBoxResult result =System.Windows.MessageBox.Show($"确定取消任务{packTaskmodel.TaskId}?", "提示",
MessageBoxButton.YesNo,
MessageBoxImage.Warning);
if (result != MessageBoxResult.Yes) return;
packTaskService.DeletedTask(packTaskmodel.TaskId);
Task.Factory.StartNew(() => SearchTaskList());
}
/// <summary> /// <summary>
/// todo: 打印数据 /// todo: 打印数据
@ -452,7 +488,16 @@ namespace BBWY.Client.ViewModels.PackTask
public ICommand PrintBoxConfigureCommand { get; set; } public ICommand PrintBoxConfigureCommand { get; set; }
/// <summary>
/// 删除任务
/// </summary>
public ICommand DeletedTaskCommand { get; set; }
/// <summary>
/// 商家自取
/// </summary>
public ICommand StoreGetBySelfCommand { get; set; }
/// <summary> /// <summary>
/// 完成封箱 /// 完成封箱
/// </summary> /// </summary>

118
BBWY.Client/ViewModels/QualityTask/QualityViewModel.cs

@ -112,17 +112,33 @@ namespace BBWY.Client.ViewModels
{ {
}; };
public ObservableCollection<string> PreCompeteTimeDayList { get => preCompeteTimeDayList; set { Set(ref preCompeteTimeDayList, value); } } public ObservableCollection<string> PreCompeteTimeDayList
{
get => preCompeteTimeDayList; set
{
Set(ref preCompeteTimeDayList, value);
}
}
private ObservableCollection<string> preCompeteTimeHourList = new ObservableCollection<string> { private ObservableCollection<string> preCompeteTimeHourList = new ObservableCollection<string> {
"12点前","18点前","22点前"
}; };
public ObservableCollection<string> PreCompeteTimeHourList { get => preCompeteTimeHourList; set { Set(ref preCompeteTimeHourList, value); } } public ObservableCollection<string> PreCompeteTimeHourList { get => preCompeteTimeHourList; set { Set(ref preCompeteTimeHourList, value); } }
// //
public string preCompeteTimeDay; public string preCompeteTimeDay;
public string PreCompeteTimeDay { get => preCompeteTimeDay; set { Set(ref preCompeteTimeDay, value); } } public string PreCompeteTimeDay
{
get => preCompeteTimeDay; set
{
Set(ref preCompeteTimeDay, value);
PreCompeteTimeDayOnChanged();//
}
}
@ -591,6 +607,94 @@ namespace BBWY.Client.ViewModels
} }
// "12点前","18点前","22点前"
private void PreCompeteTimeDayOnChanged()
{
var now = DateTime.Now;
if (now.Hour < 12)
{
if (PreCompeteTimeDay=="今天")
{
PreCompeteTimeHourList.Clear();
PreCompeteTimeHourList.Add("12点前");
PreCompeteTimeHourList.Add("18点前");
PreCompeteTimeHourList.Add("22点前");
PreCompeteTimeHour = "12点前";
}
if (PreCompeteTimeDay == "明天")
{
PreCompeteTimeHourList.Clear();
PreCompeteTimeHourList.Add("12点前");
PreCompeteTimeHour = "12点前";
}
}
else if (now.Hour < 18)
{
if (PreCompeteTimeDay == "今天")
{
PreCompeteTimeHourList.Clear();
PreCompeteTimeHourList.Add("18点前");
PreCompeteTimeHourList.Add("22点前");
PreCompeteTimeHour = "18点前";
}
if (PreCompeteTimeDay == "明天")
{
PreCompeteTimeHourList.Clear();
PreCompeteTimeHourList.Add("12点前");
PreCompeteTimeHourList.Add("18点前");
PreCompeteTimeHour = "12点前";
}
}
else if (now.Hour < 22)
{
if (PreCompeteTimeDay == "今天")
{
PreCompeteTimeHourList.Clear();
PreCompeteTimeHourList.Add("22点前");
PreCompeteTimeHour = "22点前";
}
if (PreCompeteTimeDay == "明天")
{
PreCompeteTimeHourList.Clear();
PreCompeteTimeHourList.Add("12点前");
PreCompeteTimeHourList.Add("18点前");
PreCompeteTimeHourList.Add("22点前");
PreCompeteTimeHour = "12点前";
}
}
else
{
if (PreCompeteTimeDay == "明天")
{
PreCompeteTimeHourList.Clear();
PreCompeteTimeHourList.Add("12点前");
PreCompeteTimeHourList.Add("18点前");
PreCompeteTimeHourList.Add("22点前");
PreCompeteTimeHour = "12点前";
}
if (PreCompeteTimeDay == "后天")
{
PreCompeteTimeHourList.Clear();
PreCompeteTimeHourList.Add("12点前");
PreCompeteTimeHour = "12点前";
}
}
}
private void SetBarCode() private void SetBarCode()
@ -853,7 +957,7 @@ namespace BBWY.Client.ViewModels
PreCompeteTimeDayList.Add("明天"); PreCompeteTimeDayList.Add("明天");
PreCompeteTimeDay = "今天"; PreCompeteTimeDay = "今天";
PreCompeteTimeHour = "12点前";
} }
else if (hour < 18) else if (hour < 18)
@ -861,22 +965,20 @@ namespace BBWY.Client.ViewModels
PreCompeteTimeDayList.Add("今天"); PreCompeteTimeDayList.Add("今天");
PreCompeteTimeDayList.Add("明天"); PreCompeteTimeDayList.Add("明天");
PreCompeteTimeDay = "今天"; PreCompeteTimeDay = "今天";
PreCompeteTimeHour = "18点前";
} }
else if (hour < 22) else if (hour < 22)
{ {
PreCompeteTimeDayList.Add("今天"); PreCompeteTimeDayList.Add("今天");
PreCompeteTimeDayList.Add("明天"); PreCompeteTimeDayList.Add("明天");
PreCompeteTimeDay = "今天"; PreCompeteTimeDay = "今天";
PreCompeteTimeHour = "22点前";
} }
else else
{ {
PreCompeteTimeDayList.Add("今天");
PreCompeteTimeDayList.Add("明天"); PreCompeteTimeDayList.Add("明天");
PreCompeteTimeDayList.Add("后天"); PreCompeteTimeDayList.Add("后天");
PreCompeteTimeDay = "明天"; PreCompeteTimeDay = "明天";
PreCompeteTimeHour = "12点前";
} }

18
BBWY.Client/ViewModels/SealBox/SealBoxConfigureViewModel.cs

@ -189,6 +189,24 @@ namespace BBWY.Client.ViewModels.SealBox
IList<SetSealBoxConfiguredData> SetSealBoxConfiguredDatas = new List<SetSealBoxConfiguredData>(); IList<SetSealBoxConfiguredData> SetSealBoxConfiguredDatas = new List<SetSealBoxConfiguredData>();
foreach (var sealBoxConfigureModel in SealBoxConfigureModelList) foreach (var sealBoxConfigureModel in SealBoxConfigureModelList)
{ {
if (sealBoxConfigureModel.WareHourseDatas==null|| !sealBoxConfigureModel.WareHourseDatas.Any(w=>w.Count>0))
{
continue;
}
//判断存在0的报错
if (sealBoxConfigureModel.WareHourseDatas.Any(w=>w.Count==0))
{
System.Windows.MessageBox.Show($"任务id:{sealBoxConfigureModel.TaskId}中,存在未配置的数据");
return;
}
////todo: 到分箱界面判断 ////todo: 到分箱界面判断
//if (sealBoxConfigureModel.WareHourseDatas.Select(s => s.WareId).Distinct().Count() != sealBoxConfigureModel.WareHourseDatas.Count()) //if (sealBoxConfigureModel.WareHourseDatas.Select(s => s.WareId).Distinct().Count() != sealBoxConfigureModel.WareHourseDatas.Count())
//{ //{

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

@ -124,7 +124,7 @@
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.待出库}" Content="待完结" Tag="{Binding WaitOutbound,Mode=TwoWay}"/> <RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.待出库}" Content="待完结" Tag="{Binding WaitOutbound,Mode=TwoWay}"/>
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.已完成}" Content="已完成" /> <RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.已完成}" Content="已完成" />
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.商家自取}" Content="商家自取" />
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.已取消}" Content="已取消" /> <RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.已取消}" Content="已取消" />

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

@ -46,7 +46,7 @@
<ColumnDefinition/> <ColumnDefinition/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Text="商品信息" Style="{StaticResource middleTextBlock}"/> <TextBlock Text="商品信息" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="SKU数量" Grid.Column="1" Style="{StaticResource middleTextBlock}"/> <TextBlock Text="件数" Grid.Column="1" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="到货情况" Grid.Column="2" Style="{StaticResource middleTextBlock}"/> <TextBlock Text="到货情况" Grid.Column="2" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="组合类型" Grid.Column="3" Style="{StaticResource middleTextBlock}"/> <TextBlock Text="组合类型" Grid.Column="3" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="SKU配件商品" Grid.Column="4" Style="{StaticResource middleTextBlock}"/> <TextBlock Text="SKU配件商品" Grid.Column="4" Style="{StaticResource middleTextBlock}"/>

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

@ -162,6 +162,8 @@
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.已完成}" Content="已完成" /> <RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.已完成}" Content="已完成" />
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.商家自取}" Content="商家自取" />
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.已取消}" Content="已取消" /> <RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.已取消}" Content="已取消" />

73
BBWY.Client/Views/PackTask/WareHouseList.xaml.cs

@ -34,14 +34,7 @@ namespace BBWY.Client.Views.PackTask
public WareHouseList() public WareHouseList()
{ {
InitializeComponent(); InitializeComponent();
//Messenger.Default.Register<GlobalContext>(this,"AcceptGlobalContext", g => { globalContext = g; LoadShops(g); });
this.Loaded += Load; this.Loaded += Load;
// this.Unloaded += WareHouseList_Unloaded;
// GlobalContext.User.DepartmentList
} }
//private void WareHouseList_Unloaded(object sender, RoutedEventArgs e) //private void WareHouseList_Unloaded(object sender, RoutedEventArgs e)
@ -55,6 +48,8 @@ namespace BBWY.Client.Views.PackTask
{ {
this.globalContext = globalContext; this.globalContext = globalContext;
shops = globalContext.User.ShopList.Select(s => s.ShopName).ToList(); shops = globalContext.User.ShopList.Select(s => s.ShopName).ToList();
departments=globalContext.User.DepartmentList.Select(s=>s.Name).ToList();
} }
private void Load(object sender, RoutedEventArgs e) private void Load(object sender, RoutedEventArgs e)
@ -62,7 +57,7 @@ namespace BBWY.Client.Views.PackTask
try try
{ {
var model = new ViewModelLocator().Main; var model = (App.Current.Resources["Locator"] as ViewModelLocator).Main;
LoadShops(model.GlobalContext); LoadShops(model.GlobalContext);
} }
@ -72,40 +67,43 @@ namespace BBWY.Client.Views.PackTask
} }
//try
//{
// var applicationPath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
// var builder = new ConfigurationBuilder().SetBasePath(applicationPath).AddJsonFile("BBWYAppSettings.json", false, true);
// var Configuration = builder.Build();
try // QKApiHost = Configuration.GetSection("QKApiHost").Value;
{
var applicationPath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
var builder = new ConfigurationBuilder().SetBasePath(applicationPath).AddJsonFile("BBWYAppSettings.json", false, true);
var Configuration = builder.Build();
QKApiHost = Configuration.GetSection("QKApiHost").Value; // if (QKApiHost.IsNullOrEmpty()) QKApiHost = "http://qiku.qiyue666.com";
HttpClientHelper helper = new HttpClientHelper(QKApiHost);
string url = $"{QKApiHost}/api/PackTask/GetAllDepartment";//获取所有数据
var data = helper.Get(url);
var res = JsonConvert.DeserializeObject<ApiResponse<UserDepartment[]>>(data); // HttpClientHelper helper = new HttpClientHelper(QKApiHost);
//创建一个ListBoxIem
if (res.Success)
{
if (res.Data != null && res.Data.Count() > 0)
{
foreach (var department in res.Data)
{
if (!departments.Contains(department.DePartmentName))
{
departments.Add(department.DePartmentName);
}
}
}
}
}
catch (Exception)
{
// string url = $"{QKApiHost}/api/PackTask/GetAllDepartment";//获取所有数据
// var data = helper.Get(url);
// var res = JsonConvert.DeserializeObject<ApiResponse<UserDepartment[]>>(data);
// //创建一个ListBoxIem
// if (res.Success)
// {
// if (res.Data != null && res.Data.Count() > 0)
// {
// foreach (var department in res.Data)
// {
// if (!departments.Contains(department.DePartmentName))
// {
// departments.Add(department.DePartmentName);
// }
// }
// }
// }
//}
//catch (Exception)
//{
}
//}
} }
@ -136,6 +134,8 @@ namespace BBWY.Client.Views.PackTask
List<string> shops = new List<string>(); List<string> shops = new List<string>();
private void tb_TextChanged(object sender, TextChangedEventArgs e) private void tb_TextChanged(object sender, TextChangedEventArgs e)
{ {
if (tipBox != null)
try try
{ {
var textBoxt = (TextBox)sender; var textBoxt = (TextBox)sender;
@ -149,6 +149,7 @@ namespace BBWY.Client.Views.PackTask
if (departments.Count <= 0) if (departments.Count <= 0)
{ {
if (QKApiHost.IsNullOrEmpty()) QKApiHost = "http://qiku.qiyue666.com";
HttpClientHelper helper = new HttpClientHelper(QKApiHost); HttpClientHelper helper = new HttpClientHelper(QKApiHost);
string url = $"{QKApiHost}/api/PackTask/GetAllDepartment";//获取所有数据 string url = $"{QKApiHost}/api/PackTask/GetAllDepartment";//获取所有数据

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

@ -132,7 +132,13 @@
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<StackPanel Grid.Column="12" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
<c:BButton Command="{Binding DataContext.DeletedTaskCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page}}}" CommandParameter="{Binding}"
Style="{StaticResource LinkButton}" Content="取消任务" Margin="0 5 0 5 "
Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=未到货|部分到货|待质检:Visible:Collapsed}"
/>
</StackPanel>
</Grid> </Grid>
<Grid Grid.Row="1"> <Grid Grid.Row="1">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@ -387,7 +393,7 @@
</StackPanel> </StackPanel>
<Grid Grid.Row="1" Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=未到货|部分到货|待质检|已取消:Collapsed:Visible}"> <Grid Grid.Row="1" Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=未到货|部分到货|待质检|已取消|商家自取:Collapsed:Visible}">
<Border Grid.Row="0" VerticalAlignment="Top" Height="1" Background="{StaticResource Border.Brush}"/> <Border Grid.Row="0" VerticalAlignment="Top" Height="1" Background="{StaticResource Border.Brush}"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"
@ -417,31 +423,25 @@
</Grid> </Grid>
<Grid Grid.Column="12" > <Grid Grid.Column="12" >
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"> <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<c:BButton HorizontalAlignment="Center" Style="{StaticResource LinkButton}" Height="20" Margin="10 0 0 0 " VerticalAlignment="Center" Grid.Row="1" Content="质检" <c:BButton HorizontalAlignment="Center" Style="{StaticResource LinkButton}" Height="20" Margin="0 5 0 5 " VerticalAlignment="Center" Grid.Row="1" Content="质检"
Command="{Binding QualityTaskCommand}" Command="{Binding QualityTaskCommand}"
Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待质检:Visible:Collapsed}" Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待质检:Visible:Collapsed}"
/> />
<c:BButton Grid.Column="11" HorizontalAlignment="Stretch" Style="{StaticResource LinkButton}" VerticalAlignment="Center" Content="完成" <c:BButton Grid.Column="11" HorizontalAlignment="Stretch" Style="{StaticResource LinkButton}" Margin="0 5 0 5 " VerticalAlignment="Center" Content="完成"
CommandParameter="{Binding}" CommandParameter="{Binding}"
Command="{Binding DataContext.UpdateTaskStateCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page}}}" Command="{Binding DataContext.UpdateTaskStateCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page}}}"
Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待打包:Visible:Collapsed}" Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待打包:Visible:Collapsed}"
> />
<!--<b:Interaction.Triggers>
<b:EventTrigger EventName="PreviewMouseLeftButtonDown">
<b:InvokeCommandAction Command="{Binding DataContext.UpdateTaskStateCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page}}}"> <c:BButton HorizontalAlignment="Center" Style="{StaticResource LinkButton}" Height="20" Margin="0 5 0 5 " VerticalAlignment="Center" Grid.Row="1" Content="商家自取"
<b:InvokeCommandAction.CommandParameter> CommandParameter="{Binding}"
<MultiBinding Converter="{StaticResource mptConverter}"> Command="{Binding DataContext.StoreGetBySelfCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page}}}"
<Binding Path="TaskId" /> Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待质检|待打包:Visible:Collapsed}"
<Binding Path="TaskState"/> />
</MultiBinding>
</b:InvokeCommandAction.CommandParameter>
</b:InvokeCommandAction>
</b:EventTrigger>
</b:Interaction.Triggers>-->
</c:BButton>
<c:BButton Grid.Column="11" HorizontalAlignment="Stretch" Style="{StaticResource LinkButton}" VerticalAlignment="Center" Content="完成" <c:BButton Grid.Column="11" HorizontalAlignment="Stretch" Style="{StaticResource LinkButton}" Margin="0 5 0 5 " VerticalAlignment="Center" Content="完成"
Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待出库:Visible:Collapsed}" Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待出库:Visible:Collapsed}"
> >
<b:Interaction.Triggers> <b:Interaction.Triggers>
@ -457,7 +457,7 @@
</b:EventTrigger> </b:EventTrigger>
</b:Interaction.Triggers> </b:Interaction.Triggers>
</c:BButton> </c:BButton>
<Grid <Grid Margin="0 5 0 5 "
Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=未到货|部分到货:Visible:Collapsed}" Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=未到货|部分到货:Visible:Collapsed}"
> >

4
BBWY.Client/Views/QualityTask/QualityWindow.xaml

@ -139,9 +139,9 @@
<StackPanel Orientation="Horizontal" Margin="10 0 0 0" Height="30"> <StackPanel Orientation="Horizontal" Margin="10 0 0 0" Height="30">
<TextBlock Text="预计完成时间: " VerticalAlignment="Center" /> <TextBlock Text="预计完成时间: " VerticalAlignment="Center" />
<Border BorderBrush="{StaticResource Border.Brush}" Height="30" BorderThickness="1"> <Border BorderBrush="{StaticResource Border.Brush}" Height="30" BorderThickness="1">
<hc:ComboBox BorderThickness="0" ItemsSource="{Binding PreCompeteTimeDayList}" SelectedIndex="0" Text="{Binding PreCompeteTimeDay}"> <ComboBox BorderThickness="0" ItemsSource="{Binding PreCompeteTimeDayList,Mode=TwoWay}" SelectedIndex="0" Text="{Binding PreCompeteTimeDay,Mode=TwoWay}">
</hc:ComboBox> </ComboBox>
</Border> </Border>
<Border BorderBrush="{StaticResource Border.Brush}" Height="30" Margin="10 0 0 0" BorderThickness="1"> <Border BorderBrush="{StaticResource Border.Brush}" Height="30" Margin="10 0 0 0" BorderThickness="1">
<hc:ComboBox BorderThickness="0" ItemsSource="{Binding PreCompeteTimeHourList}" SelectedIndex="0" Text="{Binding PreCompeteTimeHour}"> <hc:ComboBox BorderThickness="0" ItemsSource="{Binding PreCompeteTimeHourList}" SelectedIndex="0" Text="{Binding PreCompeteTimeHour}">

Loading…
Cancel
Save