Browse Source

提交打包数据 由良品数判断打包数量

AddValidOverTime
506583276@qq.com 2 years ago
parent
commit
0fb289a8e7
  1. 4
      BBWY.Client/BBWYAppSettings.json
  2. 2
      BBWY.Client/GlobalContext.cs
  3. 43
      BBWY.Client/Helpers/ImageHelper.cs
  4. 11
      BBWY.Client/ViewModels/PackTask/PackDetailViewModel.cs
  5. 6
      BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs
  6. 2
      BBWY.Client/ViewModels/SealBox/SealBoxConfigureViewModel.cs
  7. 4
      BBWY.Client/Views/PackTask/WaitPackageControl.xaml
  8. 19
      BBWY.Client/Views/PackTask/WareHouseListControl.xaml
  9. 4
      BBWY.Client/Views/QualityTask/WaitQualityControl.xaml
  10. 8
      BBWY.Client/Views/SealBox/SealBoxNoConfigureControl.xaml

4
BBWY.Client/BBWYAppSettings.json

@ -4,6 +4,6 @@
"MDSApiHost": "http://mdsapi.qiyue666.com",
"JOSApiHost": "",
"1688ApiHost": "",
// "QKApiHost": "http://localhost:8080"
"QKApiHost": "http://qiku.qiyue666.com"
"QKApiHost": "http://localhost:8080"
//"QKApiHost": "http://qiku.qiyue666.com"
}

2
BBWY.Client/GlobalContext.cs

@ -13,7 +13,7 @@ namespace BBWY.Client
{
ShopServiceGroupList = new List<string>();
ShopServiceGroupLowerList = new List<string>();
ClientVersion = "10161";
ClientVersion = "10162";
}
private User user;

43
BBWY.Client/Helpers/ImageHelper.cs

@ -0,0 +1,43 @@
using BBWY.Client.Extensions;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media.Imaging;
namespace BBWY.Client.Helpers
{
public static class ImageHelper
{
/// <summary>
/// 下载图片
/// </summary>
/// <param name="imageUrl"></param>
/// <returns></returns>
private static async Task< BitmapImage> LoadImageAsync(string imageUrl)
{
try
{
using (HttpClient client = new HttpClient())
{
// 发送 HTTP 请求并获取图片数据
var uri = new Uri(Uri.EscapeUriString(imageUrl));
byte[] imageData = await client.GetByteArrayAsync(uri);
// 创建 BitmapImage 对象并设置图片数据
var LogoImage = imageData.ByteToBitmapImage();
return LogoImage;
}
}
catch (Exception ex)
{
// 处理加载图片失败的异常
Console.WriteLine("加载图片失败:" + ex.Message);
}
return null;
}
}
}

11
BBWY.Client/ViewModels/PackTask/PackDetailViewModel.cs

