显示买手退款详情
This commit is contained in:
1 parent
5777c30048
commit
85259d8335
7 files changed
+248
-110
No files matched your search
@@ -0,0 +1,91 @@
|
||||
using _29WxOrderWpf.BaseWindows;
|
||||
using _29WxOrderWpf.Ctrls.BuyerCtrls;
|
||||
using _29WxOrderWpf.ViewModels;
|
||||
using AllBase;
|
||||
using AllBase.Helper;
|
||||
using AllBase.Model.DBModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using TemuKJD.ToolForms;
|
||||
using WxOrder.Framework.Commons;
|
||||
|
||||
namespace _29WxOrderWpf.Ctrls.OrderCtrls;
|
||||
|
||||
internal class OrderBuyerOrdersHelper
|
||||
{
|
||||
public static void ShowBuyerOrder(oms_wei_order_item_info orderItem, string buyerAccount, string buyerName, string outOrderId, bool isShowOrderList = false)
|
||||
{
|
||||
if (outOrderId.StartsWith("tb_")) // 淘宝买手及订单
|
||||
{
|
||||
var buyer = GlobalConfig.TaobaoBuyerLoginList.FirstOrDefault(p => p.buyer_id == buyerAccount || p.buyer_name == buyerName);
|
||||
if (buyer == null)
|
||||
{
|
||||
BaseMsgWindow.ShowError("该订单买手号未在当前账户登录");
|
||||
return;
|
||||
}
|
||||
|
||||
var url = "";
|
||||
if (isShowOrderList)
|
||||
url = "https://buyertrade.taobao.com/trade/itemlist/list_bought_items.htm?";
|
||||
else
|
||||
url = "https://trade.tmall.com/detail/orderDetail.htm?bizOrderId=" + outOrderId.Replace("tb_", "");
|
||||
|
||||
TaobaoBuyOrderCtrl taobaoBuyView = new TaobaoBuyOrderCtrl(GlobalConfig.CurrentTaobaoBuyer, orderItem);
|
||||
taobaoBuyView.ViewModel.InitUrl = url;
|
||||
new DialogWindow()
|
||||
{
|
||||
Title = "订单查看 - 当前买手 " + buyer.buyer_nick,
|
||||
Content = taobaoBuyView,
|
||||
Width = SystemParameters.PrimaryScreenWidth < 1920 ? SystemParameters.PrimaryScreenWidth : SystemParameters.PrimaryScreenWidth * 90 / 100,
|
||||
Height = SystemParameters.PrimaryScreenHeight * 90 / 100,
|
||||
WindowStartupLocation = WindowStartupLocation.CenterScreen,
|
||||
}.ShowDialog();
|
||||
}
|
||||
else // 拼多多买手及订单
|
||||
{
|
||||
var buyer = GlobalConfig.PDDBuyerLoginList.FirstOrDefault(p => p.buyer_id == buyerAccount || p.buyer_name == buyerName);
|
||||
if (buyer == null)
|
||||
{
|
||||
BaseMsgWindow.ShowError("该订单买手号未在当前账户登录");
|
||||
return;
|
||||
}
|
||||
|
||||
var url = "";
|
||||
if (isShowOrderList)
|
||||
url = "https://mobile.yangkeduo.com/index.html"; /* 订单列表 */
|
||||
else
|
||||
url = "https://mobile.yangkeduo.com/order.html?order_sn=" + outOrderId + "&page_from=1&main_orders=1&is_tester=1&refer_page_name=my_order" +
|
||||
"&refer_page_id=10032_" + BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now) + "_" + Randomx.GetWordNumber(10) + "&refer_page_sn=10032";
|
||||
|
||||
// 拍单的时候检测一下买手号
|
||||
if (buyer.status == "在线")
|
||||
{
|
||||
PddMobileLoginViewModel.CheckBuyerLogin(buyer);
|
||||
}
|
||||
if (buyer.status != "在线")
|
||||
{
|
||||
BaseMsgWindow.ShowError("买手号掉线");
|
||||
return;
|
||||
}
|
||||
|
||||
PddMobileBuyOrderForm buyOrderForm = new PddMobileBuyOrderForm(MainWindow.Instance.orderListCtrl.FilterOneOrder, StartUp.UpdateBalance, orderItem, buyer, orderItem.PddBuyMap)
|
||||
{
|
||||
TitleText = "订单查看 - 当前买手 " + buyer.buyer_nick,
|
||||
InitUrl = url /* 订单页面 */
|
||||
};
|
||||
buyOrderForm.pnlBuy.Visible = false;
|
||||
|
||||
//已有拍单关联的控制界面显示隐藏
|
||||
if (orderItem.PddBuyMap != null)
|
||||
{
|
||||
buyOrderForm.pnlBuy.Visible = true;
|
||||
buyOrderForm.pnlMap.Visible = false;
|
||||
}
|
||||
buyOrderForm.ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user