买手读单界面优化
This commit is contained in:
1 parent
42f010c925
commit
57441f853c
6 files changed
+169
-31
No files matched your search
@@ -5,7 +5,7 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.BuyerCtrls"
|
||||
mc:Ignorable="d" Loaded="UserControl_Loaded"
|
||||
d:DesignHeight="450" d:DesignWidth="1000">
|
||||
d:DesignHeight="450" d:DesignWidth="1000" x:Name="pddBuyerOrderReadCtrl">
|
||||
<Border BorderBrush="{StaticResource pageColorBrush}" BorderThickness="1,1,0,1" CornerRadius="5,0,0,5" Background="White">
|
||||
|
||||
<Grid>
|
||||
@@ -42,7 +42,65 @@
|
||||
<Button Grid.Column="3" x:Name="btnFilter" Style="{StaticResource BasePageButtonStyle}" Margin="4,0,8,0" Content="过滤" Width="50" Height="24" Click="btnFilter_Click"/>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1" Background="LightGray" x:Name="GridCef">
|
||||
</Grid>
|
||||
<Grid Grid.Row="1" HorizontalAlignment="Left" Margin="2,2,0,334">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="auto"></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Background="White" x:Name="borderPddBuyer" CornerRadius="0,4,4,0" Width="138">
|
||||
<Grid>
|
||||
<ListBox x:Name="lbPddBuyer">
|
||||
<!--使用自定义属性模板去除ListBox高亮显示框-->
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<ContentPresenter Content="{TemplateBinding Content}"
|
||||
ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<!--<local:ShopListRowCtrl></local:ShopListRowCtrl>-->
|
||||
<Border Margin="0,0,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="0, 0, 0, 1" MinHeight="50"
|
||||
BorderBrush="{StaticResource ListRowBorderColorBrush}" CornerRadius="0">
|
||||
<Border.Style>
|
||||
<!-- 鼠标进入或悬停Border时切换颜色(悬停时Border的填充控件必须有填充Border,所在层级不限,仅填充透明Grid则触发器无效) -->
|
||||
<Style TargetType="Border">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="{StaticResource ListRowHoverBackColorBrush}"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
|
||||
<Grid x:Name="gridListItem">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition x:Name="colCheck" Width="25*"></ColumnDefinition>
|
||||
<ColumnDefinition x:Name="colBuyerName" Width="100*"></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox Grid.Column="0" Background="Transparent" HorizontalAlignment="Center" VerticalAlignment="Center" IsChecked="{Binding IsSelect, Mode=TwoWay}" Click="CheckBox_Click"/>
|
||||
<TextBox Grid.Column="1" Background="Transparent" TextWrapping="Wrap" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" IsReadOnly="True" BorderThickness="0" Text="{Binding buyer_nick}" Cursor="Hand" MouseLeftButtonDown="TextBox_MouseLeftButtonDown" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</Border>
|
||||
<Border Grid.Column="1" Panel.ZIndex="-1" CornerRadius="0,5,5,0" Background="{StaticResource pageColorBrush}"
|
||||
VerticalAlignment="Center" Margin="-2,0,0,0" Height="60" Cursor="Hand">
|
||||
<Button Style="{StaticResource BasePageButtonStyle}" Grid.Column="1" Margin="0,0,0,0" Padding="0,0,0,0" Height="60"
|
||||
VerticalContentAlignment="Center" Width="20" Click="btnHideBuyer_Click" Content="◀" x:Name="btnHideBuyer">
|
||||
</Button>
|
||||
</Border>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1" VerticalAlignment="Bottom" Visibility="Visible" Margin="0" Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
|
||||
@@ -42,6 +42,7 @@ using Work;
|
||||
using Work._29Tools.BLL;
|
||||
using Work._29Tools.CefTools;
|
||||
using Work.BaseForms;
|
||||
using Work.BuyUsers;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Tab;
|
||||
|
||||
namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
@@ -149,6 +150,8 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
|
||||
private void UserControl_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.lbPddBuyer.ItemsSource = GlobalConfig.PDDBuyerLoginList;
|
||||
|
||||
buyerReadOrderConfig = NaiBa.Util.Helper.ConfigHelper.LoadConfig<BuyerReadOrderConfig>("pdd_buyer_read_order_config");
|
||||
if (buyerReadOrderConfig == null)
|
||||
buyerReadOrderConfig = new BuyerReadOrderConfig();
|
||||
@@ -249,24 +252,6 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
|
||||
public void InitCef()
|
||||
{
|
||||
//CefSharp.Wpf.ChromiumWebBrowser cefWebBrowser = new CefSharp.Wpf.ChromiumWebBrowser();
|
||||
//cefWebBrowser.Address = "https://www.baidu.com";
|
||||
//cefWebBrowser = WPFCEFBrowser.CreateChromiumWebBrowser("https://www.baidu.com", false);
|
||||
//Grid.SetRow(cefWebBrowser, 0);
|
||||
//this.GridCef.Children.Add(cefWebBrowser);
|
||||
|
||||
//LocalResourceRequestHandler resourceRequestHandler = new LocalResourceRequestHandler();
|
||||
//resourceRequestHandler.ResourceLoadCompleteEvent += RequestHandler_ResourceLoadComplete;
|
||||
//resourceRequestHandler.BeforeResourceLoadEvent += RequestHandler_BeforeResourceLoad;
|
||||
//cefWebBrowser.RequestHandler = new LocalRequestHandler(resourceRequestHandler);
|
||||
//var lifeSapnHandler = new LocalLifeSpanHandler(PopWindowType.SelfWindow);
|
||||
//cefWebBrowser.LifeSpanHandler = lifeSapnHandler;
|
||||
//cefWebBrowser.KeyboardHandler = new KeyboardHandler();
|
||||
//cefWebBrowser.FrameLoadEnd += CefWebBrowser_FrameLoadEnd;
|
||||
//cefWebBrowser.AddressChanged += CefWebBrowser_AddressChanged;
|
||||
//cefWebBrowser.LoadError += CefWebBrowser_LoadError;
|
||||
|
||||
|
||||
foreach (var buyer in GlobalConfig.PDDBuyerLoginList)
|
||||
{
|
||||
Thread.Sleep(1);
|
||||
@@ -1413,6 +1398,20 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
readBuyer = buyer.buyer_id;
|
||||
currentReadBuyer = buyer.buyer_id;
|
||||
buyer.wpf_browser.Load("https://mobile.yangkeduo.com/complaint_list.html?refer_page_name=personal&refer_page_sn=10001&tab=all");
|
||||
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
Panel.SetZIndex(buyer.wpf_browser, maxZIndex++);
|
||||
if (buyer.IsSelect != true)
|
||||
{
|
||||
foreach (var b in GlobalConfig.PDDBuyerLoginList)
|
||||
{
|
||||
b.IsSelect = false;
|
||||
}
|
||||
buyer.IsSelect = true;
|
||||
}
|
||||
}));
|
||||
|
||||
Thread.Sleep(Randomx.GetId(2000, 3000));
|
||||
|
||||
Dispatcher.Invoke(new Action(() => { MainWindow.Instance.Title = buyer.buyer_nick + " 售后读取中"; }));
|
||||
@@ -1441,8 +1440,6 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
break;
|
||||
}
|
||||
|
||||
Dispatcher.Invoke(new Action(() => { Panel.SetZIndex(buyer.wpf_browser, maxZIndex++); }));
|
||||
|
||||
top += Randomx.GetId(450, 600);
|
||||
Thread.Sleep(Randomx.GetId(100, 300));
|
||||
|
||||
@@ -1478,6 +1475,20 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
readBuyer = buyer.buyer_id;
|
||||
currentReadBuyer = buyer.buyer_id;
|
||||
buyer.wpf_browser.Load("https://mobile.yangkeduo.com/orders.html?type=2");
|
||||
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
Panel.SetZIndex(buyer.wpf_browser, maxZIndex++);
|
||||
if (buyer.IsSelect != true)
|
||||
{
|
||||
foreach (var b in GlobalConfig.PDDBuyerLoginList)
|
||||
{
|
||||
b.IsSelect = false;
|
||||
}
|
||||
buyer.IsSelect = true;
|
||||
}
|
||||
}));
|
||||
|
||||
Thread.Sleep(Randomx.GetId(2000, 3000));
|
||||
|
||||
Dispatcher.Invoke(new Action(() => { MainWindow.Instance.Title = buyer.buyer_nick + " 待发货读取中"; }));
|
||||
@@ -1513,8 +1524,6 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
break;
|
||||
times++;
|
||||
|
||||
Dispatcher.Invoke(new Action(() => { Panel.SetZIndex(buyer.wpf_browser, maxZIndex++); }));
|
||||
|
||||
top += Randomx.GetId(450, 600);
|
||||
Thread.Sleep(Randomx.GetId(100, 300));
|
||||
|
||||
@@ -1551,6 +1560,20 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
readBuyer = buyer.buyer_id;
|
||||
currentReadBuyer = buyer.buyer_id;
|
||||
buyer.wpf_browser.Load("https://mobile.yangkeduo.com/orders.html?type=3");
|
||||
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
Panel.SetZIndex(buyer.wpf_browser, maxZIndex++);
|
||||
if (buyer.IsSelect != true)
|
||||
{
|
||||
foreach (var b in GlobalConfig.PDDBuyerLoginList)
|
||||
{
|
||||
b.IsSelect = false;
|
||||
}
|
||||
buyer.IsSelect = true;
|
||||
}
|
||||
}));
|
||||
|
||||
Thread.Sleep(Randomx.GetId(2000, 3000));
|
||||
|
||||
top = 0;
|
||||
@@ -1575,8 +1598,6 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
break;
|
||||
}
|
||||
|
||||
Dispatcher.Invoke(new Action(() => { Panel.SetZIndex(buyer.wpf_browser, maxZIndex++); }));
|
||||
|
||||
top += Randomx.GetId(450, 600);
|
||||
Thread.Sleep(Randomx.GetId(100, 300));
|
||||
|
||||
@@ -2342,6 +2363,20 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
}
|
||||
}
|
||||
|
||||
private void btnHideBuyer_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (btnHideBuyer.Content.ParseToString() == "▶")
|
||||
{
|
||||
btnHideBuyer.Content = "◀";
|
||||
borderPddBuyer.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
btnHideBuyer.Content = "▶";
|
||||
borderPddBuyer.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
|
||||
private void chkAutoAfterSale_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (isLoad)
|
||||
@@ -2360,6 +2395,41 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
else
|
||||
Panel.SetZIndex(MainWindow.Instance.gridPddBuyerOrderReadCtrl, -1);
|
||||
}
|
||||
|
||||
private void CheckBox_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is CheckBox chk)
|
||||
{
|
||||
if (chk.DataContext is BuyerLoginInfo pddBuyer)
|
||||
{
|
||||
foreach (var buyer in GlobalConfig.PDDBuyerLoginList)
|
||||
{
|
||||
buyer.IsSelect = false;
|
||||
}
|
||||
pddBuyer.IsSelect = true;
|
||||
if (pddBuyer.wpf_browser != null)
|
||||
Panel.SetZIndex(pddBuyer.wpf_browser, maxZIndex++);
|
||||
}
|
||||
}
|
||||
//if (e.Source)
|
||||
}
|
||||
|
||||
private void TextBox_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (sender is TextBox txt)
|
||||
{
|
||||
if (txt.DataContext is BuyerLoginInfo pddBuyer)
|
||||
{
|
||||
foreach (var buyer in GlobalConfig.PDDBuyerLoginList)
|
||||
{
|
||||
buyer.IsSelect = false;
|
||||
}
|
||||
pddBuyer.IsSelect = true;
|
||||
if (pddBuyer.wpf_browser != null)
|
||||
Panel.SetZIndex(pddBuyer.wpf_browser, maxZIndex++);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class YkdBuyerOrder
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace _29WxOrderWpf.Ctrls.ShopCtrls
|
||||
|
||||
private void shopListCtrl_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.lbxShop.ItemsSource = new ObservableCollection<ShopLoginInfo>(GlobalConfig.ShopLoginList);
|
||||
this.lbxShop.ItemsSource = GlobalConfig.ShopLoginList;
|
||||
|
||||
Task.Run(() => {
|
||||
while(MainWindow.Instance.hasReadShop == false)
|
||||
@@ -168,7 +168,7 @@ namespace _29WxOrderWpf.Ctrls.ShopCtrls
|
||||
txtShopName.Text = "";
|
||||
cmbNotes.Text = "";
|
||||
cmbGroup.Text = "";
|
||||
this.lbxShop.ItemsSource = new ObservableCollection<ShopLoginInfo>(GlobalConfig.ShopLoginList);
|
||||
this.lbxShop.ItemsSource = GlobalConfig.ShopLoginList;
|
||||
}
|
||||
|
||||
private void btnRefreshShop_Click(object sender, RoutedEventArgs e)
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace AllBase
|
||||
/// 版本ID
|
||||
/// </summary>
|
||||
|
||||
public static int VersionCount = 207;
|
||||
public static int VersionCount = 208;
|
||||
|
||||
public static string ServerUrl { get; set; } = "http://1.13.195.131:9000";
|
||||
public static string DebugUrl { get; set; } = "http://localhost:9000";
|
||||
|
||||
@@ -26,11 +26,11 @@ namespace AllBase.Helper
|
||||
/// <summary>
|
||||
/// 店铺列表
|
||||
/// </summary>
|
||||
public static ConcurrentList<ShopLoginInfo> ShopLoginList { get; set; } = new ConcurrentList<ShopLoginInfo>();
|
||||
public static ObservableCollectionThreadSafe<ShopLoginInfo> ShopLoginList { get; set; } = new ObservableCollectionThreadSafe<ShopLoginInfo>();
|
||||
/// <summary>
|
||||
/// 拼多多买手列表
|
||||
/// </summary>
|
||||
public static ObservableCollection<BuyerLoginInfo> PDDBuyerLoginList { get; set; } = new ObservableCollection<BuyerLoginInfo>();
|
||||
public static ObservableCollectionThreadSafe<BuyerLoginInfo> PDDBuyerLoginList { get; set; } = new ObservableCollectionThreadSafe<BuyerLoginInfo>();
|
||||
/// <summary>
|
||||
/// 当前拼多多买手
|
||||
/// </summary>
|
||||
|
||||
@@ -10,11 +10,21 @@ namespace AllBase.Model.DBModel
|
||||
{
|
||||
public class BuyerLoginInfo : PropertyNotifyObject
|
||||
{
|
||||
public bool IsSelect
|
||||
{
|
||||
get { return this.GetValue(x => x.IsSelect); }
|
||||
set { this.SetValue(x => x.IsSelect, value); }
|
||||
}
|
||||
|
||||
public int id { get; set; }
|
||||
public string user_name { get; set; }
|
||||
public string buyer_id { get; set; }
|
||||
public string buyer_name { get; set; }
|
||||
public string buyer_nick { get; set; }
|
||||
public string buyer_nick
|
||||
{
|
||||
get { return this.GetValue(x => x.buyer_nick); }
|
||||
set { this.SetValue(x => x.buyer_nick, value); }
|
||||
}
|
||||
public string cookie { get; set; }
|
||||
public string status
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user