Browse Source

齐库打包任务-待落仓-配置京仓

AddValidOverTime
shanji 2 years ago
parent
commit
a30d6bb924
  1. 0
      BBWY.Client/APIServices/QiKu/PackDetailService.cs
  2. 0
      BBWY.Client/APIServices/QiKu/PackPurchaseTaskService.cs
  3. 0
      BBWY.Client/APIServices/QiKu/PackServiceService.cs
  4. 0
      BBWY.Client/APIServices/QiKu/PackTaskService.cs
  5. 17
      BBWY.Client/APIServices/QiKu/SealBoxService.cs
  6. 11
      BBWY.Client/Models/APIModel/Response/SealBox/GetJDSupplierNameAndStoreNameResponse.cs
  7. 36
      BBWY.Client/Models/FallWare/JDWareBoxModel.cs
  8. 12
      BBWY.Client/ViewModels/PackTask/TaskListViewModel.cs
  9. 6
      BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs
  10. 67
      BBWY.Client/Views/FallWare/SetJDWareBoxWindow2.xaml
  11. 77
      BBWY.Client/Views/FallWare/SetJDWareBoxWindow2.xaml.cs

0
BBWY.Client/APIServices/PackDetailService.cs → BBWY.Client/APIServices/QiKu/PackDetailService.cs

0
BBWY.Client/APIServices/PackPurchaseTaskService.cs → BBWY.Client/APIServices/QiKu/PackPurchaseTaskService.cs

0
BBWY.Client/APIServices/PackServiceService.cs → BBWY.Client/APIServices/QiKu/PackServiceService.cs

0
BBWY.Client/APIServices/PackTaskService.cs → BBWY.Client/APIServices/QiKu/PackTaskService.cs

17
BBWY.Client/APIServices/SealBoxService.cs → BBWY.Client/APIServices/QiKu/SealBoxService.cs

@ -167,7 +167,7 @@ namespace BBWY.Client.APIServices
public ApiResponse<bool> SetFallWareConfigure(long SealBoxId, string ProductTitle, string PurchaseOrder, string PrewOrder, string WaybillNo)
public ApiResponse<bool> SetFallWareConfigure(long SealBoxId, string ProductTitle, string PurchaseOrder, string PrewOrder, string WaybillNo, string providerName = "", string wareName = "")
{
return SendRequest<bool>(globalContext.QKApiHost, $"api/SealBox/SetFallWareConfigure",
new
@ -176,7 +176,9 @@ namespace BBWY.Client.APIServices
ProductTitle,
PurchaseOrder,
PrewOrder,
WaybillNo
WaybillNo,
providerName,
wareName
}
, null, HttpMethod.Post);
}
@ -197,5 +199,16 @@ namespace BBWY.Client.APIServices
, null, HttpMethod.Post);
}
public ApiResponse<GetJDSupplierNameAndStoreNameResponse> GetJDSupplierNameAndStoreName(string poOrderNo)
{
return SendRequest<GetJDSupplierNameAndStoreNameResponse>(globalContext.BBYWApiHost, "api/qiku/GetJDSupplierNameAndStoreName", new
{
poOrderNo,
globalContext.User.Shop.AppKey,
globalContext.User.Shop.AppSecret,
globalContext.User.Shop.AppToken,
globalContext.User.Shop.Platform,
}, null, HttpMethod.Post);
}
}
}

11
BBWY.Client/Models/APIModel/Response/SealBox/GetJDSupplierNameAndStoreNameResponse.cs

@ -0,0 +1,11 @@
namespace BBWY.Client.Models.APIModel
{
public class GetJDSupplierNameAndStoreNameResponse
{
public string SupplierName { get; set; }
public string StoreId { get; set; }
public string StoreName { get; set; }
}
}

36
BBWY.Client/Models/FallWare/JDWareBoxModel.cs

