11 changed files with 898 additions and 83 deletions
@ -0,0 +1,384 @@ |
|||||
|
using BBWY.Client.APIServices; |
||||
|
using BBWY.Client.Models.PackTask; |
||||
|
using BBWY.Common.Models; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Collections.ObjectModel; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
using System.Windows; |
||||
|
|
||||
|
namespace BBWY.Client.Models |
||||
|
{ |
||||
|
public class BatchPublishTask : NotifyObject |
||||
|
{ |
||||
|
|
||||
|
#region 属性
|
||||
|
|
||||
|
|
||||
|
private int skuCount; |
||||
|
/// <summary>
|
||||
|
/// Sku任务数
|
||||
|
/// </summary>
|
||||
|
public int SkuCount { get => skuCount; set { Set(ref skuCount, value); } } |
||||
|
|
||||
|
private string skuId; |
||||
|
/// <summary>
|
||||
|
/// Sku
|
||||
|
/// </summary>
|
||||
|
public string SkuId { get => skuId; set { Set(ref skuId, value); } } |
||||
|
|
||||
|
private string logo; |
||||
|
/// <summary>
|
||||
|
/// 店铺Sku图链接
|
||||
|
/// </summary>
|
||||
|
public string Logo { get => logo; set { Set(ref logo, value); } } |
||||
|
|
||||
|
private string skuName; |
||||
|
/// <summary>
|
||||
|
/// 采购Sku名称
|
||||
|
/// </summary>
|
||||
|
public string SkuName { get => skuName; set { Set(ref skuName, value); } } |
||||
|
|
||||
|
private string brand; |
||||
|
/// <summary>
|
||||
|
/// 品牌
|
||||
|
/// </summary>
|
||||
|
public string Brand { get => brand; set { Set(ref brand, value); } } |
||||
|
|
||||
|
|
||||
|
private string productNo; |
||||
|
/// <summary>
|
||||
|
/// 货号
|
||||
|
/// </summary>
|
||||
|
public string ProductNo { get => productNo; set { Set(ref productNo, value); } } |
||||
|
|
||||
|
private string brandName; |
||||
|
/// <summary>
|
||||
|
/// 品名(手写上传)
|
||||
|
/// </summary>
|
||||
|
public string BrandName { get => brandName; set { Set(ref brandName, value); } } |
||||
|
|
||||
|
|
||||
|
private int goodsNumber; |
||||
|
/// <summary>
|
||||
|
/// 配件数
|
||||
|
/// </summary>
|
||||
|
public int GoodsNumber { get => goodsNumber; set { Set(ref goodsNumber, value); } } |
||||
|
private Worry isWorry; |
||||
|
/// <summary>
|
||||
|
/// 是否加急
|
||||
|
/// </summary>
|
||||
|
public Worry IsWorry { get => isWorry; set { Set(ref isWorry, value); } } |
||||
|
|
||||
|
private TaskState availability; |
||||
|
/// <summary>
|
||||
|
/// 到货情况(待收货=0,部分收货=1,已到货=2)
|
||||
|
/// </summary>
|
||||
|
public TaskState Availability { get => availability; set { Set(ref availability, value); } } |
||||
|
|
||||
|
private PackType packType; |
||||
|
/// <summary>
|
||||
|
/// 打包类型(单件=0,多件=1)
|
||||
|
/// </summary>
|
||||
|
public PackType PackType { get => packType; set { Set(ref packType, value); } } |
||||
|
|
||||
|
private BasicPack basicPack; |
||||
|
/// <summary>
|
||||
|
/// 基础包装(快递袋=0,纸箱=1,麻袋=2)
|
||||
|
/// </summary>
|
||||
|
public BasicPack BasicPack { get => basicPack; set { Set(ref basicPack, value); } } |
||||
|
|
||||
|
private PositionType positionType; |
||||
|
/// <summary>
|
||||
|
/// 落仓(本地仓=0,齐越仓=1,京东仓=2)
|
||||
|
/// </summary>
|
||||
|
public PositionType PositionType { get => positionType; set { Set(ref positionType, value); } } |
||||
|
|
||||
|
private string skuTitle; |
||||
|
/// <summary>
|
||||
|
/// sku配件商品名称
|
||||
|
/// </summary>
|
||||
|
public string SkuTitle { get => skuTitle; set { Set(ref skuTitle, value); } } |
||||
|
|
||||
|
private Need isNeedBarCode; |
||||
|
/// <summary>
|
||||
|
/// 是否需要合格证
|
||||
|
/// </summary>
|
||||
|
public Need IsNeedBarCode { get => isNeedBarCode; set { Set(ref isNeedBarCode, value); } } |
||||
|
|
||||
|
|
||||
|
private Need isNeedCertificateModel; |
||||
|
/// <summary>
|
||||
|
/// 是否需要条形码
|
||||
|
/// </summary>
|
||||
|
public Need IsNeedCertificateModel { get => isNeedCertificateModel; set { Set(ref isNeedCertificateModel, value); } } |
||||
|
|
||||
|
|
||||
|
private BarCodeModel barCodeModel; |
||||
|
/// <summary>
|
||||
|
/// 条形码
|
||||
|
/// </summary>
|
||||
|
public BarCodeModel BarCodeModel { get => barCodeModel; set { Set(ref barCodeModel, value); } } |
||||
|
|
||||
|
|
||||
|
private bool isSetBarCode; |
||||
|
/// <summary>
|
||||
|
/// 设置显示(条形码)
|
||||
|
/// </summary>
|
||||
|
public bool IsSetBarCode |
||||
|
{ |
||||
|
get => isSetBarCode; set |
||||
|
{ |
||||
|
|
||||
|
Set(ref isSetBarCode, value); |
||||
|
IsNeedBarCode = IsSetBarCode ? Need.不需要 : Need.需要; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
private bool isSetCertificate; |
||||
|
/// <summary>
|
||||
|
/// 设置显示(合格证)
|
||||
|
/// </summary>
|
||||
|
public bool IsSetCertificate |
||||
|
{ |
||||
|
get => isSetCertificate; set |
||||
|
{ |
||||
|
|
||||
|
Set(ref isSetCertificate, value); |
||||
|
IsNeedCertificateModel = IsSetCertificate ? Need.不需要 : Need.需要; |
||||
|
} |
||||
|
} |
||||
|
private string setSpuCerStatus; |
||||
|
|
||||
|
public string SetSpuCerStatus { get => setSpuCerStatus; set { Set(ref setSpuCerStatus, value); } } |
||||
|
private bool isSetSpuCertificate = true; |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 设置spu显示(合格证)
|
||||
|
/// </summary>
|
||||
|
public bool IsSetSpuCertificate |
||||
|
{ |
||||
|
get => isSetSpuCertificate; set |
||||
|
{ |
||||
|
|
||||
|
Set(ref isSetSpuCertificate, value); |
||||
|
SetSpuCerStatus = IsSetSpuCertificate ? "设置spu模板" : "修改spu模板"; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
private string saveTask; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 设置显示(合格证)
|
||||
|
/// </summary>
|
||||
|
public string SaveTask { get => saveTask; set { Set(ref saveTask, value); } } |
||||
|
|
||||
|
|
||||
|
private string spuId; |
||||
|
/// <summary>
|
||||
|
/// 合格证
|
||||
|
/// </summary>
|
||||
|
public string SpuId { get => spuId; set { Set(ref spuId, value); } } |
||||
|
|
||||
|
private CertificateModel spuCertificateModel; |
||||
|
/// <summary>
|
||||
|
/// spu合格证
|
||||
|
/// </summary>
|
||||
|
public CertificateModel SpuCertificateModel { get => spuCertificateModel; set { Set(ref spuCertificateModel, value); } } |
||||
|
|
||||
|
|
||||
|
|
||||
|
private CertificateModel certificateModel; |
||||
|
/// <summary>
|
||||
|
/// 合格证
|
||||
|
/// </summary>
|
||||
|
public CertificateModel CertificateModel { get => certificateModel; set { Set(ref certificateModel, value); } } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 合格证位置(外部包装=0,产品包装=1)
|
||||
|
/// </summary>
|
||||
|
private CertificatePosition certificatePosition; |
||||
|
/// <summary>
|
||||
|
/// 合格证位置(外部包装=0,产品包装=1)
|
||||
|
/// </summary>
|
||||
|
public CertificatePosition CertificatePosition { get => certificatePosition; set { Set(ref certificatePosition, value); } } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 注意事项(对接备注)
|
||||
|
/// </summary>
|
||||
|
private string markMessage; |
||||
|
/// <summary>
|
||||
|
/// 注意事项(对接备注)
|
||||
|
/// </summary>
|
||||
|
public string MarkMessage { get => markMessage; set { Set(ref markMessage, value); } } |
||||
|
|
||||
|
|
||||
|
private ObservableCollection<IncreateModel> increateList; |
||||
|
/// <summary>
|
||||
|
/// 增量耗材查询关键字
|
||||
|
/// </summary>
|
||||
|
public ObservableCollection<IncreateModel> IncreateList { get => increateList; set { Set(ref increateList, value); } } |
||||
|
#endregion
|
||||
|
string[] increates = new string[] { "气泡纸", "气泡袋", "POP袋", "折纸箱", "气泡纸封边", "彩盒", "剪胶", "剪彩带", "快递袋", "收纳盒", "纸箱子", "装纸箱", "封边", "胶带", "折彩盒" }; |
||||
|
public PackTaskService packTaskService; |
||||
|
public ProductService productService; |
||||
|
public BatchPublishTask() |
||||
|
{ |
||||
|
} |
||||
|
#region 方法
|
||||
|
/// <summary>
|
||||
|
/// 搜索 skuId
|
||||
|
/// </summary>
|
||||
|
public void SearchSku(string skuid) |
||||
|
{ |
||||
|
if (string.IsNullOrEmpty(skuid)) |
||||
|
return; |
||||
|
|
||||
|
ApiResponse<ProductListResponse> productApiResponse = null; |
||||
|
var skuResponse = productService.GetProductSkuList(string.Empty, skuid); |
||||
|
if (skuResponse.Success) |
||||
|
{ |
||||
|
if (skuResponse.Data.Count == 0) |
||||
|
{ |
||||
|
return; |
||||
|
} |
||||
|
Logo = skuResponse.Data[0].Logo; |
||||
|
SkuName = skuResponse.Data[0].Title; |
||||
|
|
||||
|
|
||||
|
SpuId = skuResponse.Data[0].ProductId; |
||||
|
|
||||
|
productApiResponse = productService.GetProductList(skuResponse.Data[0].ProductId, string.Empty, string.Empty, 1); |
||||
|
|
||||
|
if (productApiResponse.Success) |
||||
|
{ |
||||
|
if (productApiResponse.Data.Count == 0) |
||||
|
{ |
||||
|
|
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ProductNo = productApiResponse.Data.Items[0].ProductItemNum; |
||||
|
Brand = productApiResponse.Data.Items[0].BrandName; |
||||
|
|
||||
|
} |
||||
|
var productSku = packTaskService.GetProductSku(skuid); |
||||
|
if (productSku == null || !productSku.Success) |
||||
|
{ |
||||
|
|
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
if (productSku.Data.PackConfig != null) |
||||
|
{ |
||||
|
var config = productSku.Data.PackConfig; |
||||
|
SkuTitle = config.SkuGoodsTitle; |
||||
|
GoodsNumber = config.GoodsNumber; |
||||
|
PackType = (PackType)config.PackType; |
||||
|
BasicPack = (BasicPack)config.BasicPack; |
||||
|
Availability = (TaskState)config.Availability; |
||||
|
MarkMessage = config.MarkMessage; |
||||
|
CertificatePosition = config.CertificatePosition == null ? CertificatePosition.无 : (CertificatePosition)config.CertificatePosition.Value; |
||||
|
// Increment1 = config.Increment1;
|
||||
|
string[] increateDatas = config.Increment1.Split(','); |
||||
|
|
||||
|
bool isSelected = false; |
||||
|
foreach (var item in increates) |
||||
|
{ |
||||
|
isSelected = false; |
||||
|
if (increateDatas.Contains(item)) |
||||
|
{ |
||||
|
isSelected = true; |
||||
|
} |
||||
|
App.Current.Dispatcher.Invoke(() => |
||||
|
{ |
||||
|
IncreateList.Add(new IncreateModel |
||||
|
{ |
||||
|
IncreateName = item, |
||||
|
IsSelected = isSelected |
||||
|
}); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
BrandName = productSku.Data.BrandName; |
||||
|
|
||||
|
|
||||
|
CertificateModel = productSku.Data.Certificate; |
||||
|
IsSetCertificate = false; |
||||
|
if (CertificateModel == null) |
||||
|
{ |
||||
|
CertificateModel = new CertificateModel(); |
||||
|
IsSetCertificate = true; |
||||
|
|
||||
|
} |
||||
|
CertificateModel.Brand = Brand; |
||||
|
CertificateModel.BrandName = BrandName; |
||||
|
CertificateModel.ProductNo = ProductNo; |
||||
|
CertificateModel.SkuId = skuid; |
||||
|
BarCodeModel = productSku.Data.BarCodeModel; |
||||
|
IsSetBarCode = false; |
||||
|
if (BarCodeModel == null) |
||||
|
{ |
||||
|
BarCodeModel = new BarCodeModel(); |
||||
|
IsSetBarCode = true; |
||||
|
} |
||||
|
BarCodeModel.Brand = Brand; |
||||
|
BarCodeModel.BrandName = BrandName; |
||||
|
BarCodeModel.ProductNo = ProductNo; |
||||
|
BarCodeModel.SkuId = skuid; |
||||
|
BarCodeModel.SkuName = SkuName; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
|
||||
|
App.Current.Dispatcher.Invoke(() => MessageBox.Show(skuResponse.Msg, "加载sku")); |
||||
|
return; |
||||
|
} |
||||
|
//查看有木有存在
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
public void InitData() |
||||
|
{ |
||||
|
|
||||
|
IncreateList = new ObservableCollection<IncreateModel>(); |
||||
|
SpuId = string.Empty; |
||||
|
SaveTask = "发布"; |
||||
|
|
||||
|
Logo = string.Empty; |
||||
|
|
||||
|
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; |
||||
|
foreach (var item in increates) |
||||
|
{ |
||||
|
IncreateList.Add(new IncreateModel |
||||
|
{ |
||||
|
IncreateName = item, |
||||
|
IsSelected = false |
||||
|
}); |
||||
|
} |
||||
|
//SearchSku(SkuId);
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,71 @@ |
|||||
|
using BBWY.Client.APIServices; |
||||
|
using BBWY.Client.Models; |
||||
|
using BBWY.Common.Models; |
||||
|
using GalaSoft.MvvmLight.Command; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Collections.ObjectModel; |
||||
|
using System.Text; |
||||
|
using System.Windows.Input; |
||||
|
|
||||
|
namespace BBWY.Client.ViewModels |
||||
|
{ |
||||
|
public class BatchPublishTaskViewModel : BaseVM, IDenpendency |
||||
|
{ |
||||
|
|
||||
|
PackTaskService packTaskService; |
||||
|
ProductService productService; |
||||
|
private bool isLoading = false; |
||||
|
public bool IsLoading { get => isLoading; set { Set(ref isLoading, value); } } |
||||
|
|
||||
|
private ObservableCollection<BatchPublishTask> batchPublishTasks; |
||||
|
public ObservableCollection<BatchPublishTask> BatchPublishTasks { get => batchPublishTasks; set { Set(ref batchPublishTasks, value); } } |
||||
|
|
||||
|
|
||||
|
public ICommand CreateTaskCommand { get; set; } |
||||
|
public BatchPublishTaskViewModel(PackTaskService packTaskService, ProductService productService) |
||||
|
{ |
||||
|
BatchPublishTasks = new ObservableCollection<BatchPublishTask>(); |
||||
|
this.packTaskService = packTaskService; |
||||
|
this.productService = productService; |
||||
|
CreateTaskCommand = new RelayCommand(CreateTask); |
||||
|
} |
||||
|
|
||||
|
private void CreateTask() |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
Platform platform; string orderId; string PurchaserId; |
||||
|
public void AddSkus(Platform platform, string orderId, string PurchaserId, List<PurchaseOrderSku> purchaseOrderSkus) |
||||
|
{ |
||||
|
BatchPublishTasks = new ObservableCollection<BatchPublishTask>(); |
||||
|
this.platform = platform; this.orderId = orderId; |
||||
|
this.PurchaserId = PurchaserId; |
||||
|
BatchPublishTask model = null; |
||||
|
IsLoading = true; |
||||
|
foreach (var item in purchaseOrderSkus) |
||||
|
{ |
||||
|
model = new BatchPublishTask(); |
||||
|
//model.InitData();
|
||||
|
model.productService = productService; |
||||
|
model.packTaskService = packTaskService; |
||||
|
model.SkuId = item.SkuId; |
||||
|
model.SkuCount = item.Quantity.Value; |
||||
|
model.Logo = item.Logo; |
||||
|
model.SpuId = item.ProductId; |
||||
|
model.SkuName = item.SkuTitle; |
||||
|
model.SearchSku(item.SkuId); |
||||
|
App.Current.Dispatcher.Invoke(() => |
||||
|
{ |
||||
|
BatchPublishTasks.Add(model); |
||||
|
}); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
IsLoading = false; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,279 @@ |
|||||
|
<c:BWindow x:Class="BBWY.Client.Views.BatchPurchase.BatchPublishTaskWindow" |
||||
|
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" |
||||
|
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
||||
|
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
||||
|
xmlns:ctr="clr-namespace:BBWY.Client.Converters" |
||||
|
xmlns:cmodel="clr-namespace:BBWY.Client.Models" |
||||
|
xmlns:hc="https://handyorg.github.io/handycontrol" |
||||
|
mc:Ignorable="d" |
||||
|
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
||||
|
CloseButtonVisibility="Visible" |
||||
|
CloseButtonColor="{StaticResource WindowButtonColor}" |
||||
|
DataContext="{Binding BatchPublishTask,Source={StaticResource Locator}}" |
||||
|
MinButtonVisibility="Collapsed" |
||||
|
MaxButtonVisibility="Collapsed" |
||||
|
RightButtonGroupMargin="0,5,5,0" |
||||
|
Title="发布任务" Height="350" Width="1500"> |
||||
|
<!-- DataContext="{Binding CreateTaskView,Source={StaticResource Locator}}" --> |
||||
|
<Window.Resources> |
||||
|
<ResourceDictionary> |
||||
|
|
||||
|
<ObjectDataProvider x:Key="storageTypeProvider" MethodName="GetValues" ObjectType="{x:Type sys:Enum}"> |
||||
|
<ObjectDataProvider.MethodParameters> |
||||
|
<x:Type TypeName="cmodel:StorageType"/> |
||||
|
</ObjectDataProvider.MethodParameters> |
||||
|
</ObjectDataProvider> |
||||
|
<ctr:OrderStorageTypeOptionConverter x:Key="ostConverter"/> |
||||
|
<ctr:ProfitRatioConverter x:Key="profitRatioConverter"/> |
||||
|
<ctr:WaybillNoConverter x:Key="waybillConverter"/> |
||||
|
<ctr:MultiParameterTransferConverter x:Key="mptConverter"/> |
||||
|
<ctr:SaleGrossProfitConverter x:Key="sgpcConverter"/> |
||||
|
</ResourceDictionary> |
||||
|
|
||||
|
</Window.Resources> |
||||
|
|
||||
|
<Grid> |
||||
|
<Grid.RowDefinitions> |
||||
|
<RowDefinition Height="40"/> |
||||
|
<RowDefinition/> |
||||
|
<RowDefinition Height="40"/> |
||||
|
</Grid.RowDefinitions> |
||||
|
<c:RoundWaitProgress Play="{Binding IsLoading}" Panel.ZIndex="999"/> |
||||
|
<Grid Background="{StaticResource Border.Background}"> |
||||
|
<TextBlock Text="发布任务" VerticalAlignment="Center" HorizontalAlignment="Center" /> |
||||
|
</Grid> |
||||
|
<ListBox x:Name="listbox_order" |
||||
|
Grid.Row="1" |
||||
|
ItemsSource="{Binding BatchPublishTasks}" |
||||
|
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
||||
|
BorderBrush="{StaticResource Border.Brush}" |
||||
|
BorderThickness="1,1,1,1" |
||||
|
Foreground="{StaticResource Text.Color}"> |
||||
|
<ListBox.ItemTemplate> |
||||
|
<DataTemplate> |
||||
|
<Grid Width="{Binding ActualWidth,ElementName=listbox_order,Converter={StaticResource widthConverter},ConverterParameter=-0}" |
||||
|
MinHeight="100"> |
||||
|
<Grid.ColumnDefinitions> |
||||
|
<ColumnDefinition Width="200"/> |
||||
|
<ColumnDefinition/> |
||||
|
</Grid.ColumnDefinitions> |
||||
|
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="1"/> |
||||
|
<StackPanel Orientation="Vertical" Grid.Column="0"> |
||||
|
<c:BAsyncImage UrlSource="{Binding Logo}" |
||||
|
Width="150" DecodePixelWidth="150" |
||||
|
VerticalAlignment="Top" Margin="25 13 25 13" |
||||
|
Cursor="Hand"> |
||||
|
<b:Interaction.Triggers> |
||||
|
<b:EventTrigger EventName="PreviewMouseLeftButtonDown"> |
||||
|
<b:InvokeCommandAction Command="{Binding DataContext.OpenSkuDetailCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page}}}"> |
||||
|
<b:InvokeCommandAction.CommandParameter> |
||||
|
<MultiBinding Converter="{StaticResource mptConverter}"> |
||||
|
<Binding Path="DataContext.Id" RelativeSource="{RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox},AncestorLevel=1}"/> |
||||
|
<Binding Path="Id"/> |
||||
|
</MultiBinding> |
||||
|
</b:InvokeCommandAction.CommandParameter> |
||||
|
</b:InvokeCommandAction> |
||||
|
</b:EventTrigger> |
||||
|
</b:Interaction.Triggers> |
||||
|
</c:BAsyncImage> |
||||
|
<TextBlock Margin="25 0 0 10"> |
||||
|
<Run Text="SKU名称:"/> |
||||
|
<Run Text="{Binding SkuName}"/> |
||||
|
</TextBlock > |
||||
|
<TextBlock Margin="25 0 0 10"> |
||||
|
<Run Text="货号:"/> |
||||
|
<Run Text="{Binding ProductNo}"/> |
||||
|
</TextBlock> |
||||
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="25 0 0 10" Height="30"> |
||||
|
<TextBlock Text="品名:" VerticalAlignment="Center"/> |
||||
|
<c:BTextBox Text="{Binding BrandName}" Height="30" Width="120" WaterRemark="请输入品名"/> |
||||
|
|
||||
|
</StackPanel> |
||||
|
<StackPanel Margin="25 0 0 10" Orientation="Horizontal"> |
||||
|
<TextBlock Text="条形码:"/> |
||||
|
<c:BButton Content="设置" Style="{StaticResource LinkButton}" Width="35" Height="15" Command="{Binding SetBarCodeCommand}" |
||||
|
Visibility="{Binding IsSetBarCode, Converter={StaticResource objConverter}, ConverterParameter=true:Visible:Collapsed }" |
||||
|
/> |
||||
|
<StackPanel Visibility="{Binding IsSetBarCode, Converter={StaticResource objConverter}, ConverterParameter=false:Visible:Collapsed }" Orientation="Horizontal" HorizontalAlignment="Center" > |
||||
|
<c:BButton Content="查看" Style="{StaticResource LinkButton}" Width="35" Height="15" Command="{Binding LookBarCommand}"/> |
||||
|
<c:BButton Content="修改" Style="{StaticResource LinkButton}" Width="35" Height="15" Command="{Binding SetBarCodeCommand}"/> |
||||
|
</StackPanel > |
||||
|
</StackPanel> |
||||
|
<StackPanel Margin="25 0 0 5" Orientation="Horizontal"> |
||||
|
<TextBlock Text="合格证:"/> |
||||
|
<c:BButton Content="设置" Style="{StaticResource LinkButton}" Width="35" Height="15" Command="{Binding SetCertificateCommand}" |
||||
|
Visibility="{Binding IsSetCertificate, Converter={StaticResource objConverter}, ConverterParameter=true:Visible:Collapsed }"/> |
||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" |
||||
|
Visibility="{Binding IsSetCertificate, Converter={StaticResource objConverter}, ConverterParameter=false:Visible:Collapsed }"> |
||||
|
<c:BButton Content="查看" Style="{StaticResource LinkButton}" Width="35" Height="15" Command="{Binding LookCerCommand}"/> |
||||
|
<c:BButton Content="修改" Style="{StaticResource LinkButton}" Width="35" Height="15" Command="{Binding SetCertificateCommand}"/> |
||||
|
</StackPanel > |
||||
|
</StackPanel> |
||||
|
</StackPanel> |
||||
|
<Grid Grid.Column="1"> |
||||
|
<Grid.RowDefinitions> |
||||
|
<RowDefinition/> |
||||
|
<RowDefinition/> |
||||
|
</Grid.RowDefinitions> |
||||
|
<Grid > |
||||
|
<TextBlock Text="任务信息" FontWeight="Bold" Margin="19 23" HorizontalAlignment="Left" VerticalAlignment="Top"/> |
||||
|
<StackPanel Height="25" VerticalAlignment="Center" Margin="19 64" Orientation="Horizontal" HorizontalAlignment="Left" > |
||||
|
<TextBlock Text="数量:" VerticalAlignment="Center"/> |
||||
|
<c:BTextBox WaterRemark="打包数量" Height="25" Width="90" Text="{Binding SkuCount}" /> |
||||
|
<TextBlock Margin="30 0 0 0" Text="到货情况:" VerticalAlignment="Center"/> |
||||
|
<ComboBox VerticalContentAlignment="Center" Text="{Binding Availability}" > |
||||
|
<ComboBoxItem Content="已到货" IsSelected="True" /> |
||||
|
<ComboBoxItem Content="部分到货"/> |
||||
|
<ComboBoxItem Content="未到货"/> |
||||
|
</ComboBox> |
||||
|
<TextBlock Margin="30 0 0 0" Text="加急:" VerticalAlignment="Center"/> |
||||
|
<ComboBox VerticalContentAlignment="Center" Text="{Binding IsWorry}" > |
||||
|
<ComboBoxItem Content="否" IsSelected="True" /> |
||||
|
<ComboBoxItem Content="是"/> |
||||
|
</ComboBox> |
||||
|
</StackPanel> |
||||
|
<hc:TextBox HorizontalAlignment="Left" VerticalAlignment="Top" Height="100" Width="350" |
||||
|
Margin="400 64 0 0 " AcceptsReturn="True" TextWrapping="Wrap"/> |
||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Top" Height="25" |
||||
|
Margin="19 118 0 0"> |
||||
|
<TextBlock Text="落仓去向:" VerticalAlignment="Center"/> |
||||
|
<ComboBox VerticalContentAlignment="Center" Text="{Binding PositionType}" > |
||||
|
<ComboBoxItem Content="本地仓" IsSelected="True" /> |
||||
|
<ComboBoxItem Content="齐越仓"/> |
||||
|
<ComboBoxItem Content="京东仓"/> |
||||
|
</ComboBox> |
||||
|
</StackPanel> |
||||
|
|
||||
|
</Grid> |
||||
|
<Grid Grid.Row="1"> |
||||
|
<TextBlock Text="打包配置" FontWeight="Bold" Margin="19 23" /> |
||||
|
<Grid Height="70" Margin="19 64"> |
||||
|
<Grid.ColumnDefinitions> |
||||
|
<ColumnDefinition Width="77"/> |
||||
|
<ColumnDefinition Width="77"/> |
||||
|
<ColumnDefinition MinWidth="77"/> |
||||
|
<ColumnDefinition Width="77"/> |
||||
|
<ColumnDefinition Width="100"/> |
||||
|
<ColumnDefinition Width="77"/> |
||||
|
<ColumnDefinition Width="77"/> |
||||
|
<ColumnDefinition Width="77"/> |
||||
|
</Grid.ColumnDefinitions> |
||||
|
<Grid.RowDefinitions> |
||||
|
<RowDefinition Height="35"/> |
||||
|
<RowDefinition/> |
||||
|
</Grid.RowDefinitions> |
||||
|
<Border Grid.Row="0" Grid.ColumnSpan="8" VerticalAlignment="Top" Height="1" Background="{StaticResource Border.Brush}"/> |
||||
|
<Border Grid.Row="0" Grid.ColumnSpan="8" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/> |
||||
|
<Border Grid.Row="1" Grid.ColumnSpan="8" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/> |
||||
|
|
||||
|
<Border Grid.RowSpan="2" Grid.Column="0" HorizontalAlignment="Left" Width="1" Background="{StaticResource Border.Brush}"/> |
||||
|
<Border Grid.RowSpan="2" Grid.Column="0" HorizontalAlignment="Right" Width="1" Background="{StaticResource Border.Brush}"/> |
||||
|
<Border Grid.RowSpan="2" Grid.Column="1" HorizontalAlignment="Right" Width="1" Background="{StaticResource Border.Brush}"/> |
||||
|
<Border Grid.RowSpan="2" Grid.Column="2" HorizontalAlignment="Right" Width="1" Background="{StaticResource Border.Brush}"/> |
||||
|
<Border Grid.RowSpan="2" Grid.Column="3" HorizontalAlignment="Right" Width="1" Background="{StaticResource Border.Brush}"/> |
||||
|
<Border Grid.RowSpan="2" Grid.Column="4" HorizontalAlignment="Right" Width="1" Background="{StaticResource Border.Brush}"/> |
||||
|
<Border Grid.RowSpan="2" Grid.Column="5" HorizontalAlignment="Right" Width="1" Background="{StaticResource Border.Brush}"/> |
||||
|
<Border Grid.RowSpan="2" Grid.Column="6" HorizontalAlignment="Right" Width="1" Background="{StaticResource Border.Brush}"/> |
||||
|
<Border Grid.RowSpan="2" Grid.Column="7" HorizontalAlignment="Right" Width="1" Background="{StaticResource Border.Brush}"/> |
||||
|
|
||||
|
<TextBlock Grid.Row="0" Style="{StaticResource middleTextBlock}" Grid.Column="0" Text="组合类型"/> |
||||
|
<TextBlock Grid.Row="0" Style="{StaticResource middleTextBlock}" Grid.Column="1" Text="配件数量"/> |
||||
|
<TextBlock Grid.Row="0" Style="{StaticResource middleTextBlock}" Grid.Column="2" Text="SKU配件商品"/> |
||||
|
<TextBlock Grid.Row="0" Style="{StaticResource middleTextBlock}" Grid.Column="3" Text="基础包装"/> |
||||
|
<TextBlock Grid.Row="0" Style="{StaticResource middleTextBlock}" Grid.Column="4" Text="增量耗材"/> |
||||
|
<TextBlock Grid.Row="0" Style="{StaticResource middleTextBlock}" Grid.Column="5" Text="条码标签"/> |
||||
|
<TextBlock Grid.Row="0" Style="{StaticResource middleTextBlock}" Grid.Column="6" Text="合格证"/> |
||||
|
<TextBlock Grid.Row="0" Style="{StaticResource middleTextBlock}" Grid.Column="7" Text="合格证位置"/> |
||||
|
|
||||
|
|
||||
|
<Grid Grid.Row="1" Grid.Column="0" > |
||||
|
<ComboBox VerticalContentAlignment="Center" Margin="5" Text="{Binding PackType}" > |
||||
|
<ComboBoxItem Content="单件" IsSelected="True" /> |
||||
|
<ComboBoxItem Content="多件"/> |
||||
|
</ComboBox> |
||||
|
</Grid> |
||||
|
<c:BTextBox BorderBrush="Transparent" Grid.Row="1" Grid.Column="1" Height="30" Margin="5" Text="{Binding GoodsNumber,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
||||
|
<c:BTextBox BorderBrush="Transparent" Grid.Row="1" Grid.Column="2" Height="30" Margin="5" Text="{Binding SkuTitle,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
||||
|
<Grid Grid.Row="1" Grid.Column="3" > |
||||
|
<ComboBox BorderBrush="Transparent" VerticalContentAlignment="Center" Margin="5" Text="{Binding BasicPack}" > |
||||
|
<ComboBoxItem Content="快递袋" IsSelected="True" /> |
||||
|
<ComboBoxItem Content="纸箱"/> |
||||
|
<ComboBoxItem Content="麻袋"/> |
||||
|
</ComboBox> |
||||
|
</Grid> |
||||
|
|
||||
|
|
||||
|
<Grid Grid.Row="1" Grid.Column="4"> |
||||
|
<Grid.Resources> |
||||
|
<ResourceDictionary> |
||||
|
<ResourceDictionary.MergedDictionaries> |
||||
|
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/> |
||||
|
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/> |
||||
|
</ResourceDictionary.MergedDictionaries> |
||||
|
</ResourceDictionary> |
||||
|
</Grid.Resources> |
||||
|
<hc:CheckComboBox IsTextSearchEnabled="True" ItemsSource="{Binding IncreateList}" |
||||
|
ShowClearButton="True" |
||||
|
MinWidth="90" |
||||
|
Height="25" |
||||
|
Margin="5,0,5,0"> |
||||
|
<hc:CheckComboBox.ItemTemplate> |
||||
|
<DataTemplate> |
||||
|
<StackPanel Orientation="Horizontal" Margin="5,2.5"> |
||||
|
<CheckBox Content="{Binding IncreateName}" IsChecked="{Binding IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
||||
|
</StackPanel> |
||||
|
</DataTemplate> |
||||
|
</hc:CheckComboBox.ItemTemplate> |
||||
|
<hc:CheckComboBox.ItemContainerStyle> |
||||
|
<Style TargetType="{x:Type hc:CheckComboBoxItem}" BasedOn="{StaticResource NoBgListBoxItemStyle}"> |
||||
|
<Setter Property="IsSelected" Value="{Binding IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
||||
|
</Style> |
||||
|
</hc:CheckComboBox.ItemContainerStyle> |
||||
|
</hc:CheckComboBox> |
||||
|
</Grid> |
||||
|
|
||||
|
<Grid Grid.Row="1" Grid.Column="5" > |
||||
|
<ComboBox VerticalContentAlignment="Center" Margin="5" Text="{Binding IsNeedBarCode}"> |
||||
|
<ComboBoxItem Content="需要" /> |
||||
|
<ComboBoxItem Content="不需要" IsSelected="True"/> |
||||
|
</ComboBox> |
||||
|
</Grid> |
||||
|
<Grid Grid.Row="1" Grid.Column="6" > |
||||
|
<ComboBox VerticalContentAlignment="Center" Margin="5" Text="{Binding IsNeedCertificateModel}"> |
||||
|
<ComboBoxItem Content="需要" /> |
||||
|
<ComboBoxItem Content="不需要" IsSelected="True"/> |
||||
|
</ComboBox> |
||||
|
</Grid> |
||||
|
<Grid Grid.Row="1" Grid.Column="7" > |
||||
|
<ComboBox VerticalContentAlignment="Center" Margin="5" Text="{Binding CertificatePosition}"> |
||||
|
<ComboBoxItem Content="外部包装" /> |
||||
|
<ComboBoxItem Content="产品包装"/> |
||||
|
<ComboBoxItem Content="无" IsSelected="True"/> |
||||
|
</ComboBox> |
||||
|
</Grid> |
||||
|
</Grid> |
||||
|
</Grid> |
||||
|
|
||||
|
</Grid> |
||||
|
|
||||
|
<Border Grid.Row="1" Grid.ColumnSpan="2" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/> |
||||
|
</Grid> |
||||
|
|
||||
|
</DataTemplate> |
||||
|
</ListBox.ItemTemplate> |
||||
|
</ListBox> |
||||
|
<Grid Grid.Row="2"> |
||||
|
|
||||
|
<Button Content="发布" Width="100" HorizontalAlignment="Right" VerticalAlignment="Stretch" Margin="0,2,5,2" |
||||
|
Command="{Binding CreateTaskCommand}" |
||||
|
CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" |
||||
|
Background="{StaticResource Button.Background}" BorderThickness="0" Foreground="White"/> |
||||
|
</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>
|
||||
|
/// BatchPublishTaskWindow.xaml 的交互逻辑
|
||||
|
/// </summary>
|
||||
|
public partial class BatchPublishTaskWindow : BWindow |
||||
|
{ |
||||
|
public BatchPublishTaskWindow() |
||||
|
{ |
||||
|
InitializeComponent(); |
||||
|
} |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue