修改工单流程页面,订单列表增加工单按钮

This commit is contained in:
chfei committed 2026-10-18 20:35:47 +08:00
1 parent f9dcae4610
commit 10bb0803d9
44 files changed
+5920 -1291

No files matched your search

@@ -30,7 +30,7 @@ public partial class OrderListCtrl
{
if (_statisticsDialog == null)
{
_statisticsDialog =new ShopRevenueStatisticsView();
_statisticsDialog = new ShopRevenueStatisticsView();
_statisticsDialog.Closed += (s, e) => _statisticsDialog = null;
}
_statisticsDialog.Show();
@@ -310,7 +310,7 @@ public partial class OrderListCtrl
private void ShowPDDInvoiceDialog()
{
var view = new PDDInvoiceView();
DialogService.Show(view);
DialogService.ShowOrActivateWindow(view);
}
#endregion
}
@@ -1,86 +1,86 @@
<UserControl
x:Class="_29WxOrderWpf.Ctrls.OrderCtrls.OrderListRowHeaderCtrl"
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.OrderCtrls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:uc="clr-namespace:_29WxOrderWpf.UserControls"
d:DesignHeight="50"
d:DesignWidth="800"
mc:Ignorable="d">
x:Class="_29WxOrderWpf.Ctrls.OrderCtrls.OrderListRowHeaderCtrl"
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.OrderCtrls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:uc="clr-namespace:_29WxOrderWpf.UserControls"
d:DesignHeight="50"
d:DesignWidth="800"
mc:Ignorable="d">
<Border Background="{StaticResource ListRowBorderColorBrush}" CornerRadius="12,12,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="20" />
</Grid.ColumnDefinitions>
<TextBox
Grid.Column="0"
Margin="8,8,-4,8"
VerticalAlignment="Center"
Background="Transparent"
BorderThickness="0"
FontSize="20"
FontWeight="ExtraBold"
Foreground="{Binding OrderBuyTypeColor}"
IsReadOnly="True"
Text="{Binding OrderBuyType}"
Visibility="{Binding OrderBuyType, Converter={StaticResource HasTextVisibility}}" />
<TextBox
Grid.Column="1"
Margin="8,8,-4,8"
VerticalAlignment="Center"
Background="Transparent"
BorderThickness="0"
FontSize="14"
IsReadOnly="True"
Text="店铺单号:" />
<uc:UcWaterMarkTextBox1
x:Name="txtOrderId"
Grid.Column="2"
Margin="0,8,4,8"
VerticalAlignment="Center"
Background="Transparent"
BorderThickness="0"
Cursor="Hand"
FontSize="14"
Foreground="{StaticResource PageLinkBrush}"
IsReadOnly="True"
Text="{Binding order_id}"
WaterMark="订单号" />
<Border
Grid.Column="3"
Width="12"
Height="12"
VerticalAlignment="Center"
Background="Transparent"
Cursor="Hand"
MouseLeftButtonDown="Path_MouseLeftButtonDown"
Tag="{Binding order_id}">
<Path
Margin="0,0,0,0"
Data="M80 432a128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128h-384a128 128 0 0 1-128-128v-384z m128-64a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64h-384z M816 144h-384a64 64 0 0 0-64 64 32 32 0 0 1-64 0 128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128 32 32 0 0 1 0-64 64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64z"
Fill="{StaticResource PageLinkBrush}"
MouseLeftButtonDown="Path_MouseLeftButtonDown"
Stretch="Uniform"
Tag="{Binding order_id}" />
</Border>
<Border Background="{StaticResource ListRowBorderColorBrush}" CornerRadius="12,12,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="20" />
</Grid.ColumnDefinitions>
<TextBox
Grid.Column="0"
Margin="8,8,-4,8"
VerticalAlignment="Center"
Background="Transparent"
BorderThickness="0"
FontSize="20"
FontWeight="ExtraBold"
Foreground="{Binding OrderBuyTypeColor}"
IsReadOnly="True"
Text="{Binding OrderBuyType}"
Visibility="{Binding OrderBuyType, Converter={StaticResource HasTextVisibility}}" />
<TextBox
Grid.Column="1"
Margin="8,8,-4,8"
VerticalAlignment="Center"
Background="Transparent"
BorderThickness="0"
FontSize="14"
IsReadOnly="True"
Text="店铺单号:" />
<uc:UcWaterMarkTextBox1
x:Name="txtOrderId"
Grid.Column="2"
Margin="0,8,4,8"
VerticalAlignment="Center"
Background="Transparent"
BorderThickness="0"
Cursor="Hand"
FontSize="14"
Foreground="{StaticResource PageLinkBrush}"
IsReadOnly="True"
Text="{Binding order_id}"
WaterMark="订单号" />
<Border
Grid.Column="3"
Width="12"
Height="12"
VerticalAlignment="Center"
Background="Transparent"
Cursor="Hand"
MouseLeftButtonDown="Path_MouseLeftButtonDown"
Tag="{Binding order_id}">
<Path
Margin="0,0,0,0"
Data="M80 432a128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128h-384a128 128 0 0 1-128-128v-384z m128-64a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64h-384z M816 144h-384a64 64 0 0 0-64 64 32 32 0 0 1-64 0 128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128 32 32 0 0 1 0-64 64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64z"
Fill="{StaticResource PageLinkBrush}"
MouseLeftButtonDown="Path_MouseLeftButtonDown"
Stretch="Uniform"
Tag="{Binding order_id}" />
</Border>
<!--<Border x:Name="borderDeadline" Grid.Column="3" Margin="8,0,0,0" Background="#e8fbf9" BorderBrush="#d0fbea" BorderThickness="1" MinWidth="30" Height="24" CornerRadius="2">
<!--<Border x:Name="borderDeadline" Grid.Column="3" Margin="8,0,0,0" Background="#e8fbf9" BorderBrush="#d0fbea" BorderThickness="1" MinWidth="30" Height="24" CornerRadius="2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
@@ -94,163 +94,169 @@
Text="{Binding DeliveryDeadlineStr}" BorderThickness="0" />
</Grid>
</Border>-->
<Border
x:Name="borderDeadline"
Grid.Column="4"
Height="24"
MinWidth="30"
Margin="8,0,0,0"
Background="{Binding StatusBoxBackColor}"
BorderBrush="{Binding StatusBoxBorderColor}"
BorderThickness="1"
CornerRadius="2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Border
x:Name="borderDeadlineHead"
Background="{Binding StatusBoxForeColor}"
CornerRadius="2,0,10,2">
<TextBox
Grid.Column="0"
MinWidth="20"
Margin="2,0,2,1"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Background="Transparent"
BorderThickness="0"
Foreground="White"
IsReadOnly="True"
Text="{Binding DeliveryDeadlineStatusStr}" />
</Border>
<TextBox
x:Name="txtDeadline"
Grid.Column="1"
MinWidth="20"
Margin="2,0,2,1"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Background="Transparent"
BorderThickness="0"
Foreground="{Binding StatusBoxForeColor}"
IsReadOnly="True"
Text="{Binding DeliveryDeadlineStr}" />
</Grid>
</Border>
<Border
x:Name="borderDeadline"
Grid.Column="4"
Height="24"
MinWidth="30"
Margin="8,0,0,0"
Background="{Binding StatusBoxBackColor}"
BorderBrush="{Binding StatusBoxBorderColor}"
BorderThickness="1"
CornerRadius="2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Border
x:Name="borderDeadlineHead"
Background="{Binding StatusBoxForeColor}"
CornerRadius="2,0,10,2">
<TextBox
Grid.Column="0"
MinWidth="20"
Margin="2,0,2,1"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Background="Transparent"
BorderThickness="0"
Foreground="White"
IsReadOnly="True"
Text="{Binding DeliveryDeadlineStatusStr}" />
</Border>
<TextBox
x:Name="txtDeadline"
Grid.Column="1"
MinWidth="20"
Margin="2,0,2,1"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Background="Transparent"
BorderThickness="0"
Foreground="{Binding StatusBoxForeColor}"
IsReadOnly="True"
Text="{Binding DeliveryDeadlineStr}" />
</Grid>
</Border>
<Image
Grid.Column="5"
Width="24"
Height="24"
Margin="8,8,0,8"
Source="{StaticResource imgOrderWeishopIcon}" />
<uc:UcWaterMarkTextBox1
x:Name="txtShopLoginStatus"
Grid.Column="5"
Margin="0,12,-6,0"
Padding="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Background="{StaticResource ListHeadBackColorBrush}"
BorderThickness="0"
FontSize="7"
FontWeight="Bold"
Foreground="{Binding Shop.LoginStatusStr, Converter={StaticResource statusToColorBrushConverter}}"
IsReadOnly="True"
Text="{Binding Shop.LoginStatusStr}"
WaterMark="店铺状态" />
<uc:UcWaterMarkTextBox1
x:Name="txtShopName"
Grid.Column="6"
Margin="4,8,4,8"
VerticalAlignment="Center"
Background="Transparent"
BorderThickness="0"
Cursor="Hand"
FontSize="14"
Foreground="{StaticResource PageLinkBrush}"
IsReadOnly="True"
Text="{Binding shop_name}"
WaterMark="店铺名称" />
<Image
Grid.Column="5"
Width="24"
Height="24"
Margin="8,8,0,8"
Source="{StaticResource imgOrderWeishopIcon}" />
<uc:UcWaterMarkTextBox1
x:Name="txtShopLoginStatus"
Grid.Column="5"
Margin="0,12,-6,0"
Padding="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Background="{StaticResource ListHeadBackColorBrush}"
BorderThickness="0"
FontSize="7"
FontWeight="Bold"
Foreground="{Binding Shop.LoginStatusStr, Converter={StaticResource statusToColorBrushConverter}}"
IsReadOnly="True"
Text="{Binding Shop.LoginStatusStr}"
WaterMark="店铺状态" />
<uc:UcWaterMarkTextBox1
x:Name="txtShopName"
Grid.Column="6"
Margin="4,8,4,8"
VerticalAlignment="Center"
Background="Transparent"
BorderThickness="0"
Cursor="Hand"
FontSize="14"
Foreground="{StaticResource PageLinkBrush}"
IsReadOnly="True"
Text="{Binding shop_name}"
WaterMark="店铺名称" />
<Border
Grid.Column="7"
Width="12"
Height="12"
VerticalAlignment="Center"
Background="Transparent"
Cursor="Hand"
MouseLeftButtonDown="pathShop_MouseLeftButtonDown"
Tag="{Binding order_id}">
<Path
Margin="0,0,0,0"
Data="M80 432a128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128h-384a128 128 0 0 1-128-128v-384z m128-64a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64h-384z M816 144h-384a64 64 0 0 0-64 64 32 32 0 0 1-64 0 128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128 32 32 0 0 1 0-64 64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64z"
Fill="{StaticResource PageLinkBrush}"
MouseLeftButtonDown="pathShop_MouseLeftButtonDown"
Stretch="Uniform"
Tag="{Binding order_id}" />
</Border>
<Border
Grid.Column="7"
Width="12"
Height="12"
VerticalAlignment="Center"
Background="Transparent"
Cursor="Hand"
MouseLeftButtonDown="pathShop_MouseLeftButtonDown"
Tag="{Binding order_id}">
<Path
Margin="0,0,0,0"
Data="M80 432a128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128h-384a128 128 0 0 1-128-128v-384z m128-64a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64h-384z M816 144h-384a64 64 0 0 0-64 64 32 32 0 0 1-64 0 128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128 32 32 0 0 1 0-64 64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64z"
Fill="{StaticResource PageLinkBrush}"
MouseLeftButtonDown="pathShop_MouseLeftButtonDown"
Stretch="Uniform"
Tag="{Binding order_id}" />
</Border>
<uc:UcWaterMarkTextBox1
x:Name="txtCount"
Grid.Column="9"
Margin="8,8,0,8"
VerticalAlignment="Center"
d:Text="该订单共有 x 条不同商品记录"
Background="Transparent"
BorderThickness="0"
FontSize="14"
Foreground="Gray"
IsReadOnly="True"
WaterMark="该订单共有 1 条不同商品记录" />
<uc:UcWaterMarkTextBox1
x:Name="txtCount"
Grid.Column="9"
Margin="8,8,0,8"
VerticalAlignment="Center"
d:Text="该订单共有 x 条不同商品记录"
Background="Transparent"
BorderThickness="0"
FontSize="14"
Foreground="Gray"
IsReadOnly="True"
WaterMark="该订单共有 1 条不同商品记录" />
<TextBlock
Grid.Column="11"
Margin="10"
VerticalAlignment="Center"
d:Text="仅退款/退货退款"
Foreground="Gray"
Text="{Binding RefundTypeStr}" />
<TextBlock
Grid.Column="11"
Margin="10"
VerticalAlignment="Center"
d:Text="仅退款/退货退款"
Foreground="Gray"
Text="{Binding RefundTypeStr}" />
<Border
x:Name="borderFlag"
Grid.Column="12"
Width="auto"
Height="15"
Margin="2"
VerticalAlignment="Center"
Background="Transparent"
Cursor="Hand"
MouseLeftButtonDown="borderFlag_MouseLeftButtonDown">
<!--<Path Margin="0,0,0,0" Fill="{StaticResource FlagGrayBrush}" Data="M 0,0 L 1,0 L 1,1 L 10,1 L 7,4 L 10,7 L 1,7 L 1,12 L 0,12 Z" Stretch="Uniform" />-->
<WrapPanel VerticalAlignment="Center">
<TextBlock
VerticalAlignment="Center"
FontSize="12"
Foreground="Gray"
Text="隐藏标记" />
<Border
x:Name="borderFlag"
Grid.Column="12"
Width="auto"
Margin="2"
VerticalAlignment="Center"
Background="Transparent"
Cursor="Hand"
MouseLeftButtonDown="borderFlag_MouseLeftButtonDown">
<!--<Path Margin="0,0,0,0" Fill="{StaticResource FlagGrayBrush}" Data="M 0,0 L 1,0 L 1,1 L 10,1 L 7,4 L 10,7 L 1,7 L 1,12 L 0,12 Z" Stretch="Uniform" />-->
<WrapPanel VerticalAlignment="Center">
<Button
Width="60"
Height="22"
Margin="0,0,10,0"
Click="btn_createOrderSupportTicket"
Content="创建工单"
Style="{StaticResource BasePageButtonStyle}" />
<TextBlock
VerticalAlignment="Center"
FontSize="12"
Foreground="Gray"
Text="隐藏标记" />
<Path
Width="15"
Height="15"
Margin="2,0,0,0"
d:Fill="SkyBlue"
Data="M 0,0 L 1,0 L 1,1 L 10,1 L 7,4 L 10,7 L 1,7 L 1,12 L 0,12 Z"
Fill="{Binding ColourFlagBrush}"
Stretch="Uniform" />
<!--ColourFlagBrush-->
<!--Fill="{Binding colour_flag, Converter={StaticResource flagColorConverter}}"-->
Width="15"
Height="15"
Margin="2,0,0,0"
d:Fill="SkyBlue"
Data="M 0,0 L 1,0 L 1,1 L 10,1 L 7,4 L 10,7 L 1,7 L 1,12 L 0,12 Z"
Fill="{Binding ColourFlagBrush}"
Stretch="Uniform" />
<!-- ColourFlagBrush -->
<!-- Fill="{Binding colour_flag, Converter={StaticResource flagColorConverter}}" -->
</WrapPanel>
</Border>
</Border>
<!--<Border Grid.Column="11" Width="12" Background="Transparent" Height="12" VerticalAlignment="Center" Cursor="Hand">
<!--<Border Grid.Column="11" Width="12" Background="Transparent" Height="12" VerticalAlignment="Center" Cursor="Hand">
<Path Margin="0,0,0,0" Fill="{StaticResource PageLinkBrush}" MouseLeftButtonDown="pathShop_MouseLeftButtonDown" Data="M80 432a128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128h-384a128 128 0 0 1-128-128v-384z m128-64a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64h-384z M816 144h-384a64 64 0 0 0-64 64 32 32 0 0 1-64 0 128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128 32 32 0 0 1 0-64 64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64z" Stretch="Uniform" />
</Border>-->
</Grid>
</Border>
</Grid>
</Border>
</UserControl>
@@ -3,6 +3,7 @@ using AllBase;
using AllBase.Helper;
using AllBase.Model.DBModel;
using NaiBa.Util.Extension;
using OrderSupportTicket.Models;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -25,43 +26,43 @@ using Work._29Tools.Forms.ShopForms;
namespace _29WxOrderWpf.Ctrls.OrderCtrls
{
/// <summary>
/// OrderListRowHeaderCtrl.xaml 的交互逻辑
/// </summary>
public partial class OrderListRowHeaderCtrl : UserControl
{
public OrderListRowHeaderCtrl()
{
InitializeComponent();
this.DataContextChanged += OrderListRowHeaderCtrl_DataContextChanged;
txtOrderId.AddHandler(TextBox.MouseUpEvent, new MouseButtonEventHandler(txtOrderId_MouseLeftButtonUp), true);
txtShopName.AddHandler(TextBox.MouseUpEvent, new MouseButtonEventHandler(txtShopName_MouseLeftButtonUp), true);
}
/// <summary>
/// OrderListRowHeaderCtrl.xaml 的交互逻辑
/// </summary>
public partial class OrderListRowHeaderCtrl : UserControl
{
public OrderListRowHeaderCtrl()
{
InitializeComponent();
this.DataContextChanged += OrderListRowHeaderCtrl_DataContextChanged;
txtOrderId.AddHandler(TextBox.MouseUpEvent, new MouseButtonEventHandler(txtOrderId_MouseLeftButtonUp), true);
txtShopName.AddHandler(TextBox.MouseUpEvent, new MouseButtonEventHandler(txtShopName_MouseLeftButtonUp), true);
}
private void txtShopName_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
if (this.DataContext is oms_wei_order_info order)
{
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == order.shop_id.ParseToString());
if (shop != null)
{
WXShopLoginForm shopLoginForm = new WXShopLoginForm(shop);
ShopBLL.CheckShopLogin(shop);
if (shop.LoginStatus == "登录成功")
{
// 在线直接进店
shopLoginForm.openType = EnumOpenType.manage;
shopLoginForm.WindowState = System.Windows.Forms.FormWindowState.Maximized;
shopLoginForm.InitUrl = "https://store.weixin.qq.com/shop/home";
shopLoginForm.Show();
}
else
{
// 掉线登录
shopLoginForm.openType = EnumOpenType.login;
shopLoginForm.ShowDialog();
private void txtShopName_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
if (this.DataContext is oms_wei_order_info order)
{
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == order.shop_id.ParseToString());
if (shop != null)
{
WXShopLoginForm shopLoginForm = new WXShopLoginForm(shop);
ShopBLL.CheckShopLogin(shop);
if (shop.LoginStatus == "登录成功")
{
// 在线直接进店
shopLoginForm.openType = EnumOpenType.manage;
shopLoginForm.WindowState = System.Windows.Forms.FormWindowState.Maximized;
shopLoginForm.InitUrl = "https://store.weixin.qq.com/shop/home";
shopLoginForm.Show();
}
else
{
// 掉线登录
shopLoginForm.openType = EnumOpenType.login;
shopLoginForm.ShowDialog();
if (shop.LoginStatus == "登录成功")
if (shop.LoginStatus == "登录成功")
{
shop.Is29Supplier = false;
for (int i = 0; i < 100; i++)
@@ -82,87 +83,87 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
if (i * 20 >= totalCount)
break;
}
foreach (var ord in GlobalConfig.lstFilterOrder.Where(o => o.shop_id.ParseToString() == shop.ErpShopId).ToList())
{
// 更新代发管理情况
foreach (var orderItem in ord.orderItems)
Dispatcher.Invoke(new Action(() => { orderItem.UpdateOrderItemBuyButton(); }));
}
}
}
}
}
}
private void txtOrderId_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
if (this.DataContext is oms_wei_order_info order)
{
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == order.shop_id.ParseToString());
if (shop != null)
{
WXShopLoginForm shopLoginForm = new WXShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.manage;
shopLoginForm.WindowState = System.Windows.Forms.FormWindowState.Maximized;
{
shopLoginForm.InitUrl = "https://store.weixin.qq.com/shop/order/detail?orderid=" + order.order_id;
}
shopLoginForm.Show();
}
}
}
foreach (var ord in GlobalConfig.lstFilterOrder.Where(o => o.shop_id.ParseToString() == shop.ErpShopId).ToList())
{
// 更新代发管理情况
foreach (var orderItem in ord.orderItems)
Dispatcher.Invoke(new Action(() => { orderItem.UpdateOrderItemBuyButton(); }));
}
}
}
}
}
}
private void OrderListRowHeaderCtrl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
{
if (this.DataContext is oms_wei_order_info order)
{
if (order.orderItems.Count > 5)
{
txtCount.Text = "该订单共计 " + order.orderItems.Count + " 件商品";
}
}
}
private void txtOrderId_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
if (this.DataContext is oms_wei_order_info order)
{
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == order.shop_id.ParseToString());
if (shop != null)
{
WXShopLoginForm shopLoginForm = new WXShopLoginForm(shop);
shopLoginForm.openType = EnumOpenType.manage;
shopLoginForm.WindowState = System.Windows.Forms.FormWindowState.Maximized;
private void Path_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
//var orderId = ((sender as Border)?.Tag).ParseToString();
if (this.DataContext is oms_wei_order_info order)
{
{
shopLoginForm.InitUrl = "https://store.weixin.qq.com/shop/order/detail?orderid=" + order.order_id;
}
shopLoginForm.Show();
}
}
}
try
{
//Clipboard.SetText(order.order_id); // 复制成功,但会报错,改为SetDataObject
Clipboard.SetDataObject(order.order_id);
BaseMsgWindow.ShowAnimateMessage("复制成功");
}
catch (Exception ex)
{
BaseMsgWindow.ShowError("复制失败 " + ex.Message);
}
}
}
private void OrderListRowHeaderCtrl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
{
if (this.DataContext is oms_wei_order_info order)
{
if (order.orderItems.Count > 5)
{
txtCount.Text = "该订单共计 " + order.orderItems.Count + " 件商品";
}
}
}
private void pathShop_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
if (this.DataContext is oms_wei_order_info order)
{
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == order.shop_id.ParseToString());
if (shop != null)
{
try
{
Clipboard.SetDataObject(shop.ShopAccount);
BaseMsgWindow.ShowAnimateMessage("复制成功");
}
catch (Exception ex)
{
BaseMsgWindow.ShowError("复制失败 " + ex.Message);
}
}
}
}
private void Path_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
//var orderId = ((sender as Border)?.Tag).ParseToString();
if (this.DataContext is oms_wei_order_info order)
{
try
{
//Clipboard.SetText(order.order_id); // 复制成功,但会报错,改为SetDataObject
Clipboard.SetDataObject(order.order_id);
BaseMsgWindow.ShowAnimateMessage("复制成功");
}
catch (Exception ex)
{
BaseMsgWindow.ShowError("复制失败 " + ex.Message);
}
}
}
private void pathShop_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
if (this.DataContext is oms_wei_order_info order)
{
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == order.shop_id.ParseToString());
if (shop != null)
{
try
{
Clipboard.SetDataObject(shop.ShopAccount);
BaseMsgWindow.ShowAnimateMessage("复制成功");
}
catch (Exception ex)
{
BaseMsgWindow.ShowError("复制失败 " + ex.Message);
}
}
}
}
private void borderFlag_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
@@ -195,9 +196,44 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
order.colour_flag = flag;
Thread.Sleep(1000);
Dispatcher.Invoke(new Action(() => { MainWindow.Instance.orderListCtrl.FilterOneOrder(order); }));
});
}
}
/// <summary>
/// 创建工单
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private async void btn_createOrderSupportTicket(object sender, RoutedEventArgs e)
{
if (!(this.DataContext is oms_wei_order_info order))
return;
var shop = order.Shop
?? GlobalConfig.ShopLoginList.FirstOrDefault(
s => s.ErpShopId == order.shop_id.ParseToString());
var appId = shop?.ShopId?.Trim();
if (string.IsNullOrWhiteSpace(appId)
|| string.IsNullOrWhiteSpace(order.order_id))
{
BaseMsgWindow.ShowAnimateMessage(
"订单缺少店铺 APPID 或订单号,无法创建工单",
"Error",
5);
return;
}
var ticketOrder = TicketOrderOption.FromWechatOrder(order, appId);
try
{
await MainWindow.Instance.CreateOrderSupportTicketAsync(ticketOrder);
}
catch (Exception ex)
{
BaseMsgWindow.ShowError("打开工单窗口失败:" + ex.Message);
}
}
}
}