@ -4,9 +4,11 @@ using System.Text;
namespace BBWY.Client.Models.FallWare
{
public class JDWareBoxModel
public class JDWareBoxModel:NotifyObject
{
private string purchaseOrder;
private string prewOrder;
private string productTitle;
/// <summary>
/// 箱子id
/// </summary>
@ -16,16 +18,8 @@ namespace BBWY.Client.Models.FallWare
/// 供应商名称
/// </summary>
public string ShopName { get; set; }
/// <summary>
/// 采购单号
/// </summary>
public string PurchaseOrder { get; set; }
/// <summary>
/// 预约单号
/// </summary>
public string PrewOrder { get; set; }
/// <summary>
/// 运单号
/// </summary>
public string WaybillNo { get; set; }
@ -35,11 +29,6 @@ namespace BBWY.Client.Models.FallWare
/// </summary>
public string WareName { get; set; }
/// <summary>
/// 商品名称
/// </summary>
public string ProductTitle { get; set; }
/// <summary>
/// 箱子数
/// </summary>
@ -49,5 +38,20 @@ namespace BBWY.Client.Models.FallWare
/// 商品数量
/// </summary>
public int ProductCount { get; set; }
/// <summary>
/// 采购单号
/// </summary>
public string PurchaseOrder { get => purchaseOrder; set { Set(ref purchaseOrder, value); } }
/// <summary>
/// 预约单号
/// </summary>
public string PrewOrder { get => prewOrder; set { Set(ref prewOrder, value); } }
/// <summary>
/// 商品名称
/// </summary>
public string ProductTitle { get => productTitle; set { Set(ref productTitle, value); } }
}
}

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

@ -200,8 +200,8 @@ namespace BBWY.Client.ViewModels.PackTask
private readonly SealBoxService sealBoxService;
private readonly PackTaskService packTaskService;
private SealBoxService sealBoxService;
private PackTaskService packTaskService;
WorkProcessService workProcessService;
public int? taskStatus { get; set; }
private ObservableCollection<PackTaskModel> packTaskList;
@ -280,9 +280,11 @@ namespace BBWY.Client.ViewModels.PackTask
};
if (fallware.WareType== WareType.)
{
SetJDWareBoxWindow window = new SetJDWareBoxWindow(model,sealBoxService,fallware.WareType.Value,ReflashTask);
window.Show();
//SetJDWareBoxWindow window = new SetJDWareBoxWindow(model,sealBoxService,fallware.WareType.Value,ReflashTask);
//window.Show();
var w = new SetJDWareBoxWindow2(model, sealBoxService, fallware.WareType.Value, ReflashTask);
w.ShowDialog();
}
if (fallware.WareType == WareType.)
{

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

@ -335,8 +335,10 @@ namespace BBWY.Client.ViewModels.PackTask
};
if (fallware.WareType == WareType.)
{
SetJDWareBoxWindow window = new SetJDWareBoxWindow(model, sealBoxService, fallware.WareType, ReflashTask,false);
window.Show();
//SetJDWareBoxWindow window = new SetJDWareBoxWindow(model, sealBoxService, fallware.WareType, ReflashTask,false);
//window.Show();
var w = new SetJDWareBoxWindow2(model, sealBoxService, fallware.WareType, ReflashTask, false);
w.ShowDialog();
}
if (fallware.WareType == WareType.)
{

67
BBWY.Client/Views/FallWare/SetJDWareBoxWindow2.xaml

@ -0,0 +1,67 @@
<c:BWindow x:Class="BBWY.Client.Views.FallWare.SetJDWareBoxWindow2"
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.FallWare"
mc:Ignorable="d"
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls"
Title="SetJDWareBoxWindow2" Height="250" Width="250"
MinButtonVisibility="Collapsed"
MaxButtonVisibility="Collapsed"
CloseButtonVisibility="Visible"
Style="{StaticResource bwstyle}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="30"/>
<RowDefinition/>
<RowDefinition Height="40"/>
</Grid.RowDefinitions>
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}"
Background="{StaticResource Border.Background}">
<TextBlock Text="箱唛设置" Style="{StaticResource middleTextBlock}"/>
</Border>
<StackPanel Grid.Row="1" Background="#F5F7FA" Orientation="Horizontal">
<c:BButton Content="京仓" Width="60" Background="White" Foreground="{StaticResource Button.Background}"/>
<c:BButton Content="云仓" Width="60" Background="#F5F7FA" Foreground="{StaticResource Text.Color}"/>
</StackPanel>
<StackPanel Grid.Row="2" Margin="5,0">
<Grid Margin="0,10,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Text="入库采购单号" VerticalAlignment="Center" HorizontalAlignment="Right"/>
<c:BTextBox Grid.Column="1" Margin="5,0,0,0" Height="25"
Text="{Binding JDWareBoxModel.PurchaseOrder}"/>
</Grid>
<Grid Margin="0,10,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Text="预约单号" VerticalAlignment="Center" HorizontalAlignment="Right"/>
<c:BTextBox Grid.Column="1" Margin="5,0,0,0" Height="25"
Text="{Binding JDWareBoxModel.PrewOrder}"/>
</Grid>
<Grid Margin="0,10,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Text="商品名称" VerticalAlignment="Center" HorizontalAlignment="Right"/>
<c:BTextBox Grid.Column="1" Margin="5,0,0,0" Height="25"
Text="{Binding JDWareBoxModel.ProductTitle}"/>
</Grid>
</StackPanel>
<c:BButton Grid.Row="3" Content="保存" HorizontalAlignment="Right" Width="80" VerticalAlignment="Center" Click="btn_save_Click"
Name="btn_save" Margin="0,0,5,0"/>
<c:RoundWaitProgress Play="{Binding IsLoading}" Panel.ZIndex="999"
WaitText="正在提交中"
Grid.RowSpan="4"/>
</Grid>
</c:BWindow>

