异常单补拍单功能
This commit is contained in:
1 parent
2e20cbdf68
commit
7264835cc6
13 files changed
+570
-362
No files matched your search
@@ -192,9 +192,13 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
}
|
||||
|
||||
private void btnBuyOrder_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
BuyOrder();
|
||||
}
|
||||
|
||||
public void BuyOrder(bool isAbnormalOrder = false)
|
||||
{
|
||||
var orderItem = this.DataContext as oms_wei_order_item_info;
|
||||
var refundItem = orderItem.ItemRefund;
|
||||
if (orderItem == null)
|
||||
{
|
||||
BaseMsgWindow.ShowError("订单信息为空");
|
||||
@@ -205,6 +209,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
BaseMsgWindow.ShowError("请选择买手号");
|
||||
return;
|
||||
}
|
||||
|
||||
if (/*orderItem.sku_cnt > 1 ||*/ orderItem.ItemOrder.orderItems.Count > 1)
|
||||
{
|
||||
//BaseMsgWindow.ShowError("多子单或多件商品订单中转仓暂不支持");
|
||||
@@ -233,6 +238,21 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
if (orderItem == null)
|
||||
return;
|
||||
|
||||
|
||||
if (isAbnormalOrder && orderItem.ItemOrder.status > 21 && orderItem.ItemTransitOrder != null && orderItem.ItemTransitOrder.refund_status == "买手退款成功")
|
||||
{
|
||||
// 异常单可以异常重拍
|
||||
}
|
||||
else if (!isAbnormalOrder)
|
||||
{
|
||||
// 正常单可以正常拍单
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// 如果是退款单,弹出退款窗口
|
||||
if (/*orderItem?.ItemRefund?.count > 0 &&*/ orderItem.refund_status > 1)
|
||||
{
|
||||
@@ -272,79 +292,82 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
|
||||
orderRetry:
|
||||
// 拍单前查询账户余额
|
||||
if (GlobalConfig.BuyConfig.IsUseAppBalance)
|
||||
if (!isAbnormalOrder)
|
||||
{
|
||||
if (BaseClass.Balance < 10)
|
||||
if (GlobalConfig.BuyConfig.IsUseAppBalance)
|
||||
{
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
BaseMsgWindow.ShowError("软件快递余额不足(剩余" + BaseClass.Balance.ToString("0.00") + "元,拍单至少需保留10元),无法中转拍单,请先充值!");
|
||||
}));
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var url = BaseClass.Build29WxObjString("shop/get_shop_erp_merchant");
|
||||
var data = UserLogin.GetSignaturex();
|
||||
data += "&corporate_account_user_id=" + orderItem.Shop.ErpCorporateAccountUserId;
|
||||
data += "&manage_user_id=" + orderItem.Shop.ErpManageUserId;
|
||||
data += "&shop_id=" + orderItem.Shop.ErpShopId;
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
{
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
btnBuyOrder.Cursor = Cursors.Hand;
|
||||
}));
|
||||
GlobalConfig.BuyConfig.IsUseAppBalance = true;
|
||||
StartUp.SaveBuyConfig();
|
||||
BaseMsgWindow.ShowError("未找到店铺账户!" + BaseRegex.GetStringJson(ref html, "msg") + ",自动切换为快递余额拍单。");
|
||||
goto orderRetry;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(html) && html.Contains("\"code\":200"))
|
||||
{
|
||||
try
|
||||
{
|
||||
var erpMs = JsonHelper.DeserializeJsonToList<ErpMerchantInfo>(JsonHelper.JObjectParse(html)["data"].ParseToString());
|
||||
var erpM = erpMs.FirstOrDefault();
|
||||
if (erpM == null)
|
||||
{
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
btnBuyOrder.Cursor = Cursors.Hand;
|
||||
}));
|
||||
GlobalConfig.BuyConfig.IsUseAppBalance = true;
|
||||
StartUp.SaveBuyConfig();
|
||||
BaseMsgWindow.ShowError("未找到店铺账户!自动切换为快递余额拍单。");
|
||||
goto orderRetry;
|
||||
}
|
||||
|
||||
var balance = erpM.balance.ParseToDecimal();
|
||||
if (balance < 10)
|
||||
{
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
btnBuyOrder.Cursor = Cursors.Hand;
|
||||
}));
|
||||
GlobalConfig.BuyConfig.IsUseAppBalance = true;
|
||||
StartUp.SaveBuyConfig();
|
||||
BaseMsgWindow.ShowError("ERP账户余额不足(剩余" + balance.ToString("0.00") + "元,拍单至少需保留10元),无法中转拍单,自动切换为快递余额拍单。");
|
||||
goto orderRetry;
|
||||
}
|
||||
}
|
||||
catch
|
||||
if (BaseClass.Balance < 10)
|
||||
{
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
BaseMsgWindow.ShowError("拍单校验出错,请稍后重试");
|
||||
btnBuyOrder.Cursor = Cursors.Hand;
|
||||
BaseMsgWindow.ShowError("软件快递余额不足(剩余" + BaseClass.Balance.ToString("0.00") + "元,拍单至少需保留10元),无法中转拍单,请先充值!");
|
||||
}));
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var url = BaseClass.Build29WxObjString("shop/get_shop_erp_merchant");
|
||||
var data = UserLogin.GetSignaturex();
|
||||
data += "&corporate_account_user_id=" + orderItem.Shop.ErpCorporateAccountUserId;
|
||||
data += "&manage_user_id=" + orderItem.Shop.ErpManageUserId;
|
||||
data += "&shop_id=" + orderItem.Shop.ErpShopId;
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
{
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
btnBuyOrder.Cursor = Cursors.Hand;
|
||||
}));
|
||||
GlobalConfig.BuyConfig.IsUseAppBalance = true;
|
||||
StartUp.SaveBuyConfig();
|
||||
BaseMsgWindow.ShowError("未找到店铺账户!" + BaseRegex.GetStringJson(ref html, "msg") + ",自动切换为快递余额拍单。");
|
||||
goto orderRetry;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(html) && html.Contains("\"code\":200"))
|
||||
{
|
||||
try
|
||||
{
|
||||
var erpMs = JsonHelper.DeserializeJsonToList<ErpMerchantInfo>(JsonHelper.JObjectParse(html)["data"].ParseToString());
|
||||
var erpM = erpMs.FirstOrDefault();
|
||||
if (erpM == null)
|
||||
{
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
btnBuyOrder.Cursor = Cursors.Hand;
|
||||
}));
|
||||
GlobalConfig.BuyConfig.IsUseAppBalance = true;
|
||||
StartUp.SaveBuyConfig();
|
||||
BaseMsgWindow.ShowError("未找到店铺账户!自动切换为快递余额拍单。");
|
||||
goto orderRetry;
|
||||
}
|
||||
|
||||
var balance = erpM.balance.ParseToDecimal();
|
||||
if (balance < 10)
|
||||
{
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
btnBuyOrder.Cursor = Cursors.Hand;
|
||||
}));
|
||||
GlobalConfig.BuyConfig.IsUseAppBalance = true;
|
||||
StartUp.SaveBuyConfig();
|
||||
BaseMsgWindow.ShowError("ERP账户余额不足(剩余" + balance.ToString("0.00") + "元,拍单至少需保留10元),无法中转拍单,自动切换为快递余额拍单。");
|
||||
goto orderRetry;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
BaseMsgWindow.ShowError("拍单校验出错,请稍后重试");
|
||||
btnBuyOrder.Cursor = Cursors.Hand;
|
||||
}));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (orderItem.BuyGoodsBtnTxt == "去店铺后台绑定代发")
|
||||
@@ -386,7 +409,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
}
|
||||
|
||||
// 检测是否加入代发
|
||||
if (orderItem.Shop?.LoginStatus == "登录成功")
|
||||
if (orderItem.Shop?.LoginStatus == "登录成功" && !isAbnormalOrder)
|
||||
{
|
||||
var is29SupplierRst = WxOrderSupplierBLL.GetWxSupplierOrderList(orderItem.Shop, orderItem.order_id);
|
||||
if (!is29SupplierRst.Contains("\"code\":0"))
|
||||
@@ -461,6 +484,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
buyOrderForm.pnlBuy.Visible = true;
|
||||
buyOrderForm.pnlMap.Visible = false;
|
||||
}
|
||||
if (isAbnormalOrder)
|
||||
buyOrderForm.AbnormalTransitWarehouseOrderInfo = orderItem.ItemTransitOrder;
|
||||
buyOrderForm.ShowDialog();
|
||||
// 窗口关闭后更新运费信息
|
||||
MainWindow.Instance.Balance = BaseClass.Balance.ToString("0.00");
|
||||
@@ -495,20 +520,36 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
// 作废重拍
|
||||
if (order_item.ItemOrder.status == 20 /*&& order_item.refund_status <= 1*/ && order_item.ItemTransitOrder != null)
|
||||
{
|
||||
btnDeleteTransitOrder.Visibility = Visibility.Visible;
|
||||
btnVoidTransitOrder.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
btnDeleteTransitOrder.Visibility = Visibility.Collapsed;
|
||||
btnVoidTransitOrder.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
if (order_item.ItemOrder.isAbnormal && order_item.BuyerTransitWaybillStatusStr != "已到中转仓" && btnVoidTransitOrder.Visibility == Visibility.Collapsed)
|
||||
{
|
||||
btnAbnormalOrderRebuy.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
btnAbnormalOrderRebuy.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
// 待采购不显示所有采购信息状态(否则会显示作废订单状态)
|
||||
if (GlobalConfig.OrderTabHeaderStr.StartsWith("待采购"))
|
||||
{
|
||||
wpBuyAccount.Visibility = Visibility.Collapsed;
|
||||
wpBuyOrderId.Visibility = Visibility.Collapsed;
|
||||
wpBuyTime.Visibility = Visibility.Collapsed;
|
||||
wpTransitWaybillStatus.Visibility = Visibility.Collapsed;
|
||||
wpTransitBuyerRefundStatus.Visibility = Visibility.Collapsed;
|
||||
//wpBuyAccount.Visibility = Visibility.Collapsed;
|
||||
//wpBuyOrderId.Visibility = Visibility.Collapsed;
|
||||
//wpBuyTime.Visibility = Visibility.Collapsed;
|
||||
//wpTransitWaybillStatus.Visibility = Visibility.Collapsed;
|
||||
//wpTransitBuyerRefundStatus.Visibility = Visibility.Collapsed;
|
||||
|
||||
wpBuyAccount.Opacity = 0.5;
|
||||
wpBuyOrderId.Opacity = 0.5;
|
||||
wpBuyTime.Opacity = 0.5;
|
||||
wpTransitWaybillStatus.Opacity = 0.5;
|
||||
wpTransitBuyerRefundStatus.Opacity = 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -620,110 +661,145 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
}
|
||||
}
|
||||
|
||||
private async void btnDeleteTransitOrder_Click(object sender, RoutedEventArgs e)
|
||||
private async void btnVoidTransitOrder_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (this.DataContext is oms_wei_order_item_info orderItem)
|
||||
{
|
||||
// 拍单前查询订单是否退款
|
||||
var orderId = orderItem.order_id;
|
||||
var skuId = orderItem.sku_id;
|
||||
await Task.Run(() =>
|
||||
{
|
||||
VoidOrder(orderItem);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 作废中转仓订单
|
||||
/// </summary>
|
||||
/// <param name="orderItem"></param>
|
||||
/// <param name="isSilent"></param>
|
||||
/// <param name="UpdateOrderBeforeVoid">作废前是否更新服务端订单状态</param>
|
||||
public static async void VoidOrder(oms_wei_order_item_info orderItem, bool isSilent = false, bool UpdateOrderBeforeVoid = true)
|
||||
{
|
||||
// 作废前查询订单状态
|
||||
var orderId = orderItem.order_id;
|
||||
var skuId = orderItem.sku_id;
|
||||
await Task.Run(() =>
|
||||
{
|
||||
if(UpdateOrderBeforeVoid)
|
||||
MainWindow.Instance.orderListCtrl.GetOrder(orderId);
|
||||
var newOrder = GlobalConfig.lstOrder.FirstOrDefault(or => or.order_id == orderId);
|
||||
if (newOrder.orderItems.Count == 1)
|
||||
orderItem = newOrder?.orderItems?.FirstOrDefault();
|
||||
else
|
||||
orderItem = newOrder?.orderItems?.FirstOrDefault(oi => oi.sku_id == skuId);
|
||||
if (orderItem == null)
|
||||
{
|
||||
BaseMsgWindow.ShowError("订单查询失败,请重试");
|
||||
return;
|
||||
}
|
||||
|
||||
if (orderItem.ItemTransitOrder == null)
|
||||
{
|
||||
BaseMsgWindow.ShowError("要作废的中转订单不存在,请确认后重试");
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
bool noBuyer = false;
|
||||
var buyer = GlobalConfig.PDDBuyerLoginList.FirstOrDefault(b => b.buyer_name == orderItem.ItemTransitOrder.buyer_account);
|
||||
if (buyer == null)
|
||||
var newOrder = GlobalConfig.lstOrder.FirstOrDefault(or => or.order_id == orderId);
|
||||
if (newOrder.orderItems.Count == 1)
|
||||
orderItem = newOrder?.orderItems?.FirstOrDefault();
|
||||
else
|
||||
orderItem = newOrder?.orderItems?.FirstOrDefault(oi => oi.sku_id == skuId);
|
||||
if (orderItem == null)
|
||||
{
|
||||
if (!isSilent)
|
||||
BaseMsgWindow.ShowError("订单查询失败,请重试");
|
||||
return;
|
||||
}
|
||||
|
||||
if (orderItem.ItemTransitOrder == null)
|
||||
{
|
||||
if (!isSilent)
|
||||
BaseMsgWindow.ShowError("要作废的中转订单不存在,请确认后重试");
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
bool noBuyer = false;
|
||||
var buyer = GlobalConfig.PDDBuyerLoginList.FirstOrDefault(b => b.buyer_name == orderItem.ItemTransitOrder.buyer_account);
|
||||
if (buyer == null)
|
||||
{
|
||||
if (!isSilent)
|
||||
if (BaseMsgWindow.ShowConfirm("拍单买手不存在,点击确定直接作废中转单并手动取消买手单,点击取消登录买手后重试").DialogResult != true)
|
||||
return;
|
||||
noBuyer = true;
|
||||
}
|
||||
noBuyer = true;
|
||||
}
|
||||
|
||||
// 检测一下买手号
|
||||
if (GlobalConfig.CurrentPddBuyer.status == "在线")
|
||||
{
|
||||
await Task.Run(() =>
|
||||
{
|
||||
PddMobileLoginForm.CheckBuyerLogin(GlobalConfig.CurrentPddBuyer);
|
||||
});
|
||||
}
|
||||
if (GlobalConfig.CurrentPddBuyer.status != "在线")
|
||||
// 检测一下买手号
|
||||
if (GlobalConfig.CurrentPddBuyer.status == "在线")
|
||||
{
|
||||
await Task.Run(() =>
|
||||
{
|
||||
PddMobileLoginForm.CheckBuyerLogin(GlobalConfig.CurrentPddBuyer);
|
||||
});
|
||||
}
|
||||
if (GlobalConfig.CurrentPddBuyer.status != "在线")
|
||||
{
|
||||
if (!isSilent)
|
||||
if (BaseMsgWindow.ShowConfirm("买手掉线,点击确定直接作废中转单并手动取消买手单,点击取消登录买手后重试").DialogResult != true)
|
||||
return;
|
||||
noBuyer = true;
|
||||
}
|
||||
noBuyer = true;
|
||||
}
|
||||
|
||||
if (!noBuyer)
|
||||
if (!noBuyer)
|
||||
{
|
||||
var pddAfterRst = PDDBuyerOrderReadCtrl.SimPddAfterSale(buyer, new PddBuyerOrderLiteInfo()
|
||||
{
|
||||
var pddAfterRst = PDDBuyerOrderReadCtrl.SimPddAfterSale(buyer, new PddBuyerOrderLiteInfo() { order_status_prompt = "待发货",
|
||||
order_amount = orderItem.ItemTransitOrder.out_amount, order_sn = orderItem.ItemTransitOrder.out_order_no });
|
||||
if (pddAfterRst.Contains("\"after_sales_status\":1") || pddAfterRst.Contains("该订单已全额退款") || pddAfterRst.Contains("订单未付款"))
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
if (BaseMsgWindow.ShowConfirm("买手退款失败,点击确定直接作废中转单并手动取消买手单,点击取消稍候重试").DialogResult != true)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//订单作废接口(作废重拍)
|
||||
//postman request POST 'http://localhost:8088/oms-api/external_procurement/discardOrder' \
|
||||
// --header 'Content-Type: application/json' \
|
||||
// --body '{
|
||||
// "orderNo":"12334534534",
|
||||
// "outOrderNo":"12312312"
|
||||
//}' 成功返回code:0 失败返回code:1
|
||||
|
||||
string url2 = "https://po.e57.cn/prod-api/api/oms-api/external_procurement/discardOrder";
|
||||
var data2 = new JObject();
|
||||
data2["orderNo"] = orderItem.order_id;
|
||||
data2["outOrderNo"] = orderItem.ItemTransitOrder.out_order_no;
|
||||
var dataStr2 = JsonHelper.SerializeObject(data2);
|
||||
var discardRst = HttpResponseWXBLL.e57PostResponse(url2, dataStr2, "");
|
||||
if (discardRst.Contains("<code>0</code>") || discardRst.Contains("<code>200</code>"))
|
||||
order_status_prompt = "待发货",
|
||||
order_amount = orderItem.ItemTransitOrder.out_amount,
|
||||
order_sn = orderItem.ItemTransitOrder.out_order_no
|
||||
});
|
||||
if (pddAfterRst.Contains("\"after_sales_status\":1") || pddAfterRst.Contains("该订单已全额退款") || pddAfterRst.Contains("订单未付款"))
|
||||
{
|
||||
MainWindow.Instance.orderListCtrl.GetOrder(orderId);
|
||||
MainWindow.Instance.orderListCtrl.FilterOrders();
|
||||
BaseMsgWindow.ShowInfo("订单作废成功,请重新拍单");
|
||||
|
||||
var url3 = BaseClass.Build29WxObjString("user/get_all_user");
|
||||
var data3 = UserLogin.GetSignaturex();
|
||||
data3 += "&search_user_name=" + BaseClass.UserName;
|
||||
var html = GetHtml.PostUtf8(url3, data3);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url3, data3);
|
||||
if (html.Contains("\"code\":200"))
|
||||
{
|
||||
BaseClass.Balance = BaseRegex.GetDecimalJson(ref html, "balance");
|
||||
MainWindow.Instance.Balance = BaseClass.Balance.ToString("0.00");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var msg = BaseRegex.GetStringXml(ref discardRst, "msg");
|
||||
BaseMsgWindow.ShowInfo("订单作废失败,服务端返回 " + msg);
|
||||
if (!isSilent)
|
||||
if (BaseMsgWindow.ShowConfirm("买手退款失败,点击确定直接作废中转单并手动取消买手单,点击取消稍候重试").DialogResult != true)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//订单作废接口(作废重拍)
|
||||
//postman request POST 'http://localhost:8088/oms-api/external_procurement/discardOrder' \
|
||||
// --header 'Content-Type: application/json' \
|
||||
// --body '{
|
||||
// "orderNo":"12334534534",
|
||||
// "outOrderNo":"12312312"
|
||||
//}' 成功返回code:0 失败返回code:1
|
||||
|
||||
string url2 = "https://po.e57.cn/prod-api/api/oms-api/external_procurement/discardOrder";
|
||||
var data2 = new JObject();
|
||||
data2["orderNo"] = orderItem.order_id;
|
||||
data2["outOrderNo"] = orderItem.ItemTransitOrder.out_order_no;
|
||||
//data2["outOrderNo"] = orderItem.ItemTransitOrder.order_code;
|
||||
var dataStr2 = JsonHelper.SerializeObject(data2);
|
||||
var discardRst = HttpResponseWXBLL.e57PostResponse(url2, dataStr2, "");
|
||||
if (discardRst.Contains("<code>0</code>") || discardRst.Contains("<code>200</code>"))
|
||||
{
|
||||
//MainWindow.Instance.orderListCtrl.GetOrder(orderId);
|
||||
#region 更新订单
|
||||
orderItem.ItemTransitOrder.order_void_status = 1;
|
||||
orderItem.SetTransitOrder();
|
||||
orderItem.SetItemRefund();
|
||||
#endregion
|
||||
|
||||
#region 重新过滤订单
|
||||
MainWindow.Instance.orderListCtrl.FilterOrders();
|
||||
if (!isSilent)
|
||||
BaseMsgWindow.ShowInfo("订单作废成功,请重新拍单");
|
||||
#endregion
|
||||
|
||||
#region 更新拍单余额
|
||||
var url3 = BaseClass.Build29WxObjString("user/get_all_user");
|
||||
var data3 = UserLogin.GetSignaturex();
|
||||
data3 += "&search_user_name=" + BaseClass.UserName;
|
||||
var html = GetHtml.PostUtf8(url3, data3);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url3, data3);
|
||||
if (html.Contains("\"code\":200"))
|
||||
{
|
||||
BaseClass.Balance = BaseRegex.GetDecimalJson(ref html, "balance");
|
||||
MainWindow.Instance.Balance = BaseClass.Balance.ToString("0.00");
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
else
|
||||
{
|
||||
var msg = BaseRegex.GetStringXml(ref discardRst, "msg");
|
||||
if (!isSilent)
|
||||
BaseMsgWindow.ShowInfo("订单作废失败,服务端返回 " + msg);
|
||||
}
|
||||
}
|
||||
|
||||
private void txtWarehouseStatus_MouseEnter(object sender, MouseEventArgs e)
|
||||
@@ -745,12 +821,21 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
var transitAfterSale = orderItem.ItemTransitOrderAfterSale;
|
||||
if (orderItem.ItemTransitOrder?.warehouse_status == 2 && orderItem.AddEditTransitWarehouseAfterSaleStr == "添加")
|
||||
{
|
||||
BaseMsgWindow.ShowError("商品已出库,请联系卖家直接退回总店!");
|
||||
BaseMsgWindow.ShowError("商品已出库,请联系买家直接退回总店!");
|
||||
return;
|
||||
}
|
||||
TransitAfterSaleWindow transitAfterSaleWindow = new TransitAfterSaleWindow(orderItem);
|
||||
transitAfterSaleWindow.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private void btnAbnormalOrderRebuy_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (this.DataContext is oms_wei_order_item_info orderItem)
|
||||
{
|
||||
if (orderItem.ItemOrder.status > 21 && orderItem.ItemTransitOrder != null && orderItem.ItemTransitOrder.refund_status == "买手退款成功")
|
||||
BuyOrder(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user