@ -906,12 +906,19 @@ namespace BBWY.Client.ViewModels.PackTask
/// </summary>
private void UpLoadPack(object obj)
{
if (ProcessTaskCount > TaskCount)
//if (ProcessTaskCount > TaskCount)
//{
// System.Windows.MessageBox.Show($"工序任务数:{ProcessTaskCount}不能超过打包总任务数:{TaskCount}");
// return;
//}
if (PackUserModelList==null|| PackUserModelList.Count<=0)
{
System.Windows.MessageBox.Show($"工序任务数:{ProcessTaskCount}不能超过打包总任务数:{TaskCount}");
System.Windows.MessageBox.Show("信息不完整,打包人设置有误");
return;
}
if (PackUserModelList != null && PackUserModelList.Count > 0)
{
if (PackUserModelList.Any(p => p.SelectUserId.IsNullOrEmpty() || p.TaskCount <= 0))

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

@ -1526,11 +1526,7 @@ namespace BBWY.Client.ViewModels.PackTask
{
AcceptUserName = string.Join("|", item.AcceptUserNames),
DepartmentName = item.DepartmentName,
SealBoxSkus = item.SealBoxSkus.Select(s =>
{
s.Logo = s.Logo;
return s;
}).ToList(),
SealBoxSkus = item.SealBoxSkus,
ShopId = item.ShopId,
ShopName = item.ShopName,

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

@ -691,7 +691,7 @@ namespace BBWY.Client.ViewModels.SealBox
SkuId = sealBoxConfigureModel.SkuId,
TaskId = sealBoxConfigureModel.TaskId,
TotalCount = sealBoxConfigureModel.SkuCount,
WareHourseDatas = sealBoxConfigureModel.WareHourseDatas.Select(x => new WareHourseData
WareHourseDatas = sealBoxConfigureModel.WareHourseDatas.Where(w => w.Count > 0).Select(x => new WareHourseData//上传过滤0数据
{
Count = x.Count,
WareId = x.WareId,

4
BBWY.Client/Views/PackTask/WaitPackageControl.xaml

@ -31,7 +31,7 @@
Visibility="{Binding SelectShop,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=部门:Visible:Collapsed}"
>
<c:BTextBox x:Name="tb" Width="150" Height="30" TextChanged="tb_TextChanged" Text="{Binding SearchDepartment,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="部门名称"
BorderThickness="1 0 0 1" Margin="0 0 0 1"
/>
<ListBox MaxHeight="300" x:Name="tipBox" SelectionChanged="SelectionChangeCommand" Background="{StaticResource Border.Background}"/>
@ -41,7 +41,7 @@
Visibility="{Binding SelectShop,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=店铺:Visible:Collapsed}"
>
<c:BTextBox x:Name="tbShop" Width="150" Height="30" TextChanged="tbShop_TextChanged" Text="{Binding SearchShopName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="店铺名称"
BorderThickness="1 0 0 1" Margin="0 0 0 1"
/>
<ListBox MaxHeight="300" x:Name="tipBoxShop" SelectionChanged="tipBoxShop_SelectionChanged" Background="{StaticResource Border.Background}"/>

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

@ -33,8 +33,8 @@
<StackPanel Panel.ZIndex="100" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Vertical" Margin="590,15,0,0"
Visibility="{Binding SelectShop,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=部门:Visible:Collapsed}"
>
<c:BTextBox x:Name="tb" Width="150" Height="30" TextChanged="tb_TextChanged" Text="{Binding SearchDepartment,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="部门名称"
<c:BTextBox x:Name="tb" Width="150" TextChanged="tb_TextChanged" Text="{Binding SearchDepartment,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="部门名称"
BorderThickness="1 0 0 1" Margin="0 0 0 1" Height="30"
/>
<ListBox MaxHeight="300" x:Name="tipBox" SelectionChanged="SelectionChangeCommand" Background="{StaticResource Border.Background}">
@ -44,7 +44,7 @@
Visibility="{Binding SelectShop,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=店铺:Visible:Collapsed}"
>
<c:BTextBox x:Name="tbShop" Width="150" Height="30" TextChanged="tbShop_TextChanged" Text="{Binding SearchShopName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="店铺名称"
BorderThickness="1 0 0 1" Margin="0 0 0 1"
/>
<ListBox MaxHeight="300" x:Name="tipBoxShop" SelectionChanged="tipBoxShop_SelectionChanged" Background="{StaticResource Border.Background}">
@ -112,13 +112,6 @@
<ComboBox BorderThickness="0" Width="80" VerticalContentAlignment="Center" ItemsSource="{Binding SelectShopList}" HorizontalContentAlignment="Center" Text="{Binding SelectShop ,Mode=TwoWay}" />
<UniformGrid Width="150" Rows="1" Columns="1">
<c:BTextBox Width="150" WaterRemark="SKUID" Text="{Binding SearchSkuId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
BorderThickness="1 0 0 0" Visibility="{Binding SelectSku,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=SKU:Visible:Collapsed}"
/>
<!--<c:BTextBox Width="150" WaterRemark="SPUID" Text="{Binding SearchSpuId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
BorderThickness="1 0 0 0" Visibility="{Binding SelectSku,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=SPU:Visible:Collapsed}"
/>-->
</UniformGrid>
</StackPanel>
</Border>
@ -131,7 +124,7 @@
<c:BTextBox Name="btbShopName" Width="150" Visibility="Hidden" Margin="5,0,0,0" />-->
<Border CornerRadius="0" BorderThickness="1" BorderBrush="{StaticResource Border.Brush}" Margin="20,0,0,0">
<Border CornerRadius="0" BorderThickness="1" BorderBrush="{StaticResource Border.Brush}" Margin="5,0,0,0">
<StackPanel Orientation="Horizontal">
<ComboBox Width="125" BorderThickness="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" ItemsSource="{Binding SelectExpressList}" Text="{Binding SelectExpress }"/>
<UniformGrid Width="150" Margin="0,0,0,0" Rows="1" Columns="1">
@ -146,12 +139,12 @@
</StackPanel>
</Border>
<Grid Grid.Column="1" Grid.Row="1" Margin="20,0,0,0"
<Grid Grid.Column="1" Grid.Row="1" Margin="5,0,0,0"
Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=未到货:Visible:Collapsed}"
>
<Rectangle Stroke="{StaticResource Border.Brush}" StrokeThickness="1"/>
<StackPanel Orientation="Horizontal" Margin="1">
<ComboBox Width="125" BorderThickness="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" ItemsSource="{Binding SelectTitleList}" Text="{Binding SelectTitle }"/>
<ComboBox Width="100" BorderThickness="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" ItemsSource="{Binding SelectTitleList}" Text="{Binding SelectTitle }"/>
<UniformGrid Width="150" Margin="0,0,0,0" Rows="1" Columns="1">
<c:BTextBox Width="150" Text="{Binding SearchSkuTitle,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="模糊搜索"
BorderThickness="1 0 0 0" Visibility="{Binding SelectTitle,Converter={StaticResource objConverter},ConverterParameter=SKU名称:Visible:Collapsed}"

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

@ -29,7 +29,7 @@
Visibility="{Binding SelectShop,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=部门:Visible:Collapsed}"
>
<c:BTextBox x:Name="tb" Width="150" Height="30" TextChanged="tb_TextChanged" Text="{Binding SearchDepartment,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="部门名称"
BorderThickness="1 0 0 1" Margin="0 0 0 1"
/>
<ListBox MaxHeight="300" x:Name="tipBox" SelectionChanged="SelectionChangeCommand" Background="{StaticResource Border.Background}"/>
@ -39,7 +39,7 @@
Visibility="{Binding SelectShop,Mode=OneWay,Converter={StaticResource objConverter},ConverterParameter=店铺:Visible:Collapsed}"
>
<c:BTextBox x:Name="tbShop" Width="150" Height="30" TextChanged="tbShop_TextChanged" Text="{Binding SearchShopName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="店铺名称"
BorderThickness="1 0 0 1" Margin="0 0 0 1"
/>
<ListBox MaxHeight="300" x:Name="tipBoxShop" SelectionChanged="tipBoxShop_SelectionChanged" Background="{StaticResource Border.Background}">

8
BBWY.Client/Views/SealBox/SealBoxNoConfigureControl.xaml

@ -4,6 +4,8 @@
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.SealBox"
mc:Ignorable="d"
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls"
xmlns:ctr="clr-namespace:BBWY.Client.Converters"
@ -125,6 +127,8 @@
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" >
<ListBox.ItemTemplate>
<DataTemplate>
<Grid MinHeight="100" Width="{Binding ActualWidth,ElementName=listbox_orerSku}">
<Grid>
<Grid.ColumnDefinitions>
@ -137,8 +141,6 @@
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<!--{Binding Logo}-->
<c:BAsyncImage UrlSource="{Binding Logo}"
Width="80" DecodePixelWidth="80"
VerticalAlignment="Top" Margin="11,10,0,10"
@ -155,7 +157,6 @@
</b:EventTrigger>
</b:Interaction.Triggers>
</c:BAsyncImage>
<StackPanel Grid.Column="1" Orientation="Vertical" Margin="8,15,0,10">
<StackPanel Orientation="Horizontal" Margin="0 0 0 13">
<TextBlock Text="SKU:" Style="{StaticResource middleTextBlock}" />
@ -254,6 +255,7 @@
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</UserControl>

Loading…
Cancel
Save