Browse Source

Merge branch 'master' of http://code.qiyue666.com/pengcong001/bbwy

AddValidOverTime
shanji 2 years ago
parent
commit
6769666078
  1. 4
      BBWY.Client/BBWYAppSettings.json
  2. 43
      BBWY.Client/Helpers/ImageHelper.cs
  3. 11
      BBWY.Client/ViewModels/PackTask/PackDetailViewModel.cs
  4. 6
      BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs
  5. 2
      BBWY.Client/ViewModels/SealBox/SealBoxConfigureViewModel.cs
  6. 4
      BBWY.Client/Views/PackTask/WaitPackageControl.xaml
  7. 21
      BBWY.Client/Views/PackTask/WareHouseListControl.xaml
  8. 4
      BBWY.Client/Views/QualityTask/WaitQualityControl.xaml
  9. 16
      BBWY.Client/Views/SealBox/SealBoxNoConfigureControl.xaml

4
BBWY.Client/BBWYAppSettings.json

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

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> /// </summary>
private void UpLoadPack(object obj) 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; return;
} }
if (PackUserModelList != null && PackUserModelList.Count > 0) if (PackUserModelList != null && PackUserModelList.Count > 0)
{ {
if (PackUserModelList.Any(p => p.SelectUserId.IsNullOrEmpty() || p.TaskCount <= 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), AcceptUserName = string.Join("|", item.AcceptUserNames),
DepartmentName = item.DepartmentName, DepartmentName = item.DepartmentName,
SealBoxSkus = item.SealBoxSkus.Select(s => SealBoxSkus = item.SealBoxSkus,
{
s.Logo = s.Logo;
return s;
}).ToList(),
ShopId = item.ShopId, ShopId = item.ShopId,
ShopName = item.ShopName, ShopName = item.ShopName,

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

@ -691,7 +691,7 @@ namespace BBWY.Client.ViewModels.SealBox
SkuId = sealBoxConfigureModel.SkuId, SkuId = sealBoxConfigureModel.SkuId,
TaskId = sealBoxConfigureModel.TaskId, TaskId = sealBoxConfigureModel.TaskId,
TotalCount = sealBoxConfigureModel.SkuCount, 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, Count = x.Count,
WareId = x.WareId, 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}" 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" 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}"/> <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}" 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="店铺名称" <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}"/> <ListBox MaxHeight="300" x:Name="tipBoxShop" SelectionChanged="tipBoxShop_SelectionChanged" Background="{StaticResource Border.Background}"/>

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

@ -30,11 +30,11 @@
</UserControl.Resources> </UserControl.Resources>
<Grid> <Grid>
<StackPanel Panel.ZIndex="100" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Vertical" Margin="590,15,0,0" <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}" 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}"> <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}" 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="店铺名称" <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}"> <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}" /> <ComboBox BorderThickness="0" Width="80" VerticalContentAlignment="Center" ItemsSource="{Binding SelectShopList}" HorizontalContentAlignment="Center" Text="{Binding SelectShop ,Mode=TwoWay}" />
<UniformGrid Width="150" Rows="1" Columns="1"> <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> </UniformGrid>
</StackPanel> </StackPanel>
</Border> </Border>
@ -131,7 +124,7 @@
<c:BTextBox Name="btbShopName" Width="150" Visibility="Hidden" Margin="5,0,0,0" />--> <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"> <StackPanel Orientation="Horizontal">
<ComboBox Width="125" BorderThickness="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" ItemsSource="{Binding SelectExpressList}" Text="{Binding SelectExpress }"/> <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"> <UniformGrid Width="150" Margin="0,0,0,0" Rows="1" Columns="1">
@ -146,12 +139,12 @@
</StackPanel> </StackPanel>
</Border> </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}" Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=未到货:Visible:Collapsed}"
> >
<Rectangle Stroke="{StaticResource Border.Brush}" StrokeThickness="1"/> <Rectangle Stroke="{StaticResource Border.Brush}" StrokeThickness="1"/>
<StackPanel Orientation="Horizontal" Margin="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"> <UniformGrid Width="150" Margin="0,0,0,0" Rows="1" Columns="1">
<c:BTextBox Width="150" Text="{Binding SearchSkuTitle,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="模糊搜索" <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}" 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}" 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" 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}"/> <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}" 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="店铺名称" <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}"> <ListBox MaxHeight="300" x:Name="tipBoxShop" SelectionChanged="tipBoxShop_SelectionChanged" Background="{StaticResource Border.Background}">

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

