淘宝拍单优化
This commit is contained in:
1 parent
ea14ad3af4
commit
e7d22984df
12 files changed
+2233
-46
No files matched your search
@@ -0,0 +1,95 @@
|
||||
using _29WxOrderWpf.ViewModels;
|
||||
using AllBase.Model.DBModel;
|
||||
using CefSharp.Wpf;
|
||||
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;
|
||||
|
||||
namespace _29WxOrderWpf.Ctrls.BuyerCtrls;
|
||||
|
||||
/// <summary>
|
||||
/// PddBuyOrderCtrl.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class PddBuyOrderCtrl : UserControl
|
||||
{
|
||||
|
||||
/// <summary>视图模型</summary>
|
||||
public PddBuyOrderViewModel ViewModel { get; }
|
||||
|
||||
public PddBuyOrderCtrl(BuyerLoginInfo buyerInfo, oms_wei_order_item_info orderItemInfo)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
foreach (var warehouse in TransitWarehouseData.TransitWarehouseList)
|
||||
{
|
||||
this.cmbTransitWarehouse.Items.Add(warehouse.TransName + " " + warehouse.TransFullAddress);
|
||||
}
|
||||
|
||||
ViewModel = new PddBuyOrderViewModel(buyerInfo, orderItemInfo);
|
||||
ViewModel.BrowserCreated += ViewModel_BrowserCreated;
|
||||
ViewModel.RequestClose += ViewModel_RequestClose;
|
||||
DataContext = ViewModel;
|
||||
}
|
||||
|
||||
private async void pddBuyOrderCtrl_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
//btnManualUpdateSendProvince.Visibility = Visibility.Collapsed;
|
||||
if (this.ViewModel.BuyType == "direct")
|
||||
{
|
||||
this.tcBuyAddress.Title = "拍单地址:";
|
||||
}
|
||||
|
||||
await ViewModel.Start();
|
||||
}
|
||||
private void ViewModel_BrowserCreated(ChromiumWebBrowser browser)
|
||||
{
|
||||
Grid.SetRow(browser, 0);
|
||||
Grid.SetColumn(browser, 0);
|
||||
BrowserHost.Children.Add(browser);
|
||||
}
|
||||
|
||||
private void ViewModel_RequestClose()
|
||||
{
|
||||
Window parentWindow = Window.GetWindow(this);
|
||||
if (this.IsLoaded && parentWindow != null)
|
||||
parentWindow.Close();
|
||||
}
|
||||
|
||||
private void txtAddress_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.Key == Key.Enter)
|
||||
{
|
||||
ViewModel.ReloadCommand.Execute(null);
|
||||
}
|
||||
}
|
||||
|
||||
private void cmbTransitWarehouse_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void imgOrderItem_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (imgOrderItem.Width == 100)
|
||||
{
|
||||
imgOrderItem.Width = 500;
|
||||
imgOrderItem.Height = 500;
|
||||
}
|
||||
else
|
||||
{
|
||||
imgOrderItem.Width = 100;
|
||||
imgOrderItem.Height = 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user