优化订单读取与拍单逻辑
This commit is contained in:
1 parent
e02047ae57
commit
103b2a1a4a
9 files changed
+774
-712
No files matched your search
@@ -1,6 +1,5 @@
|
||||
using _29WxOrderWpf.BaseWindows;
|
||||
using WxOrder.Framework.Commons;
|
||||
using WxOrder.Framework.Commons;
|
||||
using _29WxOrderWpf.Ctrls.PDDInvoice;
|
||||
using _29WxOrderWpf.Ctrls.Statistics;
|
||||
using _29WxOrderWpf.Services;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using _29WxOrderWpf.BaseWindows;
|
||||
using WxOrder.Framework.Commons;
|
||||
using WxOrder.Framework.Commons;
|
||||
using _29WxOrderWpf.Ctrls.BuyerCtrls;
|
||||
using _29WxOrderWpf.Ctrls.Statistics;
|
||||
using _29WxOrderWpf.Services;
|
||||
|
||||
@@ -167,6 +167,7 @@
|
||||
Grid.Column="6"
|
||||
Margin="4,8,4,8"
|
||||
VerticalAlignment="Center"
|
||||
d:Text="店铺名称"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Cursor="Hand"
|
||||
|
||||
@@ -95,7 +95,15 @@
|
||||
Cursor="Hand"
|
||||
MouseDown="imgOrderItem_MouseDown"
|
||||
MouseEnter="imgOrderItem_MouseEnter"
|
||||
MouseLeave="imgOrderItem_MouseLeave" />
|
||||
MouseLeave="imgOrderItem_MouseLeave">
|
||||
<Image.Source>
|
||||
<MultiBinding Converter="{StaticResource ImageUrlToBitmapImage}" Mode="OneWay">
|
||||
<Binding IsAsync="True" Path="ThumbImgStr" />
|
||||
<Binding IsAsync="True" Path="IsLoadThumbImg" />
|
||||
<!--<Binding Path="DataContext.IsLoadImage" RelativeSource="{RelativeSource AncestorType=UserControl}" />-->
|
||||
</MultiBinding>
|
||||
</Image.Source>
|
||||
</Image>
|
||||
|
||||
<wpf:SpacingStackPanel
|
||||
Grid.Column="1"
|
||||
|
||||
@@ -672,9 +672,9 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
if (isAbnormalOrder)
|
||||
buyOrderForm.AbnormalTransitWarehouseOrderInfo = orderItem.ItemTransitOrder;
|
||||
buyOrderForm.ShowDialog();
|
||||
OrderListCtrl.IsAutoBuy = buyOrderForm.IsAutoBuy;
|
||||
OrderListCtrl.IsAutoBuy = (buyOrderForm?.IsAutoBuy).ParseToBool();
|
||||
|
||||
if (buyOrderForm.IsBuySuccess)
|
||||
if (buyOrderForm?.IsBuySuccess == true)
|
||||
{
|
||||
Task.Run(async () =>
|
||||
{
|
||||
@@ -799,11 +799,18 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
// }));
|
||||
//});
|
||||
|
||||
//var bImg = await AllBase.ImageBuild.LoadBitmipImageFromUrlAsync(order_item.thumb_img + "?imageView2/1/w/100/format/webp|imageMogr2/auto-orient=");
|
||||
//var bImg = await AllBase.ImageBuild.LoadBitmipImageFromUrlAsync(order_item.thumb_img + "?imageView2/1/w/100/h/100/format/jpg/q/85|imageMogr2/auto-orient=");
|
||||
var bImg = await AllBase.ImageBuild.LoadBitmipImageFromUrlAsync(order_item.thumb_img + "?imageView2/1/w/100/h/100/format/jpg/q/80");
|
||||
imgOrderItem.Source = bImg;
|
||||
//var imgItem = imgOrderItem;
|
||||
//Task.Run(() =>
|
||||
//{
|
||||
// BitmapImage bImg = AllBase.ImageBuild.LoadBitmipImageFromUrl(order_item.thumb_img + "?imageView2/1/w/100/h/100/format/jpg/q/80");
|
||||
// Thread.Sleep(Randomx.GetId(1000));
|
||||
// Dispatcher.Invoke(new Action(() =>
|
||||
// {
|
||||
// imgItem.Source = bImg;
|
||||
// }));
|
||||
//});
|
||||
|
||||
//await UpdateImg(order_item, imgOrderItem);
|
||||
|
||||
// 待采购不显示所有采购信息状态(否则会显示作废订单状态)
|
||||
if (GlobalConfig.OrderTabHeaderStr.StartsWith("待采购"))
|
||||
@@ -821,6 +828,14 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
}
|
||||
}
|
||||
|
||||
public async Task UpdateImg(oms_wei_order_item_info order_item, Image imageItem)
|
||||
{
|
||||
//var bImg = await AllBase.ImageBuild.LoadBitmipImageFromUrlAsync(order_item.thumb_img + "?imageView2/1/w/100/format/webp|imageMogr2/auto-orient=");
|
||||
//var bImg = await AllBase.ImageBuild.LoadBitmipImageFromUrlAsync(order_item.thumb_img + "?imageView2/1/w/100/h/100/format/jpg/q/85|imageMogr2/auto-orient=");
|
||||
var bImg = await AllBase.ImageBuild.LoadBitmipImageFromUrlAsync(order_item.thumb_img + "?imageView2/1/w/100/h/100/format/jpg/q/80");
|
||||
Dispatcher.Invoke(new Action(() => { imageItem.Source = bImg; }));
|
||||
}
|
||||
|
||||
private void TransitOrderBuy_Click(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
var orderItem = this.DataContext as oms_wei_order_item_info;
|
||||
@@ -1590,7 +1605,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
buyOrderForm.pnlMap.Visible = false;
|
||||
}
|
||||
buyOrderForm.ShowDialog();
|
||||
IsBuySuccess = buyOrderForm.IsBuySuccess;
|
||||
IsBuySuccess = (buyOrderForm?.IsBuySuccess).ParseToBool();
|
||||
}
|
||||
else if (GlobalConfig.CurrentBuyPlatform == "tb")
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user