Browse Source

chu li hui iao

qianyi
shanji 3 years ago
parent
commit
a3cff2c0b9
  1. 4
      BBWY.Client/APIServices/PurchaseOrderService.cs
  2. 1
      BBWY.Client/ViewModels/Purchase/1688PreviewPurchaseViewModel.cs
  3. 5
      BBWY.Client/Views/Order/RelationPurchaseOrder.xaml
  4. 9
      BBWY.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs
  5. 5
      BBWY.Server.Model/Db/Order/OrderDropShipping.cs
  6. 2
      BBWY.Server.Model/Db/PurchaseScheme/PurchaseAccount.cs
  7. 5
      BBWY.Server.Model/Dto/Request/PurchaseOrder/OnlinePurchase/CreateOnlinePurchaseOrderRequest.cs

4
BBWY.Client/APIServices/PurchaseOrderService.cs

@ -84,10 +84,12 @@ namespace BBWY.Client.APIServices
/// <param name="purchaseSchemeProductSkuList"></param>
/// <param name="purchasePlatform"></param>
/// <param name="purchaseAccount"></param>
/// <param name="purchaseOrderMode"></param>
/// <param name="tradeMode"></param>
/// <param name="remark"></param>
/// <param name="orderId"></param>
/// <param name="shopId"></param>
/// <param name="purchaseAccountId"></param>
/// <param name="buyerAccount"></param>
/// <param name="sellerAccount"></param>
/// <returns></returns>
@ -100,6 +102,7 @@ namespace BBWY.Client.APIServices
string remark,
string orderId,
long shopId,
long purchaseAccountId,
string buyerAccount,
string sellerAccount)
{
@ -123,6 +126,7 @@ namespace BBWY.Client.APIServices
remark,
orderId,
shopId,
purchaseAccountId,
buyerAccount,
sellerAccount
}, null, HttpMethod.Post);

1
BBWY.Client/ViewModels/Purchase/1688PreviewPurchaseViewModel.cs

@ -292,6 +292,7 @@ namespace BBWY.Client.ViewModels
PrucahseRemark,
orderId,
globalContext.User.Shop.ShopId,
PurchaseAccount.Id,
PurchaseAccount.AccountName,
PurchaseScheme.PurchaserName)).ContinueWith(t =>
{

5
BBWY.Client/Views/Order/RelationPurchaseOrder.xaml

@ -23,8 +23,8 @@
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="0.3*"/>
<RowDefinition Height="0.7*"/>
<RowDefinition Height="130"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="40"/>
</Grid.RowDefinitions>
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}"
@ -99,7 +99,6 @@
</Grid>
<ListBox x:Name="listbox_ordersku" Grid.Row="1"
ItemsSource="{Binding RelationPurchaseOrderSkuList}"
Style="{StaticResource NoScrollViewListBoxStyle}"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
BorderBrush="{StaticResource Border.Brush}"
BorderThickness="1,0,1,1">

9
BBWY.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs

@ -10,6 +10,7 @@ using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
@ -195,6 +196,7 @@ namespace BBWY.Server.Business
var orderDropShipping = new OrderDropShipping()
{
OrderId = createOnlinePurchaseOrderRequest.OrderId,
PurchaseAccountId = createOnlinePurchaseOrderRequest.PurchaseAccountId,
BuyerAccount = createOnlinePurchaseOrderRequest.BuyerAccount,
SellerAccount = createOnlinePurchaseOrderRequest.SellerAccount,
CreateTime = DateTime.Now,
@ -251,8 +253,11 @@ namespace BBWY.Server.Business
#region 查询采购账号
currentProgress = "查询采购账号";
var purchaseAccount = fsql.Select<PurchaseAccount>().Where(pa => pa.AccountName == orderDropshipping.BuyerAccount &&
pa.PurchasePlatformId == callbackPlatform).ToOne();
var purchaseAccountExp = orderDropshipping.PurchaseAccountId != 0 ?
new Func<PurchaseAccount, bool>(pa => pa.Id == orderDropshipping.PurchaseAccountId) :
new Func<PurchaseAccount, bool>(pa => pa.AccountName == orderDropshipping.BuyerAccount);
var purchaseAccount = fsql.Select<PurchaseAccount>().Where(pa => purchaseAccountExp(pa))
.Where(pa => pa.PurchasePlatformId == callbackPlatform).ToOne();
if (purchaseAccount == null)
throw new Exception($"未查询到采购账号{orderDropshipping.BuyerAccount}");
#endregion

5
BBWY.Server.Model/Db/Order/OrderDropShipping.cs

@ -20,6 +20,11 @@ namespace BBWY.Server.Model.Db
[Column(StringLength = 200)]
public string BuyerAccount { get; set; }
/// <summary>
/// 采购账号Id
/// </summary>
public long PurchaseAccountId { get; set; } = 0;
[Column(DbType = "datetime")]
public DateTime? CreateTime { get; set; }

2
BBWY.Server.Model/Db/PurchaseScheme/PurchaseAccount.cs

@ -15,7 +15,7 @@ namespace BBWY.Server.Model.Db
/// 主键
/// </summary>
[Column(StringLength = 50, IsPrimary = true, IsNullable = false)]
public string Id { get; set; }
public long Id { get; set; }
public string AccountName { get; set; }

5
BBWY.Server.Model/Dto/Request/PurchaseOrder/OnlinePurchase/CreateOnlinePurchaseOrderRequest.cs

@ -22,6 +22,11 @@
/// </summary>
public long ShopId { get; set; }
/// <summary>
/// 在线采购账号Id
/// </summary>
public long PurchaseAccountId { get; set; }
/// <summary>
/// 买家账号
/// </summary>

Loading…
Cancel
Save