@ -4,8 +4,10 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BBWY.Client.Views.SealBox" xmlns:local="clr-namespace:BBWY.Client.Views.SealBox"
mc:Ignorable="d" mc:Ignorable="d"
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls"
xmlns:ctr="clr-namespace:BBWY.Client.Converters" xmlns:ctr="clr-namespace:BBWY.Client.Converters"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:cmodel="clr-namespace:BBWY.Client.Models" xmlns:cmodel="clr-namespace:BBWY.Client.Models"
@ -65,7 +67,7 @@
<!--<Border Height="1" VerticalAlignment="Top" Background="{StaticResource Border.Brush}" Grid.ColumnSpan="6"/>--> <!--<Border Height="1" VerticalAlignment="Top" Background="{StaticResource Border.Brush}" Grid.ColumnSpan="6"/>-->
</Grid> </Grid>
</Border> </Border>
<ListBox x:Name="listbox_order" <ListBox x:Name="listbox_order"
Grid.Row="7" Grid.Row="7"
ItemsSource="{Binding WareNoSealBoxModels}" ItemsSource="{Binding WareNoSealBoxModels}"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
@ -119,12 +121,14 @@
<ColumnDefinition MinWidth="80"/> <ColumnDefinition MinWidth="80"/>
<ColumnDefinition Width="100"/> <ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ListBox x:Name="listbox_orerSku" ItemsSource="{Binding SealBoxSkus}" Grid.ColumnSpan="2" <ListBox x:Name="listbox_orerSku" ItemsSource="{Binding SealBoxSkus}" Grid.ColumnSpan="2"
Style="{StaticResource NoScrollViewListBoxStyle}" Style="{StaticResource NoScrollViewListBoxStyle}"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" > ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" >
<ListBox.ItemTemplate> <ListBox.ItemTemplate>
<DataTemplate> <DataTemplate>
<Grid MinHeight="100" Width="{Binding ActualWidth,ElementName=listbox_orerSku}"> <Grid MinHeight="100" Width="{Binding ActualWidth,ElementName=listbox_orerSku}">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@ -137,9 +141,7 @@
<ColumnDefinition/> <ColumnDefinition/>
<ColumnDefinition/> <ColumnDefinition/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<c:BAsyncImage UrlSource="{Binding Logo}"
<!--{Binding Logo}-->
<c:BAsyncImage UrlSource="{Binding Logo}"
Width="80" DecodePixelWidth="80" Width="80" DecodePixelWidth="80"
VerticalAlignment="Top" Margin="11,10,0,10" VerticalAlignment="Top" Margin="11,10,0,10"
Cursor="Hand"> Cursor="Hand">
@ -155,7 +157,6 @@
</b:EventTrigger> </b:EventTrigger>
</b:Interaction.Triggers> </b:Interaction.Triggers>
</c:BAsyncImage> </c:BAsyncImage>
<StackPanel Grid.Column="1" Orientation="Vertical" Margin="8,15,0,10"> <StackPanel Grid.Column="1" Orientation="Vertical" Margin="8,15,0,10">
<StackPanel Orientation="Horizontal" Margin="0 0 0 13"> <StackPanel Orientation="Horizontal" Margin="0 0 0 13">
<TextBlock Text="SKU:" Style="{StaticResource middleTextBlock}" /> <TextBlock Text="SKU:" Style="{StaticResource middleTextBlock}" />
@ -254,6 +255,7 @@
</DataTemplate> </DataTemplate>
</ListBox.ItemTemplate> </ListBox.ItemTemplate>
</ListBox> </ListBox>
</Grid> </Grid>
</UserControl> </UserControl>

Loading…
Cancel
Save