店铺列表读取bug修复
This commit is contained in:
1 parent
05a48bf605
commit
07f21e3831
5 files changed
+306
-127
No files matched your search
@@ -939,6 +939,12 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void FilterOneOrder(string orderId, bool updateTabCount = false)
|
||||||
|
{
|
||||||
|
var orderExist = GlobalConfig.lstFilterOrder.FirstOrDefault(o => o.order_id == orderId);
|
||||||
|
FilterOneOrder(orderExist, updateTabCount);
|
||||||
|
}
|
||||||
|
|
||||||
public void FilterOneOrder(oms_wei_order_info order, bool updateTabCount = false)
|
public void FilterOneOrder(oms_wei_order_info order, bool updateTabCount = false)
|
||||||
{
|
{
|
||||||
var orderExist = GlobalConfig.lstFilterOrder.FirstOrDefault(o => o.order_id == order.order_id);
|
var orderExist = GlobalConfig.lstFilterOrder.FirstOrDefault(o => o.order_id == order.order_id);
|
||||||
|
|||||||
@@ -1,90 +1,199 @@
|
|||||||
<UserControl x:Class="_29WxOrderWpf.Ctrls.ShopCtrls.ShopListCtrl"
|
<UserControl
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
x:Class="_29WxOrderWpf.Ctrls.ShopCtrls.ShopListCtrl"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.ShopCtrls"
|
xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.ShopCtrls"
|
||||||
mc:Ignorable="d"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
d:DesignHeight="450" d:DesignWidth="800" x:Name="shopListCtrl" Loaded="shopListCtrl_Loaded">
|
x:Name="shopListCtrl"
|
||||||
|
d:DesignHeight="450"
|
||||||
|
d:DesignWidth="800"
|
||||||
|
Loaded="shopListCtrl_Loaded"
|
||||||
|
mc:Ignorable="d">
|
||||||
<Grid Background="{StaticResource ListCtrlBackColorBrush}">
|
<Grid Background="{StaticResource ListCtrlBackColorBrush}">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="40"></RowDefinition>
|
<RowDefinition Height="40" />
|
||||||
<RowDefinition Height="40"></RowDefinition>
|
<RowDefinition Height="40" />
|
||||||
<RowDefinition Height="*"></RowDefinition>
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition Height="40"></RowDefinition>
|
<RowDefinition Height="40" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Grid x:Name="gridSearch">
|
<Grid x:Name="gridSearch">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="店名" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="0" Margin="6,0,0,0"/>
|
<TextBlock
|
||||||
<Border Grid.Column="1" Margin="4" BorderBrush="{StaticResource mainColorBrush}" BorderThickness="1" CornerRadius="4" Height="26">
|
Grid.Column="0"
|
||||||
<TextBox x:Name="txtShopName" Margin="3,0" VerticalContentAlignment="Center" Style="{StaticResource BaseTextBoxStyle}"/>
|
Margin="6,0,0,0"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Text="店名" />
|
||||||
|
<Border
|
||||||
|
Grid.Column="1"
|
||||||
|
Height="26"
|
||||||
|
Margin="4"
|
||||||
|
BorderBrush="{StaticResource mainColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
CornerRadius="4">
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtShopName"
|
||||||
|
Margin="3,0"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Style="{StaticResource BaseTextBoxStyle}" />
|
||||||
</Border>
|
</Border>
|
||||||
<TextBlock Text="分组" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="2"/>
|
<TextBlock
|
||||||
<Border Grid.Column="3" Margin="4" BorderBrush="{StaticResource mainColorBrush}" BorderThickness="1" CornerRadius="4" Height="26">
|
Grid.Column="2"
|
||||||
<ComboBox x:Name="cmbGroup" Margin="3,0" VerticalContentAlignment="Center" Style="{StaticResource BaseComboBoxStyle}" SelectionChanged="cmbGroup_SelectionChanged"/>
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Text="分组" />
|
||||||
|
<Border
|
||||||
|
Grid.Column="3"
|
||||||
|
Height="26"
|
||||||
|
Margin="4"
|
||||||
|
BorderBrush="{StaticResource mainColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
CornerRadius="4">
|
||||||
|
<ComboBox
|
||||||
|
x:Name="cmbGroup"
|
||||||
|
Margin="3,0"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
SelectionChanged="cmbGroup_SelectionChanged"
|
||||||
|
Style="{StaticResource BaseComboBoxStyle}" />
|
||||||
</Border>
|
</Border>
|
||||||
<TextBlock Text="备注" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="4"/>
|
<TextBlock
|
||||||
<Border Grid.Column="5" Margin="4" BorderBrush="{StaticResource mainColorBrush}" BorderThickness="1" CornerRadius="4" Height="26">
|
Grid.Column="4"
|
||||||
<ComboBox x:Name="cmbNotes" Margin="3,0" VerticalContentAlignment="Center" Style="{StaticResource BaseComboBoxStyle}" SelectionChanged="cmbNotes_SelectionChanged"/>
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Text="备注" />
|
||||||
|
<Border
|
||||||
|
Grid.Column="5"
|
||||||
|
Height="26"
|
||||||
|
Margin="4"
|
||||||
|
BorderBrush="{StaticResource mainColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
CornerRadius="4">
|
||||||
|
<ComboBox
|
||||||
|
x:Name="cmbNotes"
|
||||||
|
Margin="3,0"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
SelectionChanged="cmbNotes_SelectionChanged"
|
||||||
|
Style="{StaticResource BaseComboBoxStyle}" />
|
||||||
</Border>
|
</Border>
|
||||||
<Button Grid.Column="6" x:Name="btnSearch" Style="{StaticResource BasePageButtonStyle}" Grid.Row="4" Content=" 搜索 " Height="26" Click="btnSearch_Click"></Button>
|
<Button
|
||||||
<Button Grid.Column="7" x:Name="btnRestore" Style="{StaticResource BasePageButtonLightStyle}" Grid.Row="4" Content=" 还原 " Height="26" Click="btnRestore_Click" Margin="4,0,6,0"></Button>
|
x:Name="btnSearch"
|
||||||
|
Grid.Row="4"
|
||||||
|
Grid.Column="6"
|
||||||
|
Height="26"
|
||||||
|
Click="btnSearch_Click"
|
||||||
|
Content=" 搜索 "
|
||||||
|
Style="{StaticResource BasePageButtonStyle}" />
|
||||||
|
<Button
|
||||||
|
x:Name="btnRestore"
|
||||||
|
Grid.Row="4"
|
||||||
|
Grid.Column="7"
|
||||||
|
Height="26"
|
||||||
|
Margin="4,0,6,0"
|
||||||
|
Click="btnRestore_Click"
|
||||||
|
Content=" 还原 "
|
||||||
|
Style="{StaticResource BasePageButtonLightStyle}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid x:Name="lstTitle" Grid.Row="1" Margin="4,0" Background="{StaticResource ListHeadBackColorBrush}">
|
<Grid
|
||||||
<Border BorderThickness="0,0,1,0" BorderBrush="{StaticResource ListHeadBorderColorBrush}">
|
x:Name="lstTitle"
|
||||||
<DataGrid Margin="0,0,18,0" x:Name="dgShopHeader" Grid.ColumnSpan="100" AutoGenerateColumns="False" CanUserReorderColumns="False"
|
Grid.Row="1"
|
||||||
ColumnHeaderHeight="{Binding ElementName=lstTitle, Path=ActualHeight}" BorderThickness="0"
|
Margin="4,0"
|
||||||
ColumnDisplayIndexChanged="dgShopHeader_ColumnDisplayIndexChanged"
|
Background="{StaticResource ListHeadBackColorBrush}">
|
||||||
LayoutUpdated="dgShopHeader_LayoutUpdated">
|
<Border BorderBrush="{StaticResource ListHeadBorderColorBrush}" BorderThickness="0,0,1,0">
|
||||||
|
<DataGrid
|
||||||
|
x:Name="dgShopHeader"
|
||||||
|
Grid.ColumnSpan="100"
|
||||||
|
Margin="0,0,18,0"
|
||||||
|
AutoGenerateColumns="False"
|
||||||
|
BorderThickness="0"
|
||||||
|
CanUserReorderColumns="False"
|
||||||
|
ColumnDisplayIndexChanged="dgShopHeader_ColumnDisplayIndexChanged"
|
||||||
|
ColumnHeaderHeight="{Binding ElementName=lstTitle, Path=ActualHeight}"
|
||||||
|
LayoutUpdated="dgShopHeader_LayoutUpdated">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTemplateColumn x:Name="colSelectAll" Header="选择" Width="50" HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}">
|
<DataGridTemplateColumn
|
||||||
|
x:Name="colSelectAll"
|
||||||
|
Width="50"
|
||||||
|
Header="选择"
|
||||||
|
HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}">
|
||||||
<DataGridTemplateColumn.HeaderTemplate>
|
<DataGridTemplateColumn.HeaderTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Grid Width="14" Height="14">
|
<Grid Width="14" Height="14">
|
||||||
<!--<CheckBox x:Name="headerCheckBox" BorderThickness="0" IsChecked="{Binding DataContext.AreAllSelected, RelativeSource={RelativeSource AncestorType=DataGrid}, UpdateSourceTrigger=PropertyChanged}" Checked="HeaderCheckBox_Checked" Unchecked="HeaderCheckBox_Unchecked"/>-->
|
<!--<CheckBox x:Name="headerCheckBox" BorderThickness="0" IsChecked="{Binding DataContext.AreAllSelected, RelativeSource={RelativeSource AncestorType=DataGrid}, UpdateSourceTrigger=PropertyChanged}" Checked="HeaderCheckBox_Checked" Unchecked="HeaderCheckBox_Unchecked"/>-->
|
||||||
<CheckBox x:Name="chkSelectAll" BorderThickness="0" IsChecked="False" Checked="ChkSelectAll_Checked" Unchecked="ChkSelectAll_Unchecked" Loaded="ChkSelectAll_Loaded" IsThreeState="True"/>
|
<CheckBox
|
||||||
<Border BorderThickness="1" Background="Transparent" BorderBrush="{StaticResource mainColorBrush}" Width="14" Height="14"
|
x:Name="chkSelectAll"
|
||||||
HorizontalAlignment="Center" VerticalAlignment="Center" IsHitTestVisible="False">
|
BorderThickness="0"
|
||||||
</Border>
|
Checked="ChkSelectAll_Checked"
|
||||||
|
IsChecked="False"
|
||||||
|
IsThreeState="True"
|
||||||
|
Loaded="ChkSelectAll_Loaded"
|
||||||
|
Unchecked="ChkSelectAll_Unchecked" />
|
||||||
|
<Border
|
||||||
|
Width="14"
|
||||||
|
Height="14"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderBrush="{StaticResource mainColorBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
IsHitTestVisible="False" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.HeaderTemplate>
|
</DataGridTemplateColumn.HeaderTemplate>
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<!--<CheckBox IsChecked="{Binding IsSelected, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Center" VerticalAlignment="Center"/>-->
|
<!--<CheckBox IsChecked="{Binding IsSelected, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Center" VerticalAlignment="Center"/>-->
|
||||||
<CheckBox HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
<CheckBox HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
</DataGridTemplateColumn>
|
||||||
<DataGridTextColumn Width="100*" HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" Header="AppId"/>
|
<DataGridTextColumn
|
||||||
<DataGridTextColumn Width="100*" HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" Header="店铺名称"/>
|
Width="100*"
|
||||||
<DataGridTextColumn Width="100*" HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" Header="分组"/>
|
Header="AppId"
|
||||||
<DataGridTextColumn Width="82*" HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" Header=" 备注"/>
|
HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" />
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="100*"
|
||||||
|
Header="店铺名称"
|
||||||
|
HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" />
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="100*"
|
||||||
|
Header="分组"
|
||||||
|
HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" />
|
||||||
|
<DataGridTextColumn
|
||||||
|
Width="82*"
|
||||||
|
Header=" 备注"
|
||||||
|
HeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}" />
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
<!--<ListBox Grid.Row="2" x:Name="lbxShop" ItemsSource="{Binding GlobalConfig.ShopLoginList}" BorderThickness="0" Margin="4,0,4,4">-->
|
<!--<ListBox Grid.Row="2" x:Name="lbxShop" ItemsSource="{Binding GlobalConfig.ShopLoginList}" BorderThickness="0" Margin="4,0,4,4">-->
|
||||||
<ListBox Grid.Row="2" x:Name="lbxShop" BorderThickness="0" Margin="4,0,4,4" SelectionMode="Extended">
|
<ListBox
|
||||||
<!--使用自定义属性模板去除ListBox高亮显示框-->
|
x:Name="lbxShop"
|
||||||
|
Grid.Row="2"
|
||||||
|
Margin="4,0,4,4"
|
||||||
|
BorderThickness="0"
|
||||||
|
SelectionMode="Extended">
|
||||||
|
<!-- 使用自定义属性模板去除ListBox高亮显示框 -->
|
||||||
<ListBox.ItemContainerStyle>
|
<ListBox.ItemContainerStyle>
|
||||||
<Style TargetType="ListBoxItem">
|
<Style TargetType="ListBoxItem">
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="ListBoxItem">
|
<ControlTemplate TargetType="ListBoxItem">
|
||||||
<ContentPresenter Content="{TemplateBinding Content}"
|
<ContentPresenter
|
||||||
ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
Content="{TemplateBinding Content}"
|
||||||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
||||||
|
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
@@ -93,14 +202,20 @@
|
|||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<!--<local:ShopListRowCtrl></local:ShopListRowCtrl>-->
|
<!--<local:ShopListRowCtrl></local:ShopListRowCtrl>-->
|
||||||
<Border Margin="0,0,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="0, 0, 0, 1" MinHeight="50"
|
<Border
|
||||||
BorderBrush="{StaticResource ListRowBorderColorBrush}" CornerRadius="0">
|
MinHeight="50"
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
BorderBrush="{StaticResource ListRowBorderColorBrush}"
|
||||||
|
BorderThickness="0,0,0,1"
|
||||||
|
CornerRadius="0">
|
||||||
<Border.Style>
|
<Border.Style>
|
||||||
<!-- 鼠标进入或悬停Border时切换颜色(悬停时Border的填充控件必须有填充Border,所在层级不限,仅填充透明Grid则触发器无效) -->
|
<!-- 鼠标进入或悬停Border时切换颜色(悬停时Border的填充控件必须有填充Border,所在层级不限,仅填充透明Grid则触发器无效) -->
|
||||||
<Style TargetType="Border">
|
<Style TargetType="Border">
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
<Trigger Property="IsMouseOver" Value="True">
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
<Setter Property="Background" Value="{StaticResource ListRowHoverBackColorBrush}"/>
|
<Setter Property="Background" Value="{StaticResource ListRowHoverBackColorBrush}" />
|
||||||
</Trigger>
|
</Trigger>
|
||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
@@ -109,17 +224,60 @@
|
|||||||
<Grid x:Name="gridListItem">
|
<Grid x:Name="gridListItem">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<!--<ColumnDefinition Width="{Binding colShopIdWidth,RelativeSource={RelativeSource AncestorType={x:Type local:ShopListCtrl}}}" ></ColumnDefinition>-->
|
<!--<ColumnDefinition Width="{Binding colShopIdWidth,RelativeSource={RelativeSource AncestorType={x:Type local:ShopListCtrl}}}" ></ColumnDefinition>-->
|
||||||
<ColumnDefinition x:Name="colCheck" Width="100*"></ColumnDefinition>
|
<ColumnDefinition x:Name="colCheck" Width="100*" />
|
||||||
<ColumnDefinition x:Name="colShopId" Width="100*"></ColumnDefinition>
|
<ColumnDefinition x:Name="colShopId" Width="100*" />
|
||||||
<ColumnDefinition x:Name="colShopName" Width="100*"></ColumnDefinition>
|
<ColumnDefinition x:Name="colShopName" Width="100*" />
|
||||||
<ColumnDefinition x:Name="colGroupName" Width="100*"></ColumnDefinition>
|
<ColumnDefinition x:Name="colGroupName" Width="100*" />
|
||||||
<ColumnDefinition x:Name="colNotes" Width="100*"></ColumnDefinition>
|
<ColumnDefinition x:Name="colNotes" Width="100*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<CheckBox Grid.Column="0" Background="Transparent" HorizontalAlignment="Center" VerticalAlignment="Center" Tag="{Binding ShopId}" IsChecked="{Binding IsSelect, Mode=TwoWay}" Click="CheckBox_Click"/>
|
<CheckBox
|
||||||
<TextBox Grid.Column="1" Background="Transparent" TextWrapping="Wrap" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" BorderThickness="0" Tag="{Binding ShopId}" Text="{Binding ShopId}" />
|
Grid.Column="0"
|
||||||
<TextBox Grid.Column="2" Background="Transparent" TextWrapping="Wrap" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" BorderThickness="0" Tag="{Binding ShopId}" Text="{Binding ShopAccount}" />
|
HorizontalAlignment="Center"
|
||||||
<TextBox Grid.Column="3" Background="Transparent" TextWrapping="Wrap" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" BorderThickness="0" Tag="{Binding ShopId}" Text="{Binding GroupName}" />
|
VerticalAlignment="Center"
|
||||||
<TextBox Grid.Column="4" Background="Transparent" TextWrapping="Wrap" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" BorderThickness="0" Tag="{Binding ShopId}" Text="{Binding Notes}" />
|
Background="Transparent"
|
||||||
|
Click="CheckBox_Click"
|
||||||
|
IsChecked="{Binding IsSelect, Mode=TwoWay}"
|
||||||
|
Tag="{Binding ShopId}" />
|
||||||
|
<TextBox
|
||||||
|
Grid.Column="1"
|
||||||
|
HorizontalContentAlignment="Center"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Tag="{Binding ShopId}"
|
||||||
|
Text="{Binding ShopId}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
<TextBox
|
||||||
|
Grid.Column="2"
|
||||||
|
HorizontalContentAlignment="Center"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Tag="{Binding ShopId}"
|
||||||
|
Text="{Binding ShopAccount}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
<TextBox
|
||||||
|
Grid.Column="3"
|
||||||
|
HorizontalContentAlignment="Center"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Tag="{Binding ShopId}"
|
||||||
|
Text="{Binding GroupName}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
<TextBox
|
||||||
|
Grid.Column="4"
|
||||||
|
HorizontalContentAlignment="Center"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Tag="{Binding ShopId}"
|
||||||
|
Text="{Binding Notes}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
@@ -128,19 +286,42 @@
|
|||||||
|
|
||||||
<Grid x:Name="gridRefreshOrSelect" Grid.Row="3">
|
<Grid x:Name="gridRefreshOrSelect" Grid.Row="3">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button Grid.Column="0" x:Name="btnRefreshShop" Style="{StaticResource BasePageButtonStyle}" Grid.Row="4" Content=" 刷新店铺 " Height="26" Margin="6,0,0,0" Click="btnRefreshShop_Click"></Button>
|
<Button
|
||||||
|
x:Name="btnRefreshShop"
|
||||||
|
Grid.Row="4"
|
||||||
|
Grid.Column="0"
|
||||||
|
Height="26"
|
||||||
|
Margin="6,0,0,0"
|
||||||
|
Click="btnRefreshShop_Click"
|
||||||
|
Content=" 刷新店铺 "
|
||||||
|
Style="{StaticResource BasePageButtonStyle}" />
|
||||||
|
|
||||||
<Button Grid.Column="6" x:Name="btnApplySelectShop" Style="{StaticResource BasePageButtonStyle}" Grid.Row="4" Content=" 确定 " Height="26" Click="btnApplySelectShop_Click"></Button>
|
<Button
|
||||||
<Button Grid.Column="7" x:Name="btnCancelSelectShop" Style="{StaticResource BasePageButtonLightStyle}" Grid.Row="4" Content=" 取消 " Height="26" Margin="4,0,6,0" Click="btnCancelSelectShop_Click"></Button>
|
x:Name="btnApplySelectShop"
|
||||||
|
Grid.Row="4"
|
||||||
|
Grid.Column="6"
|
||||||
|
Height="26"
|
||||||
|
Click="btnApplySelectShop_Click"
|
||||||
|
Content=" 确定 "
|
||||||
|
Style="{StaticResource BasePageButtonStyle}" />
|
||||||
|
<Button
|
||||||
|
x:Name="btnCancelSelectShop"
|
||||||
|
Grid.Row="4"
|
||||||
|
Grid.Column="7"
|
||||||
|
Height="26"
|
||||||
|
Margin="4,0,6,0"
|
||||||
|
Click="btnCancelSelectShop_Click"
|
||||||
|
Content=" 取消 "
|
||||||
|
Style="{StaticResource BasePageButtonLightStyle}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -231,7 +231,6 @@ namespace _29WxOrderWpf
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
var tList = new List<Task>();
|
var tList = new List<Task>();
|
||||||
var cList = new List<int>();
|
|
||||||
List<ShopLoginInfo> list = new List<ShopLoginInfo>();
|
List<ShopLoginInfo> list = new List<ShopLoginInfo>();
|
||||||
Dispatcher.Invoke(new Action(() =>
|
Dispatcher.Invoke(new Action(() =>
|
||||||
{
|
{
|
||||||
@@ -272,12 +271,6 @@ namespace _29WxOrderWpf
|
|||||||
list.Remove(shopExist);
|
list.Remove(shopExist);
|
||||||
shopExist = list.LastOrDefault(l => l.ShopId == shop.ShopId);
|
shopExist = list.LastOrDefault(l => l.ShopId == shop.ShopId);
|
||||||
}
|
}
|
||||||
// 更新店铺 // 代发管理中更新
|
|
||||||
//foreach (var order in GlobalConfig.lstFilterOrder.Where(o => o.shop_id.ParseToString() == shop.ErpShopId).ToList())
|
|
||||||
//{
|
|
||||||
// foreach (var orderItem in order.orderItems)
|
|
||||||
// orderItem.Shop = shop;
|
|
||||||
//}
|
|
||||||
list.Add(shop);
|
list.Add(shop);
|
||||||
|
|
||||||
if (!GlobalConfig.ShopLoginList.Any(s => s.ShopId == shop.ShopId && !shop.is_point_shop_expire))
|
if (!GlobalConfig.ShopLoginList.Any(s => s.ShopId == shop.ShopId && !shop.is_point_shop_expire))
|
||||||
@@ -286,55 +279,54 @@ namespace _29WxOrderWpf
|
|||||||
{
|
{
|
||||||
GlobalConfig.ShopLoginList.Add(shop);
|
GlobalConfig.ShopLoginList.Add(shop);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
var t = Task.Run(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
while (cList.Count > 20)
|
while (tList.Count > 20)
|
||||||
{
|
{
|
||||||
tList.RemoveAll(ta => ta.IsFaulted || ta.IsCompleted || ta.IsCanceled);
|
tList.RemoveAll(ta => ta.IsFaulted || ta.IsCompleted || ta.IsCanceled);
|
||||||
Thread.Sleep(100);
|
Thread.Sleep(100);
|
||||||
}
|
}
|
||||||
cList.Add(1);
|
tList.Add(Task.Run(() =>
|
||||||
try
|
{
|
||||||
{
|
try
|
||||||
if (shop.LoginStatus == "登录成功")
|
{
|
||||||
{
|
if (shop.LoginStatus == "登录成功")
|
||||||
shop.Is29Supplier = false;
|
|
||||||
for (int i = 0; i < 100; i++)
|
|
||||||
{
|
{
|
||||||
var is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierListV2(shop);
|
shop.Is29Supplier = false;
|
||||||
if (!is29SupplierRst.Contains("\"code\":0"))
|
for (int i = 0; i < 100; i++)
|
||||||
is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierListV2(shop);
|
|
||||||
if (is29SupplierRst.Contains("\"code\":0") && is29SupplierRst.Contains("\"name\":\"29供货商\""))
|
|
||||||
{
|
{
|
||||||
shop.Is29Supplier = true;
|
var is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierListV2(shop);
|
||||||
break;
|
if (!is29SupplierRst.Contains("\"code\":0"))
|
||||||
|
is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierListV2(shop);
|
||||||
|
if (is29SupplierRst.Contains("\"code\":0") && is29SupplierRst.Contains("\"name\":\"29供货商\""))
|
||||||
|
{
|
||||||
|
shop.Is29Supplier = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (!is29SupplierRst.Contains("\"code\":0"))
|
||||||
|
{
|
||||||
|
ShopBLL.CheckShopLogin(shop);
|
||||||
|
}
|
||||||
|
int totalCount = BaseRegex.GetIntJson(ref is29SupplierRst, "totalCount");
|
||||||
|
if (i * 20 >= totalCount)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else if (!is29SupplierRst.Contains("\"code\":0"))
|
|
||||||
{
|
|
||||||
ShopBLL.CheckShopLogin(shop);
|
|
||||||
}
|
|
||||||
int totalCount = BaseRegex.GetIntJson(ref is29SupplierRst, "totalCount");
|
|
||||||
if (i * 20 >= totalCount)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var order in GlobalConfig.lstFilterOrder.Where(o => o.shop_id.ParseToString() == shop.ErpShopId).ToList())
|
foreach (var order in GlobalConfig.lstFilterOrder.Where(o => o.shop_id.ParseToString() == shop.ErpShopId).ToList())
|
||||||
{
|
{
|
||||||
// 更新代发管理情况
|
// 更新代发管理情况
|
||||||
foreach (var orderItem in order.orderItems)
|
foreach (var orderItem in order.orderItems)
|
||||||
Dispatcher.Invoke(new Action(() => { orderItem.UpdateOrderItemBuyButton(); }));
|
Dispatcher.Invoke(new Action(() => { orderItem.UpdateOrderItemBuyButton(); }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
//if (cList.Count > 0)
|
}));
|
||||||
// cList.RemoveAt(0);
|
});
|
||||||
});
|
}
|
||||||
tList.Add(t);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Dispatcher.Invoke(new Action(() =>
|
Dispatcher.Invoke(new Action(() =>
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ namespace _29WxOrderWpf.Windows.OrderWindows
|
|||||||
{
|
{
|
||||||
//<AjaxResult><msg>创建退货包裹成功</msg><code>0</code></AjaxResult>
|
//<AjaxResult><msg>创建退货包裹成功</msg><code>0</code></AjaxResult>
|
||||||
MainWindow.Instance.orderListCtrl.GetOrder(OrderItem.order_id);
|
MainWindow.Instance.orderListCtrl.GetOrder(OrderItem.order_id);
|
||||||
MainWindow.Instance.orderListCtrl.FilterOrders();
|
MainWindow.Instance.orderListCtrl.FilterOneOrder(OrderItem.order_id, true);
|
||||||
BaseMsgWindow.ShowInfo("添加退货包裹成功", "", this);
|
BaseMsgWindow.ShowInfo("添加退货包裹成功", "", this);
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ namespace AllBase
|
|||||||
/// 版本ID
|
/// 版本ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public static int VersionCount = 233;
|
public static int VersionCount = 237;
|
||||||
|
|
||||||
public static string ServerUrl { get; set; } = "http://1.13.195.131:9000";
|
public static string ServerUrl { get; set; } = "http://1.13.195.131:9000";
|
||||||
public static string DebugUrl { get; set; } = "http://localhost:9000";
|
public static string DebugUrl { get; set; } = "http://localhost:9000";
|
||||||
|
|||||||
Reference in new issue
Block a user