16 changed files with 697 additions and 26 deletions
@ -0,0 +1,40 @@ |
|||
using System; |
|||
|
|||
namespace BBWY.Client.Models |
|||
{ |
|||
/// <summary>
|
|||
/// 包含采购方案的Sku商品信息
|
|||
/// </summary>
|
|||
public class ProductSkuWithSchemeResponse |
|||
{ |
|||
public string Id { get; set; } |
|||
|
|||
public string ProductId { get; set; } |
|||
|
|||
public string SkuId { get; set; } |
|||
|
|||
public decimal Price { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Sku标题
|
|||
/// </summary>
|
|||
public string Title { get; set; } |
|||
|
|||
public string Logo { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 京东Sku状态【1:上架 2:下架 4:删除】
|
|||
/// </summary>
|
|||
public int State { get; set; } |
|||
|
|||
public DateTime? CreateTime { get; set; } |
|||
|
|||
public long PurchaseSchemeId { get; set; } |
|||
|
|||
public string PurchaserId { get; set; } |
|||
|
|||
public string PurchaseName { get; set; } |
|||
|
|||
public Platform? PurchasePlatform { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,49 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
|
|||
namespace BBWY.Client.Models |
|||
{ |
|||
public class ProductSkuWithScheme : NotifyObject |
|||
{ |
|||
private int quantity; |
|||
public string Id { get; set; } |
|||
|
|||
public string SkuId { get; set; } |
|||
|
|||
public string ProductId { get; set; } |
|||
|
|||
public decimal Price { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Sku标题
|
|||
/// </summary>
|
|||
public string Title { get; set; } |
|||
|
|||
public string Logo { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 京东Sku状态【1:上架 2:下架 4:删除】
|
|||
/// </summary>
|
|||
public int State { get; set; } |
|||
|
|||
public DateTime? CreateTime { get; set; } |
|||
|
|||
public long PurchaseSchemeId { get; set; } |
|||
|
|||
public string PurchaserId { get; set; } |
|||
|
|||
public string PurchaseName { get; set; } |
|||
|
|||
public Platform? PurchasePlatform { get; set; } |
|||
|
|||
public int Quantity { get => quantity; set { Set(ref quantity, value); } } |
|||
|
|||
public IList<PurchaseSchemeProductSku> PurchaseSchemeProductSkuList { get; set; } |
|||
|
|||
public ProductSkuWithScheme() |
|||
{ |
|||
PurchaseSchemeProductSkuList = new ObservableCollection<PurchaseSchemeProductSku>(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,10 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.ViewModels |
|||
{ |
|||
public class BatchPurchaseAddProductSkuViewModel : BaseVM |
|||
{ |
|||
} |
|||
} |
@ -0,0 +1,198 @@ |
|||
using BBWY.Client.APIServices; |
|||
using BBWY.Client.Models; |
|||
using BBWY.Client.Views.BatchPurchase; |
|||
using GalaSoft.MvvmLight.Command; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
using System.Threading.Tasks; |
|||
using System.Windows; |
|||
using System.Windows.Input; |
|||
|
|||
namespace BBWY.Client.ViewModels |
|||
{ |
|||
public class BatchPurchaseCreateNewOrderViewModel : BaseVM |
|||
{ |
|||
private PurchaseProductAPIService purchaseProductAPIService; |
|||
|
|||
private bool isLoading; |
|||
private decimal productAmount; |
|||
private decimal freightAmount; |
|||
private decimal totalAmount; |
|||
private string contactName; |
|||
private string address; |
|||
private string mobile; |
|||
private string province; |
|||
private string city; |
|||
private string county; |
|||
private string town; |
|||
private string prucahseRemark; |
|||
private PurchaseOrderMode purchaseOrderMode = PurchaseOrderMode.代发; |
|||
public bool IsLoading { get => isLoading; set { Set(ref isLoading, value); } } |
|||
|
|||
public decimal ProductAmount { get => productAmount; set { Set(ref productAmount, value); } } |
|||
public decimal FreightAmount { get => freightAmount; set { Set(ref freightAmount, value); } } |
|||
public decimal TotalAmount { get => totalAmount; set { Set(ref totalAmount, value); } } |
|||
public string ContactName { get => contactName; set { Set(ref contactName, value); } } |
|||
public string Address { get => address; set { Set(ref address, value); } } |
|||
public string Mobile { get => mobile; set { Set(ref mobile, value); } } |
|||
public string Province { get => province; set { Set(ref province, value); } } |
|||
public string City { get => city; set { Set(ref city, value); } } |
|||
public string County { get => county; set { Set(ref county, value); } } |
|||
public string Town { get => town; set { Set(ref town, value); } } |
|||
public string PrucahseRemark { get => prucahseRemark; set { Set(ref prucahseRemark, value); } } |
|||
|
|||
public PurchaseOrderMode PurchaseOrderMode |
|||
{ |
|||
get => purchaseOrderMode; set |
|||
{ |
|||
if (Set(ref purchaseOrderMode, value)) |
|||
OnDelayTriggerExecute(Guid.NewGuid().ToString()); |
|||
} |
|||
} |
|||
public IList<ProductSkuWithScheme> ProductSkuWithSchemeList { get; set; } |
|||
|
|||
|
|||
public ICommand FastCreateOrderCommand { get; set; } |
|||
public ICommand PreviewOrderCommand { get; set; } |
|||
public ICommand AddProductSkuCommand { get; set; } |
|||
|
|||
public BatchPurchaseCreateNewOrderViewModel(PurchaseProductAPIService purchaseProductAPIService) |
|||
{ |
|||
this.purchaseProductAPIService = purchaseProductAPIService; |
|||
ProductSkuWithSchemeList = new ObservableCollection<ProductSkuWithScheme>(); |
|||
|
|||
FastCreateOrderCommand = new RelayCommand(FastCreateOrder); |
|||
PreviewOrderCommand = new RelayCommand(PreviewOrder); |
|||
AddProductSkuCommand = new RelayCommand(AddProductSku); |
|||
} |
|||
|
|||
private void OnDelayTriggerExecute(string key) |
|||
{ |
|||
if (string.IsNullOrEmpty(key)) |
|||
{ |
|||
IsLoading = false; |
|||
return; |
|||
} |
|||
|
|||
if (string.IsNullOrEmpty(ContactName) || |
|||
string.IsNullOrEmpty(Address) || |
|||
string.IsNullOrEmpty(Mobile) || |
|||
string.IsNullOrEmpty(Province) || |
|||
string.IsNullOrEmpty(City) || |
|||
string.IsNullOrEmpty(County)) |
|||
{ |
|||
IsLoading = false; |
|||
MessageBox.Show("缺少完整的收货信息", "提示"); |
|||
return; |
|||
} |
|||
|
|||
//IsLoading = true;
|
|||
//Task.Factory.StartNew(() => purchaseOrderService.PreviewPurchaseOrder(new Consignee()
|
|||
//{
|
|||
// Address = Address,
|
|||
// City = City,
|
|||
// ContactName = ContactName,
|
|||
// County = County,
|
|||
// Mobile = Mobile,
|
|||
// Province = Province,
|
|||
// TelePhone = Mobile,
|
|||
// Town = Town
|
|||
//}, PurchaseSchemeProductSkuList, purchaseAccount.PurchasePlatformId, purchaseAccount, PurchaseOrderMode))
|
|||
// .ContinueWith(t =>
|
|||
// {
|
|||
// IsLoading = false;
|
|||
// var r = t.Result;
|
|||
// if (!r.Success)
|
|||
// {
|
|||
// ProductAmount = FreightAmount = TotalAmount = 0;
|
|||
// tradeMode = string.Empty;
|
|||
// App.Current.Dispatcher.Invoke(() => MessageBox.Show(r.Msg, "预览订单报价"));
|
|||
// return;
|
|||
// }
|
|||
// ProductAmount = r.Data.ProductAmount;
|
|||
// FreightAmount = r.Data.FreightAmount;
|
|||
// TotalAmount = r.Data.TotalAmount;
|
|||
// tradeMode = r.Data.OrderTradeType?.Code;
|
|||
// extensions = r.Data.Extensions;
|
|||
// });
|
|||
} |
|||
|
|||
private void PreviewOrder() |
|||
{ |
|||
OnDelayTriggerExecute(Guid.NewGuid().ToString()); |
|||
} |
|||
|
|||
private void FastCreateOrder() |
|||
{ |
|||
if (IsLoading) |
|||
return; |
|||
if (TotalAmount == 0) |
|||
{ |
|||
MessageBox.Show("总金额为0不能提交订单", "提示"); |
|||
return; |
|||
} |
|||
if (string.IsNullOrEmpty(Mobile) || |
|||
string.IsNullOrEmpty(Address) || |
|||
string.IsNullOrEmpty(City) || |
|||
string.IsNullOrEmpty(Province) || |
|||
string.IsNullOrEmpty(County) || |
|||
string.IsNullOrEmpty(Town) || |
|||
string.IsNullOrEmpty(ContactName)) |
|||
{ |
|||
MessageBox.Show("收货人信息不全", "下单"); |
|||
return; |
|||
} |
|||
|
|||
//IsLoading = true;
|
|||
//Task.Factory.StartNew(() => purchaseOrderService.FastCreateOrder(new Consignee()
|
|||
//{
|
|||
// Address = Address,
|
|||
// City = City,
|
|||
// ContactName = ContactName,
|
|||
// County = County,
|
|||
// Mobile = Mobile,
|
|||
// Province = Province,
|
|||
// TelePhone = Mobile,
|
|||
// Town = Town
|
|||
//}, PurchaseSchemeProductSkuList,
|
|||
// purchaseAccount.PurchasePlatformId,
|
|||
// purchaseAccount,
|
|||
// PurchaseOrderMode,
|
|||
// tradeMode,
|
|||
// PrucahseRemark,
|
|||
// order.Id,
|
|||
// globalContext.User.Shop.ShopId,
|
|||
// purchaseAccount.Id,
|
|||
// purchaseAccount.AccountName,
|
|||
// purchaseSchemeList[0].PurchaserName,
|
|||
// purchaser.Id,
|
|||
// globalContext.User.Shop.PlatformCommissionRatio ?? 0.05M,
|
|||
// extensions)).ContinueWith(t =>
|
|||
// {
|
|||
// IsLoading = false;
|
|||
// var r = t.Result;
|
|||
// if (!r.Success)
|
|||
// {
|
|||
// App.Current.Dispatcher.Invoke(() => MessageBox.Show(r.Msg, "下单"));
|
|||
// return;
|
|||
// }
|
|||
|
|||
// //刷新订单列表
|
|||
// orderListViewModel.RefreshOrder(order.Id);
|
|||
|
|||
// //关闭当前窗口
|
|||
// GalaSoft.MvvmLight.Messaging.Messenger.Default.Send<object>(null, "OnlinePurchase_Close");
|
|||
// });
|
|||
} |
|||
|
|||
private void AddProductSku() |
|||
{ |
|||
var addProductSkuWindow = new BatchPurchaseAddProductSku(); |
|||
if (addProductSkuWindow.ShowDialog() == true) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,149 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.BatchPurchase.BatchCreateNewPurchaseOrder" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|||
xmlns:local="clr-namespace:BBWY.Client.Views.BatchPurchase" |
|||
mc:Ignorable="d" |
|||
xmlns:cmodel="clr-namespace:BBWY.Client.Models" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
Style="{StaticResource bwstyle}" |
|||
DataContext="{Binding BatchPurchaseCreateNewOrder,Source={StaticResource Locator}}" |
|||
Title="新建采购单" Height="768" Width="1024"> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="30"/> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="60"/> |
|||
<RowDefinition Height="100"/> |
|||
<RowDefinition Height="40"/> |
|||
</Grid.RowDefinitions> |
|||
<c:RoundWaitProgress Play="{Binding IsLoading}" Panel.ZIndex="999" Grid.RowSpan="5"/> |
|||
|
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|||
Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="新建采购单" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
|
|||
<ScrollViewer Grid.Row="1" Margin="0,5" FocusVisualStyle="{x:Null}"> |
|||
<Grid Margin="5,0"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="30"/> |
|||
<RowDefinition Height="auto"/> |
|||
<RowDefinition Height="100"/> |
|||
<RowDefinition Height="auto"/> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<Border Background="{StaticResource Border.Background}" |
|||
BorderThickness="1" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
SnapsToDevicePixels="True" |
|||
UseLayoutRounding="True"> |
|||
<Grid> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="380"/> |
|||
<ColumnDefinition Width="1*"/> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition Width="80"/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="店铺商品信息" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="采购商品信息" Style="{StaticResource middleTextBlock}" Grid.Column="1"/> |
|||
<TextBlock Text="单价" Style="{StaticResource middleTextBlock}" Grid.Column="2"/> |
|||
<TextBlock Text="数量" Style="{StaticResource middleTextBlock}" Grid.Column="3"/> |
|||
<TextBlock Text="金额" Style="{StaticResource middleTextBlock}" Grid.Column="4"/> |
|||
|
|||
<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"/> |
|||
</Grid> |
|||
</Border> |
|||
|
|||
<ListBox Grid.Row="1" |
|||
Style="{StaticResource NoScrollViewListBoxStyle}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderThickness="1,0,1,1" |
|||
BorderBrush="{StaticResource Border.Brush}"> |
|||
|
|||
</ListBox> |
|||
|
|||
<Border Grid.Row="2" BorderBrush="{StaticResource Border.Brush}" BorderThickness="1,0,1,1"> |
|||
<c:BButton Style="{StaticResource LinkButton}" Command="{Binding AddProductSkuCommand}"> |
|||
<StackPanel> |
|||
<Path Style="{StaticResource path_add}" Fill="{StaticResource Text.Link.Color}" Width="18"/> |
|||
<TextBlock Text="添加商品" Margin="0,2,0,0"/> |
|||
</StackPanel> |
|||
</c:BButton> |
|||
</Border> |
|||
</Grid> |
|||
</ScrollViewer> |
|||
|
|||
<Grid Grid.Row="2" Margin="5,0"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="0.8*"/> |
|||
<ColumnDefinition Width="0.2*"/> |
|||
</Grid.ColumnDefinitions> |
|||
<c:BTextBox Text="{Binding PrucahseRemark,Mode=OneWayToSource,UpdateSourceTrigger=PropertyChanged}" |
|||
WaterRemark="留言信息" |
|||
Height="60" |
|||
VerticalContentAlignment="Top" |
|||
Padding="3,5,0,0" |
|||
TextWrapping="Wrap"/> |
|||
|
|||
<StackPanel Grid.Column="1" VerticalAlignment="Center"> |
|||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> |
|||
<RadioButton Content="批发" Padding="0" VerticalContentAlignment="Center" |
|||
GroupName="OrderMode" |
|||
IsChecked="{Binding PurchaseOrderMode,Converter={StaticResource enumToBooleanConverter},ConverterParameter={x:Static cmodel:PurchaseOrderMode.批发}}"/> |
|||
<RadioButton Content="分销" Padding="0" VerticalContentAlignment="Center" Margin="20,0,0,0" |
|||
GroupName="OrderMode" |
|||
IsChecked="{Binding PurchaseOrderMode,Converter={StaticResource enumToBooleanConverter},ConverterParameter={x:Static cmodel:PurchaseOrderMode.代发}}"/> |
|||
</StackPanel> |
|||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,5,0,0"> |
|||
<Run Text="货品总金额"/> |
|||
<Run Text="{Binding ProductAmount,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}" Foreground="#EC808D"/> |
|||
<Run Text="元"/> |
|||
<LineBreak/> |
|||
<Run Text="运费共计"/> |
|||
<Run Text="{Binding FreightAmount,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}" Foreground="#EC808D"/> |
|||
<Run Text="元"/> |
|||
</TextBlock> |
|||
</StackPanel> |
|||
|
|||
</Grid> |
|||
|
|||
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" Grid.Row="3" Margin="5,0"> |
|||
<c:BTextBox Text="{Binding ContactName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="收货人"/> |
|||
<Grid> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition Width="80"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<c:BTextBox Text="{Binding Province,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="省" BorderThickness="1,1,0,1"/> |
|||
<c:BTextBox Text="{Binding City,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="市" Grid.Column="1" BorderThickness="1,1,0,1"/> |
|||
<c:BTextBox Text="{Binding County,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="区/县" Grid.Column="2" BorderThickness="1,1,0,1"/> |
|||
<c:BTextBox Text="{Binding Town,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="镇" Grid.Column="3" BorderThickness="1,1,0,1"/> |
|||
<c:BTextBox Text="{Binding Address,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Margin="0,2.5" WaterRemark="街道地址" Grid.Column="4"/> |
|||
</Grid> |
|||
|
|||
<c:BTextBox Text="{Binding Mobile,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="电话"/> |
|||
</StackPanel> |
|||
|
|||
<TextBlock Grid.Row="4" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5,0,0,0" FontSize="16"> |
|||
<Run Text="应付总额(含运费)"/> |
|||
<Run Text="{Binding TotalAmount,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}" Foreground="#EC808D"/> |
|||
<Run Text="元"/> |
|||
</TextBlock> |
|||
<StackPanel Orientation="Horizontal" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Right"> |
|||
<c:BButton Content="预览订单" Width="80" HorizontalAlignment="Right" Margin="5,0,0,0" |
|||
Command="{Binding PreviewOrderCommand}" Background="#1CC2A2"/> |
|||
<c:BButton Content="提交订单" Width="80" HorizontalAlignment="Right" |
|||
Command="{Binding FastCreateOrderCommand}" Margin="0,0,5,0"/> |
|||
</StackPanel> |
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,26 @@ |
|||
using BBWY.Controls; |
|||
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.Shapes; |
|||
|
|||
namespace BBWY.Client.Views.BatchPurchase |
|||
{ |
|||
/// <summary>
|
|||
/// BatchCreateNewPurchaseOrder.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class BatchCreateNewPurchaseOrder : BWindow |
|||
{ |
|||
public BatchCreateNewPurchaseOrder() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,57 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.BatchPurchase.BatchPurchaseAddProductSku" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|||
xmlns:local="clr-namespace:BBWY.Client.Views.BatchPurchase" |
|||
mc:Ignorable="d" |
|||
xmlns:cmodel="clr-namespace:BBWY.Client.Models" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
Style="{StaticResource bwstyle}" |
|||
Title="BatchPurchaseAddProductSku" Height="600" Width="500" |
|||
DataContext="{Binding BatchPurchaseAddProductSku,Source={StaticResource Locator}}"> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="30"/> |
|||
<RowDefinition Height="100"/> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="40"/> |
|||
</Grid.RowDefinitions> |
|||
<c:RoundWaitProgress Play="{Binding IsLoading}" Panel.ZIndex="999" Grid.RowSpan="5"/> |
|||
|
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|||
Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="添加商品" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
|
|||
<Grid Grid.Row="1" Margin="5,0"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="50"/> |
|||
<ColumnDefinition Width="150"/> |
|||
<ColumnDefinition Width="50"/> |
|||
<ColumnDefinition Width="150"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<TextBlock Text="SPU" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,5,0"/> |
|||
<c:BTextBox Grid.Column="1"/> |
|||
|
|||
<TextBlock Text="SKU" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="2" Margin="0,0,5,0"/> |
|||
<c:BTextBox Grid.Column="3"/> |
|||
|
|||
<c:BButton Grid.Column="4" Content="搜索" Width="70"/> |
|||
|
|||
<TextBlock Text="采购商" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Row="1" Margin="0,0,5,0"/> |
|||
<ComboBox Grid.Column="1" Grid.Row="1" Height="30"/> |
|||
|
|||
<TextBlock Text="平台" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="2" Grid.Row="1" Margin="0,0,5,0"/> |
|||
<ComboBox Grid.Column="3" Grid.Row="1" Height="30"/> |
|||
|
|||
<c:BButton Grid.Column="4" Content="搜索" Width="70" Grid.Row="1"/> |
|||
</Grid> |
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,26 @@ |
|||
using BBWY.Controls; |
|||
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.Shapes; |
|||
|
|||
namespace BBWY.Client.Views.BatchPurchase |
|||
{ |
|||
/// <summary>
|
|||
/// BatchPurchaseAddProductSku.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class BatchPurchaseAddProductSku : BWindow |
|||
{ |
|||
public BatchPurchaseAddProductSku() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,29 @@ |
|||
using BBWY.Server.Business; |
|||
using BBWY.Server.Model.Dto; |
|||
using Microsoft.AspNetCore.Http; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using System.Collections.Generic; |
|||
|
|||
namespace BBWY.Server.API.Controllers |
|||
{ |
|||
public class BatchPurchaseController : BaseApiController |
|||
{ |
|||
private BatchPurchaseBusiness batchPurchaseBusiness; |
|||
|
|||
public BatchPurchaseController(IHttpContextAccessor httpContextAccessor, BatchPurchaseBusiness batchPurchaseBusiness) : base(httpContextAccessor) |
|||
{ |
|||
this.batchPurchaseBusiness = batchPurchaseBusiness; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 获取包含采购方案的sku列表
|
|||
/// </summary>
|
|||
/// <param name="request"></param>
|
|||
/// <returns></returns>
|
|||
[HttpPost] |
|||
public IList<ProductSkuWithSchemeResponse> GetProductSkuAndSchemeList([FromBody]SearchProductSkuAndSchemeRequest request) |
|||
{ |
|||
return batchPurchaseBusiness.GetProductSkuAndSchemeList(request); |
|||
} |
|||
} |
|||
} |
@ -1,16 +1,40 @@ |
|||
namespace BBWY.Server.Model.Dto |
|||
using System; |
|||
|
|||
namespace BBWY.Server.Model.Dto |
|||
{ |
|||
/// <summary>
|
|||
/// 包含采购方案的Sku商品信息
|
|||
/// </summary>
|
|||
public class ProductSkuWithSchemeResponse : ProductSkuResponse |
|||
public class ProductSkuWithSchemeResponse |
|||
{ |
|||
public string Id { get; set; } |
|||
|
|||
public string SkuId { get; set; } |
|||
|
|||
public string ProductId { get; set; } |
|||
|
|||
public decimal Price { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Sku标题
|
|||
/// </summary>
|
|||
public string Title { get; set; } |
|||
|
|||
public string Logo { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 京东Sku状态【1:上架 2:下架 4:删除】
|
|||
/// </summary>
|
|||
public int State { get; set; } |
|||
|
|||
public DateTime? CreateTime { get; set; } |
|||
|
|||
public long PurchaseSchemeId { get; set; } |
|||
|
|||
public string PurchaserId { get; set; } |
|||
|
|||
public string PurchaseName { get; set; } |
|||
|
|||
public Enums.Platform PurchasePlatform { get; set; } |
|||
public Enums.Platform? PurchasePlatform { get; set; } |
|||
} |
|||
} |
|||
|
Loading…
Reference in new issue