订单金额统计利润计算功能
This commit is contained in:
1 parent
eca6a8a9e7
commit
cc539ce604
27 files changed
+2090
-214
No files matched your search
+69
-34
@@ -30,6 +30,8 @@
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DbProductSelectEditNotesForm));
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.btnOk = new DevComponents.DotNetBar.PanelEx();
|
||||
this.cmbUserNotes = new System.Windows.Forms.ComboBox();
|
||||
this.cmbStatus = new System.Windows.Forms.ComboBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.txtDraftId = new System.Windows.Forms.TextBox();
|
||||
@@ -47,7 +49,7 @@
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.txtNotes = new DevComponents.DotNetBar.Controls.TextBoxX();
|
||||
this.btnOk = new TemuKJD.UserControls.ButtonEx();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.panel2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
@@ -55,6 +57,9 @@
|
||||
// panel2
|
||||
//
|
||||
this.panel2.BackColor = System.Drawing.Color.White;
|
||||
this.panel2.Controls.Add(this.label7);
|
||||
this.panel2.Controls.Add(this.btnOk);
|
||||
this.panel2.Controls.Add(this.cmbUserNotes);
|
||||
this.panel2.Controls.Add(this.cmbStatus);
|
||||
this.panel2.Controls.Add(this.label6);
|
||||
this.panel2.Controls.Add(this.txtDraftId);
|
||||
@@ -72,13 +77,49 @@
|
||||
this.panel2.Controls.Add(this.pictureBox1);
|
||||
this.panel2.Controls.Add(this.label8);
|
||||
this.panel2.Controls.Add(this.txtNotes);
|
||||
this.panel2.Controls.Add(this.btnOk);
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel2.Location = new System.Drawing.Point(1, 33);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(391, 546);
|
||||
this.panel2.TabIndex = 1;
|
||||
//
|
||||
// btnOk
|
||||
//
|
||||
this.btnOk.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnOk.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnOk.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnOk.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnOk.Location = new System.Drawing.Point(298, 490);
|
||||
this.btnOk.Name = "btnOk";
|
||||
this.btnOk.Size = new System.Drawing.Size(55, 26);
|
||||
this.btnOk.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnOk.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnOk.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnOk.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.btnOk.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.btnOk.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.btnOk.Style.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnOk.Style.GradientAngle = 90;
|
||||
this.btnOk.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnOk.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnOk.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
|
||||
this.btnOk.TabIndex = 487;
|
||||
this.btnOk.Text = "提交";
|
||||
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
|
||||
//
|
||||
// cmbUserNotes
|
||||
//
|
||||
this.cmbUserNotes.FormattingEnabled = true;
|
||||
this.cmbUserNotes.Items.AddRange(new object[] {
|
||||
"",
|
||||
"已买",
|
||||
"重上"});
|
||||
this.cmbUserNotes.Location = new System.Drawing.Point(88, 460);
|
||||
this.cmbUserNotes.Name = "cmbUserNotes";
|
||||
this.cmbUserNotes.Size = new System.Drawing.Size(265, 25);
|
||||
this.cmbUserNotes.TabIndex = 446;
|
||||
this.cmbUserNotes.Text = "已买";
|
||||
//
|
||||
// cmbStatus
|
||||
//
|
||||
this.cmbStatus.Enabled = false;
|
||||
@@ -87,7 +128,7 @@
|
||||
"待上传",
|
||||
"已上传",
|
||||
"草稿箱"});
|
||||
this.cmbStatus.Location = new System.Drawing.Point(252, 397);
|
||||
this.cmbStatus.Location = new System.Drawing.Point(252, 381);
|
||||
this.cmbStatus.Name = "cmbStatus";
|
||||
this.cmbStatus.Size = new System.Drawing.Size(101, 25);
|
||||
this.cmbStatus.TabIndex = 442;
|
||||
@@ -95,7 +136,7 @@
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(220, 401);
|
||||
this.label6.Location = new System.Drawing.Point(220, 385);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(32, 17);
|
||||
this.label6.TabIndex = 441;
|
||||
@@ -105,7 +146,7 @@
|
||||
//
|
||||
this.txtDraftId.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtDraftId.Location = new System.Drawing.Point(88, 398);
|
||||
this.txtDraftId.Location = new System.Drawing.Point(88, 382);
|
||||
this.txtDraftId.Name = "txtDraftId";
|
||||
this.txtDraftId.ReadOnly = true;
|
||||
this.txtDraftId.Size = new System.Drawing.Size(106, 23);
|
||||
@@ -114,7 +155,7 @@
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(42, 401);
|
||||
this.label5.Location = new System.Drawing.Point(42, 385);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(45, 17);
|
||||
this.label5.TabIndex = 439;
|
||||
@@ -126,7 +167,7 @@
|
||||
this.btnFission.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.btnFission.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnFission.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnFission.Location = new System.Drawing.Point(88, 483);
|
||||
this.btnFission.Location = new System.Drawing.Point(88, 490);
|
||||
this.btnFission.Name = "btnFission";
|
||||
this.btnFission.Size = new System.Drawing.Size(56, 26);
|
||||
this.btnFission.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
@@ -148,7 +189,7 @@
|
||||
// lblTextCount
|
||||
//
|
||||
this.lblTextCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lblTextCount.Location = new System.Drawing.Point(245, 160);
|
||||
this.lblTextCount.Location = new System.Drawing.Point(245, 158);
|
||||
this.lblTextCount.Name = "lblTextCount";
|
||||
this.lblTextCount.Size = new System.Drawing.Size(106, 17);
|
||||
this.lblTextCount.TabIndex = 399;
|
||||
@@ -159,7 +200,7 @@
|
||||
//
|
||||
this.txtSkc.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtSkc.Location = new System.Drawing.Point(252, 332);
|
||||
this.txtSkc.Location = new System.Drawing.Point(252, 324);
|
||||
this.txtSkc.Name = "txtSkc";
|
||||
this.txtSkc.ReadOnly = true;
|
||||
this.txtSkc.Size = new System.Drawing.Size(101, 23);
|
||||
@@ -168,7 +209,7 @@
|
||||
// txtSpu
|
||||
//
|
||||
this.txtSpu.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.txtSpu.Location = new System.Drawing.Point(88, 332);
|
||||
this.txtSpu.Location = new System.Drawing.Point(88, 324);
|
||||
this.txtSpu.Name = "txtSpu";
|
||||
this.txtSpu.ReadOnly = true;
|
||||
this.txtSpu.Size = new System.Drawing.Size(106, 23);
|
||||
@@ -179,7 +220,7 @@
|
||||
this.txtProdName.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtProdName.Location = new System.Drawing.Point(88, 180);
|
||||
this.txtProdName.Location = new System.Drawing.Point(88, 176);
|
||||
this.txtProdName.Multiline = true;
|
||||
this.txtProdName.Name = "txtProdName";
|
||||
this.txtProdName.ReadOnly = true;
|
||||
@@ -191,7 +232,7 @@
|
||||
//
|
||||
this.txtShopName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtShopName.Location = new System.Drawing.Point(88, 365);
|
||||
this.txtShopName.Location = new System.Drawing.Point(88, 353);
|
||||
this.txtShopName.Name = "txtShopName";
|
||||
this.txtShopName.ReadOnly = true;
|
||||
this.txtShopName.Size = new System.Drawing.Size(265, 23);
|
||||
@@ -200,7 +241,7 @@
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(31, 368);
|
||||
this.label4.Location = new System.Drawing.Point(31, 356);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(56, 17);
|
||||
this.label4.TabIndex = 394;
|
||||
@@ -209,7 +250,7 @@
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(31, 183);
|
||||
this.label3.Location = new System.Drawing.Point(31, 179);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(56, 17);
|
||||
this.label3.TabIndex = 392;
|
||||
@@ -218,7 +259,7 @@
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(196, 335);
|
||||
this.label2.Location = new System.Drawing.Point(196, 327);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(56, 17);
|
||||
this.label2.TabIndex = 391;
|
||||
@@ -227,7 +268,7 @@
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(31, 335);
|
||||
this.label1.Location = new System.Drawing.Point(31, 327);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(56, 17);
|
||||
this.label1.TabIndex = 390;
|
||||
@@ -246,7 +287,7 @@
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(32, 433);
|
||||
this.label8.Location = new System.Drawing.Point(32, 413);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(56, 17);
|
||||
this.label8.TabIndex = 386;
|
||||
@@ -269,28 +310,20 @@
|
||||
this.txtNotes.Border.PaddingLeft = 2;
|
||||
this.txtNotes.Border.PaddingRight = 2;
|
||||
this.txtNotes.Border.PaddingTop = 2;
|
||||
this.txtNotes.Location = new System.Drawing.Point(88, 431);
|
||||
this.txtNotes.Location = new System.Drawing.Point(88, 411);
|
||||
this.txtNotes.Multiline = true;
|
||||
this.txtNotes.Name = "txtNotes";
|
||||
this.txtNotes.Size = new System.Drawing.Size(265, 44);
|
||||
this.txtNotes.TabIndex = 385;
|
||||
//
|
||||
// btnOk
|
||||
// label7
|
||||
//
|
||||
this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnOk.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnOk.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnOk.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnOk.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnOk.ForeColor = System.Drawing.Color.White;
|
||||
this.btnOk.Location = new System.Drawing.Point(298, 483);
|
||||
this.btnOk.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnOk.Name = "btnOk";
|
||||
this.btnOk.Size = new System.Drawing.Size(55, 26);
|
||||
this.btnOk.TabIndex = 372;
|
||||
this.btnOk.Text = "提交";
|
||||
this.btnOk.UseVisualStyleBackColor = false;
|
||||
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(32, 464);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(56, 17);
|
||||
this.label7.TabIndex = 494;
|
||||
this.label7.Text = "客户备注";
|
||||
//
|
||||
// DbProductSelectEditNotesForm
|
||||
//
|
||||
@@ -314,7 +347,6 @@
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private UserControls.ButtonEx btnOk;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private DevComponents.DotNetBar.Controls.TextBoxX txtNotes;
|
||||
private System.Windows.Forms.Label label3;
|
||||
@@ -332,5 +364,8 @@
|
||||
private System.Windows.Forms.TextBox txtDraftId;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.ComboBox cmbStatus;
|
||||
private System.Windows.Forms.ComboBox cmbUserNotes;
|
||||
private DevComponents.DotNetBar.PanelEx btnOk;
|
||||
private System.Windows.Forms.Label label7;
|
||||
}
|
||||
}
|
||||
@@ -45,6 +45,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
this.txtNotes.Text = dbProdSelect.notes;
|
||||
this.cmbStatus.Text = dbProdSelect.status;
|
||||
this.txtDraftId.Text = dbProdSelect.draft_id;
|
||||
this.cmbUserNotes.Text = dbProdSelect.user_notes;
|
||||
}
|
||||
|
||||
if (selectNotesType == SetProductSelectNotesType.DbProduct)
|
||||
@@ -70,6 +71,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
url = BaseClass.BuildObjString("product_third/mdy_product_select_notes");
|
||||
var data = UserLogin.GetSignaturex() +
|
||||
"&db_id=" + dbProdSelect.id + "¬es=" + this.txtNotes.Text.Trim();
|
||||
data += "&user_notes=" + this.cmbUserNotes.Text.Trim();
|
||||
if (selectNotesType == SetProductSelectNotesType.DbProduct)
|
||||
{
|
||||
byte[] bytes = Encoding.GetEncoding("gb2312").GetBytes(txtProdName.Text.Trim());
|
||||
@@ -92,6 +94,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
else
|
||||
{
|
||||
dbProdSelect.notes = this.txtNotes.Text.Trim();
|
||||
dbProdSelect.user_notes = this.cmbUserNotes.Text.Trim();
|
||||
if (selectNotesType == SetProductSelectNotesType.DbProduct)
|
||||
{
|
||||
dbProdSelect.fission_product_name = this.txtProdName.Text.Trim();
|
||||
|
||||
+62
-2
@@ -39,6 +39,8 @@
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DbProductSelectListManageForm));
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.btnStop = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnExport = new DevComponents.DotNetBar.PanelEx();
|
||||
this.lblCustomImgNum = new System.Windows.Forms.Label();
|
||||
this.btnCustomImg = new DevComponents.DotNetBar.PanelEx();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
@@ -146,6 +148,8 @@
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.btnStop);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.btnExport);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.lblCustomImgNum);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.btnCustomImg);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.label14);
|
||||
@@ -164,6 +168,58 @@
|
||||
this.splitContainer1.SplitterDistance = 100;
|
||||
this.splitContainer1.TabIndex = 2;
|
||||
//
|
||||
// btnStop
|
||||
//
|
||||
this.btnStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnStop.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.btnStop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnStop.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnStop.Location = new System.Drawing.Point(1464, 39);
|
||||
this.btnStop.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
|
||||
this.btnStop.Name = "btnStop";
|
||||
this.btnStop.Size = new System.Drawing.Size(90, 26);
|
||||
this.btnStop.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnStop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
|
||||
this.btnStop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
|
||||
this.btnStop.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
|
||||
this.btnStop.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnStop.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
|
||||
this.btnStop.Style.GradientAngle = 90;
|
||||
this.btnStop.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnStop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnStop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnStop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnStop.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnStop.TabIndex = 507;
|
||||
this.btnStop.Text = "停止上传";
|
||||
this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
|
||||
//
|
||||
// btnExport
|
||||
//
|
||||
this.btnExport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnExport.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.btnExport.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.btnExport.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.btnExport.Location = new System.Drawing.Point(1372, 39);
|
||||
this.btnExport.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2);
|
||||
this.btnExport.Name = "btnExport";
|
||||
this.btnExport.Size = new System.Drawing.Size(90, 26);
|
||||
this.btnExport.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnExport.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
|
||||
this.btnExport.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
|
||||
this.btnExport.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
|
||||
this.btnExport.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnExport.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
|
||||
this.btnExport.Style.GradientAngle = 90;
|
||||
this.btnExport.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnExport.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.btnExport.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnExport.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnExport.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
|
||||
this.btnExport.TabIndex = 494;
|
||||
this.btnExport.Text = "导出数据表格";
|
||||
this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
|
||||
//
|
||||
// lblCustomImgNum
|
||||
//
|
||||
this.lblCustomImgNum.AutoSize = true;
|
||||
@@ -1164,11 +1220,13 @@
|
||||
//
|
||||
this.ucSplitPage1.CurrentPage = 1;
|
||||
this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.ucSplitPage1.Location = new System.Drawing.Point(1196, 0);
|
||||
this.ucSplitPage1.IsShowPageSize = true;
|
||||
this.ucSplitPage1.Location = new System.Drawing.Point(1158, 0);
|
||||
this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.ucSplitPage1.Name = "ucSplitPage1";
|
||||
this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0);
|
||||
this.ucSplitPage1.Size = new System.Drawing.Size(362, 25);
|
||||
this.ucSplitPage1.PageSize = 200;
|
||||
this.ucSplitPage1.Size = new System.Drawing.Size(400, 25);
|
||||
this.ucSplitPage1.TabIndex = 6;
|
||||
this.ucSplitPage1.TotalPage = 1;
|
||||
//
|
||||
@@ -1300,5 +1358,7 @@
|
||||
private UserComponent.UcCheckBox chkCustomPic;
|
||||
private System.Windows.Forms.Label lblCustomImgNum;
|
||||
private DevComponents.DotNetBar.PanelEx btnCustomImg;
|
||||
private DevComponents.DotNetBar.PanelEx btnExport;
|
||||
private DevComponents.DotNetBar.PanelEx btnStop;
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
{
|
||||
public partial class DbProductSelectListManageForm : LRBaseForm
|
||||
{
|
||||
public CancellationTokenSource cancellationTokenSource { get; set; } = null;
|
||||
|
||||
List<TemuDBProductSelect> lstAdminTemuDBProductSelect = new List<TemuDBProductSelect>();
|
||||
List<ShopLoginInfo> shopLst = new List<ShopLoginInfo>();
|
||||
List<TemuDBExtCodePriceInfo> lstDbPrice = new List<TemuDBExtCodePriceInfo>();
|
||||
@@ -185,7 +187,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
Task.Run(() =>
|
||||
{
|
||||
int pageCount;
|
||||
var list = GetSelectProductList(out pageCount, page, 200);
|
||||
var list = GetSelectProductList(out pageCount, page, ucSplitPage1.PageSize);
|
||||
lstAdminTemuDBProductSelect.AddRange(list);
|
||||
this.ucSplitPage1.TotalPage = pageCount;
|
||||
|
||||
@@ -397,6 +399,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
DbProductSelectEditNotesForm editForm = new DbProductSelectEditNotesForm(dbSelectProduct);
|
||||
editForm.ShowDialog();
|
||||
dgvSelectProduct.Rows[e.RowIndex].Cells["colNotes"].Value = dbSelectProduct.notes;
|
||||
dgvSelectProduct.Rows[e.RowIndex].Cells["colUserNotes"].Value = dbSelectProduct.user_notes;
|
||||
dgvSelectProduct.Rows[e.RowIndex].Cells["colProductName"].Value = dbSelectProduct.fission_product_name;
|
||||
break;
|
||||
case "Skc图片":
|
||||
@@ -579,6 +582,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
if (prodList.Count() > 0)
|
||||
{
|
||||
this.btnAdd.Enabled = false;
|
||||
cancellationTokenSource = new CancellationTokenSource();
|
||||
Task.Run(() =>
|
||||
{
|
||||
AddProductDraft(prodList);
|
||||
@@ -586,7 +590,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
{
|
||||
this.btnAdd.Enabled = true;
|
||||
}));
|
||||
});
|
||||
}, cancellationTokenSource.Token);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -612,6 +616,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
|
||||
foreach (var prod in prodSelect)
|
||||
{
|
||||
if (cancellationTokenSource.IsCancellationRequested)
|
||||
break;
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.statusBar.UpdateProgressBar(this.statusBar.pgbTaskProgress.Value + 1);
|
||||
@@ -763,13 +770,19 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
BaseMsgForm.ShowInfo("上传" + (this.chkUploadProd.Checked ? "" : "草稿") + "完成!");
|
||||
if (cancellationTokenSource.IsCancellationRequested)
|
||||
BaseMsgForm.ShowInfo("上传" + (this.chkUploadProd.Checked ? "" : "草稿") + "停止!");
|
||||
else
|
||||
BaseMsgForm.ShowInfo("上传" + (this.chkUploadProd.Checked ? "" : "草稿") + "完成!");
|
||||
}));
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.pbLoading.Visible = false;
|
||||
this.statusBar.lblTaskStatus.Text = "上传" + (this.chkUploadProd.Checked ? "" : "草稿") + "完成";
|
||||
if (cancellationTokenSource.IsCancellationRequested)
|
||||
this.statusBar.lblTaskStatus.Text = "上传" + (this.chkUploadProd.Checked ? "" : "草稿") + "停止";
|
||||
else
|
||||
this.statusBar.lblTaskStatus.Text = "上传" + (this.chkUploadProd.Checked ? "" : "草稿") + "完成";
|
||||
this.statusBar.UpdateProgressBar(prodSelect.Length);
|
||||
}));
|
||||
}
|
||||
@@ -1222,6 +1235,13 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
skuListTmp.AddRange(skcInfo.productSkuList);
|
||||
while (skuListTmp.Count > 0)
|
||||
{
|
||||
if (cancellationTokenSource.IsCancellationRequested)
|
||||
{
|
||||
return "{\"success\":false,\"status\":\"未上传\"," +
|
||||
"\"productDraftId\":\"" + prodParam.productDraftId.ParseToString() + "\"," +
|
||||
"\"errMsg\":\"上传停止\"}";
|
||||
}
|
||||
|
||||
skuCount++;
|
||||
if (cell != null)
|
||||
{
|
||||
@@ -1372,6 +1392,13 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
prodParam.productSkcReqs.Add(skcItem);
|
||||
}
|
||||
|
||||
if (cancellationTokenSource.IsCancellationRequested)
|
||||
{
|
||||
return "{\"success\":false,\"status\":\"未上传\"," +
|
||||
"\"productDraftId\":\"" + prodParam.productDraftId.ParseToString() + "\"," +
|
||||
"\"errMsg\":\"上传停止\"}";
|
||||
}
|
||||
|
||||
#region 尺码表
|
||||
string sizeError = "";
|
||||
//上传尺码表(如果有)
|
||||
@@ -1413,6 +1440,13 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
}
|
||||
#endregion
|
||||
|
||||
if (cancellationTokenSource.IsCancellationRequested)
|
||||
{
|
||||
return "{\"success\":false,\"status\":\"未上传\"," +
|
||||
"\"productDraftId\":\"" + prodParam.productDraftId.ParseToString() + "\"," +
|
||||
"\"errMsg\":\"上传停止\"}";
|
||||
}
|
||||
|
||||
if (cell != null)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
@@ -1423,7 +1457,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
|
||||
html = SaveDraft(shop, prodParam.productDraftId.ToString(), prodParam);
|
||||
if (html.Contains("\"success\":true"))
|
||||
{
|
||||
if (!chkUploadProd.Checked)
|
||||
if (!chkUploadProd.Checked /*|| cancellationTokenSource.IsCancellationRequested*/)
|
||||
{
|
||||
#region 使用草稿箱模拟上传后改图
|
||||
if (chkCustomPic.Checked)
|
||||
@@ -2114,5 +2148,24 @@ Content-Disposition: form-data; name=""upload_sign""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void btnExport_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveFileDialog dialog = new SaveFileDialog();
|
||||
dialog.Title = "Save file as...";
|
||||
dialog.Filter = "Excel files (*.csv)|*.csv|All files (*.*)|*.*";
|
||||
dialog.RestoreDirectory = true;
|
||||
|
||||
dialog.FileName = "认领上传:" + DateTime.Now.ToString("yyyy-MM-dd HH-mm") + ".csv";
|
||||
if (dialog.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
OutExcel.SaveFile(dialog.FileName, dgvSelectProduct);
|
||||
}
|
||||
|
||||
private void btnStop_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (cancellationTokenSource != null)
|
||||
cancellationTokenSource.Cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user