1可设置是否直发拍单 2优化订单取号状态判断逻辑
This commit is contained in:
1 parent
9789a4686f
commit
5b9ed01fa1
7 files changed
+125
-65
No files matched your search
@@ -1,55 +1,78 @@
|
||||
<Window
|
||||
x:Class="_29WxOrderWpf.Ctrls.Settings.SettingsView"
|
||||
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:local="clr-namespace:_29WxOrderWpf.Ctrls.Settings"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:vm="clr-namespace:_29WxOrderWpf.ViewModels"
|
||||
xmlns:wpf="WPFCommon"
|
||||
Title="设置"
|
||||
Width="800"
|
||||
Height="450"
|
||||
d:DataContext="{d:DesignInstance Type=vm:SettingViewModel}"
|
||||
ResizeMode="NoResize"
|
||||
ShowInTaskbar="False"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
WindowState="Normal"
|
||||
mc:Ignorable="d">
|
||||
<Border BorderBrush="#e8eaed" BorderThickness="1">
|
||||
<TabControl
|
||||
ItemContainerStyle="{StaticResource SideTabItem}"
|
||||
Style="{StaticResource SideTabControl}"
|
||||
TabStripPlacement="Left">
|
||||
x:Class="_29WxOrderWpf.Ctrls.Settings.SettingsView"
|
||||
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:local="clr-namespace:_29WxOrderWpf.Ctrls.Settings"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:vm="clr-namespace:_29WxOrderWpf.ViewModels"
|
||||
xmlns:wpf="WPFCommon"
|
||||
Title="设置"
|
||||
Width="800"
|
||||
Height="450"
|
||||
d:DataContext="{d:DesignInstance Type=vm:SettingViewModel}"
|
||||
ResizeMode="NoResize"
|
||||
ShowInTaskbar="False"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
WindowState="Normal"
|
||||
mc:Ignorable="d">
|
||||
<Border BorderBrush="#e8eaed" BorderThickness="1">
|
||||
<TabControl
|
||||
ItemContainerStyle="{StaticResource SideTabItem}"
|
||||
Style="{StaticResource SideTabControl}"
|
||||
TabStripPlacement="Left">
|
||||
|
||||
<TabItem Header="发货">
|
||||
<StackPanel>
|
||||
<Border Style="{StaticResource SettingRow}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel>
|
||||
<TextBlock Style="{StaticResource SettingTitle}" Text="礼品单发送" />
|
||||
<TextBlock Style="{StaticResource SettingDesc}" Text="超出6元自动改为礼品二(实物)" />
|
||||
</StackPanel>
|
||||
<CheckBox
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
d:Visibility="Visible"
|
||||
IsChecked="{Binding AutoSwitchGiftType}"
|
||||
IsEnabled="False"
|
||||
Opacity="0.5"
|
||||
Style="{StaticResource ToggleSwitch}"
|
||||
Visibility="Collapsed" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
<TabItem Header="拍单">
|
||||
<StackPanel>
|
||||
<Border Style="{StaticResource SettingRow}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel>
|
||||
<TextBlock Style="{StaticResource SettingTitle}" Text="直发拍单" />
|
||||
<TextBlock Style="{StaticResource SettingDesc}" Text="允许直发拍单" />
|
||||
</StackPanel>
|
||||
<CheckBox
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
d:Visibility="Visible"
|
||||
IsChecked="{Binding SwitchEnableDirectBuy}"
|
||||
Style="{StaticResource ToggleSwitch}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
|
||||
<!-- ========== 外观 ========== -->
|
||||
<!--
|
||||
<TabItem Header="发货">
|
||||
<StackPanel>
|
||||
<Border Style="{StaticResource SettingRow}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel>
|
||||
<TextBlock Style="{StaticResource SettingTitle}" Text="礼品单发送" />
|
||||
<TextBlock Style="{StaticResource SettingDesc}" Text="超出6元自动改为礼品二(实物)" />
|
||||
</StackPanel>
|
||||
<CheckBox
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
d:Visibility="Visible"
|
||||
IsChecked="{Binding AutoSwitchGiftType}"
|
||||
IsEnabled="False"
|
||||
Opacity="0.5"
|
||||
Style="{StaticResource ToggleSwitch}"
|
||||
Visibility="Collapsed" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
|
||||
<!-- ========== 外观 ========== -->
|
||||
<!--
|
||||
<TabItem Header="外观" Tag="🎨">
|
||||
<StackPanel
|
||||
MaxWidth="720"
|
||||
@@ -114,8 +137,8 @@
|
||||
</TabItem>
|
||||
|
||||
-->
|
||||
<!-- ========== 账户 ========== -->
|
||||
<!--
|
||||
<!-- ========== 账户 ========== -->
|
||||
<!--
|
||||
<TabItem Header="账户" Tag="👤">
|
||||
<StackPanel
|
||||
MaxWidth="720"
|
||||
@@ -161,8 +184,8 @@
|
||||
</TabItem>
|
||||
|
||||
-->
|
||||
<!-- ========== 隐私 ========== -->
|
||||
<!--
|
||||
<!-- ========== 隐私 ========== -->
|
||||
<!--
|
||||
<TabItem Header="隐私" Tag="🔒">
|
||||
<StackPanel
|
||||
MaxWidth="720"
|
||||
@@ -212,8 +235,8 @@
|
||||
</TabItem>
|
||||
|
||||
-->
|
||||
<!-- ========== 关于 ========== -->
|
||||
<!--
|
||||
<!-- ========== 关于 ========== -->
|
||||
<!--
|
||||
<TabItem Header="关于" Tag="{StaticResource txt-table_stack_above}">
|
||||
<StackPanel
|
||||
MaxWidth="720"
|
||||
@@ -251,6 +274,6 @@
|
||||
</StackPanel>
|
||||
</TabItem>-->
|
||||
|
||||
</TabControl>
|
||||
</Border>
|
||||
</TabControl>
|
||||
</Border>
|
||||
</Window>
|
||||
@@ -1,5 +1,6 @@
|
||||
using _29WxOrderWpf.ViewModels;
|
||||
using AllBase;
|
||||
using AllBase.Helper;
|
||||
using AllBase.Model.Config;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
@@ -44,6 +45,15 @@ public partial class SettingsView : Window
|
||||
var setting = vm.ToConfig();
|
||||
BaseClass.Setting = setting;
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig(SettingViewModel.SettingFileName, JsonConvert.SerializeObject(setting));
|
||||
|
||||
foreach (var order in GlobalConfig.lstOrder)
|
||||
{
|
||||
foreach (var orderItem in order.orderItems)
|
||||
{
|
||||
orderItem.UpdateOrderItemBuyButton();
|
||||
orderItem.SetAbnormalAndDirectBtnVisibility();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user