114 lines
4.4 KiB
C#
114 lines
4.4 KiB
C#
using _29WxOrderWpf.BaseWindows;
|
|
using AllBase;
|
|
using AllBase.Helper;
|
|
using AllBase.Model;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using System.Windows.Documents;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Navigation;
|
|
using System.Windows.Shapes;
|
|
using TemuKJD.ToolForms;
|
|
|
|
namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
|
{
|
|
/// <summary>
|
|
/// OrderListRowItemCtrl.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class OrderListRowItemCtrl : UserControl
|
|
{
|
|
public OrderListRowItemCtrl()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void btnSeeAddressDetail_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
var order = this.DataContext as AllBase.Model.oms_wei_order_item_info;
|
|
if (order == null)
|
|
return;
|
|
}
|
|
|
|
private void btnGetRefundAddress_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
var order = this.DataContext as AllBase.Model.oms_wei_order_item_info;
|
|
if (order == null)
|
|
return;
|
|
}
|
|
|
|
private void CheckBox_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void btnCopyRemark_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void btnBuyOrder_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
var orderItem = this.DataContext as AllBase.Model.oms_wei_order_item_info;
|
|
if (orderItem == null)
|
|
{
|
|
BaseMsgWindow.ShowError(MainWindow.Instance, "订单信息为空");
|
|
return;
|
|
}
|
|
if (GlobalConfig.CurrentPddBuyer == null)
|
|
{
|
|
BaseMsgWindow.ShowError(MainWindow.Instance, "请选择买手号");
|
|
return;
|
|
}
|
|
if (GlobalConfig.CurrentPddBuyer.status == "在线")
|
|
PddMobileLoginForm.CheckBuyerLogin(GlobalConfig.CurrentPddBuyer);
|
|
if (GlobalConfig.CurrentPddBuyer.status != "在线")
|
|
{
|
|
BaseMsgWindow.ShowError(MainWindow.Instance, "买手号掉线");
|
|
return;
|
|
}
|
|
|
|
PddMobileBuyOrderForm buyOrderForm = new PddMobileBuyOrderForm(MainWindow.Instance.orderListCtrl.FilterOneOrder, orderItem, GlobalConfig.CurrentPddBuyer, orderItem.buy_map);
|
|
//所有订单页面
|
|
buyOrderForm.InitUrl = "https://mobile.yangkeduo.com/orders.html?type=0&comment_tab=1&combine_orders=1&" +
|
|
"main_orders=1&refer_page_name=personal&refer_page_id=10001_1782219035613_a9ulipk4k3&refer_page_sn=10001";
|
|
//已有拍单关联的跳的到订单确认界面
|
|
if (orderItem.buy_map != null)
|
|
{
|
|
buyOrderForm.InitUrl = "https://mobile.yangkeduo.com/order_checkout.html?sku_id=" + orderItem.buy_map.map_sku_id +
|
|
"&group_id=1" + Randomx.GetNumber(11) + "&goods_id=" + orderItem.buy_map.map_goods_id + "&goods_number=" + +orderItem.sku_cnt +
|
|
"&page_from=101&detail_id=" + Randomx.GetNumber(11) + "&_oak_rcto=YW" +
|
|
Randomx.GetWordNumber("JvLXvJ8Fx9mUIW34yn103TOlATJGk5PaZshD6pY1bsVrsIjWdxWwjCoNX3IGT".Length) + "_VWkP5_q-1QNqGg" +
|
|
"&order_extra_type=1&refer_page_element=open_btn&source_channel=0&refer_page_name=goods_detail" +
|
|
"&refer_page_id=10014_" + BaseClass.DateTimeToTimestampSeconds(DateTime.Now) + Randomx.GetNumber(3) + "_tny5ifswls&refer_page_sn=10014";
|
|
|
|
buyOrderForm.InitUrl = "https://mobile.yangkeduo.com/order_checkout.html?sku_id=" + orderItem.buy_map.map_sku_id +
|
|
"&group_id=1" + Randomx.GetNumber(11) + "&goods_id=" + orderItem.buy_map.map_goods_id + "&goods_number=" + +orderItem.sku_cnt +
|
|
"&page_from=101";
|
|
}
|
|
buyOrderForm.ShowDialog();
|
|
}
|
|
|
|
private void UserControl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
|
|
{
|
|
if (this.DataContext is oms_wei_order_item_info order_item)
|
|
{
|
|
btnBuyOrder.Content = order_item.buy_map == null ? "关联拍单" : "拍单";
|
|
}
|
|
else
|
|
{
|
|
btnBuyOrder.Content = "关联拍单";
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
}
|