1退货包裹收费逻辑调整 2插旗隐藏功能
This commit is contained in:
1 parent
dacacb352c
commit
2ecc120c5d
13 files changed
+161
-27
No files matched your search
@@ -15,7 +15,8 @@
|
||||
<converters:ImageUrlToBitmapImageConverter x:Key="ImageUrlToBitmapImage"/>
|
||||
<converters:ValueMinus24Converter x:Key="ValueMinus24Converter"/>
|
||||
<converters:StatusToColorBrushConverter x:Key="statusToColorBrushConverter"/>
|
||||
<converters:ListBoxIndexConverter x:Key="listBoxIndexConverter"/>
|
||||
<converters:ListBoxIndexConverter x:Key="listBoxIndexConverter"/>
|
||||
<converters:FlagColorConverter x:Key="flagColorConverter"/>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Styles/BaseWindowStyle.xaml" />
|
||||
<ResourceDictionary Source="Styles/BaseDataGridStyle.xaml" />
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
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;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace _29WxOrderWpf.Converters
|
||||
{
|
||||
public class FlagColorConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value.ParseToInt() == 2)
|
||||
return (SolidColorBrush)Application.Current.Resources["FlagRedBrush"];
|
||||
if (value.ParseToInt() == 3)
|
||||
return (SolidColorBrush)Application.Current.Resources["FlagOrangeBrush"];
|
||||
if (value.ParseToInt() == 4)
|
||||
return (SolidColorBrush)Application.Current.Resources["FlagGreenBrush"];
|
||||
if (value.ParseToInt() == 5)
|
||||
return (SolidColorBrush)Application.Current.Resources["FlagBlueBrush"];
|
||||
if (value.ParseToInt() == 5)
|
||||
return (SolidColorBrush)Application.Current.Resources["FlagPurpleBrush"];
|
||||
|
||||
return (SolidColorBrush)Application.Current.Resources["FlagGrayBrush"];
|
||||
}
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException(); // 单向绑定可不实现
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,20 +23,21 @@
|
||||
</Grid.RowDefinitions>
|
||||
<Grid x:Name="gridSearch" Margin="8,0,8,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="0.75*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="0.75*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="1.2*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="0.85*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="0.85*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="1.4*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
@@ -89,7 +90,7 @@
|
||||
<Button Grid.Column="9" x:Name="btnFilter" Style="{StaticResource BasePageButtonStyle}" Margin="8,0,0,0" Content="过滤" MinWidth="48" Height="28" Click="btnFilter_Click" Padding="4"/>
|
||||
<Button Grid.Column="10" x:Name="btnSearch" Style="{StaticResource BasePageButtonStyle}" Margin="4,0,4,0" Content="读单" MinWidth="78" Height="28" Click="btnSearch_Click" Padding="4" IsEnabled="False"/>
|
||||
|
||||
<WrapPanel Grid.Column="11" VerticalAlignment="Center" Width="92">
|
||||
<WrapPanel Grid.Column="11" VerticalAlignment="Center" Width="172">
|
||||
<Image x:Name="imgLoading" Grid.Column="10" Source="{StaticResource imgLoadingPic}" Width="20" Height="20" Margin="0" IsEnabled="False">
|
||||
<Image.RenderTransform>
|
||||
<RotateTransform Angle="45" CenterX="10" CenterY="10"/>
|
||||
@@ -112,10 +113,13 @@
|
||||
</Image>
|
||||
<CheckBox Content="自动读单" x:Name="chkAutoReadOrder" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" HorizontalAlignment="Left"
|
||||
Margin="2,0" VerticalAlignment="Center" Checked="chkAutoReadBuyerOrder_CheckedChanged" Unchecked="chkAutoReadBuyerOrder_CheckedChanged" IsChecked="true"/>
|
||||
|
||||
|
||||
<CheckBox Grid.Column="12" Content="隐藏绿旗" x:Name="chkHideGreenFlag" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" HorizontalAlignment="Left"
|
||||
Margin="2,0" VerticalAlignment="Center" Click="chkHideGreenFlag_Click" IsChecked="true"/>
|
||||
</WrapPanel>
|
||||
|
||||
<Button Grid.Column="12" Content="利润统计" Style="{StaticResource BasePageButtonStyle}" HorizontalAlignment="Center" Width="60" Height="28" Click="btn_ShowShopRevenueStatisticsView" Padding="4">
|
||||
|
||||
<Button Grid.Column="13" Content="利润统计" Style="{StaticResource BasePageButtonStyle}" HorizontalAlignment="Center" Width="60" Height="28" Click="btn_ShowShopRevenueStatisticsView" Padding="4">
|
||||
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
@@ -923,6 +923,9 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
if (order == null)
|
||||
return true;
|
||||
|
||||
if (chkHideGreenFlag.IsChecked == true && order.colour_flag == 4)
|
||||
return true;
|
||||
|
||||
if (!GlobalConfig.ShopLoginList.Any(s => s.ErpShopId.ParseToLong() == order.shop_id))
|
||||
return true;
|
||||
|
||||
@@ -1817,6 +1820,11 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void chkHideGreenFlag_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FilterOrders();
|
||||
}
|
||||
}
|
||||
|
||||
public class OrderFilterConfig
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="20"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox Grid.Column="0" Margin="8,8,-4,8" VerticalAlignment="Center" FontSize="20" Background="Transparent" IsReadOnly="True" Text="{Binding OrderBuyType}" BorderThickness="0"
|
||||
Visibility="{Binding OrderBuyType, Converter={StaticResource HasTextVisibility}}" Foreground="{Binding OrderBuyTypeColor}" FontWeight="ExtraBold"/>
|
||||
@@ -77,6 +80,16 @@
|
||||
|
||||
<uc:UcWaterMarkTextBox1 WaterMark="该订单共有 1 条不同商品记录" x:Name="txtCount" Grid.Column="9" Margin="8,8,0,8" VerticalAlignment="Center" FontSize="14" Background="Transparent" IsReadOnly="True" BorderThickness="0" />
|
||||
|
||||
|
||||
<Border Grid.Column="11" Width="15" Height="15" Background="Transparent" VerticalAlignment="Center" Cursor="Hand" Margin="2" x:Name="borderFlag" MouseLeftButtonDown="borderFlag_MouseLeftButtonDown">
|
||||
<!--<Path Margin="0,0,0,0" Fill="{StaticResource FlagGrayBrush}" Data="M 0,0 L 1,0 L 1,1 L 10,1 L 7,4 L 10,7 L 1,7 L 1,12 L 0,12 Z" Stretch="Uniform" />-->
|
||||
<Path Margin="0,0,0,0" Fill="{Binding colour_flag,Converter={StaticResource flagColorConverter}}" Data="M 0,0 L 1,0 L 1,1 L 10,1 L 7,4 L 10,7 L 1,7 L 1,12 L 0,12 Z" Stretch="Uniform" />
|
||||
</Border>
|
||||
|
||||
|
||||
<!--<Border Grid.Column="11" Width="12" Background="Transparent" Height="12" VerticalAlignment="Center" Cursor="Hand">
|
||||
<Path Margin="0,0,0,0" Fill="{StaticResource PageLinkBrush}" MouseLeftButtonDown="pathShop_MouseLeftButtonDown" Data="M80 432a128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128h-384a128 128 0 0 1-128-128v-384z m128-64a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64h-384z M816 144h-384a64 64 0 0 0-64 64 32 32 0 0 1-64 0 128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128 32 32 0 0 1 0-64 64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64z" Stretch="Uniform" />
|
||||
</Border>-->
|
||||
</Grid>
|
||||
</Border>
|
||||
</UserControl>
|
||||
@@ -7,6 +7,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
@@ -18,6 +19,7 @@ using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using Work;
|
||||
using Work._29Tools.BLL;
|
||||
using Work._29Tools.Forms.ShopForms;
|
||||
|
||||
@@ -161,5 +163,41 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void borderFlag_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (this.DataContext is oms_wei_order_info order)
|
||||
{
|
||||
int flag = 0;
|
||||
if (order.colour_flag == 4)
|
||||
{
|
||||
flag = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
flag = 4;
|
||||
}
|
||||
Task.Run(() =>
|
||||
{
|
||||
var url = BaseClass.Build29WxObjString("order/wx_update_erp_color_flag");
|
||||
var data = UserLogin.GetSignaturex();
|
||||
data += "&order_id=" + order.order_id;
|
||||
data += "&colour_flag=" + flag;
|
||||
var rst = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(rst) || !rst.Contains("\"code\":200"))
|
||||
rst = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(rst) || !rst.Contains("\"code\":200"))
|
||||
{
|
||||
BaseMsgWindow.ShowAnimateMessage(BaseRegex.GetStringJson(ref rst, "msg"), "Error", 5);
|
||||
return;
|
||||
}
|
||||
BaseMsgWindow.ShowAnimateMessage("修改成功", "Msg", 2);
|
||||
order.colour_flag = flag;
|
||||
Thread.Sleep(1000);
|
||||
Dispatcher.Invoke(new Action(() => { MainWindow.Instance.orderListCtrl.FilterOneOrder(order); }));
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,4 +30,12 @@
|
||||
<SolidColorBrush x:Key="PageWarningBrush50" Color="#50fa4733" />
|
||||
<SolidColorBrush x:Key="PageWarningBrush20" Color="#20fa4733" />
|
||||
<SolidColorBrush x:Key="PageLinkBrush" Color="#409eff" />
|
||||
|
||||
|
||||
<SolidColorBrush x:Key="FlagGrayBrush" Color="#ffaaaaaa" />
|
||||
<SolidColorBrush x:Key="FlagRedBrush" Color="#FFfa4733" />
|
||||
<SolidColorBrush x:Key="FlagOrangeBrush" Color="#FFfab533" />
|
||||
<SolidColorBrush x:Key="FlagGreenBrush" Color="#FF67c23a" />
|
||||
<SolidColorBrush x:Key="FlagBlueBrush" Color="#409eff" />
|
||||
<SolidColorBrush x:Key="FlagPurpleBrush" Color="#FFc883bf" />
|
||||
</ResourceDictionary>
|
||||
@@ -1,6 +1,7 @@
|
||||
using _29WxOrderWpf.BaseWindows;
|
||||
using AllBase;
|
||||
using AllBase.Helper;
|
||||
using AllBase.Model.Config;
|
||||
using AllBase.Model.DBModel;
|
||||
using NaiBa.Util.Extension;
|
||||
using Newtonsoft.Json.Linq;
|
||||
@@ -116,8 +117,19 @@ namespace _29WxOrderWpf.Windows.OrderWindows
|
||||
data["recipientPhone"] = txtMobile.Text.Trim();
|
||||
data["account_user"] = BaseClass.UserName;
|
||||
data["accountUser"] = BaseClass.UserName;
|
||||
//data["platform"] = "WEISHOP";
|
||||
var getTransitAfterSaleUrl = "https://po.e57.cn/prod-api/api/oms-api/external_procurement/createReturnPackage";
|
||||
//data["platform"] = "WEISHOP";
|
||||
|
||||
if (GlobalConfig.BuyConfig.IsUseAppBalance)
|
||||
{
|
||||
string basePostageKey = WarehousePostageInfo.DicWarehousePostage.Keys.FirstOrDefault(pk => (txtProvince.Text.Trim()).ParseToString().Contains(pk));
|
||||
decimal basePostage = basePostageKey.IsNullOrEmpty() ? WarehousePostageInfo.DicWarehousePostage.Values.Min() : WarehousePostageInfo.DicWarehousePostage[basePostageKey];
|
||||
basePostage += 0.3m; // 送货2.2 退货2.5(+3毛)
|
||||
|
||||
data["oemAmount"] = (BaseClass.RefundPostagePerOrderDiff * 100).ParseToInt().ParseToString();
|
||||
data["postage"] = ((basePostage + BaseClass.RefundPostagePerOrderDiff) * 100).ParseToInt().ParseToString();
|
||||
}
|
||||
|
||||
var getTransitAfterSaleUrl = "https://po.e57.cn/prod-api/api/oms-api/external_procurement/createReturnPackage";
|
||||
var getTransitAfterSaleStr = JsonHelper.SerializeObject(data);
|
||||
var getTransitAfterSaleRst = HttpResponseWXBLL.e57PostResponse(getTransitAfterSaleUrl, getTransitAfterSaleStr, "");
|
||||
if (!getTransitAfterSaleRst.ParseToString().Contains("<code>200</code>") && !getTransitAfterSaleRst.ParseToString().Contains("<code>0</code>"))
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace AllBase
|
||||
/// 版本ID
|
||||
/// </summary>
|
||||
|
||||
public static int VersionCount = 225;
|
||||
public static int VersionCount = 228;
|
||||
|
||||
public static string ServerUrl { get; set; } = "http://1.13.195.131:9000";
|
||||
public static string DebugUrl { get; set; } = "http://localhost:9000";
|
||||
@@ -199,7 +199,9 @@ namespace AllBase
|
||||
public static decimal RechargeAmountTotal { get; set; } = 0;
|
||||
public static decimal Balance { get; set; } = 0;
|
||||
public static decimal PostagePerOrder { get; set; } = 2.2m;
|
||||
public static decimal PostagePerOrderDiff { get { return PostagePerOrder - 2.2m; } }
|
||||
public static decimal PostagePerOrderDiff { get { return Math.Max(0, PostagePerOrder - 2.2m); } }
|
||||
public static decimal RefundPostagePerOrder { get; set; } = 2.5m;
|
||||
public static decimal RefundPostagePerOrderDiff { get { return Math.Max(0, RefundPostagePerOrder - 2.5m); } }
|
||||
public static int AlimamaPageCount = 0;
|
||||
public static bool CloudTitle = false;
|
||||
public static bool CloudBrand = false;
|
||||
|
||||
@@ -591,7 +591,11 @@ namespace AllBase.Model.DBModel
|
||||
/// <summary>
|
||||
/// 旗帜颜色备注,1:灰旗,2:红旗,3:橙旗,4:绿旗,5:天蓝旗,6:紫旗
|
||||
/// </summary>
|
||||
public int? colour_flag { get; set; }
|
||||
public int? colour_flag
|
||||
{
|
||||
get { return this.GetValue(x => x.colour_flag); }
|
||||
set { this.SetValue(x => x.colour_flag, value); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 旗帜备注时间
|
||||
/// </summary>
|
||||
|
||||
@@ -9,10 +9,10 @@ namespace AllBase.Model.DBModel
|
||||
public class user_payment_record
|
||||
{
|
||||
public long id { get; set; }
|
||||
/// <summary>
|
||||
/// 变动类型,1:充值,2:采购花费,3:产品退款到账,4:运费退款到账,5:采购收款,6:产品退款扣除,7:运费退款扣除,16:礼物单话费,20:中转运费,23:作废运费返还
|
||||
/// </summary>
|
||||
public int? type { get; set; }
|
||||
/// <summary>
|
||||
/// 变动类型,1:充值,2:采购花费,3:产品退款到账,4:运费退款到账,5:采购收款,6:产品退款扣除,7:运费退款扣除,16:礼物单话费,20:中转运费,23:作废运费返还 24超重扣费 26退货包裹退回
|
||||
/// </summary>
|
||||
public int? type { get; set; }
|
||||
/// <summary>
|
||||
/// 充值或花费的金额(元)
|
||||
/// </summary>
|
||||
|
||||
+2
-1
@@ -134,7 +134,8 @@ namespace Work
|
||||
BaseClass.Points = BaseRegex.GetStringJson(ref html, "points").ParseToInt();
|
||||
BaseClass.ShopPointsPerMonth = BaseRegex.GetStringJson(ref html, "shop_points_per_month").ParseToInt();
|
||||
BaseClass.Balance = BaseRegex.GetDecimalJson(ref html, "balance");
|
||||
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.RechargeAmountTotal = BaseRegex.GetDecimalJson(ref html, "recharge_amount_total");
|
||||
BaseClass.OemId = BaseRegex.GetStringJson(ref html, "oem_id");
|
||||
BaseClass.OemName = BaseRegex.GetStringJson(ref html, "oem_name");
|
||||
|
||||
@@ -55,6 +55,13 @@ namespace Work._29Tools.BLL
|
||||
return token;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 代发订单查询
|
||||
/// </summary>
|
||||
/// <param name="shop"></param>
|
||||
/// <param name="orderId"></param>
|
||||
/// <param name="status">100 待发货 199 部分发货 200 已发货 300 已取消</param>
|
||||
/// <returns></returns>
|
||||
public string WxApiDropshipSearch(ShopLoginInfo shop, string orderId, int status)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
Reference in new issue
Block a user