Browse Source

1

AddValidOverTime
506583276@qq.com 2 years ago
parent
commit
b43efd19ff
  1. 4
      BBWY.Client/BBWYAppSettings.json
  2. 2
      BBWY.Client/Models/BatchPurchase/BatchPublishTask.cs
  3. 2
      BBWY.Client/ViewModels/BatchPurchase/BatchPublishTaskViewModel.cs
  4. 17
      BBWY.Client/ViewModels/PackTask/PackTaskTotalViewModel.cs
  5. 11
      BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs
  6. 14
      BBWY.Client/Views/BatchPurchase/BatchPublishTaskWindow.xaml
  7. 4
      BBWY.Client/Views/BatchPurchase/BatchPurchaseOrderList.xaml
  8. 27
      BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs

4
BBWY.Client/BBWYAppSettings.json

@ -1,6 +1,6 @@
{ {
//"BBWYApiHost": "http://localhost:5000", "BBWYApiHost": "http://localhost:5000",
"BBWYApiHost": "http://bbwytest.qiyue666.com", //"BBWYApiHost": "http://bbwytest.qiyue666.com",
"MDSApiHost": "http://mdsapi.qiyue666.com", "MDSApiHost": "http://mdsapi.qiyue666.com",
"JOSApiHost": "", "JOSApiHost": "",
"1688ApiHost": "", "1688ApiHost": "",

2
BBWY.Client/Models/BatchPurchase/BatchPublishTask.cs

@ -381,7 +381,7 @@ namespace BBWY.Client.Models
{ {
return; return;
} }
Logo = skuResponse.Data[0].Logo; Logo = skuResponse.Data[0].Logo.Replace("80x80", "200x200");
SkuName = skuResponse.Data[0].Title; SkuName = skuResponse.Data[0].Title;

2
BBWY.Client/ViewModels/BatchPurchase/BatchPublishTaskViewModel.cs

@ -153,7 +153,7 @@ namespace BBWY.Client.ViewModels
model.packTaskService = packTaskService; model.packTaskService = packTaskService;
model.SkuId = item.SkuId; model.SkuId = item.SkuId;
model.SkuCount = item.Quantity.Value; model.SkuCount = item.Quantity.Value;
model.Logo = item.Logo; model.Logo = item.Logo.Replace("80x80", "200x200");
model.SpuId = item.ProductId; model.SpuId = item.ProductId;
model.SkuName = item.SkuTitle; model.SkuName = item.SkuTitle;
model.SearchSku(item.SkuId); model.SearchSku(item.SkuId);

17
BBWY.Client/ViewModels/PackTask/PackTaskTotalViewModel.cs

@ -72,7 +72,7 @@ namespace BBWY.Client.ViewModels.PackTask
public ICommand BatchCheckedCommand { get; set; } public ICommand BatchCheckedCommand { get; set; }
public ICommand CopyTextCommand { get; set; }
public PackTaskTotalViewModel(PackTaskService packTaskService) public PackTaskTotalViewModel(PackTaskService packTaskService)
{ {
@ -80,6 +80,8 @@ namespace BBWY.Client.ViewModels.PackTask
SearchTaskTotalCommand = new RelayCommand(SearchTaskTotal); SearchTaskTotalCommand = new RelayCommand(SearchTaskTotal);
StartDate = DateTime.Now;
EndDate = DateTime.Now;
SetSearchDateCommand = new RelayCommand<int>(d => SetSearchDateCommand = new RelayCommand<int>(d =>
{ {
@ -95,19 +97,6 @@ namespace BBWY.Client.ViewModels.PackTask
}); });
BatchCheckedCommand = new RelayCommand(BatchCheck); BatchCheckedCommand = new RelayCommand(BatchCheck);
CopyTextCommand = new RelayCommand<object>((obj) =>
{
try
{
Clipboard.SetText(obj.ToString());
}
catch (Exception ex)
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine(ex);
Console.ResetColor();
}
});
BatchSettleCommand = new RelayCommand(BatchSettle); BatchSettleCommand = new RelayCommand(BatchSettle);
SettleCommand = new RelayCommand<long>(SettleTask); SettleCommand = new RelayCommand<long>(SettleTask);
ExportCommand = new RelayCommand(Export); ExportCommand = new RelayCommand(Export);

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

@ -242,15 +242,8 @@ namespace BBWY.Client.ViewModels.PackTask
///修改完成 ///修改完成
var model = packTaskService.UpdateTaskStatus(taskId, 1,orderId); var model = packTaskService.UpdateTaskStatus(taskId, 1,orderId);
if (model != null && model.Success&&!string.IsNullOrEmpty(orderId)) if (model != null && model.Success&&!string.IsNullOrEmpty(orderId))
{ SearchTaskList();
if (model.Data != null && Convert.ToBoolean(model.Data))
{
//var res = batchPurchaseService.UpdatePurchaseOrderState(orderId, Models.PurchaseOrderState.待结算);
//if (res.Success)
new TipsWindow("修改成功").Show();
}
}
} }
public void SetTaskState(TaskState? taskState) public void SetTaskState(TaskState? taskState)

14
BBWY.Client/Views/BatchPurchase/BatchPublishTaskWindow.xaml

@ -63,13 +63,13 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="1"/> <Border Width="1" HorizontalAlignment="Left" Background="{StaticResource Border.Brush}" Grid.Column="1"/>
<StackPanel Orientation="Vertical" Grid.Column="0"> <StackPanel Orientation="Vertical" Grid.Column="0">
<c:BAsyncImage UrlSource="{Binding Logo}" <c:BAsyncImage UrlSource="{Binding Logo}"
Width="150" DecodePixelWidth="150" Width="150" DecodePixelWidth="150"
VerticalAlignment="Top" Margin="25 13 25 13" VerticalAlignment="Top" Margin="25 13 25 13"
Cursor="Hand"> Cursor="Hand">
<b:Interaction.Triggers> <b:Interaction.Triggers>
<b:EventTrigger EventName="PreviewMouseLeftButtonDown"> <b:EventTrigger EventName="PreviewMouseLeftButtonDown">
<b:InvokeCommandAction Command="{Binding DataContext.OpenSkuDetailCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page}}}"> <b:InvokeCommandAction Command="{Binding DataContext.OpenSkuDetailCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Window}}}">
<b:InvokeCommandAction.CommandParameter> <b:InvokeCommandAction.CommandParameter>
<MultiBinding Converter="{StaticResource mptConverter}"> <MultiBinding Converter="{StaticResource mptConverter}">
<Binding Path="SkuId"/> <Binding Path="SkuId"/>
@ -134,10 +134,10 @@
</ComboBox> </ComboBox>
</StackPanel> </StackPanel>
<TextBox HorizontalAlignment="Left" Text="{Binding MarkMessage}" VerticalAlignment="Top" Height="100" Width="350" <c:BTextBox HorizontalAlignment="Left" Text="{Binding MarkMessage}" VerticalAlignment="Top" Height="100" Width="350"
Margin="400 64 0 0 " AcceptsReturn="True" TextWrapping="Wrap"> WaterRemark="备注信息" Margin="400 64 0 0 " AcceptsReturn="True" TextWrapping="Wrap">
</TextBox> </c:BTextBox>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Top" Height="25" <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Top" Height="25"
Margin="19 118 0 0"> Margin="19 118 0 0">
<TextBlock Text="落仓去向:" VerticalAlignment="Center"/> <TextBlock Text="落仓去向:" VerticalAlignment="Center"/>
@ -155,10 +155,10 @@
<ColumnDefinition Width="77"/> <ColumnDefinition Width="77"/>
<ColumnDefinition MinWidth="77"/> <ColumnDefinition MinWidth="77"/>
<ColumnDefinition Width="77"/> <ColumnDefinition Width="77"/>
<ColumnDefinition Width="100"/> <ColumnDefinition Width="140"/>
<ColumnDefinition Width="77"/>
<ColumnDefinition Width="77"/> <ColumnDefinition Width="77"/>
<ColumnDefinition Width="77"/> <ColumnDefinition Width="77"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="35"/> <RowDefinition Height="35"/>

4
BBWY.Client/Views/BatchPurchase/BatchPurchaseOrderList.xaml

@ -103,7 +103,7 @@
<Button Content="搜索" Width="50" VerticalAlignment="Stretch" Margin="5,0,0,0" Command="{Binding SearchPurchaseOrderCommand}" <Button Content="搜索" Width="50" VerticalAlignment="Stretch" Margin="5,0,0,0" Command="{Binding SearchPurchaseOrderCommand}"
Grid.RowSpan="2" Background="{StaticResource Button.Selected.Background}" BorderThickness="0" Foreground="White"/> Grid.RowSpan="2" Background="{StaticResource Button.Selected.Background}" BorderThickness="0" Foreground="White"/>
<Button Content="导出" Command="{Binding ExportCommand}" Width="50" Grid.Column="1" <Button Content="导出" Command="{Binding ExportCommand}" Width="50" Grid.Column="1"
Visibility="{Binding Visibility,ElementName=listbox_order}" Background="#1CC2A2" BorderThickness="0" Foreground="White"/> Visibility="{Binding Visibility,ElementName=listbox_purchaseOrder}" Background="#1CC2A2" BorderThickness="0" Foreground="White"/>
<!--<Button Content="同步" Command="{Binding SyncOrderCommand}" Width="50" Grid.Column="1" Grid.Row="1" <!--<Button Content="同步" Command="{Binding SyncOrderCommand}" Width="50" Grid.Column="1" Grid.Row="1"
Visibility="{Binding Visibility,ElementName=listbox_order}" Background="#02A7F0" BorderThickness="0" Foreground="White"/>--> Visibility="{Binding Visibility,ElementName=listbox_order}" Background="#02A7F0" BorderThickness="0" Foreground="White"/>-->
</Grid> </Grid>
@ -241,7 +241,7 @@
Foreground="{StaticResource Text.Color}"> Foreground="{StaticResource Text.Color}">
<ListBox.ItemTemplate> <ListBox.ItemTemplate>
<DataTemplate> <DataTemplate>
<Grid Width="{Binding ActualWidth,ElementName=listbox_orerSku}"> <Grid Width="{Binding ActualWidth,ElementName=listbox_purchaseOrderSku}">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="90"/> <ColumnDefinition Width="90"/>
<ColumnDefinition/> <ColumnDefinition/>

27
BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs

@ -439,16 +439,6 @@ namespace BBWY.Server.Business
}; };
} }
public UpdatePackStateResponse UpdatePackState(UpdatePackStateRequest request)
{
var order = fsql.Select<PurchaseOrderV2>().Where(p => p.Id == request.OrderId).ToOne();
fsql.Update<PurchaseOrderV2>(order)
.Set(a => a.PackState, request.PackState)
.ExecuteAffrows();
return new UpdatePackStateResponse();
}
public UpdatePackStateResponse UpdatePurchaseOrderState(UpdatePurchaseOrderStateRequest request) public UpdatePackStateResponse UpdatePurchaseOrderState(UpdatePurchaseOrderStateRequest request)
{ {
@ -461,22 +451,5 @@ namespace BBWY.Server.Business
return new UpdatePackStateResponse(); return new UpdatePackStateResponse();
} }
public UpdatePackStateResponse UpdatePackMoney(UpdatePackMoneyRequest request)
{
var skuOrder = fsql.Select<PurchaseOrderSku>().Where(p => p.SkuId == request.SkuId && p.PurchaseOrderId == request.OrderId).ToOne();
fsql.Update<PurchaseOrderSku>(skuOrder)
.Set(p => p.ConsumableAmount, request.PackMoney)
.ExecuteAffrows();//设置sku耗材费
var orderSkus = fsql.Select<PurchaseOrderSku>().Where(p => p.PurchaseOrderId == request.OrderId).ToList();
var order = fsql.Select<PurchaseOrderV2>().Where(p => p.Id == request.OrderId).ToOne();
fsql.Update<PurchaseOrderV2>(order)
.Set(a => a.ConsumableAmount, orderSkus.Select(o => o.ConsumableAmount).Sum())
.ExecuteAffrows();//设置订单耗材费
return new UpdatePackStateResponse();
}
} }
} }

Loading…
Cancel
Save