28 changed files with 1273 additions and 319 deletions
@ -0,0 +1,32 @@ |
|||||
|
using BBWY.Client.Models.APIModel.Response.PackTask; |
||||
|
using BBWY.Common.Http; |
||||
|
using BBWY.Common.Models; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Net.Http; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace BBWY.Client.APIServices |
||||
|
{ |
||||
|
public class PackDetailService : BaseApiService, IDenpendency |
||||
|
{ |
||||
|
public PackDetailService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext) |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
public ApiResponse<PackServiceResponse> GetTaskService(long TaskId) |
||||
|
{ |
||||
|
return SendRequest<PackServiceResponse>(globalContext.QKApiHost, $"api/PackDetail/GetTaskService?taskId={TaskId}", |
||||
|
null |
||||
|
, null, HttpMethod.Get); |
||||
|
} |
||||
|
|
||||
|
public ApiResponse<object> UploadService(UploadServiceRequest consumable) |
||||
|
{ |
||||
|
return SendRequest<object>(globalContext.QKApiHost, "api/PackDetail/UploadService", |
||||
|
consumable |
||||
|
, null, HttpMethod.Post); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,49 @@ |
|||||
|
using BBWY.Client.Models.APIModel.Response.PackTask; |
||||
|
using BBWY.Client.Models.PackTask; |
||||
|
using BBWY.Common.Http; |
||||
|
using BBWY.Common.Models; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Net.Http; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace BBWY.Client.APIServices |
||||
|
{ |
||||
|
public class PackServiceService : BaseApiService,IDenpendency |
||||
|
{ |
||||
|
public PackServiceService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext) |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
public ApiResponse<PackServiceDTO[]> SearchAll() |
||||
|
{ |
||||
|
return SendRequest<PackServiceDTO[]>(globalContext.QKApiHost, "api/PackService/SearchAll", |
||||
|
null |
||||
|
, null, HttpMethod.Get); |
||||
|
} |
||||
|
|
||||
|
public ApiResponse<object> Add(PackServiceDTO consumable) |
||||
|
{ |
||||
|
return SendRequest<object>(globalContext.QKApiHost, "api/PackService/Add", |
||||
|
consumable |
||||
|
, null, HttpMethod.Post); |
||||
|
} |
||||
|
public ApiResponse<object> Edit(PackServiceDTO consumable) |
||||
|
{ |
||||
|
return SendRequest<object>(globalContext.QKApiHost, "api/PackService/Edit", |
||||
|
consumable |
||||
|
, null, HttpMethod.Post); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public ApiResponse<object> Deleted(long id) |
||||
|
{ |
||||
|
return SendRequest<object>(globalContext.QKApiHost, "api/PackService/Deleted", |
||||
|
new |
||||
|
{ |
||||
|
id = id |
||||
|
} |
||||
|
, null, HttpMethod.Get); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace BBWY.Client.Models.APIModel.Response.PackTask |
||||
|
{ |
||||
|
public class PackServiceRequest |
||||
|
{ |
||||
|
public long Id { get; set; } |
||||
|
public string Name { get; set; } |
||||
|
public decimal Price { get; set; } |
||||
|
|
||||
|
public ServiceType ServiceType { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,81 @@ |
|||||
|
using BBWY.Client.ViewModels; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace BBWY.Client.Models.PackTask |
||||
|
{ |
||||
|
public class ShopTotal :NotifyObject |
||||
|
{ |
||||
|
private long id; |
||||
|
public long Id { get => id; set { Set(ref id, value); } } |
||||
|
|
||||
|
private bool taskChecked; |
||||
|
public bool TaskChecked { get => taskChecked; set { Set(ref taskChecked, value); } } |
||||
|
|
||||
|
|
||||
|
|
||||
|
public long TaskId { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 需求方创建日期
|
||||
|
/// </summary>
|
||||
|
public DateTime CreateTime { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 是否结清
|
||||
|
/// </summary>
|
||||
|
//
|
||||
|
public Settle IsSettle { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 部门
|
||||
|
/// </summary>
|
||||
|
public string DepartmentName { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 店铺
|
||||
|
/// </summary>
|
||||
|
public string ShopName { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 对接人
|
||||
|
/// </summary>
|
||||
|
public string AcceptUserName { get; set; } |
||||
|
/// <summary>
|
||||
|
/// sku
|
||||
|
/// </summary>
|
||||
|
public string SkuName { get; set; } |
||||
|
/// <summary>
|
||||
|
/// sku数量(任务数量)
|
||||
|
/// </summary>
|
||||
|
public int SkuCount { get; set; } |
||||
|
|
||||
|
public decimal IncreaseFees { get; set; } |
||||
|
|
||||
|
public decimal PackFees { get; set; } |
||||
|
|
||||
|
public decimal ConsumableFees { get; set; } |
||||
|
|
||||
|
public decimal Price { get; set; } |
||||
|
|
||||
|
public decimal Discount { get; set; } |
||||
|
|
||||
|
public decimal DiscountPrice { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 注意事项(对接备注)
|
||||
|
/// </summary>
|
||||
|
public string MarkMessage { get; set; } |
||||
|
|
||||
|
public override string ToString() |
||||
|
{ |
||||
|
return $"{TaskId},{CreateTime.ToString("yyyy-MM-dd")},{IsSettle},{DepartmentName},{ShopName}" + |
||||
|
$",{AcceptUserName},{SkuName},{SkuCount},{IncreaseFees},{PackFees},{ConsumableFees},{Price},{Discount},{DiscountPrice},{MarkMessage}"; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public class ShopTotalResponse |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
public int TotalCount { get; set; } |
||||
|
|
||||
|
public ShopTotal[] ShopTotals { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,246 @@ |
|||||
|
using AutoMapper.Internal; |
||||
|
using BBWY.Client.APIServices; |
||||
|
using BBWY.Client.Helpers; |
||||
|
using BBWY.Client.Models; |
||||
|
using BBWY.Client.Models.PackTask; |
||||
|
using BBWY.Client.Views.Order; |
||||
|
using BBWY.Client.Views.PackTask; |
||||
|
using BBWY.Common.Models; |
||||
|
using BBWY.Controls; |
||||
|
using GalaSoft.MvvmLight.Command; |
||||
|
using Microsoft.Win32; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Collections.ObjectModel; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
using System.Windows; |
||||
|
using System.Windows.Input; |
||||
|
|
||||
|
namespace BBWY.Client.ViewModels.PackTask |
||||
|
{ |
||||
|
public class PackTaskTotalViewModel : BaseVM, IDenpendency |
||||
|
{ |
||||
|
private readonly PackTaskService packTaskService; |
||||
|
|
||||
|
private bool isLoading; |
||||
|
private DateTime startDate; |
||||
|
private DateTime endDate; |
||||
|
private int pageIndex = 1; |
||||
|
private int pageSize = 15; |
||||
|
private int orderCount; |
||||
|
private string searchTaskId; |
||||
|
private string searchDepartment; |
||||
|
private string searchShopName; |
||||
|
private string searchSkuId; |
||||
|
private ObservableCollection<ShopTotal> packTaskTotalList; |
||||
|
private bool isBatchChecked; |
||||
|
|
||||
|
public bool IsBatchChecked { get => isBatchChecked; set { Set(ref isBatchChecked, value); } } |
||||
|
public ObservableCollection<ShopTotal> PackTaskTotalList { get => packTaskTotalList; set { Set(ref packTaskTotalList, value); } } |
||||
|
public string SearchSkuId { get => searchSkuId; set { Set(ref searchSkuId, value); } } |
||||
|
public string SearchShopName { get => searchShopName; set { Set(ref searchShopName, value); } } |
||||
|
public string SearchDepartment { get => searchDepartment; set { Set(ref searchDepartment, value); } } |
||||
|
public string SearchTaskId { get => searchTaskId; set { Set(ref searchTaskId, value); } } |
||||
|
|
||||
|
public bool IsLoading { get => isLoading; set { Set(ref isLoading, value); } } |
||||
|
|
||||
|
|
||||
|
public DateTime StartDate { get => startDate; set { Set(ref startDate, value); } } |
||||
|
|
||||
|
public DateTime EndDate { get => endDate; set { Set(ref endDate, value); } } |
||||
|
|
||||
|
public int PageIndex { get => pageIndex; set { Set(ref pageIndex, value); } } |
||||
|
|
||||
|
public int PageSize { get => pageSize; set { Set(ref pageSize, value); } } |
||||
|
|
||||
|
public int OrderCount { get => orderCount; set { Set(ref orderCount, value); } } |
||||
|
|
||||
|
|
||||
|
public ICommand SetSearchDateCommand { get; set; } |
||||
|
|
||||
|
public ICommand SearchTaskTotalCommand { get; set; } |
||||
|
|
||||
|
public ICommand ExportCommand { get; set; } |
||||
|
|
||||
|
public ICommand BatchSettleCommand { get; set; } |
||||
|
|
||||
|
public ICommand SettleCommand { get; set; } |
||||
|
|
||||
|
public ICommand OrderPageIndexChangedCommand { get; set; } |
||||
|
|
||||
|
public ICommand BatchCheckedCommand { get; set; } |
||||
|
|
||||
|
public ICommand CopyTextCommand { get; set; } |
||||
|
|
||||
|
public PackTaskTotalViewModel(PackTaskService packTaskService) |
||||
|
{ |
||||
|
this.packTaskService = packTaskService; |
||||
|
EndDate = DateTime.Now; |
||||
|
StartDate = DateTime.Now.Date; |
||||
|
|
||||
|
SearchTaskTotalCommand = new RelayCommand(SearchTaskTotal); |
||||
|
|
||||
|
|
||||
|
SetSearchDateCommand = new RelayCommand<int>(d => |
||||
|
{ |
||||
|
EndDate = d == 1 ? DateTime.Now.Date.AddDays(-1) : DateTime.Now; |
||||
|
StartDate = DateTime.Now.Date.AddDays(d * -1); |
||||
|
PageIndex = 1; |
||||
|
Task.Factory.StartNew(() => LoadOrder(1)); //点击日期查询订单
|
||||
|
}); |
||||
|
|
||||
|
OrderPageIndexChangedCommand = new RelayCommand<PageArgs>(p => |
||||
|
{ |
||||
|
LoadOrder(p.PageIndex); |
||||
|
}); |
||||
|
|
||||
|
BatchCheckedCommand = new RelayCommand(BatchCheck); |
||||
|
CopyTextCommand = new RelayCommand<object>((obj) => |
||||
|
{ |
||||
|
try |
||||
|
{ |
||||
|
Clipboard.SetText(obj.ToString()); |
||||
|
} |
||||
|
catch (Exception ex) |
||||
|
{ |
||||
|
Console.ForegroundColor = ConsoleColor.Red; |
||||
|
Console.WriteLine(ex); |
||||
|
Console.ResetColor(); |
||||
|
} |
||||
|
}); |
||||
|
BatchSettleCommand = new RelayCommand(BatchSettle); |
||||
|
SettleCommand = new RelayCommand<long>(SettleTask); |
||||
|
ExportCommand = new RelayCommand(Export); |
||||
|
|
||||
|
SearchTaskTotal(); |
||||
|
} |
||||
|
|
||||
|
private void Export() |
||||
|
{ |
||||
|
|
||||
|
SaveFileDialog save = new SaveFileDialog(); |
||||
|
save.Filter = "csv files(*.csv)|*.csv"; |
||||
|
var result = save.ShowDialog(); |
||||
|
if (result == null || !result.Value) |
||||
|
{ |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
string fileName = save.FileName; |
||||
|
|
||||
|
Task.Factory.StartNew(() => |
||||
|
{ |
||||
|
IsLoading = true; |
||||
|
var res = packTaskService.ShopTotal(SearchSkuId, SearchTaskId, StartDate, EndDate, SearchShopName, |
||||
|
SearchDepartment, 0, 0);//获取全部数据
|
||||
|
if (res.Success) |
||||
|
{ |
||||
|
string title = "任务ID,日期,是否结清,部门,店铺,对接人,sku名称,sku数量,增值服务,打包服务,耗材服务,原价,促销折扣,结算价格,对接备注"; |
||||
|
var excelList = res.Data.ShopTotals.Select(x => x.ToString()).ToList(); |
||||
|
excelList.Insert(0, title); |
||||
|
System.IO.File.WriteAllLines(fileName, excelList, Encoding.UTF8); |
||||
|
} |
||||
|
IsLoading = false; |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
private void BatchCheck() |
||||
|
{ |
||||
|
|
||||
|
if (PackTaskTotalList.Count > 0) |
||||
|
App.Current.Dispatcher.Invoke(() => |
||||
|
{ |
||||
|
PackTaskTotalList.ForAll(s => |
||||
|
{ |
||||
|
|
||||
|
s.TaskChecked = IsBatchChecked; |
||||
|
}); |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
private void SettleTask(long obj) |
||||
|
{ |
||||
|
MessageBoxResult result = MessageBox.Show($"是否结清任务:{obj} ?", "提示", |
||||
|
MessageBoxButton.YesNo, |
||||
|
MessageBoxImage.Warning); |
||||
|
if (result != MessageBoxResult.Yes) return; |
||||
|
SettlePackTask(obj); |
||||
|
} |
||||
|
|
||||
|
private void BatchSettle() |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
var ids = PackTaskTotalList.Where(p => p.TaskChecked).Select(p => p.TaskId).ToArray(); |
||||
|
if (ids.Length <= 0) |
||||
|
return; |
||||
|
MessageBoxResult result = MessageBox.Show("是否批量结清?", "提示", |
||||
|
MessageBoxButton.YesNo, |
||||
|
MessageBoxImage.Warning); |
||||
|
if (result != MessageBoxResult.Yes) return; |
||||
|
SettlePackTask(ids); |
||||
|
} |
||||
|
private void SettlePackTask(params long[] ids) |
||||
|
{ |
||||
|
Task.Factory.StartNew(() => |
||||
|
{ |
||||
|
IsLoading = true; |
||||
|
var res = packTaskService.BatchSettle(ids); |
||||
|
if (res.Success) |
||||
|
{ |
||||
|
SearchTaskTotal(); |
||||
|
} |
||||
|
IsLoading = false; |
||||
|
}); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
private void SearchTaskTotal() |
||||
|
{ |
||||
|
if (IsBatchChecked) |
||||
|
{ |
||||
|
BatchCheck(); |
||||
|
} |
||||
|
PackTaskTotalList = new ObservableCollection<ShopTotal>(); |
||||
|
Task.Factory.StartNew(() => |
||||
|
{ |
||||
|
IsLoading = true; |
||||
|
var res = packTaskService.ShopTotal(SearchSkuId, SearchTaskId, StartDate, EndDate, SearchShopName, |
||||
|
SearchDepartment, PageIndex, PageSize); |
||||
|
if (res != null && res.Success) |
||||
|
{ |
||||
|
OrderCount = res.Data.TotalCount; |
||||
|
foreach (var shopTotal in res.Data.ShopTotals) |
||||
|
{ |
||||
|
App.Current.Dispatcher.Invoke(() => |
||||
|
{ |
||||
|
PackTaskTotalList.Add(shopTotal); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
IsLoading = false; |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
private void LoadOrder(int pageIndex) |
||||
|
{ |
||||
|
SearchTask(pageIndex); |
||||
|
} |
||||
|
|
||||
|
private void SearchTask(int pageIndex) |
||||
|
{ |
||||
|
PageIndex = pageIndex; |
||||
|
SearchTaskTotal(); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,329 @@ |
|||||
|
<Page x:Class="BBWY.Client.Views.PackTask.PackTaskTotal" |
||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
||||
|
xmlns:local="clr-namespace:BBWY.Client.Views.PackTask" |
||||
|
mc:Ignorable="d" |
||||
|
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
||||
|
DataContext="{Binding PackTaskTotal,Source={StaticResource Locator}}" |
||||
|
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
||||
|
Background="White" |
||||
|
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
||||
|
d:DesignHeight="450" d:DesignWidth="2048" |
||||
|
Title="OrderList"> |
||||
|
<Page.Resources> |
||||
|
|
||||
|
<sys:Int32 x:Key="d0">0</sys:Int32> |
||||
|
<sys:Int32 x:Key="d1">1</sys:Int32> |
||||
|
<sys:Int32 x:Key="d3">2</sys:Int32> |
||||
|
<sys:Int32 x:Key="d7">6</sys:Int32> |
||||
|
<sys:Int32 x:Key="d15">14</sys:Int32> |
||||
|
<sys:Int32 x:Key="d30">29</sys:Int32> |
||||
|
|
||||
|
</Page.Resources> |
||||
|
<Grid> |
||||
|
<c:RoundWaitProgress Play="{Binding IsLoading}" Panel.ZIndex="999"/> |
||||
|
<Grid Margin="5,0"> |
||||
|
<Grid.RowDefinitions> |
||||
|
<RowDefinition Height="90"/> |
||||
|
<RowDefinition Height="30"/> |
||||
|
<RowDefinition/> |
||||
|
<RowDefinition Height="30"/> |
||||
|
</Grid.RowDefinitions> |
||||
|
|
||||
|
<Grid Background="{StaticResource Border.Background}" HorizontalAlignment="Left" Height="75" Panel.ZIndex="999"> |
||||
|
<Grid.ColumnDefinitions> |
||||
|
<ColumnDefinition/> |
||||
|
<ColumnDefinition Width="auto"/> |
||||
|
</Grid.ColumnDefinitions> |
||||
|
<Grid.RowDefinitions> |
||||
|
<RowDefinition Height="0.5*"/> |
||||
|
<RowDefinition Height="5"/> |
||||
|
<RowDefinition Height="0.5*"/> |
||||
|
</Grid.RowDefinitions> |
||||
|
<StackPanel Orientation="Horizontal" Margin="0,5,0,0" Height="30"> |
||||
|
<StackPanel.Resources> |
||||
|
<Style TargetType="DatePickerTextBox"> |
||||
|
<Setter Property="IsReadOnly" Value="True"/> |
||||
|
</Style> |
||||
|
</StackPanel.Resources> |
||||
|
<TextBlock Text="下单时间" VerticalAlignment="Center" Margin="5,0,0,0"/> |
||||
|
<DatePicker SelectedDate="{Binding StartDate}" Width="133.5" Height="30" VerticalContentAlignment="Center" FocusVisualStyle="{x:Null}" Margin="5,0,0,0"/> |
||||
|
<DatePicker SelectedDate="{Binding EndDate}" Width="133.5" Height="30" VerticalContentAlignment="Center" FocusVisualStyle="{x:Null}" Margin="5,0,0,0"/> |
||||
|
<TextBlock Text="任务ID:" Width="40" VerticalAlignment="Center" Margin="5,0,0,0"/> |
||||
|
<c:BTextBox Width="150" Margin="5,0,0,0" Text="{Binding SearchTaskId}" WaterRemark="精确匹配"/> |
||||
|
<TextBlock Text="部门:" VerticalAlignment="Center" Margin="5,0,0,0"/> |
||||
|
<c:BTextBox Width="150" Margin="5,0,0,0" WaterRemark="精确匹配" Text="{Binding SearchDepartment}"/> |
||||
|
<TextBlock Text="店铺:" VerticalAlignment="Center" Margin="5,0,0,0"/> |
||||
|
<c:BTextBox Width="150" Margin="5,0,0,0" Text="{Binding SearchShopName}" WaterRemark="精确匹配"/> |
||||
|
</StackPanel> |
||||
|
<StackPanel Orientation="Horizontal" Grid.Row="2" Margin="0,0,0,5" Height="30"> |
||||
|
<c:BButton Content="今天" Width="50" Height="25" Margin="5,0,0,0" |
||||
|
Command="{Binding SetSearchDateCommand}" |
||||
|
CommandParameter="{StaticResource d0}"/> |
||||
|
<c:BButton Content="昨天" Width="50" Height="25" Margin="5,0,0,0" |
||||
|
Command="{Binding SetSearchDateCommand}" |
||||
|
CommandParameter="{StaticResource d1}"/> |
||||
|
<c:BButton Content="近3天" Width="50" Height="25" Margin="5,0,0,0" |
||||
|
Command="{Binding SetSearchDateCommand}" |
||||
|
CommandParameter="{StaticResource d3}"/> |
||||
|
<c:BButton Content="近7天" Width="50" Height="24" Margin="5,0,0,0" |
||||
|
Command="{Binding SetSearchDateCommand}" |
||||
|
CommandParameter="{StaticResource d7}"/> |
||||
|
<c:BButton Content="近15天" Width="50" Height="25" Margin="5,0,0,0" |
||||
|
Command="{Binding SetSearchDateCommand}" |
||||
|
CommandParameter="{StaticResource d15}"/> |
||||
|
<c:BButton Content="近30天" Width="50" Height="25" Margin="5,0,0,0" |
||||
|
Command="{Binding SetSearchDateCommand}" |
||||
|
CommandParameter="{StaticResource d30}"/> |
||||
|
<TextBlock Width="40" Text=" SKU:" VerticalAlignment="Center" Margin="5,0,0,0" |
||||
|
/> |
||||
|
<c:BTextBox Width="150" Margin="5,0,0,0" Text="{Binding SearchSkuId}" |
||||
|
/> |
||||
|
</StackPanel> |
||||
|
|
||||
|
<Grid Grid.Column="1" Grid.RowSpan="3"> |
||||
|
<Grid.ColumnDefinitions> |
||||
|
<ColumnDefinition/> |
||||
|
<ColumnDefinition/> |
||||
|
</Grid.ColumnDefinitions> |
||||
|
<Grid.RowDefinitions> |
||||
|
<RowDefinition/> |
||||
|
<RowDefinition/> |
||||
|
</Grid.RowDefinitions> |
||||
|
<Button Content="搜索" Width="50" VerticalAlignment="Stretch" Margin="5,0,0,0" Command="{Binding SearchTaskTotalCommand}" |
||||
|
Grid.RowSpan="2" Background="#8080ff" BorderThickness="0" Foreground="White"/> |
||||
|
<Button Grid.RowSpan="2" Content="导出" Command="{Binding ExportCommand}" Width="50" Grid.Column="1" |
||||
|
Background="#02a7f0" BorderThickness="0" Foreground="White"/> |
||||
|
|
||||
|
</Grid> |
||||
|
</Grid> |
||||
|
|
||||
|
<Grid Grid.Row="1" HorizontalAlignment="Left"> |
||||
|
<Button Content="批量结清" Width="100" VerticalAlignment="Stretch" Command="{Binding BatchSettleCommand}" |
||||
|
Grid.RowSpan="2" Background="#8080ff" BorderThickness="0" Foreground="White"/> |
||||
|
</Grid> |
||||
|
|
||||
|
<Grid Grid.Row="2" Margin="0 5 0 0"> |
||||
|
<Grid> |
||||
|
<Grid.RowDefinitions> |
||||
|
<RowDefinition Height="30"/> |
||||
|
<RowDefinition/> |
||||
|
</Grid.RowDefinitions> |
||||
|
<Grid.ColumnDefinitions> |
||||
|
<ColumnDefinition Width="30"/> |
||||
|
<ColumnDefinition Width="60"/> |
||||
|
<ColumnDefinition Width="80"/> |
||||
|
<ColumnDefinition Width="50"/> |
||||
|
<ColumnDefinition Width="130"/> |
||||
|
<ColumnDefinition Width="130"/> |
||||
|
<ColumnDefinition Width="80"/> |
||||
|
<ColumnDefinition MinWidth="80"/> |
||||
|
<ColumnDefinition Width="60"/> |
||||
|
<ColumnDefinition Width="60"/> |
||||
|
<ColumnDefinition Width="60"/> |
||||
|
<ColumnDefinition Width="60"/> |
||||
|
<ColumnDefinition Width="60"/> |
||||
|
<ColumnDefinition Width="60"/> |
||||
|
<ColumnDefinition Width="60"/> |
||||
|
<ColumnDefinition MinWidth="100"/> |
||||
|
<ColumnDefinition Width="60"/> |
||||
|
</Grid.ColumnDefinitions> |
||||
|
<CheckBox HorizontalAlignment="Center" IsChecked="{Binding IsBatchChecked,Mode=TwoWay}" Command="{Binding BatchCheckedCommand}" HorizontalContentAlignment="Center" Grid.Column="0"/> |
||||
|
<TextBlock Text="任务ID" Grid.Column="1" Style="{StaticResource middleTextBlock}"/> |
||||
|
<TextBlock Text="日期" Grid.Column="2" Style="{StaticResource middleTextBlock}"/> |
||||
|
<TextBlock Text="状态" Grid.Column="3" Style="{StaticResource middleTextBlock}"/> |
||||
|
<TextBlock Text="部门" Grid.Column="4" Style="{StaticResource middleTextBlock}"/> |
||||
|
<TextBlock Text="店铺名" Grid.Column="5" Style="{StaticResource middleTextBlock}"/> |
||||
|
<TextBlock Text="对接人员" Grid.Column="6" Style="{StaticResource middleTextBlock}"/> |
||||
|
<TextBlock Text="采购SKU名称" Grid.Column="7" Style="{StaticResource middleTextBlock}"/> |
||||
|
<TextBlock Text="SKU数量" Grid.Column="8" Style="{StaticResource middleTextBlock}"/> |
||||
|
<TextBlock Text="增值服务" Grid.Column="9" Style="{StaticResource middleTextBlock}"/> |
||||
|
<TextBlock Text="打包服务" Grid.Column="10" Style="{StaticResource middleTextBlock}"/> |
||||
|
<TextBlock Text="耗材服务" Grid.Column="11" Style="{StaticResource middleTextBlock}"/> |
||||
|
<TextBlock Text="原始金额" Grid.Column="12" Style="{StaticResource middleTextBlock}"/> |
||||
|
<TextBlock Text="促销折扣" Grid.Column="13" Style="{StaticResource middleTextBlock}"/> |
||||
|
<TextBlock Text="结算金额" Grid.Column="14" Style="{StaticResource middleTextBlock}"/> |
||||
|
<TextBlock Text="注意事项/对接备注" Grid.Column="15" Style="{StaticResource middleTextBlock}"/> |
||||
|
<TextBlock Text="操作" Grid.Column="16" Style="{StaticResource middleTextBlock}"/> |
||||
|
|
||||
|
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="1"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="2"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="3"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="4"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="5"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="6"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="7"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="8"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="9"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="10"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="11"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="12"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="13"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="14"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="15"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="16"/> |
||||
|
<Border Height="1" VerticalAlignment="Top" Grid.ColumnSpan="17" Background="{StaticResource Border.Brush}" Grid.Row="0"/> |
||||
|
|
||||
|
<ListBox x:Name="listbox_order" |
||||
|
Grid.Row="1" Grid.ColumnSpan="17" |
||||
|
ItemsSource="{Binding PackTaskTotalList}" |
||||
|
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
||||
|
BorderBrush="{StaticResource Border.Brush}" |
||||
|
BorderThickness="1,1,1,0" |
||||
|
Foreground="{StaticResource Text.Color}"> |
||||
|
<ListBox.ItemTemplate> |
||||
|
<DataTemplate> |
||||
|
<Grid Width="{Binding ActualWidth,ElementName=listbox_order,Converter={StaticResource widthConverter},ConverterParameter=-0}" |
||||
|
MinHeight="40"> |
||||
|
<Grid > |
||||
|
<Grid.ColumnDefinitions> |
||||
|
<ColumnDefinition Width="30"/> |
||||
|
<ColumnDefinition Width="60"/> |
||||
|
<ColumnDefinition Width="80"/> |
||||
|
<ColumnDefinition Width="50"/> |
||||
|
<ColumnDefinition Width="130"/> |
||||
|
<ColumnDefinition Width="130"/> |
||||
|
<ColumnDefinition Width="80"/> |
||||
|
<ColumnDefinition MinWidth="80"/> |
||||
|
<ColumnDefinition Width="60"/> |
||||
|
<ColumnDefinition Width="60"/> |
||||
|
<ColumnDefinition Width="60"/> |
||||
|
<ColumnDefinition Width="60"/> |
||||
|
<ColumnDefinition Width="60"/> |
||||
|
<ColumnDefinition Width="60"/> |
||||
|
<ColumnDefinition Width="60"/> |
||||
|
<ColumnDefinition MinWidth="100"/> |
||||
|
<ColumnDefinition Width="60"/> |
||||
|
</Grid.ColumnDefinitions> |
||||
|
<Grid Margin="0 0 1 0"> |
||||
|
<CheckBox Grid.Column="8" IsChecked="{Binding TaskChecked,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Center" HorizontalContentAlignment="Center" /> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
||||
|
</Grid> |
||||
|
|
||||
|
<Grid Grid.Column="1" Margin="0 0 1 0" > |
||||
|
<c:BButton Content="{Binding TaskId}" Style="{StaticResource LinkButton}" HorizontalAlignment="Center" VerticalAlignment="Center" |
||||
|
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}" |
||||
|
CommandParameter="{Binding TaskId}" |
||||
|
Margin=" 5,0,0,0"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
||||
|
</Grid> |
||||
|
<Grid Grid.Column="2" Margin="0 0 1 0"> |
||||
|
<TextBlock Text="{Binding CreateTime,StringFormat=yyyy-MM-dd}" Style="{StaticResource middleTextBlock}"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
||||
|
</Grid> |
||||
|
<Grid Grid.Column="3" Margin="0 0 1 0"> |
||||
|
<TextBlock TextWrapping="Wrap" Text="{Binding IsSettle}" Foreground="{Binding IsSettle,Converter={StaticResource objConverter},ConverterParameter=未结算:#ec808d:#00aaaa}" Style="{StaticResource middleTextBlock}"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
||||
|
</Grid> |
||||
|
<Grid Grid.Column="4" Margin="0 0 1 0"> |
||||
|
<c:BButton Content="{Binding DepartmentName}" Style="{StaticResource LinkButton}" HorizontalAlignment="Center" VerticalAlignment="Center" |
||||
|
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}" |
||||
|
CommandParameter="{Binding DepartmentName}" |
||||
|
Margin=" 5,0,0,0"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
||||
|
</Grid> |
||||
|
<Grid Grid.Column="5" Margin="0 0 1 0"> |
||||
|
<c:BButton Content="{Binding ShopName}" Style="{StaticResource LinkButton}" HorizontalAlignment="Center" VerticalAlignment="Center" |
||||
|
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}" |
||||
|
CommandParameter="{Binding ShopName}" |
||||
|
Margin=" 5,0,0,0"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
||||
|
</Grid> |
||||
|
<Grid Grid.Column="6" Margin="0 0 1 0"> |
||||
|
<TextBlock Text="{Binding AcceptUserName}" TextWrapping="Wrap" Style="{StaticResource middleTextBlock}"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
||||
|
</Grid> |
||||
|
<Grid Grid.Column="7" Margin="0 0 1 0"> |
||||
|
<TextBlock Text="{Binding SkuName}" Style="{StaticResource middleTextBlock}" TextTrimming="CharacterEllipsis"> |
||||
|
<TextBlock.ToolTip> |
||||
|
<ToolTip Style="{StaticResource OrderCouponToolipStyle}"> |
||||
|
<TextBlock Text="{Binding SkuName}"/> |
||||
|
</ToolTip> |
||||
|
</TextBlock.ToolTip> |
||||
|
</TextBlock> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
||||
|
</Grid> |
||||
|
<Grid Grid.Column="8" Margin="0 0 1 0"> |
||||
|
<TextBlock Text="{Binding SkuCount}" Style="{StaticResource middleTextBlock}"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
||||
|
</Grid> |
||||
|
<Grid Grid.Column="9" Margin="0 0 1 0"> |
||||
|
<TextBlock Text="{Binding IncreaseFees,StringFormat=0.00}" Style="{StaticResource middleTextBlock}"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
||||
|
</Grid> |
||||
|
<Grid Grid.Column="10" Margin="0 0 1 0"> |
||||
|
<TextBlock Text="{Binding PackFees,StringFormat=0.00}" Style="{StaticResource middleTextBlock}"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
||||
|
</Grid> |
||||
|
<Grid Grid.Column="11" Margin="0 0 1 0" > |
||||
|
<TextBlock Text="{Binding ConsumableFees,StringFormat=0.00}" Style="{StaticResource middleTextBlock}"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
||||
|
</Grid> |
||||
|
<Grid Grid.Column="12" Margin="0 0 1 0"> |
||||
|
<TextBlock Text="{Binding Price,StringFormat=0.00}" Style="{StaticResource middleTextBlock}"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
||||
|
</Grid> |
||||
|
<Grid Grid.Column="13" Margin="0 0 1 0"> |
||||
|
<TextBlock Text="{Binding Discount,StringFormat=0.00}" Style="{StaticResource middleTextBlock}"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
||||
|
</Grid> |
||||
|
<Grid Grid.Column="14" Margin="0 0 1 0"> |
||||
|
<TextBlock Text="{Binding DiscountPrice,StringFormat=0.00}" Style="{StaticResource middleTextBlock}"/> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
||||
|
</Grid> |
||||
|
<Grid Grid.Column="15" Margin="0 0 1 0"> |
||||
|
<TextBlock Text="{Binding MarkMessage}" Style="{StaticResource middleTextBlock}" TextTrimming="CharacterEllipsis"> |
||||
|
<TextBlock.ToolTip> |
||||
|
<ToolTip Style="{StaticResource OrderCouponToolipStyle}"> |
||||
|
<TextBlock Text="{Binding MarkMessage}"/> |
||||
|
</ToolTip> |
||||
|
</TextBlock.ToolTip> |
||||
|
</TextBlock> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
||||
|
</Grid> |
||||
|
|
||||
|
<Grid Grid.Column="16" Margin="0 0 1 0"> |
||||
|
<c:BButton HorizontalAlignment="Center" Height="20" VerticalAlignment="Center" Background="Transparent" Foreground="#02a7f0" Grid.Row="1" Content="结清" |
||||
|
Command="{Binding DataContext.SettleCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}" |
||||
|
CommandParameter="{Binding TaskId}" |
||||
|
Visibility="Visible" /> |
||||
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/> |
||||
|
</Grid> |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
</Grid> |
||||
|
<Border Grid.Row="1" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/> |
||||
|
</Grid> |
||||
|
|
||||
|
</DataTemplate> |
||||
|
</ListBox.ItemTemplate> |
||||
|
</ListBox> |
||||
|
|
||||
|
|
||||
|
|
||||
|
</Grid> |
||||
|
|
||||
|
|
||||
|
</Grid> |
||||
|
|
||||
|
|
||||
|
<c:PageControl PageIndex="{Binding PageIndex}" |
||||
|
PageSize="{Binding PageSize}" |
||||
|
RecordCount="{Binding OrderCount}" |
||||
|
Grid.Row="3" |
||||
|
HorizontalAlignment="Left"> |
||||
|
<b:Interaction.Triggers> |
||||
|
<b:EventTrigger EventName="OnPageIndexChanged"> |
||||
|
<b:InvokeCommandAction Command="{Binding OrderPageIndexChangedCommand}" PassEventArgsToCommand="True"/> |
||||
|
</b:EventTrigger> |
||||
|
</b:Interaction.Triggers> |
||||
|
</c:PageControl> |
||||
|
</Grid> |
||||
|
</Grid> |
||||
|
</Page> |
@ -0,0 +1,26 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Text; |
||||
|
using System.Windows; |
||||
|
using System.Windows.Controls; |
||||
|
using System.Windows.Data; |
||||
|
using System.Windows.Documents; |
||||
|
using System.Windows.Input; |
||||
|
using System.Windows.Media; |
||||
|
using System.Windows.Media.Imaging; |
||||
|
using System.Windows.Navigation; |
||||
|
using System.Windows.Shapes; |
||||
|
|
||||
|
namespace BBWY.Client.Views.PackTask |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// PackTaskTotal.xaml 的交互逻辑
|
||||
|
/// </summary>
|
||||
|
public partial class PackTaskTotal : Page |
||||
|
{ |
||||
|
public PackTaskTotal() |
||||
|
{ |
||||
|
InitializeComponent(); |
||||
|
} |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue