diff --git a/29WxOrderWpf/App.xaml b/29WxOrderWpf/App.xaml
index bcd645e..737e4eb 100644
--- a/29WxOrderWpf/App.xaml
+++ b/29WxOrderWpf/App.xaml
@@ -15,7 +15,8 @@
-
+
+
diff --git a/29WxOrderWpf/Converters/FlagColorConverter.cs b/29WxOrderWpf/Converters/FlagColorConverter.cs
new file mode 100644
index 0000000..695a0a2
--- /dev/null
+++ b/29WxOrderWpf/Converters/FlagColorConverter.cs
@@ -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(); // 单向绑定可不实现
+ }
+ }
+}
diff --git a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml
index 7414187..9a07ce9 100644
--- a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml
+++ b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml
@@ -23,20 +23,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -89,7 +90,7 @@
-
+
@@ -112,10 +113,13 @@
-
+
+
-
diff --git a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml.cs b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml.cs
index 48ae0e1..41ae30e 100644
--- a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml.cs
+++ b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListCtrl.xaml.cs
@@ -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
diff --git a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListRowHeaderCtrl.xaml b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListRowHeaderCtrl.xaml
index 6a85aed..7a03b29 100644
--- a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListRowHeaderCtrl.xaml
+++ b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListRowHeaderCtrl.xaml
@@ -20,6 +20,9 @@
+
+
+
@@ -77,6 +80,16 @@
+
+
+
+
+
+
+
+
diff --git a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListRowHeaderCtrl.xaml.cs b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListRowHeaderCtrl.xaml.cs
index e01f1ac..5340924 100644
--- a/29WxOrderWpf/Ctrls/OrderCtrls/OrderListRowHeaderCtrl.xaml.cs
+++ b/29WxOrderWpf/Ctrls/OrderCtrls/OrderListRowHeaderCtrl.xaml.cs
@@ -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); }));
+
+ });
+ }
+ }
+ }
}
diff --git a/29WxOrderWpf/Styles/StaticColorBrushDictionary.xaml b/29WxOrderWpf/Styles/StaticColorBrushDictionary.xaml
index f7c59f0..e33b1fe 100644
--- a/29WxOrderWpf/Styles/StaticColorBrushDictionary.xaml
+++ b/29WxOrderWpf/Styles/StaticColorBrushDictionary.xaml
@@ -30,4 +30,12 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/29WxOrderWpf/Windows/OrderWindows/TransitAfterSaleWindow.xaml.cs b/29WxOrderWpf/Windows/OrderWindows/TransitAfterSaleWindow.xaml.cs
index 16262b3..0f617b9 100644
--- a/29WxOrderWpf/Windows/OrderWindows/TransitAfterSaleWindow.xaml.cs
+++ b/29WxOrderWpf/Windows/OrderWindows/TransitAfterSaleWindow.xaml.cs
@@ -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("200") && !getTransitAfterSaleRst.ParseToString().Contains("0"))
diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs
index 9eb58c9..1e95431 100644
--- a/AllBase/BaseClass.cs
+++ b/AllBase/BaseClass.cs
@@ -32,7 +32,7 @@ namespace AllBase
/// 版本ID
///
- 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;
diff --git a/AllBase/Model/DBModel/oms_wei_order_info.cs b/AllBase/Model/DBModel/oms_wei_order_info.cs
index 852a1df..009fc25 100644
--- a/AllBase/Model/DBModel/oms_wei_order_info.cs
+++ b/AllBase/Model/DBModel/oms_wei_order_info.cs
@@ -591,7 +591,11 @@ namespace AllBase.Model.DBModel
///
/// 旗帜颜色备注,1:灰旗,2:红旗,3:橙旗,4:绿旗,5:天蓝旗,6:紫旗
///
- 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); }
+ }
///
/// 旗帜备注时间
///
diff --git a/AllBase/Model/DBModel/user_payment_record.cs b/AllBase/Model/DBModel/user_payment_record.cs
index 75a6965..228aa02 100644
--- a/AllBase/Model/DBModel/user_payment_record.cs
+++ b/AllBase/Model/DBModel/user_payment_record.cs
@@ -9,10 +9,10 @@ namespace AllBase.Model.DBModel
public class user_payment_record
{
public long id { get; set; }
- ///
- /// 变动类型,1:充值,2:采购花费,3:产品退款到账,4:运费退款到账,5:采购收款,6:产品退款扣除,7:运费退款扣除,16:礼物单话费,20:中转运费,23:作废运费返还
- ///
- public int? type { get; set; }
+ ///
+ /// 变动类型,1:充值,2:采购花费,3:产品退款到账,4:运费退款到账,5:采购收款,6:产品退款扣除,7:运费退款扣除,16:礼物单话费,20:中转运费,23:作废运费返还 24超重扣费 26退货包裹退回
+ ///
+ public int? type { get; set; }
///
/// 充值或花费的金额(元)
///
diff --git a/Work/UserLogin.cs b/Work/UserLogin.cs
index fb3b5a1..0916592 100644
--- a/Work/UserLogin.cs
+++ b/Work/UserLogin.cs
@@ -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");
diff --git a/Work/_29Tools/BLL/WxApiBLL.cs b/Work/_29Tools/BLL/WxApiBLL.cs
index e340841..1703156 100644
--- a/Work/_29Tools/BLL/WxApiBLL.cs
+++ b/Work/_29Tools/BLL/WxApiBLL.cs
@@ -55,6 +55,13 @@ namespace Work._29Tools.BLL
return token;
}
+ ///
+ /// 代发订单查询
+ ///
+ ///
+ ///
+ /// 100 待发货 199 部分发货 200 已发货 300 已取消
+ ///
public string WxApiDropshipSearch(ShopLoginInfo shop, string orderId, int status)
{
StringBuilder sb = new StringBuilder();