删除不合适的仓库 优化订单和售后单读取
This commit is contained in:
1 parent
6f7aa58ac1
commit
13b68fa64e
53 files changed
+14843
-820
No files matched your search
@@ -1,4 +1,6 @@
|
||||
using _29WxOrderWpf.BaseWindows;
|
||||
using AllBase.Helper;
|
||||
using AllBase.Model.Local;
|
||||
using NaiBa.Util.Extension;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -11,9 +13,12 @@ using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using Work._29Tools.BLL;
|
||||
using Work._29Tools.Forms.ShopForms;
|
||||
|
||||
namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
{
|
||||
@@ -25,6 +30,86 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
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();
|
||||
|
||||
if (shop.LoginStatus == "登录成功")
|
||||
{
|
||||
var is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierList(shop);
|
||||
if (!is29SupplierRst.Contains("\"code\":0"))
|
||||
is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierList(shop);
|
||||
if (is29SupplierRst.Contains("\"code\":0") && is29SupplierRst.Contains("\"name\":\"29供货商\""))
|
||||
{
|
||||
shop.Is29Supplier = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ShopBLL.CheckShopLogin(shop);
|
||||
shop.Is29Supplier = false;
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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 Path_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
@@ -33,10 +118,31 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
try
|
||||
{
|
||||
Clipboard.SetText(orderId);
|
||||
BaseMsgWindow.ShowAnimateMessage("复制成功");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
BaseMsgWindow.ShowError(MainWindow.Instance, "复制失败 " + ex.Message);
|
||||
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.SetText(shop.ShopAccount);
|
||||
BaseMsgWindow.ShowAnimateMessage("复制成功");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
BaseMsgWindow.ShowError("复制失败 " + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user