取消代发后再发送礼物单
This commit is contained in:
1 parent
a7f1891dd3
commit
7ef75f8134
17 files changed
+3024
-1714
No files matched your search
@@ -0,0 +1,24 @@
|
|||||||
|
using NaiBa.Util.Extension;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Data;
|
||||||
|
|
||||||
|
namespace _29WxOrderWpf.Converters
|
||||||
|
{
|
||||||
|
public class MoreThanZeroVisibilityConverter : IValueConverter
|
||||||
|
{
|
||||||
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
return value.ParseToInt() > 0 ? Visibility.Visible : Visibility.Collapsed;
|
||||||
|
}
|
||||||
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException(); // 单向绑定可不实现
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -84,21 +84,21 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
|||||||
AutoGetOrder();
|
AutoGetOrder();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void GetOrderTest()
|
//public void GetOrderTest()
|
||||||
{
|
//{
|
||||||
for (int i = 0; i < 10000; i++)
|
// for (int i = 0; i < 10000; i++)
|
||||||
{
|
// {
|
||||||
//lstOrder.Add(new oms_wei_order_info() { id = 1, IsSelect = false, order_id = ("3737033423685556736".ParseToLong() + Randomx.GetId(0,100)).ParseToString(), shop_name = "媛卡曦工厂优选" });
|
// //lstOrder.Add(new oms_wei_order_info() { id = 1, IsSelect = false, order_id = ("3737033423685556736".ParseToLong() + Randomx.GetId(0,100)).ParseToString(), shop_name = "媛卡曦工厂优选" });
|
||||||
GlobalConfig.lstOrder.Add(new oms_wei_order_info() { id = 1, IsSelect = false, order_id = Randomx.GetId(1000, 10000).ParseToString(), shop_name = "媛卡曦工厂优选" });
|
// GlobalConfig.lstOrder.Add(new oms_wei_order_info() { id = 1, IsSelect = false, order_id = Randomx.GetId(1000, 10000).ParseToString(), shop_name = "媛卡曦工厂优选" });
|
||||||
}
|
// }
|
||||||
//GlobalConfig.lstOrder.SortDesc(o => o.order_id.ParseToLong());
|
// //GlobalConfig.lstOrder.SortDesc(o => o.order_id.ParseToLong());
|
||||||
}
|
//}
|
||||||
|
|
||||||
public void AutoGetOrder()
|
public void AutoGetOrder()
|
||||||
{
|
{
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
Thread.Sleep(5000);
|
//Thread.Sleep(5000);
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
if (!IsAutoReadOrder)
|
if (!IsAutoReadOrder)
|
||||||
@@ -136,6 +136,11 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
|||||||
/// <param name="filterGetCondition">按过滤条件读取读取服务端订单</param>
|
/// <param name="filterGetCondition">按过滤条件读取读取服务端订单</param>
|
||||||
public void GetOrder(string orderIds = "", bool filterGetCondition = false)
|
public void GetOrder(string orderIds = "", bool filterGetCondition = false)
|
||||||
{
|
{
|
||||||
|
while (!MainWindow.Instance.hasReadShop)
|
||||||
|
{
|
||||||
|
Thread.Sleep(100);
|
||||||
|
}
|
||||||
|
|
||||||
BottomMsg = "开始读取订单...";
|
BottomMsg = "开始读取订单...";
|
||||||
StartProgress();
|
StartProgress();
|
||||||
Dispatcher.Invoke(new Action(() =>
|
Dispatcher.Invoke(new Action(() =>
|
||||||
@@ -934,6 +939,11 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
|||||||
if (order == null)
|
if (order == null)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
if (order.order_id == "3738456804637165312")
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// 过滤id
|
// 过滤id
|
||||||
if (!string.IsNullOrEmpty(txtOrderId.Text.Trim()))
|
if (!string.IsNullOrEmpty(txtOrderId.Text.Trim()))
|
||||||
{
|
{
|
||||||
@@ -1190,11 +1200,6 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
|||||||
});
|
});
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
while (!MainWindow.Instance.hasReadShop)
|
|
||||||
{
|
|
||||||
Thread.Sleep(100);
|
|
||||||
}
|
|
||||||
|
|
||||||
GetOrder();
|
GetOrder();
|
||||||
nextGetOrderTime = DateTime.Now.AddMinutes(25);
|
nextGetOrderTime = DateTime.Now.AddMinutes(25);
|
||||||
});
|
});
|
||||||
@@ -1881,19 +1886,27 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
giftType = GiftType._155;
|
giftType = GiftType._160;
|
||||||
}
|
}
|
||||||
int index = 1;
|
int index = 1;
|
||||||
int sucessCount = 0;
|
int sucessCount = 0;
|
||||||
int errorCount = 0;
|
int errorCount = 0;
|
||||||
foreach (oms_wei_order_info item in list)
|
foreach (oms_wei_order_info item in list)
|
||||||
{
|
{
|
||||||
var ret = await _shipGiftService.Send(item.order_id, giftType);
|
var rst = await WxApiBLL.WxSearchAndDropshipCancel(item.Shop, item);
|
||||||
if (ret)
|
if (rst == "success")
|
||||||
{
|
{
|
||||||
sucessCount++;
|
var ret = await _shipGiftService.Send(item.order_id, giftType);
|
||||||
item.gift_order_status = 1;
|
if (ret)
|
||||||
this.FilterOneOrder(item, true);
|
{
|
||||||
|
sucessCount++;
|
||||||
|
item.gift_order_status = 1;
|
||||||
|
this.FilterOneOrder(item, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
errorCount++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,21 +35,6 @@
|
|||||||
<RowDefinition Height="auto"></RowDefinition>
|
<RowDefinition Height="auto"></RowDefinition>
|
||||||
<RowDefinition Height="6"></RowDefinition>
|
<RowDefinition Height="6"></RowDefinition>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<!--<Border Visibility="{Binding order_item1_visibility}" Grid.Row="1">
|
|
||||||
<local:OrderListRowItemCtrl x:Name="item1" Grid.Row="1" DataContext="{Binding order_item1}" VerticalAlignment="Center" VerticalContentAlignment="Center"></local:OrderListRowItemCtrl>
|
|
||||||
</Border>
|
|
||||||
<Border Visibility="{Binding order_item2_visibility}" Grid.Row="2">
|
|
||||||
<local:OrderListRowItemCtrl x:Name="item2" Grid.Row="2" DataContext="{Binding order_item2}" VerticalAlignment="Center" VerticalContentAlignment="Center"></local:OrderListRowItemCtrl>
|
|
||||||
</Border>
|
|
||||||
<Border Visibility="{Binding order_item3_visibility}" Grid.Row="3">
|
|
||||||
<local:OrderListRowItemCtrl x:Name="item3" Grid.Row="3" DataContext="{Binding order_item3}" VerticalAlignment="Center" VerticalContentAlignment="Center"></local:OrderListRowItemCtrl>
|
|
||||||
</Border>
|
|
||||||
<Border Visibility="{Binding order_item4_visibility}" Grid.Row="4">
|
|
||||||
<local:OrderListRowItemCtrl x:Name="item4" Grid.Row="4" DataContext="{Binding order_item4}" VerticalAlignment="Center" VerticalContentAlignment="Center"></local:OrderListRowItemCtrl>
|
|
||||||
</Border>
|
|
||||||
<Border Visibility="{Binding order_item5_visibility}" Grid.Row="5">
|
|
||||||
<local:OrderListRowItemCtrl x:Name="item5" Grid.Row="5" DataContext="{Binding order_item5}" VerticalAlignment="Center" VerticalContentAlignment="Center"></local:OrderListRowItemCtrl>
|
|
||||||
</Border>-->
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -66,8 +66,8 @@
|
|||||||
<Image Grid.Column="5" Margin="8,8,0,8" Width="24" Height="24" Source="{StaticResource imgOrderWeishopIcon}"></Image>
|
<Image Grid.Column="5" Margin="8,8,0,8" Width="24" Height="24" Source="{StaticResource imgOrderWeishopIcon}"></Image>
|
||||||
<uc:UcWaterMarkTextBox1 WaterMark="店铺状态" x:Name="txtShopLoginStatus" Grid.Column="5" HorizontalAlignment="Right" Margin="0,12,-6,0" Padding="0" FontWeight="Bold"
|
<uc:UcWaterMarkTextBox1 WaterMark="店铺状态" x:Name="txtShopLoginStatus" Grid.Column="5" HorizontalAlignment="Right" Margin="0,12,-6,0" Padding="0" FontWeight="Bold"
|
||||||
VerticalAlignment="Center" FontSize="7" Background="{StaticResource ListHeadBackColorBrush}" IsReadOnly="True"
|
VerticalAlignment="Center" FontSize="7" Background="{StaticResource ListHeadBackColorBrush}" IsReadOnly="True"
|
||||||
Text="{Binding order_item1.Shop.LoginStatusStr}" BorderThickness="0"
|
Text="{Binding Shop.LoginStatusStr}" BorderThickness="0"
|
||||||
Foreground="{Binding order_item1.Shop.LoginStatusStr, Converter={StaticResource statusToColorBrushConverter}}"/>
|
Foreground="{Binding Shop.LoginStatusStr, Converter={StaticResource statusToColorBrushConverter}}"/>
|
||||||
<uc:UcWaterMarkTextBox1 Grid.Column="6" Foreground="{StaticResource PageLinkBrush}" Cursor="Hand" WaterMark="店铺名称" x:Name="txtShopName" Margin="4,8,4,8" VerticalAlignment="Center"
|
<uc:UcWaterMarkTextBox1 Grid.Column="6" Foreground="{StaticResource PageLinkBrush}" Cursor="Hand" WaterMark="店铺名称" x:Name="txtShopName" Margin="4,8,4,8" VerticalAlignment="Center"
|
||||||
FontSize="14" Background="Transparent" IsReadOnly="True" Text="{Binding shop_name}" BorderThickness="0" />
|
FontSize="14" Background="Transparent" IsReadOnly="True" Text="{Binding shop_name}" BorderThickness="0" />
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -1217,7 +1217,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
|||||||
if (apiSearchDropship.Contains("ds_order_id_list") && !apiSearchDropship.Contains("\"ds_order_id_list\":[]"))
|
if (apiSearchDropship.Contains("ds_order_id_list") && !apiSearchDropship.Contains("\"ds_order_id_list\":[]"))
|
||||||
{
|
{
|
||||||
var dsOrderId = JsonHelper.JObjectParse(apiSearchDropship)["ds_order_id_list"].FirstOrDefault().ParseToString();
|
var dsOrderId = JsonHelper.JObjectParse(apiSearchDropship)["ds_order_id_list"].FirstOrDefault().ParseToString();
|
||||||
var apiCancelDropship = new WxApiBLL().WxApiDropshipCancel(orderItem.Shop, orderItem.order_id, dsOrderId, orderItem.product_id, orderItem.sku_id, orderItem.sku_cnt.ParseToInt());
|
var apiCancelDropship = new WxApiBLL().WxApiDropshipCancel(orderItem.Shop, orderItem.ItemOrder, dsOrderId);
|
||||||
}
|
}
|
||||||
apiSearchDropship = new WxApiBLL().WxApiDropshipSearch(orderItem.Shop, orderItem.order_id, 100);
|
apiSearchDropship = new WxApiBLL().WxApiDropshipSearch(orderItem.Shop, orderItem.order_id, 100);
|
||||||
if (!apiSearchDropship.Contains("\"ds_order_id_list\":[]"))
|
if (!apiSearchDropship.Contains("\"ds_order_id_list\":[]"))
|
||||||
@@ -1377,20 +1377,24 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
giftType = GiftType._155;
|
giftType = GiftType._160;
|
||||||
}
|
}
|
||||||
Task.Run(async () =>
|
Task.Run(async () =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var ret = await MainWindow.Instance.orderListCtrl._shipGiftService.Send(orderItem.order_id, giftType);
|
var rst = await WxApiBLL.WxSearchAndDropshipCancel(orderItem.Shop, orderItem.ItemOrder);
|
||||||
if (ret)
|
if (rst == "success")
|
||||||
{
|
{
|
||||||
Application.Current.Dispatcher.Invoke(() =>
|
var ret = await MainWindow.Instance.orderListCtrl._shipGiftService.Send(orderItem.order_id, giftType);
|
||||||
|
if (ret)
|
||||||
{
|
{
|
||||||
orderItem.ItemOrder.gift_order_status = 1;
|
Application.Current.Dispatcher.Invoke(() =>
|
||||||
MainWindow.Instance.orderListCtrl.FilterOneOrder(orderItem.ItemOrder, true);
|
{
|
||||||
});
|
orderItem.ItemOrder.gift_order_status = 1;
|
||||||
|
MainWindow.Instance.orderListCtrl.FilterOneOrder(orderItem.ItemOrder, true);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
@@ -41,7 +41,8 @@ namespace _29WxOrderWpf.Ctrls.ShopCtrls
|
|||||||
{
|
{
|
||||||
this.lbxShop.ItemsSource = GlobalConfig.ShopLoginList;
|
this.lbxShop.ItemsSource = GlobalConfig.ShopLoginList;
|
||||||
|
|
||||||
Task.Run(() => {
|
Task.Run(() =>
|
||||||
|
{
|
||||||
while(MainWindow.Instance.hasReadShop == false)
|
while(MainWindow.Instance.hasReadShop == false)
|
||||||
{
|
{
|
||||||
Thread.Sleep(100);
|
Thread.Sleep(100);
|
||||||
|
|||||||
@@ -65,8 +65,8 @@ public class ShipGiftService
|
|||||||
userId = BaseClass.UserId,
|
userId = BaseClass.UserId,
|
||||||
userName = BaseClass.UserName,
|
userName = BaseClass.UserName,
|
||||||
giftOrderType = (int)giftType,
|
giftOrderType = (int)giftType,
|
||||||
amount = amount * 100,
|
amount = (int)(amount * 100),
|
||||||
oemAmount = BaseClass.OemGiftAmount * 100
|
oemAmount = (int)(BaseClass.OemGiftAmount * 100)
|
||||||
});
|
});
|
||||||
Debug.WriteLine($"礼品单:{data}");
|
Debug.WriteLine($"礼品单:{data}");
|
||||||
string ret = await HttpResponseWXBLL.e57PostResponseAsync("https://po.e57.cn//prod-api/api/oms-api/gift/order/deliveryFor29Erp", data, "");
|
string ret = await HttpResponseWXBLL.e57PostResponseAsync("https://po.e57.cn//prod-api/api/oms-api/gift/order/deliveryFor29Erp", data, "");
|
||||||
|
|||||||
@@ -1,29 +1,29 @@
|
|||||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<SolidColorBrush x:Key="mainColorBrush" Color="#FF98638f" />
|
||||||
<SolidColorBrush x:Key="mainColorBrush" Color="#FF98638f"/>
|
<SolidColorBrush x:Key="mainColorLightBrush" Color="#f5ebff" />
|
||||||
<SolidColorBrush x:Key="mainColorLightBrush" Color="#f5ebff"/>
|
<SolidColorBrush x:Key="mainColorDarkBrush" Color="#FF6b5393" />
|
||||||
<SolidColorBrush x:Key="mainColorDarkBrush" Color="#FF6b5393"/>
|
<SolidColorBrush x:Key="mainForegroundColorBrush" Color="#FF666666" />
|
||||||
<SolidColorBrush x:Key="mainForegroundColorBrush" Color="#FF666666"/>
|
<LinearGradientBrush x:Key="mainLinearColorBrush" StartPoint="0,0" EndPoint="1,0">
|
||||||
<LinearGradientBrush x:Key="mainLinearColorBrush" StartPoint="0,0" EndPoint="1,0" >
|
<GradientStop Offset="0.0" Color="#FF98638f" />
|
||||||
<GradientStop Color="#FF98638f" Offset="0.0"/>
|
<GradientStop Offset="1.0" Color="#FF6b5393" />
|
||||||
<GradientStop Color="#FF6b5393" Offset="1.0"/>
|
|
||||||
</LinearGradientBrush>
|
</LinearGradientBrush>
|
||||||
<SolidColorBrush x:Key="pageColorBrush" Color="#FF98638f"/>
|
<SolidColorBrush x:Key="pageColorBrush" Color="#FF98638f" />
|
||||||
<SolidColorBrush x:Key="pageColorLightBrush" Color="#f5ebff"/>
|
<SolidColorBrush x:Key="pageColorLightBrush" Color="#f5ebff" />
|
||||||
<SolidColorBrush x:Key="pageColorDarkBrush" Color="#FF6b5393"/>
|
<SolidColorBrush x:Key="pageColorDarkBrush" Color="#FF6b5393" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ListCtrlBackColorBrush" Color="#FFFFFFFF"/>
|
<SolidColorBrush x:Key="ListCtrlBackColorBrush" Color="#FFFFFFFF" />
|
||||||
<SolidColorBrush x:Key="ListHeadBackColorBrush" Color="#FFf8f8f9"/>
|
<SolidColorBrush x:Key="ListHeadBackColorBrush" Color="#FFf8f8f9" />
|
||||||
<SolidColorBrush x:Key="ListHeadBorderColorBrush" Color="#FFe9e9ea"/>
|
<SolidColorBrush x:Key="ListHeadBorderColorBrush" Color="#FFe9e9ea" />
|
||||||
<SolidColorBrush x:Key="ListBackColorBrush" Color="#FFFFFFFF"/>
|
<SolidColorBrush x:Key="ListBackColorBrush" Color="#FFFFFFFF" />
|
||||||
<SolidColorBrush x:Key="ListRowTitleBackColorBrush" Color="#FFf5f7fa"/>
|
<SolidColorBrush x:Key="ListRowTitleBackColorBrush" Color="#FFf5f7fa" />
|
||||||
<SolidColorBrush x:Key="ListRowBorderColorBrush" Color="#FFf8f8f9"/>
|
<SolidColorBrush x:Key="ListRowBorderColorBrush" Color="#FFf8f8f9" />
|
||||||
<SolidColorBrush x:Key="ListRowHoverBackColorBrush" Color="#FFf5f7fa"/>
|
<SolidColorBrush x:Key="ListRowHoverBackColorBrush" Color="#FFf5f7fa" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="HorizontalGridLinesBrush" Color="#FFf5f7fa"/>
|
<SolidColorBrush x:Key="HorizontalGridLinesBrush" Color="#FFf5f7fa" />
|
||||||
<SolidColorBrush x:Key="VerticalGridLinesBrush" Color="#FFFFFFFF"/>
|
<SolidColorBrush x:Key="VerticalGridLinesBrush" Color="#FFFFFFFF" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="PageOkBrush" Color="#FF67c23a" />
|
<SolidColorBrush x:Key="PageOkBrush" Color="#FF67c23a" />
|
||||||
|
<SolidColorBrush x:Key="PageOkBrush50" Color="#5067c23a" />
|
||||||
<SolidColorBrush x:Key="PageWarningBrush" Color="#FFfa4733" />
|
<SolidColorBrush x:Key="PageWarningBrush" Color="#FFfa4733" />
|
||||||
<SolidColorBrush x:Key="PageWarningBrushCC" Color="#CCfa4733" />
|
<SolidColorBrush x:Key="PageWarningBrushCC" Color="#CCfa4733" />
|
||||||
<SolidColorBrush x:Key="PageWarningBrush80" Color="#80fa4733" />
|
<SolidColorBrush x:Key="PageWarningBrush80" Color="#80fa4733" />
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace AllBase
|
|||||||
public static bool IsShowRegister { get; set; } = true;
|
public static bool IsShowRegister { get; set; } = true;
|
||||||
public static bool IsShowOpenAccount { get; set; } = true;
|
public static bool IsShowOpenAccount { get; set; } = true;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 礼品单价格
|
/// 礼品单oem额外价格
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static decimal OemGiftAmount { get; set; } = 0;
|
public static decimal OemGiftAmount { get; set; } = 0;
|
||||||
#endregion
|
#endregion
|
||||||
@@ -36,7 +36,7 @@ namespace AllBase
|
|||||||
/// 版本ID
|
/// 版本ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public static int VersionCount = 230;
|
public static int VersionCount = 232;
|
||||||
|
|
||||||
public static string ServerUrl { get; set; } = "http://1.13.195.131:9000";
|
public static string ServerUrl { get; set; } = "http://1.13.195.131:9000";
|
||||||
public static string DebugUrl { get; set; } = "http://localhost:9000";
|
public static string DebugUrl { get; set; } = "http://localhost:9000";
|
||||||
|
|||||||
@@ -18,7 +18,16 @@ namespace AllBase.Model.DBModel
|
|||||||
{
|
{
|
||||||
public class oms_wei_order_info : PropertyNotifyObject
|
public class oms_wei_order_info : PropertyNotifyObject
|
||||||
{
|
{
|
||||||
public string OrderBuyType
|
/// <summary>
|
||||||
|
/// 订单对应店铺
|
||||||
|
/// </summary>
|
||||||
|
public ShopLoginInfo Shop
|
||||||
|
{
|
||||||
|
get { return this.GetValue(x => x.Shop); }
|
||||||
|
set { this.SetValue(x => x.Shop, value); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public string OrderBuyType
|
||||||
{
|
{
|
||||||
get { return this.GetValue(x => x.OrderBuyType); }
|
get { return this.GetValue(x => x.OrderBuyType); }
|
||||||
set { this.SetValue(x => x.OrderBuyType, value); }
|
set { this.SetValue(x => x.OrderBuyType, value); }
|
||||||
@@ -33,6 +42,12 @@ namespace AllBase.Model.DBModel
|
|||||||
|
|
||||||
public ObservableCollection<oms_wei_refund_info> refundItems { get; set; } = new ObservableCollection<oms_wei_refund_info>();
|
public ObservableCollection<oms_wei_refund_info> refundItems { get; set; } = new ObservableCollection<oms_wei_refund_info>();
|
||||||
|
|
||||||
|
public bool IsWaitBuyOrIsWaitSend
|
||||||
|
{
|
||||||
|
get { return IsWaitBuy || IsWaitSend; }
|
||||||
|
set { }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 待采购
|
/// 待采购
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -596,7 +611,11 @@ namespace AllBase.Model.DBModel
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 礼物单状态,默认值0:不存在礼物单,1:礼物单已发货,2:礼物单信息已更正
|
/// 礼物单状态,默认值0:不存在礼物单,1:礼物单已发货,2:礼物单信息已更正
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int? gift_order_status { get; set; }
|
public int? gift_order_status
|
||||||
|
{
|
||||||
|
get { return this.GetValue(x => x.gift_order_status); }
|
||||||
|
set { this.SetValue(x => x.gift_order_status, value); }
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 店铺备注:取微信ext_info.merchant_notes
|
/// 店铺备注:取微信ext_info.merchant_notes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -660,11 +679,9 @@ namespace AllBase.Model.DBModel
|
|||||||
|
|
||||||
public void SetOrderTextProperty()
|
public void SetOrderTextProperty()
|
||||||
{
|
{
|
||||||
if (order_id == "3737914129536416512")
|
Shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == shop_id.ParseToString());
|
||||||
{
|
|
||||||
|
|
||||||
}
|
if (this.orderItems.Any(oi => oi.OrderItemExt?.buy_type == "直发") && this.orderItems.Any(oi => oi.ItemTransitOrderWithVoid != null))
|
||||||
if (this.orderItems.Any(oi => oi.OrderItemExt?.buy_type == "直发") && this.orderItems.Any(oi => oi.ItemTransitOrderWithVoid != null))
|
|
||||||
{
|
{
|
||||||
OrderBuyType = "云改直";
|
OrderBuyType = "云改直";
|
||||||
OrderBuyTypeColor = GlobalConfig.PurpleBrush190;
|
OrderBuyTypeColor = GlobalConfig.PurpleBrush190;
|
||||||
|
|||||||
@@ -137,6 +137,7 @@ namespace Work
|
|||||||
BaseClass.PostagePerOrder = Math.Max(2.2m, BaseRegex.GetDecimalJson(ref html, "postage_per_order"));
|
BaseClass.PostagePerOrder = Math.Max(2.2m, BaseRegex.GetDecimalJson(ref html, "postage_per_order"));
|
||||||
BaseClass.RefundPostagePerOrder = Math.Max(2.5m, BaseRegex.GetDecimalJson(ref html, "refund_postage_per_order"));
|
BaseClass.RefundPostagePerOrder = Math.Max(2.5m, BaseRegex.GetDecimalJson(ref html, "refund_postage_per_order"));
|
||||||
BaseClass.RechargeAmountTotal = BaseRegex.GetDecimalJson(ref html, "recharge_amount_total");
|
BaseClass.RechargeAmountTotal = BaseRegex.GetDecimalJson(ref html, "recharge_amount_total");
|
||||||
|
BaseClass.OemGiftAmount = BaseRegex.GetDecimalJson(ref html, "gift_oem_amount_per_order");
|
||||||
BaseClass.OemId = BaseRegex.GetStringJson(ref html, "oem_id");
|
BaseClass.OemId = BaseRegex.GetStringJson(ref html, "oem_id");
|
||||||
BaseClass.OemName = BaseRegex.GetStringJson(ref html, "oem_name");
|
BaseClass.OemName = BaseRegex.GetStringJson(ref html, "oem_name");
|
||||||
BaseClass.IsOemOwner = BaseRegex.GetBoolJson(ref html, "is_oem_owner");
|
BaseClass.IsOemOwner = BaseRegex.GetBoolJson(ref html, "is_oem_owner");
|
||||||
|
|||||||
@@ -661,9 +661,9 @@ namespace Work._29Tools.BLL
|
|||||||
|
|
||||||
public static async Task<string> e57PostResponseAsync(string _url, string _data, string referer)
|
public static async Task<string> e57PostResponseAsync(string _url, string _data, string referer)
|
||||||
{
|
{
|
||||||
await Task.Delay(2000);
|
//await Task.Delay(2000);
|
||||||
return await Task.FromResult("<AjaxResult><msg>SUCCESS</msg><code>200</code></AjaxResult>");
|
//return await Task.FromResult("<AjaxResult><msg>SUCCESS</msg><code>200</code></AjaxResult>");
|
||||||
//if (string.IsNullOrEmpty(Authorization)) Authorization = "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjQ3YmRlOGNlLWY5MDUtNDIzOS05M2VjLWZiN2U3MjRmOTY0NiJ9.vwxhj3t4zTDdBQTyfVjcKr-0Oma8-VtPDzE2LVkw4A4aWftncY1ikXgEhGwoYHn9E7yOnhS_Pb7FfzgecTqqHA";
|
////if (string.IsNullOrEmpty(Authorization)) Authorization = "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjQ3YmRlOGNlLWY5MDUtNDIzOS05M2VjLWZiN2U3MjRmOTY0NiJ9.vwxhj3t4zTDdBQTyfVjcKr-0Oma8-VtPDzE2LVkw4A4aWftncY1ikXgEhGwoYHn9E7yOnhS_Pb7FfzgecTqqHA";
|
||||||
|
|
||||||
bool isRetry = false;
|
bool isRetry = false;
|
||||||
if (string.IsNullOrEmpty(sAuthorization))
|
if (string.IsNullOrEmpty(sAuthorization))
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using AllBase;
|
using AllBase;
|
||||||
using AllBase.Helper;
|
using AllBase.Helper;
|
||||||
using AllBase.Model.DBModel;
|
using AllBase.Model.DBModel;
|
||||||
|
using NaiBa.Util.Extension;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -95,14 +96,20 @@ namespace Work._29Tools.BLL
|
|||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string WxApiDropshipCancel(ShopLoginInfo shop, string orderId, string dropShopOrderId, string spuId, string skuId, int cnt)
|
public string WxApiDropshipCancel(ShopLoginInfo shop, oms_wei_order_info order, string dropShopOrderId)
|
||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append(UserLogin.GetSignaturex());
|
sb.Append(UserLogin.GetSignaturex());
|
||||||
sb.Append("&token=").Append(GetWxToken(shop).accessToken);
|
sb.Append("&token=").Append(GetWxToken(shop).accessToken);
|
||||||
sb.Append("&order_id=").Append(orderId);
|
sb.Append("&order_id=").Append(order.order_id);
|
||||||
sb.Append("&ds_order_id=").Append(dropShopOrderId);
|
sb.Append("&ds_order_id=").Append(dropShopOrderId);
|
||||||
sb.Append("&dropship_product_list=").Append("[{\"spu_id\":\"").Append(spuId).Append("\",\"sku_id\":\"").Append(skuId).Append("\",\"product_cnt\":").Append(cnt).Append("}]");
|
sb.Append("&dropship_product_list=").Append("[");
|
||||||
|
foreach (var item in order.orderItems)
|
||||||
|
{
|
||||||
|
sb.Append("{\"spu_id\":\"").Append(item.product_id).Append("\",\"sku_id\":\"").Append(item.sku_id).Append("\",\"product_cnt\":").Append(item.sku_cnt).Append("},");
|
||||||
|
}
|
||||||
|
sb.Remove(sb.Length - 1, 1);
|
||||||
|
sb.Append("]");
|
||||||
|
|
||||||
var url = BaseClass.Build29WxObjString("product/wx_api_dropship_cancel");
|
var url = BaseClass.Build29WxObjString("product/wx_api_dropship_cancel");
|
||||||
var data = sb.ToString();
|
var data = sb.ToString();
|
||||||
@@ -111,5 +118,27 @@ namespace Work._29Tools.BLL
|
|||||||
html = GetHtml.PostUtf8(url, data);
|
html = GetHtml.PostUtf8(url, data);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static async Task<string> WxSearchAndDropshipCancel(ShopLoginInfo shop, oms_wei_order_info order)
|
||||||
|
{
|
||||||
|
string orderId = order.order_id;
|
||||||
|
|
||||||
|
var apiSearchDropship = new WxApiBLL().WxApiDropshipSearch(shop, orderId, 100);
|
||||||
|
if (!apiSearchDropship.Contains("\"errcode\":0"))
|
||||||
|
{
|
||||||
|
return apiSearchDropship;
|
||||||
|
}
|
||||||
|
if (apiSearchDropship.Contains("ds_order_id_list") && !apiSearchDropship.Contains("\"ds_order_id_list\":[]"))
|
||||||
|
{
|
||||||
|
var dsOrderId = JsonHelper.JObjectParse(apiSearchDropship)["ds_order_id_list"].FirstOrDefault().ParseToString();
|
||||||
|
var apiCancelDropship = new WxApiBLL().WxApiDropshipCancel(shop, order, dsOrderId);
|
||||||
|
if (!apiCancelDropship.Contains("\"errcode\":0"))
|
||||||
|
{
|
||||||
|
return apiCancelDropship;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//apiSearchDropship = new WxApiBLL().WxApiDropshipSearch(shop, orderId, 100);
|
||||||
|
return "success";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -849,6 +849,13 @@ namespace TemuKJD.ToolForms
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.Enabled = false;
|
||||||
|
if (this.cefWebBrowser.Address.StartsWith("https://mobile.yangkeduo.com/order.html?order_sn="))
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var url = BaseClass.Build29WxObjString("order/wx_add_mdy_buy_prod_map");
|
var url = BaseClass.Build29WxObjString("order/wx_add_mdy_buy_prod_map");
|
||||||
var data = UserLogin.GetSignaturex()
|
var data = UserLogin.GetSignaturex()
|
||||||
+ "&spu_code=" + GetHtml.UrlEncodeUtf8(txtUpSpuCode.Text.Trim())
|
+ "&spu_code=" + GetHtml.UrlEncodeUtf8(txtUpSpuCode.Text.Trim())
|
||||||
@@ -865,8 +872,9 @@ namespace TemuKJD.ToolForms
|
|||||||
result = GetHtml.PostUtf8(url, data);
|
result = GetHtml.PostUtf8(url, data);
|
||||||
if (!result.Contains("\"code\":200"))
|
if (!result.Contains("\"code\":200"))
|
||||||
{
|
{
|
||||||
BaseMsgForm.ShowError("保存失败" + BaseRegex.GetStringJson(ref result, "msg"));
|
this.Enabled = true;
|
||||||
}
|
BaseMsgForm.ShowError("保存失败" + BaseRegex.GetStringJson(ref result, "msg") + ",请稍后重试");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var urlMap = BaseClass.Build29WxObjString("order/wx_get_buy_prod_map");
|
var urlMap = BaseClass.Build29WxObjString("order/wx_get_buy_prod_map");
|
||||||
@@ -879,7 +887,7 @@ namespace TemuKJD.ToolForms
|
|||||||
resultMap = GetHtml.PostUtf8(urlMap, dataMap);
|
resultMap = GetHtml.PostUtf8(urlMap, dataMap);
|
||||||
if (string.IsNullOrEmpty(resultMap) || !resultMap.Contains("\"code\":200"))
|
if (string.IsNullOrEmpty(resultMap) || !resultMap.Contains("\"code\":200"))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
List<WXBuyMapInfo> buyMapList = new List<WXBuyMapInfo>();
|
List<WXBuyMapInfo> buyMapList = new List<WXBuyMapInfo>();
|
||||||
@@ -1371,5 +1379,5 @@ namespace TemuKJD.ToolForms
|
|||||||
ChangeAddress(null);
|
ChangeAddress(null);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+28
-28
@@ -84,7 +84,6 @@
|
|||||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||||
this.txtAddress = new System.Windows.Forms.TextBox();
|
this.txtAddress = new System.Windows.Forms.TextBox();
|
||||||
this.panel1 = new System.Windows.Forms.Panel();
|
this.panel1 = new System.Windows.Forms.Panel();
|
||||||
this.pnlMap = new System.Windows.Forms.Panel();
|
|
||||||
this.pnlDirectAddressAnalysis = new System.Windows.Forms.Panel();
|
this.pnlDirectAddressAnalysis = new System.Windows.Forms.Panel();
|
||||||
this.btnAnalysis = new DevComponents.DotNetBar.PanelEx();
|
this.btnAnalysis = new DevComponents.DotNetBar.PanelEx();
|
||||||
this.label25 = new System.Windows.Forms.Label();
|
this.label25 = new System.Windows.Forms.Label();
|
||||||
@@ -103,6 +102,7 @@
|
|||||||
this.label29 = new System.Windows.Forms.Label();
|
this.label29 = new System.Windows.Forms.Label();
|
||||||
this.chkAutoChangeWarehouseAddress = new Work.UserComponents.UcCheckBox(this.components);
|
this.chkAutoChangeWarehouseAddress = new Work.UserComponents.UcCheckBox(this.components);
|
||||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||||
|
this.pnlMap = new System.Windows.Forms.Panel();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pbCloseBase)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.pbCloseBase)).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||||
this.splitContainer1.Panel1.SuspendLayout();
|
this.splitContainer1.Panel1.SuspendLayout();
|
||||||
@@ -113,10 +113,10 @@
|
|||||||
this.splitContainer2.Panel2.SuspendLayout();
|
this.splitContainer2.Panel2.SuspendLayout();
|
||||||
this.splitContainer2.SuspendLayout();
|
this.splitContainer2.SuspendLayout();
|
||||||
this.panel1.SuspendLayout();
|
this.panel1.SuspendLayout();
|
||||||
this.pnlMap.SuspendLayout();
|
|
||||||
this.pnlDirectAddressAnalysis.SuspendLayout();
|
this.pnlDirectAddressAnalysis.SuspendLayout();
|
||||||
this.pnlBuy.SuspendLayout();
|
this.pnlBuy.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||||
|
this.pnlMap.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// pbCloseBase
|
// pbCloseBase
|
||||||
@@ -779,30 +779,6 @@
|
|||||||
this.panel1.Size = new System.Drawing.Size(487, 730);
|
this.panel1.Size = new System.Drawing.Size(487, 730);
|
||||||
this.panel1.TabIndex = 0;
|
this.panel1.TabIndex = 0;
|
||||||
//
|
//
|
||||||
// pnlMap
|
|
||||||
//
|
|
||||||
this.pnlMap.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.pnlMap.Controls.Add(this.txtSendProvince);
|
|
||||||
this.pnlMap.Controls.Add(this.label13);
|
|
||||||
this.pnlMap.Controls.Add(this.label20);
|
|
||||||
this.pnlMap.Controls.Add(this.label1);
|
|
||||||
this.pnlMap.Controls.Add(this.txtMapGoodsName);
|
|
||||||
this.pnlMap.Controls.Add(this.btnManualUpdateSendProvince);
|
|
||||||
this.pnlMap.Controls.Add(this.label2);
|
|
||||||
this.pnlMap.Controls.Add(this.label3);
|
|
||||||
this.pnlMap.Controls.Add(this.txtMapSkuId);
|
|
||||||
this.pnlMap.Controls.Add(this.label4);
|
|
||||||
this.pnlMap.Controls.Add(this.label5);
|
|
||||||
this.pnlMap.Controls.Add(this.btnManualUpdateTransitWarehouse);
|
|
||||||
this.pnlMap.Controls.Add(this.cmbTransitWarehouse);
|
|
||||||
this.pnlMap.Controls.Add(this.txtMapGoodsId);
|
|
||||||
this.pnlMap.Controls.Add(this.txtMapSkuName);
|
|
||||||
this.pnlMap.Location = new System.Drawing.Point(12, 525);
|
|
||||||
this.pnlMap.Name = "pnlMap";
|
|
||||||
this.pnlMap.Size = new System.Drawing.Size(468, 203);
|
|
||||||
this.pnlMap.TabIndex = 871;
|
|
||||||
//
|
|
||||||
// pnlDirectAddressAnalysis
|
// pnlDirectAddressAnalysis
|
||||||
//
|
//
|
||||||
this.pnlDirectAddressAnalysis.Controls.Add(this.btnAnalysis);
|
this.pnlDirectAddressAnalysis.Controls.Add(this.btnAnalysis);
|
||||||
@@ -1041,6 +1017,30 @@
|
|||||||
this.pictureBox1.TabStop = false;
|
this.pictureBox1.TabStop = false;
|
||||||
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
|
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
|
||||||
//
|
//
|
||||||
|
// pnlMap
|
||||||
|
//
|
||||||
|
this.pnlMap.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.pnlMap.Controls.Add(this.txtSendProvince);
|
||||||
|
this.pnlMap.Controls.Add(this.label13);
|
||||||
|
this.pnlMap.Controls.Add(this.label20);
|
||||||
|
this.pnlMap.Controls.Add(this.label1);
|
||||||
|
this.pnlMap.Controls.Add(this.txtMapGoodsName);
|
||||||
|
this.pnlMap.Controls.Add(this.btnManualUpdateSendProvince);
|
||||||
|
this.pnlMap.Controls.Add(this.label2);
|
||||||
|
this.pnlMap.Controls.Add(this.label3);
|
||||||
|
this.pnlMap.Controls.Add(this.txtMapSkuId);
|
||||||
|
this.pnlMap.Controls.Add(this.label4);
|
||||||
|
this.pnlMap.Controls.Add(this.label5);
|
||||||
|
this.pnlMap.Controls.Add(this.btnManualUpdateTransitWarehouse);
|
||||||
|
this.pnlMap.Controls.Add(this.cmbTransitWarehouse);
|
||||||
|
this.pnlMap.Controls.Add(this.txtMapGoodsId);
|
||||||
|
this.pnlMap.Controls.Add(this.txtMapSkuName);
|
||||||
|
this.pnlMap.Location = new System.Drawing.Point(12, 525);
|
||||||
|
this.pnlMap.Name = "pnlMap";
|
||||||
|
this.pnlMap.Size = new System.Drawing.Size(468, 203);
|
||||||
|
this.pnlMap.TabIndex = 871;
|
||||||
|
//
|
||||||
// PddMobileBuyOrderForm
|
// PddMobileBuyOrderForm
|
||||||
//
|
//
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||||
@@ -1068,13 +1068,13 @@
|
|||||||
this.splitContainer2.ResumeLayout(false);
|
this.splitContainer2.ResumeLayout(false);
|
||||||
this.panel1.ResumeLayout(false);
|
this.panel1.ResumeLayout(false);
|
||||||
this.panel1.PerformLayout();
|
this.panel1.PerformLayout();
|
||||||
this.pnlMap.ResumeLayout(false);
|
|
||||||
this.pnlMap.PerformLayout();
|
|
||||||
this.pnlDirectAddressAnalysis.ResumeLayout(false);
|
this.pnlDirectAddressAnalysis.ResumeLayout(false);
|
||||||
this.pnlDirectAddressAnalysis.PerformLayout();
|
this.pnlDirectAddressAnalysis.PerformLayout();
|
||||||
this.pnlBuy.ResumeLayout(false);
|
this.pnlBuy.ResumeLayout(false);
|
||||||
this.pnlBuy.PerformLayout();
|
this.pnlBuy.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||||
|
this.pnlMap.ResumeLayout(false);
|
||||||
|
this.pnlMap.PerformLayout();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user