优化不同订单状态下操作功能

This commit is contained in:
wule committed 2026-09-14 20:37:50 +08:00
1 parent c25ec3a89a
commit 1b634434c2
6 files changed
+418 -436

No files matched your search

@@ -596,7 +596,7 @@
VerticalAlignment="Center"
BorderBrush="{StaticResource mainColorBrush}"
Click="chkMapProd_Click"
Content="已关联商品"
Content="选择SKU"
FontSize="12" />
<CheckBox
x:Name="chkMapSku"
@@ -989,7 +989,19 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
var waybillId = orderItem.ItemTransitOrderAfterSale.downstream_waybill;
var chkRst = AddReturnPddShopPackageInfocheck(buyer, orderSn, afterSalesId, waybillId);
var result = AddReturnPddShopPackageInfo(buyer, orderSn, afterSalesId, waybillId);
var type = 4;
if (chkRst.Contains("\"interactType\":0"))
type = 2;
var result = AddReturnPddShopPackageInfo(buyer, orderSn, afterSalesId, waybillId, "韵达快递", "121", type.ToString());
if (!result.Contains("\"result\":\"ok\""))
{
type = type == 4 ? 2 : 4;
result = AddReturnPddShopPackageInfo(buyer, orderSn, afterSalesId, waybillId, "韵达快递", "121", type.ToString());
}
if (!result.Contains("\"result\":\"ok\""))
{
result = AddReturnPddShopPackageInfo(buyer, orderSn, afterSalesId, waybillId, "韵达快递", "121", "5");
}
if (result.Contains("\"result\":\"ok\""))
{
@@ -1070,6 +1082,10 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
type = type == 4 ? 2 : 4;
result = AddReturnPddShopPackageInfo(buyer, orderSn, afterSalesId, waybillId, "韵达快递", "121", type.ToString());
}
if (!result.Contains("\"result\":\"ok\""))
{
result = AddReturnPddShopPackageInfo(buyer, orderSn, afterSalesId, waybillId, "韵达快递", "121", "5");
}
if (result.Contains("\"result\":\"ok\""))
{
@@ -1151,6 +1167,10 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
type = type == 4 ? 2 : 4;
result = AddReturnPddShopPackageInfo(buyer, orderSn, afterSalesId, waybillId, "韵达快递", "121", type.ToString());
}
if (!result.Contains("\"result\":\"ok\""))
{
result = AddReturnPddShopPackageInfo(buyer, orderSn, afterSalesId, waybillId, "韵达快递", "121", "5");
}
if (result.Contains("\"result\":\"ok\""))
{
@@ -1512,13 +1532,17 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
}
if (filterHeadStr.StartsWith("待采购"))
{
if (order.order_id == "3739161507780018688")
{
}
if (!order.IsWaitBuy)
return true;
if (chkMapSku.IsChecked == true && order.orderItems.All(oi => oi.BuyMap == null && (oi.BuyMapSkus == null || oi.BuyMapSkus.Count == 0)))
if (chkMapSku.IsChecked == true && order.orderItems.Any(oi => oi.BuyMap == null))
return true;
if (chkMapProd.IsChecked == true && order.orderItems.All(oi => oi.BuyMapSkus == null || oi.BuyMapSkus.Count == 0))
if (chkMapProd.IsChecked == true && order.orderItems.All(oi => oi.BuyMapSkus == null || oi.BuyMapSkus.Count == 0 || oi.BuyMap != null))
return true;
if (chkNoMapProd.IsChecked == true && order.orderItems.All(oi => oi.BuyMap != null))
if (chkNoMapProd.IsChecked == true && (order.orderItems.All(oi => oi.BuyMap != null) || order.orderItems.All(oi => oi.BuyMapSkus != null && oi.BuyMapSkus.Count > 0)))
return true;
}
if (filterHeadStr.StartsWith("待发货"))
@@ -276,9 +276,9 @@ namespace AllBase.Model.DBModel
else
TransitOrderWaybillFromWareHouseStr = ItemTransitOrder.express_2_company + "-" + ItemTransitOrder.express_2_waybill;
if (order_id == "3738461463336072960")
if (order_id == "3739043283864307968")
{
var xx = ShopWaybillExceptionStr;
}
TransitWarehouseRejectSuccessTimeStr = this.ItemTransitOrderWithVoid?.rejected_time == null ? "" : this.ItemTransitOrderWithVoid.rejected_time.Value.ToString("yy-MM-dd HH:mm");
AddEditTransitWarehouseRejectStr = "申请";
@@ -290,11 +290,12 @@ namespace AllBase.Model.DBModel
AddEditTransitWarehouseRejectStr = "申请拒收成功";
if (this.ItemTransitOrderWithVoid?.has_reject == 5)
AddEditTransitWarehouseRejectStr = "已取消拒收";
if (this.ItemTransitOrderWithVoid == null || this.ItemRefund?.type != "REFUND" || // 仅退款
if (this.ItemTransitOrderWithVoid == null || (this.ItemRefund?.type != "REFUND" && !this.ItemOrder.isAbnormal) || // 仅退款
TransitRefundStatusStr.Contains("退款成功") ||
!(this.ItemRefund?.return_waybill_id).IsNullOrEmpty() || !(this.ItemRefund?.return_detail).IsNullOrEmpty() ||
(!this.ItemOrder.IsEmergency && !this.ItemOrder.isAbnormal && !this.ItemOrder.IsRefund) ||
(this.ItemTransitOrderWithVoid.warehouse_status != 0 && this.ItemTransitOrderWithVoid.warehouse_status != 1) ||
/*this.ItemTransitOrderWithVoid.platform == "XDYYWC" ||*/ // 义务仓不能申请拒收
string.IsNullOrEmpty(PddBuyerOrder?.order_sn))
{
if (AddEditTransitWarehouseRejectStr == "申请")
@@ -303,7 +304,7 @@ namespace AllBase.Model.DBModel
// AddEditTransitWarehouseRejectStr = "申请拒收失败*";
}
if (order_id == "3738396781943865344")
if (order_id == "3738917560440771584")
{
}
@@ -316,7 +317,8 @@ namespace AllBase.Model.DBModel
AddEditTransitWarehouseAfterSaleStr = "拦截成功";
//if (this.ItemTransitOrderAfterSale != null && ItemTransitOrderWithVoid.intercept_return_status == 2)
// AddEditTransitWarehouseAfterSaleStr = "拦截失败";
if (this.ItemTransitOrderWithVoid == null || this.ItemRefund?.type != "REFUND" ||
if (this.ItemTransitOrderWithVoid == null || (this.ItemRefund?.type != "REFUND" && !this.ItemOrder.isAbnormal) ||
TransitRefundStatusStr.Contains("退款成功") ||
!(this.ItemRefund?.return_waybill_id).IsNullOrEmpty() || !(this.ItemRefund?.return_detail).IsNullOrEmpty() ||
(!this.ItemOrder.IsEmergency && !this.ItemOrder.isAbnormal && !this.ItemOrder.IsRefund) ||
this.ItemTransitOrderWithVoid.warehouse_status == 0 ||
@@ -326,7 +328,7 @@ namespace AllBase.Model.DBModel
AddEditTransitWarehouseAfterSaleStr = "";
}
// 退货退款的,不能拦截退回总店。如果是退到退货仓,则退货仓流程,否则店家自行收货退回总店。
if (!RefundAddressStr.ParseToString().Trim().IsNullOrEmpty() || this.ItemRefund?.type != "REFUND")
if (!RefundAddressStr.ParseToString().Trim().IsNullOrEmpty() || (this.ItemRefund?.type != "REFUND" && !this.ItemOrder.isAbnormal))
{
if (AddEditTransitWarehouseAfterSaleStr == "添加")
AddEditTransitWarehouseAfterSaleStr = "";
@@ -352,10 +354,20 @@ namespace AllBase.Model.DBModel
AddEditTransitWarehouseReturnOrderStr = "创建异常";
if (DistribReturnOrderInfo?.warehouse_status == 3)
AddEditTransitWarehouseReturnOrderStr = "处理中";
if (TransitRefundStatusStr.Contains("退款成功"))
{
if (AddEditTransitWarehouseReturnOrderStr == "添加")
AddEditTransitWarehouseReturnOrderStr = "";
}
}
// 云仓买手退货地址
this.PddBuyerAfterSaleAddressStr = this.PddBuyerAfterSale?.afterSaleAddress;
if (this.order_id == "3739062243856391936")
{
}
// 直发买手退货地址
this.DirectPddBuyerAfterSaleAddressStr = this.DirectPddBuyerAfterSale?.afterSaleAddress;
}
File diff suppressed because it is too large. Load diff
+13 -11
View File
@@ -31,6 +31,7 @@
this.components = new System.ComponentModel.Container();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.pnlMask = new DevComponents.DotNetBar.PanelEx();
this.lblErrMsg = new System.Windows.Forms.Label();
this.btnJumpOrderList = new DevComponents.DotNetBar.PanelEx();
this.txtBuySkuName = new System.Windows.Forms.TextBox();
this.label21 = new System.Windows.Forms.Label();
@@ -110,7 +111,6 @@
this.chkAutoChangeWarehouseAddress = new Work.UserComponents.UcCheckBox(this.components);
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.pnlMap = new System.Windows.Forms.Panel();
this.lblErrMsg = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pbCloseBase)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
@@ -187,6 +187,17 @@
this.pnlMask.Text = "自动拍单倒计时\r\n8";
this.pnlMask.Visible = false;
//
// lblErrMsg
//
this.lblErrMsg.AutoSize = true;
this.lblErrMsg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblErrMsg.ForeColor = System.Drawing.Color.Red;
this.lblErrMsg.Location = new System.Drawing.Point(166, 5);
this.lblErrMsg.Name = "lblErrMsg";
this.lblErrMsg.Size = new System.Drawing.Size(87, 17);
this.lblErrMsg.TabIndex = 893;
this.lblErrMsg.Text = "errMsg ";
//
// btnJumpOrderList
//
this.btnJumpOrderList.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -1107,6 +1118,7 @@
this.txtBuyTransitWarehouse.Name = "txtBuyTransitWarehouse";
this.txtBuyTransitWarehouse.Size = new System.Drawing.Size(388, 23);
this.txtBuyTransitWarehouse.TabIndex = 870;
this.txtBuyTransitWarehouse.TextChanged += new System.EventHandler(this.txtBuyTransitWarehouse_TextChanged);
//
// label29
//
@@ -1166,16 +1178,6 @@
this.pnlMap.Size = new System.Drawing.Size(468, 203);
this.pnlMap.TabIndex = 871;
//
// lblErrMsg
//
this.lblErrMsg.AutoSize = true;
this.lblErrMsg.ForeColor = System.Drawing.Color.SandyBrown;
this.lblErrMsg.Location = new System.Drawing.Point(198, 5);
this.lblErrMsg.Name = "lblErrMsg";
this.lblErrMsg.Size = new System.Drawing.Size(87, 17);
this.lblErrMsg.TabIndex = 893;
this.lblErrMsg.Text = "errMsg ";
//
// PddMobileBuyOrderForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+2 -1
View File
@@ -146,7 +146,8 @@ namespace Work._29Tools.Forms.ToolForms
Task.Run(() =>
{
Thread.Sleep(2500);
Invoke(new Action(() => { this.btnCopy.Text = "复制图片"; }));
if (this.Created)
Invoke(new Action(() => { this.btnCopy.Text = "复制图片"; }));
});
//BaseMsgForm.ShowInfo("图片已复制到剪贴板");
}