1商品调价功能 2单品参加活动功能优化

This commit is contained in:
wule committed 2025-10-28 18:44:08 +08:00
1 parent ab33a9c0c0
commit 0d3ab6321e
16 files changed
+2260 -421

No files matched your search

@@ -32,6 +32,9 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ShopOrderStatisticsDetailForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx3 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
@@ -64,6 +67,8 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
this.colScore = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colOperate = new System.Windows.Forms.DataGridViewLinkColumn();
this.colActivity = new System.Windows.Forms.DataGridViewLinkColumn();
this.colChangePrice = new System.Windows.Forms.DataGridViewLinkColumn();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -254,7 +259,9 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
this.colDiscount,
this.colScore,
this.colNotes,
this.colOperate});
this.colOperate,
this.colActivity,
this.colChangePrice});
this.dgvOrder.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvOrder.Location = new System.Drawing.Point(4, 0);
this.dgvOrder.Name = "dgvOrder";
@@ -346,28 +353,28 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
// colSevenDaysSaleVolume
//
this.colSevenDaysSaleVolume.FillWeight = 75F;
this.colSevenDaysSaleVolume.HeaderText = "近7日销量";
this.colSevenDaysSaleVolume.HeaderText = "7日销量";
this.colSevenDaysSaleVolume.Name = "colSevenDaysSaleVolume";
this.colSevenDaysSaleVolume.ReadOnly = true;
//
// colSevenDaysProfit
//
this.colSevenDaysProfit.FillWeight = 75F;
this.colSevenDaysProfit.HeaderText = "近7日利润";
this.colSevenDaysProfit.HeaderText = "7日利润";
this.colSevenDaysProfit.Name = "colSevenDaysProfit";
this.colSevenDaysProfit.ReadOnly = true;
//
// colThirtyDaysSaleVolume
//
this.colThirtyDaysSaleVolume.FillWeight = 85F;
this.colThirtyDaysSaleVolume.HeaderText = "近30日销量";
this.colThirtyDaysSaleVolume.FillWeight = 75F;
this.colThirtyDaysSaleVolume.HeaderText = "30日销量";
this.colThirtyDaysSaleVolume.Name = "colThirtyDaysSaleVolume";
this.colThirtyDaysSaleVolume.ReadOnly = true;
//
// colThirtyDaysProfit
//
this.colThirtyDaysProfit.FillWeight = 85F;
this.colThirtyDaysProfit.HeaderText = "近30日利润";
this.colThirtyDaysProfit.FillWeight = 75F;
this.colThirtyDaysProfit.HeaderText = "30日利润";
this.colThirtyDaysProfit.Name = "colThirtyDaysProfit";
this.colThirtyDaysProfit.ReadOnly = true;
//
@@ -434,12 +441,36 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
//
// colOperate
//
this.colOperate.FillWeight = 70F;
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colOperate.DefaultCellStyle = dataGridViewCellStyle3;
this.colOperate.FillWeight = 50F;
this.colOperate.HeaderText = "操作";
this.colOperate.Name = "colOperate";
this.colOperate.ReadOnly = true;
this.colOperate.Resizable = System.Windows.Forms.DataGridViewTriState.True;
//
// colActivity
//
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colActivity.DefaultCellStyle = dataGridViewCellStyle4;
this.colActivity.FillWeight = 50F;
this.colActivity.HeaderText = "报名活动";
this.colActivity.Name = "colActivity";
this.colActivity.ReadOnly = true;
this.colActivity.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colActivity.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// colChangePrice
//
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.colChangePrice.DefaultCellStyle = dataGridViewCellStyle5;
this.colChangePrice.FillWeight = 50F;
this.colChangePrice.HeaderText = "一键调价";
this.colChangePrice.Name = "colChangePrice";
this.colChangePrice.ReadOnly = true;
this.colChangePrice.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colChangePrice.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// ShopOrderStatisticsDetailForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -502,5 +533,7 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
private System.Windows.Forms.DataGridViewTextBoxColumn colScore;
private System.Windows.Forms.DataGridViewTextBoxColumn colNotes;
private System.Windows.Forms.DataGridViewLinkColumn colOperate;
private System.Windows.Forms.DataGridViewLinkColumn colActivity;
private System.Windows.Forms.DataGridViewLinkColumn colChangePrice;
}
}
@@ -11,6 +11,9 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using TemuKJD.BaseForms;
using TemuKJD.Extension;
using TemuKJD.KJDForms.ProductForms;
using TemuKJD.KJDForms.SalesCenterForms;
using TemuKJD.KJDForms.ToolForms;
using TemuKJD.ToolForms;
@@ -20,6 +23,7 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
{
public static ShopOrderStatisticsDetailForm orderStatisticsDetailInstance = null;
public bool IsAdjustPrice = false;
public List<WarehouseProductSubOrderInfo> lstSubOrderInfo = new List<WarehouseProductSubOrderInfo>();
ShopLoginInfo shop = null;
public ShopOrderStatisticsDetailForm(ShopLoginInfo shopInfo, List<WarehouseProductSubOrderInfo> subOrderInfoLst = null)
@@ -52,6 +56,8 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
private void ShopOrderStatisticsDetailForm_Load(object sender, EventArgs e)
{
this.dgvOrder.AddMergeColumnHeader(new List<string>() { "colOperate", "colActivity", "colChangePrice" }, "操作");
this.TitleText = shop?.ShopId + " - " + shop?.ShopAccount + " - 订单详情";
this.ShowOrderList();
}
@@ -95,7 +101,9 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
order.discount.ParseToDecimal() * 0.01m, //折扣
order.goodsAfsScore == null ? null : order.goodsAfsScore?.ToString("f2"), //品质分
order.purchasePriceInfo?.notes, //备注
"设置进价"
"设置\r\n进价",
"报名\r\n活动",
"一键\r\n调价"
);
this.dgvOrder.Rows[rowId].Height = 50;
}
@@ -198,7 +206,50 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
}
}
break;
case "报名活动":
{
if (shop != null)
{
if (MarketingActivityForm.ActInstance != null)
{
MarketingActivityForm.ActInstance.soloActivityShop = shop;
MarketingActivityForm.ActInstance.soloActivityProduct = order;
MarketingActivityForm.ActInstance.RefreshSoloActivityCtrl();
MarketingActivityForm.ActInstance.ShowDialog();
}
else
{
MarketingActivityForm activityForm = new MarketingActivityForm(shop, order);
activityForm.ShowDialog();
}
}
}
break;
case "一键调价":
{
if (shop != null)
{
ProductChangePriceForm changePriceForm = new ProductChangePriceForm(shop, order);
changePriceForm.ShowDialog();
if (changePriceForm.AdjustPrice == true)
{
if (ShopOrderStatisticsForm.OrderStatisticsInstance != null)
{
ShopOrderStatisticsForm.OrderStatisticsInstance.CountPrice(shop);
ShopOrderStatisticsForm.OrderStatisticsInstance.RefreshShop();
}
dgvOrder.Rows[e.RowIndex].Cells["colDiscount"].Value = order.discount.ParseToDecimal() * 0.01m;
dgvOrder.Rows[e.RowIndex].Cells["colNotes"].Value = order.purchasePriceInfo?.notes;
dgvOrder.Rows[e.RowIndex].Cells["colTodayProfit"].Value = order.skuQuantityTotalInfo.todayProfit.Value.ToString("0.00");
dgvOrder.Rows[e.RowIndex].Cells["colSevenDaysProfit"].Value = order.skuQuantityTotalInfo.sevenDaysProfit.Value.ToString("0.00");
dgvOrder.Rows[e.RowIndex].Cells["colThirtyDaysProfit"].Value = order.skuQuantityTotalInfo.thirtyDaysProfit.Value.ToString("0.00");
dgvOrder.Rows[e.RowIndex].Cells["colGoodsValue"].Value = order.skuQuantityTotalInfo.goodsValue * 0.01m;
dgvOrder.Rows[e.RowIndex].Cells["colGoodsCost"].Value = order.skuQuantityTotalInfo.goodsCost * 0.01m;
}
}
}
break;
case "状态":
break;
default:
@@ -183,6 +183,12 @@
<metadata name="colOperate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colActivity.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colChangePrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
@@ -49,7 +49,6 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
this.btnGetSelect = new DevComponents.DotNetBar.PanelEx();
this.btnGetNotGet = new DevComponents.DotNetBar.PanelEx();
this.dgvOrder = new TemuKJD.UserComponent.DataGridViewEx();
this.btnSave = new DevComponents.DotNetBar.PanelEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colSpu = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSkc = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -59,6 +58,7 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
this.colSkuPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSkuPurchasePrice = new DevComponents.DotNetBar.Controls.DataGridViewDoubleInputColumn();
this.colAvailableBalance = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.btnSave = new DevComponents.DotNetBar.PanelEx();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -345,32 +345,6 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
this.dgvOrder.Size = new System.Drawing.Size(630, 434);
this.dgvOrder.TabIndex = 5;
//
// btnSave
//
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSave.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSave.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSave.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSave.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSave.Location = new System.Drawing.Point(562, 3);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(80, 23);
this.btnSave.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSave.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSave.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSave.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSave.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSave.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSave.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSave.Style.GradientAngle = 90;
this.btnSave.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSave.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSave.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSave.TabIndex = 435;
this.btnSave.TabStop = true;
this.btnSave.Text = "保存";
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// colSelect
//
this.colSelect.FillWeight = 28F;
@@ -450,6 +424,32 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics
this.colAvailableBalance.ReadOnly = true;
this.colAvailableBalance.Visible = false;
//
// btnSave
//
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSave.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSave.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSave.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSave.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSave.Location = new System.Drawing.Point(562, 3);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(80, 23);
this.btnSave.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSave.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSave.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSave.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSave.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSave.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSave.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSave.Style.GradientAngle = 90;
this.btnSave.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSave.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSave.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSave.TabIndex = 435;
this.btnSave.TabStop = true;
this.btnSave.Text = "保存";
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// ShopSetPurchasePriceForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;