77
BBWY.Client/Views/FallWare/SetJDWareBoxWindow2.xaml.cs

@ -0,0 +1,77 @@
using BBWY.Client.APIServices;
using BBWY.Client.Models;
using BBWY.Client.Models.FallWare;
using BBWY.Controls;
using System;
using System.Threading.Tasks;
using System.Windows;
namespace BBWY.Client.Views.FallWare
{
/// <summary>
/// SetJDWareBoxWindow2.xaml 的交互逻辑
/// </summary>
public partial class SetJDWareBoxWindow2 : BWindow
{
public JDWareBoxModel JDWareBoxModel { get; set; }
private SealBoxService sealBoxService;
private Action reflashWindow;
private WareType wareType;
public bool IsEnabled { get; set; }
public bool IsLoading { get => isLoading; set { Set(ref isLoading, value); } }
private bool isLoading;
public SetJDWareBoxWindow2(JDWareBoxModel model, SealBoxService sealBoxService, WareType wareType, Action reflashWindow, bool isEnabled = true)
{
InitializeComponent();
this.sealBoxService = sealBoxService;
this.wareType = wareType;
this.reflashWindow = reflashWindow;
JDWareBoxModel = model;
this.IsEnabled = isEnabled;
this.DataContext = this;
}
private void btn_save_Click(object sender, System.Windows.RoutedEventArgs e)
{
if (string.IsNullOrEmpty(JDWareBoxModel.ProductTitle) ||
string.IsNullOrEmpty(JDWareBoxModel.PrewOrder) ||
string.IsNullOrEmpty(JDWareBoxModel.PurchaseOrder))
{
MessageBox.Show("信息不完整", "提示");
return;
}
IsLoading = true;
Task.Factory.StartNew(() =>
{
var getDetailResponse = sealBoxService.GetJDSupplierNameAndStoreName(JDWareBoxModel.PurchaseOrder);
if (!getDetailResponse.Success)
{
IsLoading = false;
this.Dispatcher.Invoke(() => MessageBox.Show(getDetailResponse.Msg, "提示"));
return;
}
var res = sealBoxService.SetFallWareConfigure(JDWareBoxModel.SealBoxId, JDWareBoxModel.ProductTitle, JDWareBoxModel.PurchaseOrder, JDWareBoxModel.PrewOrder, JDWareBoxModel.WaybillNo, getDetailResponse.Data.SupplierName, getDetailResponse.Data.StoreName);
if (!res.Success)
{
IsLoading = false;
this.Dispatcher.Invoke(() => MessageBox.Show(res.Msg, "提示"));
return;
}
IsLoading = false;
this.Dispatcher.Invoke(() =>
{
reflashWindow?.Invoke();
this.Close();
});
});
}
}
}
Loading…
Cancel
Save