99 changed files with 4579 additions and 1213 deletions
@ -0,0 +1,96 @@ |
|||
using BBWYB.Client.APIServices; |
|||
using BBWYB.Client.Models; |
|||
using BBWYB.Client.Views; |
|||
using BBWYB.Common.Extensions; |
|||
using BBWYB.Common.Models; |
|||
using CommunityToolkit.Mvvm.Messaging; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using System.Windows; |
|||
|
|||
namespace BBWYB.Client.ViewModels |
|||
{ |
|||
public class WebVM : BaseVM, IDenpendency |
|||
{ |
|||
private MdsApiService mdsApiService; |
|||
private MenuModel selectedMenuModel; |
|||
private bool isLoading; |
|||
ShopService shopService; |
|||
public GlobalContext GlobalContext { get; set; } |
|||
public bool IsLoading { get => isLoading; set { SetProperty(ref isLoading, value); } } |
|||
|
|||
public WebVM(GlobalContext globalContext, |
|||
MdsApiService mdsApiService, |
|||
ShopService shopService) |
|||
{ |
|||
this.mdsApiService = mdsApiService; |
|||
this.GlobalContext = globalContext; |
|||
this.shopService = shopService; |
|||
Task.Factory.StartNew(Login); |
|||
} |
|||
|
|||
private void Login() |
|||
{ |
|||
IsLoading = true; |
|||
try |
|||
{ |
|||
var mdsUserResponse = mdsApiService.GetUserInfo(GlobalContext.UserToken); |
|||
if (!mdsUserResponse.Success) |
|||
throw new Exception($"获取磨刀石用户信息失败 {mdsUserResponse.Msg}"); |
|||
|
|||
|
|||
GlobalContext.User = mdsUserResponse.Data.Map<User>(); |
|||
GlobalContext.User.Token = GlobalContext.UserToken; |
|||
GlobalContext.User.SonDepartmentNames = string.Empty; |
|||
if (mdsUserResponse.Data.SonDepartmentList != null && mdsUserResponse.Data.SonDepartmentList.Count > 0) |
|||
GlobalContext.User.SonDepartmentNames = string.Join(',', mdsUserResponse.Data.SonDepartmentList.Select(sd => sd.DepartmentName)); |
|||
|
|||
var res = shopService.GetDepartmentList(); |
|||
if (!res.Success) |
|||
throw new Exception(res.Msg); |
|||
var allDepartmentList = res.Data.Map<IList<Department>>(); |
|||
|
|||
|
|||
var shopList = new List<Shop>(); |
|||
foreach (var d in allDepartmentList) |
|||
shopList.AddRange(d.ShopList); |
|||
GlobalContext.User.ShopList = shopList; |
|||
|
|||
|
|||
IList<Department> departmentList = null; |
|||
|
|||
//var response = mdsApiService.GetShopDetailList();
|
|||
//if (!response.Success)
|
|||
// throw new Exception(response.Msg);
|
|||
departmentList = allDepartmentList.Where(d => d.Name.Contains("供应链")).ToList(); |
|||
if (departmentList.Count == 0) |
|||
throw new Exception("缺少有效的部门数据"); |
|||
|
|||
var shopIds = new List<string>(); |
|||
foreach (var d in departmentList) |
|||
{ |
|||
if (d.ShopList != null && d.ShopList.Count > 0) |
|||
{ |
|||
foreach (var s in d.ShopList) |
|||
shopIds.Add(s.ShopId.ToString()); |
|||
} |
|||
} |
|||
|
|||
GlobalContext.User.DepartmentList = departmentList; |
|||
WeakReferenceMessenger.Default.Send(new Message_WebB_LoginCompleted(null)); |
|||
IsLoading = false; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
IsLoading = false; |
|||
App.Current.Dispatcher.Invoke(() => |
|||
{ |
|||
MessageBox.Show(ex.Message, "登录失败"); |
|||
}); |
|||
Environment.Exit(Environment.ExitCode); |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,25 @@ |
|||
<c:BWindow x:Class="BBWYB.Client.Views.Web" |
|||
xmlns:c="clr-namespace:SJ.Controls;assembly=SJ.Controls" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|||
xmlns:local="clr-namespace:BBWYB.Client.Views" |
|||
mc:Ignorable="d" |
|||
Style="{StaticResource bwstyle}" |
|||
DataContext="{Binding WebVM,Source={StaticResource Locator}}" |
|||
Title="Web" Height="450" Width="800"> |
|||
<Grid x:Name="grid"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="30"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}"> |
|||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,0,0,0"> |
|||
<TextBlock Text="{Binding GlobalContext.User.Name}"/> |
|||
<TextBlock Text="{Binding GlobalContext.BBWYBApiVersion}" Margin="5,0,0,0"/> |
|||
</StackPanel> |
|||
</Border> |
|||
<c:RoundWaitProgress Play="{Binding IsLoading}" Panel.ZIndex="999" Grid.RowSpan="2"/> |
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,83 @@ |
|||
using CommunityToolkit.Mvvm.Messaging; |
|||
using CommunityToolkit.Mvvm.Messaging.Messages; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using SJ.Controls; |
|||
using System.Windows; |
|||
using System.Windows.Controls; |
|||
|
|||
namespace BBWYB.Client.Views |
|||
{ |
|||
/// <summary>
|
|||
/// Web.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class Web : BWindow |
|||
{ |
|||
private WebView2Manager w2m; |
|||
private bool isNavigated; |
|||
private GlobalContext globalContext; |
|||
|
|||
public Web() |
|||
{ |
|||
InitializeComponent(); |
|||
this.Width = SystemParameters.WorkArea.Size.Width * 0.8; |
|||
this.Height = SystemParameters.WorkArea.Size.Height * 0.7; |
|||
var sp = (App.Current as App).ServiceProvider; |
|||
using (var s = sp.CreateScope()) |
|||
{ |
|||
w2m = s.ServiceProvider.GetRequiredService<WebView2Manager>(); |
|||
globalContext = s.ServiceProvider.GetRequiredService<GlobalContext>(); |
|||
} |
|||
|
|||
WeakReferenceMessenger.Default.Register<Message_WebB_LoginCompleted>(this, (o, x) => |
|||
{ |
|||
this.Dispatcher.BeginInvoke(initWebView); |
|||
}); |
|||
} |
|||
|
|||
private void Web_Loaded(object sender, System.Windows.RoutedEventArgs e) |
|||
{ |
|||
|
|||
|
|||
} |
|||
|
|||
private void initWebView() |
|||
{ |
|||
#if DEBUG
|
|||
var url = "http://192.168.1.2:8080"; |
|||
var registerName = "webTestContext"; |
|||
//var url = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "s.html");
|
|||
#else
|
|||
var url = "http://qtbbwy.qiyue666.com"; |
|||
var registerName = "webContext"; |
|||
#endif
|
|||
//var url = "http://qtbbwy.qiyue666.com";
|
|||
w2m.CoreWebView2InitializationCompleted = (e) => |
|||
{ |
|||
w2m.wb2.CoreWebView2.AddHostObjectToScript(registerName, this.globalContext); |
|||
isNavigated = true; |
|||
w2m.wb2.CoreWebView2.Navigate(url); |
|||
}; |
|||
|
|||
|
|||
w2m.Init("bbwyb_web"); |
|||
w2m.wb2.SetValue(Grid.RowProperty, 1); |
|||
w2m.wb2.Margin = new Thickness(1, 0, 1, 0); |
|||
//grid.Children.Clear();
|
|||
grid.Children.Add(w2m.wb2); |
|||
|
|||
if (w2m.IsInitializationCompleted && !isNavigated) |
|||
{ |
|||
w2m.wb2.CoreWebView2.Navigate(url); |
|||
//w2m.wb2.CoreWebView2.NavigateToString(content);
|
|||
isNavigated = true; |
|||
} |
|||
} |
|||
} |
|||
|
|||
public class Message_WebB_LoginCompleted : ValueChangedMessage<object> |
|||
{ |
|||
public Message_WebB_LoginCompleted(object value) : base(value) |
|||
{ |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,14 @@ |
|||
<Page x:Class="BBWYB.Client.Views.WebB.WebB_GoodsSource" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|||
xmlns:local="clr-namespace:BBWYB.Client.Views.WebB" |
|||
mc:Ignorable="d" |
|||
d:DesignHeight="450" d:DesignWidth="800" |
|||
Title="WebB"> |
|||
|
|||
<Grid x:Name="grid"> |
|||
|
|||
</Grid> |
|||
</Page> |
@ -0,0 +1,104 @@ |
|||
using CommunityToolkit.Mvvm.Messaging; |
|||
using CommunityToolkit.Mvvm.Messaging.Messages; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using System.Windows; |
|||
using System.Windows.Controls; |
|||
|
|||
namespace BBWYB.Client.Views.WebB |
|||
{ |
|||
/// <summary>
|
|||
/// WebB.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class WebB_GoodsSource : Page |
|||
{ |
|||
private WebView2Manager w2m; |
|||
private bool isNavigated; |
|||
|
|||
private GlobalContext globalContext; |
|||
|
|||
public WebB_GoodsSource() |
|||
{ |
|||
InitializeComponent(); |
|||
this.Loaded += WebB_Loaded; |
|||
this.Unloaded += WebB_Unloaded; |
|||
|
|||
//WeakReferenceMessenger.Default.Register<Message_WebB_Refresh>(this, (o, x) =>
|
|||
//{
|
|||
// this.Dispatcher.Invoke(() =>
|
|||
// {
|
|||
// _ = w2m.wb2.ExecuteScriptAsync("window.location.reload();");
|
|||
// });
|
|||
//});
|
|||
|
|||
//WeakReferenceMessenger.Default.Register<Message_WebB_RefreshPack>(this, (o, x) =>
|
|||
//{
|
|||
// this.Dispatcher.Invoke(() =>
|
|||
// {
|
|||
// _ = w2m.wb2.ExecuteScriptAsync("window.BBWY_B_WebContex('PACK_CONFIG_SUCCESS');");
|
|||
// });
|
|||
//});
|
|||
} |
|||
|
|||
private void WebB_Unloaded(object sender, RoutedEventArgs e) |
|||
{ |
|||
grid.Children.Remove(w2m.wb2); |
|||
//w2m.wb2.Dispose();
|
|||
w2m.Close(); |
|||
WeakReferenceMessenger.Default.UnregisterAll(this); |
|||
} |
|||
|
|||
private void WebB_Loaded(object sender, System.Windows.RoutedEventArgs e) |
|||
{ |
|||
var sp = (App.Current as App).ServiceProvider; |
|||
using (var s = sp.CreateScope()) |
|||
{ |
|||
w2m = s.ServiceProvider.GetRequiredService<WebView2Manager>(); |
|||
globalContext = s.ServiceProvider.GetRequiredService<GlobalContext>(); |
|||
} |
|||
|
|||
#if DEBUG
|
|||
var url = "http://192.168.1.2:8080/#/goods-source"; |
|||
var registerName = "webTestContext"; |
|||
//var url = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "s.html");
|
|||
#else
|
|||
var url = "http://qtbbwy.qiyue666.com/#/goods-source"; |
|||
var registerName = "webContext"; |
|||
#endif
|
|||
w2m.CoreWebView2InitializationCompleted = (e) => |
|||
{ |
|||
w2m.wb2.CoreWebView2.AddHostObjectToScript(registerName, this.globalContext); |
|||
isNavigated = true; |
|||
w2m.wb2.CoreWebView2.Navigate(url); |
|||
}; |
|||
|
|||
|
|||
w2m.Init("bbwyb_web"); |
|||
w2m.wb2.SetValue(Grid.RowProperty, 1); |
|||
w2m.wb2.Margin = new Thickness(1, 0, 1, 0); |
|||
//grid.Children.Clear();
|
|||
grid.Children.Add(w2m.wb2); |
|||
|
|||
if (w2m.IsInitializationCompleted && !isNavigated) |
|||
{ |
|||
w2m.wb2.CoreWebView2.Navigate(url); |
|||
//w2m.wb2.CoreWebView2.NavigateToString(content);
|
|||
isNavigated = true; |
|||
} |
|||
} |
|||
} |
|||
|
|||
|
|||
//public class Message_WebB_GoodsSource_Refresh : ValueChangedMessage<object>
|
|||
//{
|
|||
// public Message_WebB_GoodsSource_Refresh(object value) : base(value)
|
|||
// {
|
|||
// }
|
|||
//}
|
|||
|
|||
//public class Message_WebB_GoodsSource_RefreshPack : ValueChangedMessage<object>
|
|||
//{
|
|||
// public Message_WebB_GoodsSource_RefreshPack(object value) : base(value)
|
|||
// {
|
|||
// }
|
|||
//}
|
|||
} |
@ -0,0 +1,25 @@ |
|||
using BBWYB.Server.Business.JD; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
|
|||
namespace BBWYB.Server.API.Controllers |
|||
{ |
|||
|
|||
public class JDController : BaseApiController |
|||
{ |
|||
private JDBusiness jdBusiness; |
|||
|
|||
public JDController(IHttpContextAccessor httpContextAccessor, JDBusiness jdBusiness) : base(httpContextAccessor) |
|||
{ |
|||
this.jdBusiness = jdBusiness; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 检查入仓采购单
|
|||
/// </summary>
|
|||
[HttpPost] |
|||
public void CheckInStoreOrder() |
|||
{ |
|||
jdBusiness.CheckInStoreOrder(); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,223 @@ |
|||
using FreeSql.DataAnnotations; |
|||
|
|||
namespace BBWYB.Server.Model.Db.BBWY |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 采购单表
|
|||
/// </summary>
|
|||
[Table(Name = "purchaseorderv2", DisableSyncStructure = true)] |
|||
public partial class PurchaseOrderV2 |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 采购单号
|
|||
/// </summary>
|
|||
[Column(StringLength = 100, IsPrimary = true, IsNullable = false)] |
|||
public string Id { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 拳探订单独有Sn号
|
|||
/// </summary>
|
|||
[Column(StringLength = 50)] |
|||
public string OrderSn { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 完成时间
|
|||
/// </summary>
|
|||
[Column(DbType = "datetime")] |
|||
public DateTime? CompletionTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 收货详细地址
|
|||
/// </summary>
|
|||
|
|||
public string ConsigneeAddress { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 收货市
|
|||
/// </summary>
|
|||
[Column(StringLength = 30)] |
|||
public string ConsigneeCity { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 收货联系人名称
|
|||
/// </summary>
|
|||
[Column(StringLength = 50)] |
|||
public string ConsigneeContactName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 收货区
|
|||
/// </summary>
|
|||
[Column(StringLength = 30)] |
|||
public string ConsigneeCounty { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 收货联系人电话
|
|||
/// </summary>
|
|||
[Column(StringLength = 50)] |
|||
public string ConsigneeMobile { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 收货省
|
|||
/// </summary>
|
|||
[Column(StringLength = 30)] |
|||
public string ConsigneeProvince { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 收货镇
|
|||
/// </summary>
|
|||
[Column(StringLength = 30)] |
|||
public string ConsigneeTown { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 打包耗材费
|
|||
/// </summary>
|
|||
[Column(DbType = "decimal(18,2)")] |
|||
public decimal? ConsumableAmount { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 创建时间
|
|||
/// </summary>
|
|||
[Column(DbType = "datetime")] |
|||
public DateTime? CreateTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 快递公司
|
|||
/// </summary>
|
|||
[Column(StringLength = 100)] |
|||
public string ExpressName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 头程运费
|
|||
/// </summary>
|
|||
[Column(DbType = "decimal(18,2)")] |
|||
public decimal? FirstFreight { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 入仓费
|
|||
/// </summary>
|
|||
[Column(DbType = "decimal(18,2)")] |
|||
public decimal? InStorageAmount { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 是否转入库存
|
|||
/// </summary>
|
|||
|
|||
public bool? IsConvertToStock { get; set; } = false; |
|||
|
|||
/// <summary>
|
|||
/// 是否订阅快递100
|
|||
/// </summary>
|
|||
|
|||
public bool? IsSubscribeKuaiDi100 { get; set; } = false; |
|||
|
|||
/// <summary>
|
|||
/// 采购单状态(待付款=0,待发货=1,待收货=2,待质检=3,待打包=4,待结算=5,已完成=6)
|
|||
/// </summary>
|
|||
[Column(MapType = typeof(int?))] |
|||
public Enums.OrderState? OrderState { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 支付时间
|
|||
/// </summary>
|
|||
[Column(DbType = "datetime")] |
|||
public DateTime? PayTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购货款
|
|||
/// </summary>
|
|||
[Column(DbType = "decimal(18,2)")] |
|||
public decimal? ProductAmount { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 采购账号Id
|
|||
/// </summary>
|
|||
|
|||
public long? PurchaseAccountId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购金额(采购货款+采购运费)
|
|||
/// </summary>
|
|||
[Column(DbType = "decimal(18,2)")] |
|||
public decimal? PurchaseAmount { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 采购运费
|
|||
/// </summary>
|
|||
[Column(DbType = "decimal(18,2)")] |
|||
public decimal? PurchaseFreight { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 采购平台
|
|||
/// </summary>
|
|||
[Column(MapType = typeof(int?))] |
|||
public Enums.Platform? PurchasePlatform { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 商家Id
|
|||
/// </summary>
|
|||
[Column(StringLength = 20)] |
|||
public string PurchaserId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 商家名称
|
|||
/// </summary>
|
|||
[Column(StringLength = 100)] |
|||
public string PurchaserName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 质检费
|
|||
/// </summary>
|
|||
[Column(DbType = "decimal(18,2)")] |
|||
public decimal? QualityInspectionAmount { get; set; } = 0.00M; |
|||
|
|||
/// <summary>
|
|||
/// 备注信息
|
|||
/// </summary>
|
|||
|
|||
public string Remark { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 店铺Id
|
|||
/// </summary>
|
|||
|
|||
public long ShopId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 签收时间
|
|||
/// </summary>
|
|||
[Column(DbType = "datetime")] |
|||
public DateTime? SignTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 快递单号
|
|||
/// </summary>
|
|||
[Column(StringLength = 100)] |
|||
public string WaybillNo { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购方式(线上=0, 线下=1)
|
|||
/// </summary>
|
|||
[Column(MapType = typeof(int))] |
|||
public Enums.PurchaseMethod PurchaseMethod { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购单模式 批发 = 0,代发 = 1
|
|||
/// </summary>
|
|||
[Column(MapType = typeof(int))] |
|||
public Enums.PurchaseOrderMode PurchaseOrderMode { get; set; } |
|||
///// <summary>
|
|||
///// 打包状态 (待发布=0,打包中=1,已完成=2)
|
|||
///// </summary>
|
|||
//[Column(MapType = typeof(int))]
|
|||
//public Enums.PackState PackState { get; set; }
|
|||
|
|||
/// <summary>
|
|||
/// 入仓类型 (发回齐越 = 0, 厂商代发入仓 = 1)
|
|||
/// </summary>
|
|||
[Column(MapType = typeof(int?))] |
|||
public Enums.IntoStoreType? IntoStoreType { get; set; } |
|||
} |
|||
|
|||
} |
@ -0,0 +1,29 @@ |
|||
using FreeSql.DataAnnotations; |
|||
|
|||
namespace BBWYB.Server.Model.Db |
|||
{ |
|||
|
|||
[Table(Name = "instoreorderchecktask", DisableSyncStructure = true)] |
|||
public partial class InStoreOrderCheckTask |
|||
{ |
|||
|
|||
[Column(IsPrimary = true)] |
|||
public long Id { get; set; } |
|||
|
|||
[Column(DbType = "datetime")] |
|||
public DateTime? CreateTime { get; set; } |
|||
|
|||
|
|||
public bool? IsChecked { get; set; } = false; |
|||
|
|||
[Column(StringLength = 50)] |
|||
public string OrderId { get; set; } |
|||
|
|||
[Column(StringLength = 50)] |
|||
public string OrderSn { get; set; } |
|||
|
|||
public long? ShopId { get; set; } |
|||
|
|||
} |
|||
|
|||
} |
@ -1,40 +0,0 @@ |
|||
using FreeSql.DataAnnotations; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using System.Xml.Linq; |
|||
|
|||
namespace BBWYB.Server.Model.Db.PurchaseScheme |
|||
{ |
|||
[Table(Name = "orderpurchaserelationinfo", DisableSyncStructure = true)] |
|||
public class OrderPurchaseRelationInfo |
|||
{ |
|||
[Column( IsPrimary = true)] |
|||
public long Id { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购单Id
|
|||
/// </summary>
|
|||
public string PurchaseOrderId { get; set; } |
|||
/// <summary>
|
|||
/// 订单Id
|
|||
/// </summary>
|
|||
public string OrderId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购方案Id
|
|||
/// </summary>
|
|||
public string SchemeId { get; set; } |
|||
/// <summary>
|
|||
/// 采购spu
|
|||
/// </summary>
|
|||
public string PurchaseProductId { get; set; } |
|||
/// <summary>
|
|||
/// 采购sku
|
|||
/// </summary>
|
|||
public string PurchaseSkuId { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,45 @@ |
|||
using FreeSql.DataAnnotations; |
|||
|
|||
namespace BBWYB.Server.Model.Db |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 采购方案分组表
|
|||
/// </summary>
|
|||
[Table(Name = "purchaseschemegroup", DisableSyncStructure = true)] |
|||
public partial class PurchaseSchemeGroup |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 分组Id
|
|||
/// </summary>
|
|||
[Column(DbType = "bigint", IsPrimary = true)] |
|||
public long Id { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 创建时间
|
|||
/// </summary>
|
|||
[Column(DbType = "datetime")] |
|||
public DateTime? CreateTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 组名
|
|||
/// </summary>
|
|||
[Column(StringLength = 100)] |
|||
public string GroupName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 店铺spu,店铺商品Id
|
|||
/// </summary>
|
|||
[Column(StringLength = 50)] |
|||
public string ProductId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 店铺Id
|
|||
/// </summary>
|
|||
[Column(DbType = "bigint")] |
|||
public long? ShopId { get; set; } |
|||
|
|||
} |
|||
|
|||
} |
@ -0,0 +1,21 @@ |
|||
using FreeSql.DataAnnotations; |
|||
using Newtonsoft.Json; |
|||
|
|||
namespace BBWYB.Server.Model.Db |
|||
{ |
|||
|
|||
[Table(Name = "purchaseschemegroupindex", DisableSyncStructure = true)] |
|||
public partial class PurchaseSchemeGroupIndex |
|||
{ |
|||
[Column(IsPrimary = true)] |
|||
public string ProductId { get; set; } |
|||
|
|||
public DateTime? CreateTime { get; set; } |
|||
|
|||
public int? Index { get; set; } |
|||
|
|||
public long? ShopId { get; set; } |
|||
|
|||
} |
|||
|
|||
} |
@ -0,0 +1,83 @@ |
|||
using FreeSql.DataAnnotations; |
|||
|
|||
namespace BBWYB.Server.Model.Db |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 历史采购方案表
|
|||
/// </summary>
|
|||
[Table(Name = "historypurchasescheme", DisableSyncStructure = true)] |
|||
public partial class HistoryPurchaseScheme |
|||
{ |
|||
/// <summary>
|
|||
/// 历史流水Id
|
|||
/// </summary>
|
|||
[Column(DbType = "bigint", IsPrimary = true)] |
|||
public long HistoryId { get; set; } |
|||
|
|||
[Column(DbType = "datetime")] |
|||
public DateTime? CreateTime { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购默认成本
|
|||
/// </summary>
|
|||
|
|||
public decimal? DefaultCost { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 慧眼标的Id
|
|||
/// </summary>
|
|||
[Column(StringLength = 50)] |
|||
public string HYBDId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 慧眼采购方案Id
|
|||
/// </summary>
|
|||
[Column(StringLength = 50)] |
|||
public string HYSchemeId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购方案Id
|
|||
/// </summary>
|
|||
[Column(DbType = "bigint")] |
|||
public long? Id { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 上次采购成本
|
|||
/// </summary>
|
|||
[Column(DbType = "decimal(18,2)")] |
|||
public decimal? LastPurchasePriceCost { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 上次采购时间
|
|||
/// </summary>
|
|||
[Column(DbType = "datetime")] |
|||
public DateTime? LastPurchaseTime { get; set; } |
|||
|
|||
[Column(StringLength = 50, IsNullable = false)] |
|||
public string ProductId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 方案分组Id
|
|||
/// </summary>
|
|||
[Column(DbType = "bigint")] |
|||
public long? SchemeGroupId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 店铺Id
|
|||
/// </summary>
|
|||
[Column(DbType = "bigint")] |
|||
public long ShopId { get; set; } |
|||
|
|||
[Column(StringLength = 50, IsNullable = false)] |
|||
public string SkuId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购方案版本
|
|||
/// </summary>
|
|||
[Column(DbType = "int")] |
|||
public int? Version { get; set; } = 1; |
|||
|
|||
} |
|||
|
|||
} |
@ -0,0 +1,59 @@ |
|||
using FreeSql.DataAnnotations; |
|||
|
|||
namespace BBWYB.Server.Model.Db |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 采购方案商品表
|
|||
/// </summary>
|
|||
[ Table(Name = "historypurchaseschemeproduct", DisableSyncStructure = true)] |
|||
public partial class HistoryPurchaseSchemeProduct { |
|||
|
|||
/// <summary>
|
|||
/// 历史流水Id
|
|||
/// </summary>
|
|||
[Column(DbType = "bigint", IsPrimary = true)] |
|||
public long HistoryId { get; set; } |
|||
|
|||
[Column(DbType = "datetime")] |
|||
public DateTime? CreateTime { get; set; } |
|||
|
|||
[Column(StringLength = 50)] |
|||
public string ProductId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购商品Id
|
|||
/// </summary>
|
|||
[Column(StringLength = 50)] |
|||
public string PurchaseProductId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 商家Id
|
|||
/// </summary>
|
|||
[Column(StringLength = 50)] |
|||
public string PurchaserId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购商品链接
|
|||
/// </summary>
|
|||
[Column(StringLength = 500)] |
|||
public string PurchaseUrl { get; set; } |
|||
|
|||
[Column(StringLength = 50)] |
|||
public string SkuId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Sku采购方案Id
|
|||
/// </summary>
|
|||
[Column(DbType = "bigint")] |
|||
public long? SkuPurchaseSchemeId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购方案版本
|
|||
/// </summary>
|
|||
[Column(DbType = "int")] |
|||
public int? Version { get; set; } = 1; |
|||
|
|||
} |
|||
|
|||
} |
@ -0,0 +1,72 @@ |
|||
using FreeSql.DataAnnotations; |
|||
|
|||
namespace BBWYB.Server.Model.Db |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 采购方案sku表
|
|||
/// </summary>
|
|||
[Table(Name = "historypurchaseschemeproductsku", DisableSyncStructure = true)] |
|||
public partial class HistoryPurchaseSchemeProductSku { |
|||
|
|||
/// <summary>
|
|||
/// 历史流水Id
|
|||
/// </summary>
|
|||
[Column(DbType = "bigint", IsPrimary = true)] |
|||
public long HistoryId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 实际单价(人工设置)
|
|||
/// </summary>
|
|||
[Column(DbType = "decimal(18,2)")] |
|||
public decimal? ActualPrice { get; set; } = 0.00M; |
|||
|
|||
[Column(DbType = "datetime")] |
|||
public DateTime? CreateTime { get; set; } |
|||
|
|||
|
|||
[Column(StringLength = 50, IsNullable = false)] |
|||
public string ProductId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购商品Id
|
|||
/// </summary>
|
|||
[Column(StringLength = 50, IsNullable = false)] |
|||
public string PurchaseProductId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购比例
|
|||
/// </summary>
|
|||
[Column(DbType = "int")] |
|||
public int? PurchaseRatio { get; set; } = 1; |
|||
|
|||
/// <summary>
|
|||
/// 采购商品的SkuId
|
|||
/// </summary>
|
|||
[Column(StringLength = 50)] |
|||
public string PurchaseSkuId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购商品Sku的SpecId
|
|||
/// </summary>
|
|||
[Column(StringLength = 50)] |
|||
public string PurchaseSkuSpecId { get; set; } |
|||
|
|||
[Column(StringLength = 50, IsNullable = false)] |
|||
public string SkuId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Sku采购方案Id
|
|||
/// </summary>
|
|||
[Column(DbType = "bigint")] |
|||
public long SkuPurchaseSchemeId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购方案版本
|
|||
/// </summary>
|
|||
[Column(DbType = "int")] |
|||
public int? Version { get; set; } = 1; |
|||
|
|||
} |
|||
|
|||
} |
@ -0,0 +1,51 @@ |
|||
namespace BBWYB.Server.Model.Dto |
|||
{ |
|||
public class HYPurchaseScheme |
|||
{ |
|||
/// <summary>
|
|||
/// HY方案Id
|
|||
/// </summary>
|
|||
public int Id { get; set; } |
|||
|
|||
public string TeamitemsId { get; set; } |
|||
|
|||
public string UserId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 配件数量
|
|||
/// </summary>
|
|||
public int SkuCount { get; set; } |
|||
|
|||
public IList<HYPurchaseSchemeProduct> PlanItems { get; set; } |
|||
} |
|||
|
|||
public class HYPurchaseSchemeProduct |
|||
{ |
|||
public string Id { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 慧眼方案Id
|
|||
/// </summary>
|
|||
public int SupplierTaskPlanId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Taobao=0 Jd=1 ALBB=2 PDD=3
|
|||
/// </summary>
|
|||
public int Platform { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购商品Id
|
|||
/// </summary>
|
|||
public string ItemId { get; set; } |
|||
} |
|||
|
|||
public class HYPurchaseSchemeProductSku |
|||
{ |
|||
|
|||
} |
|||
|
|||
public class HYSupplierInfo |
|||
{ |
|||
|
|||
} |
|||
} |
@ -0,0 +1,11 @@ |
|||
namespace BBWYB.Server.Model.Core |
|||
{ |
|||
public class ProportionalCalculationCostResult |
|||
{ |
|||
public string SkuId { get; set; } |
|||
|
|||
public decimal ProductAmount { get; set; } |
|||
|
|||
public decimal FreightAmount { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,8 @@ |
|||
using SDKAdapter.OperationPlatform.Models; |
|||
|
|||
namespace BBWYB.Server.Model.Dto |
|||
{ |
|||
public class QueryBProductRequest: OP_QueryProductSkuRequest |
|||
{ |
|||
} |
|||
} |
@ -0,0 +1,15 @@ |
|||
namespace BBWYB.Server.Model.Dto |
|||
{ |
|||
public class QueryProductSkuPriceRequest |
|||
{ |
|||
public Enums.Platform Platform { get; set; } |
|||
|
|||
public string AppKey { get; set; } |
|||
|
|||
public string AppSecret { get; set; } |
|||
|
|||
public string AppToken { get; set; } |
|||
|
|||
public string Sku { get; set; } |
|||
} |
|||
} |
@ -1,9 +0,0 @@ |
|||
namespace BBWYB.Server.Model.Dto |
|||
{ |
|||
public class DeletePurchaseSchemeRequest |
|||
{ |
|||
public string ProductId { get; set; } |
|||
|
|||
public string PurchaserId { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,11 @@ |
|||
namespace BBWYB.Server.Model.Dto |
|||
{ |
|||
public class DeletePurchaseSkuRequest |
|||
{ |
|||
public long SchemeId { get; set; } |
|||
|
|||
public string SkuId { get; set; } |
|||
|
|||
public string PurchaseSkuId { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,13 @@ |
|||
namespace BBWYB.Server.Model.Dto |
|||
{ |
|||
public class EditPurchaseRatioRequest |
|||
{ |
|||
public long SchemeId { get; set; } |
|||
|
|||
public string SkuId { get; set; } |
|||
|
|||
public string PurchaseSkuId { get; set; } |
|||
|
|||
public int Ratio { get; set; } |
|||
} |
|||
} |
@ -1,27 +1,43 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWYB.Server.Model.Dto |
|||
namespace BBWYB.Server.Model.Dto |
|||
{ |
|||
public class InputPurchaseSchemeProductRequest |
|||
{ |
|||
/// <summary>
|
|||
/// 店铺商品Id
|
|||
/// </summary>
|
|||
public string ProductId { get; set; } |
|||
/// <summary>
|
|||
/// 店铺商品Skull
|
|||
/// </summary>
|
|||
|
|||
public string SkuId { get; set; } |
|||
/// <summary>
|
|||
/// 采购商品id
|
|||
/// 采购商品Id
|
|||
/// </summary>
|
|||
public string PurchaseProductId { get; set; } |
|||
/// <summary>
|
|||
/// 采购链接
|
|||
/// </summary>
|
|||
public string PurchaseUrl { get; set; } |
|||
public IList<InputPurchaseSchemeProductSkuRequest> PurchaseSchemeProductSkuList { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购商Id (1688 SellerUserId)
|
|||
/// </summary>
|
|||
public string PurchaserId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购商Id2 (1688 SellerLoginId)
|
|||
/// </summary>
|
|||
public string PurchaserId2 { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购商名称
|
|||
/// </summary>
|
|||
public string PurchaserName { get; set; } |
|||
/// <summary>
|
|||
/// 采购商发货地
|
|||
/// </summary>
|
|||
public string PurchaserLocation { get; set; } |
|||
|
|||
public string PurchaserMemberId { get; set; } |
|||
|
|||
|
|||
public Enums.Platform? PurchasePlatform { get; set; } |
|||
|
|||
public List<InputPurchaseSchemeProductSkuRequest> PurchaseSchemeProductSkuList { get; set; } |
|||
} |
|||
} |
|||
|
@ -0,0 +1,20 @@ |
|||
namespace BBWYB.Server.Model.Dto |
|||
{ |
|||
public class QuerySchemeAndGroupRequest |
|||
{ |
|||
/// <summary>
|
|||
/// 店铺Id
|
|||
/// </summary>
|
|||
public long ShopId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 店铺商品Id列表
|
|||
/// </summary>
|
|||
public IList<string> ProductIdList { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 是否包含采购配件的基本信息(单价,Logo,标题等) 是=1 否=0或null
|
|||
/// </summary>
|
|||
public int? IncludePurchaseSkuBasicInfo { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,7 @@ |
|||
namespace BBWYB.Server.Model.Dto |
|||
{ |
|||
public class QuerySchemeCountRequest |
|||
{ |
|||
public IList<string> SkuIdList { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,17 @@ |
|||
namespace BBWYB.Server.Model.Dto |
|||
{ |
|||
public class QueryHYSchemeRequest |
|||
{ |
|||
public long ShopId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 店铺商品Id
|
|||
/// </summary>
|
|||
public string ProductId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 慧眼标的Id
|
|||
/// </summary>
|
|||
public string HYBDId { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,16 @@ |
|||
using SDKAdapter.OperationPlatform.Models; |
|||
|
|||
namespace BBWYB.Server.Model.Dto |
|||
{ |
|||
public class BProductResponse : OP_ProductResponse |
|||
{ |
|||
public IList<BProductSkuResponse> SkuList { get; set; } |
|||
} |
|||
|
|||
public class BProductListResponse |
|||
{ |
|||
public int Count { get; set; } |
|||
|
|||
public IList<BProductResponse> Items { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,9 @@ |
|||
using SDKAdapter.OperationPlatform.Models; |
|||
|
|||
namespace BBWYB.Server.Model.Dto |
|||
{ |
|||
public class BProductSkuResponse: OP_ProductSkuResponse |
|||
{ |
|||
public int SchemeCount { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,10 @@ |
|||
namespace BBWYB.Server.Model.Dto |
|||
{ |
|||
public class HYPurchaseSchemeResponse : PurchaseSchemeResponse |
|||
{ |
|||
/// <summary>
|
|||
/// 是否已经添加到SPU之中
|
|||
/// </summary>
|
|||
public bool IsAdded { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,9 @@ |
|||
namespace BBWYB.Server.Model.Dto |
|||
{ |
|||
public class PurchaseSchemeCountResponse |
|||
{ |
|||
public string SkuId { get; set; } |
|||
|
|||
public int SchemeCount { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,9 @@ |
|||
using BBWYB.Server.Model.Db; |
|||
|
|||
namespace BBWYB.Server.Model.Dto |
|||
{ |
|||
public class PurchaseSchemeGroupResponse : PurchaseSchemeGroup |
|||
{ |
|||
public IList<PurchaseSchemeResponse> PurchaseSchemeList { get; set; } |
|||
} |
|||
} |
@ -1,10 +1,26 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace BBWYB.Server.Model.Dto |
|||
namespace BBWYB.Server.Model.Dto |
|||
{ |
|||
public class PurchaseSchemeProductSkuResponse : Model.Db.PurchaseSchemeProductSku |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 采购SKU标题 仅在查询条件IncludePurchaseSkuBasicInfo=1时具备该值
|
|||
/// </summary>
|
|||
public string PurchaseSkuTitle { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购SKULogo 仅在查询条件IncludePurchaseSkuBasicInfo=1时具备该值
|
|||
/// </summary>
|
|||
public string PurchaseSkuLogo { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 采购SKU单价 仅在查询条件IncludePurchaseSkuBasicInfo=1时具备该值
|
|||
/// </summary>
|
|||
public decimal? PurchaseSkuPrice { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 是否失效 失效=1 其余情况默认为有效 仅在查询条件IncludePurchaseSkuBasicInfo=1时具备该值
|
|||
/// </summary>
|
|||
public int? IsInvalid { get; set; } |
|||
} |
|||
} |
|||
|
@ -0,0 +1,36 @@ |
|||
using System; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
namespace WebTest |
|||
{ |
|||
public class ShellExecuteHelper |
|||
{ |
|||
public enum ShowCommands : int |
|||
{ |
|||
SW_HIDE = 0, |
|||
SW_SHOWNORMAL = 1, |
|||
SW_NORMAL = 1, |
|||
SW_SHOWMINIMIZED = 2, |
|||
SW_SHOWMAXIMIZED = 3, |
|||
SW_MAXIMIZE = 3, |
|||
SW_SHOWNOACTIVATE = 4, |
|||
SW_SHOW = 5, |
|||
SW_MINIMIZE = 6, |
|||
SW_SHOWMINNOACTIVE = 7, |
|||
SW_SHOWNA = 8, |
|||
SW_RESTORE = 9, |
|||
SW_SHOWDEFAULT = 10, |
|||
SW_FORCEMINIMIZE = 11, |
|||
SW_MAX = 11 |
|||
} |
|||
|
|||
[DllImport("shell32.dll")] |
|||
public static extern IntPtr ShellExecute( |
|||
IntPtr hwnd, |
|||
string lpOperation, |
|||
string lpFile, |
|||
string lpParameters, |
|||
string lpDirectory, |
|||
ShowCommands nShowCmd); |
|||
} |
|||
} |
Loading…
Reference in new issue