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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save